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
new OSXApplicationListener(listener); } private OSXListener listener; private OSXApplicationListener(OSXListener listener) { if (listener == null) { throw new NullPointerException(); } this.listener = listener; Application application = new Application(); application.addApplicationListener(this); ...
new OSXApplicationListener(listener); } private OSXListener listener; private OSXApplicationListener(OSXListener listener) { if (listener == null) { throw new NullPointerException(); } this.listener = listener; Application application = new Application(); application.addApplicationListener(this); application.setEnabled...
/** * Register with the OS X Application framework using the given listener. * * @param listener * A OSXListener instance that will be called back for various OS * X application events. */
Register with the OS X Application framework using the given listener
register
{ "repo_name": "taverna/taverna2-osxapplication", "path": "src/main/java/net/sf/taverna/osx/OSXApplicationListener.java", "license": "lgpl-2.1", "size": 1795 }
[ "com.apple.eawt.Application" ]
import com.apple.eawt.Application;
import com.apple.eawt.*;
[ "com.apple.eawt" ]
com.apple.eawt;
868,323
public void setInternationalization(boolean internationalization) { if (explanation != null) { throw new ExplanationException("The argument can not be set" + " beacuse the explanation building process has begun"); } this.internationalization = internationaliza...
void function(boolean internationalization) { if (explanation != null) { throw new ExplanationException(STR + STR); } this.internationalization = internationalization; }
/** * Sets whether internationalization sholud be used or not. * * The parameter can be set for as long as the method for explanation building * has not been called (see method 'createExplanation' for more information) * * @param internationalization a boolean indicator on whether internat...
Sets whether internationalization sholud be used or not. The parameter can be set for as long as the method for explanation building has not been called (see method 'createExplanation' for more information)
setInternationalization
{ "repo_name": "bojantomic/jeff", "path": "src/main/java/org/goodoldai/jeff/wizard/JEFFWizard.java", "license": "lgpl-3.0", "size": 75731 }
[ "org.goodoldai.jeff.explanation.ExplanationException" ]
import org.goodoldai.jeff.explanation.ExplanationException;
import org.goodoldai.jeff.explanation.*;
[ "org.goodoldai.jeff" ]
org.goodoldai.jeff;
2,136,332
public void testEmpty() { LinkedBlockingDeque q = new LinkedBlockingDeque(); assertTrue(q.isEmpty()); q.add(new Integer(1)); assertFalse(q.isEmpty()); q.add(new Integer(2)); q.removeFirst(); q.removeFirst(); assertTrue(q.isEmpty()); }
void function() { LinkedBlockingDeque q = new LinkedBlockingDeque(); assertTrue(q.isEmpty()); q.add(new Integer(1)); assertFalse(q.isEmpty()); q.add(new Integer(2)); q.removeFirst(); q.removeFirst(); assertTrue(q.isEmpty()); }
/** * isEmpty is true before add, false after */
isEmpty is true before add, false after
testEmpty
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "jsr166-tests/src/test/java/jsr166/LinkedBlockingDequeTest.java", "license": "gpl-2.0", "size": 60349 }
[ "java.util.concurrent.LinkedBlockingDeque" ]
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,288,725
public static boolean isValidURN(String urn) { // urn must start with 'urn:' if (urn.length() < 4) { return false; } String prefix = urn.substring(0, 4).toLowerCase(Locale.US); if (!prefix.equals(URN_PREFIX)) { return false; } int colon...
static boolean function(String urn) { if (urn.length() < 4) { return false; } String prefix = urn.substring(0, 4).toLowerCase(Locale.US); if (!prefix.equals(URN_PREFIX)) { return false; } int colonIdx = urn.indexOf(':', 4); if (colonIdx == -1) { return false; } String nid = urn.substring(4, colonIdx); if (!isValidNames...
/** * Retruns true if the given string is a valid URN. * According to RFC 2141: * All URNs have the following syntax (phrases enclosed in quotes are * REQUIRED):<br> * <URN> ::= "urn:" <NID> ":" <NSS> */
Retruns true if the given string is a valid URN. According to RFC 2141: All URNs have the following syntax (phrases enclosed in quotes are REQUIRED): ::= "urn:" ":"
isValidURN
{ "repo_name": "deepstupid/phex", "path": "src/main/java/phex/common/URN.java", "license": "agpl-3.0", "size": 7647 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,113,187
public static boolean isImmutableClass(Class<?> clazz) { do { Field[] fields = clazz.getDeclaredFields(); for (Field field : fields) { if (Modifier.isStatic(field.getModifiers())) continue; ...
static boolean function(Class<?> clazz) { do { Field[] fields = clazz.getDeclaredFields(); for (Field field : fields) { if (Modifier.isStatic(field.getModifiers())) continue; if (Modifier.isTransient(field.getModifiers())) continue; if (!Modifier.isFinal(field.getModifiers())) return false; if (field.getType().isPrimit...
/** * See if a function class is immutable. * * Logic is stateful if: * Has a non-final instance field. * Has a final instance field that is not a primitive * or a known immutable object. * * @param clazz Class to check * @return True if the function is immutable.....
See if a function class is immutable. Logic is stateful if: Has a non-final instance field. Has a final instance field that is not a primitive or a known immutable object
isImmutableClass
{ "repo_name": "ddebrunner/quarks", "path": "api/function/src/main/java/quarks/function/Functions.java", "license": "apache-2.0", "size": 13033 }
[ "java.io.File", "java.lang.reflect.Field", "java.lang.reflect.Modifier", "java.math.BigDecimal", "java.math.BigInteger", "java.util.HashSet", "java.util.Locale", "java.util.Set" ]
import java.io.File; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.math.BigDecimal; import java.math.BigInteger; import java.util.HashSet; import java.util.Locale; import java.util.Set;
import java.io.*; import java.lang.reflect.*; import java.math.*; import java.util.*;
[ "java.io", "java.lang", "java.math", "java.util" ]
java.io; java.lang; java.math; java.util;
931,669
@Api(2.1) @Nullable public String getSurname() { return mSurname; } protected HaloUserProfile(Parcel in) { this.mIdentifiedId = in.readString(); this.mDisplayName = in.readString(); this.mName = in.readString(); this.mSurname = in.readString(); t...
@Api(2.1) String function() { return mSurname; } protected HaloUserProfile(Parcel in) { this.mIdentifiedId = in.readString(); this.mDisplayName = in.readString(); this.mName = in.readString(); this.mSurname = in.readString(); this.mPhoto = in.readString(); this.mEmail = in.readString(); }
/** * Provides the surname. * * @return The surname. */
Provides the surname
getSurname
{ "repo_name": "mobgen/halo-android", "path": "sdk-libs/halo-auth/src/main/java/com/mobgen/halo/android/auth/models/HaloUserProfile.java", "license": "apache-2.0", "size": 4360 }
[ "android.os.Parcel", "com.mobgen.halo.android.framework.common.annotations.Api" ]
import android.os.Parcel; import com.mobgen.halo.android.framework.common.annotations.Api;
import android.os.*; import com.mobgen.halo.android.framework.common.annotations.*;
[ "android.os", "com.mobgen.halo" ]
android.os; com.mobgen.halo;
998,436
public OuterList parseList() { removeLeadingSP(); List<ListElement<? extends Object>> result = internalParseOuterList(); removeLeadingSP(); assertEmpty("Extra characters in string parsed as List"); return OuterList.valueOf(result); }
OuterList function() { removeLeadingSP(); List<ListElement<? extends Object>> result = internalParseOuterList(); removeLeadingSP(); assertEmpty(STR); return OuterList.valueOf(result); }
/** * Implementation of "Parsing a List" * * @return result of parse as {@link OuterList}. * * @see <a href= * "https://greenbytes.de/tech/webdav/draft-ietf-httpbis-header-structure-19.html#parse-list">Section * 4.2.1 of draft-ietf-httpbis-header-structure-19</a> */
Implementation of "Parsing a List"
parseList
{ "repo_name": "exponentjs/exponent", "path": "android/versioned-abis/expoview-abi44_0_0/src/main/java/abi44_0_0/expo/modules/structuredheaders/Parser.java", "license": "bsd-3-clause", "size": 29951 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
564,933
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<PrivateEndpointConnectionInner>> listByServiceNextSinglePageAsync( String nextLink, UUID clientRequestId) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required an...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<PrivateEndpointConnectionInner>> function( String nextLink, UUID clientRequestId) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( ST...
/** * Get the next page of items. * * @param nextLink The nextLink parameter. * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be * included in response information as a way to track the request. * @throws IllegalArgumentExcep...
Get the next page of items
listByServiceNextSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsClientImpl.java", "license": "mit", "size": 65744 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.search.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
679,657
public Comparable getValue(IProperty property) { if (!this.properties.containsKey(property)) { throw new IllegalArgumentException("Cannot get property " + property + " as it does not exist in " + this.block.getBlockState()); } ...
Comparable function(IProperty property) { if (!this.properties.containsKey(property)) { throw new IllegalArgumentException(STR + property + STR + this.block.getBlockState()); } else { return (Comparable)property.getValueClass().cast(this.properties.get(property)); } }
/** * Get the value of the given Property for this BlockState */
Get the value of the given Property for this BlockState
getValue
{ "repo_name": "kelthalorn/ConquestCraft", "path": "build/tmp/recompSrc/net/minecraft/block/state/BlockState.java", "license": "lgpl-2.1", "size": 9735 }
[ "net.minecraft.block.properties.IProperty" ]
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.*;
[ "net.minecraft.block" ]
net.minecraft.block;
340,870
public List<AgeRange> getAgeRanges() { return ageRanges; }
List<AgeRange> function() { return ageRanges; }
/** * Will need https://www.googleapis.com/auth/user.birthday.read scope * @return list of age ranges */
Will need HREF scope
getAgeRanges
{ "repo_name": "spring-social/spring-social-google", "path": "src/main/java/org/springframework/social/google/api/people/PeoplePerson.java", "license": "apache-2.0", "size": 3025 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
767,426
public String[] getSelectedStepNames() { List<StepMeta> selection = getSelectedSteps(); String[] retval = new String[selection.size()]; for ( int i = 0; i < retval.length; i++ ) { StepMeta stepMeta = selection.get( i ); retval[i] = stepMeta.getName(); } return retval; }
String[] function() { List<StepMeta> selection = getSelectedSteps(); String[] retval = new String[selection.size()]; for ( int i = 0; i < retval.length; i++ ) { StepMeta stepMeta = selection.get( i ); retval[i] = stepMeta.getName(); } return retval; }
/** * Gets an array of all the selected step names. * * @return An array of all the selected step names. */
Gets an array of all the selected step names
getSelectedStepNames
{ "repo_name": "TatsianaKasiankova/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/TransMeta.java", "license": "apache-2.0", "size": 220790 }
[ "java.util.List", "org.pentaho.di.trans.step.StepMeta" ]
import java.util.List; import org.pentaho.di.trans.step.StepMeta;
import java.util.*; import org.pentaho.di.trans.step.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
1,295,965
void parseDocument(InputStream in) throws IOException, SAXException { startDocument(); parseFragment(in); finish(); endDocument(); }
void parseDocument(InputStream in) throws IOException, SAXException { startDocument(); parseFragment(in); finish(); endDocument(); }
/** * Parses an XML document from the given input stream. */
Parses an XML document from the given input stream
parseDocument
{ "repo_name": "xdajog/samsung_sources_i927", "path": "libcore/luni/src/main/java/org/apache/harmony/xml/ExpatParser.java", "license": "gpl-2.0", "size": 26443 }
[ "java.io.IOException", "java.io.InputStream", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.io.InputStream; import org.xml.sax.SAXException;
import java.io.*; import org.xml.sax.*;
[ "java.io", "org.xml.sax" ]
java.io; org.xml.sax;
2,375,442
public VlanId vlanId() { return vlanId; }
VlanId function() { return vlanId; }
/** * Gets vlan information in this MacVlanNextObjectiveStoreKey. * * @return vlan information */
Gets vlan information in this MacVlanNextObjectiveStoreKey
vlanId
{ "repo_name": "oplinkoms/onos", "path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/storekey/MacVlanNextObjectiveStoreKey.java", "license": "apache-2.0", "size": 2845 }
[ "org.onlab.packet.VlanId" ]
import org.onlab.packet.VlanId;
import org.onlab.packet.*;
[ "org.onlab.packet" ]
org.onlab.packet;
266,774
private void relightBlock(int x, int y, int z) { int i = this.heightMap[z << 4 | x] & 255; int j = i; if (y > i) { j = y; } while (j > 0 && this.getBlockLightOpacity(x, j - 1, z) == 0) { --j; } if (j != i) ...
void function(int x, int y, int z) { int i = this.heightMap[z << 4 x] & 255; int j = i; if (y > i) { j = y; } while (j > 0 && this.getBlockLightOpacity(x, j - 1, z) == 0) { --j; } if (j != i) { this.worldObj.markBlocksDirtyVertical(x + this.xPosition * 16, z + this.zPosition * 16, j, i); this.heightMap[z << 4 x] = j; i...
/** * Initiates the recalculation of both the block-light and sky-light for a given block inside a chunk. */
Initiates the recalculation of both the block-light and sky-light for a given block inside a chunk
relightBlock
{ "repo_name": "boredherobrine13/morefuelsmod-1.10", "path": "build/tmp/recompileMc/sources/net/minecraft/world/chunk/Chunk.java", "license": "lgpl-2.1", "size": 53710 }
[ "net.minecraft.util.EnumFacing", "net.minecraft.util.math.BlockPos", "net.minecraft.world.chunk.storage.ExtendedBlockStorage" ]
import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.chunk.storage.*;
[ "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.util; net.minecraft.world;
189,393
@VisibleForTesting static Pair<DataSource, Filtration> getFiltration( DataSource dataSource, DimFilter filter, VirtualColumnRegistry virtualColumnRegistry ) { if (!(dataSource instanceof JoinDataSource)) { return Pair.of(dataSource, toFiltration(filter, virtualColumnRegistry)); }...
static Pair<DataSource, Filtration> getFiltration( DataSource dataSource, DimFilter filter, VirtualColumnRegistry virtualColumnRegistry ) { if (!(dataSource instanceof JoinDataSource)) { return Pair.of(dataSource, toFiltration(filter, virtualColumnRegistry)); } JoinDataSource joinDataSource = (JoinDataSource) dataSourc...
/** * Returns a pair of DataSource and Filtration object created on the query filter. In case the, data source is * a join datasource, the datasource may be altered and left filter of join datasource may * be rid of time filters. * TODO: should we optimize the base table filter just like we do with query fi...
Returns a pair of DataSource and Filtration object created on the query filter. In case the, data source is a join datasource, the datasource may be altered and left filter of join datasource may be rid of time filters
getFiltration
{ "repo_name": "monetate/druid", "path": "sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java", "license": "apache-2.0", "size": 46781 }
[ "org.apache.druid.java.util.common.Pair", "org.apache.druid.query.DataSource", "org.apache.druid.query.JoinDataSource", "org.apache.druid.query.filter.DimFilter", "org.apache.druid.sql.calcite.filtration.Filtration" ]
import org.apache.druid.java.util.common.Pair; import org.apache.druid.query.DataSource; import org.apache.druid.query.JoinDataSource; import org.apache.druid.query.filter.DimFilter; import org.apache.druid.sql.calcite.filtration.Filtration;
import org.apache.druid.java.util.common.*; import org.apache.druid.query.*; import org.apache.druid.query.filter.*; import org.apache.druid.sql.calcite.filtration.*;
[ "org.apache.druid" ]
org.apache.druid;
581,995
public static ScrollState fromValue(final int value) { switch (value) { case AbsListView.OnScrollListener.SCROLL_STATE_IDLE: return IDLE; case AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL: return TOUCH_SCROLL; ...
static ScrollState function(final int value) { switch (value) { case AbsListView.OnScrollListener.SCROLL_STATE_IDLE: return IDLE; case AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL: return TOUCH_SCROLL; case AbsListView.OnScrollListener.SCROLL_STATE_FLING: return FLING; default: return null; } } }
/** * Creates a {@link ScrollState} from the {@link AbsListView} scroll state value. * * @param value The {@link AbsListView} scroll state value. * @return The created {@link ScrollState} or null if the value was invalid. */
Creates a <code>ScrollState</code> from the <code>AbsListView</code> scroll state value
fromValue
{ "repo_name": "ISchwarz23/SortableTableView", "path": "tableview/src/main/java/de/codecrafters/tableview/listeners/OnScrollListener.java", "license": "apache-2.0", "size": 3398 }
[ "android.widget.AbsListView" ]
import android.widget.AbsListView;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,199,169
return CollectionUtils.collect(inputCollection, transformer); }
return CollectionUtils.collect(inputCollection, transformer); }
/** * Delegates to {@link CollectionUtils#collect(Collection, Transformer)}, but performs the necessary type coercion * to allow the returned collection to be correctly casted based on the TypedTransformer. * * @param inputCollection * @param transformer * @return the typed, collected Co...
Delegates to <code>CollectionUtils#collect(Collection, Transformer)</code>, but performs the necessary type coercion to allow the returned collection to be correctly casted based on the TypedTransformer
collect
{ "repo_name": "akdasari/SparkCommon", "path": "src/main/java/org/sparkcommerce/common/util/SCCollectionUtils.java", "license": "apache-2.0", "size": 5440 }
[ "org.apache.commons.collections.CollectionUtils" ]
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.*;
[ "org.apache.commons" ]
org.apache.commons;
639,943
public static boolean containsId(Collection<? extends BaseOpenmrsObject> list, Integer id) { for (BaseOpenmrsObject baseOpenmrsObject : list) { if (baseOpenmrsObject.getId().equals(id)) { return true; } } return false; }
static boolean function(Collection<? extends BaseOpenmrsObject> list, Integer id) { for (BaseOpenmrsObject baseOpenmrsObject : list) { if (baseOpenmrsObject.getId().equals(id)) { return true; } } return false; }
/** * Utility method to check if a list contains a BaseOpenmrsObject using the id * @param list * @param id * @return true if list contains object with the id else false */
Utility method to check if a list contains a BaseOpenmrsObject using the id
containsId
{ "repo_name": "vinayvenu/openmrs-core", "path": "api/src/test/java/org/openmrs/test/TestUtil.java", "license": "mpl-2.0", "size": 7475 }
[ "java.util.Collection", "org.openmrs.BaseOpenmrsObject" ]
import java.util.Collection; import org.openmrs.BaseOpenmrsObject;
import java.util.*; import org.openmrs.*;
[ "java.util", "org.openmrs" ]
java.util; org.openmrs;
269,912
public void testGetPrimaryKeys() throws SQLException { try { DatabaseMetaData dbmd = this.conn.getMetaData(); this.rs = dbmd.getPrimaryKeys(this.conn.getCatalog(), "", "multikey"); short[] keySeqs = new short[4]; String[] columnNames = new String[4]; int i = 0; while (this.rs.next()) { ...
void function() throws SQLException { try { DatabaseMetaData dbmd = this.conn.getMetaData(); this.rs = dbmd.getPrimaryKeys(this.conn.getCatalog(), STRmultikeySTRTABLE_NAMESTRCOLUMN_NAMESTRPK_NAMESTRKEY_SEQSTRKeys returned in wrong order"); } } finally { if (this.rs != null) { try { this.rs.close(); } catch (SQLExceptio...
/** * DOCUMENT ME! * * @throws SQLException * DOCUMENT ME! */
DOCUMENT ME
testGetPrimaryKeys
{ "repo_name": "BasicOperations/vids", "path": "sql/mysql-connector-java-3.1.14/src/testsuite/simple/MetadataTest.java", "license": "gpl-3.0", "size": 15932 }
[ "java.sql.DatabaseMetaData", "java.sql.SQLException" ]
import java.sql.DatabaseMetaData; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,376,055
public static void saveProperties(Server server) { try { File configFile = new File(configPath); configFile.createNewFile(); Properties properties = new Properties(); properties.setProperty("last_port", ((Integer) server.getPortStart()).toString()); properties.setProperty("last_password", server....
static void function(Server server) { try { File configFile = new File(configPath); configFile.createNewFile(); Properties properties = new Properties(); properties.setProperty(STR, ((Integer) server.getPortStart()).toString()); properties.setProperty(STR, server.getPassword()); String prevAdmins = getProperty(STR); if...
/** * Stores the properties for a given server object in the properties file. * @param server The server whose properties we are saving to file. */
Stores the properties for a given server object in the properties file
saveProperties
{ "repo_name": "bsixel/Etheralt-Chat-Client", "path": "ChatServer/src/tools/FileHandler.java", "license": "apache-2.0", "size": 6311 }
[ "java.io.File", "java.util.Properties" ]
import java.io.File; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,622,891
PagedIterable<Container> listByStorageAccount( String deviceName, String storageAccountName, String resourceGroupName);
PagedIterable<Container> listByStorageAccount( String deviceName, String storageAccountName, String resourceGroupName);
/** * Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device. * * @param deviceName The device name. * @param storageAccountName The storage Account name. * @param resourceGroupName The resource group name. * @throws IllegalArgumentException thrown if para...
Lists all the containers of a storage Account in a Data Box Edge/Data Box Gateway device
listByStorageAccount
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/models/Containers.java", "license": "mit", "size": 8967 }
[ "com.azure.core.http.rest.PagedIterable" ]
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
2,853,870
public List<String> emailAddresses() { return this.emailAddresses; }
List<String> function() { return this.emailAddresses; }
/** * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. * * @return the emailAddresses value. */
Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent
emailAddresses
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/models/ServerSecurityAlertPolicyInner.java", "license": "mit", "size": 8400 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,821,054
public static void workgroupCreated(Workgroup workgroup) { for (WorkgroupEventListener listener : listeners) { try { listener.workgroupCreated(workgroup); } catch (Exception e) { Log.error(e.getMessage(), e); } } }
static void function(Workgroup workgroup) { for (WorkgroupEventListener listener : listeners) { try { listener.workgroupCreated(workgroup); } catch (Exception e) { Log.error(e.getMessage(), e); } } }
/** * Notification message that a workgroup has been created. * * @param workgroup the workgroup that has just been created. */
Notification message that a workgroup has been created
workgroupCreated
{ "repo_name": "wudingli/openfire", "path": "src/plugins/fastpath/src/java/org/jivesoftware/xmpp/workgroup/event/WorkgroupEventDispatcher.java", "license": "apache-2.0", "size": 8571 }
[ "org.jivesoftware.xmpp.workgroup.Workgroup" ]
import org.jivesoftware.xmpp.workgroup.Workgroup;
import org.jivesoftware.xmpp.workgroup.*;
[ "org.jivesoftware.xmpp" ]
org.jivesoftware.xmpp;
178,465
public List<HtmlData> getCustomActionUrls(BusinessObject businessObject, List pkNames) { return null; }
List<HtmlData> function(BusinessObject businessObject, List pkNames) { return null; }
/** * Always returns null * * @see org.kuali.rice.krad.lookup.LookupableHelperService#getCustomActionUrls(org.kuali.rice.krad.bo.BusinessObject, java.util.List) */
Always returns null
getCustomActionUrls
{ "repo_name": "sbower/kuali-rice-1", "path": "it/krad/src/test/java/org/kuali/rice/krad/lookup/LookupResultsDDBoLookupableHelperServiceImpl.java", "license": "apache-2.0", "size": 13023 }
[ "java.util.List", "org.kuali.rice.kns.lookup.HtmlData", "org.kuali.rice.krad.bo.BusinessObject" ]
import java.util.List; import org.kuali.rice.kns.lookup.HtmlData; import org.kuali.rice.krad.bo.BusinessObject;
import java.util.*; import org.kuali.rice.kns.lookup.*; import org.kuali.rice.krad.bo.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
141,481
public Set<String> getAllHostsInAllPackagesInCurrentLifecycle () { Set result = new TreeSet<String>( getRootModel() .getAllPackagesModel() .getLifeCycleToHostMap() .get( getCurrentLifeCycle() ) ); logger.debug( "Other hosts: {}", result.toString() ); return result; }
Set<String> function () { Set result = new TreeSet<String>( getRootModel() .getAllPackagesModel() .getLifeCycleToHostMap() .get( getCurrentLifeCycle() ) ); logger.debug( STR, result.toString() ); return result; }
/** * Helper method used to provide a script parameter to rebuildAndDeploy.sh; * it identifies the others hosts which require scp the war file. * * @param svcName * @return */
Helper method used to provide a script parameter to rebuildAndDeploy.sh; it identifies the others hosts which require scp the war file
getAllHostsInAllPackagesInCurrentLifecycle
{ "repo_name": "peterdnight/csap-core", "path": "csap-core-service/src/main/java/org/csap/agent/model/Application.java", "license": "mit", "size": 121120 }
[ "java.util.Set", "java.util.TreeSet" ]
import java.util.Set; import java.util.TreeSet;
import java.util.*;
[ "java.util" ]
java.util;
185,616
public void replaceCurve(final Currency ccy, final YieldAndDiscountCurve curve) { _inflationProvider.replaceCurve(ccy, curve); }
void function(final Currency ccy, final YieldAndDiscountCurve curve) { _inflationProvider.replaceCurve(ccy, curve); }
/** * Replaces the discounting curve for a given currency. * @param ccy The currency. * @param curve The yield curve used for discounting. * @throws IllegalArgumentException if curve name NOT already present */
Replaces the discounting curve for a given currency
replaceCurve
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/description/inflation/InflationIssuerProviderDiscount.java", "license": "apache-2.0", "size": 24111 }
[ "com.opengamma.analytics.financial.model.interestrate.curve.YieldAndDiscountCurve", "com.opengamma.util.money.Currency" ]
import com.opengamma.analytics.financial.model.interestrate.curve.YieldAndDiscountCurve; import com.opengamma.util.money.Currency;
import com.opengamma.analytics.financial.model.interestrate.curve.*; import com.opengamma.util.money.*;
[ "com.opengamma.analytics", "com.opengamma.util" ]
com.opengamma.analytics; com.opengamma.util;
149,665
public boolean next() { // // Update position prior to reading the next value, etc so we can // this.position = this.buffer.position(); if (!buffer.hasRemaining()) { return false; } this.nextCalled = true; // // Read timestamp/type flag // byte ...
boolean function() { this.position = this.buffer.position(); if (!buffer.hasRemaining()) { return false; } this.nextCalled = true; byte tsTypeFlag = buffer.get(); if (GTSEncoder.FLAGS_ENCRYPTED == (tsTypeFlag & GTSEncoder.FLAGS_MASK_ENCRYPTED)) { int enclen = (int) Varint.decodeUnsignedLong(buffer); if (null == wrappin...
/** * Attempt to read the next measurement and associated metadata (timestamp, location, elevation) * @return true if a measurement was successfully read, false if none were left in the buffer. */
Attempt to read the next measurement and associated metadata (timestamp, location, elevation)
next
{ "repo_name": "hbs/warp10-platform", "path": "warp10/src/main/java/io/warp10/continuum/gts/CustomBufferBasedGTSDecoder.java", "license": "apache-2.0", "size": 17074 }
[ "java.math.BigDecimal", "java.math.BigInteger", "java.nio.ByteOrder", "java.nio.charset.StandardCharsets", "org.bouncycastle.crypto.CipherParameters", "org.bouncycastle.crypto.InvalidCipherTextException", "org.bouncycastle.crypto.engines.AESWrapEngine", "org.bouncycastle.crypto.paddings.PKCS7Padding",...
import java.math.BigDecimal; import java.math.BigInteger; import java.nio.ByteOrder; import java.nio.charset.StandardCharsets; import org.bouncycastle.crypto.CipherParameters; import org.bouncycastle.crypto.InvalidCipherTextException; import org.bouncycastle.crypto.engines.AESWrapEngine; import org.bouncycastle.crypto....
import java.math.*; import java.nio.*; import java.nio.charset.*; import org.bouncycastle.crypto.*; import org.bouncycastle.crypto.engines.*; import org.bouncycastle.crypto.paddings.*; import org.bouncycastle.crypto.params.*;
[ "java.math", "java.nio", "org.bouncycastle.crypto" ]
java.math; java.nio; org.bouncycastle.crypto;
188,611
public OffsetDateTime getLastModified() { if (this.lastModified == null) { return null; } return this.lastModified.getDateTime(); }
OffsetDateTime function() { if (this.lastModified == null) { return null; } return this.lastModified.getDateTime(); }
/** * Get the lastModified property: The Last-Modified property. * * @return the lastModified value. */
Get the lastModified property: The Last-Modified property
getLastModified
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharesCreateHeaders.java", "license": "mit", "size": 4269 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,982,978
public static int copy(InputStream in, OutputStream out) throws IOException { assert in != null; assert out != null; byte[] buf = new byte[BUF_SIZE]; int cnt = 0; for (int n; (n = in.read(buf)) > 0;) { out.write(buf, 0, n); cnt += n; } ...
static int function(InputStream in, OutputStream out) throws IOException { assert in != null; assert out != null; byte[] buf = new byte[BUF_SIZE]; int cnt = 0; for (int n; (n = in.read(buf)) > 0;) { out.write(buf, 0, n); cnt += n; } return cnt; }
/** * Copies input byte stream to output byte stream. * * @param in Input byte stream. * @param out Output byte stream. * @return Number of the copied bytes. * @throws IOException Thrown if an I/O error occurs. */
Copies input byte stream to output byte stream
copy
{ "repo_name": "shurun19851206/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 289056 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,742,959
private final void dragDisplayControlTypeA( DepictorPort ThePort, Q PrtCon, boolean bound, R in, DepictorPort.ToolMode toolMode, PointF InPt) { Q Dcon = PrtCon; switch (toolMode) { case LABEL_MODE : dragTextEventTypeA(ThePort, Dcon, bound, in, toolMode, InPt); break; case GEO_PAD_MODE ...
final void function( DepictorPort ThePort, Q PrtCon, boolean bound, R in, DepictorPort.ToolMode toolMode, PointF InPt) { Q Dcon = PrtCon; switch (toolMode) { case LABEL_MODE : dragTextEventTypeA(ThePort, Dcon, bound, in, toolMode, InPt); break; case GEO_PAD_MODE : dragGeoPadEventTypeA(ThePort, Dcon, bound, in, toolMode...
/** * Handles the dragging of a control point in cases when the type-A depictor has not * delegated the operation to a {@link geomdir.DynRunner}. */
Handles the dragging of a control point in cases when the type-A depictor has not delegated the operation to a <code>geomdir.DynRunner</code>
dragDisplayControlTypeA
{ "repo_name": "viridian1138/VectorVictor", "path": "VectorVictor/VectorVictor/src/geomdir/depictors/Dsca1Base.java", "license": "gpl-3.0", "size": 134785 }
[ "android.graphics.PointF" ]
import android.graphics.PointF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,609,907
public IFeed getFeed() { return feed; }
IFeed function() { return feed; }
/** * Returns removed feed. * * @return feed. */
Returns removed feed
getFeed
{ "repo_name": "pitosalas/blogbridge", "path": "src/com/salas/bb/domain/events/FeedRemovedEvent.java", "license": "gpl-2.0", "size": 2960 }
[ "com.salas.bb.domain.IFeed" ]
import com.salas.bb.domain.IFeed;
import com.salas.bb.domain.*;
[ "com.salas.bb" ]
com.salas.bb;
2,320,505
default Set<String> getCompilerExtensions() { return getService(CompilerService.class).getCompilerExtensions(); }
default Set<String> getCompilerExtensions() { return getService(CompilerService.class).getCompilerExtensions(); }
/** * Get the file extensions that can be converted using the registered OrchidCompilers. * * @return the file extensions that can be processed * * @since v1.0.0 * @see OrchidCompiler */
Get the file extensions that can be converted using the registered OrchidCompilers
getCompilerExtensions
{ "repo_name": "JavaEden/Orchid-Core", "path": "OrchidCore/src/main/java/com/eden/orchid/api/compilers/CompilerService.java", "license": "mit", "size": 7208 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
882,189
protected void addInstanceTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_C3_8xlarge_instanceType_feature"), getString("_UI_PropertyDesc...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), Ec2Package.eINSTANCE.getC3_8xlarge_InstanceType(), true, false, false, ItemPropertyDescriptor.GEN...
/** * This adds a property descriptor for the Instance Type feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Instance Type feature.
addInstanceTypePropertyDescriptor
{ "repo_name": "occiware/Multi-Cloud-Studio", "path": "plugins/org.eclipse.cmf.occi.multicloud.aws.ec2.edit/src-gen/org/eclipse/cmf/occi/multicloud/aws/ec2/provider/C3_8xlargeItemProvider.java", "license": "epl-1.0", "size": 7019 }
[ "org.eclipse.cmf.occi.multicloud.aws.ec2.Ec2Package", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.cmf.occi.multicloud.aws.ec2.Ec2Package; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.cmf.occi.multicloud.aws.ec2.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.cmf", "org.eclipse.emf" ]
org.eclipse.cmf; org.eclipse.emf;
64,588
private Word tagsToFeats(Word inputWord){ double[][] feats = new double[1][0]; AtomicInteger i = new AtomicInteger(0); classifiers.forEach(v->{ feats[0] = ArrayUtils.addAll(feats[0], model.getCategoryAsOneOfAKDouble(v.classify(inputWord))); i.getAndAdd(totalCategories); }); return new Word(inputWord....
Word function(Word inputWord){ double[][] feats = new double[1][0]; AtomicInteger i = new AtomicInteger(0); classifiers.forEach(v->{ feats[0] = ArrayUtils.addAll(feats[0], model.getCategoryAsOneOfAKDouble(v.classify(inputWord))); i.getAndAdd(totalCategories); }); return new Word(inputWord.getValue(),inputWord.getCatego...
/** * returns the Word with the proper feature vector created fromt he output of input classifiers * @param inputWord * @return */
returns the Word with the proper feature vector created fromt he output of input classifiers
tagsToFeats
{ "repo_name": "alevas/word.tagging", "path": "src/gr/aueb/cs/nlp/wordtagger/classifier/MetaClassifier.java", "license": "mit", "size": 4410 }
[ "gr.aueb.cs.nlp.wordtagger.data.structure.Word", "gr.aueb.cs.nlp.wordtagger.data.structure.features.FeatureVector", "java.util.concurrent.atomic.AtomicInteger", "org.apache.commons.lang3.ArrayUtils" ]
import gr.aueb.cs.nlp.wordtagger.data.structure.Word; import gr.aueb.cs.nlp.wordtagger.data.structure.features.FeatureVector; import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.lang3.ArrayUtils;
import gr.aueb.cs.nlp.wordtagger.data.structure.*; import gr.aueb.cs.nlp.wordtagger.data.structure.features.*; import java.util.concurrent.atomic.*; import org.apache.commons.lang3.*;
[ "gr.aueb.cs", "java.util", "org.apache.commons" ]
gr.aueb.cs; java.util; org.apache.commons;
2,460,769
private void checkLaunchCoordinator(DiscoveryEvent discoEvt) { rw.readLock(); try { if (stopping) return; if (timeCoord == null) { long minNodeOrder = Long.MAX_VALUE; Collection<ClusterNode> nodes = discoEvt.topologyNodes(); ...
void function(DiscoveryEvent discoEvt) { rw.readLock(); try { if (stopping) return; if (timeCoord == null) { long minNodeOrder = Long.MAX_VALUE; Collection<ClusterNode> nodes = discoEvt.topologyNodes(); for (ClusterNode node : nodes) { if (node.order() < minNodeOrder) minNodeOrder = node.order(); } ClusterNode locNode ...
/** * Checks if local node is the oldest node in topology and starts time coordinator if so. * * @param discoEvt Discovery event. */
Checks if local node is the oldest node in topology and starts time coordinator if so
checkLaunchCoordinator
{ "repo_name": "afinka77/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/clock/GridClockSyncProcessor.java", "license": "apache-2.0", "size": 16555 }
[ "java.util.Collection", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.events.DiscoveryEvent", "org.apache.ignite.thread.IgniteThread" ]
import java.util.Collection; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.events.DiscoveryEvent; import org.apache.ignite.thread.IgniteThread;
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.events.*; import org.apache.ignite.thread.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,687,863
public void testWampler4() { IgniteUtils.setCurrentIgniteName(ignite.configuration().getIgniteInstanceName()); double[] data = new double[] { 75901, 0, -204794, 1, 204863, 2, -204436, 3, 253665, 4, -200894, 5, 214131...
void function() { IgniteUtils.setCurrentIgniteName(ignite.configuration().getIgniteInstanceName()); double[] data = new double[] { 75901, 0, -204794, 1, 204863, 2, -204436, 3, 253665, 4, -200894, 5, 214131, 6, -185192, 7, 221249, 8, -138370, 9, 315911, 10, -27644, 11, 455253, 12, 197434, 13, 783995, 14, 608816, 15, 137...
/** * This is a test based on the Wampler4 data set http://www.itl.nist.gov/div898/strd/lls/data/Wampler4.shtml */
This is a test based on the Wampler4 data set HREF
testWampler4
{ "repo_name": "WilliamDo/ignite", "path": "modules/ml/src/test/java/org/apache/ignite/ml/regressions/DistributedOLSMultipleLinearRegressionTest.java", "license": "apache-2.0", "size": 35204 }
[ "org.apache.ignite.internal.util.IgniteUtils", "org.apache.ignite.ml.TestUtils", "org.apache.ignite.ml.math.impls.matrix.SparseDistributedMatrix" ]
import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.ml.TestUtils; import org.apache.ignite.ml.math.impls.matrix.SparseDistributedMatrix;
import org.apache.ignite.internal.util.*; import org.apache.ignite.ml.*; import org.apache.ignite.ml.math.impls.matrix.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,751,203
public boolean createSecondaryKey(SecondaryDatabase mySecDB, DatabaseEntry myKey, DatabaseEntry myData, DatabaseEntry myNewKey) { if (myData == null) { return false; } els...
boolean function(SecondaryDatabase mySecDB, DatabaseEntry myKey, DatabaseEntry myData, DatabaseEntry myNewKey) { if (myData == null) { return false; } else { MRData myMRData = (MRData) binding.entryToObject(myData); String address = myMRData.getAddress(); try { myNewKey.setData(address.getBytes("UTF-8")); } catch (Unsu...
/** * Creates the Index of Addresses in the secondary Database * @param mySecDB The secondary database * @param myKey The primary key * @param myData The data containing the new key * @param myNewKey The new key created from the data * @return */
Creates the Index of Addresses in the secondary Database
createSecondaryKey
{ "repo_name": "elitak/peertrust", "path": "sandbox/Mailrank/supportfiles/BerkeleyDB/MRAddressKeyCreator.java", "license": "gpl-2.0", "size": 1686 }
[ "com.sleepycat.je.DatabaseEntry", "com.sleepycat.je.SecondaryDatabase", "java.io.UnsupportedEncodingException" ]
import com.sleepycat.je.DatabaseEntry; import com.sleepycat.je.SecondaryDatabase; import java.io.UnsupportedEncodingException;
import com.sleepycat.je.*; import java.io.*;
[ "com.sleepycat.je", "java.io" ]
com.sleepycat.je; java.io;
1,481,503
public Builder addRequiredToolchains(Label... toolchainLabels) { return this.addRequiredToolchains(Lists.newArrayList(toolchainLabels)); }
Builder function(Label... toolchainLabels) { return this.addRequiredToolchains(Lists.newArrayList(toolchainLabels)); }
/** * Causes rules of this type to require the specified toolchains be available via toolchain * resolution when a target is configured. */
Causes rules of this type to require the specified toolchains be available via toolchain resolution when a target is configured
addRequiredToolchains
{ "repo_name": "twitter-forks/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/RuleClass.java", "license": "apache-2.0", "size": 116070 }
[ "com.google.common.collect.Lists", "com.google.devtools.build.lib.cmdline.Label" ]
import com.google.common.collect.Lists; import com.google.devtools.build.lib.cmdline.Label;
import com.google.common.collect.*; import com.google.devtools.build.lib.cmdline.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
967,500
List<ShareMember> list = new ArrayList<ShareMember>(); for(String mail : emailList2){ list.addAll( (List<ShareMember>) database.getElement(ShareMember.class, XMLConstruct.AttMail, mail)); } if(!list.isEmpty()){ for(ShareMember sharemember: list){ List<ShareMember> tmp = (List<ShareMember>) database.ge...
List<ShareMember> list = new ArrayList<ShareMember>(); for(String mail : emailList2){ list.addAll( (List<ShareMember>) database.getElement(ShareMember.class, XMLConstruct.AttMail, mail)); } if(!list.isEmpty()){ for(ShareMember sharemember: list){ List<ShareMember> tmp = (List<ShareMember>) database.getElement(ShareMemb...
/** * Check if All ShareMember share already a sharefolder * @param emailList2 */
Check if All ShareMember share already a sharefolder
checkShareMembers
{ "repo_name": "dev131/DropTillLate_Application", "path": "ch.droptilllate.application/src/ch/droptilllate/application/share/ShareManager.java", "license": "epl-1.0", "size": 13336 }
[ "ch.droptilllate.application.dnb.ShareMember", "ch.droptilllate.application.properties.XMLConstruct", "java.util.ArrayList", "java.util.List" ]
import ch.droptilllate.application.dnb.ShareMember; import ch.droptilllate.application.properties.XMLConstruct; import java.util.ArrayList; import java.util.List;
import ch.droptilllate.application.dnb.*; import ch.droptilllate.application.properties.*; import java.util.*;
[ "ch.droptilllate.application", "java.util" ]
ch.droptilllate.application; java.util;
234,027
void putBlockInfo(ReceivedDeletedBlockInfo blockInfo) { pendingIncrementalBR.put(blockInfo.getBlock().getBlockId(), blockInfo); }
void putBlockInfo(ReceivedDeletedBlockInfo blockInfo) { pendingIncrementalBR.put(blockInfo.getBlock().getBlockId(), blockInfo); }
/** * Add pending incremental block report for a single block. * @param blockInfo */
Add pending incremental block report for a single block
putBlockInfo
{ "repo_name": "aliyun-beta/aliyun-oss-hadoop-fs", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java", "license": "apache-2.0", "size": 40482 }
[ "org.apache.hadoop.hdfs.server.protocol.ReceivedDeletedBlockInfo" ]
import org.apache.hadoop.hdfs.server.protocol.ReceivedDeletedBlockInfo;
import org.apache.hadoop.hdfs.server.protocol.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
862,133
public static String delQ(String q) { return TestHarness.deleteByQuery(q); }
static String function(String q) { return TestHarness.deleteByQuery(q); }
/** * Generates a &lt;delete&gt;... XML string for an query * * @see TestHarness#deleteByQuery */
Generates a &lt;delete&gt;... XML string for an query
delQ
{ "repo_name": "williamchengit/TestRepo", "path": "solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java", "license": "apache-2.0", "size": 66406 }
[ "org.apache.solr.util.TestHarness" ]
import org.apache.solr.util.TestHarness;
import org.apache.solr.util.*;
[ "org.apache.solr" ]
org.apache.solr;
1,041,114
@RequestMapping(value = "auth/networks/visualize/{networkId}", method = RequestMethod.GET) public String visualizeNetwork(@PathVariable("networkId") String networkId, ModelMap model, Principal principal) throws QuadrigaStorageException, JAXBException { // Identify the User String use...
@RequestMapping(value = STR, method = RequestMethod.GET) String function(@PathVariable(STR) String networkId, ModelMap model, Principal principal) throws QuadrigaStorageException, JAXBException { String userId = principal.getName(); INetwork network = networkManager.getNetwork(networkId); IWorkspace workspace = network...
/** * Get the network displayed on to JSP by passing JSON string * * @author Lohith Dwaraka, Chiraag Subramanian * @param networkId * @param model * @param principal * @return * @throws QuadrigaStorageException * @throws JAXBException */
Get the network displayed on to JSP by passing JSON string
visualizeNetwork
{ "repo_name": "diging/quadriga", "path": "Quadriga/src/main/java/edu/asu/spring/quadriga/web/network/NetworkListController.java", "license": "gpl-2.0", "size": 6436 }
[ "edu.asu.spring.quadriga.domain.enums.EProjectAccessibility", "edu.asu.spring.quadriga.domain.network.INetwork", "edu.asu.spring.quadriga.domain.workbench.IProject", "edu.asu.spring.quadriga.domain.workspace.IWorkspace", "edu.asu.spring.quadriga.exceptions.QuadrigaStorageException", "edu.asu.spring.quadri...
import edu.asu.spring.quadriga.domain.enums.EProjectAccessibility; import edu.asu.spring.quadriga.domain.network.INetwork; import edu.asu.spring.quadriga.domain.workbench.IProject; import edu.asu.spring.quadriga.domain.workspace.IWorkspace; import edu.asu.spring.quadriga.exceptions.QuadrigaStorageException; import edu....
import edu.asu.spring.quadriga.domain.enums.*; import edu.asu.spring.quadriga.domain.network.*; import edu.asu.spring.quadriga.domain.workbench.*; import edu.asu.spring.quadriga.domain.workspace.*; import edu.asu.spring.quadriga.exceptions.*; import edu.asu.spring.quadriga.web.login.*; import java.security.*; import ja...
[ "edu.asu.spring", "java.security", "java.util", "javax.xml", "org.springframework.ui", "org.springframework.web" ]
edu.asu.spring; java.security; java.util; javax.xml; org.springframework.ui; org.springframework.web;
381,578
void endOfStream(); } private enum State { HEADER, BODY } private final Listener listener; private final Compression compression; private State state = State.HEADER; private int requiredLength = HEADER_LENGTH; private boolean compressedFlag; private boolean endOfStream; private CompositeBu...
void endOfStream(); } enum State { HEADER, BODY } private final Listener listener; private final Compression compression; private State state = State.HEADER; private int requiredLength = HEADER_LENGTH; private boolean compressedFlag; private boolean function; private CompositeBuffer nextFrame; private CompositeBuffer u...
/** * Called when the stream is complete and all messages have been successfully delivered. */
Called when the stream is complete and all messages have been successfully delivered
endOfStream
{ "repo_name": "dongc/grpc-java", "path": "core/src/main/java/io/grpc/transport/MessageDeframer.java", "license": "bsd-3-clause", "size": 10619 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
690,144
public void testMultipleTriplets() throws Exception { final List<Triplet> result = this.parse("036540" + "034325" + "0325FF"); final CommentTriplet t1 = (CommentTriplet) result.get(0); assertEquals(0x40, t1.getComment()[0]); final DescriptorPositionTriplet t2 = (DescriptorPositionT...
void function() throws Exception { final List<Triplet> result = this.parse(STR + STR + STR); final CommentTriplet t1 = (CommentTriplet) result.get(0); assertEquals(0x40, t1.getComment()[0]); final DescriptorPositionTriplet t2 = (DescriptorPositionTriplet) result.get(1); assertEquals(0x25, t2.getDescriptorPositionId());...
/** * Parsing multiple Triplets. */
Parsing multiple Triplets
testMultipleTriplets
{ "repo_name": "michaelknigge/afpbox", "path": "afpbox/src/test/java/de/textmode/afpbox/triplet/TripletParserTest.java", "license": "mpl-2.0", "size": 2757 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
684,965
public static boolean save(ZMsg msg, DataOutputStream file) { if (msg == null) return false; try { // Write number of frames file.writeInt(msg.size()); if (msg.size() > 0 ) { for (ZFrame f : msg) { // Write byte size of frame file.writeInt(f.size()); // Write frame byte data ...
static boolean function(ZMsg msg, DataOutputStream file) { if (msg == null) return false; try { file.writeInt(msg.size()); if (msg.size() > 0 ) { for (ZFrame f : msg) { file.writeInt(f.size()); file.write(f.getData()); } } return true; } catch (IOException e) { return false; } }
/** * Save message to an open data output stream. * * Data saved as: * 4 bytes: number of frames * For every frame: * 4 bytes: byte size of frame data * + n bytes: frame byte data * * @param msg * ZMsg to save * @param file * DataOutputStream * @return * True if saved OK, e...
Save message to an open data output stream. Data saved as: 4 bytes: number of frames For every frame: 4 bytes: byte size of frame data + n bytes: frame byte data
save
{ "repo_name": "mosaic-cloud/mosaic-java-platform", "path": "tools-zeromq/src/main/java/org/zeromq/ZMsg.java", "license": "apache-2.0", "size": 13711 }
[ "java.io.DataOutputStream", "java.io.IOException" ]
import java.io.DataOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,711,786
public Map<ExposedPort, Binding[]> getBindings() { return ports; } // public PortBinding[] getBindingsAsArray() { // List<PortBinding> bindings = new ArrayList<>(); // for(Map.Entry<ExposedPort, Ports.Binding[]> entry: ports.entrySet()) { // for(Ports.Binding binding : entry.getValue())...
Map<ExposedPort, Binding[]> function() { return ports; } public static class Binding extends DockerObject implements Serializable { private static final long serialVersionUID = 1L; /** * Creates a {@link Binding} for the given {@link #getHostPortSpec() port spec}, leaving the {@link #getHostIp() IP address}
/** * Returns the port bindings in the format used by the Docker remote API, i.e. the {@link Binding}s grouped by {@link ExposedPort}. * * @return the port bindings as a {@link Map} that contains one or more {@link Binding}s per {@link ExposedPort}. */
Returns the port bindings in the format used by the Docker remote API, i.e. the <code>Binding</code>s grouped by <code>ExposedPort</code>
getBindings
{ "repo_name": "docker-java/docker-java", "path": "docker-java-api/src/main/java/com/github/dockerjava/api/model/Ports.java", "license": "apache-2.0", "size": 10951 }
[ "java.io.Serializable", "java.util.Map" ]
import java.io.Serializable; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,812,882
private static String getAdminClientId(Map<String, String> settings) { return settings.get("oauth.keycloak.apiKey"); }
static String function(Map<String, String> settings) { return settings.get(STR); }
/** * Returns admin client id * * @param settings settings * @return admin client id */
Returns admin client id
getAdminClientId
{ "repo_name": "Metatavu/edelphi", "path": "common-cdi/src/main/java/fi/metatavu/edelphi/keycloak/KeycloakController.java", "license": "gpl-3.0", "size": 20518 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
791,592
@Override public EventID getEventId() { return this.id; }
EventID function() { return this.id; }
/** * Return this event's identifier * * @return this event's identifier */
Return this event's identifier
getEventId
{ "repo_name": "smgoller/geode", "path": "geode-junit/src/main/java/org/apache/geode/internal/cache/ha/ConflatableObject.java", "license": "apache-2.0", "size": 5117 }
[ "org.apache.geode.internal.cache.EventID" ]
import org.apache.geode.internal.cache.EventID;
import org.apache.geode.internal.cache.*;
[ "org.apache.geode" ]
org.apache.geode;
2,265,360
public void linkNonSelectable(VRMLLinkNodeType node);
void function(VRMLLinkNodeType node);
/** * Invoked when a link node is contact with a tracker capable of picking. */
Invoked when a link node is contact with a tracker capable of picking
linkNonSelectable
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/web3d/vrml/renderer/common/input/LinkSelectionListener.java", "license": "gpl-2.0", "size": 1443 }
[ "org.web3d.vrml.nodes.VRMLLinkNodeType" ]
import org.web3d.vrml.nodes.VRMLLinkNodeType;
import org.web3d.vrml.nodes.*;
[ "org.web3d.vrml" ]
org.web3d.vrml;
1,757,184
public final Object next() throws NoSuchElementException { return nextHeader(); }
final Object function() throws NoSuchElementException { return nextHeader(); }
/** * Returns the next header. * Same as {@link #nextHeader nextHeader}, but not type-safe. * * @return the next header in this iteration * * @throws NoSuchElementException if there are no more headers */
Returns the next header. Same as <code>#nextHeader nextHeader</code>, but not type-safe
next
{ "repo_name": "vuzzan/openclinic", "path": "src/org/apache/http/message/BasicHeaderIterator.java", "license": "apache-2.0", "size": 5335 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,456,919
protected Map<String,Object> getIndexParameters() { return this.parameters; }
Map<String,Object> function() { return this.parameters; }
/** * Returns the indexing parameters */
Returns the indexing parameters
getIndexParameters
{ "repo_name": "masterucm1617/botzzaroni", "path": "BotzzaroniDev/GATE_Developer_8.4/src/main/gate/creole/annic/lucene/LuceneIndexer.java", "license": "gpl-3.0", "size": 19066 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,186,850
private List<Map<String, String>> buildChannelArches() { List<Map<String, String>> channelArches = new ArrayList<Map<String, String>>(); List<ChannelArch> arches = ChannelManager.getChannelArchitectures(); List<String> syncdLabels = ChannelManager.getSyncdChannelArches(); for (Channe...
List<Map<String, String>> function() { List<Map<String, String>> channelArches = new ArrayList<Map<String, String>>(); List<ChannelArch> arches = ChannelManager.getChannelArchitectures(); List<String> syncdLabels = ChannelManager.getSyncdChannelArches(); for (ChannelArch arch : arches) { if (!EXCLUDED_ARCHES.contains(a...
/** * Build the channel-arch-pulldown for all arches that are not in the 'excluded' list * @return For each arch, a Map of localized display-name and value */
Build the channel-arch-pulldown for all arches that are not in the 'excluded' list
buildChannelArches
{ "repo_name": "ogajduse/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/action/channel/PackageSearchAction.java", "license": "gpl-2.0", "size": 10577 }
[ "com.redhat.rhn.domain.channel.ChannelArch", "com.redhat.rhn.manager.channel.ChannelManager", "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import com.redhat.rhn.domain.channel.ChannelArch; import com.redhat.rhn.manager.channel.ChannelManager; import java.util.ArrayList; import java.util.List; import java.util.Map;
import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.manager.channel.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
1,522,227
boolean isCommissionExempt(IInstanceTrigger it);
boolean isCommissionExempt(IInstanceTrigger it);
/** * Checks if given {@link IInstanceTrigger} shall be exempted from commission calculation. e.g. * <ul> * <li>an {@link I_C_OrderLine} which has M_Promotion_ID set is exempted * <li>an {@link I_C_OrderLine} which is a comment line is exempted * </ul> * * @param it * @return true if is commission exem...
Checks if given <code>IInstanceTrigger</code> shall be exempted from commission calculation. e.g. an <code>I_C_OrderLine</code> which has M_Promotion_ID set is exempted an <code>I_C_OrderLine</code> which is a comment line is exempted
isCommissionExempt
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.commission/de.metas.commission.base/src/main/java/de/metas/commission/service/IInstanceTriggerBL.java", "license": "gpl-2.0", "size": 2008 }
[ "de.metas.commission.model.IInstanceTrigger" ]
import de.metas.commission.model.IInstanceTrigger;
import de.metas.commission.model.*;
[ "de.metas.commission" ]
de.metas.commission;
2,296,498
private List<ListEntry> getSsEntryListHelper() throws EPAuthenticationException { List<ListEntry> returnList = null; try { SpreadsheetService ssService = getSsService(); ListFeed listFeed = ssService.getFeed(ssUrl, ListFeed.class); returnList = listFeed.getEntries(); } catch (com.g...
List<ListEntry> function() throws EPAuthenticationException { List<ListEntry> returnList = null; try { SpreadsheetService ssService = getSsService(); ListFeed listFeed = ssService.getFeed(ssUrl, ListFeed.class); returnList = listFeed.getEntries(); } catch (com.google.gdata.util.AuthenticationException authEx) { throw n...
/** * Retrieves all <code>ListEntry</code> objects from the spreadsheet * * @return <code>List</code> of <code>ListEntry</code> instances * @throws EPAuthenticationException */
Retrieves all <code>ListEntry</code> objects from the spreadsheet
getSsEntryListHelper
{ "repo_name": "simonrrr/gdata-java-client", "path": "java/mashups/eventpub/src/mashups/eventpub/EventPublisher.java", "license": "apache-2.0", "size": 26545 }
[ "com.google.gdata.client.spreadsheet.SpreadsheetService", "com.google.gdata.data.spreadsheet.ListEntry", "com.google.gdata.data.spreadsheet.ListFeed", "com.google.gdata.util.ServiceException", "java.io.IOException", "java.util.List" ]
import com.google.gdata.client.spreadsheet.SpreadsheetService; import com.google.gdata.data.spreadsheet.ListEntry; import com.google.gdata.data.spreadsheet.ListFeed; import com.google.gdata.util.ServiceException; import java.io.IOException; import java.util.List;
import com.google.gdata.client.spreadsheet.*; import com.google.gdata.data.spreadsheet.*; import com.google.gdata.util.*; import java.io.*; import java.util.*;
[ "com.google.gdata", "java.io", "java.util" ]
com.google.gdata; java.io; java.util;
1,277,281
Map getEventsMapForTesting() { return Collections.unmodifiableMap(this.eventsMap); }
Map getEventsMapForTesting() { return Collections.unmodifiableMap(this.eventsMap); }
/** * Used for testing purposes only * * @return Map object containing DispatchedAndCurrentEvents object for a * ThreadIdentifier */
Used for testing purposes only
getEventsMapForTesting
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java", "license": "apache-2.0", "size": 145094 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,732,051
private static ByteBuffer padString(ByteBuffer buffer, Column storeColumn) { int suppliedLength = buffer.limit(); int requiredLength = storeColumn.getColumnSpace(); if (suppliedLength > requiredLength) { throw new ClusterJUserException(local.message("ERR_Data_Too_Long", ...
static ByteBuffer function(ByteBuffer buffer, Column storeColumn) { int suppliedLength = buffer.limit(); int requiredLength = storeColumn.getColumnSpace(); if (suppliedLength > requiredLength) { throw new ClusterJUserException(local.message(STR, storeColumn.getName(), requiredLength, suppliedLength)); } else if (suppli...
/** Pad the value with blanks on the right. * @param buffer the input value * @param storeColumn the store column * @return the buffer padded with blanks on the right */
Pad the value with blanks on the right
padString
{ "repo_name": "ForcerKing/ShaoqunXu-mysql5.7", "path": "storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/Utility.java", "license": "gpl-2.0", "size": 105463 }
[ "com.mysql.clusterj.ClusterJUserException", "com.mysql.clusterj.core.store.Column", "java.nio.ByteBuffer" ]
import com.mysql.clusterj.ClusterJUserException; import com.mysql.clusterj.core.store.Column; import java.nio.ByteBuffer;
import com.mysql.clusterj.*; import com.mysql.clusterj.core.store.*; import java.nio.*;
[ "com.mysql.clusterj", "java.nio" ]
com.mysql.clusterj; java.nio;
2,651,745
private int addOneForBlockOtherToFormThree() { List<Integer> ids = new ArrayList<Integer>(); for (int p = 1; p <= NUMBER_OF_PLAYERS; p++) { if (p == player) { continue; } ids.add(p); } Collections.shuffle(ids); List<Integer> solutions = new ArrayList<Integer>(); for (Integer p : i...
int function() { List<Integer> ids = new ArrayList<Integer>(); for (int p = 1; p <= NUMBER_OF_PLAYERS; p++) { if (p == player) { continue; } ids.add(p); } Collections.shuffle(ids); List<Integer> solutions = new ArrayList<Integer>(); for (Integer p : ids) { for (int i = 0; i < state.length; i++) { int[][] nextState = co...
/** * Add one piece in order to block opponents to form three pieces in a row. * * @return Index of a column to play or -1 if rule is not applicable. */
Add one piece in order to block opponents to form three pieces in a row
addOneForBlockOtherToFormThree
{ "repo_name": "georgigospodinov/Complica4", "path": "client/src/eu/veldsoft/complica4/model/ia/SimpleRulesArtificialIntelligence.java", "license": "gpl-3.0", "size": 12425 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
693,822
void serviceRevoked(BeanContextServiceRevokedEvent bcsre);
void serviceRevoked(BeanContextServiceRevokedEvent bcsre);
/** * The service named has been revoked. getService requests for * this service will no longer be satisfied. * @param bcsre the {@code BeanContextServiceRevokedEvent} received * by this listener. */
The service named has been revoked. getService requests for this service will no longer be satisfied
serviceRevoked
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.desktop/share/classes/java/beans/beancontext/BeanContextServiceRevokedListener.java", "license": "gpl-2.0", "size": 1927 }
[ "java.beans.beancontext.BeanContextServiceRevokedEvent" ]
import java.beans.beancontext.BeanContextServiceRevokedEvent;
import java.beans.beancontext.*;
[ "java.beans" ]
java.beans;
1,199,661
public Collection<String> getHosts() { return hosts; }
Collection<String> function() { return hosts; }
/** * Returns the LDAP servers hosts; e.g. <tt>localhost</tt> or * <tt>machine.example.com</tt>, etc. This value is stored as the Jive * Property <tt>ldap.host</tt>. * * @return the LDAP server host name. */
Returns the LDAP servers hosts; e.g. localhost or machine.example.com, etc. This value is stored as the Jive Property ldap.host
getHosts
{ "repo_name": "trimnguye/JavaChatServer", "path": "src/java/org/jivesoftware/openfire/ldap/LdapManager.java", "license": "apache-2.0", "size": 93175 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,815,289
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<PrivateEndpointConnectionInner>> getWithResponseAsync( String resourceGroupName, String accountName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<PrivateEndpointConnectionInner>> function( String resourceGroupName, String accountName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId...
/** * Get a private endpoint connection. * * @param resourceGroupName The resource group name. * @param accountName The name of the account. * @param privateEndpointConnectionName Name of the private endpoint connection. * @throws IllegalArgumentException thrown if parameters fail the vali...
Get a private endpoint connection
getWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/purview/azure-resourcemanager-purview/src/main/java/com/azure/resourcemanager/purview/implementation/PrivateEndpointConnectionsClientImpl.java", "license": "mit", "size": 57237 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.purview.fluent.models.PrivateEndpointConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.purview.fluent.models.PrivateEndpointConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.purview.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,062,759
public void writeFully(byte[] bytes, int from, int to) throws IOException;
void function(byte[] bytes, int from, int to) throws IOException;
/** * Write the entire byte section. * * @param bytes the byte array to write a section from. * @param from the start of the section. * @param to the end of the section. * @throws IOException if an error occurred while writing the data. */
Write the entire byte section
writeFully
{ "repo_name": "Ja-ake/Common-Chicken-Runtime-Engine", "path": "CommonChickenRuntimeEngine/src/ccre/channel/SerialOutput.java", "license": "lgpl-3.0", "size": 2733 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
315,625
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = "") @SimpleProperty public void ApiKey(String apiKey) { this.apiKey = apiKey; }
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = "") void function(String apiKey) { this.apiKey = apiKey; }
/** * Setter for the app developer's API key. */
Setter for the app developer's API key
ApiKey
{ "repo_name": "kkashi01/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/FusiontablesControl.java", "license": "apache-2.0", "size": 40494 }
[ "com.google.appinventor.components.annotations.DesignerProperty", "com.google.appinventor.components.common.PropertyTypeConstants" ]
import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.common.PropertyTypeConstants;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*;
[ "com.google.appinventor" ]
com.google.appinventor;
1,649,136
public void onButtonClick(View view) { // Either show the definition of the current word, or if the definition is currently // showing, move to the next word. switch (mCurrentState) { case STATE_HIDDEN: showDefinition(); break; case ST...
void function(View view) { switch (mCurrentState) { case STATE_HIDDEN: showDefinition(); break; case STATE_SHOWN: nextWord(); break; } }
/** * This is called from the layout when the button is clicked and switches between the * two app states. * @param view The view that was clicked */
This is called from the layout when the button is clicked and switches between the two app states
onButtonClick
{ "repo_name": "jerrykuo7727/ud851-Exercises", "path": "Lesson08-Quiz-Example/T08.03-Exercise-FinishQuizExample/app/src/main/java/com/udacity/example/quizexample/MainActivity.java", "license": "apache-2.0", "size": 5191 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
550,230
public CountDownLatch getCountriesWithStatesAsync(String responseFields, AsyncCallback<com.mozu.api.contracts.reference.CountryWithStatesCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.reference.CountryWithStatesCollection> client = com.mozu.api.clients.platform.ReferenceDataClient.getC...
CountDownLatch function(String responseFields, AsyncCallback<com.mozu.api.contracts.reference.CountryWithStatesCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.reference.CountryWithStatesCollection> client = com.mozu.api.clients.platform.ReferenceDataClient.getCountriesWithStatesClient( respon...
/** * Retrieves the entire list of countries that the system supports. * <p><pre><code> * ReferenceData referencedata = new ReferenceData(); * CountDownLatch latch = referencedata.getCountriesWithStates( responseFields, callback ); * latch.await() * </code></pre></p> * @param responseFields Filtering synta...
Retrieves the entire list of countries that the system supports. <code><code> ReferenceData referencedata = new ReferenceData(); CountDownLatch latch = referencedata.getCountriesWithStates( responseFields, callback ); latch.await() * </code></code>
getCountriesWithStatesAsync
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/platform/ReferenceDataResource.java", "license": "mit", "size": 43935 }
[ "com.mozu.api.AsyncCallback", "com.mozu.api.MozuClient", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import com.mozu.api.MozuClient; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
1,522,485
public boolean performAction(int virtualViewId, int action, Bundle arguments) { return false; }
boolean function(int virtualViewId, int action, Bundle arguments) { return false; }
/** * Performs an accessibility action on a virtual view, i.e. a descendant of the * host View, with the given <code>virtualViewId</code> or the host View itself * if <code>virtualViewId</code> equals to {@link #HOST_VIEW_ID}. * * @param virtualViewId A client defined virtual view id. * @p...
Performs an accessibility action on a virtual view, i.e. a descendant of the host View, with the given <code>virtualViewId</code> or the host View itself if <code>virtualViewId</code> equals to <code>#HOST_VIEW_ID</code>
performAction
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/view/accessibility/AccessibilityNodeProvider.java", "license": "gpl-3.0", "size": 6432 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
2,513,308
private static <M extends Mapper> M parseAndMergeUpdate(M mapper, ParseContext context) throws IOException { final Mapper update = parseObjectOrField(context, mapper); if (update != null) { mapper = (M) mapper.merge(update, false); } return mapper; }
static <M extends Mapper> M function(M mapper, ParseContext context) throws IOException { final Mapper update = parseObjectOrField(context, mapper); if (update != null) { mapper = (M) mapper.merge(update, false); } return mapper; }
/** * Parse the given {@code context} with the given {@code mapper} and apply * the potential mapping update in-place. This method is useful when * composing mapping updates. */
Parse the given context with the given mapper and apply the potential mapping update in-place. This method is useful when composing mapping updates
parseAndMergeUpdate
{ "repo_name": "strapdata/elassandra-test", "path": "core/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java", "license": "apache-2.0", "size": 38814 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,271,366
public void setMin(float min) { rangeArray.set(startingIndex * 2, new COSFloat(min)); }
void function(float min) { rangeArray.set(startingIndex * 2, new COSFloat(min)); }
/** * This will set the minimum value for the range. * * @param min The new minimum for the range. */
This will set the minimum value for the range
setMin
{ "repo_name": "gavanx/pdflearn", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/PDRange.java", "license": "apache-2.0", "size": 3607 }
[ "org.apache.pdfbox.cos.COSFloat" ]
import org.apache.pdfbox.cos.COSFloat;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,458,180
public void writeValue(String value, String name) throws ServiceXmlSerializationException { try { this.xmlWriter.writeCharacters(value); } catch (XMLStreamException e) { // Bug E14:65046: XmlTextWriter will throw ArgumentException //if string includes invalid characters. throw ne...
void function(String value, String name) throws ServiceXmlSerializationException { try { this.xmlWriter.writeCharacters(value); } catch (XMLStreamException e) { throw new ServiceXmlSerializationException(String.format( STR, value, name), e); } }
/** * Writes string value. * * @param value The value. * @param name Element name (used for error handling) * @throws ServiceXmlSerializationException Thrown if string value isn't valid for XML. */
Writes string value
writeValue
{ "repo_name": "relateiq/ews-java-api", "path": "src/main/java/microsoft/exchange/webservices/data/core/EwsServiceXmlWriter.java", "license": "mit", "size": 19735 }
[ "javax.xml.stream.XMLStreamException" ]
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.*;
[ "javax.xml" ]
javax.xml;
1,818,793
public FileItem getFileItem() { return this.item; }
FileItem function() { return this.item; }
/** * Provides the current file item object. * * @return The current file item object * @since 2.0 */
Provides the current file item object
getFileItem
{ "repo_name": "nortal/araneaframework", "path": "src/org/araneaframework/uilib/support/FileInfo.java", "license": "apache-2.0", "size": 3608 }
[ "org.apache.commons.fileupload.FileItem" ]
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.*;
[ "org.apache.commons" ]
org.apache.commons;
191,014
@ManagedAttribute(description="The idle duration in ms.") public long getIdleDuration() { return idleDuration; } /** * Sets the time in ms. that a metric can be idle (with zeroes being sent every period) * before it is purged from {@link #lastEntry}
@ManagedAttribute(description=STR) long function() { return idleDuration; } /** * Sets the time in ms. that a metric can be idle (with zeroes being sent every period) * before it is purged from {@link #lastEntry}
/** * Returns the idle duration in ms. * @return the idle duration in ms. */
Returns the idle duration in ms
getIdleDuration
{ "repo_name": "nickman/HeliosStreams", "path": "stream-hub/src/main/java/com/heliosapm/streams/metrics/router/nodes/KMetricAggreagator.java", "license": "apache-2.0", "size": 15324 }
[ "org.springframework.jmx.export.annotation.ManagedAttribute" ]
import org.springframework.jmx.export.annotation.ManagedAttribute;
import org.springframework.jmx.export.annotation.*;
[ "org.springframework.jmx" ]
org.springframework.jmx;
1,812,885
public Map<String, String> getResponseHeaders() { return mResponseHeaders; }
Map<String, String> function() { return mResponseHeaders; }
/** * Gets the headers for the resource response. * * @return The headers for the resource response. */
Gets the headers for the resource response
getResponseHeaders
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/webkit/WebResourceResponse.java", "license": "gpl-3.0", "size": 8380 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
455,693
@RequestMapping(value = "/get-active-user", method = RequestMethod.GET, produces = "application/json") @Secured("ROLE_SIEM_USER") @ResponseBody public MsgUserDetails getActiveUser(Principal principal) { MsgUserDetails msg = new MsgUserDetails(); try { AuthorizedUser actUser = (AuthorizedUser) ((Authentica...
@RequestMapping(value = STR, method = RequestMethod.GET, produces = STR) @Secured(STR) MsgUserDetails function(Principal principal) { MsgUserDetails msg = new MsgUserDetails(); try { AuthorizedUser actUser = (AuthorizedUser) ((Authentication) principal).getPrincipal(); User user = userDetailsService.getUserDetails(actU...
/** * Send details about the currently active user to the client. * This is mapped to the URI /get-active-user * * @param principal Authentication information provided by Spring Security * @return Outgoing message to include as HTTP response body */
Send details about the currently active user to the client. This is mapped to the URI /get-active-user
getActiveUser
{ "repo_name": "decoit/siem-gui-simu", "path": "src/main/java/de/decoit/siemgui/web/SiteController.java", "license": "agpl-3.0", "size": 3534 }
[ "de.decoit.siemgui.domain.User", "de.decoit.siemgui.exception.ExternalServiceException", "de.decoit.siemgui.security.AuthorizedUser", "de.decoit.siemgui.stomp.msgs.outgoing.MsgUserDetails", "java.security.Principal", "java.util.List", "java.util.stream.Collectors", "org.springframework.security.access...
import de.decoit.siemgui.domain.User; import de.decoit.siemgui.exception.ExternalServiceException; import de.decoit.siemgui.security.AuthorizedUser; import de.decoit.siemgui.stomp.msgs.outgoing.MsgUserDetails; import java.security.Principal; import java.util.List; import java.util.stream.Collectors; import org.springfr...
import de.decoit.siemgui.domain.*; import de.decoit.siemgui.exception.*; import de.decoit.siemgui.security.*; import de.decoit.siemgui.stomp.msgs.outgoing.*; import java.security.*; import java.util.*; import java.util.stream.*; import org.springframework.security.access.annotation.*; import org.springframework.securit...
[ "de.decoit.siemgui", "java.security", "java.util", "org.springframework.security", "org.springframework.web" ]
de.decoit.siemgui; java.security; java.util; org.springframework.security; org.springframework.web;
253,685
private ArgumentsHolder createArgumentArray( String beanName, RootBeanDefinition mbd, ConstructorArgumentValues resolvedValues, BeanWrapper bw, Class[] paramTypes, Object methodOrCtor, boolean autowiring) throws UnsatisfiedDependencyException { String methodType = (methodOrCtor instanceof Constructor ? "...
ArgumentsHolder function( String beanName, RootBeanDefinition mbd, ConstructorArgumentValues resolvedValues, BeanWrapper bw, Class[] paramTypes, Object methodOrCtor, boolean autowiring) throws UnsatisfiedDependencyException { String methodType = (methodOrCtor instanceof Constructor ? STR : STR); TypeConverter converter...
/** * Create an array of arguments to invoke a constructor or factory method, * given the resolved constructor argument values. */
Create an array of arguments to invoke a constructor or factory method, given the resolved constructor argument values
createArgumentArray
{ "repo_name": "mattxia/spring-2.5-analysis", "path": "src/org/springframework/beans/factory/support/ConstructorResolver.java", "license": "apache-2.0", "size": 24053 }
[ "java.lang.reflect.Constructor", "java.util.HashSet", "java.util.Iterator", "java.util.LinkedHashSet", "java.util.Set", "org.springframework.beans.BeanWrapper", "org.springframework.beans.BeansException", "org.springframework.beans.TypeConverter", "org.springframework.beans.TypeMismatchException", ...
import java.lang.reflect.Constructor; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.Set; import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeansException; import org.springframework.beans.TypeConverter; import org.springframework.beans...
import java.lang.reflect.*; import java.util.*; import org.springframework.beans.*; import org.springframework.beans.factory.*; import org.springframework.beans.factory.config.*; import org.springframework.core.*; import org.springframework.util.*;
[ "java.lang", "java.util", "org.springframework.beans", "org.springframework.core", "org.springframework.util" ]
java.lang; java.util; org.springframework.beans; org.springframework.core; org.springframework.util;
1,392,897
public Value toKey() { throw new QuercusRuntimeException(L.l("{0} is not a valid key", this)); }
Value function() { throw new QuercusRuntimeException(L.l(STR, this)); }
/** * Converts to a key. */
Converts to a key
toKey
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/quercus/env/Value.java", "license": "gpl-2.0", "size": 58000 }
[ "com.caucho.quercus.QuercusRuntimeException" ]
import com.caucho.quercus.QuercusRuntimeException;
import com.caucho.quercus.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
2,441,504
public static boolean populatePageHeader(ExtractorInput input, PageHeader header, ParsableByteArray scratch, boolean quite) throws IOException, InterruptedException { scratch.reset(); header.reset(); boolean hasEnoughBytes = input.getLength() == C.LENGTH_UNBOUNDED || input.getLength() - inp...
static boolean function(ExtractorInput input, PageHeader header, ParsableByteArray scratch, boolean quite) throws IOException, InterruptedException { scratch.reset(); header.reset(); boolean hasEnoughBytes = input.getLength() == C.LENGTH_UNBOUNDED input.getLength() - input.getPeekPosition() >= PAGE_HEADER_SIZE; if (!ha...
/** * Peeks an Ogg page header and stores the data in the {@code header} object passed * as argument. * * @param input the {@link ExtractorInput} to read from. * @param header the {@link PageHeader} to read from. * @param scratch a scratch array temporary use. Its size should be at least PAGE_HEADER_S...
Peeks an Ogg page header and stores the data in the header object passed as argument
populatePageHeader
{ "repo_name": "Lee-Wills/-tv", "path": "mmd/library/src/main/java/com/google/android/exoplayer/extractor/ogg/OggUtil.java", "license": "gpl-3.0", "size": 7301 }
[ "com.google.android.exoplayer.ParserException", "com.google.android.exoplayer.extractor.ExtractorInput", "com.google.android.exoplayer.util.ParsableByteArray", "java.io.EOFException", "java.io.IOException" ]
import com.google.android.exoplayer.ParserException; import com.google.android.exoplayer.extractor.ExtractorInput; import com.google.android.exoplayer.util.ParsableByteArray; import java.io.EOFException; import java.io.IOException;
import com.google.android.exoplayer.*; import com.google.android.exoplayer.extractor.*; import com.google.android.exoplayer.util.*; import java.io.*;
[ "com.google.android", "java.io" ]
com.google.android; java.io;
2,730,805
public void writeTo(OutputStream os) throws IOException { GZIPOutputStream gzos; DataOutputStream dos = new DataOutputStream(gzos = new GZIPOutputStream(os)); dos.writeByte(type.ordinal()); if (type != Type.TAG_End) { dos.writeUTF(name); writePayload(dos); ...
void function(OutputStream os) throws IOException { GZIPOutputStream gzos; DataOutputStream dos = new DataOutputStream(gzos = new GZIPOutputStream(os)); dos.writeByte(type.ordinal()); if (type != Type.TAG_End) { dos.writeUTF(name); writePayload(dos); } gzos.flush(); gzos.close(); }
/** * Read a tag and its nested tags from an InputStream. * * @param os stream to write to, like a FileOutputStream * @throws IOException if this is not a valid NBT structure or if any IOException occurred. */
Read a tag and its nested tags from an InputStream
writeTo
{ "repo_name": "galaran/SpL-Editor", "path": "src/net/minecraftwiki/nbt/Tag.java", "license": "bsd-3-clause", "size": 16997 }
[ "java.io.DataOutputStream", "java.io.IOException", "java.io.OutputStream", "java.util.zip.GZIPOutputStream" ]
import java.io.DataOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.zip.GZIPOutputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,908,295
//----------------------------------------------------------------------- public ImmutableMap<MarketDataId<?>, MarketDataBox<?>> getValues() { return values; }
ImmutableMap<MarketDataId<?>, MarketDataBox<?>> function() { return values; }
/** * Gets the individual items of market data. * @return the value of the property, not null */
Gets the individual items of market data
getValues
{ "repo_name": "jmptrader/Strata", "path": "modules/data/src/main/java/com/opengamma/strata/data/scenario/ImmutableScenarioMarketData.java", "license": "apache-2.0", "size": 23053 }
[ "com.google.common.collect.ImmutableMap", "com.opengamma.strata.data.MarketDataId" ]
import com.google.common.collect.ImmutableMap; import com.opengamma.strata.data.MarketDataId;
import com.google.common.collect.*; import com.opengamma.strata.data.*;
[ "com.google.common", "com.opengamma.strata" ]
com.google.common; com.opengamma.strata;
1,567,254
@Override public RegisterSensorDocument build() throws NoValidInputsOrOutputsException { RegisterSensorDocument regSensorDoc = RegisterSensorDocument.Factory.newInstance(); RegisterSensorDocument.RegisterSensor regSensor = regSensorDoc.addNewRegisterSensor(); regSensor.setService(SOS_SER...
RegisterSensorDocument function() throws NoValidInputsOrOutputsException { RegisterSensorDocument regSensorDoc = RegisterSensorDocument.Factory.newInstance(); RegisterSensorDocument.RegisterSensor regSensor = regSensorDoc.addNewRegisterSensor(); regSensor.setService(SOS_SERVICE_NAME); regSensor.setVersion(SOS_V1_SERVIC...
/** * Creates a {@code RegisterSensorDocument} that registers a {@code EEAStation} at a SOS. * * @return the RegisterSensor request * @throws NoValidInputsOrOutputsException */
Creates a RegisterSensorDocument that registers a EEAStation at a SOS
build
{ "repo_name": "autermann/airbase-feeder", "path": "src/main/java/de/ifgi/airbase/feeder/io/sos/http/xml/RegisterSensorRequestBuilder.java", "license": "gpl-2.0", "size": 3560 }
[ "de.ifgi.airbase.feeder.util.SOSNamespaceUtils", "net.opengis.sos.x10.RegisterSensorDocument" ]
import de.ifgi.airbase.feeder.util.SOSNamespaceUtils; import net.opengis.sos.x10.RegisterSensorDocument;
import de.ifgi.airbase.feeder.util.*; import net.opengis.sos.x10.*;
[ "de.ifgi.airbase", "net.opengis.sos" ]
de.ifgi.airbase; net.opengis.sos;
835,784
public static Number xContentDependentFloatingNumberValue(String mode, Number value) { Mode m = Mode.fromString(mode); // for drivers and the CLI return the number as is, while for REST cast it implicitly to Double (the JSON standard). if (Mode.isDedicatedClient(m)) { return valu...
static Number function(String mode, Number value) { Mode m = Mode.fromString(mode); if (Mode.isDedicatedClient(m)) { return value; } else { return value.doubleValue(); } }
/** * JSON parser returns floating point numbers as Doubles, while CBOR as their actual type. * To have the tests compare the correct data type, the floating point numbers types should be passed accordingly, to the comparators. */
JSON parser returns floating point numbers as Doubles, while CBOR as their actual type. To have the tests compare the correct data type, the floating point numbers types should be passed accordingly, to the comparators
xContentDependentFloatingNumberValue
{ "repo_name": "HonzaKral/elasticsearch", "path": "x-pack/plugin/sql/qa/src/main/java/org/elasticsearch/xpack/sql/qa/rest/BaseRestSqlTestCase.java", "license": "apache-2.0", "size": 3111 }
[ "org.elasticsearch.xpack.sql.proto.Mode" ]
import org.elasticsearch.xpack.sql.proto.Mode;
import org.elasticsearch.xpack.sql.proto.*;
[ "org.elasticsearch.xpack" ]
org.elasticsearch.xpack;
2,725,836
@Override ClientMessage putShortProperty(SimpleString key, short value);
ClientMessage putShortProperty(SimpleString key, short value);
/** * Overridden from {@link org.apache.activemq.artemis.api.core.Message} to enable fluent API */
Overridden from <code>org.apache.activemq.artemis.api.core.Message</code> to enable fluent API
putShortProperty
{ "repo_name": "cshannon/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java", "license": "apache-2.0", "size": 8719 }
[ "org.apache.activemq.artemis.api.core.SimpleString" ]
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.*;
[ "org.apache.activemq" ]
org.apache.activemq;
145,281
private String constructDisplayName() { String displayName = null; // FullName (created via "FN" or "NAME" field) is prefered. if (!TextUtils.isEmpty(mNameData.mFormatted)) { displayName = mNameData.mFormatted; } else if (!mNameData.emptyStructuredName()) { di...
String function() { String displayName = null; if (!TextUtils.isEmpty(mNameData.mFormatted)) { displayName = mNameData.mFormatted; } else if (!mNameData.emptyStructuredName()) { displayName = VCardUtils.constructNameFromElements(mVCardType, mNameData.mFamily, mNameData.mMiddle, mNameData.mGiven, mNameData.mPrefix, mNam...
/** * Construct the display name. The constructed data must not be null. */
Construct the display name. The constructed data must not be null
constructDisplayName
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/com/android/vcard/VCardEntry.java", "license": "apache-2.0", "size": 99419 }
[ "android.text.TextUtils" ]
import android.text.TextUtils;
import android.text.*;
[ "android.text" ]
android.text;
830,559
public final List<VertexInfo> getSuccessfullVertices() { return getVertices(VertexState.SUCCEEDED); }
final List<VertexInfo> function() { return getVertices(VertexState.SUCCEEDED); }
/** * Get list of failed vertices * * @return List<VertexInfo> */
Get list of failed vertices
getSuccessfullVertices
{ "repo_name": "zjffdu/tez", "path": "tez-plugins/tez-history-parser/src/main/java/org/apache/tez/history/parser/datamodel/DagInfo.java", "license": "apache-2.0", "size": 18282 }
[ "java.util.List", "org.apache.tez.dag.api.event.VertexState" ]
import java.util.List; import org.apache.tez.dag.api.event.VertexState;
import java.util.*; import org.apache.tez.dag.api.event.*;
[ "java.util", "org.apache.tez" ]
java.util; org.apache.tez;
2,711,510
private void popupKeyDown(KeyDownEvent event) { if (enableDebug) { debug("VFS: popupKeyDown(" + event.getNativeKeyCode() + ")"); } // Propagation of handled events is stopped so other handlers such as // shortcut key handlers do not also handle the same events. sw...
void function(KeyDownEvent event) { if (enableDebug) { debug(STR + event.getNativeKeyCode() + ")"); } switch (event.getNativeKeyCode()) { case KeyCodes.KEY_DOWN: suggestionPopup.selectNextItem(); DOM.eventPreventDefault(DOM.eventGetCurrentEvent()); event.stopPropagation(); break; case KeyCodes.KEY_UP: suggestionPopup.s...
/** * Triggered when a key was pressed in the suggestion popup. * * @param event * The KeyDownEvent of the key */
Triggered when a key was pressed in the suggestion popup
popupKeyDown
{ "repo_name": "shahrzadmn/vaadin", "path": "client/src/com/vaadin/client/ui/VFilterSelect.java", "license": "apache-2.0", "size": 79587 }
[ "com.google.gwt.event.dom.client.KeyCodes", "com.google.gwt.event.dom.client.KeyDownEvent", "com.google.gwt.user.client.DOM" ]
import com.google.gwt.event.dom.client.KeyCodes; import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.user.client.DOM;
import com.google.gwt.event.dom.client.*; import com.google.gwt.user.client.*;
[ "com.google.gwt" ]
com.google.gwt;
278,107
public static <T> T findFirstTypeInOutputs(List<ProcessorDefinition<?>> outputs, Class<T> type) { List<T> found = new ArrayList<>(); doFindType(outputs, type, found, -1); if (found.isEmpty()) { return null; } return found.iterator().next(); }
static <T> T function(List<ProcessorDefinition<?>> outputs, Class<T> type) { List<T> found = new ArrayList<>(); doFindType(outputs, type, found, -1); if (found.isEmpty()) { return null; } return found.iterator().next(); }
/** * Looks for the given type in the list of outputs and recurring all the children as well. Will stop at first found * and return it. * * @param outputs list of outputs, can be null or empty. * @param type the type to look for * @return the first found type, or <tt>null</tt>...
Looks for the given type in the list of outputs and recurring all the children as well. Will stop at first found and return it
findFirstTypeInOutputs
{ "repo_name": "nicolaferraro/camel", "path": "core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java", "license": "apache-2.0", "size": 12892 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
212,630
void addMemberVars(Api api, TypeSpec.Builder builder) { Preconditions.checkArgument(api != null, "api == null"); Preconditions.checkArgument(builder != null, "builder == null"); String apiConstant = api.name.toUpperCase() + Constants.API_PATH; builder.addField(FieldSpec.builder(Str...
void addMemberVars(Api api, TypeSpec.Builder builder) { Preconditions.checkArgument(api != null, STR); Preconditions.checkArgument(builder != null, STR); String apiConstant = api.name.toUpperCase() + Constants.API_PATH; builder.addField(FieldSpec.builder(String.class, apiConstant, Modifier.PUBLIC, Modifier.STATIC, Modi...
/** * Adds member variables for Api * * @param api - api Object * @param builder - DataTypeSpec builder for api */
Adds member variables for Api
addMemberVars
{ "repo_name": "jtruelove/exovert", "path": "src/main/java/com/cyngn/exovert/generate/server/rest/ClassGenerator.java", "license": "apache-2.0", "size": 22671 }
[ "com.cyngn.exovert.generate.server.rest.types.Api", "com.cyngn.exovert.generate.server.rest.utils.Constants", "com.cyngn.vertx.web.RestApi", "com.google.common.base.Preconditions", "com.squareup.javapoet.CodeBlock", "com.squareup.javapoet.FieldSpec", "com.squareup.javapoet.TypeSpec", "javax.lang.model...
import com.cyngn.exovert.generate.server.rest.types.Api; import com.cyngn.exovert.generate.server.rest.utils.Constants; import com.cyngn.vertx.web.RestApi; import com.google.common.base.Preconditions; import com.squareup.javapoet.CodeBlock; import com.squareup.javapoet.FieldSpec; import com.squareup.javapoet.TypeSpec; ...
import com.cyngn.exovert.generate.server.rest.types.*; import com.cyngn.exovert.generate.server.rest.utils.*; import com.cyngn.vertx.web.*; import com.google.common.base.*; import com.squareup.javapoet.*; import javax.lang.model.element.*;
[ "com.cyngn.exovert", "com.cyngn.vertx", "com.google.common", "com.squareup.javapoet", "javax.lang" ]
com.cyngn.exovert; com.cyngn.vertx; com.google.common; com.squareup.javapoet; javax.lang;
167,370
public static ArrayList<Integer> viterbiPath(String word, Hashtable<Integer, Hashtable<Integer, Float>> transitions, Hashtable<Integer, Hashtable<Character, Float>> outputs) { int T = word.length(); // word length i...
static ArrayList<Integer> function(String word, Hashtable<Integer, Hashtable<Integer, Float>> transitions, Hashtable<Integer, Hashtable<Character, Float>> outputs) { int T = word.length(); int N = outputs.size(); int F = N + 1; Float[][] v = new Float[N+2][T]; Integer[][] bp = new Integer[N+2][T]; for (int s=1; s<=N; s...
/** * Returns the most probable analyzing path for a word, given an HMM * @param word Observation (word to analyze) * @param transitions Hash table describing probability of each * HMM state to transition t...
Returns the most probable analyzing path for a word, given an HMM
viterbiPath
{ "repo_name": "abumatran/pat", "path": "DictionaryAnalyser/src/es/ua/dlsi/probabilitiesfromhmm/Viterbi.java", "license": "apache-2.0", "size": 10150 }
[ "java.util.ArrayList", "java.util.Hashtable" ]
import java.util.ArrayList; import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
1,997,355
Map<Object, PerformanceMeasure> out = new HashMap<Object, PerformanceMeasure>(); for (Object o : data.classes()) { out.put(o, new PerformanceMeasure()); } for (Instance instance : data) { Object prediction = cls.classify(instance); if (instance.classValu...
Map<Object, PerformanceMeasure> out = new HashMap<Object, PerformanceMeasure>(); for (Object o : data.classes()) { out.put(o, new PerformanceMeasure()); } for (Instance instance : data) { Object prediction = cls.classify(instance); if (instance.classValue().equals(prediction)) { for (Object o : out.keySet()) { if (o.eq...
/** * Tests a classifier on a data set * * @param cls * the classifier to test * @param data * the data set to test on * @return the performance for each class */
Tests a classifier on a data set
testDataset
{ "repo_name": "eracle/Gap", "path": "src/main/java/net/sf/javaml/classification/evaluation/EvaluateDataset.java", "license": "gpl-3.0", "size": 2975 }
[ "java.util.HashMap", "java.util.Map", "net.sf.javaml.core.Instance" ]
import java.util.HashMap; import java.util.Map; import net.sf.javaml.core.Instance;
import java.util.*; import net.sf.javaml.core.*;
[ "java.util", "net.sf.javaml" ]
java.util; net.sf.javaml;
2,399,991
private void visitObjectOrClassLiteralKey( NodeTraversal t, Node key, Node owner, JSType ownerType) { // Semicolons in a CLASS_MEMBERS body will produce EMPTY nodes: skip them. if (key.isEmpty()) { return; } // Do not validate object lit value types in externs. We don't really care, /...
void function( NodeTraversal t, Node key, Node owner, JSType ownerType) { if (key.isEmpty()) { return; } if (owner.isFromExterns()) { ensureTyped(key); return; } if (key.isComputedProp()) { validator.expectIndexMatch(t, key, ownerType, getJSType(key.getFirstChild())); return; } if (key.isQuotedString()) { if (ownerType...
/** * Visits an object literal field definition <code>key : value</code>, or a class member * definition <code>key() { ... }</code> If the <code>lvalue</code> is a prototype modification, * we change the schema of the object type it is referring to. * * @param t the traversal * @param key the ASSIGN, ...
Visits an object literal field definition <code>key : value</code>, or a class member definition <code>key() { ... }</code> If the <code>lvalue</code> is a prototype modification, we change the schema of the object type it is referring to
visitObjectOrClassLiteralKey
{ "repo_name": "tiobe/closure-compiler", "path": "src/com/google/javascript/jscomp/TypeCheck.java", "license": "apache-2.0", "size": 113785 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.JSType", "com.google.javascript.rhino.jstype.ObjectType" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType; import com.google.javascript.rhino.jstype.ObjectType;
import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
2,115,413
public FormValidation doCheck(@QueryParameter String value) { try { String msg = CronTabList.create(fixNull(value)).checkSanity(); if (msg != null) return FormValidation.warning(msg); return FormValidation.ok(); } catch ...
FormValidation function(@QueryParameter String value) { try { String msg = CronTabList.create(fixNull(value)).checkSanity(); if (msg != null) return FormValidation.warning(msg); return FormValidation.ok(); } catch (ANTLRException e) { return FormValidation.error(e.getMessage()); } } }
/** * Performs syntax check. */
Performs syntax check
doCheck
{ "repo_name": "patbos/jenkins", "path": "core/src/main/java/hudson/slaves/SimpleScheduledRetentionStrategy.java", "license": "mit", "size": 11428 }
[ "hudson.scheduler.CronTabList", "hudson.util.FormValidation", "org.kohsuke.stapler.QueryParameter" ]
import hudson.scheduler.CronTabList; import hudson.util.FormValidation; import org.kohsuke.stapler.QueryParameter;
import hudson.scheduler.*; import hudson.util.*; import org.kohsuke.stapler.*;
[ "hudson.scheduler", "hudson.util", "org.kohsuke.stapler" ]
hudson.scheduler; hudson.util; org.kohsuke.stapler;
2,426,939
public final String getURI() { return _constructionElement.getAttributeNS(null, Constants._ATT_ALGORITHM); } /** * Registers implementing class of the Transform algorithm with algorithmURI * * @param algorithmURI algorithmURI URI representation of <code>Transform algorithm</code>. ...
final String function() { return _constructionElement.getAttributeNS(null, Constants._ATT_ALGORITHM); } /** * Registers implementing class of the Transform algorithm with algorithmURI * * @param algorithmURI algorithmURI URI representation of <code>Transform algorithm</code>. * @param implementingClass <code>implementi...
/** * Returns the URI representation of Transformation algorithm * * @return the URI representation of Transformation algorithm */
Returns the URI representation of Transformation algorithm
getURI
{ "repo_name": "greghaskins/openjdk-jdk7u-jdk", "path": "src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java", "license": "gpl-2.0", "size": 16945 }
[ "com.sun.org.apache.xml.internal.security.utils.Constants" ]
import com.sun.org.apache.xml.internal.security.utils.Constants;
import com.sun.org.apache.xml.internal.security.utils.*;
[ "com.sun.org" ]
com.sun.org;
1,210,717
@Test public void testExtensionAeshCommandCollision() throws Exception { assertTrue("Required CLI error was not printed", cliErrors.contains(DuplicateExtCommand.NAME)); }
void function() throws Exception { assertTrue(STR, cliErrors.contains(DuplicateExtCommand.NAME)); }
/** * Checks error message if custom Aesh CLI command has the same name as already registered command. */
Checks error message if custom Aesh CLI command has the same name as already registered command
testExtensionAeshCommandCollision
{ "repo_name": "aloubyansky/wildfly-core", "path": "testsuite/standalone/src/test/java/org/jboss/as/test/integration/management/cli/extensions/DuplicateExtCommandTestCase.java", "license": "lgpl-2.1", "size": 7448 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
369,258
public void save(String dbName) throws TorqueException { Connection con = null; try { con = Transaction.begin(dbName); save(con); Transaction.commit(con); } catch(TorqueException e) { Transaction.safeRollback(con); ...
void function(String dbName) throws TorqueException { Connection con = null; try { con = Transaction.begin(dbName); save(con); Transaction.commit(con); } catch(TorqueException e) { Transaction.safeRollback(con); throw e; } }
/** * Stores the object in the database. If the object is new, * it inserts it; otherwise an update is performed. * Note: this code is here because the method body is * auto-generated conditionally and therefore needs to be * in this file instead of in the super class, BaseObject. * ...
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed. Note: this code is here because the method body is auto-generated conditionally and therefore needs to be in this file instead of in the super class, BaseObject
save
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTCostCenter.java", "license": "gpl-3.0", "size": 46924 }
[ "java.sql.Connection", "org.apache.torque.TorqueException", "org.apache.torque.util.Transaction" ]
import java.sql.Connection; import org.apache.torque.TorqueException; import org.apache.torque.util.Transaction;
import java.sql.*; import org.apache.torque.*; import org.apache.torque.util.*;
[ "java.sql", "org.apache.torque" ]
java.sql; org.apache.torque;
556,804
public static boolean removeOldVideos(Context context) { String prefKey = context.getString(R.string.pref_key_old_videos); return getPreferences(context).getBoolean(prefKey, true); }
static boolean function(Context context) { String prefKey = context.getString(R.string.pref_key_old_videos); return getPreferences(context).getBoolean(prefKey, true); }
/** * If is needed to remove old videos * * @param context calling context */
If is needed to remove old videos
removeOldVideos
{ "repo_name": "kristiankosharov/VideoRegistrator", "path": "app/src/main/java/reg/videoregistrator/utils/PreferencesUtils.java", "license": "apache-2.0", "size": 4254 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
779,769
public void setFormat(PayloadFormat format) { this.format = format; }
void function(PayloadFormat format) { this.format = format; }
/** * Payload format to use for Salesforce API calls, either JSON or XML, defaults to JSON */
Payload format to use for Salesforce API calls, either JSON or XML, defaults to JSON
setFormat
{ "repo_name": "jkorab/camel", "path": "components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceEndpointConfig.java", "license": "apache-2.0", "size": 23393 }
[ "org.apache.camel.component.salesforce.internal.PayloadFormat" ]
import org.apache.camel.component.salesforce.internal.PayloadFormat;
import org.apache.camel.component.salesforce.internal.*;
[ "org.apache.camel" ]
org.apache.camel;
1,109,831
public static <T extends Annotation> T getAnnotation(final Method method, final Class<T> annotationClass) { if (method == null) { return null; } final T annotation = method.getAnnotation(annotationClass); if (annotation != null) { return annotation; } ...
static <T extends Annotation> T function(final Method method, final Class<T> annotationClass) { if (method == null) { return null; } final T annotation = method.getAnnotation(annotationClass); if (annotation != null) { return annotation; } final Class<?> methodDeclaringClass = method.getDeclaringClass(); final Class<?>...
/** * Searches for annotation on provided method, and if not found for any * inherited methods up from the superclass. * * <p> * Added to allow bytecode-mangling libraries such as CGLIB to be supported. */
Searches for annotation on provided method, and if not found for any inherited methods up from the superclass. Added to allow bytecode-mangling libraries such as CGLIB to be supported
getAnnotation
{ "repo_name": "howepeng/isis", "path": "core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java", "license": "apache-2.0", "size": 8916 }
[ "java.lang.annotation.Annotation", "java.lang.reflect.Method" ]
import java.lang.annotation.Annotation; import java.lang.reflect.Method;
import java.lang.annotation.*; import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,732,868
public void discardAppliedLogEntries(long maxDiscardIndex) { // Sanity check assert Thread.holdsLock(this.raft); Preconditions.checkArgument(maxDiscardIndex <= this.lastAppliedIndex); final long minDiscardIndex = this.lastAppliedIndex - this.numApplied + 1; // Keep a minimu...
void function(long maxDiscardIndex) { assert Thread.holdsLock(this.raft); Preconditions.checkArgument(maxDiscardIndex <= this.lastAppliedIndex); final long minDiscardIndex = this.lastAppliedIndex - this.numApplied + 1; maxDiscardIndex = Math.min(maxDiscardIndex, this.lastAppliedIndex - MIN_APPLIED); for (long index = m...
/** * Discard applied log entries up to the specified index because they are no longer needed. * * @param maxDiscardIndex maximum index of applied log entries to discard * @throws IllegalArgumentException if {@code maxDiscardIndex} is greater than the last applied index */
Discard applied log entries up to the specified index because they are no longer needed
discardAppliedLogEntries
{ "repo_name": "archiecobbs/jsimpledb", "path": "permazen-kv-raft/src/main/java/io/permazen/kv/raft/Log.java", "license": "apache-2.0", "size": 17354 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
979,444
public AnnoncesRecord setDate(Timestamp value) { set(3, value); return this; }
AnnoncesRecord function(Timestamp value) { set(3, value); return this; }
/** * Setter for <code>public.annonces.date</code>. */
Setter for <code>public.annonces.date</code>
setDate
{ "repo_name": "jebab/stunning-octo-winner", "path": "src/main/jooq/sow/db/tables/records/AnnoncesRecord.java", "license": "mit", "size": 11574 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
909,905
private void fixTrans() { matrix.getValues(m); float transX = m[Matrix.MTRANS_X]; float transY = m[Matrix.MTRANS_Y]; float fixTransX = getFixTrans(transX, viewWidth, getImageWidth()); float fixTransY = getFixTrans(transY, viewHeight, getImageHeight()); ...
void function() { matrix.getValues(m); float transX = m[Matrix.MTRANS_X]; float transY = m[Matrix.MTRANS_Y]; float fixTransX = getFixTrans(transX, viewWidth, getImageWidth()); float fixTransY = getFixTrans(transY, viewHeight, getImageHeight()); if (fixTransX != 0 fixTransY != 0) { matrix.postTranslate(fixTransX, fixTra...
/** * Performs boundary checking and fixes the image matrix if it * is out of bounds. */
Performs boundary checking and fixes the image matrix if it is out of bounds
fixTrans
{ "repo_name": "fernando-napier/FarmProfitCalculator", "path": "touchImageView/src/main/java/com/ortiz/touch/TouchImageView.java", "license": "mit", "size": 40847 }
[ "android.graphics.Matrix" ]
import android.graphics.Matrix;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
708,627
SecurityContext securityContext = SecurityContextHolder.getContext(); Authentication authentication = securityContext.getAuthentication(); UserDetails springSecurityUser = null; String userName = null; if(authentication != null) { if (authentication.getPrincipal() instanceof ...
SecurityContext securityContext = SecurityContextHolder.getContext(); Authentication authentication = securityContext.getAuthentication(); UserDetails springSecurityUser = null; String userName = null; if(authentication != null) { if (authentication.getPrincipal() instanceof UserDetails) { springSecurityUser = (UserDet...
/** * Get the login of the current user. */
Get the login of the current user
getCurrentLogin
{ "repo_name": "miagebdx/website", "path": "src/main/java/com/miagebdx/website/security/SecurityUtils.java", "license": "gpl-2.0", "size": 1953 }
[ "org.springframework.security.core.Authentication", "org.springframework.security.core.context.SecurityContext", "org.springframework.security.core.context.SecurityContextHolder", "org.springframework.security.core.userdetails.UserDetails" ]
import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.*; import org.springframework.security.core.context.*; import org.springframework.security.core.userdetails.*;
[ "org.springframework.security" ]
org.springframework.security;
220,446
@Test public void testBizIntMixedSTL() throws Exception { // -------------------------------------------------------------------- // Lookup SFSB by XML name and execute the test // -------------------------------------------------------------------- BasicAnnotLocal bean5 = (Basic...
void function() throws Exception { BasicAnnotLocal bean5 = (BasicAnnotLocal) FATHelper.lookupDefaultBindingEJBJavaApp(annotBusinessInterface, module, beanName5); assertNotNull(STR, bean5); assertEquals(STR, bean5.getString(), STR); }
/** * Test calling methods on an EJB 3.0 CMT Stateless Session EJB with * Stateless annotation and no session-type in XML. */
Test calling methods on an EJB 3.0 CMT Stateless Session EJB with Stateless annotation and no session-type in XML
testBizIntMixedSTL
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.remote_fat/test-applications/StatelessMixWeb.war/src/com/ibm/ws/ejbcontainer/remote/ejb3session/sl/mix/web/StatelessTwoNamesServlet.java", "license": "epl-1.0", "size": 11206 }
[ "com.ibm.websphere.ejbcontainer.test.tools.FATHelper", "com.ibm.ws.ejbcontainer.remote.ejb3session.sl.mix.ejb.BasicAnnotLocal", "org.junit.Assert" ]
import com.ibm.websphere.ejbcontainer.test.tools.FATHelper; import com.ibm.ws.ejbcontainer.remote.ejb3session.sl.mix.ejb.BasicAnnotLocal; import org.junit.Assert;
import com.ibm.websphere.ejbcontainer.test.tools.*; import com.ibm.ws.ejbcontainer.remote.ejb3session.sl.mix.ejb.*; import org.junit.*;
[ "com.ibm.websphere", "com.ibm.ws", "org.junit" ]
com.ibm.websphere; com.ibm.ws; org.junit;
1,747,278