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 ArrayList<Event> getCalendar() { return calendar; }
ArrayList<Event> function() { return calendar; }
/** * Returns a calendar containing all the Events of this Study Profile. * * @return ArrayList of Events */
Returns a calendar containing all the Events of this Study Profile
getCalendar
{ "repo_name": "Miller189/RaiderPlanner", "path": "src/Model/StudyProfile.java", "license": "gpl-3.0", "size": 4928 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,336,029
public void setCompileDependencies( List compileDependencies ) { this.compileDependencies = compileDependencies; }
void function( List compileDependencies ) { this.compileDependencies = compileDependencies; }
/** * Sets the compile dependencies. * * @param compileDependencies the new compile dependencies */
Sets the compile dependencies
setCompileDependencies
{ "repo_name": "apache/maven-enforcer", "path": "enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/MockProject.java", "license": "apache-2.0", "size": 41927 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,837,315
public void enqueueRelightChecks() { if (this.queuedLightChecks < 4096) { BlockPos blockpos = new BlockPos(this.xPosition << 4, 0, this.zPosition << 4); for (int i = 0; i < 8; ++i) { if (this.queuedLightChecks >= 4096) { ...
void function() { if (this.queuedLightChecks < 4096) { BlockPos blockpos = new BlockPos(this.xPosition << 4, 0, this.zPosition << 4); for (int i = 0; i < 8; ++i) { if (this.queuedLightChecks >= 4096) { return; } int j = this.queuedLightChecks % 16; int k = this.queuedLightChecks / 16 % 16; int l = this.queuedLightCheck...
/** * Called once-per-chunk-per-tick, and advances the round-robin relight check index by up to 8 blocks at a time. In * a worst-case scenario, can potentially take up to 25.6 seconds, calculated via (4096/8)/20, to re-check all * blocks in a chunk, which may explain lagging light updates on initial worl...
Called once-per-chunk-per-tick, and advances the round-robin relight check index by up to 8 blocks at a time. In a worst-case scenario, can potentially take up to 25.6 seconds, calculated via (4096/8)/20, to re-check all blocks in a chunk, which may explain lagging light updates on initial world generation
enqueueRelightChecks
{ "repo_name": "boredherobrine13/morefuelsmod-1.10", "path": "build/tmp/recompileMc/sources/net/minecraft/world/chunk/Chunk.java", "license": "lgpl-2.1", "size": 53710 }
[ "net.minecraft.util.EnumFacing", "net.minecraft.util.math.BlockPos" ]
import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.*; import net.minecraft.util.math.*;
[ "net.minecraft.util" ]
net.minecraft.util;
189,402
public ApplicationGatewayProtocol protocol() { return this.protocol; }
ApplicationGatewayProtocol function() { return this.protocol; }
/** * Get the protocol value. * * @return the protocol value */
Get the protocol value
protocol
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayBackendHttpSettingsInner.java", "license": "mit", "size": 7397 }
[ "com.microsoft.azure.management.network.ApplicationGatewayProtocol" ]
import com.microsoft.azure.management.network.ApplicationGatewayProtocol;
import com.microsoft.azure.management.network.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,513,604
public boolean isDefaultSessionToken(String token) { if (getParam().getDefaultTokensEnabled().contains(token.toLowerCase(Locale.ENGLISH))) return true; return false; }
boolean function(String token) { if (getParam().getDefaultTokensEnabled().contains(token.toLowerCase(Locale.ENGLISH))) return true; return false; }
/** * Checks if a particular token is part of the default session tokens set by the user using the * options panel. The default session tokens are valid for all sites. The check is being * performed in a lower-case manner, as default session tokens are case-insensitive. * * @param token the token * @return...
Checks if a particular token is part of the default session tokens set by the user using the options panel. The default session tokens are valid for all sites. The check is being performed in a lower-case manner, as default session tokens are case-insensitive
isDefaultSessionToken
{ "repo_name": "JordanGS/zaproxy", "path": "src/org/zaproxy/zap/extension/httpsessions/ExtensionHttpSessions.java", "license": "apache-2.0", "size": 21610 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,036,442
public static UUID generateId(SQLiteDatabase _db, String _table, String _column) { UUID rtn = null; while (rtn == null) { rtn = UUID.randomUUID(); Cursor counter = _db.query(_table, new String[]{_column}, _column + " = ?", new String[]{rtn.toString()}, nul...
static UUID function(SQLiteDatabase _db, String _table, String _column) { UUID rtn = null; while (rtn == null) { rtn = UUID.randomUUID(); Cursor counter = _db.query(_table, new String[]{_column}, _column + STR, new String[]{rtn.toString()}, null, null, null); if (counter.getCount() != 0) { rtn = null; } counter.close()...
/** * Generates for the table in the given database a unique id for the specified column. * * @param _db the database where the table is. * @param _table the table to get the uuid for. * @param _column the column where the value should be unique. * @return a really unique id. */
Generates for the table in the given database a unique id for the specified column
generateId
{ "repo_name": "InstaList/instalist-android-backend", "path": "src/main/java/org/noorganization/instalist/utils/SQLiteUtils.java", "license": "apache-2.0", "size": 5536 }
[ "android.database.Cursor", "android.database.sqlite.SQLiteDatabase", "java.util.UUID" ]
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.UUID;
import android.database.*; import android.database.sqlite.*; import java.util.*;
[ "android.database", "java.util" ]
android.database; java.util;
198,144
void validateDeactivation(AccountState account) throws ValidationException;
void validateDeactivation(AccountState account) throws ValidationException;
/** * Called when an account should be deactivated to allow validation of the account deactivation. * * @param account the account that should be deactivated * @throws ValidationException if validation fails */
Called when an account should be deactivated to allow validation of the account deactivation
validateDeactivation
{ "repo_name": "WANdisco/gerrit", "path": "java/com/google/gerrit/server/validators/AccountActivationValidationListener.java", "license": "apache-2.0", "size": 1584 }
[ "com.google.gerrit.server.account.AccountState" ]
import com.google.gerrit.server.account.AccountState;
import com.google.gerrit.server.account.*;
[ "com.google.gerrit" ]
com.google.gerrit;
2,654,589
try { Class<?> runnerClass = Class.forName(config.get(RUNNER_CONFIG, DEFAULT_RUNNER_CLASS)); if (ApplicationRunner.class.isAssignableFrom(runnerClass)) { Constructor<?> constructor = runnerClass.getConstructor(Config.class); // *sigh* return (ApplicationRunner) constructor.newInstance(config...
try { Class<?> runnerClass = Class.forName(config.get(RUNNER_CONFIG, DEFAULT_RUNNER_CLASS)); if (ApplicationRunner.class.isAssignableFrom(runnerClass)) { Constructor<?> constructor = runnerClass.getConstructor(Config.class); return (ApplicationRunner) constructor.newInstance(config); } } catch (Exception e) { throw new...
/** * Static method to load the {@link ApplicationRunner} * * @param config configuration passed in to initialize the Samza processes * @return the configure-driven {@link ApplicationRunner} to run the user-defined stream applications */
Static method to load the <code>ApplicationRunner</code>
fromConfig
{ "repo_name": "TiVo/samza", "path": "samza-api/src/main/java/org/apache/samza/runtime/ApplicationRunner.java", "license": "apache-2.0", "size": 5250 }
[ "java.lang.reflect.Constructor", "org.apache.samza.config.Config", "org.apache.samza.config.ConfigException" ]
import java.lang.reflect.Constructor; import org.apache.samza.config.Config; import org.apache.samza.config.ConfigException;
import java.lang.reflect.*; import org.apache.samza.config.*;
[ "java.lang", "org.apache.samza" ]
java.lang; org.apache.samza;
197,750
public ScriptContext toScriptContext() { SymbolTableBuilder symTableBuilder = new SymbolTableBuilder(); if (propertyResolver != null) { symTableBuilder.setPropertyResolver(propertyResolver); } if (variableResolver != null) { symTableBuilder.setVariableResolver(variableResolver); } return new ...
ScriptContext function() { SymbolTableBuilder symTableBuilder = new SymbolTableBuilder(); if (propertyResolver != null) { symTableBuilder.setPropertyResolver(propertyResolver); } if (variableResolver != null) { symTableBuilder.setVariableResolver(variableResolver); } return new ScriptContext(playerPermissions, symTable...
/** * Returns a ScriptContext built from this object. * * @return the ScriptContext. */
Returns a ScriptContext built from this object
toScriptContext
{ "repo_name": "RPTools/zz-old-scripting-engine", "path": "src/main/java/net/rptools/parser/ScriptContextBuilder.java", "license": "apache-2.0", "size": 3982 }
[ "net.rptools.parser.symboltable.SymbolTableBuilder" ]
import net.rptools.parser.symboltable.SymbolTableBuilder;
import net.rptools.parser.symboltable.*;
[ "net.rptools.parser" ]
net.rptools.parser;
385,155
private boolean isEmpty(String answer) { if ((answer != null) && ((answer.indexOf("<img") > -1) || (answer.indexOf("<IMG") > -1))) { return false; } else { return StringUtils.isBlank(WebUtil.removeHTMLtags(answer)); } }
boolean function(String answer) { if ((answer != null) && ((answer.indexOf("<img") > -1) (answer.indexOf("<IMG") > -1))) { return false; } else { return StringUtils.isBlank(WebUtil.removeHTMLtags(answer)); } }
/** * Is this string empty? Need to strip out all HTML tags first otherwise an empty DIV might look like a valid answer * Smileys and math functions only put in an img tag so explicitly look for that. */
Is this string empty? Need to strip out all HTML tags first otherwise an empty DIV might look like a valid answer Smileys and math functions only put in an img tag so explicitly look for that
isEmpty
{ "repo_name": "lamsfoundation/lams", "path": "lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/controller/LearningController.java", "license": "gpl-2.0", "size": 55907 }
[ "org.apache.commons.lang.StringUtils", "org.lamsfoundation.lams.util.WebUtil" ]
import org.apache.commons.lang.StringUtils; import org.lamsfoundation.lams.util.WebUtil;
import org.apache.commons.lang.*; import org.lamsfoundation.lams.util.*;
[ "org.apache.commons", "org.lamsfoundation.lams" ]
org.apache.commons; org.lamsfoundation.lams;
2,378,305
public static <D extends DataStore<K,T>, K, T extends Persistent> D createDataStore(Class<D> dataStoreClass , Class<K> keyClass, Class<T> persistent, Configuration conf) throws GoraException { return createDataStore(dataStoreClass, keyClass, persistent, conf, createProps(), null); }
static <D extends DataStore<K,T>, K, T extends Persistent> D function(Class<D> dataStoreClass , Class<K> keyClass, Class<T> persistent, Configuration conf) throws GoraException { return createDataStore(dataStoreClass, keyClass, persistent, conf, createProps(), null); }
/** * Instantiate a new {@link DataStore}. Uses default properties. Uses 'null' schema. * * @param <D> The class of datastore. * @param <K> The class of keys in the datastore. * @param <T> The class of persistent objects in the datastore. * @param dataStoreClass The datastore implementation class. ...
Instantiate a new <code>DataStore</code>. Uses default properties. Uses 'null' schema
createDataStore
{ "repo_name": "alfonsonishikawa/gora", "path": "gora-core/src/main/java/org/apache/gora/store/DataStoreFactory.java", "license": "apache-2.0", "size": 24093 }
[ "org.apache.gora.persistency.Persistent", "org.apache.gora.util.GoraException", "org.apache.hadoop.conf.Configuration" ]
import org.apache.gora.persistency.Persistent; import org.apache.gora.util.GoraException; import org.apache.hadoop.conf.Configuration;
import org.apache.gora.persistency.*; import org.apache.gora.util.*; import org.apache.hadoop.conf.*;
[ "org.apache.gora", "org.apache.hadoop" ]
org.apache.gora; org.apache.hadoop;
1,867,625
private ClientExtension maybeCreateCastExtensionHandler() { try { Class<?> cls = Class.forName("org.chromium.chromoting.CastExtensionHandler"); return (ClientExtension) cls.newInstance(); } catch (ClassNotFoundException e) { Log.w(TAG, "Failed to create CastExtens...
ClientExtension function() { try { Class<?> cls = Class.forName(STR); return (ClientExtension) cls.newInstance(); } catch (ClassNotFoundException e) { Log.w(TAG, STR); return new DummyClientExtension(); } catch (InstantiationException e) { Log.w(TAG, STR); return new DummyClientExtension(); } catch (IllegalAccessExcept...
/** * Tries to reflectively instantiate a CastExtensionHandler object. * * Note: The ONLY reason this is done is that by default, the regular android application * will be built, without this experimental extension. */
Tries to reflectively instantiate a CastExtensionHandler object. Note: The ONLY reason this is done is that by default, the regular android application will be built, without this experimental extension
maybeCreateCastExtensionHandler
{ "repo_name": "chromium/chromium", "path": "remoting/android/java/src/org/chromium/chromoting/CapabilityManager.java", "license": "bsd-3-clause", "size": 8090 }
[ "org.chromium.base.Log" ]
import org.chromium.base.Log;
import org.chromium.base.*;
[ "org.chromium.base" ]
org.chromium.base;
1,795,874
public RuleConfiguredTargetBuilder setFilesToBuild(NestedSet<Artifact> filesToBuild) { this.filesToBuild = filesToBuild; return this; }
RuleConfiguredTargetBuilder function(NestedSet<Artifact> filesToBuild) { this.filesToBuild = filesToBuild; return this; }
/** * Set the files to build. */
Set the files to build
setFilesToBuild
{ "repo_name": "ButterflyNetwork/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/RuleConfiguredTargetBuilder.java", "license": "apache-2.0", "size": 17677 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSet" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*;
[ "com.google.devtools" ]
com.google.devtools;
874,870
public IObject getDataObject () { return guiPane.getObject (); }
IObject function () { return guiPane.getObject (); }
/** * Get the data object shown in this display. * * @return The data object. */
Get the data object shown in this display
getDataObject
{ "repo_name": "grappendorf/openmetix", "path": "src/java/de/iritgo/openmetix/core/gui/IWindow.java", "license": "gpl-2.0", "size": 8534 }
[ "de.iritgo.openmetix.core.iobject.IObject" ]
import de.iritgo.openmetix.core.iobject.IObject;
import de.iritgo.openmetix.core.iobject.*;
[ "de.iritgo.openmetix" ]
de.iritgo.openmetix;
1,606,194
static IWindow create(Vec2 size, String title, boolean decorated) { return Platform.get().createWindow(size, title, decorated); }
static IWindow create(Vec2 size, String title, boolean decorated) { return Platform.get().createWindow(size, title, decorated); }
/** * Create window. * * Call from main thread only. */
Create window. Call from main thread only
create
{ "repo_name": "arisona/ether", "path": "ether-core/src/main/java/ch/fhnw/ether/view/IWindow.java", "license": "bsd-3-clause", "size": 8392 }
[ "ch.fhnw.ether.platform.Platform", "ch.fhnw.util.math.Vec2" ]
import ch.fhnw.ether.platform.Platform; import ch.fhnw.util.math.Vec2;
import ch.fhnw.ether.platform.*; import ch.fhnw.util.math.*;
[ "ch.fhnw.ether", "ch.fhnw.util" ]
ch.fhnw.ether; ch.fhnw.util;
2,874,899
static boolean useBoxedVoid(Function m) { return m.isMember() && (m.isDefault() || m.isFormal() || m.isActual()) && m.getType().isAnything() && Decl.isCeylon((TypeDeclaration)m.getRefinedDeclaration().getContainer()); }
static boolean useBoxedVoid(Function m) { return m.isMember() && (m.isDefault() m.isFormal() m.isActual()) && m.getType().isAnything() && Decl.isCeylon((TypeDeclaration)m.getRefinedDeclaration().getContainer()); }
/** * Determines whether a {@code void} Ceylon method should be declared to * return {@code void} or {@code java.lang.Object} (the erasure of * {@code ceylon.language.Anything}) in Java. * If the method can be refined, * (but was not itself refined from a Java {@code void} method), or is ...
Determines whether a void Ceylon method should be declared to return void or java.lang.Object (the erasure of ceylon.language.Anything) in Java. If the method can be refined, (but was not itself refined from a Java void method), or is actual then java.lang.Object should be used
useBoxedVoid
{ "repo_name": "gijsleussink/ceylon", "path": "compiler-java/src/com/redhat/ceylon/compiler/java/codegen/Strategy.java", "license": "apache-2.0", "size": 20571 }
[ "com.redhat.ceylon.model.typechecker.model.Function", "com.redhat.ceylon.model.typechecker.model.TypeDeclaration" ]
import com.redhat.ceylon.model.typechecker.model.Function; import com.redhat.ceylon.model.typechecker.model.TypeDeclaration;
import com.redhat.ceylon.model.typechecker.model.*;
[ "com.redhat.ceylon" ]
com.redhat.ceylon;
542,153
public Artifact createManifestProtoOutput(Artifact outputJar) { return getRuleContext().getDerivedArtifact( FileSystemUtils.appendExtension(outputJar.getRootRelativePath(), "_manifest_proto"), outputJar.getRoot()); }
Artifact function(Artifact outputJar) { return getRuleContext().getDerivedArtifact( FileSystemUtils.appendExtension(outputJar.getRootRelativePath(), STR), outputJar.getRoot()); }
/** * Returns the artifact for the manifest proto emitted from JavaBuilder. For example, for a * class jar foo.jar, returns "foo.jar_manifest_proto". * * @param outputJar The artifact for the class jar emitted form JavaBuilder * @return The output artifact for the manifest proto emitted from JavaBuilder ...
Returns the artifact for the manifest proto emitted from JavaBuilder. For example, for a class jar foo.jar, returns "foo.jar_manifest_proto"
createManifestProtoOutput
{ "repo_name": "spxtr/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java", "license": "apache-2.0", "size": 34718 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.vfs.FileSystemUtils" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
386,877
protected int getXOffsetOfGridUnit(PrimaryGridUnit gu) { return getXOffsetOfGridUnit(gu.getColIndex(), gu.getCell().getNumberColumnsSpanned()); }
int function(PrimaryGridUnit gu) { return getXOffsetOfGridUnit(gu.getColIndex(), gu.getCell().getNumberColumnsSpanned()); }
/** * Returns the X offset of the given grid unit. * @param gu the grid unit * @return the requested X offset */
Returns the X offset of the given grid unit
getXOffsetOfGridUnit
{ "repo_name": "argv-minus-one/fop", "path": "fop-core/src/main/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java", "license": "apache-2.0", "size": 26571 }
[ "org.apache.fop.fo.flow.table.PrimaryGridUnit" ]
import org.apache.fop.fo.flow.table.PrimaryGridUnit;
import org.apache.fop.fo.flow.table.*;
[ "org.apache.fop" ]
org.apache.fop;
1,229,501
public static GANSSEphemerisDeltaScales fromPerUnaligned(byte[] encodedBytes) { GANSSEphemerisDeltaScales result = new GANSSEphemerisDeltaScales(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; }
static GANSSEphemerisDeltaScales function(byte[] encodedBytes) { GANSSEphemerisDeltaScales result = new GANSSEphemerisDeltaScales(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new GANSSEphemerisDeltaScales from encoded stream. */
Creates a new GANSSEphemerisDeltaScales from encoded stream
fromPerUnaligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components/GANSSEphemerisDeltaScales.java", "license": "apache-2.0", "size": 72248 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
1,084,903
public Vector4 set(DoubleBuffer vals, int offset) { return set(vals.get(offset), vals.get(offset + 1), vals.get(offset + 2), vals.get(offset + 3)); }
Vector4 function(DoubleBuffer vals, int offset) { return set(vals.get(offset), vals.get(offset + 1), vals.get(offset + 2), vals.get(offset + 3)); }
/** * As {@link #set(double[], int)} but the values are taken from the DoubleBuffer. * * @param vals The double value source * @param offset The index into vals for the x coordinate * * @return This vector * * @throws ArrayIndexOutOfBoundsException if vals doesn't have four val...
As <code>#set(double[], int)</code> but the values are taken from the DoubleBuffer
set
{ "repo_name": "geronimo-iia/ferox", "path": "ferox-math/src/main/java/com/ferox/math/Vector4.java", "license": "bsd-2-clause", "size": 23452 }
[ "java.nio.DoubleBuffer" ]
import java.nio.DoubleBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
22,164
public double[] toDoubleArray(int fromIndexInclusive, int toIndexExclusive) { checkRange(fromIndexInclusive, toIndexExclusive); if (fromIndexInclusive == toIndexExclusive) { return DoubleUtils.EMPTY_DOUBLE_ARRAY; } int size = toIndexExclusive - fromIndexInc...
double[] function(int fromIndexInclusive, int toIndexExclusive) { checkRange(fromIndexInclusive, toIndexExclusive); if (fromIndexInclusive == toIndexExclusive) { return DoubleUtils.EMPTY_DOUBLE_ARRAY; } int size = toIndexExclusive - fromIndexInclusive; double[] result = new double[size]; arrayCopy(fromIndexInclusive, r...
/** * Gets a range of elements as an array. * * @param fromIndexInclusive the index to start from, inclusive * @param toIndexExclusive the index to end at, exclusive * @return a new array containing a copy of the range of elements, not null * @throws IndexOutOfBoundsException if ei...
Gets a range of elements as an array
toDoubleArray
{ "repo_name": "fengshao0907/joda-primitives", "path": "src/main/java/org/joda/primitives/list/impl/AbstractDoubleList.java", "license": "apache-2.0", "size": 31227 }
[ "org.joda.primitives.DoubleUtils" ]
import org.joda.primitives.DoubleUtils;
import org.joda.primitives.*;
[ "org.joda.primitives" ]
org.joda.primitives;
1,755,229
public void execute() throws BuildException { super.execute(); if (bean == null || attribute == null || value == null) { throw new BuildException ("Must specify 'bean', 'attribute' and 'value' attributes"); } log("Setting attribute " + attribute + ...
void function() throws BuildException { super.execute(); if (bean == null attribute == null value == null) { throw new BuildException (STR); } log(STR + attribute + STR + bean + STR + value); try { execute(STR + URLEncoder.encode(bean, getCharset()) + "&att=" + URLEncoder.encode(attribute, getCharset()) + "&val=" + URL...
/** * Execute the requested operation. * * @exception BuildException if an error occurs */
Execute the requested operation
execute
{ "repo_name": "plumer/codana", "path": "tomcat_files/6.0.43/JMXSetTask.java", "license": "mit", "size": 3408 }
[ "java.io.UnsupportedEncodingException", "java.net.URLEncoder", "org.apache.tools.ant.BuildException" ]
import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import org.apache.tools.ant.BuildException;
import java.io.*; import java.net.*; import org.apache.tools.ant.*;
[ "java.io", "java.net", "org.apache.tools" ]
java.io; java.net; org.apache.tools;
1,136,522
public static ims.careuk.domain.objects.TCIForPatientElectiveList extractTCIForPatientElectiveList(ims.domain.ILightweightDomainFactory domainFactory, ims.careuk.vo.PatientElectiveTCIBedManagerCommentVo valueObject) { return extractTCIForPatientElectiveList(domainFactory, valueObject, new HashMap()); }
static ims.careuk.domain.objects.TCIForPatientElectiveList function(ims.domain.ILightweightDomainFactory domainFactory, ims.careuk.vo.PatientElectiveTCIBedManagerCommentVo valueObject) { return extractTCIForPatientElectiveList(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractTCIForPatientElectiveList
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/careuk/vo/domain/PatientElectiveTCIBedManagerCommentVoAssembler.java", "license": "agpl-3.0", "size": 17928 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,888,652
public synchronized Long convertAcls(List<ACL> acls) { if (acls == null) return -1L; // get the value from the map Long ret = aclKeyMap.get(acls); // could not find the map if (ret != null) return ret; long val = incrementIndex(); longK...
synchronized Long function(List<ACL> acls) { if (acls == null) return -1L; Long ret = aclKeyMap.get(acls); if (ret != null) return ret; long val = incrementIndex(); longKeyMap.put(val, acls); aclKeyMap.put(acls, val); return val; }
/** * converts the list of acls to a list of longs. * * @param acls * @return a list of longs that map to the acls */
converts the list of acls to a list of longs
convertAcls
{ "repo_name": "cloudera/zookeeper", "path": "src/java/main/org/apache/zookeeper/server/DataTree.java", "license": "apache-2.0", "size": 41684 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,372,773
@Override public Map execute(FileSystem fs) throws IOException { ContentSummary contentSummary = fs.getContentSummary(path); return contentSummaryToJSON(contentSummary); } } @InterfaceAudience.Private public static class FSCreate implements FileSystemAccess.FileSystemExecutor<Void> { ...
Map function(FileSystem fs) throws IOException { ContentSummary contentSummary = fs.getContentSummary(path); return contentSummaryToJSON(contentSummary); } } @InterfaceAudience.Private public static class FSCreate implements FileSystemAccess.FileSystemExecutor<Void> { private InputStream is; private Path path; private ...
/** * Executes the filesystem operation. * * @param fs filesystem instance to use. * * @return a Map object (JSON friendly) with the content-summary. * * @throws IOException thrown if an IO error occured. */
Executes the filesystem operation
execute
{ "repo_name": "cnfire/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java", "license": "apache-2.0", "size": 39000 }
[ "java.io.IOException", "java.io.InputStream", "java.util.Map", "org.apache.hadoop.classification.InterfaceAudience", "org.apache.hadoop.fs.ContentSummary", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.lib.service.FileSystemAccess" ]
import java.io.IOException; import java.io.InputStream; import java.util.Map; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.fs.ContentSummary; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.lib.service.FileSystemAccess;
import java.io.*; import java.util.*; import org.apache.hadoop.classification.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.lib.service.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,670,202
public boolean getUploadStatus() { LOG.debug("getUploadStatus()"); FacesContext context = FacesContext.getCurrentInstance(); String status = (String) ((HttpServletRequest) context.getExternalContext().getRequest()).getAttribute("upload.status"); return "size_limit_exceeded".equals(status); }
boolean function() { LOG.debug(STR); FacesContext context = FacesContext.getCurrentInstance(); String status = (String) ((HttpServletRequest) context.getExternalContext().getRequest()).getAttribute(STR); return STR.equals(status); }
/** * Returns whether a file too large tried to be uploaded. (SAK-9822) */
Returns whether a file too large tried to be uploaded. (SAK-9822)
getUploadStatus
{ "repo_name": "harfalm/Sakai-10.1", "path": "podcasts/podcasts-app/src/java/org/sakaiproject/tool/podcasts/podHomeBean.java", "license": "apache-2.0", "size": 60234 }
[ "javax.faces.context.FacesContext", "javax.servlet.http.HttpServletRequest" ]
import javax.faces.context.FacesContext; import javax.servlet.http.HttpServletRequest;
import javax.faces.context.*; import javax.servlet.http.*;
[ "javax.faces", "javax.servlet" ]
javax.faces; javax.servlet;
401,189
ExternalTaskClientBuilder backoffStrategy(BackoffStrategy backoffStrategy);
ExternalTaskClientBuilder backoffStrategy(BackoffStrategy backoffStrategy);
/** * Adds a custom strategy to the client for defining the org.camunda.bpm.client.backoff between two requests. * This information is optional. By default {@link ExponentialBackoffStrategy} is applied. * * @param backoffStrategy which realizes a custom org.camunda.bpm.client.backoff strategy * @return t...
Adds a custom strategy to the client for defining the org.camunda.bpm.client.backoff between two requests. This information is optional. By default <code>ExponentialBackoffStrategy</code> is applied
backoffStrategy
{ "repo_name": "camunda/camunda-bpm-platform", "path": "clients/java/client/src/main/java/org/camunda/bpm/client/ExternalTaskClientBuilder.java", "license": "apache-2.0", "size": 6082 }
[ "org.camunda.bpm.client.backoff.BackoffStrategy" ]
import org.camunda.bpm.client.backoff.BackoffStrategy;
import org.camunda.bpm.client.backoff.*;
[ "org.camunda.bpm" ]
org.camunda.bpm;
189,672
public boolean isSinglePoint() { if (isSinglePoint != null) { return isSinglePoint.booleanValue(); } validate(); isSinglePoint = false; if (basicSymbolCode == null) { basicSymbolCode = SymbolUtilities.getBasicSymbolID(this.getSymbolCode()); ...
boolean function() { if (isSinglePoint != null) { return isSinglePoint.booleanValue(); } validate(); isSinglePoint = false; if (basicSymbolCode == null) { basicSymbolCode = SymbolUtilities.getBasicSymbolID(this.getSymbolCode()); isTacticalGraphic = SymbolUtilities.isTacticalGraphic(basicSymbolCode); } if (isTacticalGra...
/** * This method returns true if the symbol code represents a single point MilStd. * @throws IllegalStateException if called before symbol code is set * @return true if symbol code is for a single point */
This method returns true if the symbol code represents a single point MilStd
isSinglePoint
{ "repo_name": "missioncommand/emp3-android", "path": "sdk/sdk-api/src/main/java/mil/emp3/api/MilStdSymbol.java", "license": "apache-2.0", "size": 66987 }
[ "org.cmapi.primitives.IGeoMilSymbol" ]
import org.cmapi.primitives.IGeoMilSymbol;
import org.cmapi.primitives.*;
[ "org.cmapi.primitives" ]
org.cmapi.primitives;
1,372,554
public Plot getTopPlot() { return MainUtil.getTopPlot(this); }
Plot function() { return MainUtil.getTopPlot(this); }
/** * Get the top plot, or this plot if it is not part of a mega plot * @return The bottom plot */
Get the top plot, or this plot if it is not part of a mega plot
getTopPlot
{ "repo_name": "PiLogic/PlotSquared", "path": "src/main/java/com/intellectualcrafters/plot/object/Plot.java", "license": "gpl-3.0", "size": 28745 }
[ "com.intellectualcrafters.plot.util.MainUtil" ]
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.*;
[ "com.intellectualcrafters.plot" ]
com.intellectualcrafters.plot;
2,797,868
public int onlineConsistencyRepair() throws IOException, KeeperException, InterruptedException { clearState(); // get regions according to what is online on each RegionServer loadDeployedRegions(); // check whether hbase:meta is deployed and online recordMetaRegion(); // Check if hbase:me...
int function() throws IOException, KeeperException, InterruptedException { clearState(); loadDeployedRegions(); recordMetaRegion(); if (!checkMetaRegion()) { String errorMsg = STR; if (shouldFixAssignments()) { errorMsg += STR; } else { errorMsg += STR; } errors.reportError(errorMsg + STR); return -2; } LOG.info(STR); ...
/** * This repair method requires the cluster to be online since it contacts * region servers and the masters. It makes each region's state in HDFS, in * hbase:meta, and deployments consistent. * * @return If > 0 , number of errors detected, if < 0 there was an unrecoverable * error. If 0, we have a...
This repair method requires the cluster to be online since it contacts region servers and the masters. It makes each region's state in HDFS, in hbase:meta, and deployments consistent
onlineConsistencyRepair
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java", "license": "apache-2.0", "size": 154583 }
[ "java.io.IOException", "org.apache.zookeeper.KeeperException" ]
import java.io.IOException; import org.apache.zookeeper.KeeperException;
import java.io.*; import org.apache.zookeeper.*;
[ "java.io", "org.apache.zookeeper" ]
java.io; org.apache.zookeeper;
2,758,040
public int getPartColIndexForFilter( Table table, FilterBuilder filterBuilder) throws MetaException { int partitionColumnIndex; assert (table.getPartitionKeys().size() > 0); for (partitionColumnIndex = 0; partitionColumnIndex < table.getPartitionKeys().size(); ++partitionColumnIn...
int function( Table table, FilterBuilder filterBuilder) throws MetaException { int partitionColumnIndex; assert (table.getPartitionKeys().size() > 0); for (partitionColumnIndex = 0; partitionColumnIndex < table.getPartitionKeys().size(); ++partitionColumnIndex) { if (table.getPartitionKeys().get(partitionColumnIndex).g...
/** * Get partition column index in the table partition column list that * corresponds to the key that is being filtered on by this tree node. * @param table The table. * @param filterBuilder filter builder used to report error, if any. * @return The index. */
Get partition column index in the table partition column list that corresponds to the key that is being filtered on by this tree node
getPartColIndexForFilter
{ "repo_name": "scalingdata/Impala", "path": "thirdparty/hive-1.2.1.2.3.0.0-2557/src/metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java", "license": "apache-2.0", "size": 21821 }
[ "org.apache.hadoop.hive.metastore.api.MetaException", "org.apache.hadoop.hive.metastore.api.Table" ]
import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.Table;
import org.apache.hadoop.hive.metastore.api.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
506,346
public void deleteTurnsHistoryHasTransportationrisksId( TurnsHistoryHasTransportationrisksId turnsHistoryHasTransportationrisksId);
void function( TurnsHistoryHasTransportationrisksId turnsHistoryHasTransportationrisksId);
/** * Delete TurnsHistoryHasTransportationrisksId * * @param TurnsHistoryHasTransportationrisksId * turnsHistoryHasTransportationrisksId */
Delete TurnsHistoryHasTransportationrisksId
deleteTurnsHistoryHasTransportationrisksId
{ "repo_name": "machadolucas/watchout", "path": "src/main/java/com/riskvis/db/service/ITurnsHistoryHasTransportationrisksIdService.java", "license": "apache-2.0", "size": 1644 }
[ "com.riskvis.entity.TurnsHistoryHasTransportationrisksId" ]
import com.riskvis.entity.TurnsHistoryHasTransportationrisksId;
import com.riskvis.entity.*;
[ "com.riskvis.entity" ]
com.riskvis.entity;
649,859
public static <E> List<E> singletonList(E o) { return new SingletonList<>(o); } private static class SingletonList<E> extends AbstractList<E> implements RandomAccess, Serializable { private static final long serialVersionUID = 3093736618740652951L; private fin...
static <E> List<E> function(E o) { return new SingletonList<>(o); } private static class SingletonList<E> extends AbstractList<E> implements RandomAccess, Serializable { private static final long serialVersionUID = 3093736618740652951L; private final E element; SingletonList(E obj) {element = obj;}
/** * Returns an immutable list containing only the specified object. * The returned list is serializable. * * @param <E> the class of the objects in the list * @param o the sole object to be stored in the returned list. * @return an immutable list containing only the specified object. ...
Returns an immutable list containing only the specified object. The returned list is serializable
singletonList
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "ojluni/src/main/java/java/util/Collections.java", "license": "gpl-2.0", "size": 185568 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,497,880
@Override public void onSpinning(long value) { setMinutesValue((int) value); } }; public DurationSpinner(int value) { this(value, null, null); } public DurationSpinner( int value, ValueSpinnerResources resources, SpinnerReso...
void function(long value) { setMinutesValue((int) value); } }; public DurationSpinner(int value) { this(value, null, null); } public DurationSpinner( int value, ValueSpinnerResources resources, SpinnerResources images ) { this( value, 0, 1440, 1, 99, 1, 99, false, null, null, resources, images ); } public DurationSpinn...
/** * On the value change of the minutes spinner * * @author Ruan Naude <ruan.naude@a24group.com> * @since 15 June 2015 * * @param value - The new value to set on the spinner */
On the value change of the minutes spinner
onSpinning
{ "repo_name": "A24Group/ssGWT-lib", "path": "src/org/ssgwt/client/ui/form/spinner/DurationSpinner.java", "license": "apache-2.0", "size": 27139 }
[ "com.google.gwt.event.dom.client.BlurHandler", "com.google.gwt.user.client.ui.FlowPanel", "com.google.gwt.user.client.ui.Label", "org.ssgwt.client.ui.form.spinner.Spinner" ]
import com.google.gwt.event.dom.client.BlurHandler; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.Label; import org.ssgwt.client.ui.form.spinner.Spinner;
import com.google.gwt.event.dom.client.*; import com.google.gwt.user.client.ui.*; import org.ssgwt.client.ui.form.spinner.*;
[ "com.google.gwt", "org.ssgwt.client" ]
com.google.gwt; org.ssgwt.client;
1,788,495
protected void remove(SendfileData data) { int rv = Poll.remove(sendfilePollset, data.socket); if (rv == Status.APR_SUCCESS) { sendfileCount--; } sendfileData.remove(Long.valueOf(data.socket)); }
void function(SendfileData data) { int rv = Poll.remove(sendfilePollset, data.socket); if (rv == Status.APR_SUCCESS) { sendfileCount--; } sendfileData.remove(Long.valueOf(data.socket)); }
/** * Remove socket from the poller. * * @param data the sendfile data which should be removed */
Remove socket from the poller
remove
{ "repo_name": "mayonghui2112/helloWorld", "path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/tomcat/util/net/AprEndpoint.java", "license": "apache-2.0", "size": 102685 }
[ "org.apache.tomcat.jni.Poll", "org.apache.tomcat.jni.Status" ]
import org.apache.tomcat.jni.Poll; import org.apache.tomcat.jni.Status;
import org.apache.tomcat.jni.*;
[ "org.apache.tomcat" ]
org.apache.tomcat;
554,488
void assignUsersToSend(SmsMailing smsMailing, MemberCustomField smsCustomField);
void assignUsersToSend(SmsMailing smsMailing, MemberCustomField smsCustomField);
/** * Populates the collection of users which should receive the given sms mailing */
Populates the collection of users which should receive the given sms mailing
assignUsersToSend
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/dao/sms/SmsMailingDAO.java", "license": "gpl-2.0", "size": 1992 }
[ "nl.strohalm.cyclos.entities.customization.fields.MemberCustomField", "nl.strohalm.cyclos.entities.sms.SmsMailing" ]
import nl.strohalm.cyclos.entities.customization.fields.MemberCustomField; import nl.strohalm.cyclos.entities.sms.SmsMailing;
import nl.strohalm.cyclos.entities.customization.fields.*; import nl.strohalm.cyclos.entities.sms.*;
[ "nl.strohalm.cyclos" ]
nl.strohalm.cyclos;
568,437
//----------------------------------------------------------------------- public final MetaProperty<Boolean> securityTypes() { return _securityTypes; }
final MetaProperty<Boolean> function() { return _securityTypes; }
/** * The meta-property for the {@code securityTypes} property. * @return the meta-property, not null */
The meta-property for the securityTypes property
securityTypes
{ "repo_name": "McLeodMoores/starling", "path": "projects/master/src/main/java/com/opengamma/master/security/SecurityMetaDataRequest.java", "license": "apache-2.0", "size": 8245 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,304,165
@Test @Ignore("Comment this out if you want to run against local or test ES") public void testPutElasticSearchBasic() { System.out.println("Starting test " + new Object() { }.getClass().getEnclosingMethod().getName()); final TestRunner runner = TestRunners.newTestRunner(new PutElasti...
@Ignore(STR) void function() { System.out.println(STR + new Object() { }.getClass().getEnclosingMethod().getName()); final TestRunner runner = TestRunners.newTestRunner(new PutElasticsearchHttpRecord()); runner.setProperty(AbstractElasticsearchHttpProcessor.ES_URL, STRdocSTRstatusSTR/idSTRdoc_idSTR28039652140"); }}); r...
/** * Tests basic ES functionality against a local or test ES cluster */
Tests basic ES functionality against a local or test ES cluster
testPutElasticSearchBasic
{ "repo_name": "joewitt/incubator-nifi", "path": "nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/test/java/org/apache/nifi/processors/elasticsearch/TestPutElasticsearchHttpRecord.java", "license": "apache-2.0", "size": 32095 }
[ "java.util.List", "org.apache.nifi.provenance.ProvenanceEventRecord", "org.apache.nifi.provenance.ProvenanceEventType", "org.apache.nifi.util.TestRunner", "org.apache.nifi.util.TestRunners", "org.junit.Assert", "org.junit.Ignore" ]
import java.util.List; import org.apache.nifi.provenance.ProvenanceEventRecord; import org.apache.nifi.provenance.ProvenanceEventType; import org.apache.nifi.util.TestRunner; import org.apache.nifi.util.TestRunners; import org.junit.Assert; import org.junit.Ignore;
import java.util.*; import org.apache.nifi.provenance.*; import org.apache.nifi.util.*; import org.junit.*;
[ "java.util", "org.apache.nifi", "org.junit" ]
java.util; org.apache.nifi; org.junit;
923,882
@Test public void getTopPrograms_correctGrouping() throws TskCoreException, NoServiceProviderException, TranslationException, SleuthkitCaseProviderException { DataSource ds1 = TskMockUtils.getDataSource(1); BlackboardArtifact prog1 = getProgramArtifact(1, ds1, "program1.exe", "/Prog...
void function() throws TskCoreException, NoServiceProviderException, TranslationException, SleuthkitCaseProviderException { DataSource ds1 = TskMockUtils.getDataSource(1); BlackboardArtifact prog1 = getProgramArtifact(1, ds1, STR, STR, 21, 21L); BlackboardArtifact prog1a = getProgramArtifact(1, ds1, STR, STR, 1, 31L); ...
/** * Ensures proper grouping of programs with index of program name and path. * * @throws TskCoreException * @throws NoServiceProviderException * @throws TranslationException * @throws SleuthkitCaseProviderException */
Ensures proper grouping of programs with index of program name and path
getTopPrograms_correctGrouping
{ "repo_name": "eugene7646/autopsy", "path": "Core/test/unit/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/UserActivitySummaryTest.java", "license": "apache-2.0", "size": 62228 }
[ "java.util.Arrays", "java.util.List", "org.apache.commons.lang3.tuple.Pair", "org.junit.Assert", "org.sleuthkit.autopsy.datasourcesummary.datamodel.DataSourceSummaryMockUtils", "org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider", "org.sleuthkit.autopsy.datasourcesummary.datamodel.U...
import java.util.Arrays; import java.util.List; import org.apache.commons.lang3.tuple.Pair; import org.junit.Assert; import org.sleuthkit.autopsy.datasourcesummary.datamodel.DataSourceSummaryMockUtils; import org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider; import org.sleuthkit.autopsy.datasourc...
import java.util.*; import org.apache.commons.lang3.tuple.*; import org.junit.*; import org.sleuthkit.autopsy.datasourcesummary.datamodel.*; import org.sleuthkit.autopsy.testutils.*; import org.sleuthkit.autopsy.texttranslation.*; import org.sleuthkit.datamodel.*;
[ "java.util", "org.apache.commons", "org.junit", "org.sleuthkit.autopsy", "org.sleuthkit.datamodel" ]
java.util; org.apache.commons; org.junit; org.sleuthkit.autopsy; org.sleuthkit.datamodel;
2,040,293
public void setShadow(Drawable shadow, int edgeFlag) { if ((edgeFlag & EDGE_LEFT) != 0) { mShadowLeft = shadow; } else if ((edgeFlag & EDGE_RIGHT) != 0) { mShadowRight = shadow; } else if ((edgeFlag & EDGE_BOTTOM) != 0) { mShadowBottom = shadow; } ...
void function(Drawable shadow, int edgeFlag) { if ((edgeFlag & EDGE_LEFT) != 0) { mShadowLeft = shadow; } else if ((edgeFlag & EDGE_RIGHT) != 0) { mShadowRight = shadow; } else if ((edgeFlag & EDGE_BOTTOM) != 0) { mShadowBottom = shadow; } invalidate(); }
/** * Set a drawable used for edge shadow. * * @param shadow Drawable to use * @param edgeFlags Combination of edge flags describing the edge to set * @see #EDGE_LEFT * @see #EDGE_RIGHT * @see #EDGE_BOTTOM */
Set a drawable used for edge shadow
setShadow
{ "repo_name": "asmh1989/mReader", "path": "mReader/src/com/sun/swipebacklayout/lib/SwipeBackLayout.java", "license": "gpl-2.0", "size": 17461 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
374,735
public void gravity() { //get objects for interaction List<Platform> actors = getNeighbours(Math.abs(velocityGravity) + 34, true, Platform.class); List<Platform> actors2 = getObjectsAtOffset(10, velocityGravity, Platform.class); List<Platform> actors3 = getObjectsAtOffset(-10, ve...
void function() { List<Platform> actors = getNeighbours(Math.abs(velocityGravity) + 34, true, Platform.class); List<Platform> actors2 = getObjectsAtOffset(10, velocityGravity, Platform.class); List<Platform> actors3 = getObjectsAtOffset(-10, velocityGravity, Platform.class); for (Platform actor : actors2) { actors.add(...
/** * This applies gravity to the subclass that calls it. * It checks for collision with any platforms before moving the subclass. */
This applies gravity to the subclass that calls it. It checks for collision with any platforms before moving the subclass
gravity
{ "repo_name": "WalterConway/ENGR-1110", "path": "Escape/Physics.java", "license": "gpl-2.0", "size": 9632 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
851,981
public List<String> getAllEditorials();
List<String> function();
/** * Searches all the Editorials stored at the persistence * @return The <code>String</code> list including all the Editorials; * <code>null</code> if no Author is found. */
Searches all the Editorials stored at the persistence
getAllEditorials
{ "repo_name": "pablo-albaladejo/javaee", "path": "Modulo7/BookstoreEAR/BookstoreEAR-ejb/src/java/ejb/logic/book/IBookApplicationService.java", "license": "gpl-3.0", "size": 3663 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,048,071
private void addRow(Object[] carbonTuple) throws SliceMergerException { CarbonRow row = WriteStepRowUtil.fromMergerRow(carbonTuple, segprop); try { this.dataHandler.addDataToStore(row); } catch (CarbonDataWriterException e) { throw new SliceMergerException("Problem in merging the slice", e); ...
void function(Object[] carbonTuple) throws SliceMergerException { CarbonRow row = WriteStepRowUtil.fromMergerRow(carbonTuple, segprop); try { this.dataHandler.addDataToStore(row); } catch (CarbonDataWriterException e) { throw new SliceMergerException(STR, e); } } private class CarbonMdkeyComparator implements Comparato...
/** * Below method will be used to add sorted row * * @throws SliceMergerException */
Below method will be used to add sorted row
addRow
{ "repo_name": "jatin9896/incubator-carbondata", "path": "processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java", "license": "apache-2.0", "size": 10038 }
[ "java.util.Comparator", "org.apache.carbondata.core.datastore.exception.CarbonDataWriterException", "org.apache.carbondata.core.datastore.row.CarbonRow", "org.apache.carbondata.core.datastore.row.WriteStepRowUtil", "org.apache.carbondata.core.scan.result.iterator.RawResultIterator", "org.apache.carbondata...
import java.util.Comparator; import org.apache.carbondata.core.datastore.exception.CarbonDataWriterException; import org.apache.carbondata.core.datastore.row.CarbonRow; import org.apache.carbondata.core.datastore.row.WriteStepRowUtil; import org.apache.carbondata.core.scan.result.iterator.RawResultIterator; import org....
import java.util.*; import org.apache.carbondata.core.datastore.exception.*; import org.apache.carbondata.core.datastore.row.*; import org.apache.carbondata.core.scan.result.iterator.*; import org.apache.carbondata.processing.exception.*;
[ "java.util", "org.apache.carbondata" ]
java.util; org.apache.carbondata;
848,503
public Set<org.eclipse.uml2.uml.Class> getAllValuesOfcl() { return rawAccumulateAllValuesOfcl(emptyArray()); }
Set<org.eclipse.uml2.uml.Class> function() { return rawAccumulateAllValuesOfcl(emptyArray()); }
/** * Retrieve the set of values that occur in matches for cl. * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches * */
Retrieve the set of values that occur in matches for cl
getAllValuesOfcl
{ "repo_name": "ELTE-Soft/xUML-RT-Executor", "path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/PassiveClassWithBehaviorMatcher.java", "license": "epl-1.0", "size": 10610 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,817,662
public Collection<Stat> getStats() { return stats; }
Collection<Stat> function() { return stats; }
/** * Get the {@link Stat} {@link Collection}. * @return The {@link Stat} {@link Collection}. */
Get the <code>Stat</code> <code>Collection</code>
getStats
{ "repo_name": "dark1wador/Grand-Championship", "path": "Grand-Championship/src/actor/Actor.java", "license": "gpl-3.0", "size": 25715 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,042,274
public ExpressionClause<ServiceCallConfigurationDefinition> expression() { ExpressionClause<ServiceCallConfigurationDefinition> clause = new ExpressionClause<>(this); setExpression(clause); return clause; }
ExpressionClause<ServiceCallConfigurationDefinition> function() { ExpressionClause<ServiceCallConfigurationDefinition> clause = new ExpressionClause<>(this); setExpression(clause); return clause; }
/** * Sets a custom {@link Expression} to use through an expression builder clause. * * @return a expression builder clause to set the body */
Sets a custom <code>Expression</code> to use through an expression builder clause
expression
{ "repo_name": "acartapanis/camel", "path": "camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConfigurationDefinition.java", "license": "apache-2.0", "size": 22152 }
[ "org.apache.camel.builder.ExpressionClause" ]
import org.apache.camel.builder.ExpressionClause;
import org.apache.camel.builder.*;
[ "org.apache.camel" ]
org.apache.camel;
406,909
public void close() { flush(); try { out.close(); } catch (IOException e) { e.printStackTrace(); } }
void function() { flush(); try { out.close(); } catch (IOException e) { e.printStackTrace(); } }
/** * Flushes and closes the binary output stream. * Once it is closed, bits can no longer be written. */
Flushes and closes the binary output stream. Once it is closed, bits can no longer be written
close
{ "repo_name": "kevin-wayne/algs4", "path": "src/main/java/edu/princeton/cs/algs4/BinaryOut.java", "license": "gpl-3.0", "size": 11125 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,634,669
private Image mat2Image(Mat frame) { // create a temporary buffer MatOfByte buffer = new MatOfByte(); // encode the frame in the buffer, according to the PNG format Imgcodecs.imencode(".png", frame, buffer); // build and return an Image created from the image encoded in the // buffer return new Image(...
Image function(Mat frame) { MatOfByte buffer = new MatOfByte(); Imgcodecs.imencode(".png", frame, buffer); return new Image(new ByteArrayInputStream(buffer.toArray())); }
/** * Convert a Mat object (OpenCV) in the corresponding Image for JavaFX * * @param frame * the {@link Mat} representing the current frame * @return the {@link Image} to show */
Convert a Mat object (OpenCV) in the corresponding Image for JavaFX
mat2Image
{ "repo_name": "antiparagon/CVExperimenter", "path": "Sample Code/VideoController.java", "license": "mit", "size": 8749 }
[ "java.io.ByteArrayInputStream", "org.opencv.core.Mat", "org.opencv.core.MatOfByte", "org.opencv.imgcodecs.Imgcodecs" ]
import java.io.ByteArrayInputStream; import org.opencv.core.Mat; import org.opencv.core.MatOfByte; import org.opencv.imgcodecs.Imgcodecs;
import java.io.*; import org.opencv.core.*; import org.opencv.imgcodecs.*;
[ "java.io", "org.opencv.core", "org.opencv.imgcodecs" ]
java.io; org.opencv.core; org.opencv.imgcodecs;
708,702
MessageStatus getMessageStatus();
MessageStatus getMessageStatus();
/** * message status * @return message status */
message status
getMessageStatus
{ "repo_name": "OpenYMSG/openymsg", "path": "src/main/java/org/openymsg/connection/write/Message.java", "license": "gpl-2.0", "size": 584 }
[ "org.openymsg.network.MessageStatus" ]
import org.openymsg.network.MessageStatus;
import org.openymsg.network.*;
[ "org.openymsg.network" ]
org.openymsg.network;
1,332,197
public SMoistureIOIOLooper getLooper(String portIOIO) throws IOIOInstanceException, InterruptedException{ if(helper.getLooper(portIOIO) instanceof SMoistureIOIOLooper) return (SMoistureIOIOLooper) helper.getLooper(portIOIO); return null; }
SMoistureIOIOLooper function(String portIOIO) throws IOIOInstanceException, InterruptedException{ if(helper.getLooper(portIOIO) instanceof SMoistureIOIOLooper) return (SMoistureIOIOLooper) helper.getLooper(portIOIO); return null; }
/** * Obtiene looper de la aplicacion * @param portIOIO * @return * @throws com.massacre.garden.server.sensor.moisture.exception.IOIOInstanceException */
Obtiene looper de la aplicacion
getLooper
{ "repo_name": "cristian658/GardenServerSMoisture", "path": "src/main/java/com/massacre/garden/server/sensor/moisture/ioio/looper/SMoistureIOIOInstance.java", "license": "gpl-3.0", "size": 5328 }
[ "com.massacre.garden.server.sensor.moisture.exception.IOIOInstanceException" ]
import com.massacre.garden.server.sensor.moisture.exception.IOIOInstanceException;
import com.massacre.garden.server.sensor.moisture.exception.*;
[ "com.massacre.garden" ]
com.massacre.garden;
2,462,098
public static void logScreenTopTapLocation( boolean wasPanelSeen, boolean wasTap, int triggerLocationDps) { // We only log Tap locations for the screen top. if (!wasTap) return; String histogram = wasPanelSeen ? "Search.ContextualSearchTopLocationSeen" ...
static void function( boolean wasPanelSeen, boolean wasTap, int triggerLocationDps) { if (!wasTap) return; String histogram = wasPanelSeen ? STR : STR; int min = 1; int max = 250; int numBuckets = 50; RecordHistogram.recordCustomCountHistogram( histogram, triggerLocationDps, min, max, numBuckets); }
/** * Logs the location of a Tap and whether the panel was seen and the type of the * trigger. * @param wasPanelSeen Whether the panel was seen. * @param wasTap Whether the gesture was a Tap or not. * @param triggerLocationDps The trigger location from the top of the screen. */
Logs the location of a Tap and whether the panel was seen and the type of the trigger
logScreenTopTapLocation
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java", "license": "apache-2.0", "size": 66156 }
[ "org.chromium.base.metrics.RecordHistogram" ]
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.*;
[ "org.chromium.base" ]
org.chromium.base;
2,605,215
public Group[] getSelectedGroups() { return selectedGroups; }
Group[] function() { return selectedGroups; }
/** * Returns the selected groups (if any). */
Returns the selected groups (if any)
getSelectedGroups
{ "repo_name": "stephaneperry/Silverpeas-Core", "path": "war-core/src/main/java/com/stratelia/silverpeas/selectionPeas/control/SelectionPeasWrapperSessionController.java", "license": "agpl-3.0", "size": 8767 }
[ "com.stratelia.webactiv.beans.admin.Group" ]
import com.stratelia.webactiv.beans.admin.Group;
import com.stratelia.webactiv.beans.admin.*;
[ "com.stratelia.webactiv" ]
com.stratelia.webactiv;
1,436,574
public static CmsPermissionBean getBeanForPrincipal(Set<CmsPermissionBean> beans, String principalName) { for (CmsPermissionBean bean : beans) { if (bean.getPrincipalName().equals(principalName)) { return bean; } } return null; }
static CmsPermissionBean function(Set<CmsPermissionBean> beans, String principalName) { for (CmsPermissionBean bean : beans) { if (bean.getPrincipalName().equals(principalName)) { return bean; } } return null; }
/** * Gets the bean for principal from list of beans.<p> * * @param beans to look principal up * @param principalName name of principal to get bean of * @return CmsPermissionBean */
Gets the bean for principal from list of beans
getBeanForPrincipal
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/ui/dialogs/permissions/CmsPermissionBean.java", "license": "lgpl-2.1", "size": 8957 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,912,164
public void setChildren(X3DNode[] val) { if ( children == null ) { children = (MFNode)getField( "children" ); } children.setValue( val.length, val ); }
void function(X3DNode[] val) { if ( children == null ) { children = (MFNode)getField( STR ); } children.setValue( val.length, val ); }
/** Set the children field. * @param val The X3DNode[] to set. */
Set the children field
setChildren
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/sai/internal/node/grouping/SAIStaticGroup.java", "license": "gpl-2.0", "size": 3455 }
[ "org.web3d.x3d.sai.MFNode", "org.web3d.x3d.sai.X3DNode" ]
import org.web3d.x3d.sai.MFNode; import org.web3d.x3d.sai.X3DNode;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
1,726,546
@SuppressWarnings("unchecked") public List<WellnessConceptsModel> listWellnessConceptsModel(String strQuery) { try { Session session = this.sessionFactory.openSession(); @SuppressWarnings("unchecked") List<WellnessConceptsModel> wellnessConceptsModelList = session.createQuery("from Wellness...
@SuppressWarnings(STR) List<WellnessConceptsModel> function(String strQuery) { try { Session session = this.sessionFactory.openSession(); @SuppressWarnings(STR) List<WellnessConceptsModel> wellnessConceptsModelList = session.createQuery(STR + strQuery + "%'").list(); for(WellnessConceptsModel objWellnessConceptsModel :...
/** * This function is the implementation for retrieving all Wellness Concepts in form of list * @return List of WellnessConceptsModel */
This function is the implementation for retrieving all Wellness Concepts in form of list
listWellnessConceptsModel
{ "repo_name": "ubiquitous-computing-lab/Mining-Minds", "path": "knowledge-curation-layer/i-kat/src/main/java/org/uclab/mm/kcl/edkat/dao/WellnessConceptsModelDAOImpl.java", "license": "apache-2.0", "size": 6616 }
[ "java.util.List", "org.hibernate.Session", "org.uclab.mm.kcl.edkat.datamodel.WellnessConceptsModel" ]
import java.util.List; import org.hibernate.Session; import org.uclab.mm.kcl.edkat.datamodel.WellnessConceptsModel;
import java.util.*; import org.hibernate.*; import org.uclab.mm.kcl.edkat.datamodel.*;
[ "java.util", "org.hibernate", "org.uclab.mm" ]
java.util; org.hibernate; org.uclab.mm;
723,109
private boolean readReuseInt() { boolean signal = false; // Get curNumber.reuseInteger File fileReuse = new File(this.getReuseFile()); BufferedReader readerReuse = null; try{ FileReader fileReaderReuse = new FileReader(fileReuse); readerReuse = new BufferedReader(fileReaderReuse); String...
boolean function() { boolean signal = false; File fileReuse = new File(this.getReuseFile()); BufferedReader readerReuse = null; try{ FileReader fileReaderReuse = new FileReader(fileReuse); readerReuse = new BufferedReader(fileReaderReuse); String strLine = null; while((strLine = readerReuse.readLine()) != null){ curNum...
/** * Read curNumber.reuseInteger from file, which is placed in a default URL. * @return * true: success. * false: fail. */
Read curNumber.reuseInteger from file, which is placed in a default URL
readReuseInt
{ "repo_name": "YinYanfei/CadalWorkspace", "path": "Analyzers/src/com/search/analysis/util/CreateHashMap.java", "license": "gpl-3.0", "size": 15705 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileReader" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileReader;
import java.io.*;
[ "java.io" ]
java.io;
2,078,389
public void editDestinationAt(int position) { // Create an intent to edit an destination item Intent intent = new Intent(getActivity(), AddDestinationActivity.class); // --> Tell it that we're editing the index at this position intent.putExtra(IntentExtraIDs.CLAIM_ID, claimID); intent.putExtra(IntentExtraI...
void function(int position) { Intent intent = new Intent(getActivity(), AddDestinationActivity.class); intent.putExtra(IntentExtraIDs.CLAIM_ID, claimID); intent.putExtra(IntentExtraIDs.DESTINATION_ID, claim.getDestinationAtPosition(position).getID()); startActivity(intent); }
/** * Opens the activity responsible for editing a claim * * @param position * the position in the listview to edit. */
Opens the activity responsible for editing a claim
editDestinationAt
{ "repo_name": "RostarSynergistics/ShinyExpenseTracker", "path": "ShinyExpenseTracker/src/ca/ualberta/cs/shinyexpensetracker/fragments/DestinationListFragment.java", "license": "gpl-3.0", "size": 6859 }
[ "android.content.Intent", "ca.ualberta.cs.shinyexpensetracker.activities.AddDestinationActivity", "ca.ualberta.cs.shinyexpensetracker.activities.utilities.IntentExtraIDs" ]
import android.content.Intent; import ca.ualberta.cs.shinyexpensetracker.activities.AddDestinationActivity; import ca.ualberta.cs.shinyexpensetracker.activities.utilities.IntentExtraIDs;
import android.content.*; import ca.ualberta.cs.shinyexpensetracker.activities.*; import ca.ualberta.cs.shinyexpensetracker.activities.utilities.*;
[ "android.content", "ca.ualberta.cs" ]
android.content; ca.ualberta.cs;
2,212,236
public static void ensureReferenceIsReadable(final PipelineOptions popts, String filename) throws IOException, GeneralSecurityException { for (String fn : getRelatedFiles(filename)) { if (BucketUtils.isRemoteStorageUrl(fn)) { // make sure we can access those remote files. ...
static void function(final PipelineOptions popts, String filename) throws IOException, GeneralSecurityException { for (String fn : getRelatedFiles(filename)) { if (BucketUtils.isRemoteStorageUrl(fn)) { try (InputStream inputStream = BucketUtils.openFile(fn, popts)) { int ignored = inputStream.read(); } } else { if (!ne...
/** * Throws an exception if any of the files is missing. * (offlineauth can be null if the files are local) */
Throws an exception if any of the files is missing. (offlineauth can be null if the files are local)
ensureReferenceIsReadable
{ "repo_name": "davidadamsphd/hellbender", "path": "src/main/java/org/broadinstitute/hellbender/dev/pipelines/bqsr/BaseRecalibratorDataflowUtils.java", "license": "bsd-3-clause", "size": 17448 }
[ "com.google.cloud.dataflow.sdk.options.PipelineOptions", "java.io.File", "java.io.IOException", "java.io.InputStream", "java.security.GeneralSecurityException", "org.broadinstitute.hellbender.utils.dataflow.BucketUtils" ]
import com.google.cloud.dataflow.sdk.options.PipelineOptions; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.security.GeneralSecurityException; import org.broadinstitute.hellbender.utils.dataflow.BucketUtils;
import com.google.cloud.dataflow.sdk.options.*; import java.io.*; import java.security.*; import org.broadinstitute.hellbender.utils.dataflow.*;
[ "com.google.cloud", "java.io", "java.security", "org.broadinstitute.hellbender" ]
com.google.cloud; java.io; java.security; org.broadinstitute.hellbender;
485,789
private void validateArtifactInformation() throws MojoExecutionException { Model model = generateModel(); ModelValidationResult result = modelValidator.validate( model ); if ( result.getMessageCount() > 0 ) { throw new MojoExecutionException( ...
void function() throws MojoExecutionException { Model model = generateModel(); ModelValidationResult result = modelValidator.validate( model ); if ( result.getMessageCount() > 0 ) { throw new MojoExecutionException( STR + result.render( " " ) ); } }
/** * Validates the user-supplied artifact information. * * @throws MojoExecutionException If any artifact coordinate is invalid. */
Validates the user-supplied artifact information
validateArtifactInformation
{ "repo_name": "dmlloyd/maven-plugins", "path": "maven-install-plugin/src/main/java/org/apache/maven/plugin/install/InstallFileMojo.java", "license": "apache-2.0", "size": 14878 }
[ "org.apache.maven.model.Model", "org.apache.maven.plugin.MojoExecutionException", "org.apache.maven.project.validation.ModelValidationResult" ]
import org.apache.maven.model.Model; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.validation.ModelValidationResult;
import org.apache.maven.model.*; import org.apache.maven.plugin.*; import org.apache.maven.project.validation.*;
[ "org.apache.maven" ]
org.apache.maven;
360,615
protected PermissionCollection getPermissions(CodeSource codesource) { PermissionCollection perms = super.getPermissions(codesource); perms.add(new RuntimePermission("exitVM")); return perms; }
PermissionCollection function(CodeSource codesource) { PermissionCollection perms = super.getPermissions(codesource); perms.add(new RuntimePermission(STR)); return perms; }
/** * allow any classes loaded from classpath to exit the VM. */
allow any classes loaded from classpath to exit the VM
getPermissions
{ "repo_name": "Taichi-SHINDO/jdk9-jdk", "path": "src/java.base/share/classes/sun/misc/Launcher.java", "license": "gpl-2.0", "size": 19071 }
[ "java.security.CodeSource", "java.security.PermissionCollection" ]
import java.security.CodeSource; import java.security.PermissionCollection;
import java.security.*;
[ "java.security" ]
java.security;
2,158,039
public CcCompilationHelper addAdditionalExportedHeaders( Iterable<PathFragment> additionalExportedHeaders) { Iterables.addAll(this.additionalExportedHeaders, additionalExportedHeaders); return this; }
CcCompilationHelper function( Iterable<PathFragment> additionalExportedHeaders) { Iterables.addAll(this.additionalExportedHeaders, additionalExportedHeaders); return this; }
/** * Add the corresponding files as public header files, i.e., these files will not be compiled, but * are made visible as includes to dependent rules in module maps. */
Add the corresponding files as public header files, i.e., these files will not be compiled, but are made visible as includes to dependent rules in module maps
addAdditionalExportedHeaders
{ "repo_name": "safarmer/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java", "license": "apache-2.0", "size": 89014 }
[ "com.google.common.collect.Iterables", "com.google.devtools.build.lib.vfs.PathFragment" ]
import com.google.common.collect.Iterables; import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.common.collect.*; import com.google.devtools.build.lib.vfs.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
246,214
@NotNull() public List<String> getNotifyOnCompletion() { return new ArrayList<>(notifyOnCompletion); }
@NotNull() List<String> function() { return new ArrayList<>(notifyOnCompletion); }
/** * Retrieves the addresses to email whenever the task completes, regardless of * its success or failure. * * @return The addresses to email whenever the task completes, or an * empty list if no email notification should be sent when the task * completes. */
Retrieves the addresses to email whenever the task completes, regardless of its success or failure
getNotifyOnCompletion
{ "repo_name": "UnboundID/ldapsdk", "path": "src/com/unboundid/ldap/sdk/unboundidds/tasks/CollectSupportDataTaskProperties.java", "license": "gpl-2.0", "size": 61360 }
[ "com.unboundid.util.NotNull", "java.util.ArrayList", "java.util.List" ]
import com.unboundid.util.NotNull; import java.util.ArrayList; import java.util.List;
import com.unboundid.util.*; import java.util.*;
[ "com.unboundid.util", "java.util" ]
com.unboundid.util; java.util;
1,717,365
public Run createRun(byte[] workflow, UserCredentials credentials) throws NetworkConnectionException { Run run = Run.create(this, workflow, credentials); getUserRunCache(credentials.getUsername()) .put(run.getIdentifier(), run); return run; }
Run function(byte[] workflow, UserCredentials credentials) throws NetworkConnectionException { Run run = Run.create(this, workflow, credentials); getUserRunCache(credentials.getUsername()) .put(run.getIdentifier(), run); return run; }
/** * Create a new Run on this server with the supplied workflow. * * @param workflow * the workflow to be run. * @return a new Run instance. * @throws NetworkConnectionException */
Create a new Run on this server with the supplied workflow
createRun
{ "repo_name": "Phoenix1708/t2-server-jar-android-0.1", "path": "t2-server-jar-android-0.1-hyde/src/main/java/uk/org/taverna/server/client/Server.java", "license": "bsd-3-clause", "size": 13830 }
[ "uk.org.taverna.server.client.connection.UserCredentials" ]
import uk.org.taverna.server.client.connection.UserCredentials;
import uk.org.taverna.server.client.connection.*;
[ "uk.org.taverna" ]
uk.org.taverna;
1,755,837
@NotNull PsiTypeCodeFragment createTypeCodeFragment(@NotNull String text, PsiElement context, boolean isPhysical);
@NotNull PsiTypeCodeFragment createTypeCodeFragment(@NotNull String text, PsiElement context, boolean isPhysical);
/** * Creates a Java type code fragment from the text of the name of a Java type (the name * of a primitive type, array type or class), with <code>void</code> and ellipsis * not treated as a valid type. * * @param text the text of the Java type to create. * @param context the context for reso...
Creates a Java type code fragment from the text of the name of a Java type (the name of a primitive type, array type or class), with <code>void</code> and ellipsis not treated as a valid type
createTypeCodeFragment
{ "repo_name": "joewalnes/idea-community", "path": "java/openapi/src/com/intellij/psi/PsiElementFactory.java", "license": "apache-2.0", "size": 23064 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
1,765,473
private static boolean isSimplePreferences(Context context) { return ALWAYS_SIMPLE_PREFS || Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB || !isXLargeTablet(context); }
static boolean function(Context context) { return ALWAYS_SIMPLE_PREFS Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB !isXLargeTablet(context); }
/** * Determines whether the simplified settings UI should be shown. This is * true if this is forced via {@link #ALWAYS_SIMPLE_PREFS}, or the device * doesn't have newer APIs like {@link PreferenceFragment}, or the device * doesn't have an extra-large screen. In these cases, a single-pane * "simplified" sett...
Determines whether the simplified settings UI should be shown. This is true if this is forced via <code>#ALWAYS_SIMPLE_PREFS</code>, or the device doesn't have newer APIs like <code>PreferenceFragment</code>, or the device doesn't have an extra-large screen. In these cases, a single-pane "simplified" settings UI should...
isSimplePreferences
{ "repo_name": "sagarkothari/CollegeProjects-tutorials", "path": "Test1/src/com/example/test1/SettingsActivity.java", "license": "gpl-2.0", "size": 9727 }
[ "android.content.Context", "android.os.Build" ]
import android.content.Context; import android.os.Build;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
1,918,416
@Test public void testKillAlreadyKilledQuery() throws Exception { IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME); FieldsQueryCursor<List<?>> cur = cache.query(new SqlFieldsQuery("select * from Integer where awaitLatchCancelled() = 0")); List<GridRunningQueryInfo> ...
void function() throws Exception { IgniteCache<Object, Object> cache = ignite.cache(DEFAULT_CACHE_NAME); FieldsQueryCursor<List<?>> cur = cache.query(new SqlFieldsQuery(STR)); List<GridRunningQueryInfo> runningQueries = (List<GridRunningQueryInfo>)ignite.context().query().runningQueries(-1); GridRunningQueryInfo runQry...
/** * Trying to kill already killed query. No exceptions expected. */
Trying to kill already killed query. No exceptions expected
testKillAlreadyKilledQuery
{ "repo_name": "ascherbakoff/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/KillQueryTest.java", "license": "apache-2.0", "size": 56103 }
[ "java.util.List", "javax.cache.CacheException", "org.apache.ignite.IgniteCache", "org.apache.ignite.cache.query.FieldsQueryCursor", "org.apache.ignite.cache.query.QueryCancelledException", "org.apache.ignite.cache.query.SqlFieldsQuery", "org.apache.ignite.internal.IgniteInternalFuture", "org.apache.ig...
import java.util.List; import javax.cache.CacheException; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.query.FieldsQueryCursor; import org.apache.ignite.cache.query.QueryCancelledException; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.IgniteInternalFutur...
import java.util.*; import javax.cache.*; import org.apache.ignite.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.*; import org.apache.ignite.testframework.*;
[ "java.util", "javax.cache", "org.apache.ignite" ]
java.util; javax.cache; org.apache.ignite;
1,986,992
List<AuditLog> getAuditDashboard(Map params);
List<AuditLog> getAuditDashboard(Map params);
/** * Get records for audit dashboard content * @param params SQL query parameters * @return records for audit dashboard */
Get records for audit dashboard content
getAuditDashboard
{ "repo_name": "craftercms/studio", "path": "src/main/java/org/craftercms/studio/api/v2/dal/AuditDAO.java", "license": "gpl-3.0", "size": 1879 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,499,179
public boolean canOverdrive() throws OneWireIOException, OneWireException { return true; }
boolean function() throws OneWireIOException, OneWireException { return true; }
/** * Returns whether adapter can physically support overdrive mode. * * @return <code>true</code> if this port adapter can do OverDrive, * <code>false</code> otherwise. * @throws OneWireIOException on a 1-Wire communication error with the * adapter * @throws OneWireException on a set...
Returns whether adapter can physically support overdrive mode
canOverdrive
{ "repo_name": "marcass/dz", "path": "dz3-master/dz3-owapi/src/main/java/com/dalsemi/onewire/adapter/USerialAdapter.java", "license": "gpl-3.0", "size": 87093 }
[ "com.dalsemi.onewire.OneWireException" ]
import com.dalsemi.onewire.OneWireException;
import com.dalsemi.onewire.*;
[ "com.dalsemi.onewire" ]
com.dalsemi.onewire;
2,645,636
void reset() throws IOException;
void reset() throws IOException;
/** * Resets the internal pointer used to track JAR entries to the beginning of * the JAR. * * @throws IOException If the pointer cannot be reset */
Resets the internal pointer used to track JAR entries to the beginning of the JAR
reset
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.61/Jar.java", "license": "mit", "size": 2988 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,186,062
public static WebDriver getWebDriver(Browser browser, String proxyAddress, int proxyPort) { return getWebDriver(-1, browser, proxyAddress, proxyPort); }
static WebDriver function(Browser browser, String proxyAddress, int proxyPort) { return getWebDriver(-1, browser, proxyAddress, proxyPort); }
/** * Gets a {@code WebDriver} for the given {@code browser} proxying through the given address and * port. * * @param browser the target browser * @param proxyAddress the address of the proxy * @param proxyPort the port of the proxy * @return the {@code WebDriver} to the given {@code...
Gets a WebDriver for the given browser proxying through the given address and port
getWebDriver
{ "repo_name": "veggiespam/zap-extensions", "path": "addOns/selenium/src/main/java/org/zaproxy/zap/extension/selenium/ExtensionSelenium.java", "license": "apache-2.0", "size": 38630 }
[ "org.openqa.selenium.WebDriver" ]
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
408,315
public static void recomputeWeights(Map<IntSet,MyData> allMyData, long totalCount, boolean doPadVar, int n){ //MeterVirialBDBinMultiThreadedOld.recomputeWeights(allMyData, totalCount, doPadVar); // tRatio is the ratio of the time needed to compute the biconnected // value (and reference valu...
static void function(Map<IntSet,MyData> allMyData, long totalCount, boolean doPadVar, int n){ for (MyData amd : allMyData.values()) { amd.weight = 0; } double E0 = 0; long totalSampleCount = 0; double E1 = 0; double totTotalSqValue = 0; for (int i=0; i<1+n*(n-1)/2; i++) { double totalSqValue = 0; for (MyData amd : allM...
/** * This method will read MyData.unscreenedCount and MyData.accumulator * and write to MyData.weight. */
This method will read MyData.unscreenedCount and MyData.accumulator and write to MyData.weight
recomputeWeights
{ "repo_name": "ajschult/etomica", "path": "etomica-apps/src/main/java/etomica/virial/MeterVirialEBinMultiThreaded.java", "license": "mpl-2.0", "size": 40280 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,459,864
public static byte[] gzip(String input) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); GZIPOutputStream gzos = null; try { gzos = new GZIPOutputStream(baos); gzos.write(input.getBytes("UTF-8")); } catch (IOException e) { e.printStackT...
static byte[] function(String input) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); GZIPOutputStream gzos = null; try { gzos = new GZIPOutputStream(baos); gzos.write(input.getBytes("UTF-8")); } catch (IOException e) { e.printStackTrace(); } finally { if (gzos != null) try { gzos.close(); } catch (IOExcepti...
/** * GZip compress a string of bytes * * @param input * @return */
GZip compress a string of bytes
gzip
{ "repo_name": "MarkehMe/FactionsFramework", "path": "framework/src/main/java/me/markeh/factionsframework/Metrics.java", "license": "gpl-3.0", "size": 25068 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.util.zip.GZIPOutputStream" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPOutputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
735,724
@SuppressWarnings("unchecked") private List<LinearRing> findUnsplittedHoles( SplitGraph graph, GeometryFactory gf ) { final List<LinearRing> unsplittedHoles = new ArrayList<LinearRing>(2); final List<SplitEdge> edges = new ArrayList<SplitEdge>(); for( Iterator it = g...
@SuppressWarnings(STR) List<LinearRing> function( SplitGraph graph, GeometryFactory gf ) { final List<LinearRing> unsplittedHoles = new ArrayList<LinearRing>(2); final List<SplitEdge> edges = new ArrayList<SplitEdge>(); for( Iterator it = graph.getEdgeIterator(); it.hasNext(); ) { SplitEdge edge = (SplitEdge) it.next()...
/** * Finds out and removes from the graph the edges that were originally holes in the polygon * and were not splitted by the splitting line. * * @param graph * @param gf * @return */
Finds out and removes from the graph the edges that were originally holes in the polygon and were not splitted by the splitting line
findUnsplittedHoles
{ "repo_name": "iCarto/siga", "path": "libTopology/src/es/axios/udig/ui/editingtools/internal/geometryoperations/split/SplitStrategy.java", "license": "gpl-3.0", "size": 21404 }
[ "com.vividsolutions.jts.geom.Coordinate", "com.vividsolutions.jts.geom.GeometryFactory", "com.vividsolutions.jts.geom.LinearRing", "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.LinearRing; import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import com.vividsolutions.jts.geom.*; import java.util.*;
[ "com.vividsolutions.jts", "java.util" ]
com.vividsolutions.jts; java.util;
962,463
public StorageBundle updateStorageAccount(String vaultBaseUrl, String storageAccountName) { return updateStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName).toBlocking().single().body(); }
StorageBundle function(String vaultBaseUrl, String storageAccountName) { return updateStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName).toBlocking().single().body(); }
/** * Updates the specified attributes associated with the given storage account. This operation requires the storage/set/update permission. * * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param storageAccountName The name of the storage account. * @throw...
Updates the specified attributes associated with the given storage account. This operation requires the storage/set/update permission
updateStorageAccount
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java", "license": "mit", "size": 884227 }
[ "com.microsoft.azure.keyvault.models.StorageBundle" ]
import com.microsoft.azure.keyvault.models.StorageBundle;
import com.microsoft.azure.keyvault.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,553,188
public void delete(String _domaincode) throws SQLException { if (this.con_ == null) { log_.severe("Connetion object null"); throw new SQLException("Connection object not set."); } String sql = "delete from T_Domains where F_DomainCode=?"; PreparedStatement stmt = null; try { stmt = con_.prepa...
void function(String _domaincode) throws SQLException { if (this.con_ == null) { log_.severe(STR); throw new SQLException(STR); } String sql = STR; PreparedStatement stmt = null; try { stmt = con_.prepareStatement(sql); stmt.setString(1,_domaincode); stmt.executeUpdate(); } catch (SQLException e) { log_.severe(e.toStri...
/** * Delete record by primary key(s). * * @param _domaincode - String */
Delete record by primary key(s)
delete
{ "repo_name": "tedwen/transmem", "path": "src/com/transmem/data/db/Domains.java", "license": "apache-2.0", "size": 7268 }
[ "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,762,766
public void doDowngrade(StaplerResponse rsp) throws IOException, ServletException { requirePOST(); Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); if(!isDowngradable()) { sendError("Jenkins downgrade is not possible, probably backup does not exist"); return...
void function(StaplerResponse rsp) throws IOException, ServletException { requirePOST(); Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); if(!isDowngradable()) { sendError(STR); return; } HudsonDowngradeJob job = new HudsonDowngradeJob(getCoreSource(), Jenkins.getAuthentication()); LOGGER.info(STR); addJob(jo...
/** * Performs hudson downgrade. */
Performs hudson downgrade
doDowngrade
{ "repo_name": "IsCoolEntertainment/debpkg_jenkins", "path": "core/src/main/java/hudson/model/UpdateCenter.java", "license": "mit", "size": 43277 }
[ "java.io.IOException", "javax.servlet.ServletException", "org.kohsuke.stapler.StaplerResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.StaplerResponse;
import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*;
[ "java.io", "javax.servlet", "org.kohsuke.stapler" ]
java.io; javax.servlet; org.kohsuke.stapler;
114,044
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, Exception { response.setContentType("text/html;charset=UTF-8"); String xx=""; HttpSession session=request.getSession(); LoginServi...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, Exception { response.setContentType(STR); String xx=STRLoginServiceSTRpassword1STRpassword2STRUserSTRok.htmlSTRerror.htmlSTRok.htmlSTRerror.html");} } }
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "lzs0420/history", "path": "SchoolBook/src/com/servlet/pwdServlet.java", "license": "gpl-3.0", "size": 4552 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
369,977
@GwtCompatible(serializable = true) public static <T> Predicate<T> isNull() { return ObjectPredicate.IS_NULL.withNarrowedType(); }
@GwtCompatible(serializable = true) static <T> Predicate<T> function() { return ObjectPredicate.IS_NULL.withNarrowedType(); }
/** * Returns a predicate that evaluates to {@code true} if the object reference being tested is * null. */
Returns a predicate that evaluates to true if the object reference being tested is null
isNull
{ "repo_name": "migue/voltdb", "path": "third_party/java/src/com/google_voltpatches/common/base/Predicates.java", "license": "agpl-3.0", "size": 23234 }
[ "com.google_voltpatches.common.annotations.GwtCompatible" ]
import com.google_voltpatches.common.annotations.GwtCompatible;
import com.google_voltpatches.common.annotations.*;
[ "com.google_voltpatches.common" ]
com.google_voltpatches.common;
2,608,909
public void makeNewNamesID3Tag(String target) { logger.log(Level.FINER, "make new name via ID3Tag target: " + target); for (RenameAudioFile file : this.audioFiles) file.createNewNameFromID3Tag(target); }
void function(String target) { logger.log(Level.FINER, STR + target); for (RenameAudioFile file : this.audioFiles) file.createNewNameFromID3Tag(target); }
/** * generates the new name for all audio files depending on the given target * regex and the id3tag of the audio file * * @param target * given target regex */
generates the new name for all audio files depending on the given target regex and the id3tag of the audio file
makeNewNamesID3Tag
{ "repo_name": "cf86/MP3ToolKit", "path": "src/main/java/model/RenameToolModel.java", "license": "gpl-3.0", "size": 7371 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,949,407
protected void sequence_AttributeSet(EObject context, AttributeSet semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(EObject context, AttributeSet semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Constraint: * (attrsetparams=AttrSetParams (valueString=STRING | valueRealNumber=RealNumber | valueVariable=[Variable|QualifiedName])) */
Constraint: (attrsetparams=AttrSetParams (valueString=STRING | valueRealNumber=RealNumber | valueVariable=[Variable|QualifiedName]))
sequence_AttributeSet
{ "repo_name": "niksavis/mm-dsl", "path": "org.xtext.nv.dsl/src-gen/org/xtext/nv/dsl/serializer/MMDSLSemanticSequencer.java", "license": "epl-1.0", "size": 190481 }
[ "org.eclipse.emf.ecore.EObject", "org.xtext.nv.dsl.mMDSL.AttributeSet" ]
import org.eclipse.emf.ecore.EObject; import org.xtext.nv.dsl.mMDSL.AttributeSet;
import org.eclipse.emf.ecore.*; import org.xtext.nv.dsl.*;
[ "org.eclipse.emf", "org.xtext.nv" ]
org.eclipse.emf; org.xtext.nv;
1,125,818
public static InflationInterpolatedRateObservation.Builder builder() { return new InflationInterpolatedRateObservation.Builder(); } protected InflationInterpolatedRateObservation(InflationInterpolatedRateObservation.Builder builder) { JodaBeanUtils.notNull(builder.index, "index"); JodaBeanUtils.no...
static InflationInterpolatedRateObservation.Builder function() { return new InflationInterpolatedRateObservation.Builder(); } InflationInterpolatedRateObservation(InflationInterpolatedRateObservation.Builder function) { JodaBeanUtils.notNull(builder.index, "index"); JodaBeanUtils.notNull(builder.referenceStartMonth, ST...
/** * Returns a builder used to create an instance of the bean. * @return the builder, not null */
Returns a builder used to create an instance of the bean
builder
{ "repo_name": "nssales/Strata", "path": "modules/finance/src/main/java/com/opengamma/strata/finance/rate/InflationInterpolatedRateObservation.java", "license": "apache-2.0", "size": 28190 }
[ "com.opengamma.strata.collect.ArgChecker", "org.joda.beans.JodaBeanUtils" ]
import com.opengamma.strata.collect.ArgChecker; import org.joda.beans.JodaBeanUtils;
import com.opengamma.strata.collect.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
2,717,909
private int getImType(String string) { int type = CommonDataKinds.Im.PROTOCOL_CUSTOM; if (string != null) { String lowerType = string.toLowerCase(Locale.getDefault()); if ("aim".equals(lowerType)) { return CommonDataKinds.Im.PROTOCOL_AIM; } ...
int function(String string) { int type = CommonDataKinds.Im.PROTOCOL_CUSTOM; if (string != null) { String lowerType = string.toLowerCase(Locale.getDefault()); if ("aim".equals(lowerType)) { return CommonDataKinds.Im.PROTOCOL_AIM; } else if (STR.equals(lowerType)) { return CommonDataKinds.Im.PROTOCOL_GOOGLE_TALK; } else...
/** * Converts a string from the W3C Contact API to it's Android int value. * @param string * @return Android int value */
Converts a string from the W3C Contact API to it's Android int value
getImType
{ "repo_name": "circular-code/ImageStream", "path": "www/plugins/cordova-plugin-contacts/src/android/ContactAccessorSdk5.java", "license": "mit", "size": 103304 }
[ "android.provider.ContactsContract", "java.util.Locale" ]
import android.provider.ContactsContract; import java.util.Locale;
import android.provider.*; import java.util.*;
[ "android.provider", "java.util" ]
android.provider; java.util;
1,805,267
public void setModel(CommonElement model) { Object[] expandedElements = getTreeViewer().getExpandedElements(); boolean bFirstTime = (getTreeViewer().getInput()==null); getTreeViewer().getControl().setRedraw(false); // Flicker fixing getTreeViewer().setInput(model); if (model!=null) ...
void function(CommonElement model) { Object[] expandedElements = getTreeViewer().getExpandedElements(); boolean bFirstTime = (getTreeViewer().getInput()==null); getTreeViewer().getControl().setRedraw(false); getTreeViewer().setInput(model); if (model!=null) { getTreeViewer().collapseAll(); for (Object expandedElement :...
/** * sets the model for the outline page * * @param model - * must not be null */
sets the model for the outline page
setModel
{ "repo_name": "matthias-wolff/dLabPro-Plugin", "path": "Plugin/src/de/tudresden/ias/eclipse/dlabpro/editors/CommonOutlinePage.java", "license": "lgpl-3.0", "size": 7369 }
[ "de.tudresden.ias.eclipse.dlabpro.editors.def.model.ClassSection", "de.tudresden.ias.eclipse.dlabpro.editors.itp.model.ItpElement", "org.eclipse.swt.widgets.Tree" ]
import de.tudresden.ias.eclipse.dlabpro.editors.def.model.ClassSection; import de.tudresden.ias.eclipse.dlabpro.editors.itp.model.ItpElement; import org.eclipse.swt.widgets.Tree;
import de.tudresden.ias.eclipse.dlabpro.editors.def.model.*; import de.tudresden.ias.eclipse.dlabpro.editors.itp.model.*; import org.eclipse.swt.widgets.*;
[ "de.tudresden.ias", "org.eclipse.swt" ]
de.tudresden.ias; org.eclipse.swt;
1,748,636
public long getLong() { return Bytes.toLong(rawBytes, OFFSET); }
long function() { return Bytes.toLong(rawBytes, OFFSET); }
/** * Returns the wrapped value as {@code long}. * * @return {@code long} value */
Returns the wrapped value as long
getLong
{ "repo_name": "niklasteichmann/gradoop", "path": "gradoop-common/src/main/java/org/gradoop/common/model/impl/properties/PropertyValue.java", "license": "apache-2.0", "size": 31926 }
[ "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
47,122
public void testSimpleSplitBrain() throws Exception { failCommSpi = true; startGridsMultiThreaded(5); client = true; startGridsMultiThreaded(5, 3); client = false; awaitPartitionMapExchange(); List<ClusterNode> all = G.allGrids().stream() .ma...
void function() throws Exception { failCommSpi = true; startGridsMultiThreaded(5); client = true; startGridsMultiThreaded(5, 3); client = false; awaitPartitionMapExchange(); List<ClusterNode> all = G.allGrids().stream() .map(g -> g.cluster().localNode()) .collect(Collectors.toList());; List<ClusterNode> part1 = all.sub...
/** * A simple split-brain test, where cluster spliited on 2 parts of server nodes (2 and 3). * There is also client which sees both parts of splitted cluster. * * Result cluster should be: 3 server nodes + 1 client. * * @throws Exception If failed. */
A simple split-brain test, where cluster spliited on 2 parts of server nodes (2 and 3). There is also client which sees both parts of splitted cluster. Result cluster should be: 3 server nodes + 1 client
testSimpleSplitBrain
{ "repo_name": "voipp/ignite", "path": "modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java", "license": "apache-2.0", "size": 156138 }
[ "java.util.List", "java.util.stream.Collectors", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.util.typedef.G" ]
import java.util.List; import java.util.stream.Collectors; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.util.typedef.G;
import java.util.*; import java.util.stream.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.util.typedef.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,692,980
@NotNull TokenSet getNameDefinerTokens();
TokenSet getNameDefinerTokens();
/** * Returns element types that are subclasses of {@link com.jetbrains.python.psi.NameDefiner}. */
Returns element types that are subclasses of <code>com.jetbrains.python.psi.NameDefiner</code>
getNameDefinerTokens
{ "repo_name": "IllusionRom-deprecated/android_platform_tools_idea", "path": "python/psi-api/src/com/jetbrains/python/PythonDialectsTokenSetContributor.java", "license": "apache-2.0", "size": 2304 }
[ "com.intellij.psi.tree.TokenSet" ]
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.tree.*;
[ "com.intellij.psi" ]
com.intellij.psi;
2,792,102
@Query("SELECT DISTINCT(r.actionType) FROM ActionRequestInstruction r") List<String> findAllActionType();
@Query(STR) List<String> findAllActionType();
/** * Retrieve a list of actionTypes * * @return List of distinct actionTypes */
Retrieve a list of actionTypes
findAllActionType
{ "repo_name": "ONSdigital/response-management-service", "path": "actionexportersvc/src/main/java/uk/gov/ons/ctp/response/action/export/repository/ActionRequestRepository.java", "license": "mit", "size": 2511 }
[ "java.util.List", "org.springframework.data.jpa.repository.Query" ]
import java.util.List; import org.springframework.data.jpa.repository.Query;
import java.util.*; import org.springframework.data.jpa.repository.*;
[ "java.util", "org.springframework.data" ]
java.util; org.springframework.data;
561,249
@Override public void onCreate(SQLiteDatabase db) { ProcedureProvider.onCreateDatabase(db); SavedProcedureProvider.onCreateDatabase(db); ImageProvider.onCreateDatabase(db); SoundProvider.onCreateDatabase(db); NotificationProvider.onCre...
void function(SQLiteDatabase db) { ProcedureProvider.onCreateDatabase(db); SavedProcedureProvider.onCreateDatabase(db); ImageProvider.onCreateDatabase(db); SoundProvider.onCreateDatabase(db); NotificationProvider.onCreateDatabase(db); PatientProvider.onCreateDatabase(db); EventProvider.onCreateDatabase(db); BinaryProvi...
/** * Creates a table for each content provider in the input database. * @param db The SQLite database where the tables are stored. */
Creates a table for each content provider in the input database
onCreate
{ "repo_name": "SahilArora92/vit-04", "path": "src/org/moca/db/MocaDB.java", "license": "bsd-3-clause", "size": 34167 }
[ "android.database.sqlite.SQLiteDatabase" ]
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.*;
[ "android.database" ]
android.database;
1,908,986
public static PactDslJsonRootValue integerType() { PactDslJsonRootValue value = new PactDslJsonRootValue(); value.generators.addGenerator(Category.BODY, "", new RandomIntGenerator(0, Integer.MAX_VALUE)); value.setValue(100); value.setMatcher(new NumberTypeMatcher(NumberTypeMatcher.NumberType.INTEGER))...
static PactDslJsonRootValue function() { PactDslJsonRootValue value = new PactDslJsonRootValue(); value.generators.addGenerator(Category.BODY, "", new RandomIntGenerator(0, Integer.MAX_VALUE)); value.setValue(100); value.setMatcher(new NumberTypeMatcher(NumberTypeMatcher.NumberType.INTEGER)); return value; }
/** * Value that must be an integer */
Value that must be an integer
integerType
{ "repo_name": "Fitzoh/pact-jvm", "path": "pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonRootValue.java", "license": "apache-2.0", "size": 21979 }
[ "au.com.dius.pact.model.generators.Category", "au.com.dius.pact.model.generators.RandomIntGenerator", "au.com.dius.pact.model.matchingrules.NumberTypeMatcher" ]
import au.com.dius.pact.model.generators.Category; import au.com.dius.pact.model.generators.RandomIntGenerator; import au.com.dius.pact.model.matchingrules.NumberTypeMatcher;
import au.com.dius.pact.model.generators.*; import au.com.dius.pact.model.matchingrules.*;
[ "au.com.dius" ]
au.com.dius;
960,551
@Override protected void reduce(PigNullableWritable key, Iterable<NullableTuple> tupIter, Context context) throws IOException, InterruptedException { if (!initialized) { initialized = true; // cache the collector ...
void function(PigNullableWritable key, Iterable<NullableTuple> tupIter, Context context) throws IOException, InterruptedException { if (!initialized) { initialized = true; this.outputCollector = context; pigReporter.setRep(context); PhysicalOperator.setReporter(pigReporter); boolean aggregateWarning = "true".equalsIgno...
/** * The reduce function which packages the key and List&lt;Tuple&gt; * into key, Bag&lt;Tuple&gt; after converting Hadoop type key into Pig type. * The package result is either collected as is, if the reduce plan is * empty or after passing through the reduce plan. */
The reduce function which packages the key and List&lt;Tuple&gt; into key, Bag&lt;Tuple&gt; after converting Hadoop type key into Pig type. The package result is either collected as is, if the reduce plan is empty or after passing through the reduce plan
reduce
{ "repo_name": "hxquangnhat/PIG-ROLLUP-CHAINEDIRG", "path": "src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigGenericMapReduce.java", "license": "apache-2.0", "size": 103504 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.mapreduce.Reducer", "org.apache.pig.PigException", "org.apache.pig.backend.executionengine.ExecException", "org.apache.pig.backend.hadoop.HDataType", "org.apache.pig.backend.hadoop.executionengine.physicalLayer.POStatus", "org.apache.pig.back...
import java.io.IOException; import java.util.List; import org.apache.hadoop.mapreduce.Reducer; import org.apache.pig.PigException; import org.apache.pig.backend.executionengine.ExecException; import org.apache.pig.backend.hadoop.HDataType; import org.apache.pig.backend.hadoop.executionengine.physicalLayer.POStatus; imp...
import java.io.*; import java.util.*; import org.apache.hadoop.mapreduce.*; import org.apache.pig.*; import org.apache.pig.backend.executionengine.*; import org.apache.pig.backend.hadoop.*; import org.apache.pig.backend.hadoop.executionengine.*; import org.apache.pig.data.*; import org.apache.pig.impl.io.*; import org....
[ "java.io", "java.util", "org.apache.hadoop", "org.apache.pig" ]
java.io; java.util; org.apache.hadoop; org.apache.pig;
1,779,012
@Pure public TypeReference getEcoreDocumentationSyntacticSequencer() { return new TypeReference(getCodeElementExtractor().getSerializerPackage() + "." //$NON-NLS-1$ + getLanguageName().toUpperCase() + "EcoreDocumentationSyntacticSequencer"); //$NON-NLS-1$ }
TypeReference function() { return new TypeReference(getCodeElementExtractor().getSerializerPackage() + "." + getLanguageName().toUpperCase() + STR); }
/** Replies the implementation for the syntactic sequencer supporting Ecore documentation. * * @return the syntactic sequencer implementation. */
Replies the implementation for the syntactic sequencer supporting Ecore documentation
getEcoreDocumentationSyntacticSequencer
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/DocumentationBuilderFragment.java", "license": "apache-2.0", "size": 115424 }
[ "org.eclipse.xtext.xtext.generator.model.TypeReference" ]
import org.eclipse.xtext.xtext.generator.model.TypeReference;
import org.eclipse.xtext.xtext.generator.model.*;
[ "org.eclipse.xtext" ]
org.eclipse.xtext;
1,862,820
void deleteAll(Collection entities) throws DataAccessException;
void deleteAll(Collection entities) throws DataAccessException;
/** * Delete all given persistent instances. * <p>This can be combined with any of the find methods to delete by query * in two lines of code, similar to Session's delete by query methods. * @param entities the persistent instances to delete * @throws org.springframework.dao.DataAccessException in case of Hib...
Delete all given persistent instances. This can be combined with any of the find methods to delete by query in two lines of code, similar to Session's delete by query methods
deleteAll
{ "repo_name": "dachengxi/spring1.1.1_source", "path": "src/org/springframework/orm/hibernate/HibernateOperations.java", "license": "mit", "size": 32030 }
[ "java.util.Collection", "org.springframework.dao.DataAccessException" ]
import java.util.Collection; import org.springframework.dao.DataAccessException;
import java.util.*; import org.springframework.dao.*;
[ "java.util", "org.springframework.dao" ]
java.util; org.springframework.dao;
2,529,209
try { return MessageDigest.getInstance("SHA-256"); } catch (NoSuchAlgorithmException e) { throw new IllegalStateException("SHA-256 is not supported"); } }
try { return MessageDigest.getInstance(STR); } catch (NoSuchAlgorithmException e) { throw new IllegalStateException(STR); } }
/** * Gets a SHA-256 message digest instance * * @return A MessageDigest */
Gets a SHA-256 message digest instance
getSha256MessageDigestInstance
{ "repo_name": "jorabin/KeePassJava2", "path": "database/src/main/java/org/linguafranca/pwdb/security/Encryption.java", "license": "apache-2.0", "size": 5587 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
import java.security.*;
[ "java.security" ]
java.security;
2,662,594
public Test construct(QAConfig sysConfig) throws Exception { // mandatory call to parent super.construct(sysConfig); // output the name of this test logger.log(Level.FINE, "Test Name = " + this.getClass().getName()); // Announce where we are in the test logger...
Test function(QAConfig sysConfig) throws Exception { super.construct(sysConfig); logger.log(Level.FINE, STR + this.getClass().getName()); logger.log(Level.FINE, STR); QAConfig config = (QAConfig)getConfig(); String property = STR; setDuration = getConfig().getLongConfigVal(property, 120000); property = STR; renewGrant ...
/** * Sets up the testing environment. */
Sets up the testing environment
construct
{ "repo_name": "pfirmstone/river-internet", "path": "qa/src/org/apache/river/test/impl/norm/OneExpireOneNotTest.java", "license": "apache-2.0", "size": 9280 }
[ "java.util.logging.Level", "net.jini.lease.LeaseRenewalService", "org.apache.river.qa.harness.QAConfig", "org.apache.river.qa.harness.Test" ]
import java.util.logging.Level; import net.jini.lease.LeaseRenewalService; import org.apache.river.qa.harness.QAConfig; import org.apache.river.qa.harness.Test;
import java.util.logging.*; import net.jini.lease.*; import org.apache.river.qa.harness.*;
[ "java.util", "net.jini.lease", "org.apache.river" ]
java.util; net.jini.lease; org.apache.river;
2,753,424
public static String[][] parse(String s) throws IOException { if (s == null) { throw new IllegalArgumentException("Null argument not allowed."); } String[][] result = (new CSVParser(new StringReader(s))).getAllValues(); if (result == null) { // since CSVStrategy ignores empty lines an empt...
static String[][] function(String s) throws IOException { if (s == null) { throw new IllegalArgumentException(STR); } String[][] result = (new CSVParser(new StringReader(s))).getAllValues(); if (result == null) { result = EMPTY_DOUBLE_STRING_ARRAY; } return result; }
/** * Parses the given String according to the default {@link CSVStrategy}. * * @param s CSV String to be parsed. * @return parsed String matrix (which is never null) * @throws IOException in case of error */
Parses the given String according to the default <code>CSVStrategy</code>
parse
{ "repo_name": "apache/solr", "path": "solr/core/src/java/org/apache/solr/internal/csv/CSVUtils.java", "license": "apache-2.0", "size": 4128 }
[ "java.io.IOException", "java.io.StringReader" ]
import java.io.IOException; import java.io.StringReader;
import java.io.*;
[ "java.io" ]
java.io;
1,285,621
public JmsDestinationType<InterceptorType<T>> createJmsDestination() { return new JmsDestinationTypeImpl<InterceptorType<T>>(this, "jms-destination", childNode); }
JmsDestinationType<InterceptorType<T>> function() { return new JmsDestinationTypeImpl<InterceptorType<T>>(this, STR, childNode); }
/** * Creates a new <code>jms-destination</code> element * @return the new created instance of <code>JmsDestinationType<InterceptorType<T>></code> */
Creates a new <code>jms-destination</code> element
createJmsDestination
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar32/InterceptorTypeImpl.java", "license": "epl-1.0", "size": 60039 }
[ "org.jboss.shrinkwrap.descriptor.api.ejbjar32.InterceptorType", "org.jboss.shrinkwrap.descriptor.api.javaee7.JmsDestinationType", "org.jboss.shrinkwrap.descriptor.impl.javaee7.JmsDestinationTypeImpl" ]
import org.jboss.shrinkwrap.descriptor.api.ejbjar32.InterceptorType; import org.jboss.shrinkwrap.descriptor.api.javaee7.JmsDestinationType; import org.jboss.shrinkwrap.descriptor.impl.javaee7.JmsDestinationTypeImpl;
import org.jboss.shrinkwrap.descriptor.api.ejbjar32.*; import org.jboss.shrinkwrap.descriptor.api.javaee7.*; import org.jboss.shrinkwrap.descriptor.impl.javaee7.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
2,413,910
private void loadLookupTable() throws Exception { _lookupTableWriteLock.lock(); try { _lookupTable.clear(); List<SegmentDataManager> segmentManagers = acquireAllSegments(); if (segmentManagers.size() == 0) { return; } try { for (SegmentDataManager segmentMa...
void function() throws Exception { _lookupTableWriteLock.lock(); try { _lookupTable.clear(); List<SegmentDataManager> segmentManagers = acquireAllSegments(); if (segmentManagers.size() == 0) { return; } try { for (SegmentDataManager segmentManager : segmentManagers) { IndexSegment indexSegment = segmentManager.getSegme...
/** * `loadLookupTable()` reads contents of the DimensionTable into _lookupTable HashMap for fast lookup. */
`loadLookupTable()` reads contents of the DimensionTable into _lookupTable HashMap for fast lookup
loadLookupTable
{ "repo_name": "linkedin/pinot", "path": "pinot-core/src/main/java/org/apache/pinot/core/data/manager/offline/DimensionTableDataManager.java", "license": "apache-2.0", "size": 6572 }
[ "java.util.List", "org.apache.pinot.core.data.manager.SegmentDataManager", "org.apache.pinot.core.data.readers.PinotSegmentRecordReader", "org.apache.pinot.core.indexsegment.IndexSegment", "org.apache.pinot.spi.data.readers.GenericRow" ]
import java.util.List; import org.apache.pinot.core.data.manager.SegmentDataManager; import org.apache.pinot.core.data.readers.PinotSegmentRecordReader; import org.apache.pinot.core.indexsegment.IndexSegment; import org.apache.pinot.spi.data.readers.GenericRow;
import java.util.*; import org.apache.pinot.core.data.manager.*; import org.apache.pinot.core.data.readers.*; import org.apache.pinot.core.indexsegment.*; import org.apache.pinot.spi.data.readers.*;
[ "java.util", "org.apache.pinot" ]
java.util; org.apache.pinot;
2,641,290
var cl = getClass().getClassLoader(); var url = cl.getResource(href); if (url != null) { var saxSource = new SAXSource(); saxSource.setInputSource(new InputSource(url.toString())); saxSource.setSystemId(url.toString()); return saxSource; } e...
var cl = getClass().getClassLoader(); var url = cl.getResource(href); if (url != null) { var saxSource = new SAXSource(); saxSource.setInputSource(new InputSource(url.toString())); saxSource.setSystemId(url.toString()); return saxSource; } else { return standardResolver.resolve(href, base); } }
/** * Resolve by searching the classpath, fallback to default resolution * strategy. * */
Resolve by searching the classpath, fallback to default resolution strategy
resolve
{ "repo_name": "oehf/ipf", "path": "commons/xml/src/main/java/org/openehealth/ipf/commons/xml/ClasspathUriResolver.java", "license": "apache-2.0", "size": 2050 }
[ "javax.xml.transform.sax.SAXSource", "org.xml.sax.InputSource" ]
import javax.xml.transform.sax.SAXSource; import org.xml.sax.InputSource;
import javax.xml.transform.sax.*; import org.xml.sax.*;
[ "javax.xml", "org.xml.sax" ]
javax.xml; org.xml.sax;
1,746,707
public void setUrl(String cooked) throws AccessPoemException, ValidationPoemException { _getUploadedDocumentTable().getUrlColumn(). getType().assertValidCooked(cooked); writeLock(); setUrl_unsafe(cooked); }
void function(String cooked) throws AccessPoemException, ValidationPoemException { _getUploadedDocumentTable().getUrlColumn(). getType().assertValidCooked(cooked); writeLock(); setUrl_unsafe(cooked); }
/** * Sets the <code>Url</code> value, with checking, for this * <code>UploadedDocument</code> <code>Persistent</code>. * Field description: * The name of the file, as uploaded * * Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods * @param cooked a validated <code>int</code> ...
Sets the <code>Url</code> value, with checking, for this <code>UploadedDocument</code> <code>Persistent</code>. Field description: The name of the file, as uploaded Generated by org.melati.poem.prepro.AtomFieldDef#generateBaseMethods
setUrl
{ "repo_name": "Melati/MelatiSite", "path": "src/main/java/org/paneris/melati/site/model/generated/UploadedDocumentBase.java", "license": "gpl-3.0", "size": 7393 }
[ "org.melati.poem.AccessPoemException", "org.melati.poem.ValidationPoemException" ]
import org.melati.poem.AccessPoemException; import org.melati.poem.ValidationPoemException;
import org.melati.poem.*;
[ "org.melati.poem" ]
org.melati.poem;
1,322,681
private static void renameCopying(Configuration c) { String tmpDir = c.getTempDir(); File copying = new File(tmpDir + "/COPYING"); File copying2 = new File(tmpDir + "/COPYING.txt"); File copyingosm = new File(tmpDir + "/COPYING-OSM"); File copyingosm2 = new File(tmpDir + "/COPYING-OSM.txt"); File copying...
static void function(Configuration c) { String tmpDir = c.getTempDir(); File copying = new File(tmpDir + STR); File copying2 = new File(tmpDir + STR); File copyingosm = new File(tmpDir + STR); File copyingosm2 = new File(tmpDir + STR); File copyingmaps = new File(tmpDir + STR); File copyingmaps2 = new File(tmpDir + STR...
/** * Rename the Copying files to .txt suffix for easy access on all OS's * */
Rename the Copying files to .txt suffix for easy access on all OS's
renameCopying
{ "repo_name": "sharenav/sharenav", "path": "Osm2ShareNav/src/net/sharenav/osmToShareNav/BundleShareNav.java", "license": "gpl-2.0", "size": 25553 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
566,270