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 void onDeath(DamageSource cause) { super.onDeath(cause); if (cause.getSourceOfDamage() instanceof EntityArrow && cause.getEntity() instanceof EntityPlayer) { EntityPlayer var2 = (EntityPlayer)cause.getEntity(); double var3 = var2.posX - this.posX; ...
void function(DamageSource cause) { super.onDeath(cause); if (cause.getSourceOfDamage() instanceof EntityArrow && cause.getEntity() instanceof EntityPlayer) { EntityPlayer var2 = (EntityPlayer)cause.getEntity(); double var3 = var2.posX - this.posX; double var5 = var2.posZ - this.posZ; if (var3 * var3 + var5 * var5 >= 2...
/** * Called when the mob's health reaches 0. */
Called when the mob's health reaches 0
onDeath
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/entity/monster/EntitySkeleton.java", "license": "mit", "size": 14173 }
[ "net.minecraft.entity.player.EntityPlayer", "net.minecraft.entity.projectile.EntityArrow", "net.minecraft.init.Items", "net.minecraft.item.ItemStack", "net.minecraft.stats.AchievementList", "net.minecraft.util.DamageSource" ]
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.stats.AchievementList; import net.minecraft.util.DamageSource;
import net.minecraft.entity.player.*; import net.minecraft.entity.projectile.*; import net.minecraft.init.*; import net.minecraft.item.*; import net.minecraft.stats.*; import net.minecraft.util.*;
[ "net.minecraft.entity", "net.minecraft.init", "net.minecraft.item", "net.minecraft.stats", "net.minecraft.util" ]
net.minecraft.entity; net.minecraft.init; net.minecraft.item; net.minecraft.stats; net.minecraft.util;
1,076,807
@Override @Transactional(propagation = Propagation.REQUIRES_NEW) public EmrMasterSecurityGroup addSecurityGroupsToClusterMaster(EmrMasterSecurityGroupAddRequest request) throws Exception { return addSecurityGroupsToClusterMasterImpl(request); }
@Transactional(propagation = Propagation.REQUIRES_NEW) EmrMasterSecurityGroup function(EmrMasterSecurityGroupAddRequest request) throws Exception { return addSecurityGroupsToClusterMasterImpl(request); }
/** * Adds security groups to the master node of an existing EMR Cluster. Creates its own transaction. * * @param request the EMR master security group add request * * @return the added EMR master security groups * @throws Exception if there were any errors adding the security groups to th...
Adds security groups to the master node of an existing EMR Cluster. Creates its own transaction
addSecurityGroupsToClusterMaster
{ "repo_name": "seoj/herd", "path": "herd-code/herd-service/src/main/java/org/finra/herd/service/impl/EmrServiceImpl.java", "license": "apache-2.0", "size": 55398 }
[ "org.finra.herd.model.api.xml.EmrMasterSecurityGroup", "org.finra.herd.model.api.xml.EmrMasterSecurityGroupAddRequest", "org.springframework.transaction.annotation.Propagation", "org.springframework.transaction.annotation.Transactional" ]
import org.finra.herd.model.api.xml.EmrMasterSecurityGroup; import org.finra.herd.model.api.xml.EmrMasterSecurityGroupAddRequest; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional;
import org.finra.herd.model.api.xml.*; import org.springframework.transaction.annotation.*;
[ "org.finra.herd", "org.springframework.transaction" ]
org.finra.herd; org.springframework.transaction;
2,631,803
static long parseSnapshotSize(Cell c) throws InvalidProtocolBufferException { ByteString bs = UnsafeByteOperations.unsafeWrap( c.getValueArray(), c.getValueOffset(), c.getValueLength()); return QuotaProtos.SpaceQuotaSnapshot.parseFrom(bs).getQuotaUsage(); }
static long parseSnapshotSize(Cell c) throws InvalidProtocolBufferException { ByteString bs = UnsafeByteOperations.unsafeWrap( c.getValueArray(), c.getValueOffset(), c.getValueLength()); return QuotaProtos.SpaceQuotaSnapshot.parseFrom(bs).getQuotaUsage(); }
/** * Parses the snapshot size from the given Cell's value. */
Parses the snapshot size from the given Cell's value
parseSnapshotSize
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaTableUtil.java", "license": "apache-2.0", "size": 33532 }
[ "org.apache.hadoop.hbase.Cell", "org.apache.hadoop.hbase.shaded.com.google.protobuf.ByteString", "org.apache.hadoop.hbase.shaded.com.google.protobuf.InvalidProtocolBufferException", "org.apache.hadoop.hbase.shaded.com.google.protobuf.UnsafeByteOperations", "org.apache.hadoop.hbase.shaded.protobuf.generated....
import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.shaded.com.google.protobuf.ByteString; import org.apache.hadoop.hbase.shaded.com.google.protobuf.InvalidProtocolBufferException; import org.apache.hadoop.hbase.shaded.com.google.protobuf.UnsafeByteOperations; import org.apache.hadoop.hbase.shaded.proto...
import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.shaded.com.google.protobuf.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
711,798
public void setDescriptors(DataTypeDescriptor[] descriptors) { userParameterTypes = descriptors; }
void function(DataTypeDescriptor[] descriptors) { userParameterTypes = descriptors; }
/** * Set the descriptor array * * @param descriptors The array of DataTypeServices to fill in when the parameters * are bound. */
Set the descriptor array
setDescriptors
{ "repo_name": "gemxd/gemfirexd-oss", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/compile/ParameterNode.java", "license": "apache-2.0", "size": 19343 }
[ "com.pivotal.gemfirexd.internal.iapi.types.DataTypeDescriptor" ]
import com.pivotal.gemfirexd.internal.iapi.types.DataTypeDescriptor;
import com.pivotal.gemfirexd.internal.iapi.types.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
614,478
public Set<FilteredConnectPoint> filteredEgressPoints() { return filteredEgressPoints; }
Set<FilteredConnectPoint> function() { return filteredEgressPoints; }
/** * Returns the filtered connected points on which the traffic should egress. * * @return filtered egress connect points */
Returns the filtered connected points on which the traffic should egress
filteredEgressPoints
{ "repo_name": "sdnwiselab/onos", "path": "core/api/src/main/java/org/onosproject/net/domain/DomainIntent.java", "license": "apache-2.0", "size": 6191 }
[ "java.util.Set", "org.onosproject.net.FilteredConnectPoint" ]
import java.util.Set; import org.onosproject.net.FilteredConnectPoint;
import java.util.*; import org.onosproject.net.*;
[ "java.util", "org.onosproject.net" ]
java.util; org.onosproject.net;
420,266
private List<View> addView(View view, List<View> cache) { if (cache == null) { cache = new LinkedList<View>(); } cache.add(view); return cache; }
List<View> function(View view, List<View> cache) { if (cache == null) { cache = new LinkedList<View>(); } cache.add(view); return cache; }
/** * Adds view to specified cache. Creates a cache list if it is null. * * @param view the view to be cached * @param cache the cache list * @return the cache list */
Adds view to specified cache. Creates a cache list if it is null
addView
{ "repo_name": "JZXiang/TimePickerDialog", "path": "TimePickerDialog/src/main/java/com/jzxiang/pickerview/wheel/WheelRecycle.java", "license": "apache-2.0", "size": 2998 }
[ "android.view.View", "java.util.LinkedList", "java.util.List" ]
import android.view.View; import java.util.LinkedList; import java.util.List;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
1,711,659
protected final void setFile(final File file) throws DBException { this.file = file; fileIsNew = !file.exists(); try { if ((!file.exists()) || file.canWrite()) { try { raf = new RandomAccessFile(file, "rw"); FileChannel channel = raf.getChannel()...
final void function(final File file) throws DBException { this.file = file; fileIsNew = !file.exists(); try { if ((!file.exists()) file.canWrite()) { try { raf = new RandomAccessFile(file, "rw"); FileChannel channel = raf.getChannel(); FileLock lock = channel.tryLock(); if (lock == null) { LOG.warn(STR + file.getName()...
/** * setFile sets the file object for this Paged. * *@param file The File */
setFile sets the file object for this Paged
setFile
{ "repo_name": "orbeon/eXist-1.4.x", "path": "src/org/exist/storage/btree/Paged.java", "license": "lgpl-2.1", "size": 34205 }
[ "java.io.File", "java.io.IOException", "java.io.RandomAccessFile", "java.nio.channels.FileChannel", "java.nio.channels.FileLock", "java.nio.channels.NonWritableChannelException" ]
import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; import java.nio.channels.NonWritableChannelException;
import java.io.*; import java.nio.channels.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,269,261
private List<Konsultation> getAllKonsultationen(IProgressMonitor monitor){ Query<Konsultation> qbe = new Query<Konsultation>(Konsultation.class); qbe.add(Konsultation.FLD_BILL_ID, StringConstants.EMPTY, null); qbe.add(Konsultation.FLD_BILLABLE, Query.EQUALS, "1"); monitor.beginTask(Messages.Rechnungslauf_ana...
List<Konsultation> function(IProgressMonitor monitor){ Query<Konsultation> qbe = new Query<Konsultation>(Konsultation.class); qbe.add(Konsultation.FLD_BILL_ID, StringConstants.EMPTY, null); qbe.add(Konsultation.FLD_BILLABLE, Query.EQUALS, "1"); monitor.beginTask(Messages.Rechnungslauf_analyzingConsultations, IProgressM...
/** * get all kons. that are not billed yet * * @param monitor * @return list of all not yet billed konsultationen */
get all kons. that are not billed yet
getAllKonsultationen
{ "repo_name": "elexis/elexis-3-core", "path": "bundles/ch.elexis.core.ui/src/ch/elexis/core/ui/views/rechnung/Rechnungslauf.java", "license": "epl-1.0", "size": 12634 }
[ "ch.elexis.core.constants.StringConstants", "ch.elexis.data.Konsultation", "ch.elexis.data.Query", "java.util.List", "org.eclipse.core.runtime.IProgressMonitor" ]
import ch.elexis.core.constants.StringConstants; import ch.elexis.data.Konsultation; import ch.elexis.data.Query; import java.util.List; import org.eclipse.core.runtime.IProgressMonitor;
import ch.elexis.core.constants.*; import ch.elexis.data.*; import java.util.*; import org.eclipse.core.runtime.*;
[ "ch.elexis.core", "ch.elexis.data", "java.util", "org.eclipse.core" ]
ch.elexis.core; ch.elexis.data; java.util; org.eclipse.core;
2,298,996
public Object getObject() { try { InputStream is = new ByteArrayInputStream(m_Serialized); if (m_Compressed) { is = new GZIPInputStream(is); } is = new BufferedInputStream(is); ObjectInputStream oi = new ObjectInputStream(is); ...
Object function() { try { InputStream is = new ByteArrayInputStream(m_Serialized); if (m_Compressed) { is = new GZIPInputStream(is); } is = new BufferedInputStream(is); ObjectInputStream oi = new ObjectInputStream(is); Object result = oi.readObject(); oi.close(); return result; } catch (Exception ex) { ex.printStackTra...
/** * Gets the object stored in this SerializedObject. The object returned * will be a deep copy of the original stored object. * * @return the deserialized Object. */
Gets the object stored in this SerializedObject. The object returned will be a deep copy of the original stored object
getObject
{ "repo_name": "adofsauron/KEEL", "path": "src/keel/Algorithms/Decision_Trees/M5/SerializedObject.java", "license": "gpl-3.0", "size": 8799 }
[ "java.io.BufferedInputStream", "java.io.ByteArrayInputStream", "java.io.InputStream", "java.io.ObjectInputStream", "java.util.zip.GZIPInputStream" ]
import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.ObjectInputStream; import java.util.zip.GZIPInputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,693,891
@Test public void retrieveTest() { Contact contact = persistence.retrieve(getContact().getName()); Assert.assertNotNull(contact); }
void function() { Contact contact = persistence.retrieve(getContact().getName()); Assert.assertNotNull(contact); }
/** * run the test. */
run the test
retrieveTest
{ "repo_name": "gustavoleitao/Easy-Cassandra", "path": "src/test/java/org/easycassandra/bean/ContactsDAOTest.java", "license": "apache-2.0", "size": 1352 }
[ "junit.framework.Assert", "org.easycassandra.bean.model.Contact" ]
import junit.framework.Assert; import org.easycassandra.bean.model.Contact;
import junit.framework.*; import org.easycassandra.bean.model.*;
[ "junit.framework", "org.easycassandra.bean" ]
junit.framework; org.easycassandra.bean;
2,569,245
public static String escapeLikeLiteral(String literal, char escapeChar) { // escape instances of the escape char, '%' or '_' String escapeStr = String.valueOf(escapeChar); return literal.replaceAll("([%_" + Pattern.quote(escapeStr) + "])", Matcher.quoteReplacement(escapeStr) ...
static String function(String literal, char escapeChar) { String escapeStr = String.valueOf(escapeChar); return literal.replaceAll("([%_" + Pattern.quote(escapeStr) + "])", Matcher.quoteReplacement(escapeStr) + "$1"); }
/** * Escapes the special chars '%', '_', and the given char itself in the * given literal string using the given escape character. * * @param literal string to escape as a literal pattern * @param escapeChar escape character to use to escape the literal * @return the escaped string */
Escapes the special chars '%', '_', and the given char itself in the given literal string using the given escape character
escapeLikeLiteral
{ "repo_name": "jahlborn/sqlbuilder", "path": "src/main/java/com/healthmarketscience/sqlbuilder/BinaryCondition.java", "license": "apache-2.0", "size": 8752 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,194,647
public void storeEnvelopeString (String s) throws UnsupportedEncodingException, EncodingFailedException, DecodingFailedException { cache = new Envelope ( (String) s, getActiveAgent()); cache.close(); } private Envelope groupCache = null;
void function (String s) throws UnsupportedEncodingException, EncodingFailedException, DecodingFailedException { cache = new Envelope ( (String) s, getActiveAgent()); cache.close(); } private Envelope groupCache = null;
/** * test for envelopes: get stored String * * @param s * @throws UnsupportedEncodingException * @throws EncodingFailedException * @throws DecodingFailedException */
test for envelopes: get stored String
storeEnvelopeString
{ "repo_name": "AlexRuppert/las2peer_project", "path": "java/i5/las2peer/testing/TestService.java", "license": "mit", "size": 8124 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
556,291
public static ClosableIterator<String> getAllSubject(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { return Base.getAll(model, instanceResource, SUBJECT, String.class); }
static ClosableIterator<String> function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { return Base.getAll(model, instanceResource, SUBJECT, String.class); }
/** * Get all values of property Subject * @param model an RDF2Go model * * @param resource * an RDF2Go resource * @return a ClosableIterator of $type * * [Generated from RDFReactor template rule #get11static] */
Get all values of property Subject
getAllSubject
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java", "license": "mit", "size": 317844 }
[ "org.ontoware.aifbcommons.collection.ClosableIterator", "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.aifbcommons.collection.ClosableIterator; import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.aifbcommons.collection.*; import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.aifbcommons", "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.aifbcommons; org.ontoware.rdf2go; org.ontoware.rdfreactor;
1,084,041
private void register(Path dir) throws IOException { WatchKey key = dir.register(watcher, new WatchEvent.Kind[]{ENTRY_CREATE, ENTRY_MODIFY}, SensitivityWatchEventModifier.HIGH); Path prev = keys.get(key); if (prev == null) { log.debug("Directory : '{}' will be monitore...
void function(Path dir) throws IOException { WatchKey key = dir.register(watcher, new WatchEvent.Kind[]{ENTRY_CREATE, ENTRY_MODIFY}, SensitivityWatchEventModifier.HIGH); Path prev = keys.get(key); if (prev == null) { log.debug(STR, dir); } keys.put(key, dir); }
/** * Register the given directory with the WatchService. */
Register the given directory with the WatchService
register
{ "repo_name": "jfiala/swagger-spring-demo", "path": "sandbox/user-rest-service-1.0.2-sandbox/src/main/java/at/fwd/swagger/spring/demo/user/jhipsterclone/FjxJHipsterFileWatcher.java", "license": "apache-2.0", "size": 9265 }
[ "com.sun.nio.file.SensitivityWatchEventModifier", "java.io.IOException", "java.nio.file.Path", "java.nio.file.WatchEvent", "java.nio.file.WatchKey" ]
import com.sun.nio.file.SensitivityWatchEventModifier; import java.io.IOException; import java.nio.file.Path; import java.nio.file.WatchEvent; import java.nio.file.WatchKey;
import com.sun.nio.file.*; import java.io.*; import java.nio.file.*;
[ "com.sun.nio", "java.io", "java.nio" ]
com.sun.nio; java.io; java.nio;
1,458,655
private void assertCurrentIdentityColumnValueBetween(long minValue, long maxValue) { SQLTestUtils.executeUpdate("delete from test_table1", dataSource); SQLTestUtils.executeUpdate("insert into test_table1(col2) values('test')", dataSource); long currentValue = SQLTestUtils.getItemAsLong("s...
void function(long minValue, long maxValue) { SQLTestUtils.executeUpdate(STR, dataSource); SQLTestUtils.executeUpdate(STR, dataSource); long currentValue = SQLTestUtils.getItemAsLong(STR, dataSource); assertTrue(STR + minValue + STR + maxValue, (currentValue >= minValue && currentValue <= maxValue)); }
/** * Asserts that the current value for the identity column test_table.col1 is between the given values. * * @param minValue The minimum value (included) * @param maxValue The maximum value (included) */
Asserts that the current value for the identity column test_table.col1 is between the given values
assertCurrentIdentityColumnValueBetween
{ "repo_name": "intouchfollowup/dbmaintain", "path": "dbmaintain/src/test/java/org/dbmaintain/structure/SequenceUpdaterTest.java", "license": "apache-2.0", "size": 14056 }
[ "org.dbmaintain.util.SQLTestUtils", "org.junit.Assert" ]
import org.dbmaintain.util.SQLTestUtils; import org.junit.Assert;
import org.dbmaintain.util.*; import org.junit.*;
[ "org.dbmaintain.util", "org.junit" ]
org.dbmaintain.util; org.junit;
132,128
public Point getPosition() { return position; }
Point function() { return position; }
/** * Gets the Position, that is stored in the message from the client. * * @return The position of the client */
Gets the Position, that is stored in the message from the client
getPosition
{ "repo_name": "flyroom/PeerfactSimKOM_Clone", "path": "src/org/peerfact/impl/overlay/informationdissemination/cs/messages/JoinMessage.java", "license": "gpl-2.0", "size": 3580 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,844,201
public static String getRedirect(String urlstring) throws IOException { return getRedirect(urlstring, true); }
static String function(String urlstring) throws IOException { return getRedirect(urlstring, true); }
/** * get a redirect for an url: this method shall be called if it is expected that a url * is redirected to another url. This method then discovers the redirect. * @param urlstring URL String for redirection * @return * @throws IOException */
get a redirect for an url: this method shall be called if it is expected that a url is redirected to another url. This method then discovers the redirect
getRedirect
{ "repo_name": "DravitLochan/susi_server", "path": "src/ai/susi/server/ClientConnection.java", "license": "lgpl-2.1", "size": 14430 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,148,168
public JobInformation build(String accountName, BuildJobParameters parameters) { return buildWithServiceResponseAsync(accountName, parameters).toBlocking().single().body(); }
JobInformation function(String accountName, BuildJobParameters parameters) { return buildWithServiceResponseAsync(accountName, parameters).toBlocking().single().body(); }
/** * Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation. * * @param accountName The Azure Data Lake Analytics account to execute job operations on. * @param parameters The parameters to build a job. * @throws IllegalArgumentExcep...
Builds (compiles) the specified job in the specified Data Lake Analytics account for job correctness and validation
build
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/JobsImpl.java", "license": "mit", "size": 61017 }
[ "com.microsoft.azure.management.datalake.analytics.models.BuildJobParameters", "com.microsoft.azure.management.datalake.analytics.models.JobInformation" ]
import com.microsoft.azure.management.datalake.analytics.models.BuildJobParameters; import com.microsoft.azure.management.datalake.analytics.models.JobInformation;
import com.microsoft.azure.management.datalake.analytics.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
801,329
void enterSingleAlias(@NotNull CQLParser.SingleAliasContext ctx); void exitSingleAlias(@NotNull CQLParser.SingleAliasContext ctx);
void enterSingleAlias(@NotNull CQLParser.SingleAliasContext ctx); void exitSingleAlias(@NotNull CQLParser.SingleAliasContext ctx);
/** * Exit a parse tree produced by {@link CQLParser#singleAlias}. */
Exit a parse tree produced by <code>CQLParser#singleAlias</code>
exitSingleAlias
{ "repo_name": "HuaweiBigData/StreamCQL", "path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java", "license": "apache-2.0", "size": 58667 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,798,859
protected List<Command> buildCommandChain(Config rootConfig, String configKey, Command finalChild, boolean ignoreNotifications) { Preconditions.checkNotNull(rootConfig); Preconditions.checkNotNull(configKey); Preconditions.checkNotNull(finalChild); List<? extends Config> commandConfigs = new Configs()...
List<Command> function(Config rootConfig, String configKey, Command finalChild, boolean ignoreNotifications) { Preconditions.checkNotNull(rootConfig); Preconditions.checkNotNull(configKey); Preconditions.checkNotNull(finalChild); List<? extends Config> commandConfigs = new Configs().getConfigList(rootConfig, configKey,...
/** * Factory method to create the chain of commands rooted at the given rootConfig. The last command * in the chain will feed records into finalChild. * * @param ignoreNotifications * if true indicates don't forward notifications at the end of the chain of commands. * This is a fea...
Factory method to create the chain of commands rooted at the given rootConfig. The last command in the chain will feed records into finalChild
buildCommandChain
{ "repo_name": "whoschek/kite", "path": "kite-morphlines/kite-morphlines-core/src/main/java/org/kitesdk/morphline/base/AbstractCommand.java", "license": "apache-2.0", "size": 10926 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.Lists", "com.typesafe.config.Config", "java.util.Collections", "java.util.List", "org.kitesdk.morphline.api.Command" ]
import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.typesafe.config.Config; import java.util.Collections; import java.util.List; import org.kitesdk.morphline.api.Command;
import com.google.common.base.*; import com.google.common.collect.*; import com.typesafe.config.*; import java.util.*; import org.kitesdk.morphline.api.*;
[ "com.google.common", "com.typesafe.config", "java.util", "org.kitesdk.morphline" ]
com.google.common; com.typesafe.config; java.util; org.kitesdk.morphline;
494,243
public static ResourceSchema avroSchemaToResourceSchema( final Schema s, final Boolean allowRecursiveSchema) throws IOException { return avroSchemaToResourceSchema(s, Sets.<Schema> newHashSet(), Maps.<String, ResourceSchema> newHashMap(), allowRecursiveSchema); }
static ResourceSchema function( final Schema s, final Boolean allowRecursiveSchema) throws IOException { return avroSchemaToResourceSchema(s, Sets.<Schema> newHashSet(), Maps.<String, ResourceSchema> newHashMap(), allowRecursiveSchema); }
/** * Translates an Avro schema to a Resource Schema (for Pig). * @param s The avro schema for which to determine the type * @param allowRecursiveSchema Flag indicating whether to * throw an error if a recursive schema definition is found * @throws IOException * @return the corresponding pig schema ...
Translates an Avro schema to a Resource Schema (for Pig)
avroSchemaToResourceSchema
{ "repo_name": "hxquangnhat/PIG-ROLLUP-MRCUBE", "path": "src/org/apache/pig/impl/util/avro/AvroStorageSchemaConversionUtilities.java", "license": "apache-2.0", "size": 22779 }
[ "com.google.common.collect.Maps", "com.google.common.collect.Sets", "java.io.IOException", "org.apache.avro.Schema", "org.apache.pig.ResourceSchema" ]
import com.google.common.collect.Maps; import com.google.common.collect.Sets; import java.io.IOException; import org.apache.avro.Schema; import org.apache.pig.ResourceSchema;
import com.google.common.collect.*; import java.io.*; import org.apache.avro.*; import org.apache.pig.*;
[ "com.google.common", "java.io", "org.apache.avro", "org.apache.pig" ]
com.google.common; java.io; org.apache.avro; org.apache.pig;
1,373,784
public void start() { synchronized (HostStatSampler.class) { if (statThread != null) { try { int msToWait = getSampleRate() + 100; statThread.join(msToWait); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } if (statThread...
void function() { synchronized (HostStatSampler.class) { if (statThread != null) { try { int msToWait = getSampleRate() + 100; statThread.join(msToWait); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } if (statThread.isAlive()) { throw new IllegalStateException( LocalizedStrings.HostStatSample...
/** * Starts the main thread for this service. * * @throws IllegalStateException if an instance of the {@link #statThread} is still running from a * previous DistributedSystem. */
Starts the main thread for this service
start
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java", "license": "apache-2.0", "size": 18700 }
[ "java.util.concurrent.TimeUnit", "org.apache.geode.internal.i18n.LocalizedStrings", "org.apache.geode.internal.logging.LoggingThreadGroup" ]
import java.util.concurrent.TimeUnit; import org.apache.geode.internal.i18n.LocalizedStrings; import org.apache.geode.internal.logging.LoggingThreadGroup;
import java.util.concurrent.*; import org.apache.geode.internal.i18n.*; import org.apache.geode.internal.logging.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
2,125,546
public void onEffectPageChangePage(View view, int currentPage);
void function(View view, int currentPage);
/** * Switch to new page. * * @param view Page content view. * @param currentPage new page index. */
Switch to new page
onEffectPageChangePage
{ "repo_name": "mingming-killer/K7UI", "path": "K7UI/src/com/eebbk/mingming/k7ui/effect/view/EffectPageContainer.java", "license": "apache-2.0", "size": 50146 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,087,571
private void performChecks() { if (!DefaultConnectorTypes.isValid(getItem().getType())) { LOGGER.error("Connector type '{}' not recognized, setting to 'left-input'.", getItem().getType()); getItem().setType(DefaultConnectorTypes.LEFT_INPUT); } }
void function() { if (!DefaultConnectorTypes.isValid(getItem().getType())) { LOGGER.error(STR, getItem().getType()); getItem().setType(DefaultConnectorTypes.LEFT_INPUT); } }
/** * Checks that the connector has the correct values to be displayed using this skin. */
Checks that the connector has the correct values to be displayed using this skin
performChecks
{ "repo_name": "eckig/graph-editor", "path": "core/src/main/java/de/tesis/dynaware/grapheditor/core/skins/defaults/DefaultConnectorSkin.java", "license": "epl-1.0", "size": 6640 }
[ "de.tesis.dynaware.grapheditor.core.connectors.DefaultConnectorTypes" ]
import de.tesis.dynaware.grapheditor.core.connectors.DefaultConnectorTypes;
import de.tesis.dynaware.grapheditor.core.connectors.*;
[ "de.tesis.dynaware" ]
de.tesis.dynaware;
2,501,530
@Test public void testClientRetriesSucceedsSecondTime() throws Exception { Configuration conf = new Configuration(); conf.setInt( CommonConfigurationKeysPublic.KMS_CLIENT_FAILOVER_MAX_RETRIES_KEY, 3); KMSClientProvider p1 = mock(KMSClientProvider.class); when(p1.createKey(Mockito.anyString()...
void function() throws Exception { Configuration conf = new Configuration(); conf.setInt( CommonConfigurationKeysPublic.KMS_CLIENT_FAILOVER_MAX_RETRIES_KEY, 3); KMSClientProvider p1 = mock(KMSClientProvider.class); when(p1.createKey(Mockito.anyString(), Mockito.any(Options.class))) .thenThrow(new ConnectTimeoutExceptio...
/** * Tests the operation succeeds second time after ConnectTimeoutException. * @throws Exception */
Tests the operation succeeds second time after ConnectTimeoutException
testClientRetriesSucceedsSecondTime
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto/key/kms/TestLoadBalancingKMSClientProvider.java", "license": "apache-2.0", "size": 36062 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.crypto.key.KeyProvider", "org.apache.hadoop.fs.CommonConfigurationKeysPublic", "org.apache.hadoop.net.ConnectTimeoutException", "org.junit.Assert", "org.mockito.Mockito" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.crypto.key.KeyProvider; import org.apache.hadoop.fs.CommonConfigurationKeysPublic; import org.apache.hadoop.net.ConnectTimeoutException; import org.junit.Assert; import org.mockito.Mockito;
import org.apache.hadoop.conf.*; import org.apache.hadoop.crypto.key.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.net.*; import org.junit.*; import org.mockito.*;
[ "org.apache.hadoop", "org.junit", "org.mockito" ]
org.apache.hadoop; org.junit; org.mockito;
1,401,104
T visitSql_update(@NotNull sqlParser.Sql_updateContext ctx);
T visitSql_update(@NotNull sqlParser.Sql_updateContext ctx);
/** * Visit a parse tree produced by {@link sqlParser#sql_update}. * @param ctx the parse tree * @return the visitor result */
Visit a parse tree produced by <code>sqlParser#sql_update</code>
visitSql_update
{ "repo_name": "GreatStone/Mini-DBMS", "path": "MySql/src/DBMS/parser/sqlVisitor.java", "license": "gpl-2.0", "size": 8062 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
309,007
private boolean systemListenerChange(Object topic, GridMessageListener exp, GridMessageListener newVal) { assert Thread.holdsLock(sysLsnrsMux); assert topic instanceof GridTopic; int idx = systemListenerIndex(topic); GridMessageListener old = sysLsnrs[idx]; if (old != null...
boolean function(Object topic, GridMessageListener exp, GridMessageListener newVal) { assert Thread.holdsLock(sysLsnrsMux); assert topic instanceof GridTopic; int idx = systemListenerIndex(topic); GridMessageListener old = sysLsnrs[idx]; if (old != null && old.equals(exp)) { changeSystemListener(idx, newVal); return tr...
/** * Change system listener. * * @param topic Topic. * @param exp Expected value. * @param newVal New value. * @return Result. */
Change system listener
systemListenerChange
{ "repo_name": "alexzaitzev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java", "license": "apache-2.0", "size": 102499 }
[ "org.apache.ignite.internal.GridTopic" ]
import org.apache.ignite.internal.GridTopic;
import org.apache.ignite.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,382,448
public static <T> Stream<T> stream(Cycle<T> source) { return stream(source, Cycle::next); } /** * Uses {@code source} as a supplier for a stream of pairs of {@code T}
static <T> Stream<T> function(Cycle<T> source) { return stream(source, Cycle::next); } /** * Uses {@code source} as a supplier for a stream of pairs of {@code T}
/** * Uses {@code source} as a supplier for a stream of {@code T} elements * produced by invocations of {@link Cycle#next() source.next()}. * @param source the elements supply. * @return a stream of {@code T}'s as produced by {@code source}. * @throws NullPointerException if {@code null} argume...
Uses source as a supplier for a stream of T elements produced by invocations of <code>Cycle#next() source.next()</code>
stream
{ "repo_name": "c0c0n3/spring-doh", "path": "src/main/java/app/core/cyclic/Cycles.java", "license": "gpl-3.0", "size": 2567 }
[ "java.util.stream.Stream" ]
import java.util.stream.Stream;
import java.util.stream.*;
[ "java.util" ]
java.util;
2,773,657
private boolean fighting() { if (entity.getAttackTarget() == null || !entity.getAttackTarget().isAlive()) { entity.getNavigator().clearPath(); attackPath = null; return true; } if (attacktimer > 0) { attacktimer--; ...
boolean function() { if (entity.getAttackTarget() == null !entity.getAttackTarget().isAlive()) { entity.getNavigator().clearPath(); attackPath = null; return true; } if (attacktimer > 0) { attacktimer--; } if (attackPath == null !attackPath.isInProgress()) { entity.getNavigator().moveToLivingEntity(entity.getAttackTarg...
/** * Fighting against a target * * @return false if we are still fighting */
Fighting against a target
fighting
{ "repo_name": "Minecolonies/minecolonies", "path": "src/main/java/com/minecolonies/coremod/entity/mobs/EntityMercenaryAI.java", "license": "gpl-3.0", "size": 8596 }
[ "com.minecolonies.api.util.BlockPosUtil", "net.minecraft.util.EntityDamageSource", "net.minecraft.util.Hand", "net.minecraft.util.SoundEvents", "net.minecraft.util.math.BlockPos" ]
import com.minecolonies.api.util.BlockPosUtil; import net.minecraft.util.EntityDamageSource; import net.minecraft.util.Hand; import net.minecraft.util.SoundEvents; import net.minecraft.util.math.BlockPos;
import com.minecolonies.api.util.*; import net.minecraft.util.*; import net.minecraft.util.math.*;
[ "com.minecolonies.api", "net.minecraft.util" ]
com.minecolonies.api; net.minecraft.util;
2,265,984
public Location getLocation() { return location; }
Location function() { return location; }
/** * Gets the location of the inventory, if there is one. Returns null if no location could be found. * @return location of the inventory */
Gets the location of the inventory, if there is one. Returns null if no location could be found
getLocation
{ "repo_name": "Spoutcraft/SpoutcraftPlugin", "path": "src/main/java/org/getspout/spoutapi/event/inventory/InventoryEvent.java", "license": "lgpl-3.0", "size": 2086 }
[ "org.bukkit.Location" ]
import org.bukkit.Location;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
859,321
public void addSeeAlso() { Base.removeAll(this.model, this.getResource(), SEEALSO); }
void function() { Base.removeAll(this.model, this.getResource(), SEEALSO); }
/** * Removes all values of property SeeAlso * [Generated from RDFReactor * template rule #removeall1dynamic] */
Removes all values of property SeeAlso * [Generated from RDFReactor template rule #removeall1dynamic]
addSeeAlso
{ "repo_name": "semweb4j/semweb4j", "path": "org.semweb4j.rdfreactor.generator/src/main/java/org/ontoware/rdfreactor/schema/bootstrap/Resource.java", "license": "bsd-2-clause", "size": 83665 }
[ "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdfreactor" ]
org.ontoware.rdfreactor;
1,541,725
private PermissibleValue getPermissibleValueObject(Set permissibleValues, String conceptCode) { PermissibleValue permissibleValue = null ; Iterator iterator = permissibleValues.iterator(); while (iterator.hasNext()) { permissibleValue = (PermissibleValue) iterator.next(); if (permissibleValue.g...
PermissibleValue function(Set permissibleValues, String conceptCode) { PermissibleValue permissibleValue = null ; Iterator iterator = permissibleValues.iterator(); while (iterator.hasNext()) { permissibleValue = (PermissibleValue) iterator.next(); if (permissibleValue.getValue().equals(conceptCode)) { break ; } } retur...
/** * Returns the permissible value object for the concept code from the Set of permissible values. * @param permissibleValues The Set of permissible values. * @param conceptCode The conceptCode whose permissible value object is required. * @return the permissible value object for the concept code from the ...
Returns the permissible value object for the concept code from the Set of permissible values
getPermissibleValueObject
{ "repo_name": "NCIP/commons-module", "path": "software/washu-commons/src/main/java/edu/wustl/common/cde/CDECacheManager.java", "license": "bsd-3-clause", "size": 8107 }
[ "java.util.Iterator", "java.util.Set" ]
import java.util.Iterator; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
370,789
public Paint getItemOutlinePaint(int row, int column);
Paint function(int row, int column);
/** * Returns the paint used to outline data items as they are drawn. * * @param row the row (or series) index (zero-based). * @param column the column (or category) index (zero-based). * * @return The paint (never <code>null</code>). */
Returns the paint used to outline data items as they are drawn
getItemOutlinePaint
{ "repo_name": "SpoonLabs/astor", "path": "examples/chart_11/source/org/jfree/chart/renderer/category/CategoryItemRenderer.java", "license": "gpl-2.0", "size": 64985 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,678,463
public static <T> Set<T> createHashSet() { return new HashSet<T>(); }
static <T> Set<T> function() { return new HashSet<T>(); }
/** * Returns a hash set typed to the generics specified in the method call */
Returns a hash set typed to the generics specified in the method call
createHashSet
{ "repo_name": "dbolser-ebi/ensj-healthcheck", "path": "src/org/ensembl/healthcheck/util/CollectionUtils.java", "license": "apache-2.0", "size": 6277 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,109,177
public int compareTo(Object obj) { Trigger other = (Trigger) obj; Date myTime = getNextFireTime(); Date otherTime = other.getNextFireTime(); if (myTime == null && otherTime == null) { return 0; } if (myTime == null) { return 1; } ...
int function(Object obj) { Trigger other = (Trigger) obj; Date myTime = getNextFireTime(); Date otherTime = other.getNextFireTime(); if (myTime == null && otherTime == null) { return 0; } if (myTime == null) { return 1; } if (otherTime == null) { return -1; } if(myTime.before(otherTime)) { return -1; } if(myTime.after(...
/** * <p> * Compare the next fire time of this <code>Trigger</code> to that of * another. * </p> */
Compare the next fire time of this <code>Trigger</code> to that of another.
compareTo
{ "repo_name": "feigeai/opensymphony-quartz-backup", "path": "src/java/org/quartz/Trigger.java", "license": "apache-2.0", "size": 31513 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
501,830
private Object writeReplace() { return new SerializationProxy(this); } private static class SerializationProxy implements Serializable { public SerializationProxy() {} public SerializationProxy(Write write) { configuration = write.configuration; tableId = write.tableId; ...
Object function() { return new SerializationProxy(this); } private static class SerializationProxy implements Serializable { public SerializationProxy() {} public SerializationProxy(Write write) { configuration = write.configuration; tableId = write.tableId; }
/** * The writeReplace method allows the developer to provide a replacement object that will be * serialized instead of the original one. We use this to keep the enclosed class immutable. For * more details on the technique see <a * href="https://lingpipe-blog.com/2009/08/10/serializing-immutable-si...
The writeReplace method allows the developer to provide a replacement object that will be serialized instead of the original one. We use this to keep the enclosed class immutable. For more details on the technique see this article
writeReplace
{ "repo_name": "iemejia/incubator-beam", "path": "sdks/java/io/hbase/src/main/java/org/apache/beam/sdk/io/hbase/HBaseIO.java", "license": "apache-2.0", "size": 27217 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,057,962
public void setContactCommunication(Collection<ContactCommunication> contactCommunication){ this.contactCommunication = contactCommunication; }
void function(Collection<ContactCommunication> contactCommunication){ this.contactCommunication = contactCommunication; }
/** * Sets the value of contactCommunication attribue **/
Sets the value of contactCommunication attribue
setContactCommunication
{ "repo_name": "NCIP/cagrid2", "path": "cagrid-mms/cagrid-mms-cadsr-impl/src/main/java/gov/nih/nci/cadsr/domain/Organization.java", "license": "bsd-3-clause", "size": 6005 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,333,256
private void addVariable (String varName, V[] dom) { // Initialize the last messages received from and sent to this variable node this.lastMsgsIn.put(varName, zeroSpace(varName, dom)); } } private HashMap<String, FunctionInfo> functionInfos; private final int maxNbrIter; private Queue que...
void function (String varName, V[] dom) { this.lastMsgsIn.put(varName, zeroSpace(varName, dom)); } } private HashMap<String, FunctionInfo> functionInfos; private final int maxNbrIter; private Queue queue; private DCOPProblemInterface<V, U> problem; private boolean silent = false; private boolean started = false; privat...
/** Adds a variable to this FunctionInfo * @param varName the variable name * @param dom the variable domain */
Adds a variable to this FunctionInfo
addVariable
{ "repo_name": "heniancheng/FRODO", "path": "src/frodo2/algorithms/maxsum/MaxSum.java", "license": "agpl-3.0", "size": 24965 }
[ "java.util.ArrayList", "java.util.HashMap", "org.jdom2.Element" ]
import java.util.ArrayList; import java.util.HashMap; import org.jdom2.Element;
import java.util.*; import org.jdom2.*;
[ "java.util", "org.jdom2" ]
java.util; org.jdom2;
1,483,702
@Test public void debugExceptionAndFormattedStringWithTwoInts() { RuntimeException exception = new RuntimeException(); logger.debugf(exception, "%d + %d", 1, 2); if (debugEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(exception), any(PrintfStyleFormatter.class), eq("%d + %d"), eq(...
void function() { RuntimeException exception = new RuntimeException(); logger.debugf(exception, STR, 1, 2); if (debugEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(exception), any(PrintfStyleFormatter.class), eq(STR), eq(1), eq(2)); } else { verify(provider, never()).log(anyInt(), anyString(), a...
/** * Verifies that an exception and a formatted string with two integer arguments will be logged correctly at * {@link Level#DEBUG DEBUG} level. */
Verifies that an exception and a formatted string with two integer arguments will be logged correctly at <code>Level#DEBUG DEBUG</code> level
debugExceptionAndFormattedStringWithTwoInts
{ "repo_name": "pmwmedia/tinylog", "path": "jboss-tinylog/src/test/java/org/tinylog/jboss/TinylogLoggerTest.java", "license": "apache-2.0", "size": 189291 }
[ "org.mockito.ArgumentMatchers", "org.mockito.Mockito", "org.tinylog.Level", "org.tinylog.format.PrintfStyleFormatter" ]
import org.mockito.ArgumentMatchers; import org.mockito.Mockito; import org.tinylog.Level; import org.tinylog.format.PrintfStyleFormatter;
import org.mockito.*; import org.tinylog.*; import org.tinylog.format.*;
[ "org.mockito", "org.tinylog", "org.tinylog.format" ]
org.mockito; org.tinylog; org.tinylog.format;
1,061,132
static List<HpackHeader> headers(HpackHeadersSize size, boolean limitToAscii) { return headersMap.get(new HeadersKey(size, limitToAscii)); }
static List<HpackHeader> headers(HpackHeadersSize size, boolean limitToAscii) { return headersMap.get(new HeadersKey(size, limitToAscii)); }
/** * Gets headers for the given size and whether the key/values should be limited to ASCII. */
Gets headers for the given size and whether the key/values should be limited to ASCII
headers
{ "repo_name": "s-gheldd/netty", "path": "microbench/src/main/java/io/netty/handler/codec/http2/HpackUtil.java", "license": "apache-2.0", "size": 3783 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,612,978
return new KieRuntimeFactory(kieBase); } private KieRuntimeFactory(KieBase kieBase) { this.kieBase = kieBase; }
return new KieRuntimeFactory(kieBase); } private KieRuntimeFactory(KieBase kieBase) { this.kieBase = kieBase; }
/** * Creates an instance of this factory for the given KieBase */
Creates an instance of this factory for the given KieBase
of
{ "repo_name": "droolsjbpm/droolsjbpm-knowledge", "path": "kie-api/src/main/java/org/kie/api/runtime/KieRuntimeFactory.java", "license": "apache-2.0", "size": 2559 }
[ "org.kie.api.KieBase" ]
import org.kie.api.KieBase;
import org.kie.api.*;
[ "org.kie.api" ]
org.kie.api;
797,461
public List getGlobalJobListeners() { return sched.getGlobalJobListeners(); }
List function() { return sched.getGlobalJobListeners(); }
/** * <p> * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>. * </p> */
Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
getGlobalJobListeners
{ "repo_name": "feigeai/opensymphony-quartz-backup", "path": "trunk/src/java/org/quartz/impl/StdScheduler.java", "license": "apache-2.0", "size": 24746 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,465,547
// [START print_results] private static void printResults(List<TableRow> rows) { System.out.print("\nQuery Results:\n------------\n"); for (TableRow row : rows) { for (TableCell field : row.getF()) { System.out.printf("%-50s", field.getV()); } System.out.println(); } } // ...
static void function(List<TableRow> rows) { System.out.print(STR); for (TableRow row : rows) { for (TableCell field : row.getF()) { System.out.printf("%-50s", field.getV()); } System.out.println(); } }
/** * Prints the results to standard out. * * @param rows the rows to print. */
Prints the results to standard out
printResults
{ "repo_name": "tswast/java-docs-samples", "path": "bigquery/src/main/java/com/google/cloud/bigquery/samples/GettingStarted.java", "license": "apache-2.0", "size": 5423 }
[ "com.google.api.services.bigquery.model.TableCell", "com.google.api.services.bigquery.model.TableRow", "java.util.List" ]
import com.google.api.services.bigquery.model.TableCell; import com.google.api.services.bigquery.model.TableRow; import java.util.List;
import com.google.api.services.bigquery.model.*; import java.util.*;
[ "com.google.api", "java.util" ]
com.google.api; java.util;
860,305
public void voidVisitInt(IStrategoInt arg) { currentBuffer.put(getHeader(arg)); writeInt(arg.intValue()); }
void function(IStrategoInt arg) { currentBuffer.put(getHeader(arg)); writeInt(arg.intValue()); }
/** * Serializes the given int. Ints will always be serialized in one piece. */
Serializes the given int. Ints will always be serialized in one piece
voidVisitInt
{ "repo_name": "metaborg/mb-rep", "path": "org.spoofax.terms/src/org/spoofax/terms/io/binary/SAFWriter.java", "license": "apache-2.0", "size": 17722 }
[ "org.spoofax.interpreter.terms.IStrategoInt" ]
import org.spoofax.interpreter.terms.IStrategoInt;
import org.spoofax.interpreter.terms.*;
[ "org.spoofax.interpreter" ]
org.spoofax.interpreter;
503,304
ServiceResponse<Void> getMethodLocalNull() throws ErrorException, IOException;
ServiceResponse<Void> getMethodLocalNull() throws ErrorException, IOException;
/** * Get method with api-version modeled in the method. pass in api-version = null to succeed. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the {@link ServiceResponse} object if successful. ...
Get method with api-version modeled in the method. pass in api-version = null to succeed
getMethodLocalNull
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/azurespecials/ApiVersionLocals.java", "license": "mit", "size": 6039 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
854,037
public void test_format_LString$LObject_GeneralConversionS() { final Object[][] triple = { { Boolean.FALSE, "%2.3s", "fal", }, { Boolean.FALSE, "%-6.4s", "fals ", }, { Boolean.FALSE, "%.5s", "false", }, { Boolean.TRUE, "%2.3s", "tru", }, ...
public void test_format_LString$LObject_GeneralConversionS() { final Object[][] triple = { { Boolean.FALSE, "%2.3sSTRfal", }, { Boolean.FALSE, STR, STR, }, { Boolean.FALSE, "%.5sSTRfalse", }, { Boolean.TRUE, "%2.3sSTRtru", }, { Boolean.TRUE, STR, STR, }, { Boolean.TRUE, "%.5sSTRtrue", }, { new Character('c'), "%2.3s", ...
/** * java.util.Formatter#format(String, Object...) for general * conversion type 's' and 'S' */
java.util.Formatter#format(String, Object...) for general conversion type 's' and 'S'
test_format_LString$LObject_GeneralConversionS
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/FormatterTest.java", "license": "apache-2.0", "size": 189619 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
760,638
@JsonProperty("pool_hit_file") public Handle getPoolHitFile() { return poolHitFile; }
@JsonProperty(STR) Handle function() { return poolHitFile; }
/** * <p>Original spec-file type: Handle</p> * <pre> * @optional hid file_name type url remote_md5 remote_sha1 * </pre> * */
Original spec-file type: Handle <code>
getPoolHitFile
{ "repo_name": "jmchandonia/RBTnSeq", "path": "lib/src/us/kbase/kbaserbtnseq/Pool.java", "license": "mit", "size": 6976 }
[ "com.fasterxml.jackson.annotation.JsonProperty", "us.kbase.kbaseassembly.Handle" ]
import com.fasterxml.jackson.annotation.JsonProperty; import us.kbase.kbaseassembly.Handle;
import com.fasterxml.jackson.annotation.*; import us.kbase.kbaseassembly.*;
[ "com.fasterxml.jackson", "us.kbase.kbaseassembly" ]
com.fasterxml.jackson; us.kbase.kbaseassembly;
2,363,344
@Test @JUnitSnmpAgents(value={ @JUnitSnmpAgent(host=FOREIGN_NODE_IP_ADDRESS, resource="classpath:org/opennms/netmgt/snmp/stonegate.properties"), @JUnitSnmpAgent(host="149.134.45.45", resource="classpath:org/opennms/netmgt/snmp/stonegate.properties"), @JUnitSnmpAgent(host="172.16.201.2", ...
@JUnitSnmpAgents(value={ @JUnitSnmpAgent(host=FOREIGN_NODE_IP_ADDRESS, resource=STR), @JUnitSnmpAgent(host=STR, resource=STR), @JUnitSnmpAgent(host=STR, resource=STR), @JUnitSnmpAgent(host=STR, resource=STR), @JUnitSnmpAgent(host=STR, resource=STR), @JUnitSnmpAgent(host=STR, resource=STR), @JUnitSnmpAgent(host=STR, res...
/** * Refactored from org.opennms.netmgt.capsd.ScanSuspectTest * * TODO: Add checks to this unit test to make sure that the suspect scan works correctly */
Refactored from org.opennms.netmgt.capsd.ScanSuspectTest
testStartStop
{ "repo_name": "RangerRick/opennms", "path": "opennms-services/src/test/java/org/opennms/netmgt/capsd/CapsdIntegrationTest.java", "license": "gpl-2.0", "size": 8972 }
[ "java.io.IOException", "org.exolab.castor.xml.MarshalException", "org.exolab.castor.xml.ValidationException", "org.opennms.core.test.db.MockDatabase", "org.opennms.core.test.db.annotations.JUnitTemporaryDatabase", "org.opennms.core.test.snmp.annotations.JUnitSnmpAgent", "org.opennms.core.test.snmp.annot...
import java.io.IOException; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.ValidationException; import org.opennms.core.test.db.MockDatabase; import org.opennms.core.test.db.annotations.JUnitTemporaryDatabase; import org.opennms.core.test.snmp.annotations.JUnitSnmpAgent; import org.opennms....
import java.io.*; import org.exolab.castor.xml.*; import org.opennms.core.test.db.*; import org.opennms.core.test.db.annotations.*; import org.opennms.core.test.snmp.annotations.*;
[ "java.io", "org.exolab.castor", "org.opennms.core" ]
java.io; org.exolab.castor; org.opennms.core;
1,005,644
interface GoogleBigqueryComponentBuilder extends ComponentBuilder<GoogleBigQueryComponent> { default GoogleBigqueryComponentBuilder connectionFactory( org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory connectionFactory) { ...
interface GoogleBigqueryComponentBuilder extends ComponentBuilder<GoogleBigQueryComponent> { default GoogleBigqueryComponentBuilder connectionFactory( org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory connectionFactory) { doSetProperty(STR, connectionFactory); return this; }
/** * ConnectionFactory to obtain connection to Bigquery Service. If non * provided the default one will be used. * * The option is a: * <code>org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory</code> type. * * Group: producer ...
ConnectionFactory to obtain connection to Bigquery Service. If non provided the default one will be used. The option is a: <code>org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory</code> type. Group: producer
connectionFactory
{ "repo_name": "adessaigne/camel", "path": "core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GoogleBigqueryComponentBuilderFactory.java", "license": "apache-2.0", "size": 6169 }
[ "org.apache.camel.builder.component.ComponentBuilder", "org.apache.camel.component.google.bigquery.GoogleBigQueryComponent" ]
import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.google.bigquery.GoogleBigQueryComponent;
import org.apache.camel.builder.component.*; import org.apache.camel.component.google.bigquery.*;
[ "org.apache.camel" ]
org.apache.camel;
2,680,751
@Test public void testNestedOk() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(NestedForDepthCheck.class); checkConfig.addAttribute("max", "4"); final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY; verify(checkConfig, getPath("cod...
void function() throws Exception { final DefaultConfiguration checkConfig = createCheckConfig(NestedForDepthCheck.class); checkConfig.addAttribute("max", "4"); final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY; verify(checkConfig, getPath(STR), expected); }
/** * Call the check allowing 4 layers of nested for-statements. This * means the top-level for can contain up to 4 levels of nested for * statements. As the test input has 4 layers of for-statements below * the top-level for statement, this must not cause an * error-message. * * @thr...
Call the check allowing 4 layers of nested for-statements. This means the top-level for can contain up to 4 levels of nested for statements. As the test input has 4 layers of for-statements below the top-level for statement, this must not cause an error-message
testNestedOk
{ "repo_name": "rmswimkktt/checkstyle", "path": "src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/NestedForDepthCheckTest.java", "license": "lgpl-2.1", "size": 3579 }
[ "com.puppycrawl.tools.checkstyle.DefaultConfiguration", "org.apache.commons.lang3.ArrayUtils" ]
import com.puppycrawl.tools.checkstyle.DefaultConfiguration; import org.apache.commons.lang3.ArrayUtils;
import com.puppycrawl.tools.checkstyle.*; import org.apache.commons.lang3.*;
[ "com.puppycrawl.tools", "org.apache.commons" ]
com.puppycrawl.tools; org.apache.commons;
1,222,895
public OutputStream getOutputStream() throws IOException { return mCaller != null ? mCaller.getOutputStream() : null; }
OutputStream function() throws IOException { return mCaller != null ? mCaller.getOutputStream() : null; }
/** * Delegate to calling template. */
Delegate to calling template
getOutputStream
{ "repo_name": "ncso/openmarker", "path": "src/main/java/openmarker/tea/compiler/CompiledTemplate.java", "license": "apache-2.0", "size": 8446 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,014,546
public void testIsDebit_errorCorrection_source_expense_positveAmount() throws Exception { AccountingDocument accountingDocument = IsDebitTestUtils.getErrorCorrectionDocument(SpringContext.getBean(DocumentService.class), InternalBillingDocument.class); AccountingLine accountingLine = IsDebitTestUti...
void function() throws Exception { AccountingDocument accountingDocument = IsDebitTestUtils.getErrorCorrectionDocument(SpringContext.getBean(DocumentService.class), InternalBillingDocument.class); AccountingLine accountingLine = IsDebitTestUtils.getExpenseLine(accountingDocument, SourceAccountingLine.class, POSITIVE); ...
/** * tests false is returned for positive expense * * @throws Exception */
tests false is returned for positive expense
testIsDebit_errorCorrection_source_expense_positveAmount
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "test/unit/src/org/kuali/kfs/fp/document/validation/impl/InternalBillingDocumentRuleTest.java", "license": "agpl-3.0", "size": 67511 }
[ "org.kuali.kfs.fp.document.InternalBillingDocument", "org.kuali.kfs.sys.businessobject.AccountingLine", "org.kuali.kfs.sys.businessobject.SourceAccountingLine", "org.kuali.kfs.sys.context.SpringContext", "org.kuali.kfs.sys.document.AccountingDocument", "org.kuali.kfs.sys.service.IsDebitTestUtils", "org....
import org.kuali.kfs.fp.document.InternalBillingDocument; import org.kuali.kfs.sys.businessobject.AccountingLine; import org.kuali.kfs.sys.businessobject.SourceAccountingLine; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.kfs.sys.document.AccountingDocument; import org.kuali.kfs.sys.service.IsDebitTe...
import org.kuali.kfs.fp.document.*; import org.kuali.kfs.sys.businessobject.*; import org.kuali.kfs.sys.context.*; import org.kuali.kfs.sys.document.*; import org.kuali.kfs.sys.service.*; import org.kuali.rice.kns.service.*; import org.kuali.rice.krad.service.*;
[ "org.kuali.kfs", "org.kuali.rice" ]
org.kuali.kfs; org.kuali.rice;
1,944,101
@Test (timeout = 30000) public void testDestroyProcessTree() throws IOException { // test process String pid = "100"; // create the fake procfs root directory. File procfsRootDir = new File(TEST_ROOT_DIR, "proc"); try { setupProcfsRootDir(procfsRootDir); // crank up the process tre...
@Test (timeout = 30000) void function() throws IOException { String pid = "100"; File procfsRootDir = new File(TEST_ROOT_DIR, "proc"); try { setupProcfsRootDir(procfsRootDir); createProcessTree(pid, procfsRootDir.getAbsolutePath()); Assert.assertTrue(ProcfsBasedProcessTree.checkPidPgrpidForMatch( pid, procfsRootDir.get...
/** * Verifies ProcfsBasedProcessTree.checkPidPgrpidForMatch() in case of * 'constructProcessInfo() returning null' by not writing stat file for the * mock process * @throws IOException if there was a problem setting up the * fake procfs directories or files. */
Verifies ProcfsBasedProcessTree.checkPidPgrpidForMatch() in case of 'constructProcessInfo() returning null' by not writing stat file for the mock process
testDestroyProcessTree
{ "repo_name": "JuntaoZhang/myhadoop-2.2.0", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java", "license": "apache-2.0", "size": 28195 }
[ "java.io.File", "java.io.IOException", "org.apache.hadoop.fs.FileUtil", "org.apache.hadoop.yarn.util.ProcfsBasedProcessTree", "org.junit.Assert", "org.junit.Test" ]
import java.io.File; import java.io.IOException; import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.yarn.util.ProcfsBasedProcessTree; import org.junit.Assert; import org.junit.Test;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.yarn.util.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
440,964
public static String getReadableFileSize(int size) { final int BYTES_IN_KILOBYTES = 1024; final DecimalFormat dec = new DecimalFormat("###.#"); final String KILOBYTES = " KB"; final String MEGABYTES = " MB"; final String GIGABYTES = " GB"; float fileSize = 0; ...
static String function(int size) { final int BYTES_IN_KILOBYTES = 1024; final DecimalFormat dec = new DecimalFormat("###.#"); final String KILOBYTES = STR; final String MEGABYTES = STR; final String GIGABYTES = STR; float fileSize = 0; String suffix = KILOBYTES; if (size > BYTES_IN_KILOBYTES) { fileSize = size / BYTES_...
/** * Get the file size in a human-readable string. * * @param size * @return * @author paulburke */
Get the file size in a human-readable string
getReadableFileSize
{ "repo_name": "redleaf2002/magic_imageloader_network", "path": "sample/MagicNetwork/magic/src/main/java/com/leaf/magic/utils/FileUtils.java", "license": "mit", "size": 23335 }
[ "java.text.DecimalFormat" ]
import java.text.DecimalFormat;
import java.text.*;
[ "java.text" ]
java.text;
2,407,670
@Test public void testJSSimple() { Processor processor = new Processor(); processor.setProperty("alpha", "25"); assertEquals("3", processor.getReplacer() .process("${js;1+2;}")); assertEquals("25", processor.getReplacer() .process("${js;domain.get('alpha');}")); assertEquals("5", processor.getReplac...
void function() { Processor processor = new Processor(); processor.setProperty("alpha", "25"); assertEquals("3", processor.getReplacer() .process(STR)); assertEquals("25", processor.getReplacer() .process(STR)); assertEquals("5", processor.getReplacer() .process(STR)); }
/** * Test Javascript stuff */
Test Javascript stuff
testJSSimple
{ "repo_name": "psoreide/bnd", "path": "biz.aQute.bndlib.tests/test/test/MacroTest.java", "license": "apache-2.0", "size": 62632 }
[ "org.junit.jupiter.api.Assertions" ]
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
1,811,203
public static void convertSocket(FileDescriptor fd) throws IOException { if (!isSupported) throw new UnsupportedOperationException("SDP not supported on this platform"); int fdVal = fdAccess.get(fd); convert0(fdVal); }
static void function(FileDescriptor fd) throws IOException { if (!isSupported) throw new UnsupportedOperationException(STR); int fdVal = fdAccess.get(fd); convert0(fdVal); }
/** * Converts an existing file descriptor, that references an unbound TCP socket, * to SDP. */
Converts an existing file descriptor, that references an unbound TCP socket, to SDP
convertSocket
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.base/share/classes/sun/net/sdp/SdpSupport.java", "license": "gpl-2.0", "size": 3189 }
[ "java.io.FileDescriptor", "java.io.IOException" ]
import java.io.FileDescriptor; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,380,187
mergeEntries = new MergeEntries(this.originalEntry, this.fetchedEntry, Localization.lang("Original entry"), Localization.lang("Entry from %0", type), panel.getBibDatabaseContext().getMode()); // Create undo-compound ce = new NamedCompound(Localization.lang("Merge entry with %0 informati...
mergeEntries = new MergeEntries(this.originalEntry, this.fetchedEntry, Localization.lang(STR), Localization.lang(STR, type), panel.getBibDatabaseContext().getMode()); ce = new NamedCompound(Localization.lang(STR, type)); FormLayout layout = new FormLayout(STR, STR); this.setLayout(layout); this.add(mergeEntries.getMerg...
/** * Sets up the dialog */
Sets up the dialog
init
{ "repo_name": "tobiasdiez/jabref", "path": "src/main/java/org/jabref/gui/mergeentries/MergeFetchedEntryDialog.java", "license": "mit", "size": 6353 }
[ "com.jgoodies.forms.builder.ButtonBarBuilder", "com.jgoodies.forms.layout.ColumnSpec", "com.jgoodies.forms.layout.FormLayout", "com.jgoodies.forms.layout.RowSpec", "javax.swing.AbstractAction", "javax.swing.Action", "javax.swing.JButton", "javax.swing.JSeparator", "org.jabref.gui.undo.NamedCompound"...
import com.jgoodies.forms.builder.ButtonBarBuilder; import com.jgoodies.forms.layout.ColumnSpec; import com.jgoodies.forms.layout.FormLayout; import com.jgoodies.forms.layout.RowSpec; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.JButton; import javax.swing.JSeparator; import org.jabr...
import com.jgoodies.forms.builder.*; import com.jgoodies.forms.layout.*; import javax.swing.*; import org.jabref.gui.undo.*; import org.jabref.gui.util.*; import org.jabref.logic.l10n.*; import org.jabref.preferences.*;
[ "com.jgoodies.forms", "javax.swing", "org.jabref.gui", "org.jabref.logic", "org.jabref.preferences" ]
com.jgoodies.forms; javax.swing; org.jabref.gui; org.jabref.logic; org.jabref.preferences;
927,657
@Override public boolean isValidRow(Map<String, Object> row) { // no conditions if (equalMap.size() == 0) { return true; } // compare each condition value for (Map.Entry<String, Object> entry : equalMap.entrySet()) { if (!row.containsKey(entry.getKey())) { return false; ...
boolean function(Map<String, Object> row) { if (equalMap.size() == 0) { return true; } for (Map.Entry<String, Object> entry : equalMap.entrySet()) { if (!row.containsKey(entry.getKey())) { return false; } Object value = row.get(entry.getKey()); if (entry.getValue() == null) { if (value == null) { return true; } return ...
/** * Check valid row. */
Check valid row
isValidRow
{ "repo_name": "ananthc/apex-malhar", "path": "contrib/src/main/java/org/apache/apex/malhar/contrib/misc/streamquery/condition/EqualValueCondition.java", "license": "apache-2.0", "size": 2558 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
710,401
private void loadCachedSettings() { Cursor localSettings = SiteSettingsTable.getSettings(mBlog.getRemoteBlogId()); if (localSettings != null) { Map<Integer, CategoryModel> cachedModels = SiteSettingsTable.getAllCategories(); mSettings.deserializeOptionsDatabaseCursor(localSe...
void function() { Cursor localSettings = SiteSettingsTable.getSettings(mBlog.getRemoteBlogId()); if (localSettings != null) { Map<Integer, CategoryModel> cachedModels = SiteSettingsTable.getAllCategories(); mSettings.deserializeOptionsDatabaseCursor(localSettings, cachedModels); mSettings.language = languageIdToLanguag...
/** * Need to defer loading the cached settings to a thread so it completes after initialization. */
Need to defer loading the cached settings to a thread so it completes after initialization
loadCachedSettings
{ "repo_name": "karambir252/WordPress-Android", "path": "WordPress/src/main/java/org/wordpress/android/ui/prefs/SiteSettingsInterface.java", "license": "gpl-2.0", "size": 29425 }
[ "android.database.Cursor", "java.util.Map", "org.wordpress.android.datasets.SiteSettingsTable", "org.wordpress.android.models.CategoryModel", "org.wordpress.android.util.LanguageUtils" ]
import android.database.Cursor; import java.util.Map; import org.wordpress.android.datasets.SiteSettingsTable; import org.wordpress.android.models.CategoryModel; import org.wordpress.android.util.LanguageUtils;
import android.database.*; import java.util.*; import org.wordpress.android.datasets.*; import org.wordpress.android.models.*; import org.wordpress.android.util.*;
[ "android.database", "java.util", "org.wordpress.android" ]
android.database; java.util; org.wordpress.android;
582,086
@ApiModelProperty(example = "null", value = "") public String getOrganizationStatusCode() { return organizationStatusCode; }
@ApiModelProperty(example = "null", value = "") String function() { return organizationStatusCode; }
/** * Get organizationStatusCode * @return organizationStatusCode **/
Get organizationStatusCode
getOrganizationStatusCode
{ "repo_name": "PitneyBowes/LocationIntelligenceSDK-Java", "path": "src/main/java/pb/locationintelligence/model/Poi.java", "license": "apache-2.0", "size": 11372 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,832,025
public Texture getNormalMap(final int layer) { if (SceneApplication.getApplication().isOgl()) { Terrain terrain = (Terrain) getTerrain(null); if (terrain == null) return null; MatParam matParam = null; if (layer == 0) matParam =...
Texture function(final int layer) { if (SceneApplication.getApplication().isOgl()) { Terrain terrain = (Terrain) getTerrain(null); if (terrain == null) return null; MatParam matParam = null; if (layer == 0) matParam = terrain.getMaterial().getParam(STR); else matParam = terrain.getMaterial().getParam(STR+layer); if (ma...
/** * Get the normal map texture at the specified layer. * Run this on the GL thread! */
Get the normal map texture at the specified layer. Run this on the GL thread
getNormalMap
{ "repo_name": "OpenGrabeso/jmonkeyengine", "path": "sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorController.java", "license": "bsd-3-clause", "size": 45645 }
[ "com.jme3.gde.core.scene.SceneApplication", "com.jme3.material.MatParam", "com.jme3.terrain.Terrain", "com.jme3.texture.Texture" ]
import com.jme3.gde.core.scene.SceneApplication; import com.jme3.material.MatParam; import com.jme3.terrain.Terrain; import com.jme3.texture.Texture;
import com.jme3.gde.core.scene.*; import com.jme3.material.*; import com.jme3.terrain.*; import com.jme3.texture.*;
[ "com.jme3.gde", "com.jme3.material", "com.jme3.terrain", "com.jme3.texture" ]
com.jme3.gde; com.jme3.material; com.jme3.terrain; com.jme3.texture;
875,988
public void setSystemPaths(PatternFilter systemPaths) { this.systemPaths = systemPaths; }
void function(PatternFilter systemPaths) { this.systemPaths = systemPaths; }
/** * A list of regular expressions that represent patterns of system paths. * */
A list of regular expressions that represent patterns of system paths
setSystemPaths
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/model/filefolder/FilenameFilteringInterceptor.java", "license": "lgpl-3.0", "size": 15272 }
[ "org.alfresco.util.PatternFilter" ]
import org.alfresco.util.PatternFilter;
import org.alfresco.util.*;
[ "org.alfresco.util" ]
org.alfresco.util;
1,501,994
public Map<String, Object> getVisitTypeColorAndShortName(VisitType type) { Map<String, Object> colorAndShortName = new HashMap<String, Object>(); if (type.getUuid().equals(LFHCFormsConstants.OUTPATIENT_VISIT_TYPE_UUID)) { colorAndShortName.put("color", LFHCFormsConstants.OUTPATIENT_COLOR); colorAndShortN...
Map<String, Object> function(VisitType type) { Map<String, Object> colorAndShortName = new HashMap<String, Object>(); if (type.getUuid().equals(LFHCFormsConstants.OUTPATIENT_VISIT_TYPE_UUID)) { colorAndShortName.put("color", LFHCFormsConstants.OUTPATIENT_COLOR); colorAndShortName.put(STR, LFHCFormsConstants.OUTPATIENT_...
/** * Returns the color and short name attributes for a given visit type * * @param type VisitType * @return * */
Returns the color and short name attributes for a given visit type
getVisitTypeColorAndShortName
{ "repo_name": "mekomsolutions/openmrs-module-lfhcforms", "path": "api/src/main/java/org/openmrs/module/lfhcforms/utils/VisitTypeHelper.java", "license": "mit", "size": 8172 }
[ "java.util.HashMap", "java.util.Map", "org.openmrs.VisitType", "org.openmrs.module.lfhcforms.LFHCFormsConstants" ]
import java.util.HashMap; import java.util.Map; import org.openmrs.VisitType; import org.openmrs.module.lfhcforms.LFHCFormsConstants;
import java.util.*; import org.openmrs.*; import org.openmrs.module.lfhcforms.*;
[ "java.util", "org.openmrs", "org.openmrs.module" ]
java.util; org.openmrs; org.openmrs.module;
2,360,805
public void onLivingUpdate() { if (!this.onGround && this.motionY < 0.0D) { this.motionY *= 0.6D; } if (this.world.isRemote) { if (this.rand.nextInt(24) == 0 && !this.isSilent()) { this.world.playSound(this.posX + 0.5D,...
void function() { if (!this.onGround && this.motionY < 0.0D) { this.motionY *= 0.6D; } if (this.world.isRemote) { if (this.rand.nextInt(24) == 0 && !this.isSilent()) { this.world.playSound(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, SoundEvents.ENTITY_BLAZE_BURN, this.getSoundCategory(), 1.0F + this.rand.next...
/** * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons * use this to react to sunlight and start to burn. */
Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn
onLivingUpdate
{ "repo_name": "Severed-Infinity/technium", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/monster/EntityBlaze.java", "license": "gpl-3.0", "size": 11699 }
[ "net.minecraft.init.SoundEvents", "net.minecraft.util.EnumParticleTypes" ]
import net.minecraft.init.SoundEvents; import net.minecraft.util.EnumParticleTypes;
import net.minecraft.init.*; import net.minecraft.util.*;
[ "net.minecraft.init", "net.minecraft.util" ]
net.minecraft.init; net.minecraft.util;
1,919,569
final Instant createTime = Instant.parse( node.get(DruidConfigConstants.PROPERTIES) .get(DruidConfigConstants.CREATED).asText()); final String name = node.get(DruidConfigConstants.NAME).asText(); final List<Segment> segmentList = new ArrayList<>(); for (JsonNode segNo...
final Instant createTime = Instant.parse( node.get(DruidConfigConstants.PROPERTIES) .get(DruidConfigConstants.CREATED).asText()); final String name = node.get(DruidConfigConstants.NAME).asText(); final List<Segment> segmentList = new ArrayList<>(); for (JsonNode segNode : node.get(DruidConfigConstants.SEGMENTS)) { fina...
/** * get segment. * * @param node object node * @return segment object */
get segment
getDatasourceFromAllSegmentJsonObject
{ "repo_name": "tgianos/metacat", "path": "metacat-connector-druid/src/main/java/com/netflix/metacat/connector/druid/converter/DruidConverterUtil.java", "license": "apache-2.0", "size": 3854 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.netflix.metacat.connector.druid.DruidConfigConstants", "java.time.Instant", "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import com.fasterxml.jackson.databind.JsonNode; import com.netflix.metacat.connector.druid.DruidConfigConstants; import java.time.Instant; import java.util.ArrayList; import java.util.Collections; import java.util.List;
import com.fasterxml.jackson.databind.*; import com.netflix.metacat.connector.druid.*; import java.time.*; import java.util.*;
[ "com.fasterxml.jackson", "com.netflix.metacat", "java.time", "java.util" ]
com.fasterxml.jackson; com.netflix.metacat; java.time; java.util;
834,138
private int initFileDirTables() { try { initFileDirTables(root); } catch (IOException e) { System.err.println(e.getLocalizedMessage()); e.printStackTrace(); return -1; } if (dirs.isEmpty()) { System.err.println("The test space " + root + " is empty"); return -1; ...
int function() { try { initFileDirTables(root); } catch (IOException e) { System.err.println(e.getLocalizedMessage()); e.printStackTrace(); return -1; } if (dirs.isEmpty()) { System.err.println(STR + root + STR); return -1; } if (files.isEmpty()) { System.err.println(STR + root + STR); return -1; } return 0; }
/** Create a table that contains all directories under root and * another table that contains all files under root. */
Create a table that contains all directories under root and another table that contains all files under root
initFileDirTables
{ "repo_name": "shakamunyi/hadoop-20", "path": "src/contrib/benchmark/src/java/org/apache/hadoop/hdfs/LoadGenerator.java", "license": "apache-2.0", "size": 17735 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,537,257
public void testGetMultiple_simple() throws Exception { MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger(); server.setCacheEventLogger( cacheEventLogger ); // DO WORK server.getMultiple( "region", new HashSet<String>() ); // VERIFY assert...
void function() throws Exception { MockCacheEventLogger cacheEventLogger = new MockCacheEventLogger(); server.setCacheEventLogger( cacheEventLogger ); server.getMultiple( STR, new HashSet<String>() ); assertEquals( STR, 1, cacheEventLogger.startICacheEventCalls ); assertEquals( STR, 1, cacheEventLogger.endICacheEventCa...
/** * Verify event log calls. * <p> * @throws Exception */
Verify event log calls.
testGetMultiple_simple
{ "repo_name": "mohanaraosv/commons-jcs", "path": "commons-jcs-core/src/test/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServerUnitTest.java", "license": "apache-2.0", "size": 17365 }
[ "java.util.HashSet", "org.apache.commons.jcs.auxiliary.MockCacheEventLogger" ]
import java.util.HashSet; import org.apache.commons.jcs.auxiliary.MockCacheEventLogger;
import java.util.*; import org.apache.commons.jcs.auxiliary.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
452,636
@Test @IgnoreBrowser(value = "internet.*", version = "9\\.*", reason = "See https://jira.xwiki.org/browse/XE-1177") public void annotationsShouldNotBeShownInXWiki10Syntax() { AnnotatableViewPage annotatableViewPage = new AnnotatableViewPage( getUtil().createPage(getTestClassName(), g...
@IgnoreBrowser(value = STR, version = "9\\.*", reason = STRSome contentSTRAnnotationsTest in XWiki 1.0 SyntaxSTRxwiki/1.0")); annotatableViewPage.showAnnotationsPane(); assertTrue(annotatableViewPage.checkIfAnnotationsAreDisabled()); annotatableViewPage.simulateCTRL_M(); annotatableViewPage.waitforAnnotationWarningNoti...
/** * This test creates a XWiki 1.0 syntax page, and tries to add annotations to it, and checks if the warning messages * are shown This test is against XAANNOTATIONS-17 */
This test creates a XWiki 1.0 syntax page, and tries to add annotations to it, and checks if the warning messages are shown This test is against XAANNOTATIONS-17
annotationsShouldNotBeShownInXWiki10Syntax
{ "repo_name": "xwiki/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-annotation/xwiki-platform-annotation-test/xwiki-platform-annotation-test-tests/src/test/it/org/xwiki/annotation/test/ui/AnnotationsTest.java", "license": "lgpl-2.1", "size": 6509 }
[ "org.junit.Assert", "org.xwiki.test.ui.browser.IgnoreBrowser" ]
import org.junit.Assert; import org.xwiki.test.ui.browser.IgnoreBrowser;
import org.junit.*; import org.xwiki.test.ui.browser.*;
[ "org.junit", "org.xwiki.test" ]
org.junit; org.xwiki.test;
578,567
public static DateTimeExpression<Date> currentTimestamp() { return Constants.CURRENT_TIMESTAMP; }
static DateTimeExpression<Date> function() { return Constants.CURRENT_TIMESTAMP; }
/** * Create an expression representing the current time instant as a DateTimeExpression instance * * @return current timestamp */
Create an expression representing the current time instant as a DateTimeExpression instance
currentTimestamp
{ "repo_name": "balazs-zsoldos/querydsl", "path": "querydsl-core/src/main/java/com/querydsl/core/types/dsl/DateTimeExpression.java", "license": "apache-2.0", "size": 8080 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,258,721
public CountDownLatch updateOrderDiscountAsync(com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount discount, String orderId, Integer discountId, String updateMode, String version, String responseFields, AsyncCallback<com.mozu.api.contracts.commerceruntime.orders.Order> callback) throws Exception { Mo...
CountDownLatch function(com.mozu.api.contracts.commerceruntime.discounts.AppliedDiscount discount, String orderId, Integer discountId, String updateMode, String version, String responseFields, AsyncCallback<com.mozu.api.contracts.commerceruntime.orders.Order> callback) throws Exception { MozuClient<com.mozu.api.contrac...
/** * Update the properties of a discount applied to an order. * <p><pre><code> * Order order = new Order(); * CountDownLatch latch = order.updateOrderDiscount( discount, orderId, discountId, updateMode, version, responseFields, callback ); * latch.await() * </code></pre></p> * @param discountId disco...
Update the properties of a discount applied to an order. <code><code> Order order = new Order(); CountDownLatch latch = order.updateOrderDiscount( discount, orderId, discountId, updateMode, version, responseFields, callback ); latch.await() * </code></code>
updateOrderDiscountAsync
{ "repo_name": "bhewett/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/OrderResource.java", "license": "mit", "size": 52060 }
[ "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,068,511
public java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.LessThanHLAPI> getSubterm_finiteIntRanges_LessThanHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.LessThanHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.LessThanHLAPI>(); for (Term elemnt : get...
java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.LessThanHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.LessThanHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.LessThanHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.m...
/** * This accessor return a list of encapsulated subelement, only of LessThanHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of LessThanHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_finiteIntRanges_LessThanHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/GreaterThanHLAPI.java", "license": "epl-1.0", "size": 108533 }
[ "fr.lip6.move.pnml.hlpn.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
1,394,576
@Override public void resetTask() { owner = null; nav.clearPathEntity(); PathNavigate pathNavigate = dragon.getNavigator(); if (pathNavigate instanceof PathNavigateGround) { PathNavigateGround pathNavigateGround = (PathNavigateGround)pathNavigate; pathNavigateGround.func...
void function() { owner = null; nav.clearPathEntity(); PathNavigate pathNavigate = dragon.getNavigator(); if (pathNavigate instanceof PathNavigateGround) { PathNavigateGround pathNavigateGround = (PathNavigateGround)pathNavigate; pathNavigateGround.func_179690_a(avoidWater); } }
/** * Resets the task */
Resets the task
resetTask
{ "repo_name": "StingStriker353/More-Everything-Mod", "path": "src/main/java/com/riphtix/mem/server/entity/ai/ground/EntityAIDragonFollowOwner.java", "license": "lgpl-2.1", "size": 5796 }
[ "net.minecraft.pathfinding.PathNavigate", "net.minecraft.pathfinding.PathNavigateGround" ]
import net.minecraft.pathfinding.PathNavigate; import net.minecraft.pathfinding.PathNavigateGround;
import net.minecraft.pathfinding.*;
[ "net.minecraft.pathfinding" ]
net.minecraft.pathfinding;
1,983,387
private void actionPerformedNameSelect(GuiButton button) { if (button == backButton) { drawGenderSelectGui(); } else if (button == nextButton) { drawOptionsGui(); } }
void function(GuiButton button) { if (button == backButton) { drawGenderSelectGui(); } else if (button == nextButton) { drawOptionsGui(); } }
/** * Handles an action performed on the Name Select GUI. * * @param button The button that was pressed. */
Handles an action performed on the Name Select GUI
actionPerformedNameSelect
{ "repo_name": "MrPonyCaptain/minecraft-comes-alive", "path": "Minecraft/1.7.10/src/main/java/mca/client/gui/GuiSetup.java", "license": "gpl-3.0", "size": 11990 }
[ "net.minecraft.client.gui.GuiButton" ]
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.*;
[ "net.minecraft.client" ]
net.minecraft.client;
428,288
public synchronized void logout() { if (subject != null) { LOG.debug("Logout. Kerberos enabled '{}', Principal '{}'", securityConfiguration.isKerberosEnabled(), subject.getPrincipals()); if (loginContext != null) { try { loginContext.logout(); } catch (LoginException ...
synchronized void function() { if (subject != null) { LOG.debug(STR, securityConfiguration.isKerberosEnabled(), subject.getPrincipals()); if (loginContext != null) { try { loginContext.logout(); } catch (LoginException ex) { LOG.warn(STR, ex.toString(), ex); } finally { loginContext = null; } } subject = null; } }
/** * Logs out. If Keberos is enabled it logs out from the KDC, otherwise is a NOP. */
Logs out. If Keberos is enabled it logs out from the KDC, otherwise is a NOP
logout
{ "repo_name": "rockmkd/datacollector", "path": "container-common/src/main/java/com/streamsets/datacollector/security/SecurityContext.java", "license": "apache-2.0", "size": 12107 }
[ "javax.security.auth.login.LoginException" ]
import javax.security.auth.login.LoginException;
import javax.security.auth.login.*;
[ "javax.security" ]
javax.security;
2,567,213
public BigDecimal getCostStandardPOQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandardPOQty); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandardPOQty); if (bd == null) return Env.ZERO; return bd; }
/** Get Std PO Cost Quantity Sum. @return Standard Cost Purchase Order Quantity Sum (internal) */
Get Std PO Cost Quantity Sum
getCostStandardPOQty
{ "repo_name": "pplatek/adempiere", "path": "base/src/org/compiere/model/X_M_Product_Costing.java", "license": "gpl-2.0", "size": 11513 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
1,405,822
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<ProductContractInner> listByServiceAsync( String resourceGroupName, String serviceName, String filter, Integer top, Integer skip, Boolean expandGroups, String tags, Context context) ...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ProductContractInner> function( String resourceGroupName, String serviceName, String filter, Integer top, Integer skip, Boolean expandGroups, String tags, Context context) { return new PagedFlux<>( () -> listByServiceSinglePageAsync( resourceGroupName, serviceNa...
/** * Lists a collection of products in the specified service instance. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param filter | Field | Usage | Supported operators | Supported functions * |&lt;/br&gt;|-...
Lists a collection of products in the specified service instance
listByServiceAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/ProductsClientImpl.java", "license": "mit", "size": 97306 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.core.util.Context", "com.azure.resourcemanager.apimanagement.fluent.models.ProductContractInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.apimanagement.fluent.models.ProductContractInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.apimanagement.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,319,739
public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof AbstractRenderer)) { return false; } AbstractRenderer that = (AbstractRenderer) obj; if (!ObjectUtilities.equal(this.seriesVisible, that.seriesVisible)) ...
boolean function(Object obj) { if (obj == this) { return true; } if (!(obj instanceof AbstractRenderer)) { return false; } AbstractRenderer that = (AbstractRenderer) obj; if (!ObjectUtilities.equal(this.seriesVisible, that.seriesVisible)) { return false; } if (!this.seriesVisibleList.equals(that.seriesVisibleList)) { r...
/** * Tests this renderer for equality with another object. * * @param obj the object (<code>null</code> permitted). * * @return <code>true</code> or <code>false</code>. */
Tests this renderer for equality with another object
equals
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/renderer/AbstractRenderer.java", "license": "mit", "size": 126056 }
[ "org.jfree.util.ObjectUtilities", "org.jfree.util.PaintUtilities" ]
import org.jfree.util.ObjectUtilities; import org.jfree.util.PaintUtilities;
import org.jfree.util.*;
[ "org.jfree.util" ]
org.jfree.util;
1,565,001
@Test public void testAddTestScenarioToScenarioSuite() throws Exception { TestProject testProject = createTestProjectsInWS(); FitnesseFileSystemTestStructureService service = new FitnesseFileSystemTestStructureService(); ScenarioSuite scs = new ScenarioSuite(); scs.setName("ScenarioSuite"); testProject.ad...
void function() throws Exception { TestProject testProject = createTestProjectsInWS(); FitnesseFileSystemTestStructureService service = new FitnesseFileSystemTestStructureService(); ScenarioSuite scs = new ScenarioSuite(); scs.setName(STR); testProject.addChild(scs); service.createTestStructure(scs); TestScenario tsc =...
/** * Tests the Adding of a TestScenario to an existing ScenarioSuite. * * @throws Exception * on Test failure. */
Tests the Adding of a TestScenario to an existing ScenarioSuite
testAddTestScenarioToScenarioSuite
{ "repo_name": "franzbecker/test-editor", "path": "fitnesse/org.testeditor.fitnesse.test/src/org/testeditor/fitnesse/filesystem/FitnesseFileSystemTestStructureServiceTest.java", "license": "epl-1.0", "size": 20007 }
[ "java.nio.charset.StandardCharsets", "java.nio.file.Files", "java.nio.file.Paths", "org.eclipse.core.runtime.Platform", "org.junit.Assert", "org.testeditor.core.model.teststructure.ScenarioSuite", "org.testeditor.core.model.teststructure.TestProject", "org.testeditor.core.model.teststructure.TestScena...
import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import org.eclipse.core.runtime.Platform; import org.junit.Assert; import org.testeditor.core.model.teststructure.ScenarioSuite; import org.testeditor.core.model.teststructure.TestProject; import org.testeditor.core.model....
import java.nio.charset.*; import java.nio.file.*; import org.eclipse.core.runtime.*; import org.junit.*; import org.testeditor.core.model.teststructure.*;
[ "java.nio", "org.eclipse.core", "org.junit", "org.testeditor.core" ]
java.nio; org.eclipse.core; org.junit; org.testeditor.core;
619,394
private ValueNode timestampAddBind() throws StandardException { if( ! bindParameter( rightOperand, Types.INTEGER)) { int jdbcType = rightOperand.getTypeId().getJDBCTypeId(); if( jdbcType != Types.TINYINT && jdbcType != Types.SMALLINT && jdbcType != Types....
ValueNode function() throws StandardException { if( ! bindParameter( rightOperand, Types.INTEGER)) { int jdbcType = rightOperand.getTypeId().getJDBCTypeId(); if( jdbcType != Types.TINYINT && jdbcType != Types.SMALLINT && jdbcType != Types.INTEGER && jdbcType != Types.BIGINT) throw StandardException.newException(SQLStat...
/** * Bind TIMESTAMPADD expression. * * @return The new top of the expression tree. * * @exception StandardException Thrown on error */
Bind TIMESTAMPADD expression
timestampAddBind
{ "repo_name": "lpxz/grail-derby104", "path": "java/engine/org/apache/derby/impl/sql/compile/TernaryOperatorNode.java", "license": "apache-2.0", "size": 30919 }
[ "java.sql.Types", "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.reference.SQLState", "org.apache.derby.iapi.types.DataTypeDescriptor", "org.apache.derby.iapi.util.ReuseFactory" ]
import java.sql.Types; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.reference.SQLState; import org.apache.derby.iapi.types.DataTypeDescriptor; import org.apache.derby.iapi.util.ReuseFactory;
import java.sql.*; import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.reference.*; import org.apache.derby.iapi.types.*; import org.apache.derby.iapi.util.*;
[ "java.sql", "org.apache.derby" ]
java.sql; org.apache.derby;
1,274,831
EAttribute getMedium_Name();
EAttribute getMedium_Name();
/** * Returns the meta object for the attribute '{@link turnus.model.architecture.Medium#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see turnus.model.architecture.Medium#getName() * @see #getMedium() * @generate...
Returns the meta object for the attribute '<code>turnus.model.architecture.Medium#getName Name</code>'.
getMedium_Name
{ "repo_name": "turnus/turnus", "path": "turnus.model/src/turnus/model/architecture/ArchitecturePackage.java", "license": "gpl-3.0", "size": 44474 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,873,955
public static boolean canProduceEmptyMatches(final Pattern<?, ?> pattern) { NFAFactoryCompiler<?> compiler = new NFAFactoryCompiler<>(checkNotNull(pattern)); compiler.compileFactory(); State<?> startState = compiler.getStates().stream().filter(State::isStart).findFirst().orElseThrow( () -> new IllegalStateE...
static boolean function(final Pattern<?, ?> pattern) { NFAFactoryCompiler<?> compiler = new NFAFactoryCompiler<>(checkNotNull(pattern)); compiler.compileFactory(); State<?> startState = compiler.getStates().stream().filter(State::isStart).findFirst().orElseThrow( () -> new IllegalStateException(STR)); Set<State<?>> vis...
/** * Verifies if the provided pattern can possibly generate empty match. Example of patterns that can possibly * generate empty matches are: A*, A?, A* B? etc. * * @param pattern pattern to check * @return true if empty match could potentially match the pattern, false otherwise */
Verifies if the provided pattern can possibly generate empty match. Example of patterns that can possibly generate empty matches are: A*, A?, A* B? etc
canProduceEmptyMatches
{ "repo_name": "hequn8128/flink", "path": "flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/compiler/NFACompiler.java", "license": "apache-2.0", "size": 36644 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Optional", "java.util.Set", "java.util.Stack", "org.apache.flink.cep.nfa.State", "org.apache.flink.cep.nfa.StateTransition", "org.apache.flink.cep.nfa.StateTransitionAction", "org.apa...
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.Stack; import org.apache.flink.cep.nfa.State; import org.apache.flink.cep.nfa.StateTransition; import org.apache.flink.cep.nfa.St...
import java.util.*; import org.apache.flink.cep.nfa.*; import org.apache.flink.cep.nfa.aftermatch.*; import org.apache.flink.cep.pattern.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,821,773
public GeoDistanceSortBuilder points(GeoPoint... points) { this.points.addAll(Arrays.asList(points)); return this; }
GeoDistanceSortBuilder function(GeoPoint... points) { this.points.addAll(Arrays.asList(points)); return this; }
/** * The point to create the range distance facets from. * * @param points reference points. */
The point to create the range distance facets from
points
{ "repo_name": "fernandozhu/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/sort/GeoDistanceSortBuilder.java", "license": "apache-2.0", "size": 24980 }
[ "java.util.Arrays", "org.elasticsearch.common.geo.GeoPoint" ]
import java.util.Arrays; import org.elasticsearch.common.geo.GeoPoint;
import java.util.*; import org.elasticsearch.common.geo.*;
[ "java.util", "org.elasticsearch.common" ]
java.util; org.elasticsearch.common;
2,151,330
public static String asString(IBinding binding) { if (binding instanceof IMethodBinding) return asString((IMethodBinding)binding); else if (binding instanceof ITypeBinding) return ((ITypeBinding)binding).getQualifiedName(); else if (binding instanceof IVariableBinding) return asString((IVariableBindin...
static String function(IBinding binding) { if (binding instanceof IMethodBinding) return asString((IMethodBinding)binding); else if (binding instanceof ITypeBinding) return ((ITypeBinding)binding).getQualifiedName(); else if (binding instanceof IVariableBinding) return asString((IVariableBinding)binding); return bindin...
/** * Note: this method is for debugging and testing purposes only. * There are tests whose pre-computed test results rely on the returned String's format. * @param binding the binding * @return a string representation of given binding * @see org.eclipse.jdt.internal.ui.viewsupport.BindingLabelProvider */
Note: this method is for debugging and testing purposes only. There are tests whose pre-computed test results rely on the returned String's format
asString
{ "repo_name": "kumattau/JDTPatch", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/corext/dom/Bindings.java", "license": "epl-1.0", "size": 61660 }
[ "org.eclipse.jdt.core.dom.IBinding", "org.eclipse.jdt.core.dom.IMethodBinding", "org.eclipse.jdt.core.dom.ITypeBinding", "org.eclipse.jdt.core.dom.IVariableBinding" ]
import org.eclipse.jdt.core.dom.IBinding; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.IVariableBinding;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
527,403
public CategoryLocalService getCategoryLocalService() { return categoryLocalService; }
CategoryLocalService function() { return categoryLocalService; }
/** * Returns the category local service. * * @return the category local service */
Returns the category local service
getCategoryLocalService
{ "repo_name": "fraunhoferfokus/govapps", "path": "data-portlet/src/main/java/de/fraunhofer/fokus/movepla/service/base/CategoryLocalServiceBaseImpl.java", "license": "bsd-3-clause", "size": 42077 }
[ "de.fraunhofer.fokus.movepla.service.CategoryLocalService" ]
import de.fraunhofer.fokus.movepla.service.CategoryLocalService;
import de.fraunhofer.fokus.movepla.service.*;
[ "de.fraunhofer.fokus" ]
de.fraunhofer.fokus;
2,022,481
void checkAttributesSyntax(PerunSession sess, Vo vo, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException;
void checkAttributesSyntax(PerunSession sess, Vo vo, List<Attribute> attributes) throws WrongAttributeValueException, WrongAttributeAssignmentException;
/** * Batch version of checkAttributeSyntax * @throws WrongAttributeValueException if any of attributes values has wrong/illegal syntax * @see cz.metacentrum.perun.core.api.AttributesManager#checkAttributeSyntax(PerunSession,Vo,Attribute) */
Batch version of checkAttributeSyntax
checkAttributesSyntax
{ "repo_name": "zlamalp/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java", "license": "bsd-2-clause", "size": 244560 }
[ "cz.metacentrum.perun.core.api.Attribute", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.Vo", "cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException", "cz.metacentrum.perun.core.api.exceptions.WrongAttributeValueException", "java.util.List" ]
import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Vo; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeValueException; import java.util.Li...
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,814,118
protected String toJSONFragment() { StringBuffer json = new StringBuffer(); boolean first = true; if (isSetOrder()) { if (!first) json.append(", "); json.append("\"Order\" : ["); java.util.List<Order> orderList = getOrder(); int orderListIndex ...
String function() { StringBuffer json = new StringBuffer(); boolean first = true; if (isSetOrder()) { if (!first) json.append(STR); json.append("\"Order\STR); java.util.List<Order> orderList = getOrder(); int orderListIndex = 0; for (Order order : orderList) { if (orderListIndex > 0) json.append(STR); json.append("{");...
/** * * JSON fragment representation of this object * * @return JSON fragment for this object. Name for outer * object expected to be set by calling method. This fragment * returns inner properties representation only * */
JSON fragment representation of this object
toJSONFragment
{ "repo_name": "VDuda/SyncRunner-Pub", "path": "src/API/amazon/mws/orders/model/OrderList.java", "license": "mit", "size": 6522 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,677,035
public boolean handleActivityResult( int requestCode, int resultCode, Intent data );
boolean function( int requestCode, int resultCode, Intent data );
/** * this method is called when the Commander can't find what to do with an activity result */
this method is called when the Commander can't find what to do with an activity result
handleActivityResult
{ "repo_name": "svn2github/ghostcommander", "path": "src/com/ghostsq/commander/adapters/CommanderAdapter.java", "license": "gpl-3.0", "size": 13932 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
133,124
public void getBySiteId(String siteId, ITApiCallback<ITActivityKeys> callback) { mService.getBySite(siteId, true).enqueue(new ProxyCallback<>(callback)); }
void function(String siteId, ITApiCallback<ITActivityKeys> callback) { mService.getBySite(siteId, true).enqueue(new ProxyCallback<>(callback)); }
/** * Retrieves the activities of a given site by Intent Id. The callback returns the activity keys. * * @param siteId the ITSite's Intent id */
Retrieves the activities of a given site by Intent Id. The callback returns the activity keys
getBySiteId
{ "repo_name": "INTENT-TECHNOLOGIES/SDK-Android", "path": "sdk/android-sdk/src/main/java/eu/intent/sdk/api/ITActivityApi.java", "license": "apache-2.0", "size": 4489 }
[ "eu.intent.sdk.api.internal.ProxyCallback", "eu.intent.sdk.model.ITActivityKeys" ]
import eu.intent.sdk.api.internal.ProxyCallback; import eu.intent.sdk.model.ITActivityKeys;
import eu.intent.sdk.api.internal.*; import eu.intent.sdk.model.*;
[ "eu.intent.sdk" ]
eu.intent.sdk;
1,937,848
public void close() { closeAndNotify(); player.send(new CloseInterfaceEvent()); }
void function() { closeAndNotify(); player.send(new CloseInterfaceEvent()); }
/** * Closes the current open interface(s). */
Closes the current open interface(s)
close
{ "repo_name": "DealerNextDoor/ApolloDev", "path": "src/org/apollo/game/model/inter/InterfaceSet.java", "license": "isc", "size": 4694 }
[ "org.apollo.game.event.impl.CloseInterfaceEvent" ]
import org.apollo.game.event.impl.CloseInterfaceEvent;
import org.apollo.game.event.impl.*;
[ "org.apollo.game" ]
org.apollo.game;
882,954
public String[] getQuorumPeers() { List<String> l = new ArrayList<String>(); synchronized (this) { if (leader != null) { for (LearnerHandler fh : leader.getLearners()) { if (fh.getSocket() != null) { String s = fh.getSocket().ge...
String[] function() { List<String> l = new ArrayList<String>(); synchronized (this) { if (leader != null) { for (LearnerHandler fh : leader.getLearners()) { if (fh.getSocket() != null) { String s = fh.getSocket().getRemoteSocketAddress().toString(); if (leader.isLearnerSynced(fh)) s += "*"; l.add(s); } } } else if (fol...
/** * Only used by QuorumStats at the moment */
Only used by QuorumStats at the moment
getQuorumPeers
{ "repo_name": "QuickClaim/Services", "path": "src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java", "license": "apache-2.0", "size": 63258 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
999,237
public T create(T entity) { EntityManager em = getEm(); EntityTransaction transaction = em.getTransaction(); transaction.begin(); em.persist(entity); transaction.commit(); em.close(); return entity; }
T function(T entity) { EntityManager em = getEm(); EntityTransaction transaction = em.getTransaction(); transaction.begin(); em.persist(entity); transaction.commit(); em.close(); return entity; }
/** * Saves a given entity. Use the returned instance for further operations. * * @param entity The entity * @return the saved entity */
Saves a given entity. Use the returned instance for further operations
create
{ "repo_name": "TwilioDevEd/call-tracking-servlets", "path": "src/main/java/com/twilio/calltracking/repositories/Repository.java", "license": "mit", "size": 3378 }
[ "javax.persistence.EntityManager", "javax.persistence.EntityTransaction" ]
import javax.persistence.EntityManager; import javax.persistence.EntityTransaction;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,397,162
public int getForce(JVector3d aForce) { aForce = getPrevForce(); return (0); }
int function(JVector3d aForce) { aForce = getPrevForce(); return (0); }
/** * Read a sensed force [N] from the haptic device. * @param aForce * @return */
Read a sensed force [N] from the haptic device
getForce
{ "repo_name": "jchai3d/jchai3d", "path": "src/main/java/org/jchai3d/devices/JGenericHapticDevice.java", "license": "gpl-2.0", "size": 24927 }
[ "org.jchai3d.math.JVector3d" ]
import org.jchai3d.math.JVector3d;
import org.jchai3d.math.*;
[ "org.jchai3d.math" ]
org.jchai3d.math;
927,930
public List<Tuple3<FieldsTaxonomicGrouping, FieldsIsRepresentedBy, FieldsObservationalUnit>> getRelationshipIsRepresentedBy(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); ...
List<Tuple3<FieldsTaxonomicGrouping, FieldsIsRepresentedBy, FieldsObservationalUnit>> function(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); args.add(fromFields); args.add(re...
/** * <p>Original spec-file function name: get_relationship_IsRepresentedBy</p> * <pre> * This relationship associates observational units with a genus, * species, strain, and/or variety that was the source material. * It has the following fields: * =over 4 * =back * </pre> ...
Original spec-file function name: get_relationship_IsRepresentedBy <code> This relationship associates observational units with a genus, species, strain, and/or variety that was the source material. It has the following fields: =over 4 =back </code>
getRelationshipIsRepresentedBy
{ "repo_name": "kbase/trees", "path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java", "license": "mit", "size": 869221 }
[ "com.fasterxml.jackson.core.type.TypeReference", "java.io.IOException", "java.util.ArrayList", "java.util.List", "us.kbase.common.service.JsonClientException", "us.kbase.common.service.Tuple3" ]
import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3;
import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "us.kbase.common" ]
com.fasterxml.jackson; java.io; java.util; us.kbase.common;
1,967,702
void flush() throws IOException;
void flush() throws IOException;
/** * Flush the unwritten content to the current output. */
Flush the unwritten content to the current output
flush
{ "repo_name": "praveev/druid", "path": "processing/src/main/java/io/druid/segment/data/CompressionFactory.java", "license": "apache-2.0", "size": 13000 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,441,905
public PrintWriter getLogWriter() throws ResourceException { if (ActiveMQRAManagedConnectionFactory.trace) { ActiveMQRALogger.LOGGER.trace("getLogWriter()"); } return null; }
PrintWriter function() throws ResourceException { if (ActiveMQRAManagedConnectionFactory.trace) { ActiveMQRALogger.LOGGER.trace(STR); } return null; }
/** * Get the log writer -- NOT SUPPORTED * * @return The writer * @throws ResourceException Thrown if the writer can't be retrieved */
Get the log writer -- NOT SUPPORTED
getLogWriter
{ "repo_name": "ryanemerson/activemq-artemis", "path": "artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java", "license": "apache-2.0", "size": 22050 }
[ "java.io.PrintWriter", "javax.resource.ResourceException" ]
import java.io.PrintWriter; import javax.resource.ResourceException;
import java.io.*; import javax.resource.*;
[ "java.io", "javax.resource" ]
java.io; javax.resource;
650,588
Integer tKey = event.getTime(); //Get events scheduled for the same time Set<Event<?>> evtSet = this.events.get(tKey); //No event already scheduled for the given time if(evtSet == null){ //Create a new event set and add the event Set...
Integer tKey = event.getTime(); Set<Event<?>> evtSet = this.events.get(tKey); if(evtSet == null){ Set<Event<?>> eventSet = new HashSet<Event<?>>(); eventSet.add(event); this.events.put(new Integer(tKey), eventSet); } else { evtSet.add(event); } return tKey; }
/** * Add (schedule) a new event * * @param event to be added * @return event key (global time value) */
Add (schedule) a new event
add
{ "repo_name": "pcjesus/NetworkSimulator", "path": "src/msm/simulator/ScheduledEvents.java", "license": "mit", "size": 6167 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,864,262
public String process() { //Update Event Event event = eventHandler.updateEvent(userId, eventId, title, date, location, description); //send notification if (event != null) { //TODO } //Return new event/error response JsonObject jo = new JsonObject(); if (event == null) { ...
String function() { Event event = eventHandler.updateEvent(userId, eventId, title, date, location, description); if (event != null) { } JsonObject jo = new JsonObject(); if (event == null) { jo.addProperty(Command.SUCCES_VAR, false); if (eventUserHandler.isAdmin(userId, eventId)) { jo.addProperty(Command.ERROR_VAR, Com...
/** * Updates the event. Checks if the user is an admin of the event. Afterwards, sends a notification to all * members of the event. The returned String specifies if the operation was successful or not. */
Updates the event. Checks if the user is an admin of the event. Afterwards, sends a notification to all members of the event. The returned String specifies if the operation was successful or not
process
{ "repo_name": "JohannesCox/GOApp_Server", "path": "src/main/java/requestHandler/commands/UpdateEventCommand.java", "license": "mit", "size": 2812 }
[ "com.google.gson.JsonObject" ]
import com.google.gson.JsonObject;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
2,604,307
public void setStringConversionColumn(int stringConversionColumn) { mStringConversionColumn = stringConversionColumn; } /** * Returns the converter used to convert the filtering Cursor * into a String. * * @return null if the converter does not exist or an instance of * ...
void function(int stringConversionColumn) { mStringConversionColumn = stringConversionColumn; } /** * Returns the converter used to convert the filtering Cursor * into a String. * * @return null if the converter does not exist or an instance of * {@link android.widget.SimpleCursorAdapter.CursorToStringConverter}
/** * Defines the index of the column in the Cursor used to get a String * representation of that Cursor. The column is used to convert the * Cursor to a String only when the current CursorToStringConverter * is null. * * @param stringConversionColumn a valid index in the current Cursor or...
Defines the index of the column in the Cursor used to get a String representation of that Cursor. The column is used to convert the Cursor to a String only when the current CursorToStringConverter is null
setStringConversionColumn
{ "repo_name": "brian512/Helper", "path": "src/com/mobeta/android/dslv/SimpleDragSortCursorAdapter.java", "license": "epl-1.0", "size": 17060 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
2,007,738
public Set<? extends MvcEndpoint> getEndpoints() { return new HashSet<MvcEndpoint>(this.endpoints); }
Set<? extends MvcEndpoint> function() { return new HashSet<MvcEndpoint>(this.endpoints); }
/** * Return the endpoints * @return the endpoints */
Return the endpoints
getEndpoints
{ "repo_name": "jorgepgjr/spring-boot", "path": "spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointHandlerMapping.java", "license": "apache-2.0", "size": 5751 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,013,729
@Test void testStopAttack() { canAttack.set(true); attacker.setAttackChecker(t -> canAttack.get()); attacker.setAttackDistance(new Range(0, 2)); final Transformable target = new TransformableModel(services, setup); target.teleport(1, 1); attacker.att...
void testStopAttack() { canAttack.set(true); attacker.setAttackChecker(t -> canAttack.get()); attacker.setAttackDistance(new Range(0, 2)); final Transformable target = new TransformableModel(services, setup); target.teleport(1, 1); attacker.attack(target); attacker.update(1.0); attacker.update(1.0); assertTrue(attacker...
/** * Test the stop attack. */
Test the stop attack
testStopAttack
{ "repo_name": "b3dgs/lionengine", "path": "lionengine-game/src/test/java/com/b3dgs/lionengine/game/feature/attackable/AttackerModelTest.java", "license": "gpl-3.0", "size": 13911 }
[ "com.b3dgs.lionengine.Range", "com.b3dgs.lionengine.UtilAssert", "com.b3dgs.lionengine.game.feature.Transformable", "com.b3dgs.lionengine.game.feature.TransformableModel" ]
import com.b3dgs.lionengine.Range; import com.b3dgs.lionengine.UtilAssert; import com.b3dgs.lionengine.game.feature.Transformable; import com.b3dgs.lionengine.game.feature.TransformableModel;
import com.b3dgs.lionengine.*; import com.b3dgs.lionengine.game.feature.*;
[ "com.b3dgs.lionengine" ]
com.b3dgs.lionengine;
1,427,452