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
@Endpoint(name = "tail") public static Operand<TInt32> tail(Scope scope, Shape<TInt32> shape) { return tail(scope, shape, TInt32.class); }
@Endpoint(name = "tail") static Operand<TInt32> function(Scope scope, Shape<TInt32> shape) { return tail(scope, shape, TInt32.class); }
/** * Creates a 1-dimensional Operand that contains the dimension matching the last dimension of the * Shape. * * @param scope current scope * @param shape the TensorFlow shape * @return a 1-dimensional Operand that contains the dimension matching the last dimension of the * Shape */
Creates a 1-dimensional Operand that contains the dimension matching the last dimension of the Shape
tail
{ "repo_name": "tensorflow/java", "path": "tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Shapes.java", "license": "apache-2.0", "size": 21305 }
[ "org.tensorflow.Operand", "org.tensorflow.op.Scope", "org.tensorflow.op.annotation.Endpoint", "org.tensorflow.types.TInt32" ]
import org.tensorflow.Operand; import org.tensorflow.op.Scope; import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.types.TInt32;
import org.tensorflow.*; import org.tensorflow.op.*; import org.tensorflow.op.annotation.*; import org.tensorflow.types.*;
[ "org.tensorflow", "org.tensorflow.op", "org.tensorflow.types" ]
org.tensorflow; org.tensorflow.op; org.tensorflow.types;
1,958,709
Object[] getHiddenFields() { MarkerField[] all = getAllFields(); MarkerField[] visible = getVisibleFields(); Collection<MarkerField> hidden = new HashSet<>(); for (MarkerField element : all) { hidden.add(element); } for (MarkerField element : visible) { hidden.remove(element); } return hidden....
Object[] getHiddenFields() { MarkerField[] all = getAllFields(); MarkerField[] visible = getVisibleFields(); Collection<MarkerField> hidden = new HashSet<>(); for (MarkerField element : all) { hidden.add(element); } for (MarkerField element : visible) { hidden.remove(element); } return hidden.toArray(); }
/** * Return the fields not being shown currently. * * @return Object[] */
Return the fields not being shown currently
getHiddenFields
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerContentGenerator.java", "license": "epl-1.0", "size": 32099 }
[ "java.util.Collection", "java.util.HashSet", "org.eclipse.ui.views.markers.MarkerField" ]
import java.util.Collection; import java.util.HashSet; import org.eclipse.ui.views.markers.MarkerField;
import java.util.*; import org.eclipse.ui.views.markers.*;
[ "java.util", "org.eclipse.ui" ]
java.util; org.eclipse.ui;
357,416
public int getNameAndTypeIndex(String name, String descriptor) { for (ConstantInfo ci : listConstantInfo(NameAndType.class)) { NameAndType nat = (NameAndType) ci; int nameIndex = nat.getName_index(); String str = getString(nameIndex); if (name.equa...
int function(String name, String descriptor) { for (ConstantInfo ci : listConstantInfo(NameAndType.class)) { NameAndType nat = (NameAndType) ci; int nameIndex = nat.getName_index(); String str = getString(nameIndex); if (name.equals(str)) { int descriptorIndex = nat.getDescriptor_index(); String descr = getString(descr...
/** * Returns the constant map index to name and type * @param name * @param descriptor * @return */
Returns the constant map index to name and type
getNameAndTypeIndex
{ "repo_name": "tvesalainen/bcc", "path": "src/main/java/org/vesalainen/bcc/ClassFile.java", "license": "gpl-3.0", "size": 26742 }
[ "org.vesalainen.bcc.ConstantInfo" ]
import org.vesalainen.bcc.ConstantInfo;
import org.vesalainen.bcc.*;
[ "org.vesalainen.bcc" ]
org.vesalainen.bcc;
1,841,987
public ServiceFuture<List<ModelInfoResponse>> listModelsAsync(UUID appId, String versionId, ListModelsOptionalParameter listModelsOptionalParameter, final ServiceCallback<List<ModelInfoResponse>> serviceCallback) { return ServiceFuture.fromResponse(listModelsWithServiceResponseAsync(appId, versionId, listMo...
ServiceFuture<List<ModelInfoResponse>> function(UUID appId, String versionId, ListModelsOptionalParameter listModelsOptionalParameter, final ServiceCallback<List<ModelInfoResponse>> serviceCallback) { return ServiceFuture.fromResponse(listModelsWithServiceResponseAsync(appId, versionId, listModelsOptionalParameter), se...
/** * Gets information about all the intent and entity models in a version of the application. * * @param appId The application ID. * @param versionId The version ID. * @param listModelsOptionalParameter the object representing the optional parameters to be set before calling this API * @p...
Gets information about all the intent and entity models in a version of the application
listModelsAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java", "license": "mit", "size": 818917 }
[ "com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ListModelsOptionalParameter", "com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ModelInfoResponse", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture", "java.util.List" ]
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ListModelsOptionalParameter; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ModelInfoResponse; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.List;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.*; import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.microsoft.azure; com.microsoft.rest; java.util;
2,213,291
protected Date getDateTime() { return dateTime; }
Date function() { return dateTime; }
/** * Gets the absolute date and time when the transition occurs. * * @return the date time */
Gets the absolute date and time when the transition occurs
getDateTime
{ "repo_name": "evpaassen/ews-java-api", "path": "src/main/java/microsoft/exchange/webservices/data/AbsoluteDateTransition.java", "license": "mit", "size": 4188 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,796,038
public void assertGaugeGt(String name, double expected, BaseSource source);
void function(String name, double expected, BaseSource source);
/** * Assert that a gauge exists and it's value is greater than a given value * * @param name The name of the gauge * @param expected Value that the gauge is expected to be greater than * @param source The BaseSource{@link BaseSource} that will provide the tags, * gauges, and cou...
Assert that a gauge exists and it's value is greater than a given value
assertGaugeGt
{ "repo_name": "daidong/DominoHBase", "path": "hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/test/MetricsAssertHelper.java", "license": "apache-2.0", "size": 5992 }
[ "org.apache.hadoop.hbase.metrics.BaseSource" ]
import org.apache.hadoop.hbase.metrics.BaseSource;
import org.apache.hadoop.hbase.metrics.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
648,612
private static <T> double reduceByR( final float[] array, int length, T object, String methodName ) { try { Method method = Invoker.invokeReducerLongIntReturnLongMethod(object, methodName); double sum = 0; for (int index=0; index< length; index++) { fl...
static <T> double function( final float[] array, int length, T object, String methodName ) { try { Method method = Invoker.invokeReducerLongIntReturnLongMethod(object, methodName); double sum = 0; for (int index=0; index< length; index++) { float v = array[index]; sum = (double) method.invoke(object, sum, v); } return ...
/** * Reflection based reduce by. * @param array array of items to reduce by * @param object function * @param methodName name of method * @param <T> type of function * @return reduction */
Reflection based reduce by
reduceByR
{ "repo_name": "advantageous/boon", "path": "reflekt/src/main/java/io/advantageous/boon/primitive/Flt.java", "license": "apache-2.0", "size": 33621 }
[ "io.advantageous.boon.core.Exceptions", "io.advantageous.boon.core.reflection.Invoker", "java.lang.reflect.Method" ]
import io.advantageous.boon.core.Exceptions; import io.advantageous.boon.core.reflection.Invoker; import java.lang.reflect.Method;
import io.advantageous.boon.core.*; import io.advantageous.boon.core.reflection.*; import java.lang.reflect.*;
[ "io.advantageous.boon", "java.lang" ]
io.advantageous.boon; java.lang;
922,103
public void dropConstraints(DatabaseSession session) { //CR2612669 dropConstraints(session, new SchemaManager(session)); }
void function(DatabaseSession session) { dropConstraints(session, new SchemaManager(session)); }
/** * Drop the table constraints from the database. */
Drop the table constraints from the database
dropConstraints
{ "repo_name": "gameduell/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/tools/schemaframework/TableCreator.java", "license": "epl-1.0", "size": 23268 }
[ "org.eclipse.persistence.sessions.DatabaseSession" ]
import org.eclipse.persistence.sessions.DatabaseSession;
import org.eclipse.persistence.sessions.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
516,115
public static MatrixBlock convertToMatrixBlock( double[] data, boolean columnVector ) throws DMLRuntimeException { int rows = columnVector ? data.length : 1; int cols = columnVector ? 1 : data.length; MatrixBlock mb = new MatrixBlock(rows, cols, false); try { //copy data to mb (can be used becau...
static MatrixBlock function( double[] data, boolean columnVector ) throws DMLRuntimeException { int rows = columnVector ? data.length : 1; int cols = columnVector ? 1 : data.length; MatrixBlock mb = new MatrixBlock(rows, cols, false); try { mb.init( data, rows, cols ); } catch (Exception e){} mb.examSparsity(); return ...
/** * Creates a dense Matrix Block and copies the given double vector into it. * * @param data double array * @param columnVector if true, create matrix with single column. if false, create matrix with single row * @return matrix block * @throws DMLRuntimeException if DMLRuntimeException occurs */
Creates a dense Matrix Block and copies the given double vector into it
convertToMatrixBlock
{ "repo_name": "asurve/arvind-sysml2", "path": "src/main/java/org/apache/sysml/runtime/util/DataConverter.java", "license": "apache-2.0", "size": 28642 }
[ "org.apache.sysml.runtime.DMLRuntimeException", "org.apache.sysml.runtime.matrix.data.MatrixBlock" ]
import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.matrix.data.MatrixBlock;
import org.apache.sysml.runtime.*; import org.apache.sysml.runtime.matrix.data.*;
[ "org.apache.sysml" ]
org.apache.sysml;
179,275
@Override public IBlockState getStateFromMeta(int meta) { EnumFacing enumfacing = EnumFacing.getHorizontal(meta); return (meta & 8) > 0 ? this.getDefaultState() .withProperty(PART, BlockCompostBin.EnumPartType.LEFT) .withProperty(FACING, enumfacing) : this.getDefaultState() .withProperty(PART, Bloc...
IBlockState function(int meta) { EnumFacing enumfacing = EnumFacing.getHorizontal(meta); return (meta & 8) > 0 ? this.getDefaultState() .withProperty(PART, BlockCompostBin.EnumPartType.LEFT) .withProperty(FACING, enumfacing) : this.getDefaultState() .withProperty(PART, BlockCompostBin.EnumPartType.RIGHT) .withProperty(...
/** * Convert the given metadata into a BlockState for this Block */
Convert the given metadata into a BlockState for this Block
getStateFromMeta
{ "repo_name": "tom5454/ARKCraft", "path": "src/main/java/com/uberverse/arkcraft/common/block/BlockCompostBin.java", "license": "mit", "size": 7632 }
[ "net.minecraft.block.state.IBlockState", "net.minecraft.util.EnumFacing" ]
import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing;
import net.minecraft.block.state.*; import net.minecraft.util.*;
[ "net.minecraft.block", "net.minecraft.util" ]
net.minecraft.block; net.minecraft.util;
106,963
public void show() { if (manager == null || styleResId == null) { Log.e("NumberPickerBuilder", "setFragmentManager() and setStyleResId() must be called."); return; } final FragmentTransaction ft = manager.beginTransaction(); final Fragment prev = manager.findF...
void function() { if (manager == null styleResId == null) { Log.e(STR, STR); return; } final FragmentTransaction ft = manager.beginTransaction(); final Fragment prev = manager.findFragmentByTag(STR); if (prev != null) { ft.remove(prev); } ft.addToBackStack(null); final NumberPickerDialogFragment fragment = NumberPicker...
/** * Instantiate and show the Picker */
Instantiate and show the Picker
show
{ "repo_name": "diegoRodriguezAguila/Lecturas.Elfec.GD", "path": "betterPickers/src/main/java/com/codetroopers/betterpickers/numberpicker/NumberPickerBuilder.java", "license": "gpl-3.0", "size": 8139 }
[ "android.support.v4.app.Fragment", "android.support.v4.app.FragmentTransaction", "android.util.Log" ]
import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.util.Log;
import android.support.v4.app.*; import android.util.*;
[ "android.support", "android.util" ]
android.support; android.util;
2,071,416
public void mergeDependency(Operator<? extends OperatorDesc> op, ColumnInfo ci, Dependency dep) { Dependency old_dep = getDependency(op, ci); if (old_dep == null) { putDependency(op, ci, dep); } else { LineageInfo.DependencyType new_type = LineageCtx.getNewDepende...
void function(Operator<? extends OperatorDesc> op, ColumnInfo ci, Dependency dep) { Dependency old_dep = getDependency(op, ci); if (old_dep == null) { putDependency(op, ci, dep); } else { LineageInfo.DependencyType new_type = LineageCtx.getNewDependencyType(old_dep.getType(), LineageInfo.DependencyType.EXPRESSION); old...
/** * Merges the new dependencies in dep to the existing dependencies * of (op, ci). * * @param op The operator of the column whose dependency is being modified. * @param ci The column info of the associated column. * @param dep The new dependency. */
Merges the new dependencies in dep to the existing dependencies of (op, ci)
mergeDependency
{ "repo_name": "anishek/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/lineage/LineageCtx.java", "license": "apache-2.0", "size": 9910 }
[ "java.util.LinkedHashSet", "java.util.Set", "org.apache.hadoop.hive.ql.exec.ColumnInfo", "org.apache.hadoop.hive.ql.exec.Operator", "org.apache.hadoop.hive.ql.hooks.LineageInfo", "org.apache.hadoop.hive.ql.plan.OperatorDesc" ]
import java.util.LinkedHashSet; import java.util.Set; import org.apache.hadoop.hive.ql.exec.ColumnInfo; import org.apache.hadoop.hive.ql.exec.Operator; import org.apache.hadoop.hive.ql.hooks.LineageInfo; import org.apache.hadoop.hive.ql.plan.OperatorDesc;
import java.util.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.hooks.*; import org.apache.hadoop.hive.ql.plan.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,851,221
public static String convertConfiguration(String fileName) throws ConfigurationException { PropertiesConfiguration config = new PropertiesConfiguration(fileName); return convertConfiguration(config); }
static String function(String fileName) throws ConfigurationException { PropertiesConfiguration config = new PropertiesConfiguration(fileName); return convertConfiguration(config); }
/** * Creates a Properties Configuration of the file with the given name and converts it to a representive string * * @param fileName * @return * @throws ConfigurationException */
Creates a Properties Configuration of the file with the given name and converts it to a representive string
convertConfiguration
{ "repo_name": "AKSW/IGUANA", "path": "iguana.commons/src/main/java/org/aksw/iguana/commons/config/ConfigurationUtils.java", "license": "agpl-3.0", "size": 1537 }
[ "org.apache.commons.configuration.ConfigurationException", "org.apache.commons.configuration.PropertiesConfiguration" ]
import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.configuration.*;
[ "org.apache.commons" ]
org.apache.commons;
2,638,185
public void testDescendingRemove() { ConcurrentNavigableMap map = dmap5(); map.remove(m5); assertEquals(4, map.size()); assertFalse(map.containsKey(m5)); }
void function() { ConcurrentNavigableMap map = dmap5(); map.remove(m5); assertEquals(4, map.size()); assertFalse(map.containsKey(m5)); }
/** * remove removes the correct key-value pair from the map */
remove removes the correct key-value pair from the map
testDescendingRemove
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/ConcurrentSkipListSubMapTest.java", "license": "gpl-2.0", "size": 43284 }
[ "java.util.concurrent.ConcurrentNavigableMap" ]
import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,835,494
public static ChannelBuffer copiedBuffer(ByteOrder endianness, CharSequence string, Charset charset) { if (string == null) { throw new NullPointerException("string"); } if (string instanceof CharBuffer) { return copiedBuffer(endianness, (CharBuffer) string, charset);...
static ChannelBuffer function(ByteOrder endianness, CharSequence string, Charset charset) { if (string == null) { throw new NullPointerException(STR); } if (string instanceof CharBuffer) { return copiedBuffer(endianness, (CharBuffer) string, charset); } return copiedBuffer(endianness, CharBuffer.wrap(string), charset);...
/** * Creates a new buffer with the specified {@code endianness} whose * content is the specified {@code string} encoded in the specified * {@code charset}. The new buffer's {@code readerIndex} and * {@code writerIndex} are {@code 0} and the length of the encoded string * respectively. */
Creates a new buffer with the specified endianness whose content is the specified string encoded in the specified charset. The new buffer's readerIndex and writerIndex are 0 and the length of the encoded string respectively
copiedBuffer
{ "repo_name": "codewhy/Netty-3.3.1-Final", "path": "src/main/java/org/jboss/netty/buffer/ChannelBuffers.java", "license": "apache-2.0", "size": 41901 }
[ "java.nio.ByteOrder", "java.nio.CharBuffer", "java.nio.charset.Charset" ]
import java.nio.ByteOrder; import java.nio.CharBuffer; import java.nio.charset.Charset;
import java.nio.*; import java.nio.charset.*;
[ "java.nio" ]
java.nio;
339,500
public PipesFluentPipeline<S, ?> orderMap(PipeFunction<Pair<Map.Entry, Map.Entry>, Integer> compareFunction);
PipesFluentPipeline<S, ?> function(PipeFunction<Pair<Map.Entry, Map.Entry>, Integer> compareFunction);
/** * Add a OrderMapPipe to the end of the Pipeline * Given a Map as an input, the map is first ordered and then the keys are emitted in the order. * * @param compareFunction a function to compare to map entries * @return the extended Pipeline */
Add a OrderMapPipe to the end of the Pipeline Given a Map as an input, the map is first ordered and then the keys are emitted in the order
orderMap
{ "repo_name": "whshev/pipes", "path": "src/main/java/com/tinkerpop/pipes/util/PipesFluentPipeline.java", "license": "bsd-3-clause", "size": 35364 }
[ "com.tinkerpop.pipes.PipeFunction", "com.tinkerpop.pipes.util.structures.Pair", "java.util.Map" ]
import com.tinkerpop.pipes.PipeFunction; import com.tinkerpop.pipes.util.structures.Pair; import java.util.Map;
import com.tinkerpop.pipes.*; import com.tinkerpop.pipes.util.structures.*; import java.util.*;
[ "com.tinkerpop.pipes", "java.util" ]
com.tinkerpop.pipes; java.util;
1,251,389
@Generated @Selector("buffer") @MappedReturn(ObjCObjectMapper.class) public native MTLBuffer buffer();
@Selector(STR) @MappedReturn(ObjCObjectMapper.class) native MTLBuffer function();
/** * A Metal buffer containing index data that defines the geometry. */
A Metal buffer containing index data that defines the geometry
buffer
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/arkit/ARGeometryElement.java", "license": "apache-2.0", "size": 6036 }
[ "org.moe.natj.general.ann.MappedReturn", "org.moe.natj.objc.ann.Selector", "org.moe.natj.objc.map.ObjCObjectMapper" ]
import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; import org.moe.natj.objc.map.*;
[ "org.moe.natj" ]
org.moe.natj;
1,077,901
protected BytestreamListener getUserListener(String initiator) { return this.userListeners.get(initiator); }
BytestreamListener function(String initiator) { return this.userListeners.get(initiator); }
/** * Returns the {@link BytestreamListener} that should be informed if a SOCKS5 Bytestream request * from the given initiator JID is received. * * @param initiator the initiator's JID * @return the listener */
Returns the <code>BytestreamListener</code> that should be informed if a SOCKS5 Bytestream request from the given initiator JID is received
getUserListener
{ "repo_name": "ErkiDerLoony/xpeter", "path": "lib/smack-3.2.1-source/org/jivesoftware/smackx/bytestreams/socks5/Socks5BytestreamManager.java", "license": "gpl-3.0", "size": 30850 }
[ "org.jivesoftware.smackx.bytestreams.BytestreamListener" ]
import org.jivesoftware.smackx.bytestreams.BytestreamListener;
import org.jivesoftware.smackx.bytestreams.*;
[ "org.jivesoftware.smackx" ]
org.jivesoftware.smackx;
1,294,777
public void updateSelection(AlgorithmData algorithmData) { i_algorithmData = algorithmData; i_criteriaHTMLPage.udpateHTMLPage(i_algorithmData); i_dataCriteriaListGrid.update(i_algorithmData); i_supplementalDataListGrid.update(i_algorithmData); }
void function(AlgorithmData algorithmData) { i_algorithmData = algorithmData; i_criteriaHTMLPage.udpateHTMLPage(i_algorithmData); i_dataCriteriaListGrid.update(i_algorithmData); i_supplementalDataListGrid.update(i_algorithmData); }
/** * Retrieve the new algorithm criteria info from the DB and display it. * * @param algorithmData */
Retrieve the new algorithm criteria info from the DB and display it
updateSelection
{ "repo_name": "SHARP-HTP/phenotype-portal", "path": "src/edu/mayo/phenoportal/client/phenotype/report/CriteriaTab.java", "license": "apache-2.0", "size": 9689 }
[ "edu.mayo.phenoportal.client.core.AlgorithmData" ]
import edu.mayo.phenoportal.client.core.AlgorithmData;
import edu.mayo.phenoportal.client.core.*;
[ "edu.mayo.phenoportal" ]
edu.mayo.phenoportal;
127,105
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, IEntityLivingData livingdata) { livingdata = super.onInitialSpawn(difficulty, livingdata); this.setFleeceColor(getRandomSheepColor(this.worldObj.rand)); return livingdata; }
IEntityLivingData function(DifficultyInstance difficulty, IEntityLivingData livingdata) { livingdata = super.onInitialSpawn(difficulty, livingdata); this.setFleeceColor(getRandomSheepColor(this.worldObj.rand)); return livingdata; }
/** * Called only once on an entity when first time spawned, via egg, mob spawner, natural spawning etc, but not called * when entity is reloaded from nbt. Mainly used for initializing attributes and inventory */
Called only once on an entity when first time spawned, via egg, mob spawner, natural spawning etc, but not called when entity is reloaded from nbt. Mainly used for initializing attributes and inventory
onInitialSpawn
{ "repo_name": "SkidJava/BaseClient", "path": "new_1.8.8/net/minecraft/entity/passive/EntitySheep.java", "license": "gpl-2.0", "size": 13375 }
[ "net.minecraft.entity.IEntityLivingData", "net.minecraft.world.DifficultyInstance" ]
import net.minecraft.entity.IEntityLivingData; import net.minecraft.world.DifficultyInstance;
import net.minecraft.entity.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.world;
276,428
List<Entity> upsert(Collection<AttributeMapping> collection); /** * Translates an algorithm to a list of {@link Attribute} based on the algorithm, and the * {@link EntityType} of the source entity * * @return a list of {@link Attribute}
List<Entity> upsert(Collection<AttributeMapping> collection); /** * Translates an algorithm to a list of {@link Attribute} based on the algorithm, and the * {@link EntityType} of the source entity * * @return a list of {@link Attribute}
/** * Inserts or updates a {@link Collection} of {@link AttributeMapping}. Will generate IDs if they are not yet * specified. * * @return a list of Entities that have been added or updated */
Inserts or updates a <code>Collection</code> of <code>AttributeMapping</code>. Will generate IDs if they are not yet specified
upsert
{ "repo_name": "ChaoPang/molgenis", "path": "molgenis-semantic-mapper/src/main/java/org/molgenis/semanticmapper/repository/AttributeMappingRepository.java", "license": "lgpl-3.0", "size": 1929 }
[ "java.util.Collection", "java.util.List", "org.molgenis.data.Entity", "org.molgenis.data.meta.model.Attribute", "org.molgenis.data.meta.model.EntityType", "org.molgenis.semanticmapper.mapping.model.AttributeMapping" ]
import java.util.Collection; import java.util.List; import org.molgenis.data.Entity; import org.molgenis.data.meta.model.Attribute; import org.molgenis.data.meta.model.EntityType; import org.molgenis.semanticmapper.mapping.model.AttributeMapping;
import java.util.*; import org.molgenis.data.*; import org.molgenis.data.meta.model.*; import org.molgenis.semanticmapper.mapping.model.*;
[ "java.util", "org.molgenis.data", "org.molgenis.semanticmapper" ]
java.util; org.molgenis.data; org.molgenis.semanticmapper;
1,852,051
String acceptEncodingHeader = request.getHeader("Accept-Encoding"); if (acceptEncodingHeader == null) { return RAW; } String[] encodings = acceptEncodingHeader.split(","); List<String> encodingList = Arrays.asList(encodings); if (encodingList.contains(GZIP.getHeaderValue())) { return GZI...
String acceptEncodingHeader = request.getHeader(STR); if (acceptEncodingHeader == null) { return RAW; } String[] encodings = acceptEncodingHeader.split(","); List<String> encodingList = Arrays.asList(encodings); if (encodingList.contains(GZIP.getHeaderValue())) { return GZIP; } if (encodingList.contains(DEFLATE.getHead...
/** * Resolves the best supported content encoding from the request. * * @param request * The request that says which content encoding formats are supported by the client. * @return The best content encoding that should be applied in the response. */
Resolves the best supported content encoding from the request
resolveEncoding
{ "repo_name": "everit-org/webresource", "path": "core/src/main/java/org/everit/osgi/webresource/ContentEncoding.java", "license": "apache-2.0", "size": 1921 }
[ "java.util.Arrays", "java.util.List" ]
import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
148,751
@Endpoint(uri = "/{resourceId}" + SNAPSHOTS_URI) ResourceCollection<StorageVolumeSnapshot> getAllSnapshots(@PathParam("resourceId") String resourceId);
@Endpoint(uri = STR + SNAPSHOTS_URI) ResourceCollection<StorageVolumeSnapshot> getAllSnapshots(@PathParam(STR) String resourceId);
/** * Returns all snapshots available for an existing storage volume. * * @param resourceId resource identifier for the storage volume as seen in HPE OneView. * * @return {@link ResourceCollection}&lt;{@link StorageVolumeSnapshot}&gt; containing * the details for all found storage volume s...
Returns all snapshots available for an existing storage volume
getAllSnapshots
{ "repo_name": "HewlettPackard/oneview-sdk-java", "path": "oneview-sdk-java-lib/src/main/java/com/hp/ov/sdk/rest/client/storage/StorageVolumeClient.java", "license": "apache-2.0", "size": 6678 }
[ "com.hp.ov.sdk.dto.ResourceCollection", "com.hp.ov.sdk.dto.storage.StorageVolumeSnapshot", "com.hp.ov.sdk.rest.reflect.Endpoint", "com.hp.ov.sdk.rest.reflect.PathParam" ]
import com.hp.ov.sdk.dto.ResourceCollection; import com.hp.ov.sdk.dto.storage.StorageVolumeSnapshot; import com.hp.ov.sdk.rest.reflect.Endpoint; import com.hp.ov.sdk.rest.reflect.PathParam;
import com.hp.ov.sdk.dto.*; import com.hp.ov.sdk.dto.storage.*; import com.hp.ov.sdk.rest.reflect.*;
[ "com.hp.ov" ]
com.hp.ov;
841,360
private Trace configureTrace(ISeries series, double[] xValues, double[] xPlusError, double[] xMinusError) { // Local declarations Trace trace = null; // Make sure it is a valid series for creating a trace if (series != null && series.isEnabled() && !(series.getStyle() instanceof BasicErrorStyle) ...
Trace function(ISeries series, double[] xValues, double[] xPlusError, double[] xMinusError) { Trace trace = null; if (series != null && series.isEnabled() && !(series.getStyle() instanceof BasicErrorStyle) && !existingTraces.containsKey(series)) { double[] yValues = getDoubleValue(series); int seriesSize = yValues.leng...
/** * This operation returns the trace that is created with the given series. * Returns null if this series is not enabled or is an error series. * * @param series * The series to use when creating this trace. * @param xValues * The x values, or independent series values for this tr...
This operation returns the trace that is created with the given series. Returns null if this series is not enabled or is an error series
configureTrace
{ "repo_name": "jarrah42/eavp", "path": "org.eclipse.eavp.viz.service/src/org/eclipse/eavp/viz/service/csv/CSVPlotEditor.java", "license": "epl-1.0", "size": 31812 }
[ "java.util.List", "org.eclipse.eavp.viz.service.ISeries", "org.eclipse.eavp.viz.service.styles.BasicErrorStyle", "org.eclipse.eavp.viz.service.styles.XYZSeriesStyle", "org.eclipse.nebula.visualization.xygraph.dataprovider.CircularBufferDataProvider", "org.eclipse.nebula.visualization.xygraph.dataprovider....
import java.util.List; import org.eclipse.eavp.viz.service.ISeries; import org.eclipse.eavp.viz.service.styles.BasicErrorStyle; import org.eclipse.eavp.viz.service.styles.XYZSeriesStyle; import org.eclipse.nebula.visualization.xygraph.dataprovider.CircularBufferDataProvider; import org.eclipse.nebula.visualization.xygr...
import java.util.*; import org.eclipse.eavp.viz.service.*; import org.eclipse.eavp.viz.service.styles.*; import org.eclipse.nebula.visualization.xygraph.dataprovider.*; import org.eclipse.nebula.visualization.xygraph.figures.*; import org.eclipse.swt.graphics.*;
[ "java.util", "org.eclipse.eavp", "org.eclipse.nebula", "org.eclipse.swt" ]
java.util; org.eclipse.eavp; org.eclipse.nebula; org.eclipse.swt;
1,196,683
private SecurityAuditAttributeDTO getSecurityAuditProperties() throws APIManagementException { SecurityAuditAttributeDTO properties = new SecurityAuditAttributeDTO(); String username = RestApiCommonUtil.getLoggedInUsername(); APIProvider apiProvider = RestApiCommonUtil.getProvider(username...
SecurityAuditAttributeDTO function() throws APIManagementException { SecurityAuditAttributeDTO properties = new SecurityAuditAttributeDTO(); String username = RestApiCommonUtil.getLoggedInUsername(); APIProvider apiProvider = RestApiCommonUtil.getProvider(username); JSONObject securityAuditPropertyObject = apiProvider....
/** * This method returns the Security Audit properties from the configuration. * * @return SecurityAuditAttributeDTO Security Audit Attributes * @throws APIManagementException */
This method returns the Security Audit properties from the configuration
getSecurityAuditProperties
{ "repo_name": "uvindra/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/SettingsMappingUtil.java", "license": "apache-2.0", "size": 6669 }
[ "org.json.simple.JSONObject", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.APIProvider", "org.wso2.carbon.apimgt.impl.APIConstants", "org.wso2.carbon.apimgt.rest.api.common.RestApiCommonUtil", "org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.SecurityAuditAttributeDTO" ...
import org.json.simple.JSONObject; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.impl.APIConstants; import org.wso2.carbon.apimgt.rest.api.common.RestApiCommonUtil; import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.SecurityAu...
import org.json.simple.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.rest.api.common.*; import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.*;
[ "org.json.simple", "org.wso2.carbon" ]
org.json.simple; org.wso2.carbon;
158,559
private Builder delete(Node n, boolean deleteWhitespaceBefore) { int startPosition = n.getSourceOffset(); int length; if (n.getNext() != null && NodeUtil.getBestJSDocInfo(n.getNext()) == null) { length = n.getNext().getSourceOffset() - startPosition; } else { length = n.getLe...
Builder function(Node n, boolean deleteWhitespaceBefore) { int startPosition = n.getSourceOffset(); int length; if (n.getNext() != null && NodeUtil.getBestJSDocInfo(n.getNext()) == null) { length = n.getNext().getSourceOffset() - startPosition; } else { length = n.getLength(); } JSDocInfo jsDoc = NodeUtil.getBestJSDocI...
/** * Deletes a node and its contents from the source file. */
Deletes a node and its contents from the source file
delete
{ "repo_name": "lgeorgieff/closure-compiler", "path": "src/com/google/javascript/refactoring/SuggestedFix.java", "license": "apache-2.0", "size": 25658 }
[ "com.google.javascript.jscomp.NodeUtil", "com.google.javascript.rhino.JSDocInfo", "com.google.javascript.rhino.Node" ]
import com.google.javascript.jscomp.NodeUtil; import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino.Node;
import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,004,911
@Override public void visitDeclaration(@Nonnull final Declaration declaration) { if (!isDeclarationValid(this.cssSpec, declaration.getName())) { final String declarationsStr = allowedDeclarationsString(this.cssSpec); if (declarationsStr.equals("")) { List<String> ...
void function(@Nonnull final Declaration declaration) { if (!isDeclarationValid(this.cssSpec, declaration.getName())) { final String declarationsStr = allowedDeclarationsString(this.cssSpec); if (declarationsStr.equals(STRSTR", this.result); } } } private final ValidatorProtos.TagSpec tagSpec; private final ValidatorPr...
/** * Touches a Declaration * * @param declaration to visit */
Touches a Declaration
visitDeclaration
{ "repo_name": "ampproject/validator-java", "path": "src/main/java/dev/amp/validator/visitor/InvalidRuleVisitor.java", "license": "apache-2.0", "size": 6111 }
[ "dev.amp.validator.Context", "dev.amp.validator.ValidatorProtos", "dev.amp.validator.css.Declaration", "dev.amp.validator.utils.CssSpecUtils", "javax.annotation.Nonnull" ]
import dev.amp.validator.Context; import dev.amp.validator.ValidatorProtos; import dev.amp.validator.css.Declaration; import dev.amp.validator.utils.CssSpecUtils; import javax.annotation.Nonnull;
import dev.amp.validator.*; import dev.amp.validator.css.*; import dev.amp.validator.utils.*; import javax.annotation.*;
[ "dev.amp.validator", "javax.annotation" ]
dev.amp.validator; javax.annotation;
1,286,809
@Test public void testWIthWAL() throws Exception { HBaseStorage hbaseStorage = new HBaseStorage(TESTCOLUMN_A); Object key = "somekey"; byte type = DataType.CHARARRAY; Put put = hbaseStorage.createPut(key, type); Delete delete = hbaseStorage.createDelete(key, type, System...
void function() throws Exception { HBaseStorage hbaseStorage = new HBaseStorage(TESTCOLUMN_A); Object key = STR; byte type = DataType.CHARARRAY; Put put = hbaseStorage.createPut(key, type); Delete delete = hbaseStorage.createDelete(key, type, System.currentTimeMillis()); boolean hasDurabilityMethod = false; try { put.g...
/** * Assert that without -noWAL, the WAL is enabled the WAL * @throws IOException * @throws ParseException */
Assert that without -noWAL, the WAL is enabled the WAL
testWIthWAL
{ "repo_name": "kellyzly/pig", "path": "test/org/apache/pig/test/TestHBaseStorage.java", "license": "apache-2.0", "size": 67470 }
[ "org.apache.hadoop.hbase.client.Delete", "org.apache.hadoop.hbase.client.Put", "org.apache.pig.backend.hadoop.hbase.HBaseStorage", "org.apache.pig.data.DataType", "org.junit.Assert" ]
import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Put; import org.apache.pig.backend.hadoop.hbase.HBaseStorage; import org.apache.pig.data.DataType; import org.junit.Assert;
import org.apache.hadoop.hbase.client.*; import org.apache.pig.backend.hadoop.hbase.*; import org.apache.pig.data.*; import org.junit.*;
[ "org.apache.hadoop", "org.apache.pig", "org.junit" ]
org.apache.hadoop; org.apache.pig; org.junit;
2,905,254
private static boolean isSame(List<ExprNodeDesc> list1, List<ExprNodeDesc> list2) { if (list1 != list2) { if (list1 != null && list2 != null) { if (list1.size() != list2.size()) { return false; } for (int i = 0; i < list1.size(); i++) { if (!list1.get(i).isSame(li...
static boolean function(List<ExprNodeDesc> list1, List<ExprNodeDesc> list2) { if (list1 != list2) { if (list1 != null && list2 != null) { if (list1.size() != list2.size()) { return false; } for (int i = 0; i < list1.size(); i++) { if (!list1.get(i).isSame(list2.get(i))) { return false; } } } else { return false; } } re...
/** * Test if two lists of ExprNodeDesc are semantically same. */
Test if two lists of ExprNodeDesc are semantically same
isSame
{ "repo_name": "b-slim/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/parse/spark/GenSparkUtils.java", "license": "apache-2.0", "size": 26540 }
[ "java.util.List", "org.apache.hadoop.hive.ql.plan.ExprNodeDesc" ]
import java.util.List; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
import java.util.*; import org.apache.hadoop.hive.ql.plan.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,297,829
Collection<ROIFigure> getAllFigures() { TreeMap<Long, ROI> rois = roiComponent.getROIMap(); List<ROIFigure> all = new ArrayList<ROIFigure>(); if (rois == null) return all; Iterator i = rois.entrySet().iterator(); Entry entry; ROI roi; List<ROIFigure> l; while (i.hasNext()) { entry = (Entry) i.nex...
Collection<ROIFigure> getAllFigures() { TreeMap<Long, ROI> rois = roiComponent.getROIMap(); List<ROIFigure> all = new ArrayList<ROIFigure>(); if (rois == null) return all; Iterator i = rois.entrySet().iterator(); Entry entry; ROI roi; List<ROIFigure> l; while (i.hasNext()) { entry = (Entry) i.next(); roi = (ROI) entry....
/** * Returns all the figures hosted by the <code>ROIComponent</code>. * * @return See above. */
Returns all the figures hosted by the <code>ROIComponent</code>
getAllFigures
{ "repo_name": "dominikl/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerModel.java", "license": "gpl-2.0", "size": 49600 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Iterator", "java.util.List", "java.util.Map", "java.util.TreeMap", "org.openmicroscopy.shoola.util.roi.figures.ROIFigure" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.openmicroscopy.shoola.util.roi.figures.ROIFigure;
import java.util.*; import org.openmicroscopy.shoola.util.roi.figures.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
1,800,233
@Test public void testInvokeActionWithRemoteFailedFuture() { final ContainerNode invokeActionInput = makeRPCInput("foo"); final ArgumentCaptor<ContainerNode> inputCaptor = ArgumentCaptor.forClass(ContainerNode.class); doReturn(FluentFutures.immediateFailedFluentFuture(new RemoteDOMRpcEx...
void function() { final ContainerNode invokeActionInput = makeRPCInput("foo"); final ArgumentCaptor<ContainerNode> inputCaptor = ArgumentCaptor.forClass(ContainerNode.class); doReturn(FluentFutures.immediateFailedFluentFuture(new RemoteDOMRpcException(STR, null))) .when(domActionService2).invokeAction(eq(TEST_RPC_TYPE)...
/** * This test method invokes and executes the remote rpc. */
This test method invokes and executes the remote rpc
testInvokeActionWithRemoteFailedFuture
{ "repo_name": "opendaylight/controller", "path": "opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteOpsImplementationTest.java", "license": "epl-1.0", "size": 10860 }
[ "com.google.common.util.concurrent.ListenableFuture", "java.util.concurrent.ExecutionException", "java.util.concurrent.TimeUnit", "org.hamcrest.CoreMatchers", "org.hamcrest.MatcherAssert", "org.junit.Assert", "org.mockito.ArgumentCaptor", "org.mockito.ArgumentMatchers", "org.mockito.Mockito", "org...
import com.google.common.util.concurrent.ListenableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.junit.Assert; import org.mockito.ArgumentCaptor; import org.mockito.ArgumentMatchers; import or...
import com.google.common.util.concurrent.*; import java.util.concurrent.*; import org.hamcrest.*; import org.junit.*; import org.mockito.*; import org.opendaylight.mdsal.dom.api.*; import org.opendaylight.yangtools.util.concurrent.*; import org.opendaylight.yangtools.yang.data.api.schema.*;
[ "com.google.common", "java.util", "org.hamcrest", "org.junit", "org.mockito", "org.opendaylight.mdsal", "org.opendaylight.yangtools" ]
com.google.common; java.util; org.hamcrest; org.junit; org.mockito; org.opendaylight.mdsal; org.opendaylight.yangtools;
2,339,926
protected void doUncheckout(WebdavRequest request, WebdavResponse response, DavResource resource) throws DavException, IOException { if (!(resource instanceof VersionControlledResource)) { response.sendError(DavServletResponse.SC_METHOD_NOT_ALLOWED); ...
void function(WebdavRequest request, WebdavResponse response, DavResource resource) throws DavException, IOException { if (!(resource instanceof VersionControlledResource)) { response.sendError(DavServletResponse.SC_METHOD_NOT_ALLOWED); return; } ((VersionControlledResource) resource).uncheckout(); }
/** * The UNCHECKOUT method * * @param request * @param response * @param resource * @throws DavException * @throws IOException */
The UNCHECKOUT method
doUncheckout
{ "repo_name": "afilimonov/jackrabbit", "path": "jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/server/AbstractWebdavServlet.java", "license": "apache-2.0", "size": 51679 }
[ "java.io.IOException", "org.apache.jackrabbit.webdav.DavException", "org.apache.jackrabbit.webdav.DavResource", "org.apache.jackrabbit.webdav.DavServletResponse", "org.apache.jackrabbit.webdav.WebdavRequest", "org.apache.jackrabbit.webdav.WebdavResponse", "org.apache.jackrabbit.webdav.version.VersionCon...
import java.io.IOException; import org.apache.jackrabbit.webdav.DavException; import org.apache.jackrabbit.webdav.DavResource; import org.apache.jackrabbit.webdav.DavServletResponse; import org.apache.jackrabbit.webdav.WebdavRequest; import org.apache.jackrabbit.webdav.WebdavResponse; import org.apache.jackrabbit.webda...
import java.io.*; import org.apache.jackrabbit.webdav.*; import org.apache.jackrabbit.webdav.version.*;
[ "java.io", "org.apache.jackrabbit" ]
java.io; org.apache.jackrabbit;
110,496
@Path("{role-name}/composites") @POST @Consumes(MediaType.APPLICATION_JSON) public void addComposites(final @PathParam("role-name") String roleName, List<RoleRepresentation> roles) { auth.roles().requireManage(roleContainer); RoleModel role = roleContainer.getRole(roleName); if (...
@Path(STR) @Consumes(MediaType.APPLICATION_JSON) void function(final @PathParam(STR) String roleName, List<RoleRepresentation> roles) { auth.roles().requireManage(roleContainer); RoleModel role = roleContainer.getRole(roleName); if (role == null) { throw new NotFoundException(STR); } addComposites(auth, adminEvent, uri...
/** * Add a composite to the role * * @param roleName role's name (not id!) * @param roles */
Add a composite to the role
addComposites
{ "repo_name": "agolPL/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/RoleContainerResource.java", "license": "apache-2.0", "size": 12828 }
[ "java.util.List", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.core.MediaType", "org.jboss.resteasy.spi.NotFoundException", "org.keycloak.models.RoleModel", "org.keycloak.representations.idm.RoleRepresentation" ]
import java.util.List; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.MediaType; import org.jboss.resteasy.spi.NotFoundException; import org.keycloak.models.RoleModel; import org.keycloak.representations.idm.RoleRepresentation;
import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jboss.resteasy.spi.*; import org.keycloak.models.*; import org.keycloak.representations.idm.*;
[ "java.util", "javax.ws", "org.jboss.resteasy", "org.keycloak.models", "org.keycloak.representations" ]
java.util; javax.ws; org.jboss.resteasy; org.keycloak.models; org.keycloak.representations;
2,086,784
public void validatePathDepth(String parentId) { ValidateArgument.required(parentId, "parentId"); int depth = nodeDao.getEntityPathDepth(parentId, NodeConstants.MAX_PATH_DEPTH_PLUS_ONE); if (depth >= NodeConstants.MAX_PATH_DEPTH) { throw new IllegalArgumentException("Exceeded the maximum hierarchical depth ...
void function(String parentId) { ValidateArgument.required(parentId, STR); int depth = nodeDao.getEntityPathDepth(parentId, NodeConstants.MAX_PATH_DEPTH_PLUS_ONE); if (depth >= NodeConstants.MAX_PATH_DEPTH) { throw new IllegalArgumentException(STR + NodeConstants.MAX_PATH_DEPTH + STR + parentId); } }
/** * Validate that adding an Entity to the following container will not exceed the * maximum hierarchical depth. * * @param parentId */
Validate that adding an Entity to the following container will not exceed the maximum hierarchical depth
validatePathDepth
{ "repo_name": "zimingd/Synapse-Repository-Services", "path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/NodeManagerImpl.java", "license": "apache-2.0", "size": 35274 }
[ "org.sagebionetworks.repo.model.NodeConstants", "org.sagebionetworks.util.ValidateArgument" ]
import org.sagebionetworks.repo.model.NodeConstants; import org.sagebionetworks.util.ValidateArgument;
import org.sagebionetworks.repo.model.*; import org.sagebionetworks.util.*;
[ "org.sagebionetworks.repo", "org.sagebionetworks.util" ]
org.sagebionetworks.repo; org.sagebionetworks.util;
1,783,372
private static int expandCommonMappers(List<ObjectMapper> parentMappers, String[] nameParts, int i) { ObjectMapper last = parentMappers.get(parentMappers.size() - 1); while (i < nameParts.length - 1 && last.getMapper(nameParts[i]) != null) { Mapper newLast = last.getMapper(nameParts[i]);...
static int function(List<ObjectMapper> parentMappers, String[] nameParts, int i) { ObjectMapper last = parentMappers.get(parentMappers.size() - 1); while (i < nameParts.length - 1 && last.getMapper(nameParts[i]) != null) { Mapper newLast = last.getMapper(nameParts[i]); assert newLast instanceof ObjectMapper; last = (Ob...
/** * Adds mappers from the end of the stack that exist as updates within those mappers. * Returns the next unprocessed index from nameParts. */
Adds mappers from the end of the stack that exist as updates within those mappers. Returns the next unprocessed index from nameParts
expandCommonMappers
{ "repo_name": "ern/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java", "license": "apache-2.0", "size": 51945 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,459,602
@Test public void testGetSupportedPropertyDescriptorsSanity() throws Exception { List<PropertyDescriptor> expected = Arrays.asList( MetricsReportingTask.REPORTER_SERVICE, MetricsReportingTask.PROCESS_GROUP_ID); assertEquals(expected, testedReportingTask.getSupport...
void function() throws Exception { List<PropertyDescriptor> expected = Arrays.asList( MetricsReportingTask.REPORTER_SERVICE, MetricsReportingTask.PROCESS_GROUP_ID); assertEquals(expected, testedReportingTask.getSupportedPropertyDescriptors()); }
/** * Sanity check for registered properties. */
Sanity check for registered properties
testGetSupportedPropertyDescriptorsSanity
{ "repo_name": "apsaltis/nifi", "path": "nifi-nar-bundles/nifi-metrics-reporting-bundle/nifi-metrics-reporting-task/src/test/java/org/apache/nifi/metrics/reporting/task/MetricsReportingTaskTest.java", "license": "apache-2.0", "size": 10796 }
[ "java.util.Arrays", "java.util.List", "org.apache.nifi.components.PropertyDescriptor", "org.junit.Assert" ]
import java.util.Arrays; import java.util.List; import org.apache.nifi.components.PropertyDescriptor; import org.junit.Assert;
import java.util.*; import org.apache.nifi.components.*; import org.junit.*;
[ "java.util", "org.apache.nifi", "org.junit" ]
java.util; org.apache.nifi; org.junit;
1,787,048
public void draw(Canvas c) { drawEdgeEffectsUnclipped(c); }
void function(Canvas c) { drawEdgeEffectsUnclipped(c); }
/** * draws the glowing edge effect * * @param c canvas */
draws the glowing edge effect
draw
{ "repo_name": "Hamsterkiller/GraphView", "path": "src/main/java/com/jjoe64/graphview/Viewport.java", "license": "gpl-2.0", "size": 33341 }
[ "android.graphics.Canvas" ]
import android.graphics.Canvas;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,773,830
public List<Transaction> getAll() throws SQLException { ResultSet resultSet = Database.query( "select T1.id, T1.senderNumber, T1.receiverNumber, T1.amount, T1.reference, T1.transactionDate, T2.owner as senderOwner, T3.owner as receiverOwner from transactions as T1 join accounts as T2 on T1.senderNumber = T2....
List<Transaction> function() throws SQLException { ResultSet resultSet = Database.query( STR); List<Transaction> transactionList = new LinkedList<Transaction>(); while (resultSet.next()) { Transaction transaction = new Transaction(); transaction.setId(resultSet.getInt(1)); Account sender = new Account(); sender.setNumb...
/** * Sucht nach allen Transaktionen in der Datenbank * * @return * @throws SQLException */
Sucht nach allen Transaktionen in der Datenbank
getAll
{ "repo_name": "wip-bank/server", "path": "src/de/fhdw/wipbank/server/service/TransactionService.java", "license": "apache-2.0", "size": 4731 }
[ "de.fhdw.wipbank.server.db.Database", "de.fhdw.wipbank.server.model.Account", "de.fhdw.wipbank.server.model.Transaction", "java.sql.ResultSet", "java.sql.SQLException", "java.util.Date", "java.util.LinkedList", "java.util.List" ]
import de.fhdw.wipbank.server.db.Database; import de.fhdw.wipbank.server.model.Account; import de.fhdw.wipbank.server.model.Transaction; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Date; import java.util.LinkedList; import java.util.List;
import de.fhdw.wipbank.server.db.*; import de.fhdw.wipbank.server.model.*; import java.sql.*; import java.util.*;
[ "de.fhdw.wipbank", "java.sql", "java.util" ]
de.fhdw.wipbank; java.sql; java.util;
2,596,945
@RequestMapping(value = "/listarEscala/{idColaborador}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public List<Escala> listarTodasEscalas(@PathVariable Long idColaborador) throws SQLException { //long colaboradorId = (long) request.getAttribute("id_colaborador"); //Colaborado...
@RequestMapping(value = STR, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) List<Escala> function(@PathVariable Long idColaborador) throws SQLException { List<Escala> lista = escalaBo.listarEscalaColaborador(idColaborador); return lista; }
/** * Lista responsavel por retorna a escala de um colaborador passando apenas o seu idcolaborador faz parte do(CRUD) * @param idColaborador * @return * @throws SQLException */
Lista responsavel por retorna a escala de um colaborador passando apenas o seu idcolaborador faz parte do(CRUD)
listarTodasEscalas
{ "repo_name": "GabrielaALopess/BackEnd-Stayfilm", "path": "src/br/com/senai/stayFilm/controller/EscalaRestController.java", "license": "mit", "size": 5805 }
[ "br.com.senai.stayFilm.model.Escala", "java.sql.SQLException", "java.util.List", "org.springframework.http.MediaType", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod" ]
import br.com.senai.stayFilm.model.Escala; import java.sql.SQLException; import java.util.List; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMet...
import br.com.senai.*; import java.sql.*; import java.util.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "br.com.senai", "java.sql", "java.util", "org.springframework.http", "org.springframework.web" ]
br.com.senai; java.sql; java.util; org.springframework.http; org.springframework.web;
2,463,743
protected DocumentNode getInsertNode(WikiDataRequest request) throws org.dbwiki.exception.WikiException { SchemaNode schemaNode = database().schema().get(Integer.parseInt(request.parameters().get(RequestParameter.ActionValueSchemaNode).value())); if (schemaNode.isAttribute()) { AttributeSchemaNode attributeS...
DocumentNode function(WikiDataRequest request) throws org.dbwiki.exception.WikiException { SchemaNode schemaNode = database().schema().get(Integer.parseInt(request.parameters().get(RequestParameter.ActionValueSchemaNode).value())); if (schemaNode.isAttribute()) { AttributeSchemaNode attributeSchemaNode = (AttributeSche...
/** Gets the document node associated with an insert POST request. * FIXME: Could be a method of WikiDataRequest * @param request * @return * @throws org.dbwiki.exception.WikiException */
Gets the document node associated with an insert POST request
getInsertNode
{ "repo_name": "jamescheney/database-wiki", "path": "src/org/dbwiki/web/server/DatabaseWiki.java", "license": "gpl-3.0", "size": 45935 }
[ "org.dbwiki.data.document.DocumentAttributeNode", "org.dbwiki.data.document.DocumentGroupNode", "org.dbwiki.data.document.DocumentNode", "org.dbwiki.data.schema.AttributeSchemaNode", "org.dbwiki.data.schema.SchemaNode", "org.dbwiki.web.request.WikiDataRequest", "org.dbwiki.web.request.parameter.RequestP...
import org.dbwiki.data.document.DocumentAttributeNode; import org.dbwiki.data.document.DocumentGroupNode; import org.dbwiki.data.document.DocumentNode; import org.dbwiki.data.schema.AttributeSchemaNode; import org.dbwiki.data.schema.SchemaNode; import org.dbwiki.web.request.WikiDataRequest; import org.dbwiki.web.reques...
import org.dbwiki.data.document.*; import org.dbwiki.data.schema.*; import org.dbwiki.web.request.*; import org.dbwiki.web.request.parameter.*;
[ "org.dbwiki.data", "org.dbwiki.web" ]
org.dbwiki.data; org.dbwiki.web;
215,323
public void doDeep_delete_assignment(RunData data) { if (!"POST".equals(data.getRequest().getMethod())) { return; } SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); // get the delete assignment ids List ids = (List) state.getAttribute(DELE...
void function(RunData data) { if (!"POST".equals(data.getRequest().getMethod())) { return; } SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); List ids = (List) state.getAttribute(DELETE_ASSIGNMENT_IDS); for (int i = 0; i < ids.size(); i++) { String currentId =...
/** * Action is to delete the assignment and also the related AssignmentSubmission */
Action is to delete the assignment and also the related AssignmentSubmission
doDeep_delete_assignment
{ "repo_name": "frasese/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 686269 }
[ "java.util.ArrayList", "java.util.List", "org.sakaiproject.assignment.api.AssignmentEdit", "org.sakaiproject.assignment.cover.AssignmentService", "org.sakaiproject.assignment.taggable.api.AssignmentActivityProducer", "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "or...
import java.util.ArrayList; import java.util.List; import org.sakaiproject.assignment.api.AssignmentEdit; import org.sakaiproject.assignment.cover.AssignmentService; import org.sakaiproject.assignment.taggable.api.AssignmentActivityProducer; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.chef...
import java.util.*; import org.sakaiproject.assignment.api.*; import org.sakaiproject.assignment.cover.*; import org.sakaiproject.assignment.taggable.api.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.component.cover.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*; import org...
[ "java.util", "org.sakaiproject.assignment", "org.sakaiproject.cheftool", "org.sakaiproject.component", "org.sakaiproject.event", "org.sakaiproject.exception", "org.sakaiproject.taggable" ]
java.util; org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.component; org.sakaiproject.event; org.sakaiproject.exception; org.sakaiproject.taggable;
1,496,949
private void handleSunriseSunset(Matcher m, String resp) { if (m == null) { throw new IllegalArgumentException("m (matcher) cannot be null"); } if (m.groupCount() == 5) { if (m.group(1).equals("255")) { logger.warn("Sunrise/Sunset needs to be enabled v...
void function(Matcher m, String resp) { if (m == null) { throw new IllegalArgumentException(STR); } if (m.groupCount() == 5) { if (m.group(1).equals("255")) { logger.warn(STR); return; } try { final Calendar sunrise = Calendar.getInstance(); sunrise.set(Calendar.HOUR_OF_DAY, Integer.parseInt(m.group(1))); sunrise.set(C...
/** * Handles the sunrise/sunset response * * @param m the non-null {@link Matcher} that matched the response * @param resp the possibly null, possibly empty actual response */
Handles the sunrise/sunset response
handleSunriseSunset
{ "repo_name": "georgeerhan/openhab2-addons", "path": "addons/binding/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/grxprg/PrgProtocolHandler.java", "license": "epl-1.0", "size": 45437 }
[ "java.util.Calendar", "java.util.regex.Matcher", "org.eclipse.smarthome.core.library.types.DateTimeType" ]
import java.util.Calendar; import java.util.regex.Matcher; import org.eclipse.smarthome.core.library.types.DateTimeType;
import java.util.*; import java.util.regex.*; import org.eclipse.smarthome.core.library.types.*;
[ "java.util", "org.eclipse.smarthome" ]
java.util; org.eclipse.smarthome;
2,624,647
private Place jsonObjectToPlace(JSONObject object) { String name = object.optString("name"); double latitude = object.optDouble("latitude", Double.NaN); double longitude = object.optDouble("longitude", Double.NaN); if (!name.isEmpty() && !Double.isNaN(latitude) && !Double.isNaN(long...
Place function(JSONObject object) { String name = object.optString("name"); double latitude = object.optDouble(STR, Double.NaN); double longitude = object.optDouble(STR, Double.NaN); if (!name.isEmpty() && !Double.isNaN(latitude) && !Double.isNaN(longitude)) { return new Place(latitude, longitude, name); } else { retur...
/** * Converts a JSON object that represents a place into a {@link Place} object. */
Converts a JSON object that represents a place into a <code>Place</code> object
jsonObjectToPlace
{ "repo_name": "connerbrooks/vicinity", "path": "src/com/google/android/glass/sample/compass/model/Landmarks.java", "license": "apache-2.0", "size": 7483 }
[ "org.json.JSONObject" ]
import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
1,328,523
File getFsImageName() { StorageDirectory sd = null; for (Iterator<StorageDirectory> it = dirIterator(NameNodeDirType.IMAGE); it.hasNext();) sd = it.next(); return getImageFile(sd, NameNodeFile.IMAGE); }
File getFsImageName() { StorageDirectory sd = null; for (Iterator<StorageDirectory> it = dirIterator(NameNodeDirType.IMAGE); it.hasNext();) sd = it.next(); return getImageFile(sd, NameNodeFile.IMAGE); }
/** * Return the name of the image file. */
Return the name of the image file
getFsImageName
{ "repo_name": "thisisvoa/hadoop-0.20", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java", "license": "apache-2.0", "size": 62398 }
[ "java.io.File", "java.util.Iterator" ]
import java.io.File; import java.util.Iterator;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
346,620
@GET("tv/{tv_id}/season/{season_number}/episode/{episode_number}/videos") Call<Videos> videos( @Path("tv_id") int tvShowId, @Path("season_number") int tvShowSeasonNumber, @Path("episode_number") int tvShowEpisodeNumber, @Query("language") String language );
@GET(STR) Call<Videos> videos( @Path("tv_id") int tvShowId, @Path(STR) int tvShowSeasonNumber, @Path(STR) int tvShowEpisodeNumber, @Query(STR) String language );
/** * Get the videos that have been added to a TV episode (teasers, clips, etc...) * * @param tvShowId A Tv Show TMDb id. * @param tvShowSeasonNumber TvSeason Number. * @param tvShowEpisodeNumber TvEpisode Number. * @param language <em>Optional.</em> ISO 639-1 code. ...
Get the videos that have been added to a TV episode (teasers, clips, etc...)
videos
{ "repo_name": "ProIcons/tmdb-java", "path": "src/main/java/com/uwetrottmann/tmdb2/services/TvEpisodesService.java", "license": "unlicense", "size": 12899 }
[ "com.uwetrottmann.tmdb2.entities.Videos" ]
import com.uwetrottmann.tmdb2.entities.Videos;
import com.uwetrottmann.tmdb2.entities.*;
[ "com.uwetrottmann.tmdb2" ]
com.uwetrottmann.tmdb2;
1,502,863
public static List<ITrait> getModifiersListAll (ItemStack stack) { List<ITrait> traits = Lists.newLinkedList() ; traits.addAll(getTraitsModifiersList(stack)) ; traits.addAll(getTraitsListArmourSet(stack)) ; return traits ; }
static List<ITrait> function (ItemStack stack) { List<ITrait> traits = Lists.newLinkedList() ; traits.addAll(getTraitsModifiersList(stack)) ; traits.addAll(getTraitsListArmourSet(stack)) ; return traits ; }
/** * Returns all traits/modifiers associated to this armour * Does not take into account if said trait should be active or not * */
Returns all traits/modifiers associated to this armour Does not take into account if said trait should be active or not
getModifiersListAll
{ "repo_name": "MightyCupcakes/ArmourReborn", "path": "src/main/java/teamOD/armourReborn/common/lib/LibUtil.java", "license": "mit", "size": 12487 }
[ "com.google.common.collect.Lists", "java.util.List", "net.minecraft.item.ItemStack" ]
import com.google.common.collect.Lists; import java.util.List; import net.minecraft.item.ItemStack;
import com.google.common.collect.*; import java.util.*; import net.minecraft.item.*;
[ "com.google.common", "java.util", "net.minecraft.item" ]
com.google.common; java.util; net.minecraft.item;
43,639
public void setPercentUtilization (BigDecimal PercentUtilization) { set_Value (COLUMNNAME_PercentUtilization, PercentUtilization); }
void function (BigDecimal PercentUtilization) { set_Value (COLUMNNAME_PercentUtilization, PercentUtilization); }
/** Set % Utilization. @param PercentUtilization % Utilization */
Set % Utilization
setPercentUtilization
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_S_Resource.java", "license": "gpl-2.0", "size": 12207 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,130,013
@Override public void close() throws IOException { if (this.handler != null) { this.handler.removeThrottledConnection(this); this.handler = null; } synchronized (this) { this.notify(); } this.out.close(); }
void function() throws IOException { if (this.handler != null) { this.handler.removeThrottledConnection(this); this.handler = null; } synchronized (this) { this.notify(); } this.out.close(); }
/** * DO NOT FORGET TO CLOSE */
DO NOT FORGET TO CLOSE
close
{ "repo_name": "friedlwo/AppWoksUtils", "path": "src/org/appwork/utils/net/throttledconnection/ThrottledOutputStream.java", "license": "artistic-2.0", "size": 6701 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
408,903
InternalJob iJob = null; logger.info("Create job '" + job.getName() + "' - " + job.getClass().getName()); switch (job.getType()) { case PARAMETER_SWEEPING: logger.error("The type of the given job is not yet implemented !"); throw new JobCreationException("Th...
InternalJob iJob = null; logger.info(STR + job.getName() + STR + job.getClass().getName()); switch (job.getType()) { case PARAMETER_SWEEPING: logger.error(STR); throw new JobCreationException(STR); case TASKSFLOW: iJob = createJob((TaskFlowJob) job); break; default: logger.error(STR); throw new JobCreationException(STR...
/** * Create a new internal job with the given job (user). * * @param job the user job that will be used to create the internal job. * @return the created internal job. * @throws JobCreationException an exception if the factory cannot create the given job. */
Create a new internal job with the given job (user)
createJob
{ "repo_name": "acontes/scheduling", "path": "src/scheduler/src/org/ow2/proactive/scheduler/job/InternalJobFactory.java", "license": "agpl-3.0", "size": 16663 }
[ "org.ow2.proactive.scheduler.common.exception.JobCreationException", "org.ow2.proactive.scheduler.common.job.TaskFlowJob" ]
import org.ow2.proactive.scheduler.common.exception.JobCreationException; import org.ow2.proactive.scheduler.common.job.TaskFlowJob;
import org.ow2.proactive.scheduler.common.exception.*; import org.ow2.proactive.scheduler.common.job.*;
[ "org.ow2.proactive" ]
org.ow2.proactive;
1,868,775
public CartesianPoint toCartesianPoint() { double latR = toRadians(lat); double longR = toRadians(lon); double x = GeoConstants.MEAN_EARTH_RADIUS_IN_METRES * cos(latR) * cos(longR); double y = GeoConstants.MEAN_EARTH_RADIUS_IN_METRES * cos(latR) * sin(longR); double z = GeoCo...
CartesianPoint function() { double latR = toRadians(lat); double longR = toRadians(lon); double x = GeoConstants.MEAN_EARTH_RADIUS_IN_METRES * cos(latR) * cos(longR); double y = GeoConstants.MEAN_EARTH_RADIUS_IN_METRES * cos(latR) * sin(longR); double z = GeoConstants.MEAN_EARTH_RADIUS_IN_METRES * sin(latR); return new...
/** * Converse to cartesian coordinate system in metres * * @return point in cartesian coordinate system */
Converse to cartesian coordinate system in metres
toCartesianPoint
{ "repo_name": "cortwave/geogrid", "path": "src/main/java/by/cortwave/geogrid/shape/GeoPoint.java", "license": "bsd-3-clause", "size": 4454 }
[ "by.cortwave.geogrid.constant.GeoConstants", "java.lang.Math" ]
import by.cortwave.geogrid.constant.GeoConstants; import java.lang.Math;
import by.cortwave.geogrid.constant.*; import java.lang.*;
[ "by.cortwave.geogrid", "java.lang" ]
by.cortwave.geogrid; java.lang;
664,595
EClass getMineID();
EClass getMineID();
/** * Returns the meta object for class '{@link org.xtext.example.delphi.delphi.MineID <em>Mine ID</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Mine ID</em>'. * @see org.xtext.example.delphi.delphi.MineID * @generated */
Returns the meta object for class '<code>org.xtext.example.delphi.delphi.MineID Mine ID</code>'.
getMineID
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/src-gen/org/xtext/example/delphi/delphi/DelphiPackage.java", "license": "epl-1.0", "size": 434880 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
416,431
public static final void transform(Structure structure, Matrix4d m) { for (int n=0; n<structure.nrModels();n++) { for (Chain c : structure.getChains(n)) { transform(c, m); } } }
static final void function(Structure structure, Matrix4d m) { for (int n=0; n<structure.nrModels();n++) { for (Chain c : structure.getChains(n)) { transform(c, m); } } }
/** * Transforms a structure object, given a Matrix4d (i.e. the vecmath library * double-precision 4x4 rotation+translation matrix). The transformation * Matrix must be a post-multiplication Matrix. * * @param structure * @param m */
Transforms a structure object, given a Matrix4d (i.e. the vecmath library double-precision 4x4 rotation+translation matrix). The transformation Matrix must be a post-multiplication Matrix
transform
{ "repo_name": "pwrose/biojava", "path": "biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java", "license": "lgpl-2.1", "size": 33877 }
[ "javax.vecmath.Matrix4d" ]
import javax.vecmath.Matrix4d;
import javax.vecmath.*;
[ "javax.vecmath" ]
javax.vecmath;
2,715,294
public CacheConfiguration<K, V> setRebalanceTimeout(long rebalanceTimeout) { this.rebalanceTimeout = rebalanceTimeout; return this; } /** * Gets delay in milliseconds upon a node joining or leaving topology (or crash) after which rebalancing * should be started automatically. Reb...
CacheConfiguration<K, V> function(long rebalanceTimeout) { this.rebalanceTimeout = rebalanceTimeout; return this; } /** * Gets delay in milliseconds upon a node joining or leaving topology (or crash) after which rebalancing * should be started automatically. Rebalancing should be delayed if you plan to restart nodes * ...
/** * Sets rebalance timeout (ms). * * @param rebalanceTimeout Rebalance timeout (ms). * @return {@code this} for chaining. */
Sets rebalance timeout (ms)
setRebalanceTimeout
{ "repo_name": "f7753/ignite", "path": "modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java", "license": "apache-2.0", "size": 93596 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
1,588,661
private void checkFirstModule(List<JSModule> modules) { if (modules.isEmpty()) { report(JSError.make(EMPTY_MODULE_LIST_ERROR)); } else if (modules.get(0).getInputs().isEmpty() && modules.size() > 1) { // The root module may only be empty if there is exactly 1 module. report(JSError.make(EMPT...
void function(List<JSModule> modules) { if (modules.isEmpty()) { report(JSError.make(EMPTY_MODULE_LIST_ERROR)); } else if (modules.get(0).getInputs().isEmpty() && modules.size() > 1) { report(JSError.make(EMPTY_ROOT_MODULE_ERROR, modules.get(0).getName())); } }
/** * Verifies that at least one module has been provided and that the first one * has at least one source code input. */
Verifies that at least one module has been provided and that the first one has at least one source code input
checkFirstModule
{ "repo_name": "SkReD/closure-compiler", "path": "src/com/google/javascript/jscomp/Compiler.java", "license": "apache-2.0", "size": 80948 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,349,218
@Nullable Sql<String> retrieveSql(@NotNull final List<Sql<String>> sqlList, @NotNull final String sqlRef) { @Nullable Sql<String> result = null; for (@Nullable final Sql<String> sql : sqlList) { if ( (sql != null) && (sql.getId().equalsIgnoreCase(sqlRef))) ...
@Nullable Sql<String> retrieveSql(@NotNull final List<Sql<String>> sqlList, @NotNull final String sqlRef) { @Nullable Sql<String> result = null; for (@Nullable final Sql<String> sql : sqlList) { if ( (sql != null) && (sql.getId().equalsIgnoreCase(sqlRef))) { result = sql; break; } } return result; }
/** * Retrieves the SQL matching given id. * @param sqlList the list of {@link Sql}. * @param sqlRef the SQL reference. * @return the {@link Sql} matching given reference. */
Retrieves the SQL matching given id
retrieveSql
{ "repo_name": "rydnr/queryj", "path": "queryj-test/src/main/java/org/acmsl/queryj/test/TableTestHelper.java", "license": "gpl-2.0", "size": 31598 }
[ "java.util.List", "org.acmsl.queryj.customsql.Sql", "org.jetbrains.annotations.NotNull", "org.jetbrains.annotations.Nullable" ]
import java.util.List; import org.acmsl.queryj.customsql.Sql; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.acmsl.queryj.customsql.*; import org.jetbrains.annotations.*;
[ "java.util", "org.acmsl.queryj", "org.jetbrains.annotations" ]
java.util; org.acmsl.queryj; org.jetbrains.annotations;
484,761
Resource getAppMetadataResource(AppRegistration appRegistration);
Resource getAppMetadataResource(AppRegistration appRegistration);
/** * Converts application's metadata URI into Spring resource object. Supports File:, Http:, * Maven: and Docker: schemas * @param appRegistration the application registration * @return Returns {@link Resource} instance that corresponds to application's metdata URI */
Converts application's metadata URI into Spring resource object. Supports File:, Http:, Maven: and Docker: schemas
getAppMetadataResource
{ "repo_name": "markpollack/spring-cloud-dataflow", "path": "spring-cloud-dataflow-registry/src/main/java/org/springframework/cloud/dataflow/registry/service/AppRegistryService.java", "license": "apache-2.0", "size": 7644 }
[ "org.springframework.cloud.dataflow.core.AppRegistration", "org.springframework.core.io.Resource" ]
import org.springframework.cloud.dataflow.core.AppRegistration; import org.springframework.core.io.Resource;
import org.springframework.cloud.dataflow.core.*; import org.springframework.core.io.*;
[ "org.springframework.cloud", "org.springframework.core" ]
org.springframework.cloud; org.springframework.core;
1,760,687
public boolean start(Query query) { KnowledgeAnnotator ka = getCopy(); if (ka.matches(query)) { // wait until there are less than MAX_PENDING pending queries Search.waitForPending(); ka.start(); // one more pending query Search.incPendin...
boolean function(Query query) { KnowledgeAnnotator ka = getCopy(); if (ka.matches(query)) { Search.waitForPending(); ka.start(); Search.incPending(); return true; } return false; }
/** * <p>Sets the query and starts the thread if the knowledge annotator is * appropriate for the user question.</p> * * <p>This method should be used instead of the inherited * <code>start()</code> method without arguments.</p> * * @param query query object * @return true, iff t...
Sets the query and starts the thread if the knowledge annotator is appropriate for the user question. This method should be used instead of the inherited <code>start()</code> method without arguments
start
{ "repo_name": "csarron/PriaQA", "path": "src/info/ephyra/search/searchers/KnowledgeAnnotator.java", "license": "gpl-3.0", "size": 7177 }
[ "info.ephyra.querygeneration.Query", "info.ephyra.search.Search" ]
import info.ephyra.querygeneration.Query; import info.ephyra.search.Search;
import info.ephyra.querygeneration.*; import info.ephyra.search.*;
[ "info.ephyra.querygeneration", "info.ephyra.search" ]
info.ephyra.querygeneration; info.ephyra.search;
613,032
private void checkRegistered(String descriptorName, String productName, Object factoryInstance) { if (arePreferencesSupported) { if (productName == null) throw new IllegalArgumentException( "productName : " + JaiI18N.getString("Generic0")); CaselessStringKey fileName = (CaselessS...
void function(String descriptorName, String productName, Object factoryInstance) { if (arePreferencesSupported) { if (productName == null) throw new IllegalArgumentException( STR + JaiI18N.getString(STR)); CaselessStringKey fileName = (CaselessStringKey)instancesByName.get(factoryInstance); if (fileName != null) { Vect...
/** * Check to see if <code>factoryInstance</code> is registered against * the specified <code>descriptorName</code> and <code>productName</code>. */
Check to see if <code>factoryInstance</code> is registered against the specified <code>descriptorName</code> and <code>productName</code>
checkRegistered
{ "repo_name": "MarinnaCole/LightZone", "path": "lightcrafts/extsrc/com/lightcrafts/mediax/jai/FactoryCache.java", "license": "bsd-3-clause", "size": 13535 }
[ "com.lightcrafts.mediax.jai.util.CaselessStringKey", "java.util.Vector" ]
import com.lightcrafts.mediax.jai.util.CaselessStringKey; import java.util.Vector;
import com.lightcrafts.mediax.jai.util.*; import java.util.*;
[ "com.lightcrafts.mediax", "java.util" ]
com.lightcrafts.mediax; java.util;
2,020,886
@Test public void processTreeBuilderForBinaryAndBits() { schemaProvider.processSchemaRegistry(null); DefaultYangSchemaRegistry registry = schemaProvider .getDefaultYangSchemaRegistry(); // As an application, creates the object. // Creates a byte array for binary...
void function() { schemaProvider.processSchemaRegistry(null); DefaultYangSchemaRegistry registry = schemaProvider .getDefaultYangSchemaRegistry(); byte[] binLeaf = new byte[]{5, 5, 5}; Derivedbinaryb derBinb = new Derivedbinaryb(binLeaf); Derivedbinarya derBina = new Derivedbinarya(derBinb); BitSet bitLeaf = new BitSet...
/** * Processes tree building from the derived type of leaf and leaf-list * having binary and bits . */
Processes tree building from the derived type of leaf and leaf-list having binary and bits
processTreeBuilderForBinaryAndBits
{ "repo_name": "donNewtonAlpha/onos", "path": "apps/yms/ut/src/test/java/org/onosproject/yms/app/ytb/DefaultYangTreeBuilderTest.java", "license": "apache-2.0", "size": 54136 }
[ "java.util.ArrayList", "java.util.BitSet", "java.util.List", "java.util.Set", "org.hamcrest.MatcherAssert", "org.hamcrest.core.Is", "org.onosproject.yang.gen.v1.yms.test.ytb.derived.type.with.bits.and.binary.rev20160826.YtbDerivedTypeWithBitsAndBinary", "org.onosproject.yang.gen.v1.yms.test.ytb.derive...
import java.util.ArrayList; import java.util.BitSet; import java.util.List; import java.util.Set; import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.onosproject.yang.gen.v1.yms.test.ytb.derived.type.with.bits.and.binary.rev20160826.YtbDerivedTypeWithBitsAndBinary; import org.onosproject.yang.gen...
import java.util.*; import org.hamcrest.*; import org.hamcrest.core.*; import org.onosproject.yang.gen.v1.yms.test.ytb.derived.type.with.bits.and.binary.rev20160826.*; import org.onosproject.yang.gen.v1.yms.test.ytb.derived.type.with.bits.and.binary.rev20160826.ytbderivedtypewithbitsandbinary.*; import org.onosproject....
[ "java.util", "org.hamcrest", "org.hamcrest.core", "org.onosproject.yang", "org.onosproject.yms" ]
java.util; org.hamcrest; org.hamcrest.core; org.onosproject.yang; org.onosproject.yms;
1,064,632
@Test public void testIncrementSecondMinuteAndHour() { String message = " change indicator is not working (last time: " + time + ", current time: "; boolean[] changed = time.incrementSecond(); message += time + ") "; boolean expected = second == 59 && minute == 59 ? changed[0] : !changed[0]; assertTrue(...
void function() { String message = STR + time + STR; boolean[] changed = time.incrementSecond(); message += time + STR; boolean expected = second == 59 && minute == 59 ? changed[0] : !changed[0]; assertTrue("[Hour" + message + STR + expected + STR + !expected + ">]", expected); expected = second == 59 ? changed[1] : !c...
/** * Is incrementSecond method able to right increment seconds? * Is also able to increment the minute and hour values when it is * necessary? */
Is incrementSecond method able to right increment seconds? Is also able to increment the minute and hour values when it is necessary
testIncrementSecondMinuteAndHour
{ "repo_name": "jonathansotoan/deitel", "path": "tests/graphicsExercises/watch/TimeTest.java", "license": "mit", "size": 5511 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
700,100
Class<? extends AppEvent> getEventClazz(IAppListener<? extends AppEvent> listener) { Type[] typeParams = listener.getClass().getGenericInterfaces(); for (Type type : typeParams) { @SuppressWarnings("unchecked") Class<? extends AppEvent> ec = (Class<? extends AppEvent>) TypeTraits.getClass(...
Class<? extends AppEvent> getEventClazz(IAppListener<? extends AppEvent> listener) { Type[] typeParams = listener.getClass().getGenericInterfaces(); for (Type type : typeParams) { @SuppressWarnings(STR) Class<? extends AppEvent> ec = (Class<? extends AppEvent>) TypeTraits.getClass(type, 0); if (AppEvent.class.isAssigna...
/** * a listener can listen one event only, * * that is, a listener class can implement AppListener once only, * therefore, typeParams is of length 1. * */
a listener can listen one event only, that is, a listener class can implement AppListener once only, therefore, typeParams is of length 1
getEventClazz
{ "repo_name": "xkommando/Gplume", "path": "gplume/src/main/java/com/caibowen/gplume/event/Broadcaster.java", "license": "apache-2.0", "size": 9198 }
[ "com.caibowen.gplume.context.bean.BeanVisitor", "com.caibowen.gplume.core.TypeTraits", "java.lang.reflect.Type" ]
import com.caibowen.gplume.context.bean.BeanVisitor; import com.caibowen.gplume.core.TypeTraits; import java.lang.reflect.Type;
import com.caibowen.gplume.context.bean.*; import com.caibowen.gplume.core.*; import java.lang.reflect.*;
[ "com.caibowen.gplume", "java.lang" ]
com.caibowen.gplume; java.lang;
2,180,821
protected Node exitElementTypeList(Production node) throws ParseException { return node; }
Node function(Production node) throws ParseException { return node; }
/** * Called when exiting a parse tree node. * * @param node the node being exited * * @return the node to add to the parse tree, or * null if no parse tree should be created * * @throws ParseException if the node analysis discovered errors */
Called when exiting a parse tree node
exitElementTypeList
{ "repo_name": "richb-hanover/mibble-2.9.2", "path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java", "license": "gpl-2.0", "size": 275483 }
[ "net.percederberg.grammatica.parser.Node", "net.percederberg.grammatica.parser.ParseException", "net.percederberg.grammatica.parser.Production" ]
import net.percederberg.grammatica.parser.Node; import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production;
import net.percederberg.grammatica.parser.*;
[ "net.percederberg.grammatica" ]
net.percederberg.grammatica;
447,637
private void drawTaskResultsPanel() { GridBagConstraints gc = new GridBagConstraints(); initResultsPanel(taskResultsPanel, gc, "Tasks"); int resultCount = 0; for (Entry<Project, Collection<Task>> entry : taskResults.entrySet()) { Collection<Task> tasks = entry.getValue(); Project project = entry....
void function() { GridBagConstraints gc = new GridBagConstraints(); initResultsPanel(taskResultsPanel, gc, "Tasks"); int resultCount = 0; for (Entry<Project, Collection<Task>> entry : taskResults.entrySet()) { Collection<Task> tasks = entry.getValue(); Project project = entry.getKey(); for (Task task : tasks){ gc.gridy...
/** * Draw the Task search results. */
Draw the Task search results
drawTaskResultsPanel
{ "repo_name": "cst316/spring16project-Ada", "path": "src/net/sf/memoranda/ui/SearchDialog.java", "license": "gpl-2.0", "size": 16509 }
[ "java.awt.GridBagConstraints", "java.util.Collection", "java.util.Map", "net.sf.memoranda.Project", "net.sf.memoranda.Task" ]
import java.awt.GridBagConstraints; import java.util.Collection; import java.util.Map; import net.sf.memoranda.Project; import net.sf.memoranda.Task;
import java.awt.*; import java.util.*; import net.sf.memoranda.*;
[ "java.awt", "java.util", "net.sf.memoranda" ]
java.awt; java.util; net.sf.memoranda;
2,340,023
void print() { printTag("JFIF"); System.out.print("Version "); System.out.print(majorVersion); System.out.println(".0" + Integer.toString(minorVersion)); System.out.print("Resolution units: "); System.out.println(resUnits); System.ou...
void print() { printTag("JFIF"); System.out.print(STR); System.out.print(majorVersion); System.out.println(".0" + Integer.toString(minorVersion)); System.out.print(STR); System.out.println(resUnits); System.out.print(STR); System.out.println(Xdensity); System.out.print(STR); System.out.println(Ydensity); System.out.pri...
/** * Prints out the contents of this object to System.out for debugging. */
Prints out the contents of this object to System.out for debugging
print
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java", "license": "apache-2.0", "size": 59570 }
[ "java.awt.color.ColorSpace", "java.awt.image.BufferedImage", "java.awt.image.ColorModel", "java.awt.image.IndexColorModel", "java.io.IOException", "java.util.Iterator", "javax.imageio.metadata.IIOInvalidTreeException", "org.w3c.dom.NamedNodeMap", "org.w3c.dom.Node" ]
import java.awt.color.ColorSpace; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.IndexColorModel; import java.io.IOException; import java.util.Iterator; import javax.imageio.metadata.IIOInvalidTreeException; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node;
import java.awt.color.*; import java.awt.image.*; import java.io.*; import java.util.*; import javax.imageio.metadata.*; import org.w3c.dom.*;
[ "java.awt", "java.io", "java.util", "javax.imageio", "org.w3c.dom" ]
java.awt; java.io; java.util; javax.imageio; org.w3c.dom;
2,119,101
private int[] coordArrayListToArray(ArrayList<Coordinate> cvec) { int count = cvec.size(); int[] rawArray = new int[count * 2]; for (int index = 0; index < count; index++) { Coordinate c = cvec.get(index); rawArray[2 * index] = c.x; rawArray[2 * index + 1]...
int[] function(ArrayList<Coordinate> cvec) { int count = cvec.size(); int[] rawArray = new int[count * 2]; for (int index = 0; index < count; index++) { Coordinate c = cvec.get(index); rawArray[2 * index] = c.x; rawArray[2 * index + 1] = c.y; } return rawArray; }
/** * Given a ArrayList of coordinates, we need to flatten them into an array of * ints before we can stuff them into a map for flattening and storage. * * @param cvec : a ArrayList of Coordinate objects * @return : a simple array containing the x/y values of the coordinates * as [x1,y1,x...
Given a ArrayList of coordinates, we need to flatten them into an array of ints before we can stuff them into a map for flattening and storage
coordArrayListToArray
{ "repo_name": "ndis1/StudySnake", "path": "src/com/studySnake/snake/SnakeView.java", "license": "apache-2.0", "size": 27126 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,473,369
public JAnnotationUse param(String name, JEnumConstant value){ addValue(name, new JAnnotationStringValue(value)); return this; } /** * Adds a member value pair to this annotation * This can be used for e.g to specify * <pre> * {@code @XmlCollectionItem(type=...
JAnnotationUse function(String name, JEnumConstant value){ addValue(name, new JAnnotationStringValue(value)); return this; } /** * Adds a member value pair to this annotation * This can be used for e.g to specify * <pre> * {@code @XmlCollectionItem(type=Integer.class);} * </pre> * For adding a value of {@code Class<? e...
/** * Adds a member value pair to this annotation * @param name * The simple name for this annotation * * @param value * The JEnumConstant which is member value for this annotation * @return * The JAnnotationUse. More member value pairs can * be...
Adds a member value pair to this annotation
param
{ "repo_name": "FauxFaux/jdk9-jaxws", "path": "src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/JAnnotationUse.java", "license": "gpl-2.0", "size": 14096 }
[ "java.lang.annotation.Annotation" ]
import java.lang.annotation.Annotation;
import java.lang.annotation.*;
[ "java.lang" ]
java.lang;
1,907,698
// @XmlElement at the end of this class. @UML(identifier="metadataLinkage", obligation=OPTIONAL, specification=ISO_19115) public Collection<OnlineResource> getMetadataLinkages() { return metadataLinkages = nonNullCollection(metadataLinkages, OnlineResource.class); }
@UML(identifier=STR, obligation=OPTIONAL, specification=ISO_19115) Collection<OnlineResource> function() { return metadataLinkages = nonNullCollection(metadataLinkages, OnlineResource.class); }
/** * Returns the online location(s) where the metadata is available. * * @return online location(s) where the metadata is available. * * @since 0.5 */
Returns the online location(s) where the metadata is available
getMetadataLinkages
{ "repo_name": "apache/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java", "license": "apache-2.0", "size": 75665 }
[ "java.util.Collection", "org.opengis.metadata.citation.OnlineResource" ]
import java.util.Collection; import org.opengis.metadata.citation.OnlineResource;
import java.util.*; import org.opengis.metadata.citation.*;
[ "java.util", "org.opengis.metadata" ]
java.util; org.opengis.metadata;
2,709,056
public EList<EObject> getContents() { if (terminateReload) { // the contents' state is currently unclear return new BasicEList<EObject>(); } return new eu.hyvar.feature.constraint.resource.hyconstraints.util.HyconstraintsCopiedEObjectInternalEList((InternalEList<EObject>) super.getContents()); }
EList<EObject> function() { if (terminateReload) { return new BasicEList<EObject>(); } return new eu.hyvar.feature.constraint.resource.hyconstraints.util.HyconstraintsCopiedEObjectInternalEList((InternalEList<EObject>) super.getContents()); }
/** * Returns a copy of the contents of this resource wrapped in a list that * propagates changes to the original resource list. Wrapping is required to make * sure that clients which obtain a reference to the list of contents do not * interfere when changing the list. */
Returns a copy of the contents of this resource wrapped in a list that propagates changes to the original resource list. Wrapping is required to make sure that clients which obtain a reference to the list of contents do not interfere when changing the list
getContents
{ "repo_name": "HyVar/DarwinSPL", "path": "plugins/eu.hyvar.feature.constraint.resource.hyconstraints/src-gen/eu/hyvar/feature/constraint/resource/hyconstraints/mopp/HyconstraintsResource.java", "license": "apache-2.0", "size": 38269 }
[ "org.eclipse.emf.common.util.BasicEList", "org.eclipse.emf.common.util.EList", "org.eclipse.emf.ecore.EObject", "org.eclipse.emf.ecore.util.InternalEList" ]
import org.eclipse.emf.common.util.BasicEList; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,367,665
return new DefaultRatesScenarioMarketData(lookup, marketData); } @ImmutableConstructor private DefaultRatesScenarioMarketData(RatesMarketDataLookup lookup, ScenarioMarketData marketData) { this.lookup = ArgChecker.notNull(lookup, "lookup"); this.marketData = ArgChecker.notNull(marketData, "marketData"); ...
return new DefaultRatesScenarioMarketData(lookup, marketData); } private DefaultRatesScenarioMarketData(RatesMarketDataLookup lookup, ScenarioMarketData marketData) { this.lookup = ArgChecker.notNull(lookup, STR); this.marketData = ArgChecker.notNull(marketData, STR); this.cache = new AtomicReferenceArray<>(marketData....
/** * Obtains an instance based on a lookup and market data. * <p> * The lookup provides the mapping from currency to discount curve, and from * index to forward curve. The curves are in the market data. * * @param lookup the lookup * @param marketData the market data * @return the rates marke...
Obtains an instance based on a lookup and market data. The lookup provides the mapping from currency to discount curve, and from index to forward curve. The curves are in the market data
of
{ "repo_name": "jmptrader/Strata", "path": "modules/measure/src/main/java/com/opengamma/strata/measure/rate/DefaultRatesScenarioMarketData.java", "license": "apache-2.0", "size": 5542 }
[ "com.opengamma.strata.collect.ArgChecker", "com.opengamma.strata.data.scenario.ScenarioMarketData", "java.util.concurrent.atomic.AtomicReferenceArray" ]
import com.opengamma.strata.collect.ArgChecker; import com.opengamma.strata.data.scenario.ScenarioMarketData; import java.util.concurrent.atomic.AtomicReferenceArray;
import com.opengamma.strata.collect.*; import com.opengamma.strata.data.scenario.*; import java.util.concurrent.atomic.*;
[ "com.opengamma.strata", "java.util" ]
com.opengamma.strata; java.util;
2,778,894
public boolean hasMoreResources() throws XMLDBException { return pos < getSize(); }
boolean function() throws XMLDBException { return pos < getSize(); }
/** * Description of the Method * *@return Description of the Return Value *@exception XMLDBException Description of the Exception */
Description of the Method
hasMoreResources
{ "repo_name": "NCIP/cadsr-cgmdr-nci-uk", "path": "src/org/exist/xmldb/LocalResourceSet.java", "license": "bsd-3-clause", "size": 8860 }
[ "org.xmldb.api.base.XMLDBException" ]
import org.xmldb.api.base.XMLDBException;
import org.xmldb.api.base.*;
[ "org.xmldb.api" ]
org.xmldb.api;
2,043,902
public static void clearClientCertPreferences(Runnable callback) { ThreadUtils.assertOnUiThread(); getClientCertLookupTable().clear(); nativeClearClientCertPreferences(callback); }
static void function(Runnable callback) { ThreadUtils.assertOnUiThread(); getClientCertLookupTable().clear(); nativeClearClientCertPreferences(callback); }
/** * Clear client cert lookup table. Should only be called from UI thread. */
Clear client cert lookup table. Should only be called from UI thread
clearClientCertPreferences
{ "repo_name": "Teamxrtc/webrtc-streaming-node", "path": "third_party/webrtc/src/chromium/src/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java", "license": "mit", "size": 3642 }
[ "org.chromium.base.ThreadUtils" ]
import org.chromium.base.ThreadUtils;
import org.chromium.base.*;
[ "org.chromium.base" ]
org.chromium.base;
2,817,171
@Override public void enterBetween_number(@NotNull LuceneSqlParser.Between_numberContext ctx) { }
@Override public void enterBetween_number(@NotNull LuceneSqlParser.Between_numberContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitBetween_term
{ "repo_name": "bbejeck/nosql-jdbc-driver", "path": "src/main/java/bbejeck/nosql/antlr/generated/LuceneSqlBaseListener.java", "license": "apache-2.0", "size": 18266 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,893,744
public void testOneAssociatedObjectNestedSearch2() throws ApplicationException { KeyChain searchObject = new KeyChain(); searchObject.setId(new Integer(1)); Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.onetomany.unidirectional.LatchKey",searchObject ); assertNotNu...
void function() throws ApplicationException { KeyChain searchObject = new KeyChain(); searchObject.setId(new Integer(1)); Collection results = getApplicationService().search(STR,searchObject ); assertNotNull(results); assertEquals(1,results.size()); Iterator i = results.iterator(); LatchKey key = (LatchKey)i.next(); as...
/** * Uses Nested Search Criteria for search to get associated object * Verifies that the results are returned * Verifies size of the result set * Verifies that none of the attribute is null * Verified the Id attribute's value of the returned object * * @throws ApplicationException */
Uses Nested Search Criteria for search to get associated object Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null Verified the Id attribute's value of the returned object
testOneAssociatedObjectNestedSearch2
{ "repo_name": "NCIP/cacore-sdk", "path": "sdk-toolkit/example-project/junit/src/test/gov/nih/nci/cacoresdk/domain/onetomany/unidirectional/O2MUnidirectionalTest.java", "license": "bsd-3-clause", "size": 8669 }
[ "gov.nih.nci.cacoresdk.domain.onetomany.unidirectional.KeyChain", "gov.nih.nci.cacoresdk.domain.onetomany.unidirectional.LatchKey", "gov.nih.nci.system.applicationservice.ApplicationException", "java.util.Collection", "java.util.Iterator" ]
import gov.nih.nci.cacoresdk.domain.onetomany.unidirectional.KeyChain; import gov.nih.nci.cacoresdk.domain.onetomany.unidirectional.LatchKey; import gov.nih.nci.system.applicationservice.ApplicationException; import java.util.Collection; import java.util.Iterator;
import gov.nih.nci.cacoresdk.domain.onetomany.unidirectional.*; import gov.nih.nci.system.applicationservice.*; import java.util.*;
[ "gov.nih.nci", "java.util" ]
gov.nih.nci; java.util;
1,634,574
public static void setBold(JLabel label) { label.setFont(label.getFont().deriveFont(Font.BOLD)); }
static void function(JLabel label) { label.setFont(label.getFont().deriveFont(Font.BOLD)); }
/** * Make font of JLabel bold * @param label JLabel to make bold */
Make font of JLabel bold
setBold
{ "repo_name": "chelu/jdal", "path": "swing/src/main/java/org/jdal/swing/form/FormUtils.java", "license": "apache-2.0", "size": 9389 }
[ "java.awt.Font", "javax.swing.JLabel" ]
import java.awt.Font; import javax.swing.JLabel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
687,784
private void addContent(Document document, KlaxonStringValue string, Element elem) throws KlaxonException { String value = string.getValue(); K2DocFormat format = config.getFormat(); if (tools.isToCreateTextNode(format, string, elem)) { Text text = document.createTextNode(value); elem.appendChild(text);...
void function(Document document, KlaxonStringValue string, Element elem) throws KlaxonException { String value = string.getValue(); K2DocFormat format = config.getFormat(); if (tools.isToCreateTextNode(format, string, elem)) { Text text = document.createTextNode(value); elem.appendChild(text); } else if (tools.isToCrea...
/** * Adds text content of given klaxon string value into given elem. * * @param document * @param string * @param elem * @throws KlaxonException */
Adds text content of given klaxon string value into given elem
addContent
{ "repo_name": "martlin2cz/jaxon", "path": "src/main/java/cz/martlin/jaxon/klaxon/KlaxonToElementsImpl.java", "license": "gpl-3.0", "size": 5991 }
[ "cz.martlin.jaxon.klaxon.config.K2DocFormat", "cz.martlin.jaxon.klaxon.data.KlaxonStringValue", "org.w3c.dom.Document", "org.w3c.dom.Element", "org.w3c.dom.Text" ]
import cz.martlin.jaxon.klaxon.config.K2DocFormat; import cz.martlin.jaxon.klaxon.data.KlaxonStringValue; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text;
import cz.martlin.jaxon.klaxon.config.*; import cz.martlin.jaxon.klaxon.data.*; import org.w3c.dom.*;
[ "cz.martlin.jaxon", "org.w3c.dom" ]
cz.martlin.jaxon; org.w3c.dom;
1,169,835
private void readData(long absolutePosition, byte[] target, int length) { int bytesRead = 0; while (bytesRead < length) { dropDownstreamTo(absolutePosition); int positionInAllocation = (int) (absolutePosition - totalBytesDropped); int toCopy = Math.min(length - bytesRead, allocationLength - ...
void function(long absolutePosition, byte[] target, int length) { int bytesRead = 0; while (bytesRead < length) { dropDownstreamTo(absolutePosition); int positionInAllocation = (int) (absolutePosition - totalBytesDropped); int toCopy = Math.min(length - bytesRead, allocationLength - positionInAllocation); Allocation al...
/** * Reads data from the front of the rolling buffer. * * @param absolutePosition The absolute position from which data should be read. * @param target The array into which data should be written. * @param length The number of bytes to read. */
Reads data from the front of the rolling buffer
readData
{ "repo_name": "fanhattan/ExoPlayer", "path": "library/src/main/java/com/google/android/exoplayer2/extractor/DefaultTrackOutput.java", "license": "apache-2.0", "size": 34908 }
[ "com.google.android.exoplayer2.upstream.Allocation" ]
import com.google.android.exoplayer2.upstream.Allocation;
import com.google.android.exoplayer2.upstream.*;
[ "com.google.android" ]
com.google.android;
2,502,907
private static int readEvalPrint(final Context context, final Global global) { final String prompt = bundle.getString("shell.prompt"); final BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); final PrintWriter err = context.getErr(); final Global oldGlobal = Co...
static int function(final Context context, final Global global) { final String prompt = bundle.getString(STR); final BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); final PrintWriter err = context.getErr(); final Global oldGlobal = Context.getGlobal(); final boolean globalChanged = (oldGlobal ...
/** * read-eval-print loop for Nashorn shell. * * @param context the nashorn context * @param global global scope object to use * @return return code */
read-eval-print loop for Nashorn shell
readEvalPrint
{ "repo_name": "openjdk/jdk8u", "path": "nashorn/src/jdk/nashorn/tools/Shell.java", "license": "gpl-2.0", "size": 20261 }
[ "java.io.BufferedReader", "java.io.InputStreamReader", "java.io.PrintWriter" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,873,794
private void addAllExclusions(@Nonnull final Collection<VocabularyTerm> excludedGenes) { for (final VocabularyTerm gene : excludedGenes) { final String symbol = (String) gene.get("symbol"); // Contains alias_symbol, prev_symbol, entrez_id, ensembl_gene_id, refseq_accession, and e...
void function(@Nonnull final Collection<VocabularyTerm> excludedGenes) { for (final VocabularyTerm gene : excludedGenes) { final String symbol = (String) gene.get(STR); final Collection<String> aliases = (Collection<String>) gene.get(STR); CollectionUtils.addIgnoreNull(this.exclusions, symbol); addAllIgnoreNullAndEmpty...
/** * Adds all identifiers and aliases associated with each {@code excludedGenes} to a collection of exclusions. * * @param excludedGenes a collection of {@link VocabularyTerm genes} that should be excluded from the result */
Adds all identifiers and aliases associated with each excludedGenes to a collection of exclusions
addAllExclusions
{ "repo_name": "teyden/phenotips", "path": "components/gene-panels/api/src/main/java/org/phenotips/panels/internal/TermsForGeneBuilder.java", "license": "agpl-3.0", "size": 10112 }
[ "java.util.Collection", "javax.annotation.Nonnull", "org.apache.commons.collections4.CollectionUtils", "org.phenotips.vocabulary.VocabularyTerm" ]
import java.util.Collection; import javax.annotation.Nonnull; import org.apache.commons.collections4.CollectionUtils; import org.phenotips.vocabulary.VocabularyTerm;
import java.util.*; import javax.annotation.*; import org.apache.commons.collections4.*; import org.phenotips.vocabulary.*;
[ "java.util", "javax.annotation", "org.apache.commons", "org.phenotips.vocabulary" ]
java.util; javax.annotation; org.apache.commons; org.phenotips.vocabulary;
996,229
@Test public void testAwaitTimeout() throws InterruptedException { int count = 1; CountDownLatch2 latch = new CountDownLatch2(count); boolean await = latch.await(10, TimeUnit.MILLISECONDS); assertFalse("Expected false", await); latch.countDown(); boolean await2 =...
void function() throws InterruptedException { int count = 1; CountDownLatch2 latch = new CountDownLatch2(count); boolean await = latch.await(10, TimeUnit.MILLISECONDS); assertFalse(STR, await); latch.countDown(); boolean await2 = latch.await(10, TimeUnit.MILLISECONDS); assertTrue(STR, await2); }
/** * test await timeout * * @see CountDownLatch2#await(long, TimeUnit) */
test await timeout
testAwaitTimeout
{ "repo_name": "Vansee/RocketMQ", "path": "common/src/test/java/org/apache/rocketmq/common/CountDownLatch2Test.java", "license": "apache-2.0", "size": 3851 }
[ "java.util.concurrent.TimeUnit", "org.junit.Assert" ]
import java.util.concurrent.TimeUnit; import org.junit.Assert;
import java.util.concurrent.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
1,291,987
List<ColumnModel> getTableSchema(IdAndVersion idAndVersion);
List<ColumnModel> getTableSchema(IdAndVersion idAndVersion);
/** * Get the schema for the given id and version combination. * * @param idAndVersion * @return */
Get the schema for the given id and version combination
getTableSchema
{ "repo_name": "zimingd/Synapse-Repository-Services", "path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/table/TableManagerSupport.java", "license": "apache-2.0", "size": 14507 }
[ "java.util.List", "org.sagebionetworks.repo.model.entity.IdAndVersion", "org.sagebionetworks.repo.model.table.ColumnModel" ]
import java.util.List; import org.sagebionetworks.repo.model.entity.IdAndVersion; import org.sagebionetworks.repo.model.table.ColumnModel;
import java.util.*; import org.sagebionetworks.repo.model.entity.*; import org.sagebionetworks.repo.model.table.*;
[ "java.util", "org.sagebionetworks.repo" ]
java.util; org.sagebionetworks.repo;
507,241
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ExpressRouteCircuitInner> listAsync();
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ExpressRouteCircuitInner> listAsync();
/** * Gets all the express route circuits in a subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all the expres...
Gets all the express route circuits in a subscription
listAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitsClient.java", "license": "mit", "size": 54400 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.network.fluent.models.ExpressRouteCircuitInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.network.fluent.models.ExpressRouteCircuitInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,610,744
public void convertRowIndexToView(int[] indices) { final RowSorter<?> sorter = getRowSorter(); if (sorter != null) { for (int i = 0; i < indices.length; i++) { indices[i] = sorter.convertRowIndexToView(indices[i]); } } }
void function(int[] indices) { final RowSorter<?> sorter = getRowSorter(); if (sorter != null) { for (int i = 0; i < indices.length; i++) { indices[i] = sorter.convertRowIndexToView(indices[i]); } } }
/** * Returns the location of <code>index</code> in terms of the view. That is, for the row * <code>index</code> in the coordinates of the underlying model this returns the row index in * terms of the view. * * @param indices the indices (updated in-place) * @throws IndexOutOfBoundsException if <code>...
Returns the location of <code>index</code> in terms of the view. That is, for the row <code>index</code> in the coordinates of the underlying model this returns the row index in terms of the view
convertRowIndexToView
{ "repo_name": "aherbert/GDSC-SMLM", "path": "src/main/java/uk/ac/sussex/gdsc/smlm/ij/gui/PeakResultTableModelJTable.java", "license": "gpl-3.0", "size": 6033 }
[ "javax.swing.RowSorter" ]
import javax.swing.RowSorter;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
573,975
public static CompletableFuture<Void> deletePoolLedgerConfig( String configName) throws IndyException { ParamGuard.notNullOrWhiteSpace(configName, "configName"); CompletableFuture<Void> future = new CompletableFuture<Void>(); int commandHandle = addFuture(future); int result = LibIndy.api.indy_delet...
static CompletableFuture<Void> function( String configName) throws IndyException { ParamGuard.notNullOrWhiteSpace(configName, STR); CompletableFuture<Void> future = new CompletableFuture<Void>(); int commandHandle = addFuture(future); int result = LibIndy.api.indy_delete_pool_ledger_config( commandHandle, configName, v...
/** * Deletes created pool ledger configuration. * * @param configName Name of the pool ledger configuration to delete. * @return A future that does not resolve a value. * @throws IndyException Thrown if an error occurs when calling the underlying SDK. */
Deletes created pool ledger configuration
deletePoolLedgerConfig
{ "repo_name": "peacekeeper/indy-sdk", "path": "wrappers/java/src/main/java/org/hyperledger/indy/sdk/pool/Pool.java", "license": "apache-2.0", "size": 7891 }
[ "java.util.concurrent.CompletableFuture", "org.hyperledger.indy.sdk.IndyException", "org.hyperledger.indy.sdk.LibIndy", "org.hyperledger.indy.sdk.ParamGuard" ]
import java.util.concurrent.CompletableFuture; import org.hyperledger.indy.sdk.IndyException; import org.hyperledger.indy.sdk.LibIndy; import org.hyperledger.indy.sdk.ParamGuard;
import java.util.concurrent.*; import org.hyperledger.indy.sdk.*;
[ "java.util", "org.hyperledger.indy" ]
java.util; org.hyperledger.indy;
1,214,325
public float getLeaderLineOffsetLength() { return this.getCOSObject().getFloat(COSName.LLO); }
float function() { return this.getCOSObject().getFloat(COSName.LLO); }
/** * This will retrieve the length of the leader line offset. * * @return the length of the leader line offset */
This will retrieve the length of the leader line offset
getLeaderLineOffsetLength
{ "repo_name": "joansmith/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationLine.java", "license": "apache-2.0", "size": 12900 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
1,319,124
public Object loadObject(XMLControl control, Object obj) { IntegerArray dataArray = (IntegerArray) obj; int[] data = (int[]) control.getObject("data"); //$NON-NLS-1$ dataArray.array = data; dataArray.defaultArray = data; return obj; } } } /* * Open Source Physics software is ...
Object function(XMLControl control, Object obj) { IntegerArray dataArray = (IntegerArray) obj; int[] data = (int[]) control.getObject("data"); dataArray.array = data; dataArray.defaultArray = data; return obj; } } } /* * Open Source Physics software is free software; you can redistribute * it and/or modify it under the...
/** * Loads an object with data from an XMLControl. * * @param control the control * @param obj the object * @return the loaded object */
Loads an object with data from an XMLControl
loadObject
{ "repo_name": "dobrown/tracker-mvn", "path": "src/main/java/org/opensourcephysics/numerics/IntegerArray.java", "license": "gpl-3.0", "size": 6887 }
[ "org.opensourcephysics.controls.XMLControl" ]
import org.opensourcephysics.controls.XMLControl;
import org.opensourcephysics.controls.*;
[ "org.opensourcephysics.controls" ]
org.opensourcephysics.controls;
252,675
@NonNull public static MappedByteBuffer loadMappedFile(@NonNull Context context, @NonNull String filePath) throws IOException { SupportPreconditions.checkNotNull(context, "Context should not be null."); SupportPreconditions.checkNotNull(filePath, "File path cannot be null."); try (AssetFileDescrip...
static MappedByteBuffer function(@NonNull Context context, @NonNull String filePath) throws IOException { SupportPreconditions.checkNotNull(context, STR); SupportPreconditions.checkNotNull(filePath, STR); try (AssetFileDescriptor fileDescriptor = context.getAssets().openFd(filePath); FileInputStream inputStream = new F...
/** * Loads a file from the asset folder through memory mapping. * * @param context Application context to access assets. * @param filePath Asset path of the file. * @return the loaded memory mapped file. * @throws IOException if an I/O error occurs when loading the tflite model. */
Loads a file from the asset folder through memory mapping
loadMappedFile
{ "repo_name": "gunan/tensorflow", "path": "tensorflow/lite/experimental/support/java/src/java/org/tensorflow/lite/support/common/FileUtil.java", "license": "apache-2.0", "size": 7295 }
[ "android.content.Context", "android.content.res.AssetFileDescriptor", "java.io.FileInputStream", "java.io.IOException", "java.nio.MappedByteBuffer", "java.nio.channels.FileChannel", "org.checkerframework.checker.nullness.qual.NonNull" ]
import android.content.Context; import android.content.res.AssetFileDescriptor; import java.io.FileInputStream; import java.io.IOException; import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel; import org.checkerframework.checker.nullness.qual.NonNull;
import android.content.*; import android.content.res.*; import java.io.*; import java.nio.*; import java.nio.channels.*; import org.checkerframework.checker.nullness.qual.*;
[ "android.content", "java.io", "java.nio", "org.checkerframework.checker" ]
android.content; java.io; java.nio; org.checkerframework.checker;
362,661
public void init( RuntimeServices rs ) { return; }
void function( RuntimeServices rs ) { return; }
/** * Required init() method for LogSystem * to get access to RuntimeServices */
Required init() method for LogSystem to get access to RuntimeServices
init
{ "repo_name": "stefanofornari/velocity", "path": "examples/logger_example/LoggerExample.java", "license": "apache-2.0", "size": 3008 }
[ "org.apache.velocity.runtime.RuntimeServices" ]
import org.apache.velocity.runtime.RuntimeServices;
import org.apache.velocity.runtime.*;
[ "org.apache.velocity" ]
org.apache.velocity;
607,654
public final L2DarknessFestival getFestivalInstance(int oracle, int festivalId) { if (!isFestivalInitialized()) return null; festivalId += (oracle == SevenSigns.CABAL_DUSK) ? 10 : 20; return _festivalInstances.get(festivalId); } } private class L2DarknessFestival { protected f...
final L2DarknessFestival function(int oracle, int festivalId) { if (!isFestivalInitialized()) return null; festivalId += (oracle == SevenSigns.CABAL_DUSK) ? 10 : 20; return _festivalInstances.get(festivalId); } } private class L2DarknessFestival { protected final int _cabal; protected final int _levelRange; protected b...
/** * Returns the running instance of a festival for the given Oracle and festivalID. <BR> * A <B>null</B> value is returned if there are no participants in that festival. * @param oracle * @param festivalId * @return L2DarknessFestival festivalInst */
Returns the running instance of a festival for the given Oracle and festivalID. A null value is returned if there are no participants in that festival
getFestivalInstance
{ "repo_name": "VytautasBoznis/l2.skilas.lt", "path": "aCis_gameserver/java/net/sf/l2j/gameserver/instancemanager/SevenSignsFestival.java", "license": "gpl-2.0", "size": 84416 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "net.sf.l2j.gameserver.model.actor.L2Npc", "net.sf.l2j.gameserver.model.actor.instance.L2FestivalMonsterInstance" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import net.sf.l2j.gameserver.model.actor.L2Npc; import net.sf.l2j.gameserver.model.actor.instance.L2FestivalMonsterInstance;
import java.util.*; import net.sf.l2j.gameserver.model.actor.*; import net.sf.l2j.gameserver.model.actor.instance.*;
[ "java.util", "net.sf.l2j" ]
java.util; net.sf.l2j;
1,026,162
@ServiceMethod(returns = ReturnType.SINGLE) Response<DomainOwnershipIdentifierInner> updateOwnershipIdentifierWithResponse( String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<DomainOwnershipIdentifierInner> updateOwnershipIdentifierWithResponse( String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier, Context context);
/** * Description for Creates an ownership identifier for a domain or updates identifier details for an existing * identifier. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param domainName Name of domain. * @param name Name of identifier. *...
Description for Creates an ownership identifier for a domain or updates identifier details for an existing identifier
updateOwnershipIdentifierWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/DomainsClient.java", "license": "mit", "size": 55229 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.appservice.fluent.models.DomainOwnershipIdentifierInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.DomainOwnershipIdentifierInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
143,049
@LargeTest public void testFunctionalCameraFocusModes() throws Exception { try { SurfaceHolder surfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder(); Parameters params = mCameraTestHelper.getCameraParameters(); List<String> supportedFocusModes = params.getSuppor...
void function() throws Exception { try { SurfaceHolder surfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder(); Parameters params = mCameraTestHelper.getCameraParameters(); List<String> supportedFocusModes = params.getSupportedFocusModes(); assertNotNull(STR, supportedFocusModes);
/** * Functional test iterating on the various focus modes (auto, infinitiy, macro, etc.) */
Functional test iterating on the various focus modes (auto, infinitiy, macro, etc.)
testFunctionalCameraFocusModes
{ "repo_name": "JuudeDemos/android-sdk-20", "path": "src/com/android/mediaframeworktest/functional/camera/CameraFunctionalTest.java", "license": "apache-2.0", "size": 9619 }
[ "android.hardware.Camera", "android.view.SurfaceHolder", "com.android.mediaframeworktest.MediaFrameworkTest", "java.util.List" ]
import android.hardware.Camera; import android.view.SurfaceHolder; import com.android.mediaframeworktest.MediaFrameworkTest; import java.util.List;
import android.hardware.*; import android.view.*; import com.android.mediaframeworktest.*; import java.util.*;
[ "android.hardware", "android.view", "com.android.mediaframeworktest", "java.util" ]
android.hardware; android.view; com.android.mediaframeworktest; java.util;
2,842,039
public Iterator<SchemaDescription> getAllSchemasDescription() { return schemaDescriptions.iterator(); } // // public boolean isSameSchemaDescription(SchemaDescription prop1, // SchemaDescription prop2){ // if(prop1.getClass().equals(prop2.getClass()) ){ // if(prop1.content.getElement().getTextCont...
Iterator<SchemaDescription> function() { return schemaDescriptions.iterator(); }
/** * Return all SchemaDescription * * @return SchemaDescriptions Iterator in order to be use in PDF/A * Extension Schema class */
Return all SchemaDescription
getAllSchemasDescription
{ "repo_name": "gbm-bailleul/padaf", "path": "xmpbox/src/main/java/net/padaf/xmpbox/schema/PDFAExtensionSchema.java", "license": "apache-2.0", "size": 9528 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,685,114
protected boolean afterSave (boolean newRecord, boolean success) { if (!success) return false; // String sql = "SELECT count(*) FROM AD_Package_Exp_Detail WHERE AD_Package_Exp_ID = ?"; int recordCount = DB.getSQLValue(get_TrxName(), sql, getAD_Package_Exp_ID()); if (recordCount == 0){ sq...
boolean function (boolean newRecord, boolean success) { if (!success) return false; String sql = STR; int recordCount = DB.getSQLValue(get_TrxName(), sql, getAD_Package_Exp_ID()); if (recordCount == 0){ sql = STR; PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = DB.prepareStatement (sql, get_TrxName()...
/** * After Save * @param newRecord new * @param success success * @return success */
After Save
afterSave
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/MPackageExp.java", "license": "gpl-2.0", "size": 5127 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "java.util.logging.Level", "org.compiere.util.DB", "org.compiere.util.Env" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.logging.Level; import org.compiere.util.DB; import org.compiere.util.Env;
import java.sql.*; import java.util.logging.*; import org.compiere.util.*;
[ "java.sql", "java.util", "org.compiere.util" ]
java.sql; java.util; org.compiere.util;
113,571
public WithdrawRequestBuilder withdrawFunds(final String asset, final String receiver, final float amount) { return new WithdrawRequestBuilder(callCounter, baseUrl, key, secret) .useAsset(asset) ...
WithdrawRequestBuilder function(final String asset, final String receiver, final float amount) { return new WithdrawRequestBuilder(callCounter, baseUrl, key, secret) .useAsset(asset) .useKey(receiver) .useAmount(amount); }
/** * Places a withdrawal order. * * @param asset The asset to withdraw. * @param receiver The receiving key of the withdrawal. * @param amount The amount of assets to withdraw. * @return A request builder object to configure any client side cache metrics with and to * attach any...
Places a withdrawal order
withdrawFunds
{ "repo_name": "echsylon/kraken", "path": "library/src/main/java/com/echsylon/kraken/Kraken.java", "license": "apache-2.0", "size": 19469 }
[ "com.echsylon.kraken.request.WithdrawRequestBuilder" ]
import com.echsylon.kraken.request.WithdrawRequestBuilder;
import com.echsylon.kraken.request.*;
[ "com.echsylon.kraken" ]
com.echsylon.kraken;
877,527
public Set<Map<String, List<String>>> searchForMultipleAttributeValues( final String base, final String filter, final Object[] params, final String[] attributeNames) { // Escape the params acording to RFC2254 Object[] encodedParams = new String[params.length]; for (int i = 0; i < params.length; i++) { ...
Set<Map<String, List<String>>> function( final String base, final String filter, final Object[] params, final String[] attributeNames) { Object[] encodedParams = new String[params.length]; for (int i = 0; i < params.length; i++) { encodedParams[i] = LdapEncoder.filterEncode(params[i].toString()); } String formattedFilt...
/** * Performs a search using the supplied filter and returns the values of each named * attribute found in all entries matched by the search. Note that one directory entry * may have several values for the attribute. Intended for role searches and similar * scenarios. * * @param base the DN to search in ...
Performs a search using the supplied filter and returns the values of each named attribute found in all entries matched by the search. Note that one directory entry may have several values for the attribute. Intended for role searches and similar scenarios
searchForMultipleAttributeValues
{ "repo_name": "eddumelendez/spring-security", "path": "ldap/src/main/java/org/springframework/security/ldap/SpringSecurityLdapTemplate.java", "license": "apache-2.0", "size": 14083 }
[ "java.text.MessageFormat", "java.util.Arrays", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Set", "javax.naming.NamingEnumeration", "javax.naming.NamingException", "javax.naming.directory.Attribute", "javax.naming.directory.SearchControls", "org.sprin...
import java.text.MessageFormat; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.Attribute; import javax.naming.directo...
import java.text.*; import java.util.*; import javax.naming.*; import javax.naming.directory.*; import org.springframework.ldap.core.*;
[ "java.text", "java.util", "javax.naming", "org.springframework.ldap" ]
java.text; java.util; javax.naming; org.springframework.ldap;
1,349,545
public AbstractSpatialTable getSelectedSpatialTable() { return selectedSpatialTable; }
AbstractSpatialTable function() { return selectedSpatialTable; }
/** * Getter for the current selected map table. * * @return the current selected map table. */
Getter for the current selected map table
getSelectedSpatialTable
{ "repo_name": "gabrielmancilla/mtisig", "path": "geopaparazzimapsforge/src/eu/geopaparazzi/mapsforge/mapsdirmanager/MapsDirManager.java", "license": "gpl-3.0", "size": 45448 }
[ "eu.geopaparazzi.spatialite.database.spatial.core.tables.AbstractSpatialTable" ]
import eu.geopaparazzi.spatialite.database.spatial.core.tables.AbstractSpatialTable;
import eu.geopaparazzi.spatialite.database.spatial.core.tables.*;
[ "eu.geopaparazzi.spatialite" ]
eu.geopaparazzi.spatialite;
2,158,074
public static boolean hasbiboReversedBy(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value ) { return Base.hasValue(model, instanceResource, REVERSEDBY); }
static boolean function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value ) { return Base.hasValue(model, instanceResource, REVERSEDBY); }
/** * Check if org.ontoware.rdfreactor.generator.java.JProperty@1950f08 has the given value (maybe among other values). * @param model an RDF2Go model * @param resource an RDF2Go resource * @param value the value to be checked * @return true if this property contains (maybe among other) the give...
Check if org.ontoware.rdfreactor.generator.java.JProperty@1950f08 has the given value (maybe among other values)
hasbiboReversedBy
{ "repo_name": "alexgarciac/biotea", "path": "src/ws/biotea/ld2rdf/rdf/model/bibo/Decision.java", "license": "apache-2.0", "size": 48808 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
968,570
public Repository getRep() { return rep; }
Repository function() { return rep; }
/** * Gets the rep (repository). * * @return Returns the rep */
Gets the rep (repository)
getRep
{ "repo_name": "rfellows/pentaho-kettle", "path": "engine/src/org/pentaho/di/job/Job.java", "license": "apache-2.0", "size": 68024 }
[ "org.pentaho.di.repository.Repository" ]
import org.pentaho.di.repository.Repository;
import org.pentaho.di.repository.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,808,740
public static TrustedVaultClient get() { if (sInstance == null) { sInstance = new TrustedVaultClient(AppHooks.get().createSyncTrustedVaultClientBackend()); } return sInstance; }
static TrustedVaultClient function() { if (sInstance == null) { sInstance = new TrustedVaultClient(AppHooks.get().createSyncTrustedVaultClientBackend()); } return sInstance; }
/** * Displays a UI that allows the user to reauthenticate and retrieve the sync encryption keys. */
Displays a UI that allows the user to reauthenticate and retrieve the sync encryption keys
get
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/sync/TrustedVaultClient.java", "license": "bsd-3-clause", "size": 13641 }
[ "org.chromium.chrome.browser.AppHooks" ]
import org.chromium.chrome.browser.AppHooks;
import org.chromium.chrome.browser.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
1,964,856
public static RuntimeFieldFactory<?> getFieldFactory(Class<?> clazz, IdStrategy strategy) { if (strategy.isDelegateRegistered(clazz)) return DELEGATE; final RuntimeFieldFactory<?> inline = __inlineValues.get(clazz .getName()); if (inline !...
static RuntimeFieldFactory<?> function(Class<?> clazz, IdStrategy strategy) { if (strategy.isDelegateRegistered(clazz)) return DELEGATE; final RuntimeFieldFactory<?> inline = __inlineValues.get(clazz .getName()); if (inline != null) return inline; if (Message.class.isAssignableFrom(clazz)) return POJO; if (clazz.isEnum...
/** * Gets the runtime field factory of the given {@code clazz}. */
Gets the runtime field factory of the given clazz
getFieldFactory
{ "repo_name": "Shvid/protostuff", "path": "protostuff-runtime-md/src/main/java/io/protostuff/runtime/RuntimeFieldFactory.java", "license": "apache-2.0", "size": 15924 }
[ "io.protostuff.Message", "java.util.Collection", "java.util.Map" ]
import io.protostuff.Message; import java.util.Collection; import java.util.Map;
import io.protostuff.*; import java.util.*;
[ "io.protostuff", "java.util" ]
io.protostuff; java.util;
2,728,482
@Override public InputPolicy getInputPolicy () { return InputPolicy.makeTypedDefaultInputPolicy(getTypeExpr().toSourceModel().getTypeExprDefn()); }
InputPolicy function () { return InputPolicy.makeTypedDefaultInputPolicy(getTypeExpr().toSourceModel().getTypeExprDefn()); }
/** * Return an input policy which describes how to marshall a value represented * by a value node from Java to CAL. * @return - the input policy associated with ValueNode instance. */
Return an input policy which describes how to marshall a value represented by a value node from Java to CAL
getInputPolicy
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/valuenode/ListOfCharValueNode.java", "license": "bsd-3-clause", "size": 8764 }
[ "org.openquark.cal.compiler.io.InputPolicy" ]
import org.openquark.cal.compiler.io.InputPolicy;
import org.openquark.cal.compiler.io.*;
[ "org.openquark.cal" ]
org.openquark.cal;
2,500,213