method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
} | KeyNamePair function() { return new KeyNamePair(get_ID(), getName()); } | /** Get Record ID/ColumnName
@return ID/ColumnName pair
*/ | Get Record ID/ColumnName | getKeyNamePair | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/X_C_Bank.java",
"license": "gpl-2.0",
"size": 5688
} | [
"org.compiere.util.KeyNamePair"
] | import org.compiere.util.KeyNamePair; | import org.compiere.util.*; | [
"org.compiere.util"
] | org.compiere.util; | 815,025 |
@Message(id = 232, value = "Alternative parameter '%s' for required parameter '%s' was used. Please use one or the other. %s")
IllegalArgumentException validationFailedRequiredParameterPresentAsWellAsAlternative(String alternative, String paramName, String operation); | @Message(id = 232, value = STR) IllegalArgumentException validationFailedRequiredParameterPresentAsWellAsAlternative(String alternative, String paramName, String operation); | /**
* Creates an exception indicating that the operation contains both an alternative and a required parameter
*
* @param alternative the name of the alternative parameter
* @param paramName the name of the required parameter
* @param operation the operation as a string. May be empty
*/ | Creates an exception indicating that the operation contains both an alternative and a required parameter | validationFailedRequiredParameterPresentAsWellAsAlternative | {
"repo_name": "aloubyansky/wildfly-core",
"path": "controller/src/main/java/org/jboss/as/controller/logging/ControllerLogger.java",
"license": "lgpl-2.1",
"size": 164970
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 79,205 |
public void setObjectReference(String name, Object object) {
if (objectRefs == null) {
objectRefs = new HashMap<String, Object>();
}
objectRefs.put(name, object);
} | void function(String name, Object object) { if (objectRefs == null) { objectRefs = new HashMap<String, Object>(); } objectRefs.put(name, object); } | /**
* Saves object reference.
*/ | Saves object reference | setObjectReference | {
"repo_name": "javachengwc/jodd",
"path": "jodd-db/src/main/java/jodd/db/oom/sqlgen/TemplateData.java",
"license": "bsd-2-clause",
"size": 9174
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,199,536 |
static BlocksMapUpdateInfo deleteInternal(
FSNamesystem fsn, String src, INodesInPath iip, boolean logRetryCache)
throws IOException {
assert fsn.hasWriteLock();
if (NameNode.stateChangeLog.isDebugEnabled()) {
NameNode.stateChangeLog.debug("DIR* NameSystem.delete: " + src);
}
FSDire... | static BlocksMapUpdateInfo deleteInternal( FSNamesystem fsn, String src, INodesInPath iip, boolean logRetryCache) throws IOException { assert fsn.hasWriteLock(); if (NameNode.stateChangeLog.isDebugEnabled()) { NameNode.stateChangeLog.debug(STR + src); } FSDirectory fsd = fsn.getFSDirectory(); BlocksMapUpdateInfo collec... | /**
* Remove a file/directory from the namespace.
* <p>
* For large directories, deletion is incremental. The blocks under
* the directory are collected and deleted a small number at a time holding
* the {@link org.apache.hadoop.hdfs.server.namenode.FSNamesystem} lock.
* <p>
* For small directory o... | Remove a file/directory from the namespace. For large directories, deletion is incremental. The blocks under the directory are collected and deleted a small number at a time holding the <code>org.apache.hadoop.hdfs.server.namenode.FSNamesystem</code> lock. For small directory or file the deletion is done in one shot | deleteInternal | {
"repo_name": "bysslord/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirDeleteOp.java",
"license": "apache-2.0",
"size": 9227
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hdfs.server.namenode.INode",
"org.apache.hadoop.util.ChunkedArrayList",
"org.apache.hadoop.util.Time"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hdfs.server.namenode.INode; import org.apache.hadoop.util.ChunkedArrayList; import org.apache.hadoop.util.Time; | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 980,214 |
public Optional<Component> getComponent() {
return Optional.ofNullable(component);
} | Optional<Component> function() { return Optional.ofNullable(component); } | /**
* Returns an {@code Optional} for the {@code Component} related to value
* conversion.
*
* @return the optional of component
*/ | Returns an Optional for the Component related to value conversion | getComponent | {
"repo_name": "peterl1084/framework",
"path": "server/src/main/java/com/vaadin/data/ValueContext.java",
"license": "apache-2.0",
"size": 2779
} | [
"com.vaadin.ui.Component",
"java.util.Optional"
] | import com.vaadin.ui.Component; import java.util.Optional; | import com.vaadin.ui.*; import java.util.*; | [
"com.vaadin.ui",
"java.util"
] | com.vaadin.ui; java.util; | 2,884,432 |
public void displayItems(List<Object> items)
{
// Handle the 'empty list' case
if ((items == null) || items.isEmpty())
{
this.setIcon(null);
this.setText("Nothing");
return;
}
// Handle the 'single item' case
if (items.size() == 1)
{
this.displayItem(items.get(0));
re... | void function(List<Object> items) { if ((items == null) items.isEmpty()) { this.setIcon(null); this.setText(STR); return; } if (items.size() == 1) { this.displayItem(items.get(0)); return; } ItemType type = null; for (Object item : items) { ItemType myType = this._getItemType(item); if (myType != type) { if (type != nu... | /**
* Formats this field so as to show a representation
* of a given list of archive items.
*
* @param items A list of items
*/ | Formats this field so as to show a representation of a given list of archive items | displayItems | {
"repo_name": "goc9000/UniArchive",
"path": "src/uniarchive/widgets/ArchiveItemDisplay.java",
"license": "gpl-3.0",
"size": 3910
} | [
"java.util.List",
"javax.swing.ImageIcon"
] | import java.util.List; import javax.swing.ImageIcon; | import java.util.*; import javax.swing.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 1,262,077 |
public static boolean isSameVariable(ASTNode node1, ASTNode node2) {
node1= getUnparenthesedExpression(node1);
node2= getUnparenthesedExpression(node2);
if (node1 == null || node2 == null) {
return false;
}
switch (node1.getNodeType()) {
case ASTNode.THIS_EXPRESSION:
return node2.getNod... | static boolean function(ASTNode node1, ASTNode node2) { node1= getUnparenthesedExpression(node1); node2= getUnparenthesedExpression(node2); if (node1 == null node2 == null) { return false; } switch (node1.getNodeType()) { case ASTNode.THIS_EXPRESSION: return node2.getNodeType() == ASTNode.THIS_EXPRESSION; case ASTNode.... | /**
* Returns whether the two provided nodes represent the same variable.
*
* @param node1 the first node to compare
* @param node2 the second node to compare
* @return true if the two provided nodes represent the same variable, false
* otherwise
*/ | Returns whether the two provided nodes represent the same variable | isSameVariable | {
"repo_name": "rpau/AutoRefactor",
"path": "plugin/src/main/java/org/autorefactor/jdt/internal/corext/dom/ASTNodes.java",
"license": "epl-1.0",
"size": 104241
} | [
"org.eclipse.jdt.core.dom.ASTNode",
"org.eclipse.jdt.core.dom.FieldAccess",
"org.eclipse.jdt.core.dom.QualifiedName",
"org.eclipse.jdt.core.dom.SimpleName"
] | import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.FieldAccess; import org.eclipse.jdt.core.dom.QualifiedName; import org.eclipse.jdt.core.dom.SimpleName; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,516,358 |
public static List<Path> getJarsInDirectory(String path, boolean useLocal) {
List<Path> paths = new ArrayList<>();
try {
// add the wildcard if it is not provided
if (!path.endsWith("*")) {
path += File.separator + "*";
}
Path globPath = new Path(path).suffix("{.jar,.JAR}");
... | static List<Path> function(String path, boolean useLocal) { List<Path> paths = new ArrayList<>(); try { if (!path.endsWith("*")) { path += File.separator + "*"; } Path globPath = new Path(path).suffix(STR); FileContext context = useLocal ? FileContext.getLocalFSFileContext() : FileContext.getFileContext(globPath.toUri(... | /**
* Returns all jars that are in the directory. It is useful in expanding a
* wildcard path to return all jars from the directory to use in a classpath.
*
* @param path the path to the directory. The path may include the wildcard.
* @return the list of jars as URLs, or an empty list if there are no jar... | Returns all jars that are in the directory. It is useful in expanding a wildcard path to return all jars from the directory to use in a classpath | getJarsInDirectory | {
"repo_name": "jaypatil/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java",
"license": "gpl-3.0",
"size": 48661
} | [
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List"
] | import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,943,883 |
public Observable<ServiceResponse<TopicSharedAccessKeysInner>> listSharedAccessKeysWithServiceResponseAsync(String resourceGroupName, String topicName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot ... | Observable<ServiceResponse<TopicSharedAccessKeysInner>> function(String resourceGroupName, String topicName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (topicName == null) { throw new IllegalArgu... | /**
* List keys for a topic.
* List the two keys used to publish to a topic.
*
* @param resourceGroupName The name of the resource group within the user's subscription.
* @param topicName Name of the topic
* @throws IllegalArgumentException thrown if parameters fail the validation
* @... | List keys for a topic. List the two keys used to publish to a topic | listSharedAccessKeysWithServiceResponseAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/eventgrid/mgmt-v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/implementation/TopicsInner.java",
"license": "mit",
"size": 76346
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,354,674 |
private void processSelectedKeys(Set<SelectionKey> keys) throws ClosedByInterruptException {
if (log.isTraceEnabled())
log.trace("Processing keys in client worker: " + keys.size());
if (keys.isEmpty())
return;
for (Iterator<SelectionKey> iter... | void function(Set<SelectionKey> keys) throws ClosedByInterruptException { if (log.isTraceEnabled()) log.trace(STR + keys.size()); if (keys.isEmpty()) return; for (Iterator<SelectionKey> iter = keys.iterator(); iter.hasNext(); ) { SelectionKey key = iter.next(); iter.remove(); if (!key.isValid()) continue; GridNioKeyAtt... | /**
* Processes keys selected by a selector.
*
* @param keys Selected keys.
* @throws ClosedByInterruptException If this thread was interrupted while reading data.
*/ | Processes keys selected by a selector | processSelectedKeys | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java",
"license": "apache-2.0",
"size": 144624
} | [
"java.nio.channels.ClosedByInterruptException",
"java.nio.channels.SelectionKey",
"java.util.Iterator",
"java.util.Set",
"org.apache.ignite.internal.IgniteInterruptedCheckedException",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import java.nio.channels.ClosedByInterruptException; import java.nio.channels.SelectionKey; import java.util.Iterator; import java.util.Set; import org.apache.ignite.internal.IgniteInterruptedCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; | import java.nio.channels.*; import java.util.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"java.nio",
"java.util",
"org.apache.ignite"
] | java.nio; java.util; org.apache.ignite; | 1,543,978 |
public FileDescriptor getFileDescriptor() throws IOException {
if (mFd == null) {
throw new IOException("socket not created");
}
return mFd;
} | FileDescriptor function() throws IOException { if (mFd == null) { throw new IOException(STR); } return mFd; } | /**
* Returns the {@link java.io.FileDescriptor FileDescriptor} of the socket.
*
* @return the FileDescriptor
* @throws IOException
* when the socket has not been {@link #create() created}.
*/ | Returns the <code>java.io.FileDescriptor FileDescriptor</code> of the socket | getFileDescriptor | {
"repo_name": "esmasui/backport-android-bluetooth",
"path": "backport-android-bluetooth/resources/android/bluetooth/RfcommSocket.java",
"license": "apache-2.0",
"size": 23431
} | [
"java.io.FileDescriptor",
"java.io.IOException"
] | import java.io.FileDescriptor; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,691,005 |
@Override
public boolean isSQLRecoveryLog() {
if (tc.isDebugEnabled())
Tr.debug(tc, "isSQLRecoveryLog " + _isSQLRecoveryLog);
return _isSQLRecoveryLog;
} | boolean function() { if (tc.isDebugEnabled()) Tr.debug(tc, STR + _isSQLRecoveryLog); return _isSQLRecoveryLog; } | /**
* Is the Transaction Log hosted in a database?
*
* @return true if it is
*/ | Is the Transaction Log hosted in a database | isSQLRecoveryLog | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.transaction/src/com/ibm/ws/transaction/services/JTMConfigurationProvider.java",
"license": "epl-1.0",
"size": 29135
} | [
"com.ibm.websphere.ras.Tr"
] | import com.ibm.websphere.ras.Tr; | import com.ibm.websphere.ras.*; | [
"com.ibm.websphere"
] | com.ibm.websphere; | 2,028,191 |
@Override
protected SortedSet<Broker> brokersToBalance(ClusterModel clusterModel) {
return clusterModel.brokers();
} | SortedSet<Broker> function(ClusterModel clusterModel) { return clusterModel.brokers(); } | /**
* This is a hard goal; hence, the proposals are not limited to dead broker replicas in case of self-healing.
* Get brokers that the rebalance process will go over to apply balancing actions to replicas they contain.
*
* @param clusterModel The state of the cluster.
* @return A collection of brokers t... | This is a hard goal; hence, the proposals are not limited to dead broker replicas in case of self-healing. Get brokers that the rebalance process will go over to apply balancing actions to replicas they contain | brokersToBalance | {
"repo_name": "GergoHong/cruise-control",
"path": "cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/analyzer/goals/RackAwareGoal.java",
"license": "bsd-2-clause",
"size": 12545
} | [
"com.linkedin.kafka.cruisecontrol.model.Broker",
"com.linkedin.kafka.cruisecontrol.model.ClusterModel",
"java.util.SortedSet"
] | import com.linkedin.kafka.cruisecontrol.model.Broker; import com.linkedin.kafka.cruisecontrol.model.ClusterModel; import java.util.SortedSet; | import com.linkedin.kafka.cruisecontrol.model.*; import java.util.*; | [
"com.linkedin.kafka",
"java.util"
] | com.linkedin.kafka; java.util; | 1,035,916 |
public static Test suite() {
return new TestSuite(EdgeHistogramTest.class);
} | static Test function() { return new TestSuite(EdgeHistogramTest.class); } | /**
* Returns the test suite.
*
* @return the suite
*/ | Returns the test suite | suite | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-imaging/src/test/java/adams/data/lire/features/EdgeHistogramTest.java",
"license": "gpl-3.0",
"size": 2424
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 1,580,600 |
public String getColor() {
// Turn the color into an RGB value in hex.
Color bg = colorIcon.getColor();
// Lop off the alpha portion.
int rgb = bg.getRGB() & 0x00FFFFFF;
String hex = Integer.toHexString(rgb);
// Pad with zeros.
... | String function() { Color bg = colorIcon.getColor(); int rgb = bg.getRGB() & 0x00FFFFFF; String hex = Integer.toHexString(rgb); if (hex.length() < 6) { hex = zeros[5 - hex.length()].concat(hex); } return "0x" + hex; } } protected static class ColorIcon implements Icon { private Color ourColor; public ColorIcon() { ourC... | /**
* Returns the color this button represents, in the form of a
* hexadecimal RGB value.
*
* @return RGB value in hexadecimal.
*/ | Returns the color this button represents, in the form of a hexadecimal RGB value | getColor | {
"repo_name": "mbertacca/JSwat2",
"path": "classes/com/bluemarsh/jswat/action/PreferencesAction.java",
"license": "gpl-2.0",
"size": 47228
} | [
"java.awt.Color",
"javax.swing.Icon"
] | import java.awt.Color; import javax.swing.Icon; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 578,324 |
public Time getTime(String parameterName, Calendar cal)
throws SQLException
{
throw Util.notImplemented();
} | Time function(String parameterName, Calendar cal) throws SQLException { throw Util.notImplemented(); } | /**
* JDBC 3.0
*
* Retrieves the value of a JDBC TIME parameter as a java.sql.Time object,
* using the given Calendar object to construct the time object.
*
* @param parameterName - the name of the parameter
* @param cal - the Calendar object the driver will use to construct the time
* @... | JDBC 3.0 Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time object | getTime | {
"repo_name": "splicemachine/spliceengine",
"path": "db-engine/src/main/java/com/splicemachine/db/impl/jdbc/EmbedCallableStatement20.java",
"license": "agpl-3.0",
"size": 37363
} | [
"java.sql.SQLException",
"java.sql.Time",
"java.util.Calendar"
] | import java.sql.SQLException; import java.sql.Time; import java.util.Calendar; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 1,799,007 |
@Override()
@NotNull()
public String toString()
{
final StringBuilder buffer = new StringBuilder();
buffer.append("LDAPSearchConstraints(constraints=");
buffer.append(super.toString());
buffer.append(", batchSize=");
buffer.append(batchSize);
buffer.append(", derefPolicy=");
buffer.... | @Override() @NotNull() String function() { final StringBuilder buffer = new StringBuilder(); buffer.append(STR); buffer.append(super.toString()); buffer.append(STR); buffer.append(batchSize); buffer.append(STR); buffer.append(derefPolicy); buffer.append(STR); buffer.append(sizeLimit); buffer.append(STR); buffer.append(... | /**
* Retrieves a string representation of this search constraints object.
*
* @return A string representation of this search constraints object.
*/ | Retrieves a string representation of this search constraints object | toString | {
"repo_name": "UnboundID/ldapsdk",
"path": "src/com/unboundid/ldap/sdk/migrate/ldapjdk/LDAPSearchConstraints.java",
"license": "gpl-2.0",
"size": 11531
} | [
"com.unboundid.util.NotNull"
] | import com.unboundid.util.NotNull; | import com.unboundid.util.*; | [
"com.unboundid.util"
] | com.unboundid.util; | 1,787,560 |
@SuppressWarnings("unchecked")
private <T> Optional<T> getValue(Object object, Supplier<Object> method, Class<T> cls) {
T source = null;
if (cls.isInstance(method.get())) {
source = (T) method.get();
} else {
if (CoreParameters.DEVELOPER_MODE.get()) {
... | @SuppressWarnings(STR) <T> Optional<T> function(Object object, Supplier<Object> method, Class<T> cls) { T source = null; if (cls.isInstance(method.get())) { source = (T) method.get(); } else { if (CoreParameters.DEVELOPER_MODE.get()) { throw new CoreRuntimeException(STR + method.get() + STR + cls.toGenericString()); } ... | /**
* Gets the value.
*
* @param object the object
* @param method the method
* @param cls the cls
*
* @param <T> the generic type
*
* @return the value
*/ | Gets the value | getValue | {
"repo_name": "JRebirth/JRebirth",
"path": "org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractController.java",
"license": "apache-2.0",
"size": 14581
} | [
"java.util.Optional",
"java.util.function.Supplier",
"org.jrebirth.af.api.exception.CoreRuntimeException",
"org.jrebirth.af.core.resource.provided.parameter.CoreParameters"
] | import java.util.Optional; import java.util.function.Supplier; import org.jrebirth.af.api.exception.CoreRuntimeException; import org.jrebirth.af.core.resource.provided.parameter.CoreParameters; | import java.util.*; import java.util.function.*; import org.jrebirth.af.api.exception.*; import org.jrebirth.af.core.resource.provided.parameter.*; | [
"java.util",
"org.jrebirth.af"
] | java.util; org.jrebirth.af; | 2,367,607 |
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
{
if (player.capabilities.isCreativeMode)
{
BlockPos blockpos = pos.offset(((EnumFacing)state.getValue(FACING)).getOpposite());
Block block = worldIn.getBlockState(blockpos).... | void function(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player) { if (player.capabilities.isCreativeMode) { BlockPos blockpos = pos.offset(((EnumFacing)state.getValue(FACING)).getOpposite()); Block block = worldIn.getBlockState(blockpos).getBlock(); if (block == Blocks.PISTON block == Blocks.STICKY_P... | /**
* Called before the Block is set to air in the world. Called regardless of if the player's tool can actually
* collect this block
*/ | Called before the Block is set to air in the world. Called regardless of if the player's tool can actually collect this block | onBlockHarvested | {
"repo_name": "TheGreatAndPowerfulWeegee/wipunknown",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockPistonExtension.java",
"license": "gpl-3.0",
"size": 11977
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.init.Blocks",
"net.minecraft.util.EnumFacing",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.block.state.*; import net.minecraft.entity.player.*; import net.minecraft.init.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.init",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.entity; net.minecraft.init; net.minecraft.util; net.minecraft.world; | 280,666 |
@PublicEvolving
public WithWindow<T1, T2, KEY, W> evictor(Evictor<? super TaggedUnion<T1, T2>, ? super W> newEvictor) {
return new WithWindow<>(input1, input2, keySelector1, keySelector2, keyType,
windowAssigner, trigger, newEvictor, allowedLateness);
} | WithWindow<T1, T2, KEY, W> function(Evictor<? super TaggedUnion<T1, T2>, ? super W> newEvictor) { return new WithWindow<>(input1, input2, keySelector1, keySelector2, keyType, windowAssigner, trigger, newEvictor, allowedLateness); } | /**
* Sets the {@code Evictor} that should be used to evict elements from a window before
* emission.
*
* <p>Note: When using an evictor window performance will degrade significantly, since
* pre-aggregation of window results cannot be used.
*/ | Sets the Evictor that should be used to evict elements from a window before emission. Note: When using an evictor window performance will degrade significantly, since pre-aggregation of window results cannot be used | evictor | {
"repo_name": "xiaokuangkuang/kuangjingxiangmu",
"path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/CoGroupedStreams.java",
"license": "apache-2.0",
"size": 25398
} | [
"org.apache.flink.streaming.api.windowing.evictors.Evictor"
] | import org.apache.flink.streaming.api.windowing.evictors.Evictor; | import org.apache.flink.streaming.api.windowing.evictors.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,622,844 |
public MetaProperty<String> label() {
return label;
} | MetaProperty<String> function() { return label; } | /**
* The meta-property for the {@code label} property.
* @return the meta-property, not null
*/ | The meta-property for the label property | label | {
"repo_name": "OpenGamma/Strata",
"path": "modules/market/src/main/java/com/opengamma/strata/market/curve/node/CdsIndexIsdaCreditCurveNode.java",
"license": "apache-2.0",
"size": 30915
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 936,022 |
private void handleUpdateFeature(HashMap<String, Object> payload, Subscriber<Object> subscriber) {
String featureString = null;
try {
featureString = SCObjectMapper.getMapper().writeValueAsString(JsonUtilities.getHashMap(payload, "feature"));
} catch (JsonProcessingException e) {... | void function(HashMap<String, Object> payload, Subscriber<Object> subscriber) { String featureString = null; try { featureString = SCObjectMapper.getMapper().writeValueAsString(JsonUtilities.getHashMap(payload, STR)); } catch (JsonProcessingException e) { e.printStackTrace(); } SubscriberWrapper wrapper = new Subscribe... | /**
* Handles the {@link Actions#DATASERVICE_UPDATEFEATURE} command.
*/ | Handles the <code>Actions#DATASERVICE_UPDATEFEATURE</code> command | handleUpdateFeature | {
"repo_name": "marcusthebrown/spatialconnect-android-sdk",
"path": "spatialconnect/src/main/java/com/boundlessgeo/spatialconnect/jsbridge/SCJavascriptBridgeAPI.java",
"license": "apache-2.0",
"size": 23805
} | [
"com.boundlessgeo.spatialconnect.geometries.SCGeometryFactory",
"com.boundlessgeo.spatialconnect.geometries.SCSpatialFeature",
"com.boundlessgeo.spatialconnect.scutilities.Json",
"com.boundlessgeo.spatialconnect.stores.ISCSpatialStore",
"com.boundlessgeo.spatialconnect.stores.SCDataStore",
"com.boundlessg... | import com.boundlessgeo.spatialconnect.geometries.SCGeometryFactory; import com.boundlessgeo.spatialconnect.geometries.SCSpatialFeature; import com.boundlessgeo.spatialconnect.scutilities.Json; import com.boundlessgeo.spatialconnect.stores.ISCSpatialStore; import com.boundlessgeo.spatialconnect.stores.SCDataStore; impo... | import com.boundlessgeo.spatialconnect.geometries.*; import com.boundlessgeo.spatialconnect.scutilities.*; import com.boundlessgeo.spatialconnect.stores.*; import com.fasterxml.jackson.core.*; import java.io.*; import java.util.*; | [
"com.boundlessgeo.spatialconnect",
"com.fasterxml.jackson",
"java.io",
"java.util"
] | com.boundlessgeo.spatialconnect; com.fasterxml.jackson; java.io; java.util; | 1,666,631 |
public void setIsOnline(boolean isOnline) {
Log.d(LOG_TAG, "setIsOnline to " + isOnline);
mIsOnline = isOnline;
} | void function(boolean isOnline) { Log.d(LOG_TAG, STR + isOnline); mIsOnline = isOnline; } | /**
* Update the online status
*
* @param isOnline true if the client must be seen as online
*/ | Update the online status | setIsOnline | {
"repo_name": "matrix-org/matrix-android-sdk",
"path": "matrix-sdk/src/main/java/org/matrix/androidsdk/sync/EventsThread.java",
"license": "apache-2.0",
"size": 27337
} | [
"org.matrix.androidsdk.core.Log"
] | import org.matrix.androidsdk.core.Log; | import org.matrix.androidsdk.core.*; | [
"org.matrix.androidsdk"
] | org.matrix.androidsdk; | 784,514 |
public NodeList getDescendents(NodeFilter filter, boolean nestIntoMatchingNodes) {
final ArrayList<Node> al = new ArrayList<>();
synchronized (this.treeLock) {
extractDescendentsArrayImpl(filter, al, nestIntoMatchingNodes);
}
return new NodeListImpl(al);
} | NodeList function(NodeFilter filter, boolean nestIntoMatchingNodes) { final ArrayList<Node> al = new ArrayList<>(); synchronized (this.treeLock) { extractDescendentsArrayImpl(filter, al, nestIntoMatchingNodes); } return new NodeListImpl(al); } | /**
* Creates an NodeList of descendent nodes that the given filter
* condition.
*
* @param filter a {@link org.loboevolution.html.dom.NodeFilter} object.
* @param nestIntoMatchingNodes a boolean.
* @return a {@link org.w3c.dom.NodeList} object.
*/ | Creates an NodeList of descendent nodes that the given filter condition | getDescendents | {
"repo_name": "oswetto/LoboEvolution",
"path": "LoboHtml/src/main/java/org/loboevolution/html/dom/nodeimpl/NodeImpl.java",
"license": "gpl-3.0",
"size": 36603
} | [
"java.util.ArrayList",
"org.loboevolution.html.dom.NodeFilter",
"org.loboevolution.html.node.Node",
"org.loboevolution.html.node.NodeList"
] | import java.util.ArrayList; import org.loboevolution.html.dom.NodeFilter; import org.loboevolution.html.node.Node; import org.loboevolution.html.node.NodeList; | import java.util.*; import org.loboevolution.html.dom.*; import org.loboevolution.html.node.*; | [
"java.util",
"org.loboevolution.html"
] | java.util; org.loboevolution.html; | 2,588,940 |
private static void saveImage(ByteBuffer currentDirName,
INodeDirectory current,
DataOutputStream out,
long inodesTotal) throws IOException {
saveImage(currentDirName, current, out, inodesTotal, 0);
} | static void function(ByteBuffer currentDirName, INodeDirectory current, DataOutputStream out, long inodesTotal) throws IOException { saveImage(currentDirName, current, out, inodesTotal, 0); } | /**
* Save file tree image starting from the given root.
* This is a recursive procedure, which first saves all children of
* a current directory and then moves inside the sub-directories.
*/ | Save file tree image starting from the given root. This is a recursive procedure, which first saves all children of a current directory and then moves inside the sub-directories | saveImage | {
"repo_name": "rvadali/fb-raid-refactoring",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java",
"license": "apache-2.0",
"size": 83874
} | [
"java.io.DataOutputStream",
"java.io.IOException",
"java.nio.ByteBuffer"
] | import java.io.DataOutputStream; import java.io.IOException; import java.nio.ByteBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,442,067 |
protected AssetGlpeSourceDetail createAssetGlpePostable(AssetTransferDocument document, Account plantAccount, AssetPayment assetPayment, boolean isSource, AmountCategory amountCategory) {
if (LOG.isDebugEnabled()) {
LOG.debug("Start - createAssetGlpePostable (" + document.getDocumentNumber() + "... | AssetGlpeSourceDetail function(AssetTransferDocument document, Account plantAccount, AssetPayment assetPayment, boolean isSource, AmountCategory amountCategory) { if (LOG.isDebugEnabled()) { LOG.debug(STR + document.getDocumentNumber() + "-" + plantAccount.getAccountNumber() + ")"); } AssetGlpeSourceDetail postable = n... | /**
* Creates an instance of AssetGlpeSourceDetail depending on the source flag
*
* @param universityDateService University Date Service
* @param plantAccount Plant account for the organization
* @param assetPayment Payment record for which postable is created
* @param isSource Indicates i... | Creates an instance of AssetGlpeSourceDetail depending on the source flag | createAssetGlpePostable | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/document/service/impl/AssetTransferServiceImpl.java",
"license": "agpl-3.0",
"size": 30285
} | [
"org.kuali.kfs.coa.businessobject.Account",
"org.kuali.kfs.coa.businessobject.ObjectCode",
"org.kuali.kfs.coa.businessobject.OffsetDefinition",
"org.kuali.kfs.coa.service.ObjectCodeService",
"org.kuali.kfs.coa.service.OffsetDefinitionService",
"org.kuali.kfs.module.cam.CamsConstants",
"org.kuali.kfs.mod... | import org.kuali.kfs.coa.businessobject.Account; import org.kuali.kfs.coa.businessobject.ObjectCode; import org.kuali.kfs.coa.businessobject.OffsetDefinition; import org.kuali.kfs.coa.service.ObjectCodeService; import org.kuali.kfs.coa.service.OffsetDefinitionService; import org.kuali.kfs.module.cam.CamsConstants; impo... | import org.kuali.kfs.coa.businessobject.*; import org.kuali.kfs.coa.service.*; import org.kuali.kfs.module.cam.*; import org.kuali.kfs.module.cam.businessobject.*; import org.kuali.kfs.module.cam.document.*; import org.kuali.kfs.sys.context.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,888,811 |
private Locale checkLocale( final Locale inLocale) {
final Set<Locale> alreadyUsed = Sets.newHashSet();
Locale localeToTry = inLocale;
synchronized (_locale_locker) {
while (true) {
if (localeDataHash.getIfPresent(localeToTry) != null) {
retur... | Locale function( final Locale inLocale) { final Set<Locale> alreadyUsed = Sets.newHashSet(); Locale localeToTry = inLocale; synchronized (_locale_locker) { while (true) { if (localeDataHash.getIfPresent(localeToTry) != null) { return localeToTry; } else { try { cacheBundleLocaleIfNecessary(localeToTry); return localeTo... | /**
* Check to see if the PropertyResourceBundle for this Locale has been loaded.
* @param inLocale
* @return
*/ | Check to see if the PropertyResourceBundle for this Locale has been loaded | checkLocale | {
"repo_name": "poblish/resourceBundleStore",
"path": "src/main/java/com/hiatus/rez/ResourceBundleStore.java",
"license": "apache-2.0",
"size": 7430
} | [
"com.google.common.collect.Sets",
"java.util.Locale",
"java.util.MissingResourceException",
"java.util.Set"
] | import com.google.common.collect.Sets; import java.util.Locale; import java.util.MissingResourceException; import java.util.Set; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,466,736 |
@Override
public ResultSubpartitionView createSubpartitionView(int index, BufferAvailabilityListener availabilityListener) throws IOException {
checkElementIndex(index, subpartitions.length, "Subpartition not found.");
checkState(!isReleased.get(), "Partition released.");
ResultSubpartitionView readView = su... | ResultSubpartitionView function(int index, BufferAvailabilityListener availabilityListener) throws IOException { checkElementIndex(index, subpartitions.length, STR); checkState(!isReleased.get(), STR); ResultSubpartitionView readView = subpartitions[index].createReadView(availabilityListener); LOG.debug(STR, readView);... | /**
* Returns the requested subpartition.
*/ | Returns the requested subpartition | createSubpartitionView | {
"repo_name": "darionyaphet/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java",
"license": "apache-2.0",
"size": 11505
} | [
"java.io.IOException",
"org.apache.flink.util.Preconditions"
] | import java.io.IOException; import org.apache.flink.util.Preconditions; | import java.io.*; import org.apache.flink.util.*; | [
"java.io",
"org.apache.flink"
] | java.io; org.apache.flink; | 2,739,230 |
@Test
public void payProgramProgressUserPayProgramTest() throws Exception {
PayProgram payProgram = payProgramService.findByPayProgramIds(program.getId(), feeProgram.getId());
// Assert no pay
assertTrue(payProgram.getState().equals(states.NO_PAY));
mockMvc.perform(post("/userPayments/payProgram/" + payPr... | void function() throws Exception { PayProgram payProgram = payProgramService.findByPayProgramIds(program.getId(), feeProgram.getId()); assertTrue(payProgram.getState().equals(states.NO_PAY)); mockMvc.perform(post(STR + payProgram.getId()).locale(Locale.ENGLISH).session(defaultSession) .sessionAttr("_csrf", "csrf").para... | /**
* Pay user pay inscription test.
*
* @throws Exception the exception
*/ | Pay user pay inscription test | payProgramProgressUserPayProgramTest | {
"repo_name": "pablogrela/members_cuacfm",
"path": "src/test/java/org/cuacfm/members/test/web/userpayments/UserPaymentsTest.java",
"license": "apache-2.0",
"size": 23169
} | [
"java.util.Locale",
"org.cuacfm.members.model.payprogram.PayProgram",
"org.junit.Assert"
] | import java.util.Locale; import org.cuacfm.members.model.payprogram.PayProgram; import org.junit.Assert; | import java.util.*; import org.cuacfm.members.model.payprogram.*; import org.junit.*; | [
"java.util",
"org.cuacfm.members",
"org.junit"
] | java.util; org.cuacfm.members; org.junit; | 421,723 |
public LiveEventInput input() {
return this.input;
} | LiveEventInput function() { return this.input; } | /**
* Get the Live Event input.
*
* @return the input value
*/ | Get the Live Event input | input | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "mediaservices/resource-manager/v2018_30_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_30_30_preview/implementation/LiveEventInner.java",
"license": "mit",
"size": 7396
} | [
"com.microsoft.azure.management.mediaservices.v2018_30_30_preview.LiveEventInput"
] | import com.microsoft.azure.management.mediaservices.v2018_30_30_preview.LiveEventInput; | import com.microsoft.azure.management.mediaservices.v2018_30_30_preview.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,723,994 |
private IgniteConfiguration configuration(int idx) throws Exception {
CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);
ccfg.setName(CACHE_NAME);
ccfg.setCacheMode(cacheMode());
ccfg.setAtomicityMode(atomicityMode());
ccfg.setRebalanceMode(SYNC);
... | IgniteConfiguration function(int idx) throws Exception { CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setName(CACHE_NAME); ccfg.setCacheMode(cacheMode()); ccfg.setAtomicityMode(atomicityMode()); ccfg.setRebalanceMode(SYNC); ccfg.setWriteSynchronizationMode(FULL_SYNC); ccfg.setEvictionPolic... | /**
* Node configuration.
*
* @param idx Node index.
* @return Node configuration.
* @throws Exception If failed.
*/ | Node configuration | configuration | {
"repo_name": "nizhikov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java",
"license": "apache-2.0",
"size": 18679
} | [
"org.apache.ignite.configuration.CacheConfiguration",
"org.apache.ignite.configuration.IgniteConfiguration",
"org.apache.ignite.configuration.NearCacheConfiguration"
] | import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; | import org.apache.ignite.configuration.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 376,387 |
IdentifierWrapper wrapper = IdentifierHelper.identifier(identifier);
String type = wrapper.getValueForXpathExpressionOrElse("@"
+ IfmapStrings.IDENTITY_ATTR_TYPE, "type"); // type
if (type.equals("other")) {
return true;
} else {
return false;
}
} | IdentifierWrapper wrapper = IdentifierHelper.identifier(identifier); String type = wrapper.getValueForXpathExpressionOrElse("@" + IfmapStrings.IDENTITY_ATTR_TYPE, "type"); if (type.equals("other")) { return true; } else { return false; } } | /**
* Checks whether a given {@link Identifier} is an extended identifier or not.
* Searches for the <i>type</i> attribute and checks if it is <i>other</i> or not.
*
* @param identifier
* the {@link Identifier} oject
* @return true if the {@link Identifier} object is an extended identifier
*/ | Checks whether a given <code>Identifier</code> is an extended identifier or not. Searches for the type attribute and checks if it is other or not | isExtendedIdentifier | {
"repo_name": "trustathsh/visitmeta",
"path": "visualization/src/main/java/de/hshannover/f4/trust/visitmeta/util/ExtendedIdentifierHelper.java",
"license": "apache-2.0",
"size": 3974
} | [
"de.hshannover.f4.trust.visitmeta.IfmapStrings"
] | import de.hshannover.f4.trust.visitmeta.IfmapStrings; | import de.hshannover.f4.trust.visitmeta.*; | [
"de.hshannover.f4"
] | de.hshannover.f4; | 1,021,230 |
public void filterByFullText(List<String> terms);
| void function(List<String> terms); | /**
* Filters the nodes by name and description.
*
* @param terms The collection of terms to handle.
*/ | Filters the nodes by name and description | filterByFullText | {
"repo_name": "chris-allan/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowser.java",
"license": "gpl-2.0",
"size": 24081
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 950,917 |
EAttribute getClassBinding_To(); | EAttribute getClassBinding_To(); | /**
* Returns the meta object for the attribute '{@link fr.inria.diverse.melange.metamodel.melange.ClassBinding#getTo <em>To</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>To</em>'.
* @see fr.inria.diverse.melange.metamodel.melange.ClassBinding#getTo... | Returns the meta object for the attribute '<code>fr.inria.diverse.melange.metamodel.melange.ClassBinding#getTo To</code>'. | getClassBinding_To | {
"repo_name": "diverse-project/melange",
"path": "plugins/fr.inria.diverse.melange.metamodel/src/main/java/fr/inria/diverse/melange/metamodel/melange/MelangePackage.java",
"license": "epl-1.0",
"size": 113615
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 359,557 |
public static CapFloorInflationYearOnYearMonthlyDefinition from(final ZonedDateTime accrualStartDate, final ZonedDateTime paymentDate, final double notional,
final IndexPrice priceIndex, final int conventionalMonthLag, final int monthLag, final ZonedDateTime lastKnownFixingDate, final double strike, final boole... | static CapFloorInflationYearOnYearMonthlyDefinition function(final ZonedDateTime accrualStartDate, final ZonedDateTime paymentDate, final double notional, final IndexPrice priceIndex, final int conventionalMonthLag, final int monthLag, final ZonedDateTime lastKnownFixingDate, final double strike, final boolean isCap) {... | /**
* Builder for inflation Year on Yearn based on an inflation lag and index publication. The fixing date is the publication lag after the last reference month.
* @param accrualStartDate Start date of the accrual period.
* @param paymentDate The payment date.
* @param notional Coupon notional.
* @param ... | Builder for inflation Year on Yearn based on an inflation lag and index publication. The fixing date is the publication lag after the last reference month | from | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/inflation/CapFloorInflationYearOnYearMonthlyDefinition.java",
"license": "apache-2.0",
"size": 16874
} | [
"com.opengamma.analytics.financial.instrument.index.IndexPrice",
"org.threeten.bp.ZonedDateTime",
"org.threeten.bp.temporal.TemporalAdjusters"
] | import com.opengamma.analytics.financial.instrument.index.IndexPrice; import org.threeten.bp.ZonedDateTime; import org.threeten.bp.temporal.TemporalAdjusters; | import com.opengamma.analytics.financial.instrument.index.*; import org.threeten.bp.*; import org.threeten.bp.temporal.*; | [
"com.opengamma.analytics",
"org.threeten.bp"
] | com.opengamma.analytics; org.threeten.bp; | 1,667,540 |
@Message(id = 30, value = "Interrupted waiting for result from host %s")
String interruptedAwaitingResultFromHost(String name);
// Disabled as part of WFCORE-378
// @Message(id = 31, value = "Exception getting result from host %s: %s")
// String exceptionAwaitingResultFromHost(String name, Strin... | @Message(id = 30, value = STR) String interruptedAwaitingResultFromHost(String name); | /**
* A message indicating an interruption waiting for the result from host.
*
* @param name the name of the host.
*
* @return the message.
*/ | A message indicating an interruption waiting for the result from host | interruptedAwaitingResultFromHost | {
"repo_name": "jamezp/wildfly-core",
"path": "host-controller/src/main/java/org/jboss/as/domain/controller/logging/DomainControllerLogger.java",
"license": "lgpl-2.1",
"size": 34982
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 468,274 |
OffsetDateTime endTime(); | OffsetDateTime endTime(); | /**
* Gets the endTime property: Observation end time.
*
* @return the endTime value.
*/ | Gets the endTime property: Observation end time | endTime | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/models/QueryStatistic.java",
"license": "mit",
"size": 2612
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 247,667 |
@Test
public void testApproximateNumericLiteral()
{
try
{
receiver = receiverSession.createReceiver(receiverQueue, "average = +6.2");
receiver = receiverSession.createReceiver(receiverQueue, "average = -95.7");
receiver = receiverSession.createReceiver(receiverQueue, "ave... | void function() { try { receiver = receiverSession.createReceiver(receiverQueue, STR); receiver = receiverSession.createReceiver(receiverQueue, STR); receiver = receiverSession.createReceiver(receiverQueue, STR); } catch (JMSException e) { fail(e); } } | /**
* Test diffent syntax for approximate numeric literal (+6.2, -95.7, 7.)
*/ | Test diffent syntax for approximate numeric literal (+6.2, -95.7, 7.) | testApproximateNumericLiteral | {
"repo_name": "jbertram/activemq-artemis-old",
"path": "tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/selector/SelectorSyntaxTest.java",
"license": "apache-2.0",
"size": 11466
} | [
"javax.jms.JMSException"
] | import javax.jms.JMSException; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 153,107 |
private void createSampledDomainOrder(ListOf<SampledVolume> losv){
int numDom = (int) losv.size();
List<Double> sampleList = new ArrayList<Double>();
for(int i = 0; i < numDom ; i++){
sampleList.add(losv.get(i).getSampledValue());
}
Collections.sort(sampleList);
for(int i = 0; i < numDom ; i++){
fo... | void function(ListOf<SampledVolume> losv){ int numDom = (int) losv.size(); List<Double> sampleList = new ArrayList<Double>(); for(int i = 0; i < numDom ; i++){ sampleList.add(losv.get(i).getSampledValue()); } Collections.sort(sampleList); for(int i = 0; i < numDom ; i++){ for(int j = 0 ; j < numDom ; j++){ SampledVolum... | /**
* Creates the sampled domain order.
*
* @param losv the list of SampledVolume
*/ | Creates the sampled domain order | createSampledDomainOrder | {
"repo_name": "spatialsimulator/XitoSBML",
"path": "src/main/java/jp/ac/keio/bio/fun/xitosbml/visual/DomainStruct.java",
"license": "apache-2.0",
"size": 6677
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.sbml.jsbml.ListOf",
"org.sbml.jsbml.ext.spatial.SampledVolume"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.sbml.jsbml.ListOf; import org.sbml.jsbml.ext.spatial.SampledVolume; | import java.util.*; import org.sbml.jsbml.*; import org.sbml.jsbml.ext.spatial.*; | [
"java.util",
"org.sbml.jsbml"
] | java.util; org.sbml.jsbml; | 574,833 |
Console.getConsole().sendMessage("§c" + message);
} | Console.getConsole().sendMessage("§c" + message); } | /**
* Prints the message in the console
*/ | Prints the message in the console | print | {
"repo_name": "iAmGio/jrfl",
"path": "src/eu/iamgio/jrfl/exceptions/JrflException.java",
"license": "apache-2.0",
"size": 502
} | [
"eu.iamgio.jrfl.Console"
] | import eu.iamgio.jrfl.Console; | import eu.iamgio.jrfl.*; | [
"eu.iamgio.jrfl"
] | eu.iamgio.jrfl; | 1,393,140 |
@FIXVersion(introduced="4.2")
@TagNumRef(tagNum=TagNum.SolicitedFlag)
public void setSolicitedFlag(Boolean solicitedFlag) {
this.solicitedFlag = solicitedFlag;
} | @FIXVersion(introduced="4.2") @TagNumRef(tagNum=TagNum.SolicitedFlag) void function(Boolean solicitedFlag) { this.solicitedFlag = solicitedFlag; } | /**
* Message field setter.
* @param solicitedFlag field value
*/ | Message field setter | setSolicitedFlag | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/OrderModificationRequestMsg.java",
"license": "gpl-3.0",
"size": 149491
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,390,245 |
private void checkClientReconnect(final boolean restartCache) throws Exception {
// Start complex topology.
final Ignite srv = ignitionStart(serverConfiguration(1));
ignitionStart(serverConfiguration(2));
ignitionStart(serverConfiguration(3, true));
final Ignite cli = igniti... | void function(final boolean restartCache) throws Exception { final Ignite srv = ignitionStart(serverConfiguration(1)); ignitionStart(serverConfiguration(2)); ignitionStart(serverConfiguration(3, true)); final Ignite cli = ignitionStart(clientConfiguration(4)); createSqlCache(cli); | /**
* Make sure that client receives schema changes made while it was disconnected, optionally with cache restart
* in the interim.
*
* @param restartCache Whether cache needs to be recreated during client's absence.
* @throws Exception If failed.
*/ | Make sure that client receives schema changes made while it was disconnected, optionally with cache restart in the interim | checkClientReconnect | {
"repo_name": "WilliamDo/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractConcurrentSelfTest.java",
"license": "apache-2.0",
"size": 37150
} | [
"org.apache.ignite.Ignite"
] | import org.apache.ignite.Ignite; | import org.apache.ignite.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,815,488 |
protected void launchTasks(List<LaunchableTask> tasks) {
// Group the tasks by offer
Map<Protos.Offer, List<LaunchableTask>> tasksGroupByOffer = new HashMap<>();
for (LaunchableTask task : tasks) {
List<LaunchableTask> subTasks = tasksGroupByOffer.get(task.offer);
if (subTasks == null) {
... | void function(List<LaunchableTask> tasks) { Map<Protos.Offer, List<LaunchableTask>> tasksGroupByOffer = new HashMap<>(); for (LaunchableTask task : tasks) { List<LaunchableTask> subTasks = tasksGroupByOffer.get(task.offer); if (subTasks == null) { subTasks = new LinkedList<>(); } subTasks.add(task); tasksGroupByOffer.p... | /**
* Launch tasks
*
* @param tasks list of LaunchableTask
*/ | Launch tasks | launchTasks | {
"repo_name": "mycFelix/heron",
"path": "heron/schedulers/src/java/org/apache/heron/scheduler/mesos/framework/MesosFramework.java",
"license": "apache-2.0",
"size": 18295
} | [
"java.util.Arrays",
"java.util.HashMap",
"java.util.LinkedList",
"java.util.List",
"java.util.Map",
"org.apache.mesos.Protos"
] | import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.apache.mesos.Protos; | import java.util.*; import org.apache.mesos.*; | [
"java.util",
"org.apache.mesos"
] | java.util; org.apache.mesos; | 2,515,596 |
@Test
public void shouldThrownAccessExceptionWhenInnerMethodCallThrowsIt()
throws Exception {
// p4ic4idea: use a public, non-abstract class with default constructor
expectedThrowsExceptions(AccessException.AccessExceptionForTests.class, Access... | void function() throws Exception { expectedThrowsExceptions(AccessException.AccessExceptionForTests.class, AccessException.class); } | /**
* Expected throws <code>ConnectioAccessExceptionnException</code> when inner method call throws it
*
* @throws Exception
*/ | Expected throws <code>ConnectioAccessExceptionnException</code> when inner method call throws it | shouldThrownAccessExceptionWhenInnerMethodCallThrowsIt | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/src/test/java/com/perforce/p4java/impl/mapbased/server/cmd/ReviewsDelegatorTest.java",
"license": "apache-2.0",
"size": 10887
} | [
"com.perforce.p4java.exception.AccessException"
] | import com.perforce.p4java.exception.AccessException; | import com.perforce.p4java.exception.*; | [
"com.perforce.p4java"
] | com.perforce.p4java; | 1,760,447 |
public static MozuClient<List<String>> getAvailablePaymentActionsForReturnClient(String returnId, String paymentId) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.ReturnUrl.getAvailablePaymentActionsForReturnUrl(paymentId, returnId);
String verb = "GET";
Class<?> clz = new ArrayList<String>(){}.g... | static MozuClient<List<String>> function(String returnId, String paymentId) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.ReturnUrl.getAvailablePaymentActionsForReturnUrl(paymentId, returnId); String verb = "GET"; Class<?> clz = new ArrayList<String>(){}.getClass(); MozuClient<List<String>> mozuClient = (... | /**
* Retrieves a list of the payment actions available to perform for the specified return when a return results in a refund to the customer.
* <p><pre><code>
* MozuClient<List<String>> mozuClient=GetAvailablePaymentActionsForReturnClient( returnId, paymentId);
* client.setBaseAddress(url);
* client.execute... | Retrieves a list of the payment actions available to perform for the specified return when a return results in a refund to the customer. <code><code> MozuClient> mozuClient=GetAvailablePaymentActionsForReturnClient( returnId, paymentId); client.setBaseAddress(url); client.executeRequest(); string string = client.Result... | getAvailablePaymentActionsForReturnClient | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/ReturnClient.java",
"license": "mit",
"size": 38313
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl",
"java.util.ArrayList",
"java.util.List"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; import java.util.ArrayList; import java.util.List; | import com.mozu.api.*; import java.util.*; | [
"com.mozu.api",
"java.util"
] | com.mozu.api; java.util; | 715,250 |
private RadioGroup createDefaultRadioGroup() {
RadioGroup radioGroup = new RadioGroup(mContext);
RadioGroup.LayoutParams params = new RadioGroup.LayoutParams(
RadioGroup.LayoutParams.WRAP_CONTENT, RadioGroup.LayoutParams.WRAP_CONTENT);
RadioButton choice0 = new RadioButton(m... | RadioGroup function() { RadioGroup radioGroup = new RadioGroup(mContext); RadioGroup.LayoutParams params = new RadioGroup.LayoutParams( RadioGroup.LayoutParams.WRAP_CONTENT, RadioGroup.LayoutParams.WRAP_CONTENT); RadioButton choice0 = new RadioButton(mContext); choice0.setText(STR); choice0.setId(BUTTON_ID_0); radioGro... | /**
* Initialises the group with 4 RadioButtons which IDs are
* BUTTON_ID_0, BUTTON_ID_1, BUTTON_ID_2, BUTTON_ID_3.
*/ | Initialises the group with 4 RadioButtons which IDs are BUTTON_ID_0, BUTTON_ID_1, BUTTON_ID_2, BUTTON_ID_3 | createDefaultRadioGroup | {
"repo_name": "wiki2014/Learning-Summary",
"path": "alps/cts/tests/tests/widget/src/android/widget/cts/RadioGroupTest.java",
"license": "gpl-3.0",
"size": 22084
} | [
"android.widget.RadioButton",
"android.widget.RadioGroup"
] | import android.widget.RadioButton; import android.widget.RadioGroup; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,874,190 |
private ScheduledFuture schedulePeriodical(Runnable runnable,
ScheduledExecutorService service) {
return service.scheduleWithFixedDelay(
runnable, getDelay().getValue(), getPeriod().getValue(),
TimeUnit.MILLISECONDS);
} | ScheduledFuture function(Runnable runnable, ScheduledExecutorService service) { return service.scheduleWithFixedDelay( runnable, getDelay().getValue(), getPeriod().getValue(), TimeUnit.MILLISECONDS); } | /**
* Schedules periodical task.
* @param runnable runnable to schedule
* @param service service used to schedule
* @return scheduled future
*/ | Schedules periodical task | schedulePeriodical | {
"repo_name": "GeoinformationSystems/GeoprocessingAppstore",
"path": "src/com/esri/gpt/framework/scheduler/ThreadDefinition.java",
"license": "apache-2.0",
"size": 7682
} | [
"java.util.concurrent.ScheduledExecutorService",
"java.util.concurrent.ScheduledFuture",
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 991,223 |
public void createModel() {
URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter());
Exception exception = null;
Resource resource = null;
try {
// Load the resource through the editing domain.
//
resource = editingDomain.getResourceSet().getRes... | void function() { URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); Exception exception = null; Resource resource = null; try { resource = editingDomain.getResourceSet().getResource(resourceURI, true); } catch (Exception e) { exception = e; resource = editingDomain... | /**
* This is the method called to load a resource into the editing domain's resource set based on the editor's input.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This is the method called to load a resource into the editing domain's resource set based on the editor's input. | createModel | {
"repo_name": "nsantos2014/mongopadplusplus",
"path": "org.github.mongopadplusplus.editor/src/main/java/org/github/mongopadplusplus/presentation/MongoPadPPEditor.java",
"license": "apache-2.0",
"size": 52004
} | [
"org.eclipse.emf.common.util.Diagnostic",
"org.eclipse.emf.ecore.resource.Resource",
"org.eclipse.emf.edit.ui.util.EditUIUtil"
] | import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.ui.util.EditUIUtil; | import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.edit.ui.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 967,274 |
public DateHolder setBeginOfWeek()
{
calendar.set(Calendar.DAY_OF_WEEK, getFirstDayOfWeek());
setBeginOfDay();
return this;
} | DateHolder function() { calendar.set(Calendar.DAY_OF_WEEK, getFirstDayOfWeek()); setBeginOfDay(); return this; } | /**
* Sets the date to the beginning of the week (first day of week) and calls setBeginOfDay.
* @see #setBeginOfDay()
*/ | Sets the date to the beginning of the week (first day of week) and calls setBeginOfDay | setBeginOfWeek | {
"repo_name": "micromata/projectforge-webapp",
"path": "src/main/java/org/projectforge/common/DateHolder.java",
"license": "gpl-3.0",
"size": 21653
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 655,288 |
public void increaseLevel(int nodeId, int endpoint) {
ZWaveNode node = this.getNode(nodeId);
SerialMessage serialMessage = null;
ZWaveMultiLevelSwitchCommandClass zwaveCommandClass = (ZWaveMultiLevelSwitchCommandClass)node.resolveCommandClass(CommandClass.SWITCH_MULTILEVEL, endpoint);
if (zwaveCommandC... | void function(int nodeId, int endpoint) { ZWaveNode node = this.getNode(nodeId); SerialMessage serialMessage = null; ZWaveMultiLevelSwitchCommandClass zwaveCommandClass = (ZWaveMultiLevelSwitchCommandClass)node.resolveCommandClass(CommandClass.SWITCH_MULTILEVEL, endpoint); if (zwaveCommandClass == null) { logger.error(... | /**
* increase level on the node / endpoint. The level is
* increased. Only dimmers support this.
* @param nodeId the node id to increase the level for.
* @param endpoint the endpoint to increase the level for.
*/ | increase level on the node / endpoint. The level is increased. Only dimmers support this | increaseLevel | {
"repo_name": "noushadali/openhab",
"path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java",
"license": "gpl-3.0",
"size": 53107
} | [
"org.openhab.binding.zwave.internal.commandclass.ZWaveCommandClass",
"org.openhab.binding.zwave.internal.commandclass.ZWaveMultiLevelSwitchCommandClass",
"org.openhab.binding.zwave.internal.protocol.ZWaveEvent"
] | import org.openhab.binding.zwave.internal.commandclass.ZWaveCommandClass; import org.openhab.binding.zwave.internal.commandclass.ZWaveMultiLevelSwitchCommandClass; import org.openhab.binding.zwave.internal.protocol.ZWaveEvent; | import org.openhab.binding.zwave.internal.commandclass.*; import org.openhab.binding.zwave.internal.protocol.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 82,611 |
RestBindingJaxbDataFormatFactory getRestBindingJaxbDataFormatFactory(); | RestBindingJaxbDataFormatFactory getRestBindingJaxbDataFormatFactory(); | /**
* Gets the {@link RestBindingJaxbDataFormatFactory} to be used.
*/ | Gets the <code>RestBindingJaxbDataFormatFactory</code> to be used | getRestBindingJaxbDataFormatFactory | {
"repo_name": "nikhilvibhav/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java",
"license": "apache-2.0",
"size": 27051
} | [
"org.apache.camel.spi.RestBindingJaxbDataFormatFactory"
] | import org.apache.camel.spi.RestBindingJaxbDataFormatFactory; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,354,586 |
public ConstantAction getCreateSequenceConstantAction
(
TableName sequenceName,
DataTypeDescriptor dataType,
long initialValue,
long stepValue,
long maxValue,
long minValue,
boolean cycle
)
{
... | ConstantAction function ( TableName sequenceName, DataTypeDescriptor dataType, long initialValue, long stepValue, long maxValue, long minValue, boolean cycle ) { return new CreateSequenceConstantAction(sequenceName.getSchemaName(), sequenceName.getTableName(), dataType, initialValue, stepValue, maxValue, minValue, cycl... | /**
* Make the ConstantAction for a CREATE SEQUENCE statement.
*
* @param sequenceName Name of sequence.
* @param dataType
* @param initialValue
* @param stepValue
* @param maxValue
* @param minValue
* @param cycle
*/ | Make the ConstantAction for a CREATE SEQUENCE statement | getCreateSequenceConstantAction | {
"repo_name": "scnakandala/derby",
"path": "java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java",
"license": "apache-2.0",
"size": 40467
} | [
"org.apache.derby.iapi.sql.execute.ConstantAction",
"org.apache.derby.iapi.types.DataTypeDescriptor",
"org.apache.derby.impl.sql.compile.TableName"
] | import org.apache.derby.iapi.sql.execute.ConstantAction; import org.apache.derby.iapi.types.DataTypeDescriptor; import org.apache.derby.impl.sql.compile.TableName; | import org.apache.derby.iapi.sql.execute.*; import org.apache.derby.iapi.types.*; import org.apache.derby.impl.sql.compile.*; | [
"org.apache.derby"
] | org.apache.derby; | 1,935,354 |
public ManagedCustomer getMcc(Long customerId) throws RemoteException {
ManagedCustomer mcc = getManagedCustomer(customerId);
if (mcc.getCanManageClients()) {
return mcc;
} else {
throw new UtilityLibraryException("Error: result empty for getMcc(Long customerId)");
}
} | ManagedCustomer function(Long customerId) throws RemoteException { ManagedCustomer mcc = getManagedCustomer(customerId); if (mcc.getCanManageClients()) { return mcc; } else { throw new UtilityLibraryException(STR); } } | /**
* Gets the (sub)MCCs for the ExtendedMcc for a list of customerIds.
*
* @param customerId the id of the MCC to retrieve
* @return a (sub) MCCs for the ExtendedMcc for the customerId
* @throws UtilityLibraryException if there is an error in the reflection call
* @throws RemoteException for communic... | Gets the (sub)MCCs for the ExtendedMcc for a list of customerIds | getMcc | {
"repo_name": "stoksey69/googleads-java-lib",
"path": "modules/adwords_axis_utility_extension/src/main/java/com/google/api/ads/adwords/axis/utility/extension/ExtendedMcc.java",
"license": "apache-2.0",
"size": 17408
} | [
"com.google.api.ads.adwords.axis.utility.extension.exception.UtilityLibraryException",
"com.google.api.ads.adwords.axis.v201506.mcm.ManagedCustomer",
"java.rmi.RemoteException"
] | import com.google.api.ads.adwords.axis.utility.extension.exception.UtilityLibraryException; import com.google.api.ads.adwords.axis.v201506.mcm.ManagedCustomer; import java.rmi.RemoteException; | import com.google.api.ads.adwords.axis.utility.extension.exception.*; import com.google.api.ads.adwords.axis.v201506.mcm.*; import java.rmi.*; | [
"com.google.api",
"java.rmi"
] | com.google.api; java.rmi; | 1,658,111 |
void setTransactionMode(TransactionMode transactionMode) throws SQLException; | void setTransactionMode(TransactionMode transactionMode) throws SQLException; | /**
* Sets the transaction mode to use for current transaction. This method may only be called when
* in a transaction, and before the transaction is actually started, i.e. before any statements
* have been executed in the transaction.
*
* @param transactionMode The transaction mode to use for the curren... | Sets the transaction mode to use for current transaction. This method may only be called when in a transaction, and before the transaction is actually started, i.e. before any statements have been executed in the transaction | setTransactionMode | {
"repo_name": "googleapis/java-spanner-jdbc",
"path": "src/main/java/com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection.java",
"license": "apache-2.0",
"size": 18317
} | [
"com.google.cloud.spanner.connection.TransactionMode",
"java.sql.SQLException"
] | import com.google.cloud.spanner.connection.TransactionMode; import java.sql.SQLException; | import com.google.cloud.spanner.connection.*; import java.sql.*; | [
"com.google.cloud",
"java.sql"
] | com.google.cloud; java.sql; | 833,897 |
@Override
public void attachToVLAN(String providerVpnId, String providerVlanId) throws CloudException, InternalException {
// TODO Auto-generated method stub
}
| void function(String providerVpnId, String providerVlanId) throws CloudException, InternalException { } | /**
* Vlan was created when the VPN created
*/ | Vlan was created when the VPN created | attachToVLAN | {
"repo_name": "jeffrey-yan/dasein-cloud-azure",
"path": "src/main/java/org/dasein/cloud/azure/network/AzureVPNSupport.java",
"license": "apache-2.0",
"size": 21778
} | [
"org.dasein.cloud.CloudException",
"org.dasein.cloud.InternalException"
] | import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException; | import org.dasein.cloud.*; | [
"org.dasein.cloud"
] | org.dasein.cloud; | 187,698 |
boolean deleteDir(Path dir) throws IOException {
IOException lastIOE = null;
int i = 0;
do {
try {
return fs.delete(dir, true);
} catch (IOException ioe) {
lastIOE = ioe;
if (!fs.exists(dir)) return true;
// dir is there, retry deleting after some time.
... | boolean deleteDir(Path dir) throws IOException { IOException lastIOE = null; int i = 0; do { try { return fs.delete(dir, true); } catch (IOException ioe) { lastIOE = ioe; if (!fs.exists(dir)) return true; try { sleepBeforeRetry(STR, i+1); } catch (InterruptedException e) { throw (InterruptedIOException)new InterruptedI... | /**
* Deletes a directory. Assumes the user has already checked for this directory existence.
* @param dir
* @return true if the directory is deleted.
* @throws IOException
*/ | Deletes a directory. Assumes the user has already checked for this directory existence | deleteDir | {
"repo_name": "HubSpot/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java",
"license": "apache-2.0",
"size": 49337
} | [
"java.io.IOException",
"java.io.InterruptedIOException",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import java.io.InterruptedIOException; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,207,400 |
static synchronized void schedule(
final ConnectionPool.Evictor task, final long delay, final long period) {
if (null == executor) {
executor = new ScheduledThreadPoolExecutor(1, new EvictorThreadFactory());
executor.setRemoveOnCancelPolicy(true);
}
final ... | static synchronized void schedule( final ConnectionPool.Evictor task, final long delay, final long period) { if (null == executor) { executor = new ScheduledThreadPoolExecutor(1, new EvictorThreadFactory()); executor.setRemoveOnCancelPolicy(true); } final ScheduledFuture<?> scheduledFuture = executor.scheduleWithFixedD... | /**
* Adds the specified eviction task to the timer. Tasks that are added with a
* call to this method *must* call {@link #cancel()} to cancel the
* task to prevent memory and/or thread leaks in application server
* environments.
*
* @param task Task to be scheduled.
* @param delay ... | Adds the specified eviction task to the timer. Tasks that are added with a call to this method *must* call <code>#cancel()</code> to cancel the task to prevent memory and/or thread leaks in application server environments | schedule | {
"repo_name": "actiontech/dble",
"path": "src/main/java/com/actiontech/dble/backend/pool/EvictionTimer.java",
"license": "gpl-2.0",
"size": 3618
} | [
"java.util.concurrent.ScheduledFuture",
"java.util.concurrent.ScheduledThreadPoolExecutor",
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.ScheduledFuture; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 453,994 |
@Override
public TextObject append(CharSequence text) {
if (maxTextLength>0 && stringBuilder.length()>=maxTextLength) return this;
text = textFilter.filter(text);
//unfortunately this code can't be put into a TextFilter because:
//1) the limit could not be detected early, a lot... | TextObject function(CharSequence text) { if (maxTextLength>0 && stringBuilder.length()>=maxTextLength) return this; text = textFilter.filter(text); char pre = stringBuilder.length()==0 ? 0 : stringBuilder.charAt(stringBuilder.length()-1); for (int i=0; i<text.length() && (maxTextLength==0 stringBuilder.length()<maxText... | /**
* Append the target text for language detection.
* If the total size of target text exceeds the limit size ,
* the rest is cut down.
*
* @param text the target text to append
*/ | Append the target text for language detection. If the total size of target text exceeds the limit size , the rest is cut down | append | {
"repo_name": "dignwei/language-detector",
"path": "src/main/java/com/optimaize/langdetect/text/TextObject.java",
"license": "apache-2.0",
"size": 4267
} | [
"com.cybozu.labs.langdetect.util.CharNormalizer"
] | import com.cybozu.labs.langdetect.util.CharNormalizer; | import com.cybozu.labs.langdetect.util.*; | [
"com.cybozu.labs"
] | com.cybozu.labs; | 1,019,901 |
@InterfaceAudience.Private
public static void setJobToken(Token<? extends TokenIdentifier> t,
Credentials credentials) {
credentials.addToken(JOB_TOKEN, t);
} | @InterfaceAudience.Private static void function(Token<? extends TokenIdentifier> t, Credentials credentials) { credentials.addToken(JOB_TOKEN, t); } | /**
* store job token
* @param t
*/ | store job token | setJobToken | {
"repo_name": "Bizyroth/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/security/TokenCache.java",
"license": "apache-2.0",
"size": 8295
} | [
"org.apache.hadoop.classification.InterfaceAudience",
"org.apache.hadoop.security.Credentials",
"org.apache.hadoop.security.token.Token",
"org.apache.hadoop.security.token.TokenIdentifier"
] | import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.security.Credentials; import org.apache.hadoop.security.token.Token; import org.apache.hadoop.security.token.TokenIdentifier; | import org.apache.hadoop.classification.*; import org.apache.hadoop.security.*; import org.apache.hadoop.security.token.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 882,871 |
// Satellite position
// ********************
CircularOrbit circ =
new CircularOrbit(7178000.0, 0.5e-4, -0.5e-4, FastMath.toRadians(50.), FastMath.toRadians(270.),
FastMath.toRadians(5.300), PositionAngle.MEAN,
Fr... | CircularOrbit circ = new CircularOrbit(7178000.0, 0.5e-4, -0.5e-4, FastMath.toRadians(50.), FastMath.toRadians(270.), FastMath.toRadians(5.300), PositionAngle.MEAN, FramesFactory.getEME2000(), date, mu); OneAxisEllipsoid earthShape = new OneAxisEllipsoid(6378136.460, 1 / 298.257222101, itrf); GeodeticPoint geoTargetITR... | /** Test if both constructors are equivalent
*/ | Test if both constructors are equivalent | testConstructors | {
"repo_name": "treeform/orekit",
"path": "src/test/java/org/orekit/attitudes/TargetPointingTest.java",
"license": "apache-2.0",
"size": 17819
} | [
"org.apache.commons.math3.geometry.euclidean.threed.Rotation",
"org.apache.commons.math3.geometry.euclidean.threed.Vector3D",
"org.apache.commons.math3.util.FastMath",
"org.junit.Assert",
"org.orekit.Utils",
"org.orekit.bodies.GeodeticPoint",
"org.orekit.bodies.OneAxisEllipsoid",
"org.orekit.frames.Fr... | import org.apache.commons.math3.geometry.euclidean.threed.Rotation; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.apache.commons.math3.util.FastMath; import org.junit.Assert; import org.orekit.Utils; import org.orekit.bodies.GeodeticPoint; import org.orekit.bodies.OneAxisEllipsoid; impo... | import org.apache.commons.math3.geometry.euclidean.threed.*; import org.apache.commons.math3.util.*; import org.junit.*; import org.orekit.*; import org.orekit.bodies.*; import org.orekit.frames.*; import org.orekit.orbits.*; | [
"org.apache.commons",
"org.junit",
"org.orekit",
"org.orekit.bodies",
"org.orekit.frames",
"org.orekit.orbits"
] | org.apache.commons; org.junit; org.orekit; org.orekit.bodies; org.orekit.frames; org.orekit.orbits; | 1,878,987 |
private boolean checkServiceActivation(Class<?> serviceClass) {
ActivityManager manager = (ActivityManager) this.getSystemService(Context
.ACTIVITY_SERVICE);
assert manager != null;
for (ActivityManager.RunningServiceInfo service :
manager.getRunningServices(I... | boolean function(Class<?> serviceClass) { ActivityManager manager = (ActivityManager) this.getSystemService(Context .ACTIVITY_SERVICE); assert manager != null; for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) { if (serviceClass.getName().equals(service.service.getClassNam... | /**
* Check whether the {@link #startBinderService(Class)} has been loaded before
*
* @param serviceClass Specific class to check whether activated
* @return True, the specified class is active
*/ | Check whether the <code>#startBinderService(Class)</code> has been loaded before | checkServiceActivation | {
"repo_name": "nicholaschum/substratum",
"path": "app/src/main/java/projekt/substratum/Substratum.java",
"license": "gpl-3.0",
"size": 16465
} | [
"android.app.ActivityManager",
"android.content.Context"
] | import android.app.ActivityManager; import android.content.Context; | import android.app.*; import android.content.*; | [
"android.app",
"android.content"
] | android.app; android.content; | 1,071,161 |
public long getTxnAbortId() {
return ((TxnAbort) targetLogEntry.getMainItem()).getId();
} | long function() { return ((TxnAbort) targetLogEntry.getMainItem()).getId(); } | /**
* Get the last txn abort id seen by the reader.
*/ | Get the last txn abort id seen by the reader | getTxnAbortId | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/je-3.2.74/src/com/sleepycat/je/log/LNFileReader.java",
"license": "gpl-2.0",
"size": 6202
} | [
"com.sleepycat.je.txn.TxnAbort"
] | import com.sleepycat.je.txn.TxnAbort; | import com.sleepycat.je.txn.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 2,383,046 |
// @Test
public void storeAllExtensionsPronom() throws FfmaClientException {
log.info("retrieve preservation LOD preservation rich data from LOD repositories and store it in database.");
String report = preservationRiskmanagementLodAnalysis
.storeAllExtensions(
"Pronom", true,
true);
log... | log.info(STR); String report = preservationRiskmanagementLodAnalysis .storeAllExtensions( STR, true, true); log.info(STR + report); assertNotNull(STR, report); } | /**
* In this test Pronom repository is tested with overwriting collections in database.
* @throws FfmaClientException
*/ | In this test Pronom repository is tested with overwriting collections in database | storeAllExtensionsPronom | {
"repo_name": "ait-ngcms/ffma",
"path": "services/preservation-riskmanagement-client/src/test/java/ait/ffma/preservation/riskmanagement/client/TestLODAnalysis.java",
"license": "apache-2.0",
"size": 15760
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,809,481 |
public static final XMLErrorResources loadResourceBundle(String className)
throws MissingResourceException
{
Locale locale = Locale.getDefault();
String suffix = getResourceSuffix(locale);
try
{
// first try with the given locale
return (XMLErrorResources) ResourceBundle.get... | static final XMLErrorResources function(String className) throws MissingResourceException { Locale locale = Locale.getDefault(); String suffix = getResourceSuffix(locale); try { return (XMLErrorResources) ResourceBundle.getBundle(className + suffix, locale); } catch (MissingResourceException e) { try { return (XMLError... | /**
* Return a named ResourceBundle for a particular locale. This method mimics the behavior
* of ResourceBundle.getBundle().
*
* @param className the name of the class that implements the resource bundle.
* @return the ResourceBundle
* @throws MissingResourceException
*/ | Return a named ResourceBundle for a particular locale. This method mimics the behavior of ResourceBundle.getBundle() | loadResourceBundle | {
"repo_name": "openjdk-mirror/jdk7u-jaxp",
"path": "src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java",
"license": "gpl-2.0",
"size": 22357
} | [
"java.util.Locale",
"java.util.MissingResourceException",
"java.util.ResourceBundle"
] | import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; | import java.util.*; | [
"java.util"
] | java.util; | 1,005,646 |
private static void appendDate(StringBuilder message)
{
final String date = DATE_TIME_FORMAT.format(Calendar.getInstance().getTime());
message.append(date);
message.append(Constant.SPACE);
}
| static void function(StringBuilder message) { final String date = DATE_TIME_FORMAT.format(Calendar.getInstance().getTime()); message.append(date); message.append(Constant.SPACE); } | /**
* Append date.
*
* @param message The message builder.
*/ | Append date | appendDate | {
"repo_name": "b3dgs/lionengine",
"path": "lionengine-core/src/main/java/com/b3dgs/lionengine/VerboseFormatter.java",
"license": "gpl-3.0",
"size": 3811
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 1,046,853 |
default AdvancedFileEndpointConsumerBuilder onCompletionExceptionHandler(
ExceptionHandler onCompletionExceptionHandler) {
doSetProperty("onCompletionExceptionHandler", onCompletionExceptionHandler);
return this;
} | default AdvancedFileEndpointConsumerBuilder onCompletionExceptionHandler( ExceptionHandler onCompletionExceptionHandler) { doSetProperty(STR, onCompletionExceptionHandler); return this; } | /**
* To use a custom org.apache.camel.spi.ExceptionHandler to handle any
* thrown exceptions that happens during the file on completion process
* where the consumer does either a commit or rollback. The default
* implementation will log any exception at WARN level and ignore.
... | To use a custom org.apache.camel.spi.ExceptionHandler to handle any thrown exceptions that happens during the file on completion process where the consumer does either a commit or rollback. The default implementation will log any exception at WARN level and ignore. The option is a: <code>org.apache.camel.spi.ExceptionH... | onCompletionExceptionHandler | {
"repo_name": "adessaigne/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/FileEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 150030
} | [
"org.apache.camel.spi.ExceptionHandler"
] | import org.apache.camel.spi.ExceptionHandler; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,598,576 |
@Override
public void initializeTopology() {
initTopology();
if (eosEnabled) {
try {
this.producer.beginTransaction();
} catch (final ProducerFencedException fatal) {
throw new TaskMigratedException(this, fatal);
}
... | void function() { initTopology(); if (eosEnabled) { try { this.producer.beginTransaction(); } catch (final ProducerFencedException fatal) { throw new TaskMigratedException(this, fatal); } transactionInFlight = true; } processorContext.initialized(); taskInitialized = true; } | /**
* <pre>
* - (re-)initialize the topology of the task
* </pre>
*
* @throws TaskMigratedException if the task producer got fenced (EOS only)
*/ | <code> - (re-)initialize the topology of the task </code> | initializeTopology | {
"repo_name": "Esquive/kafka",
"path": "streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java",
"license": "apache-2.0",
"size": 32806
} | [
"org.apache.kafka.common.errors.ProducerFencedException",
"org.apache.kafka.streams.errors.TaskMigratedException"
] | import org.apache.kafka.common.errors.ProducerFencedException; import org.apache.kafka.streams.errors.TaskMigratedException; | import org.apache.kafka.common.errors.*; import org.apache.kafka.streams.errors.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 2,412,518 |
public Key delMin() {
if (isEmpty()) throw new NoSuchElementException("Priority queue underflow");
Key min = pq[1];
exch(1, n--);
sink(1);
pq[n+1] = null; // to avoid loitering and help with garbage collection
if ((n > 0) && (n == (pq.length - 1) / 4)) resize(pq.l... | Key function() { if (isEmpty()) throw new NoSuchElementException(STR); Key min = pq[1]; exch(1, n--); sink(1); pq[n+1] = null; if ((n > 0) && (n == (pq.length - 1) / 4)) resize(pq.length / 2); assert isMinHeap(); return min; } | /**
* Removes and returns a smallest key on this priority queue.
*
* @return a smallest key on this priority queue
* @throws NoSuchElementException if this priority queue is empty
*/ | Removes and returns a smallest key on this priority queue | delMin | {
"repo_name": "anevsky/algorithms",
"path": "princeton/src/main/java/edu/princeton/cs/algs4/MinPQ.java",
"license": "gpl-3.0",
"size": 10575
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 1,978,524 |
private double matrixGet(int a, int b) {
// Remote get from the primary node (where given row or column is stored locally).
return ignite().compute(groupForKey(CACHE_NAME, getBlockId(a, b))).call(() -> {
IgniteCache<BlockMatrixKey, BlockEntry> cache = Ignition.localIgnite().getOrCreateCa... | double function(int a, int b) { return ignite().compute(groupForKey(CACHE_NAME, getBlockId(a, b))).call(() -> { IgniteCache<BlockMatrixKey, BlockEntry> cache = Ignition.localIgnite().getOrCreateCache(CACHE_NAME); BlockMatrixKey key = getCacheKey(getBlockId(a, b)); BlockEntry block = cache.localPeek(key, CachePeekMode.P... | /**
* Distributed matrix get.
*
* @param a Row or column index.
* @param b Row or column index.
* @return Matrix value at (a, b) index.
*/ | Distributed matrix get | matrixGet | {
"repo_name": "ntikhonov/ignite",
"path": "modules/ml/src/main/java/org/apache/ignite/ml/math/impls/storage/matrix/BlockMatrixStorage.java",
"license": "apache-2.0",
"size": 12683
} | [
"org.apache.ignite.IgniteCache",
"org.apache.ignite.Ignition",
"org.apache.ignite.cache.CachePeekMode",
"org.apache.ignite.ml.math.distributed.keys.impl.BlockMatrixKey",
"org.apache.ignite.ml.math.impls.matrix.BlockEntry"
] | import org.apache.ignite.IgniteCache; import org.apache.ignite.Ignition; import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.ml.math.distributed.keys.impl.BlockMatrixKey; import org.apache.ignite.ml.math.impls.matrix.BlockEntry; | import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.ml.math.distributed.keys.impl.*; import org.apache.ignite.ml.math.impls.matrix.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 204,666 |
protected Statement findIfStatementAlreadyDeclared(Statement declarationStatement,
boolean sameClass, List<Statement> statements)
{
Statement foundStatement = null;
if (statements != null)
{
for (Statement statement : statements)
{
... | Statement function(Statement declarationStatement, boolean sameClass, List<Statement> statements) { Statement foundStatement = null; if (statements != null) { for (Statement statement : statements) { if ((!sameClass && declarationStatement.toString().equals(statement.toString())) (sameClass && statement.getClass().equa... | /**
* Finds a statement if already declared
* @param declarationStatement
* @param sameClass true, it will compare if there is the same statement class in the body of the methodDeclaration (but the content may be different), false it will ignore the class and it will compare if the content is the same... | Finds a statement if already declared | findIfStatementAlreadyDeclared | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "tools/motodev/src/plugins/android.codeutils/src/com/motorola/studio/android/generatecode/AbstractCodeGenerator.java",
"license": "gpl-2.0",
"size": 26405
} | [
"java.util.List",
"org.eclipse.jdt.core.dom.Statement"
] | import java.util.List; import org.eclipse.jdt.core.dom.Statement; | import java.util.*; import org.eclipse.jdt.core.dom.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 1,407,592 |
public Class<? extends Partition> getPartitionClass() {
return PARTITION_CLASS.get(this);
} | Class<? extends Partition> function() { return PARTITION_CLASS.get(this); } | /**
* Get Partition class used
* @return Partition class
*/ | Get Partition class used | getPartitionClass | {
"repo_name": "pmPartch/giraph",
"path": "giraph-core/src/main/java/org/apache/giraph/conf/GiraphConfiguration.java",
"license": "apache-2.0",
"size": 27425
} | [
"org.apache.giraph.partition.Partition"
] | import org.apache.giraph.partition.Partition; | import org.apache.giraph.partition.*; | [
"org.apache.giraph"
] | org.apache.giraph; | 2,828,258 |
int invalidateAfter(int position) {
if (mData == null) {
return RecyclerView.NO_POSITION;
}
if (position >= mData.length) {
return RecyclerView.NO_POSITION;
}
int endPosition = invalidateFullSpansAfter(position);
... | int invalidateAfter(int position) { if (mData == null) { return RecyclerView.NO_POSITION; } if (position >= mData.length) { return RecyclerView.NO_POSITION; } int endPosition = invalidateFullSpansAfter(position); if (endPosition == RecyclerView.NO_POSITION) { Arrays.fill(mData, position, mData.length, LayoutParams.INVA... | /**
* returns end position for invalidation.
*/ | returns end position for invalidation | invalidateAfter | {
"repo_name": "AylaGene/testRepo_Public",
"path": "TMessagesProj/src/main/java/org/telegram/messenger/support/widget/StaggeredGridLayoutManager.java",
"license": "gpl-2.0",
"size": 117836
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,066,962 |
private static int getReservedQualifier(byte[] bytes) {
checkArgument(bytes.length == 4);
int number = FOUR_BYTE_QUALIFIERS.decode(bytes);
if (!isReservedColumnQualifier(number)) {
throw new InvalidQualifierBytesException(4, bytes.length);
}
... | static int function(byte[] bytes) { checkArgument(bytes.length == 4); int number = FOUR_BYTE_QUALIFIERS.decode(bytes); if (!isReservedColumnQualifier(number)) { throw new InvalidQualifierBytesException(4, bytes.length); } return number; } | /**
* We generate our column qualifiers in the reserved range 0-10 using the FOUR_BYTE_QUALIFIERS
* encoding. When adding Cells corresponding to the reserved qualifiers to the
* EncodedColumnQualifierCells list, we need to make sure that we use the FOUR_BYTE_QUALIFIERS
* scheme to de... | We generate our column qualifiers in the reserved range 0-10 using the FOUR_BYTE_QUALIFIERS encoding. When adding Cells corresponding to the reserved qualifiers to the EncodedColumnQualifierCells list, we need to make sure that we use the FOUR_BYTE_QUALIFIERS scheme to decode the correct int value | getReservedQualifier | {
"repo_name": "ankitsinghal/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/schema/PTable.java",
"license": "apache-2.0",
"size": 33322
} | [
"org.apache.phoenix.thirdparty.com.google.common.base.Preconditions"
] | import org.apache.phoenix.thirdparty.com.google.common.base.Preconditions; | import org.apache.phoenix.thirdparty.com.google.common.base.*; | [
"org.apache.phoenix"
] | org.apache.phoenix; | 1,845,063 |
@Messages({"# {0} - database name", "HashDbManager.noDbPath.message=Couldn't get valid database path for: {0}"})
private void configureSettings(HashLookupSettings settings) {
allDatabasesLoadedCorrectly = true;
List<HashDbInfo> hashDbInfoList = settings.getHashDbInfo();
for (HashDbInfo h... | @Messages({STR, STR}) void function(HashLookupSettings settings) { allDatabasesLoadedCorrectly = true; List<HashDbInfo> hashDbInfoList = settings.getHashDbInfo(); for (HashDbInfo hashDb : hashDbInfoList) { try { String dbPath = this.getValidFilePath(hashDb.getHashSetName(), hashDb.getPath()); if (dbPath != null) { addH... | /**
* Configures the given settings object by adding all contained hash db to
* the system.
*
* @param settings The settings to configure.
*/ | Configures the given settings object by adding all contained hash db to the system | configureSettings | {
"repo_name": "narfindustries/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashDbManager.java",
"license": "apache-2.0",
"size": 36096
} | [
"java.util.List",
"java.util.logging.Level",
"javax.swing.JOptionPane",
"org.openide.util.NbBundle",
"org.sleuthkit.autopsy.core.RuntimeProperties",
"org.sleuthkit.autopsy.coreutils.Logger",
"org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettings",
"org.sleuthkit.datamodel.SleuthkitJNI",
"org... | import java.util.List; import java.util.logging.Level; import javax.swing.JOptionPane; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.core.RuntimeProperties; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettings; import org.sleuthkit.datamode... | import java.util.*; import java.util.logging.*; import javax.swing.*; import org.openide.util.*; import org.sleuthkit.autopsy.core.*; import org.sleuthkit.autopsy.coreutils.*; import org.sleuthkit.autopsy.modules.hashdatabase.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"javax.swing",
"org.openide.util",
"org.sleuthkit.autopsy",
"org.sleuthkit.datamodel"
] | java.util; javax.swing; org.openide.util; org.sleuthkit.autopsy; org.sleuthkit.datamodel; | 2,803,987 |
private JLabel getLblLogin2() {
if (lblLogin2 == null) {
lblLogin2 = new JLabel("Login");
lblLogin2.setFont(new Font("Tahoma", Font.PLAIN, 13));
}
return lblLogin2;
} | JLabel function() { if (lblLogin2 == null) { lblLogin2 = new JLabel("Login"); lblLogin2.setFont(new Font(STR, Font.PLAIN, 13)); } return lblLogin2; } | /**
* Devuelve el valor de lblLogin2
*
* @return lblLogin2
*/ | Devuelve el valor de lblLogin2 | getLblLogin2 | {
"repo_name": "Arquisoft/Trivial5a",
"path": "game/src/main/java/es/uniovi/asw/gui/ConfigurarPartida.java",
"license": "gpl-2.0",
"size": 26710
} | [
"java.awt.Font",
"javax.swing.JLabel"
] | import java.awt.Font; import javax.swing.JLabel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,310,842 |
public JsonPrimitive asJsonPrimitive(JsonElement source) {
return asJsonPrimitive(source, null);
} | JsonPrimitive function(JsonElement source) { return asJsonPrimitive(source, null); } | /**
* Returns the source json as a json primitive if possible. Else returns null
*
* @param source the source json element
* @return the source json as a json primitive
*/ | Returns the source json as a json primitive if possible. Else returns null | asJsonPrimitive | {
"repo_name": "balajeetm/json-mystique",
"path": "json-mystique-utils/gson-utils/src/main/java/com/balajeetm/mystique/util/gson/lever/JsonLever.java",
"license": "apache-2.0",
"size": 77289
} | [
"com.google.gson.JsonElement",
"com.google.gson.JsonPrimitive"
] | import com.google.gson.JsonElement; import com.google.gson.JsonPrimitive; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 2,740,964 |
@Deprecated
void preGet(final ObserverContext<RegionCoprocessorEnvironment> c, final Get get,
final List<KeyValue> result)
throws IOException; | void preGet(final ObserverContext<RegionCoprocessorEnvironment> c, final Get get, final List<KeyValue> result) throws IOException; | /**
* WARNING: please override preGetOp instead of this method. This is to maintain some
* compatibility and to ease the transition from 0.94 -> 0.96.
*/ | compatibility and to ease the transition from 0.94 -> 0.96 | preGet | {
"repo_name": "lilonglai/hbase-0.96.2",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java",
"license": "apache-2.0",
"size": 43529
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.client.Get"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Get; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,580,837 |
public Identity getIdentity() throws TimeoutException, NotConnectedException {
ByteBuffer bb = ipcon.createRequestPacket((byte)8, FUNCTION_GET_IDENTITY, this);
byte[] response = sendRequest(bb.array());
bb = ByteBuffer.wrap(response, 8, response.length - 8);
bb.order(ByteOrder.LITTLE_ENDIAN);
Identity o... | Identity function() throws TimeoutException, NotConnectedException { ByteBuffer bb = ipcon.createRequestPacket((byte)8, FUNCTION_GET_IDENTITY, this); byte[] response = sendRequest(bb.array()); bb = ByteBuffer.wrap(response, 8, response.length - 8); bb.order(ByteOrder.LITTLE_ENDIAN); Identity obj = new Identity(); obj.u... | /**
* Returns the UID, the UID where the Bricklet is connected to,
* the position, the hardware and firmware version as well as the
* device identifier.
*
* The position can be 'a', 'b', 'c' or 'd'.
*
* The device identifiers can be found :ref:`here <device_identifier>`.
*
* .. versionadded:: 2.0.... | Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier. The position can be 'a', 'b', 'c' or 'd'. The device identifiers can be found :ref:`here `. .. versionadded:: 2.0.0~(Plugin) | getIdentity | {
"repo_name": "jaggr2/ch.bfh.fbi.mobiComp.17herz",
"path": "com.tinkerforge/src/com/tinkerforge/BrickletIO4.java",
"license": "apache-2.0",
"size": 19927
} | [
"java.nio.ByteBuffer",
"java.nio.ByteOrder"
] | import java.nio.ByteBuffer; import java.nio.ByteOrder; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,347,856 |
static String[] splitOnTokens(String text) {
// used by wildcardMatch
// package level so a unit test may run on this
if (text.indexOf('?') == -1 && text.indexOf('*') == -1) {
return new String[] { text };
}
char[] array = text.toCharArray();
ArrayList<S... | static String[] splitOnTokens(String text) { if (text.indexOf('?') == -1 && text.indexOf('*') == -1) { return new String[] { text }; } char[] array = text.toCharArray(); ArrayList<String> list = new ArrayList<String>(); StringBuilder buffer = new StringBuilder(); for (int i = 0; i < array.length; i++) { if (array[i] ==... | /**
* Splits a string into a number of tokens.
* The text is split by '?' and '*'.
* Where multiple '*' occur consecutively they are collapsed into a single '*'.
*
* @param text the text to split
* @return the array of tokens, never null
*/ | Splits a string into a number of tokens. The text is split by '?' and '*'. Where multiple '*' occur consecutively they are collapsed into a single '*' | splitOnTokens | {
"repo_name": "BeeShield/AndroidPicker",
"path": "library/src/main/java/cn/finalteam/rxgalleryfinal/utils/FilenameUtils.java",
"license": "apache-2.0",
"size": 39183
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 179,853 |
public CountDownLatch getProfilesAsync(String responseFields, AsyncCallback<com.mozu.api.contracts.shippingadmin.profile.ShippingProfileCollection> callback) throws Exception
{
MozuClient<com.mozu.api.contracts.shippingadmin.profile.ShippingProfileCollection> client = com.mozu.api.clients.commerce.shipping.admin.... | CountDownLatch function(String responseFields, AsyncCallback<com.mozu.api.contracts.shippingadmin.profile.ShippingProfileCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.shippingadmin.profile.ShippingProfileCollection> client = com.mozu.api.clients.commerce.shipping.admin.ShippingProfileClient... | /**
* Get Shipping Profiles for the Tenant/Master Catalog
* <p><pre><code>
* ShippingProfile shippingprofile = new ShippingProfile();
* CountDownLatch latch = shippingprofile.getProfiles( responseFields, callback );
* latch.await() * </code></pre></p>
* @param responseFields Filtering syntax appended to an... | Get Shipping Profiles for the Tenant/Master Catalog <code><code> ShippingProfile shippingprofile = new ShippingProfile(); CountDownLatch latch = shippingprofile.getProfiles( responseFields, callback ); latch.await() * </code></code> | getProfilesAsync | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/shipping/admin/ShippingProfileResource.java",
"license": "mit",
"size": 4703
} | [
"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; | 2,073,326 |
protected double norm(double score, Stats stats) {
if (norm) {
return (score - stats.getMean()) / stats.getStandardDeviation();
} else {
return score;
}
} | double function(double score, Stats stats) { if (norm) { return (score - stats.getMean()) / stats.getStandardDeviation(); } else { return score; } } | /**
* Returns the normalized value of a relevance or novelty score.
*
* @param score the relevance or novelty score
* @param stats the relevance or novelty statistics
* @return the normalized score
*/ | Returns the normalized value of a relevance or novelty score | norm | {
"repo_name": "OlafLee/RankSys",
"path": "RankSys-novdiv/src/main/java/es/uam/eps/ir/ranksys/novdiv/itemnovelty/reranking/ItemNoveltyReranker.java",
"license": "gpl-3.0",
"size": 4775
} | [
"es.uam.eps.ir.ranksys.core.util.Stats"
] | import es.uam.eps.ir.ranksys.core.util.Stats; | import es.uam.eps.ir.ranksys.core.util.*; | [
"es.uam.eps"
] | es.uam.eps; | 2,014,846 |
EList<Annotation> getAnnotations(); | EList<Annotation> getAnnotations(); | /**
* Returns the value of the '<em><b>Annotations</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.n4js.n4JS.Annotation}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Annotations</em>' containment reference list isn't clear,
* there really should be m... | Returns the value of the 'Annotations' containment reference list. The list contents are of type <code>org.eclipse.n4js.n4JS.Annotation</code>. If the meaning of the 'Annotations' containment reference list isn't clear, there really should be more of a description here... | getAnnotations | {
"repo_name": "lbeurerkellner/n4js",
"path": "plugins/org.eclipse.n4js.model/emf-gen/org/eclipse/n4js/n4JS/VariableDeclaration.java",
"license": "epl-1.0",
"size": 3403
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 835,607 |
public final void setMarkup(final IMarkupFragment markup)
{
this.markup = markup;
}
/**
* Called once per request on components before they are about to be rendered. This method
* should be used to configure such things as visibility and enabled flags.
* <p>
* Overrides must call {@code super.onConfigu... | final void function(final IMarkupFragment markup) { this.markup = markup; } /** * Called once per request on components before they are about to be rendered. This method * should be used to configure such things as visibility and enabled flags. * <p> * Overrides must call {@code super.onConfigure()}, usually before any... | /**
* Set the markup for the component. Note that the component's markup variable is transient and
* thus must only be used for one render cycle. E.g. auto-component are using it. You may also
* it if you subclassed getMarkup().
*
* @param markup
*/ | Set the markup for the component. Note that the component's markup variable is transient and thus must only be used for one render cycle. E.g. auto-component are using it. You may also it if you subclassed getMarkup() | setMarkup | {
"repo_name": "zwsong/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/Component.java",
"license": "apache-2.0",
"size": 131241
} | [
"org.apache.wicket.markup.IMarkupFragment"
] | import org.apache.wicket.markup.IMarkupFragment; | import org.apache.wicket.markup.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,033,655 |
public ItemStack getCraftingResult(InventoryCrafting par1InventoryCrafting)
{
return this.recipeOutput.copy();
} | ItemStack function(InventoryCrafting par1InventoryCrafting) { return this.recipeOutput.copy(); } | /**
* Returns an Item that is the result of this recipe
*/ | Returns an Item that is the result of this recipe | getCraftingResult | {
"repo_name": "savageboy74/ProjectArcane",
"path": "src/main/java/com/woody104/projectarcane/crafting/ArcaneTableShapelessRecipes.java",
"license": "gpl-3.0",
"size": 2538
} | [
"net.minecraft.inventory.InventoryCrafting",
"net.minecraft.item.ItemStack"
] | import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.ItemStack; | import net.minecraft.inventory.*; import net.minecraft.item.*; | [
"net.minecraft.inventory",
"net.minecraft.item"
] | net.minecraft.inventory; net.minecraft.item; | 2,455,031 |
if (! coverages.containsKey((hyp.getCoverage())))
coverages.put(hyp.getCoverage(), new ArrayList<Hypothesis>());
coverages.get(hyp.getCoverage()).add(hyp);
return super.add(hyp);
} | if (! coverages.containsKey((hyp.getCoverage()))) coverages.put(hyp.getCoverage(), new ArrayList<Hypothesis>()); coverages.get(hyp.getCoverage()).add(hyp); return super.add(hyp); } | /**
* A Stack is an ArrayList; here, we intercept the add so we can maintain a list of the items
* stored under each distinct coverage vector
*/ | A Stack is an ArrayList; here, we intercept the add so we can maintain a list of the items stored under each distinct coverage vector | add | {
"repo_name": "lukeorland/joshua",
"path": "src/joshua/decoder/phrase/Stack.java",
"license": "lgpl-2.1",
"size": 7607
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 776,390 |
public void openMarketplace() {
try {
if ( marketplaceMethod != null ) {
marketplaceMethod.invoke( marketplaceMethod.getDeclaringClass().newInstance() );
}
} catch ( Exception ex ) {
new ErrorDialog(
shell, BaseMessages.getString( PKG, "Spoon.ErrorShowingMarketplaceDialog.Tit... | void function() { try { if ( marketplaceMethod != null ) { marketplaceMethod.invoke( marketplaceMethod.getDeclaringClass().newInstance() ); } } catch ( Exception ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, STR ), BaseMessages .getString( PKG, STR ), ex ); } } | /**
* If available, this method will open the marketplace.
*/ | If available, this method will open the marketplace | openMarketplace | {
"repo_name": "jbrant/pentaho-kettle",
"path": "ui/src/org/pentaho/di/ui/spoon/Spoon.java",
"license": "apache-2.0",
"size": 339273
} | [
"org.pentaho.di.i18n.BaseMessages",
"org.pentaho.di.ui.core.dialog.ErrorDialog"
] | import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.ui.core.dialog.ErrorDialog; | import org.pentaho.di.i18n.*; import org.pentaho.di.ui.core.dialog.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,923,456 |
public void setCatalogs(List<Catalog> catalogs); | void function(List<Catalog> catalogs); | /**
* Set the list of product, category and offer groupings that
* this site has access to
*
* @param catalogs a list of catalog groupings
*/ | Set the list of product, category and offer groupings that this site has access to | setCatalogs | {
"repo_name": "akdasari/SparkCommon",
"path": "src/main/java/org/sparkcommerce/common/site/domain/Site.java",
"license": "apache-2.0",
"size": 3138
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,508,364 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<RoleAssignmentInner>> listByResourceGroupSinglePageAsync(
String resourceGroupName, String filter, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<RoleAssignmentInner>> function( String resourceGroupName, String filter, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalAr... | /**
* Gets role assignments for a resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or
* above the scope. Use $filter=princi... | Gets role assignments for a resource group | listByResourceGroupSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentsClientImpl.java",
"license": "mit",
"size": 111188
} | [
"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.Context",
"com.azure.resourcemanager.authorization.fluent.models.RoleAssignmentInner"
] | 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.Context; import com.azure.resourcemanager.authorization.fluent.models.RoleAssignmentInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,787,200 |
public static Closure doWhileClosure(Closure closure, Predicate predicate) {
return WhileClosure.getInstance(predicate, closure, true);
}
| static Closure function(Closure closure, Predicate predicate) { return WhileClosure.getInstance(predicate, closure, true); } | /**
* Creates a Closure that will call the closure once and then repeatedly
* until the predicate returns false.
*
* @see com.usemon.lib.org.apache.commons.collections.functors.WhileClosure
*
* @param closure the closure to call repeatedly, not null
* @param predicate the pr... | Creates a Closure that will call the closure once and then repeatedly until the predicate returns false | doWhileClosure | {
"repo_name": "ProfilingLabs/Usemon2",
"path": "usemon-agent-commons-java/src/main/java/com/usemon/lib/org/apache/commons/collections/ClosureUtils.java",
"license": "mpl-2.0",
"size": 15935
} | [
"com.usemon.lib.org.apache.commons.collections.functors.WhileClosure"
] | import com.usemon.lib.org.apache.commons.collections.functors.WhileClosure; | import com.usemon.lib.org.apache.commons.collections.functors.*; | [
"com.usemon.lib"
] | com.usemon.lib; | 2,867,192 |
void init() throws Exception {
log.info("Shutdown manager registered...");
ShutdownManager sdm = new ShutdownManager();
Runtime.getRuntime().addShutdownHook(sdm);
log.info("Config Manager Starting...");
getConfig();
log.info("Config Manager S... | void init() throws Exception { log.info(STR); ShutdownManager sdm = new ShutdownManager(); Runtime.getRuntime().addShutdownHook(sdm); log.info(STR); getConfig(); log.info(STR); } | /**
* Initialize the ConfigManager
*
* <li> 1. Create DeviceProfiles, and Assign Readers 2. Create
* Interrogator, and assign a ReaderComponet 3. DeviceManagerRemote will get
* SensorEvents </li>
*
*
* @throws Exception
*
*/ | Initialize the ConfigManager 1. Create DeviceProfiles, and Assign Readers 2. Create Interrogator, and assign a ReaderComponet 3. DeviceManagerRemote will get SensorEvents | init | {
"repo_name": "tomrose/singularity",
"path": "library/devicemgr/src/org/firstopen/singularity/devicemgr/config/ConfigManagerAbstractImpl.java",
"license": "apache-2.0",
"size": 5802
} | [
"org.firstopen.singularity.system.ShutdownManager"
] | import org.firstopen.singularity.system.ShutdownManager; | import org.firstopen.singularity.system.*; | [
"org.firstopen.singularity"
] | org.firstopen.singularity; | 410,145 |
public boolean isViewUnder(View view, int x, int y) {
if (view == null) {
return false;
}
return x >= view.getLeft() && x < view.getRight() && y >= view.getTop()
&& y < view.getBottom();
}
/**
* Find the topmost child under the given point within the... | boolean function(View view, int x, int y) { if (view == null) { return false; } return x >= view.getLeft() && x < view.getRight() && y >= view.getTop() && y < view.getBottom(); } /** * Find the topmost child under the given point within the parent view's * coordinate system. The child order is determined using * {@link... | /**
* Determine if the supplied view is under the given point in the parent
* view's coordinate system.
*
* @param view Child view of the parent to hit test
* @param x X position to test in the parent's coordinate system
* @param y Y position to test in the parent's coordinate system... | Determine if the supplied view is under the given point in the parent view's coordinate system | isViewUnder | {
"repo_name": "lanhuaguizha/Christian",
"path": "parallaxbacklayout/src/main/java/com/github/anzewei/parallaxbacklayout/ViewDragHelper.java",
"license": "gpl-3.0",
"size": 62138
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,079,635 |
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
if (LOG_ATTACH_DETACH) {
Log.d(TAG, "onAttachedToWindow reattach =" + mDetached);
}
if (mDetached && mRenderer != null) {
int renderMode = RE... | void function() { super.onAttachedToWindow(); if (LOG_ATTACH_DETACH) { Log.d(TAG, STR + mDetached); } if (mDetached && mRenderer != null) { int renderMode = RENDERMODE_CONTINUOUSLY; if (mGLThread != null) { renderMode = mGLThread.getRenderMode(); } mGLThread = new GLThread(mRenderer); if (renderMode != RENDERMODE_CONTI... | /**
* This method is used as part of the View class and is not normally called
* or subclassed by clients of GLSurfaceView.
*/ | This method is used as part of the View class and is not normally called or subclassed by clients of GLSurfaceView | onAttachedToWindow | {
"repo_name": "thecocce/TERRA-Engine",
"path": "Engine/OS/Android/GLSurfaceView.java",
"license": "apache-2.0",
"size": 102008
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,723,491 |
private void loadTags() {
try {
bundle = ResourceBundle.getBundle(PROPERTIES_CPATH);
Enumeration<String> en = bundle.getKeys();
String key = null;
setTagList(new ArrayList<String>());
for (; en.hasMoreElements(); ) {
key = en.nextEl... | void function() { try { bundle = ResourceBundle.getBundle(PROPERTIES_CPATH); Enumeration<String> en = bundle.getKeys(); String key = null; setTagList(new ArrayList<String>()); for (; en.hasMoreElements(); ) { key = en.nextElement(); if (key!=null && !key.equals(NB_MODULE_NAME_KEY)){ getTagList().add(bundle.getString(ke... | /**
* Loads the hAtom keyword list from the module's property file.<br>
*/ | Loads the hAtom keyword list from the module's property file | loadTags | {
"repo_name": "andreacastello/netbeans-hatom-plugin",
"path": "src/it/pronetics/madstore/hatom/netbeans/syntax/TagCache.java",
"license": "apache-2.0",
"size": 3356
} | [
"java.util.ArrayList",
"java.util.Enumeration",
"java.util.ResourceBundle",
"org.openide.util.Exceptions"
] | import java.util.ArrayList; import java.util.Enumeration; import java.util.ResourceBundle; import org.openide.util.Exceptions; | import java.util.*; import org.openide.util.*; | [
"java.util",
"org.openide.util"
] | java.util; org.openide.util; | 782,259 |
private void visit(PipelineVisitor visitor, Set<PValue> visitedValues) {
if (!finishedSpecifying) {
finishSpecifying();
}
if (!isRootNode()) {
// Visit inputs.
for (PValue inputValue : inputs.values()) {
if (visitedValues.add(inputValue)) {
visitor.vi... | void function(PipelineVisitor visitor, Set<PValue> visitedValues) { if (!finishedSpecifying) { finishSpecifying(); } if (!isRootNode()) { for (PValue inputValue : inputs.values()) { if (visitedValues.add(inputValue)) { visitor.visitValue(inputValue, getProducer(inputValue)); } } } if (isCompositeNode()) { PipelineVisit... | /**
* Visit the transform node.
*
* <p>Provides an ordered visit of the input values, the primitive transform (or child nodes for
* composite transforms), then the output values.
*/ | Visit the transform node. Provides an ordered visit of the input values, the primitive transform (or child nodes for composite transforms), then the output values | visit | {
"repo_name": "dhalperi/beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/runners/TransformHierarchy.java",
"license": "apache-2.0",
"size": 19765
} | [
"com.google.common.base.Preconditions",
"java.util.Set",
"org.apache.beam.sdk.Pipeline",
"org.apache.beam.sdk.values.PValue"
] | import com.google.common.base.Preconditions; import java.util.Set; import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.values.PValue; | import com.google.common.base.*; import java.util.*; import org.apache.beam.sdk.*; import org.apache.beam.sdk.values.*; | [
"com.google.common",
"java.util",
"org.apache.beam"
] | com.google.common; java.util; org.apache.beam; | 531,281 |
double output = neuron.getOutput();
for(Connection connection : neuron.getInputConnections()) {
double input = connection.getInput();
double netInput = neuron.getNetInput();
double deltaWeight = (input - netInput) * output * this.learningRate; // is it right to use netInput here?
co... | double output = neuron.getOutput(); for(Connection connection : neuron.getInputConnections()) { double input = connection.getInput(); double netInput = neuron.getNetInput(); double deltaWeight = (input - netInput) * output * this.learningRate; connection.getWeight().inc(deltaWeight); } } | /**
* This method implements weights update procedure for the single neuron
*
* @param neuron
* neuron to update weights
*/ | This method implements weights update procedure for the single neuron | updateNeuronWeights | {
"repo_name": "fiidau/Y-Haplogroup-Predictor",
"path": "src/org/neuroph/nnet/learning/GeneralizedHebbianLearning.java",
"license": "mit",
"size": 1641
} | [
"org.neuroph.core.Connection"
] | import org.neuroph.core.Connection; | import org.neuroph.core.*; | [
"org.neuroph.core"
] | org.neuroph.core; | 434,036 |
@Test
public void testPipelineWithOnpremiseUrl() throws Exception {
WorkflowJob pipelineJob = j.jenkins.createProject(WorkflowJob.class, "test-pipeline");
pipelineJob.setConcurrentBuild(false);
String testProjectPath = new File(
getClass().getClassLoader().getResource("p... | void function() throws Exception { WorkflowJob pipelineJob = j.jenkins.createProject(WorkflowJob.class, STR); pipelineJob.setConcurrentBuild(false); String testProjectPath = new File( getClass().getClassLoader().getResource(STR).toURI() ).getAbsolutePath(); String script = STRpipeline {\nSTR agent any\nSTR stages {\nST... | /**
* Tests that step succeeds without companyId if onpremise url address is set.
*/ | Tests that step succeeds without companyId if onpremise url address is set | testPipelineWithOnpremiseUrl | {
"repo_name": "jenkinsci/meliora-testlab-plugin",
"path": "src/test/java/fi/meliora/testlab/ext/jenkins/test/PipelineTest.java",
"license": "lgpl-3.0",
"size": 15777
} | [
"java.io.File",
"org.jenkinsci.plugins.workflow.job.WorkflowJob"
] | import java.io.File; import org.jenkinsci.plugins.workflow.job.WorkflowJob; | import java.io.*; import org.jenkinsci.plugins.workflow.job.*; | [
"java.io",
"org.jenkinsci.plugins"
] | java.io; org.jenkinsci.plugins; | 2,404,682 |
@Generated(hash = 713229351)
public void update() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.update(this);
} | @Generated(hash = 713229351) void function() { if (myDao == null) { throw new DaoException(STR); } myDao.update(this); } | /**
* Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
* Entity must attached to an entity context.
*/ | Convenient call for <code>org.greenrobot.greendao.AbstractDao#update(Object)</code>. Entity must attached to an entity context | update | {
"repo_name": "steve-goldman/volksempfaenger",
"path": "app/src/main/java/net/x4a42/volksempfaenger/data/entity/playlistitem/PlaylistItem.java",
"license": "isc",
"size": 4494
} | [
"org.greenrobot.greendao.DaoException",
"org.greenrobot.greendao.annotation.Generated"
] | import org.greenrobot.greendao.DaoException; import org.greenrobot.greendao.annotation.Generated; | import org.greenrobot.greendao.*; import org.greenrobot.greendao.annotation.*; | [
"org.greenrobot.greendao"
] | org.greenrobot.greendao; | 1,628,636 |
private List<FeedbackResponseAttributes> filterResponsesForStatistics(
List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question,
String studentEmail, FeedbackSessionResultsBundle bundle, String view) {
boolean isViewedByStudent = "student".equals(view);
... | List<FeedbackResponseAttributes> function( List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question, String studentEmail, FeedbackSessionResultsBundle bundle, String view) { boolean isViewedByStudent = STR.equals(view); if (!isViewedByStudent) { return responses; } FeedbackParticipantType recipie... | /**
* Returns a list of FeedbackResponseAttributes filtered according to view, question recipient type
* for the Statistics Table.
*/ | Returns a list of FeedbackResponseAttributes filtered according to view, question recipient type for the Statistics Table | filterResponsesForStatistics | {
"repo_name": "LiHaoTan/teammates",
"path": "src/main/java/teammates/common/datatransfer/questions/FeedbackRubricQuestionDetails.java",
"license": "gpl-2.0",
"size": 65557
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 900,276 |
private void navigateBackward() {
if (currentTarget == 0) {
throw new IllegalStateException(
"NavigateBackward is not allowed "
+ "since the targetpointer is pointing at "
+ "the lower boundary "
+ "of the history");
}
navigateBackward = tru... | void function() { if (currentTarget == 0) { throw new IllegalStateException( STR + STR + STR + STR); } navigateBackward = true; if (targets.size() == 0) { setTarget(((WeakReference) history.get(currentTarget)).get()); } else { setTarget(((WeakReference) history.get(--currentTarget)).get()); } navigateBackward = false; ... | /**
* Navigate one step back in history. Throws an illegalstateexception if
* not possible.
*
*/ | Navigate one step back in history. Throws an illegalstateexception if not possible | navigateBackward | {
"repo_name": "carvalhomb/tsmells",
"path": "sample/argouml/argouml/org/argouml/ui/targetmanager/TargetManager.java",
"license": "gpl-2.0",
"size": 34904
} | [
"java.lang.ref.WeakReference"
] | import java.lang.ref.WeakReference; | import java.lang.ref.*; | [
"java.lang"
] | java.lang; | 2,388,200 |
public AttachedFile createAttachedFile(String filename,
ReagentAttachedFileType fileType,
LocalDate fileDate,
String fileContents) throws IOException
{
return createAttachedFile(filename, f... | AttachedFile function(String filename, ReagentAttachedFileType fileType, LocalDate fileDate, String fileContents) throws IOException { return createAttachedFile(filename, fileType, fileDate, new ByteArrayInputStream(fileContents.getBytes())); } | /**
* Create and return a new attached file for the screen.
*
* @param filename the filename
* @param fileType the file type
* @param fileContents the file contents
* @throws IOException
*/ | Create and return a new attached file for the screen | createAttachedFile | {
"repo_name": "hmsiccbl/screensaver",
"path": "core/src/main/java/edu/harvard/med/screensaver/model/libraries/Reagent.java",
"license": "gpl-2.0",
"size": 13512
} | [
"edu.harvard.med.screensaver.model.AttachedFile",
"java.io.ByteArrayInputStream",
"java.io.IOException",
"org.joda.time.LocalDate"
] | import edu.harvard.med.screensaver.model.AttachedFile; import java.io.ByteArrayInputStream; import java.io.IOException; import org.joda.time.LocalDate; | import edu.harvard.med.screensaver.model.*; import java.io.*; import org.joda.time.*; | [
"edu.harvard.med",
"java.io",
"org.joda.time"
] | edu.harvard.med; java.io; org.joda.time; | 969,529 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.