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
private AdRequest.Type translateType(FullCreativeElement.Type type){ switch (type) { case IMAGE: return Type.IMAGE; case TEXT: return Type.TEXT; default: return null; } }
AdRequest.Type function(FullCreativeElement.Type type){ switch (type) { case IMAGE: return Type.IMAGE; case TEXT: return Type.TEXT; default: return null; } }
/** * Translates from FullCreativeElement.Type to AdRequest.Type * * @param type the FullCreativeElement.Type representation * @return the AdRequest.Type representation of the type received */
Translates from FullCreativeElement.Type to AdRequest.Type
translateType
{ "repo_name": "BlueVia/Official-Library-Android", "path": "library/src/com/bluevia/android/ad/client/BVAdvertisingClient.java", "license": "lgpl-3.0", "size": 6237 }
[ "com.bluevia.android.ad.data.AdRequest", "com.bluevia.android.ad.data.FullCreativeElement" ]
import com.bluevia.android.ad.data.AdRequest; import com.bluevia.android.ad.data.FullCreativeElement;
import com.bluevia.android.ad.data.*;
[ "com.bluevia.android" ]
com.bluevia.android;
430,834
boolean putmulti( @Nonnull final String p_key, final N p_value );
boolean putmulti( @Nonnull final String p_key, final N p_value );
/** * puts a multi-element into the storage * * @param p_key key * @param p_value multi-element * @return boolean if the element can be stored */
puts a multi-element into the storage
putmulti
{ "repo_name": "flashpixx/Light-Jason", "path": "src/main/java/org/lightjason/agentspeak/beliefbase/storage/IStorage.java", "license": "lgpl-3.0", "size": 4870 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,883,096
private void snapshotFile(final BlobStoreIndexShardSnapshot.FileInfo fileInfo) throws IOException { final String file = fileInfo.physicalName(); try (IndexInput indexInput = store.openVerifyingInput(file, IOContext.READONCE, fileInfo.metadata())) { for (int i = 0; i < fil...
void function(final BlobStoreIndexShardSnapshot.FileInfo fileInfo) throws IOException { final String file = fileInfo.physicalName(); try (IndexInput indexInput = store.openVerifyingInput(file, IOContext.READONCE, fileInfo.metadata())) { for (int i = 0; i < fileInfo.numberOfParts(); i++) { final long partBytes = fileInf...
/** * Snapshot individual file * <p> * This is asynchronous method. Upon completion of the operation latch is getting counted down and any failures are * added to the {@code failures} list * * @param fileInfo file to be snapshotted */
Snapshot individual file This is asynchronous method. Upon completion of the operation latch is getting counted down and any failures are added to the failures list
snapshotFile
{ "repo_name": "girirajsharma/elasticsearch", "path": "core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java", "license": "apache-2.0", "size": 81236 }
[ "java.io.IOException", "java.io.InputStream", "org.apache.lucene.store.IOContext", "org.apache.lucene.store.IndexInput", "org.elasticsearch.common.lucene.store.InputStreamIndexInput", "org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot", "org.elasticsearch.index.snapshots.blobstore....
import java.io.IOException; import java.io.InputStream; import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IndexInput; import org.elasticsearch.common.lucene.store.InputStreamIndexInput; import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot; import org.elasticsearch.index....
import java.io.*; import org.apache.lucene.store.*; import org.elasticsearch.common.lucene.store.*; import org.elasticsearch.index.snapshots.blobstore.*; import org.elasticsearch.index.store.*;
[ "java.io", "org.apache.lucene", "org.elasticsearch.common", "org.elasticsearch.index" ]
java.io; org.apache.lucene; org.elasticsearch.common; org.elasticsearch.index;
2,749,308
public String getTitle( Locale locale ) { return I18nService.getLocalizedString( _strTitleKey, locale ); }
String function( Locale locale ) { return I18nService.getLocalizedString( _strTitleKey, locale ); }
/** * Returns the localized text of the message * * @param locale * The current locale * @return The localized text of the message */
Returns the localized text of the message
getTitle
{ "repo_name": "lutece-platform/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/message/AdminMessage.java", "license": "bsd-3-clause", "size": 8699 }
[ "fr.paris.lutece.portal.service.i18n.I18nService", "java.util.Locale" ]
import fr.paris.lutece.portal.service.i18n.I18nService; import java.util.Locale;
import fr.paris.lutece.portal.service.i18n.*; import java.util.*;
[ "fr.paris.lutece", "java.util" ]
fr.paris.lutece; java.util;
1,328,784
public void add(DoubleVector v, VALUE payload);
void function(DoubleVector v, VALUE payload);
/** * Adds a new vector to the tree with the given payload. The payload may be * null, the vector is not allowed to be non-null. * * @param v the non-null vector. * @param payload the maybe null payload for this vector. */
Adds a new vector to the tree with the given payload. The payload may be null, the vector is not allowed to be non-null
add
{ "repo_name": "thomasjungblut/JRPT", "path": "src/de/jungblut/jrpt/ANNConstruction.java", "license": "apache-2.0", "size": 908 }
[ "de.jungblut.math.DoubleVector" ]
import de.jungblut.math.DoubleVector;
import de.jungblut.math.*;
[ "de.jungblut.math" ]
de.jungblut.math;
590,176
public static JSONObject fromObject(Object object, JsonConfig jsonConfig) { if (object == null || JSONUtils.isNull(object)) { return new JSONObject(true); } else if (object instanceof Enum) { throw new JSONException("'object' is an Enum. Use JSONArray instead"); } els...
static JSONObject function(Object object, JsonConfig jsonConfig) { if (object == null JSONUtils.isNull(object)) { return new JSONObject(true); } else if (object instanceof Enum) { throw new JSONException(STR); } else if (object instanceof Annotation (object.getClass().isAnnotation())) { throw new JSONException(STR); } ...
/** * Creates a JSONObject.<br> * Inspects the object type to call the correct JSONObject factory method. * Accepts JSON formatted strings, Maps, DynaBeans and JavaBeans. * * @param object * * @throws JSONException if the object can not be converted to a proper * ...
Creates a JSONObject. Inspects the object type to call the correct JSONObject factory method. Accepts JSON formatted strings, Maps, DynaBeans and JavaBeans
fromObject
{ "repo_name": "aalmiray/Json-lib", "path": "subprojects/json-lib-core/src/main/java/org/kordamp/json/JSONObject.java", "license": "apache-2.0", "size": 107677 }
[ "java.lang.annotation.Annotation", "java.util.Map", "org.apache.commons.beanutils.DynaBean", "org.kordamp.json.util.JSONTokener", "org.kordamp.json.util.JSONUtils" ]
import java.lang.annotation.Annotation; import java.util.Map; import org.apache.commons.beanutils.DynaBean; import org.kordamp.json.util.JSONTokener; import org.kordamp.json.util.JSONUtils;
import java.lang.annotation.*; import java.util.*; import org.apache.commons.beanutils.*; import org.kordamp.json.util.*;
[ "java.lang", "java.util", "org.apache.commons", "org.kordamp.json" ]
java.lang; java.util; org.apache.commons; org.kordamp.json;
1,400,523
public void testNodeJoinOnPendingOperation() throws Exception { Ignite srv1 = ignitionStart(serverConfiguration(1)); createSqlCache(srv1); CountDownLatch idxLatch = blockIndexing(srv1); QueryIndex idx = index(IDX_NAME_1, field(FIELD_NAME_1)); IgniteInternalFuture<?> idxFu...
void function() throws Exception { Ignite srv1 = ignitionStart(serverConfiguration(1)); createSqlCache(srv1); CountDownLatch idxLatch = blockIndexing(srv1); QueryIndex idx = index(IDX_NAME_1, field(FIELD_NAME_1)); IgniteInternalFuture<?> idxFut = queryProcessor(srv1).dynamicIndexCreate(CACHE_NAME, CACHE_NAME, TBL_NAME,...
/** * Test node join on pending operation. * * @throws Exception If failed. */
Test node join on pending operation
testNodeJoinOnPendingOperation
{ "repo_name": "alexzaitzev/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractConcurrentSelfTest.java", "license": "apache-2.0", "size": 37111 }
[ "java.util.concurrent.CountDownLatch", "org.apache.ignite.Ignite", "org.apache.ignite.cache.QueryIndex", "org.apache.ignite.internal.IgniteInternalFuture" ]
import java.util.concurrent.CountDownLatch; import org.apache.ignite.Ignite; import org.apache.ignite.cache.QueryIndex; import org.apache.ignite.internal.IgniteInternalFuture;
import java.util.concurrent.*; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
918,452
public void addIgnoredView(View v) { mViewAbove.addIgnoredView(v); }
void function(View v) { mViewAbove.addIgnoredView(v); }
/** * Add a View ignored by the Touch Down event when mode is Fullscreen * * @param v a view to be ignored */
Add a View ignored by the Touch Down event when mode is Fullscreen
addIgnoredView
{ "repo_name": "jjhesk/BringItBackAdvanceSlidingMenu", "path": "AdvancedSlidingMenu/slidingmenulib/src/main/java/com/hkm/slidingmenulib/gestured/SlidingMenu.java", "license": "apache-2.0", "size": 37535 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
671,729
public Properties getCreateHeapProperties() { Properties properties = new Properties(); // default properties for system tables: properties.put(Property.PAGE_SIZE_PARAMETER,"1024"); properties.put(RawStoreFactory.PAGE_RESERVED_SPACE_PARAMETER,"0"); properties.put(RawStoreFactory.MINIMUM_RECORD_SIZE_PARAME...
Properties function() { Properties properties = new Properties(); properties.put(Property.PAGE_SIZE_PARAMETER,"1024"); properties.put(RawStoreFactory.PAGE_RESERVED_SPACE_PARAMETER,"0"); properties.put(RawStoreFactory.MINIMUM_RECORD_SIZE_PARAMETER,"1"); return properties; }
/** * Get the Properties associated with creating the heap. * * @return The Properties associated with creating the heap. */
Get the Properties associated with creating the heap
getCreateHeapProperties
{ "repo_name": "lpxz/grail-derby104", "path": "java/engine/org/apache/derby/iapi/sql/dictionary/CatalogRowFactory.java", "license": "apache-2.0", "size": 9552 }
[ "java.util.Properties", "org.apache.derby.iapi.reference.Property", "org.apache.derby.iapi.store.raw.RawStoreFactory" ]
import java.util.Properties; import org.apache.derby.iapi.reference.Property; import org.apache.derby.iapi.store.raw.RawStoreFactory;
import java.util.*; import org.apache.derby.iapi.reference.*; import org.apache.derby.iapi.store.raw.*;
[ "java.util", "org.apache.derby" ]
java.util; org.apache.derby;
1,732,889
public void reverse() { final LinkAdornment tempAdornment = leftAdornment; final String tempCardinality = leftCardinality; final String tempConstraint = leftConstraint; final String tempRole = leftRole; final String tempStereotype = leftStereotype; final UMLClass tempClass = leftTarget; leftAdornment ...
void function() { final LinkAdornment tempAdornment = leftAdornment; final String tempCardinality = leftCardinality; final String tempConstraint = leftConstraint; final String tempRole = leftRole; final String tempStereotype = leftStereotype; final UMLClass tempClass = leftTarget; leftAdornment = rightAdornment; leftCa...
/** * Reverse the current relation */
Reverse the current relation
reverse
{ "repo_name": "RaphaelBrugier/gwtuml", "path": "GWTUMLAPI/src/com/objetdirect/gwt/umlapi/client/umlcomponents/umlrelation/UMLRelation.java", "license": "gpl-3.0", "size": 13889 }
[ "com.objetdirect.gwt.umlapi.client.umlcomponents.UMLClass" ]
import com.objetdirect.gwt.umlapi.client.umlcomponents.UMLClass;
import com.objetdirect.gwt.umlapi.client.umlcomponents.*;
[ "com.objetdirect.gwt" ]
com.objetdirect.gwt;
987,997
ClientBase.setupTestEnv(); // 2 servers in current config, 3 in next config final int SERVER_COUNT = 3; final int clientPorts[] = new int[SERVER_COUNT]; StringBuilder sb = new StringBuilder(); String server; ArrayList<String> allServers = new ArrayList<String>(); ...
ClientBase.setupTestEnv(); final int SERVER_COUNT = 3; final int clientPorts[] = new int[SERVER_COUNT]; StringBuilder sb = new StringBuilder(); String server; ArrayList<String> allServers = new ArrayList<String>(); String currentQuorumCfgSection = null, nextQuorumCfgSection; for (int i = 0; i < SERVER_COUNT; i++) { cli...
/** * Reconfiguration recovery - test that a reconfiguration is completed if * leader has .next file during startup and new config is not running yet */
Reconfiguration recovery - test that a reconfiguration is completed if leader has .next file during startup and new config is not running yet
testNextConfigCompletion
{ "repo_name": "JulyKe/ZooKeeper350", "path": "src/java/test/org/apache/zookeeper/server/quorum/ReconfigRecoveryTest.java", "license": "apache-2.0", "size": 24691 }
[ "java.util.ArrayList", "org.apache.zookeeper.PortAssignment", "org.apache.zookeeper.ZooKeeper", "org.apache.zookeeper.test.ClientBase", "org.apache.zookeeper.test.ReconfigTest", "org.junit.Assert" ]
import java.util.ArrayList; import org.apache.zookeeper.PortAssignment; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.test.ClientBase; import org.apache.zookeeper.test.ReconfigTest; import org.junit.Assert;
import java.util.*; import org.apache.zookeeper.*; import org.apache.zookeeper.test.*; import org.junit.*;
[ "java.util", "org.apache.zookeeper", "org.junit" ]
java.util; org.apache.zookeeper; org.junit;
2,146,257
public CSAssignment assignContainers(Resource clusterResource, PlacementSet<FiCaSchedulerNode> ps, ResourceLimits resourceLimits, SchedulingMode schedulingMode);
CSAssignment function(Resource clusterResource, PlacementSet<FiCaSchedulerNode> ps, ResourceLimits resourceLimits, SchedulingMode schedulingMode);
/** * Assign containers to applications in the queue or it's children (if any). * @param clusterResource the resource of the cluster. * @param ps {@link PlacementSet} of nodes which resources are available * @param resourceLimits how much overall resource of this queue can use. * @param schedulingMode T...
Assign containers to applications in the queue or it's children (if any)
assignContainers
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSQueue.java", "license": "gpl-3.0", "size": 12969 }
[ "org.apache.hadoop.yarn.api.records.Resource", "org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceLimits", "org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerNode", "org.apache.hadoop.yarn.server.resourcemanager.scheduler.placement.PlacementSet" ]
import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceLimits; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerNode; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.placement.PlacementSet;
import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.*; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.*; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.placement.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
940,262
public COSDictionary getDictionary() { return dictionary; }
COSDictionary function() { return dictionary; }
/** * returns the dictionary. * * @return the dictionary */
returns the dictionary
getDictionary
{ "repo_name": "sencko/NALB", "path": "nalb2013/src/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java", "license": "gpl-2.0", "size": 16188 }
[ "org.apache.pdfbox.cos.COSDictionary" ]
import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,195,923
@InterfaceStability.Unstable public MultipartUploaderBuilder createMultipartUploader(Path basePath) throws IOException { methodNotSupported(); return null; }
@InterfaceStability.Unstable MultipartUploaderBuilder function(Path basePath) throws IOException { methodNotSupported(); return null; }
/** * Create a multipart uploader. * @param basePath file path under which all files are uploaded * @return a MultipartUploaderBuilder object to build the uploader * @throws IOException if some early checks cause IO failures. * @throws UnsupportedOperationException if support is checked early. */
Create a multipart uploader
createMultipartUploader
{ "repo_name": "apurtell/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java", "license": "apache-2.0", "size": 52035 }
[ "java.io.IOException", "org.apache.hadoop.classification.InterfaceStability" ]
import java.io.IOException; import org.apache.hadoop.classification.InterfaceStability;
import java.io.*; import org.apache.hadoop.classification.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
889,578
Optional<LotteryTicketId> submitTicket(LotteryTicket ticket);
Optional<LotteryTicketId> submitTicket(LotteryTicket ticket);
/** * Submit lottery ticket to participate in the lottery */
Submit lottery ticket to participate in the lottery
submitTicket
{ "repo_name": "colinbut/java-design-patterns", "path": "hexagonal/src/main/java/com/iluwatar/hexagonal/service/LotteryService.java", "license": "mit", "size": 1824 }
[ "com.iluwatar.hexagonal.domain.LotteryTicket", "com.iluwatar.hexagonal.domain.LotteryTicketId", "java.util.Optional" ]
import com.iluwatar.hexagonal.domain.LotteryTicket; import com.iluwatar.hexagonal.domain.LotteryTicketId; import java.util.Optional;
import com.iluwatar.hexagonal.domain.*; import java.util.*;
[ "com.iluwatar.hexagonal", "java.util" ]
com.iluwatar.hexagonal; java.util;
1,396,638
public TimeUnit timeunit() { return values.timeunit; }
TimeUnit function() { return values.timeunit; }
/** * Request rate reporting time unit. * * @return request rate reporting time unit */
Request rate reporting time unit
timeunit
{ "repo_name": "smartcat-labs/cassandra-diagnostics", "path": "cassandra-diagnostics-core/src/main/java/io/smartcat/cassandra/diagnostics/module/requestrate/RequestRateConfiguration.java", "license": "apache-2.0", "size": 4773 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,900,851
public static SpikePattern subset(SpikePattern pattern, int[] indices) { SpikePatternImpl result = new SpikePatternImpl(indices.length); for (int i = 0; i < indices.length; i++) { float[] spikeTimes = pattern.getSpikeTimes(indices[i]); for (int j = 0; j < spikeTimes.length; j++) { result.addSpike(i,...
static SpikePattern function(SpikePattern pattern, int[] indices) { SpikePatternImpl result = new SpikePatternImpl(indices.length); for (int i = 0; i < indices.length; i++) { float[] spikeTimes = pattern.getSpikeTimes(indices[i]); for (int j = 0; j < spikeTimes.length; j++) { result.addSpike(i, spikeTimes[j]); } } retu...
/** * Extracts spikes of selected neurons from a given SpikePattern. * * @param pattern Any SpikePattern * @param indices Indices of neurons in original pattern from which to extract spikes * @return Spikes from selected neurons in the original pattern */
Extracts spikes of selected neurons from a given SpikePattern
subset
{ "repo_name": "printedheart/opennars", "path": "nars_gui/src/main/java/ca/nengo/util/DataUtils.java", "license": "agpl-3.0", "size": 8679 }
[ "ca.nengo.util.impl.SpikePatternImpl" ]
import ca.nengo.util.impl.SpikePatternImpl;
import ca.nengo.util.impl.*;
[ "ca.nengo.util" ]
ca.nengo.util;
1,754,806
File baseDir = new File(System.getProperty("java.io.tmpdir")); String baseName = prefix + System.currentTimeMillis() + "-"; for (int counter = 0; counter < 10000; counter++) { File tempDir = new File(baseDir, baseName + counter); if (tempDir.mkdir()) { return tempDir; } } thro...
File baseDir = new File(System.getProperty(STR)); String baseName = prefix + System.currentTimeMillis() + "-"; for (int counter = 0; counter < 10000; counter++) { File tempDir = new File(baseDir, baseName + counter); if (tempDir.mkdir()) { return tempDir; } } throw new IllegalStateException( STR + 10000 + STR + baseNam...
/** * Creates a temporary directory prefixed with <code>prefix</code>. * * @param prefix folder prefix * @return temporary folder */
Creates a temporary directory prefixed with <code>prefix</code>
createTempDir
{ "repo_name": "linkedin/PalDB", "path": "paldb/src/main/java/com/linkedin/paldb/utils/TempUtils.java", "license": "apache-2.0", "size": 2769 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
239,228
@FIXVersion(introduced="4.4") @TagNumRef(tagNum=TagNum.SecurityResponseID, required=true) public String getSecurityResponseID() { return securityResponseID; }
@FIXVersion(introduced="4.4") @TagNumRef(tagNum=TagNum.SecurityResponseID, required=true) String function() { return securityResponseID; }
/** * Message field getter. * @return field value */
Message field getter
getSecurityResponseID
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/DerivativeSecurityListMsg.java", "license": "gpl-3.0", "size": 23172 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,604,103
void convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter);
void convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter);
/** * Binds a type converter. The injector will use the given converter to * convert string constants to matching types as needed. * * @param typeMatcher matches types the converter can handle * @param converter converts values * @since 2.0 */
Binds a type converter. The injector will use the given converter to convert string constants to matching types as needed
convertToTypes
{ "repo_name": "easyfmxu/guice", "path": "core/src/com/google/inject/Binder.java", "license": "apache-2.0", "size": 22047 }
[ "com.google.inject.matcher.Matcher", "com.google.inject.spi.TypeConverter" ]
import com.google.inject.matcher.Matcher; import com.google.inject.spi.TypeConverter;
import com.google.inject.matcher.*; import com.google.inject.spi.*;
[ "com.google.inject" ]
com.google.inject;
2,461,411
public void annotate(ExceptionWithContext ex) { int limit = stackPtr - 1; for (int i = 0; i <= limit; i++) { String idx = (i == limit) ? "top0" : Hex.u2(limit - i); ex.addContext("stack[" + idx + "]: " + stackElementString(stack[i])); } ...
void function(ExceptionWithContext ex) { int limit = stackPtr - 1; for (int i = 0; i <= limit; i++) { String idx = (i == limit) ? "top0" : Hex.u2(limit - i); ex.addContext(STR + idx + STR + stackElementString(stack[i])); } }
/** * Annotates (adds context to) the given exception with information * about this instance. * * @param ex {@code non-null;} the exception to annotate */
Annotates (adds context to) the given exception with information about this instance
annotate
{ "repo_name": "tybor/MoSync", "path": "tools/android/dx/src/com/android/dx/cf/code/ExecutionStack.java", "license": "gpl-2.0", "size": 8922 }
[ "com.android.dx.util.ExceptionWithContext", "com.android.dx.util.Hex" ]
import com.android.dx.util.ExceptionWithContext; import com.android.dx.util.Hex;
import com.android.dx.util.*;
[ "com.android.dx" ]
com.android.dx;
45,056
protected IResource getResource() { IEditorInput input= fTextEditor.getEditorInput(); IResource resource= (IResource) input.getAdapter(IFile.class); if (resource == null) { resource= (IResource) input.getAdapter(IResource.class); } return resource; }
IResource function() { IEditorInput input= fTextEditor.getEditorInput(); IResource resource= (IResource) input.getAdapter(IFile.class); if (resource == null) { resource= (IResource) input.getAdapter(IResource.class); } return resource; }
/** * Returns the resource for which to create the marker, * or <code>null</code> if there is no applicable resource. * * @return the resource for which to create the marker or <code>null</code> */
Returns the resource for which to create the marker, or <code>null</code> if there is no applicable resource
getResource
{ "repo_name": "lwriemen/bridgepoint", "path": "src/org.xtuml.bp.debug.ui/src/org/xtuml/bp/debug/ui/actions/AbstractBreakpointRulerAction.java", "license": "apache-2.0", "size": 5033 }
[ "org.eclipse.core.resources.IFile", "org.eclipse.core.resources.IResource", "org.eclipse.ui.IEditorInput" ]
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.ui.IEditorInput;
import org.eclipse.core.resources.*; import org.eclipse.ui.*;
[ "org.eclipse.core", "org.eclipse.ui" ]
org.eclipse.core; org.eclipse.ui;
508,679
public Collection loadAnnotations(SecurityContext ctx, Class annotationType, String nameSpace, long userID) throws DSOutOfServiceException, DSAccessException;
Collection function(SecurityContext ctx, Class annotationType, String nameSpace, long userID) throws DSOutOfServiceException, DSAccessException;
/** * Loads all annotations of a given type. * * @param ctx The security context. * @param annotationType The type of annotation to retrieve. * @param nameSpace The name space of the annotation or <code>null</code>. * @param userID The id of the user the annotations are related to. * @return See above. ...
Loads all annotations of a given type
loadAnnotations
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OmeroMetadataService.java", "license": "gpl-2.0", "size": 31596 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,612,256
public Builder inDirectory(String directory) { return inDirectory(new File(directory)); }
Builder function(String directory) { return inDirectory(new File(directory)); }
/** * The directory where to write the sstables. * <p> * This is a mandatory option. * * @param directory the directory to use, which should exists and be writable. * @return this builder. * * @throws IllegalArgumentException if {@code directory} d...
The directory where to write the sstables. This is a mandatory option
inDirectory
{ "repo_name": "mkjellman/cassandra", "path": "src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java", "license": "apache-2.0", "size": 25318 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,060,105
@Test public void testDefaultFilesystem() throws IOException { FrameworkUploader uploader = new FrameworkUploader(); Configuration conf = new Configuration(); conf.set(FS_DEFAULT_NAME_KEY, "hdfs://namenode:555"); uploader.setConf(conf); boolean success = uploader.parseArguments(new String[]{}); ...
void function() throws IOException { FrameworkUploader uploader = new FrameworkUploader(); Configuration conf = new Configuration(); conf.set(FS_DEFAULT_NAME_KEY, STRExpected to parse argumentsSTRExpectedSTRhdfs: uploader.target); }
/** * Test the default ways how to specify filesystems. */
Test the default ways how to specify filesystems
testDefaultFilesystem
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-uploader/src/test/java/org/apache/hadoop/mapred/uploader/TestFrameworkUploader.java", "license": "apache-2.0", "size": 16420 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration;
import java.io.*; import org.apache.hadoop.conf.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,209,375
setPaperSizeIfNotSpecified(viewWithLayoutInformation, viewWithoutLayoutInformation); setDimensionsIfNotSpecified(viewWithLayoutInformation, viewWithoutLayoutInformation); Map<ElementView, ElementView> elementViewMap = new HashMap<>(); Map<Element, Element> elementMap = new HashMap<>(); ...
setPaperSizeIfNotSpecified(viewWithLayoutInformation, viewWithoutLayoutInformation); setDimensionsIfNotSpecified(viewWithLayoutInformation, viewWithoutLayoutInformation); Map<ElementView, ElementView> elementViewMap = new HashMap<>(); Map<Element, Element> elementMap = new HashMap<>(); for (ElementView elementViewWitho...
/** * Attempts to copy the visual layout information (e.g. x,y coordinates) of elements and relationships * from the specified source view into the specified destination view. * * @param viewWithLayoutInformation the source view (e.g. the version stored by the Structurizr service) * @pa...
Attempts to copy the visual layout information (e.g. x,y coordinates) of elements and relationships from the specified source view into the specified destination view
copyLayoutInformation
{ "repo_name": "structurizr/java", "path": "structurizr-core/src/com/structurizr/view/DefaultLayoutMergeStrategy.java", "license": "apache-2.0", "size": 8787 }
[ "com.structurizr.model.Element", "java.util.HashMap", "java.util.Map" ]
import com.structurizr.model.Element; import java.util.HashMap; import java.util.Map;
import com.structurizr.model.*; import java.util.*;
[ "com.structurizr.model", "java.util" ]
com.structurizr.model; java.util;
2,342,930
protected void doStartElement(String uri, String localName, String name, Attributes atts) throws SAXException { }
void function(String uri, String localName, String name, Attributes atts) throws SAXException { }
/** * By default do nothing. * * @param uri String * @param localName String * @param name String * @param atts Attributes * @throws SAXException API told me so */
By default do nothing
doStartElement
{ "repo_name": "apache/ant-ivy", "path": "src/java/org/apache/ivy/osgi/util/DelegatingHandler.java", "license": "apache-2.0", "size": 21219 }
[ "org.xml.sax.Attributes", "org.xml.sax.SAXException" ]
import org.xml.sax.Attributes; import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
269,637
public IconicsDrawable sizeDpY(int sizeY) { return sizePxY(Utils.convertDpToPx(mContext, sizeY)); }
IconicsDrawable function(int sizeY) { return sizePxY(Utils.convertDpToPx(mContext, sizeY)); }
/** * Set the size of the drawable. * * @param sizeY The size in density-independent pixels (dp). * @return The current IconExtDrawable for chaining. */
Set the size of the drawable
sizeDpY
{ "repo_name": "tieusangaka/Android-Iconics", "path": "library-core/src/main/java/com/mikepenz/iconics/IconicsDrawable.java", "license": "apache-2.0", "size": 24212 }
[ "com.mikepenz.iconics.utils.Utils" ]
import com.mikepenz.iconics.utils.Utils;
import com.mikepenz.iconics.utils.*;
[ "com.mikepenz.iconics" ]
com.mikepenz.iconics;
368,349
public static <T extends HostSteady> int getNumberOfPes(List<T> hostList) { int numberOfPes = 0; for (T host : hostList) { numberOfPes += host.getPeList().size(); } return numberOfPes; }
static <T extends HostSteady> int function(List<T> hostList) { int numberOfPes = 0; for (T host : hostList) { numberOfPes += host.getPeList().size(); } return numberOfPes; }
/** * Gets the total number of PEs for all Machines. * * @param <T> the generic type * @param hostList the host list * @return number of PEs * @pre $none * @post $result >= 0 */
Gets the total number of PEs for all Machines
getNumberOfPes
{ "repo_name": "swethapts/cloudsim", "path": "sources/org/cloudbus/cloudsim/lists/HostListSteady.java", "license": "lgpl-3.0", "size": 3825 }
[ "java.util.List", "org.cloudbus.cloudsim.HostSteady" ]
import java.util.List; import org.cloudbus.cloudsim.HostSteady;
import java.util.*; import org.cloudbus.cloudsim.*;
[ "java.util", "org.cloudbus.cloudsim" ]
java.util; org.cloudbus.cloudsim;
2,012,494
install(new RestApiModule() {
install(new RestApiModule() {
/** * Install our extensions to Gerrit's REST API. */
Install our extensions to Gerrit's REST API
configure
{ "repo_name": "reviewboard/gerrit-reviewboard-plugin", "path": "src/main/java/org/reviewboard/rbgerrit/Module.java", "license": "mit", "size": 1224 }
[ "com.google.gerrit.extensions.restapi.RestApiModule" ]
import com.google.gerrit.extensions.restapi.RestApiModule;
import com.google.gerrit.extensions.restapi.*;
[ "com.google.gerrit" ]
com.google.gerrit;
1,957,889
public static Uri getNotificationUri(String clientId) { Connections conn = connections.get(clientId); return (conn != null) ? conn.getAssignedInfo().getEndpointUri() : null; } public FpcServiceImpl(DataBroker dataBroker, NotificationPublishService notificationService, ...
static Uri function(String clientId) { Connections conn = connections.get(clientId); return (conn != null) ? conn.getAssignedInfo().getEndpointUri() : null; } public FpcServiceImpl(DataBroker dataBroker, NotificationPublishService notificationService, MonitorThreadPool monitorService, ActivationThreadPool activationSer...
/** * Returns a Notification Uri for a specific Client. * @param clientId - String Value of the Client Identifier * @return Uri associated with the specified Client Identifier or null otherwise */
Returns a Notification Uri for a specific Client
getNotificationUri
{ "repo_name": "sprintlabs/fpc", "path": "impl/src/main/java/org/opendaylight/fpc/impl/FpcServiceImpl.java", "license": "epl-1.0", "size": 15764 }
[ "org.opendaylight.controller.md.sal.binding.api.DataBroker", "org.opendaylight.controller.md.sal.binding.api.NotificationPublishService", "org.opendaylight.fpc.activation.workers.ActivationThreadPool", "org.opendaylight.fpc.activation.workers.MonitorThreadPool", "org.opendaylight.yang.gen.v1.urn.ietf.params...
import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; import org.opendaylight.fpc.activation.workers.ActivationThreadPool; import org.opendaylight.fpc.activation.workers.MonitorThreadPool; import org.opendaylight.yang.gen.v1.u...
import org.opendaylight.controller.md.sal.binding.api.*; import org.opendaylight.fpc.activation.workers.*; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.fpc.rev150105.connection.info.*;
[ "org.opendaylight.controller", "org.opendaylight.fpc", "org.opendaylight.yang" ]
org.opendaylight.controller; org.opendaylight.fpc; org.opendaylight.yang;
738,025
public void setNewSponsorTerms(List<SponsorTerm> newSponsorTerms) { this.newSponsorTerms = newSponsorTerms; }
void function(List<SponsorTerm> newSponsorTerms) { this.newSponsorTerms = newSponsorTerms; }
/** * Sets the newAwardSponsorTerms attribute value. * @param newAwardSponsorTerms The newAwardSponsorTerms to set. */
Sets the newAwardSponsorTerms attribute value
setNewSponsorTerms
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/award/web/struts/action/SponsorTermFormHelper.java", "license": "apache-2.0", "size": 2731 }
[ "java.util.List", "org.kuali.kra.bo.SponsorTerm" ]
import java.util.List; import org.kuali.kra.bo.SponsorTerm;
import java.util.*; import org.kuali.kra.bo.*;
[ "java.util", "org.kuali.kra" ]
java.util; org.kuali.kra;
958,836
public int getRowNumber(Row row) { return Datapos.get(row); }
int function(Row row) { return Datapos.get(row); }
/** * get the row position of a row. * @param row The row to get the row number for * @return the position of the provided row */
get the row position of a row
getRowNumber
{ "repo_name": "sysbiolux/IDARE", "path": "METANODE-CREATOR/src/main/java/idare/imagenode/internal/DataSetReaders/CSVReader/CSVSheet.java", "license": "lgpl-3.0", "size": 16564 }
[ "org.apache.poi.ss.usermodel.Row" ]
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.*;
[ "org.apache.poi" ]
org.apache.poi;
2,411,945
GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), new JacksonFactory()) .setAudience(Collections.singletonList(CLIENT_ID)).build(); try { GoogleIdToken idToken = verifier.verify(idTokenString); if (idToken != null) { Payload payload = idT...
GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(new NetHttpTransport(), new JacksonFactory()) .setAudience(Collections.singletonList(CLIENT_ID)).build(); try { GoogleIdToken idToken = verifier.verify(idTokenString); if (idToken != null) { Payload payload = idToken.getPayload(); return payload.getSubj...
/** * Verifies the given Google-IdToken. * * @param idTokenString The Google IdToken which should be verified. * @return Returns the UserId if successful, otherwise "". */
Verifies the given Google-IdToken
verify
{ "repo_name": "JohannesCox/GOApp_Server", "path": "src/main/java/frontController/IdTokenVerifier.java", "license": "mit", "size": 1725 }
[ "com.google.api.client.auth.openidconnect.IdToken", "com.google.api.client.googleapis.auth.oauth2.GoogleIdToken", "com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier", "com.google.api.client.http.javanet.NetHttpTransport", "com.google.api.client.json.jackson2.JacksonFactory", "java.securit...
import com.google.api.client.auth.openidconnect.IdToken; import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken; import com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; im...
import com.google.api.client.auth.openidconnect.*; import com.google.api.client.googleapis.auth.oauth2.*; import com.google.api.client.http.javanet.*; import com.google.api.client.json.jackson2.*; import java.security.*; import java.util.*;
[ "com.google.api", "java.security", "java.util" ]
com.google.api; java.security; java.util;
909,877
@SuppressWarnings("unused") static <T> HttpResponse fromPublisher(ResponseHeaders headers, Publisher<T> contentPublisher, HttpHeaders trailers, Function<? super T, String> contentConverter) { requireNonNull(contentConver...
@SuppressWarnings(STR) static <T> HttpResponse fromPublisher(ResponseHeaders headers, Publisher<T> contentPublisher, HttpHeaders trailers, Function<? super T, String> contentConverter) { requireNonNull(contentConverter, STR); return streamingFrom(contentPublisher, sanitizeHeaders(headers), trailers, o -> toHttpData(con...
/** * Creates a new JSON Text Sequences from the specified {@link Publisher}. * * <p>Note that this method is intentionally hidden from the public API for use only with * {@code ScalaPbResponseConverterFunction} and {@code ProtobufResponseConverterFunction}. * Because the {@code contentConverte...
Creates a new JSON Text Sequences from the specified <code>Publisher</code>. Note that this method is intentionally hidden from the public API for use only with ScalaPbResponseConverterFunction and ProtobufResponseConverterFunction. Because the contentConverter can easily produce a malformed string which violates the J...
fromPublisher
{ "repo_name": "line/armeria", "path": "core/src/main/java/com/linecorp/armeria/server/streaming/JsonTextSequences.java", "license": "apache-2.0", "size": 19091 }
[ "com.linecorp.armeria.common.HttpHeaders", "com.linecorp.armeria.common.HttpResponse", "com.linecorp.armeria.common.ResponseHeaders", "com.linecorp.armeria.internal.server.ResponseConversionUtil", "java.util.Objects", "java.util.function.Function", "org.reactivestreams.Publisher" ]
import com.linecorp.armeria.common.HttpHeaders; import com.linecorp.armeria.common.HttpResponse; import com.linecorp.armeria.common.ResponseHeaders; import com.linecorp.armeria.internal.server.ResponseConversionUtil; import java.util.Objects; import java.util.function.Function; import org.reactivestreams.Publisher;
import com.linecorp.armeria.common.*; import com.linecorp.armeria.internal.server.*; import java.util.*; import java.util.function.*; import org.reactivestreams.*;
[ "com.linecorp.armeria", "java.util", "org.reactivestreams" ]
com.linecorp.armeria; java.util; org.reactivestreams;
1,135,964
default void export( String project, Object zipBuilder, Map<String, String> exportOptions ){ }
default void export( String project, Object zipBuilder, Map<String, String> exportOptions ){ }
/** * Export data for the project * * @param project project name * @param zipBuilder ZipBuilder * @param exportOptions options for this component */
Export data for the project
export
{ "repo_name": "rundeck/rundeck", "path": "core/src/main/java/org/rundeck/core/projects/ProjectDataExporter.java", "license": "apache-2.0", "size": 2252 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,040,649
final String docDBName = Utils.randomResourceName(azureResourceManager, "docDb", 10); final String rgName = Utils.randomResourceName(azureResourceManager, "rgNEMV", 24); try { //============================================================ // Create a CosmosDB System...
final String docDBName = Utils.randomResourceName(azureResourceManager, "docDb", 10); final String rgName = Utils.randomResourceName(azureResourceManager, STR, 24); try { System.out.println(STR); CosmosDBAccount cosmosDBAccount = azureResourceManager.cosmosDBAccounts().define(docDBName) .withRegion(Region.US_EAST) .wit...
/** * Main function which runs the actual sample. * @param azureResourceManager instance of the azure client * @return true if sample runs successfully */
Main function which runs the actual sample
runSample
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-samples/src/main/java/com/azure/resourcemanager/cosmos/samples/CreateCosmosDBWithIPRange.java", "license": "mit", "size": 4385 }
[ "com.azure.core.management.Region", "com.azure.core.management.exception.ManagementException", "com.azure.resourcemanager.cosmos.models.CosmosDBAccount", "com.azure.resourcemanager.cosmos.models.DatabaseAccountKind", "com.azure.resourcemanager.samples.Utils" ]
import com.azure.core.management.Region; import com.azure.core.management.exception.ManagementException; import com.azure.resourcemanager.cosmos.models.CosmosDBAccount; import com.azure.resourcemanager.cosmos.models.DatabaseAccountKind; import com.azure.resourcemanager.samples.Utils;
import com.azure.core.management.*; import com.azure.core.management.exception.*; import com.azure.resourcemanager.cosmos.models.*; import com.azure.resourcemanager.samples.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,866,805
public static synchronized DbHelper getInstance(Context context) { if (self == null) { self = new DbHelper(context.getApplicationContext()); } return self; }
static synchronized DbHelper function(Context context) { if (self == null) { self = new DbHelper(context.getApplicationContext()); } return self; }
/** * Get instance of this object. */
Get instance of this object
getInstance
{ "repo_name": "spremi/nayati", "path": "app/src/main/java/self/premi/sanjeev/nayati/db/DbHelper.java", "license": "bsd-3-clause", "size": 2156 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,309,678
public T csv() { return dataFormat(new CsvDataFormat()); }
T function() { return dataFormat(new CsvDataFormat()); }
/** * Uses the CSV data format */
Uses the CSV data format
csv
{ "repo_name": "punkhorn/camel-upstream", "path": "core/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 46443 }
[ "org.apache.camel.model.dataformat.CsvDataFormat" ]
import org.apache.camel.model.dataformat.CsvDataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
1,128,416
@Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case ProtobufPackage.PROTO: { Proto proto = (Proto)theEObject; T result = caseProto(proto); if (result == null) result = defaultCase(theEObject); return result; ...
T function(int classifierID, EObject theEObject) { switch (classifierID) { case ProtobufPackage.PROTO: { Proto proto = (Proto)theEObject; T result = caseProto(proto); if (result == null) result = defaultCase(theEObject); return result; } case ProtobufPackage.STATEMENT: { Statement statement = (Statement)theEObject; T r...
/** * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */
Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
doSwitch
{ "repo_name": "dvdkruk/protolipse", "path": "protolipse/src-gen/protolipse/protobuf/util/ProtobufSwitch.java", "license": "apache-2.0", "size": 43474 }
[ "org.eclipse.emf.ecore.EObject" ]
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,266,932
public ByteSizeValue getHeapMax() { return new ByteSizeValue(heapMax); } static final class Fields { static final String VERSIONS = "versions"; static final String VERSION = "version"; static final String VM_NAME = "vm_name"; static fi...
ByteSizeValue function() { return new ByteSizeValue(heapMax); } static final class Fields { static final String VERSIONS = STR; static final String VERSION = STR; static final String VM_NAME = STR; static final String VM_VERSION = STR; static final String VM_VENDOR = STR; static final String COUNT = "count"; static fin...
/** * Maximum total heap available to the cluster */
Maximum total heap available to the cluster
getHeapMax
{ "repo_name": "s1monw/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodes.java", "license": "apache-2.0", "size": 21698 }
[ "org.elasticsearch.common.unit.ByteSizeValue" ]
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,307,447
private static void explicitPromotionTest(final ISchemaVersion schemaVersion) throws IOException { final FileWriter output = openOutput(schemaVersion, "explicit_promotion", TestType.UNION); final Random random = new Random(SEED); // the accumulator, starts empty final HLL hll = new...
static void function(final ISchemaVersion schemaVersion) throws IOException { final FileWriter output = openOutput(schemaVersion, STR, TestType.UNION); final Random random = new Random(SEED); final HLL hll = newHLL(HLLType.EMPTY); final HLL emptyHLL = newHLL(HLLType.EMPTY); cumulativeUnionLine(output, hll, emptyHLL, sc...
/** * Unions an EMPTY accumulator with EXPLICIT HLLs, each containing a * single random value. * * Format: cumulative union * Tests: * - EMPTY U EXPLICIT * - EXPLICIT U EXPLICIT * - EXPLICIT to SPARSE promotion * - SPARSE U EXPLICIT */
Unions an EMPTY accumulator with EXPLICIT HLLs, each containing a single random value. Format: cumulative union Tests: - EMPTY U EXPLICIT - EXPLICIT U EXPLICIT - EXPLICIT to SPARSE promotion - SPARSE U EXPLICIT
explicitPromotionTest
{ "repo_name": "stephenmcd/java-hll", "path": "src/test/java/net/agkn/hll/IntegrationTestGenerator.java", "license": "apache-2.0", "size": 28740 }
[ "java.io.FileWriter", "java.io.IOException", "java.util.Random", "net.agkn.hll.HLLType", "net.agkn.hll.serialization.ISchemaVersion" ]
import java.io.FileWriter; import java.io.IOException; import java.util.Random; import net.agkn.hll.HLLType; import net.agkn.hll.serialization.ISchemaVersion;
import java.io.*; import java.util.*; import net.agkn.hll.*; import net.agkn.hll.serialization.*;
[ "java.io", "java.util", "net.agkn.hll" ]
java.io; java.util; net.agkn.hll;
246,972
private static void writePlayerDataToFile() { try { FileOutputStream out = new FileOutputStream("config/setting/netserver_playerdata.cfg"); propPlayerData.store(out, "NullpoMino NetServer PlayerData"); out.close(); } catch (IOException e) { log.error("Failed to write player data", e); } } ...
static void function() { try { FileOutputStream out = new FileOutputStream(STR); propPlayerData.store(out, STR); out.close(); } catch (IOException e) { log.error(STR, e); } }
/** * Write player data properties (propPlayerData) to a file */
Write player data properties (propPlayerData) to a file
writePlayerDataToFile
{ "repo_name": "sammymax/nullpomino", "path": "src/mu/nu/nullpo/game/net/NetServer.java", "license": "bsd-3-clause", "size": 118621 }
[ "java.io.FileOutputStream", "java.io.IOException" ]
import java.io.FileOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
20,386
private static ImageDisplay transformTag(TagAnnotationData tag, long userID, long groupID) { if (tag == null) throw new IllegalArgumentException("No tag."); if (!isReadable(tag, userID, groupID)) return null; ImageSet data = null; ...
static ImageDisplay function(TagAnnotationData tag, long userID, long groupID) { if (tag == null) throw new IllegalArgumentException(STR); if (!isReadable(tag, userID, groupID)) return null; ImageSet data = null; Set tags = tag.getTags(); Set dataObjects = tag.getDataObjects(); String note = STR", tag); formatToolTipFo...
/** * Transforms a Datasets/Images hierarchy into a visualization * tree. * * @param tag The {@link TagAnnotationData}s to transform. * Mustn't be <code>null</code>. * @param userID The id of the current user. * @param groupID The id of the group the current user...
Transforms a Datasets/Images hierarchy into a visualization tree
transformTag
{ "repo_name": "hflynn/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/DataBrowserTranslator.java", "license": "gpl-2.0", "size": 30247 }
[ "java.util.Set", "org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay", "org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageSet" ]
import java.util.Set; import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay; import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageSet;
import java.util.*; import org.openmicroscopy.shoola.agents.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
2,823,430
protected void addActivePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_User_active_feature"), //$NON-NLS-1$ getString("_UI_PropertyDescriptor_...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), TaskPackage.Literals.USER__ACTIVE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAG...
/** * This adds a property descriptor for the Active feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */
This adds a property descriptor for the Active feature.
addActivePropertyDescriptor
{ "repo_name": "jayjaybillings/emfPlayground", "path": "org.eclipse.emf.ecp.makeithappen.model.edit/src/org/eclipse/emf/ecp/makeithappen/model/task/provider/UserItemProvider.java", "license": "epl-1.0", "size": 13296 }
[ "org.eclipse.emf.ecp.makeithappen.model.task.TaskPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.ecp.makeithappen.model.task.TaskPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.ecp.makeithappen.model.task.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,332,776
public DefaultPrincipalsModificationKind defaultPrincipalsModificationKind() { return this.defaultPrincipalsModificationKind; }
DefaultPrincipalsModificationKind function() { return this.defaultPrincipalsModificationKind; }
/** * Get the defaultPrincipalsModificationKind property: The default principals modification kind. * * @return the defaultPrincipalsModificationKind value. */
Get the defaultPrincipalsModificationKind property: The default principals modification kind
defaultPrincipalsModificationKind
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationProperties.java", "license": "mit", "size": 7341 }
[ "com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind" ]
import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind;
import com.azure.resourcemanager.kusto.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,538,352
public static Integer getJSONInteger(JSONObject obj, String key) { try { return obj.getInt(key); } catch (JSONException e) { Log.w(TAG, "Error fetching an int!", e); return null; } }
static Integer function(JSONObject obj, String key) { try { return obj.getInt(key); } catch (JSONException e) { Log.w(TAG, STR, e); return null; } }
/** * Convenience method to fetch a int from a {@code JSONObject} or return null if it's not * found. * @param obj JSONObject to look in * @param key String representing the key to look for * @return int for the given key or null if it wasn't found */
Convenience method to fetch a int from a JSONObject or return null if it's not found
getJSONInteger
{ "repo_name": "absimas/VideoClipper", "path": "app/src/main/java/com/simas/vc/helpers/Utils.java", "license": "gpl-3.0", "size": 11665 }
[ "android.util.Log", "org.json.JSONException", "org.json.JSONObject" ]
import android.util.Log; import org.json.JSONException; import org.json.JSONObject;
import android.util.*; import org.json.*;
[ "android.util", "org.json" ]
android.util; org.json;
1,098,132
EffectOperationResult onDamage(Insentient victim, Insentient attacker, ItemStack weapon);
EffectOperationResult onDamage(Insentient victim, Insentient attacker, ItemStack weapon);
/** * Performs an operation on the {@link Insentient} victim when the victim is afflicted by * the {@link Insentient} attacker affected by an effect with a * {@link MeleeAttackingProperty} with the given weapon {@link ItemStack}. * * @param victim The victim being damaged * @param attack...
Performs an operation on the <code>Insentient</code> victim when the victim is afflicted by the <code>Insentient</code> attacker affected by an effect with a <code>MeleeAttackingProperty</code> with the given weapon <code>ItemStack</code>
onDamage
{ "repo_name": "AfterKraft/KraftRPG-API", "path": "src/main/java/com/afterkraft/kraftrpg/api/effect/operation/MeleeAttackingOperation.java", "license": "mit", "size": 2919 }
[ "com.afterkraft.kraftrpg.api.effect.EffectOperationResult", "com.afterkraft.kraftrpg.api.entity.Insentient", "org.spongepowered.api.item.inventory.ItemStack" ]
import com.afterkraft.kraftrpg.api.effect.EffectOperationResult; import com.afterkraft.kraftrpg.api.entity.Insentient; import org.spongepowered.api.item.inventory.ItemStack;
import com.afterkraft.kraftrpg.api.effect.*; import com.afterkraft.kraftrpg.api.entity.*; import org.spongepowered.api.item.inventory.*;
[ "com.afterkraft.kraftrpg", "org.spongepowered.api" ]
com.afterkraft.kraftrpg; org.spongepowered.api;
2,445,763
@Test public void testFilteredResultList() throws P4JavaException { final String knownName="testKnownName"; final String knownDescription="testKnownSummaryDescription"; // given when(server.getServerVersion()).thenReturn(20161); when(server.execMapCmdList(eq(B...
void function() throws P4JavaException { final String knownName=STR; final String knownDescription=STR; when(server.getServerVersion()).thenReturn(20161); when(server.execMapCmdList(eq(BRANCHES.toString()), any(String[].class), eq(null))) .thenReturn(resultMaps); when(resultMap.get(MapKeys.BRANCH_LC_KEY)).thenReturn(kn...
/** * Test that the result list from a filtered branches command contains the data from a * defined server response. * TODO: Add tests that exercise the actual filtering; e.g. no more than max * @throws P4JavaException */
Test that the result list from a filtered branches command contains the data from a defined server response
testFilteredResultList
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/r18-1/src/test/java/com/perforce/p4java/impl/mapbased/server/cmd/BranchesDelegatorTest.java", "license": "apache-2.0", "size": 9656 }
[ "com.perforce.p4java.core.IBranchSpecSummary", "com.perforce.p4java.exception.P4JavaException", "com.perforce.p4java.impl.mapbased.MapKeys", "com.perforce.p4java.server.CmdSpec", "java.util.List", "org.junit.Assert", "org.mockito.ArgumentMatchers", "org.mockito.Mockito" ]
import com.perforce.p4java.core.IBranchSpecSummary; import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.impl.mapbased.MapKeys; import com.perforce.p4java.server.CmdSpec; import java.util.List; import org.junit.Assert; import org.mockito.ArgumentMatchers; import org.mockito.Mockito;
import com.perforce.p4java.core.*; import com.perforce.p4java.exception.*; import com.perforce.p4java.impl.mapbased.*; import com.perforce.p4java.server.*; import java.util.*; import org.junit.*; import org.mockito.*;
[ "com.perforce.p4java", "java.util", "org.junit", "org.mockito" ]
com.perforce.p4java; java.util; org.junit; org.mockito;
1,786,513
interface WithDiagnostics extends WithLinux { WithLinux withDiagnostics(); } interface WithCreate extends Creatable<ContainerService>, Resource.DefinitionWithTags<WithCreate> { } } ...
interface WithDiagnostics extends WithLinux { WithLinux withDiagnostics(); } interface WithCreate extends Creatable<ContainerService>, Resource.DefinitionWithTags<WithCreate> { } } interface Update extends Resource.UpdateWithTags<Update>, Appliable<ContainerService>, ContainerService.UpdateStages.WithUpdateAgentPoolCou...
/** * Enable diagnostics. * @return the create stage of the definition */
Enable diagnostics
withDiagnostics
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerService.java", "license": "mit", "size": 10155 }
[ "com.microsoft.azure.management.resources.fluentcore.arm.models.Resource", "com.microsoft.azure.management.resources.fluentcore.model.Appliable", "com.microsoft.azure.management.resources.fluentcore.model.Creatable" ]
import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
import com.microsoft.azure.management.resources.fluentcore.arm.models.*; import com.microsoft.azure.management.resources.fluentcore.model.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,574,600
public void processAction(String actionId, InputData input, OutputData output) throws Exception;
void function(String actionId, InputData input, OutputData output) throws Exception;
/** * Action processing method. Implementation should be able to handle different <code>actionId</code>s. * * @param actionId The ID of the incoming action. * @param input The request data. * @param output The response data. * @throws Exception Any runtime exception that might occur. */
Action processing method. Implementation should be able to handle different <code>actionId</code>s
processAction
{ "repo_name": "nortal/araneaframework", "path": "src/org/araneaframework/core/ActionListener.java", "license": "apache-2.0", "size": 1371 }
[ "org.araneaframework.InputData", "org.araneaframework.OutputData" ]
import org.araneaframework.InputData; import org.araneaframework.OutputData;
import org.araneaframework.*;
[ "org.araneaframework" ]
org.araneaframework;
843,479
private boolean checkParam( NodeTraversal t, Node param, @Nullable String name, JSTypeExpression paramType) { boolean nameOptional; Node nodeToCheck = param; if (param.isDefaultValue()) { nodeToCheck = param.getFirstChild(); nameOptional = true; } else if (param.isName()) { nam...
boolean function( NodeTraversal t, Node param, @Nullable String name, JSTypeExpression paramType) { boolean nameOptional; Node nodeToCheck = param; if (param.isDefaultValue()) { nodeToCheck = param.getFirstChild(); nameOptional = true; } else if (param.isName()) { nameOptional = param.getString().startsWith("opt_"); } ...
/** * Checks that the given parameter node has the given name, and that the given type is * compatible. * @param param If this is a non-NAME node, such as a destructuring pattern, skip the name check. * @param name If null, skip the name check * @return Whether a warning was reported */
Checks that the given parameter node has the given name, and that the given type is compatible
checkParam
{ "repo_name": "shantanusharma/closure-compiler", "path": "src/com/google/javascript/jscomp/lint/CheckJSDocStyle.java", "license": "apache-2.0", "size": 15324 }
[ "com.google.common.base.Preconditions", "com.google.javascript.jscomp.NodeTraversal", "com.google.javascript.rhino.JSTypeExpression", "com.google.javascript.rhino.Node", "javax.annotation.Nullable" ]
import com.google.common.base.Preconditions; import com.google.javascript.jscomp.NodeTraversal; import com.google.javascript.rhino.JSTypeExpression; import com.google.javascript.rhino.Node; import javax.annotation.Nullable;
import com.google.common.base.*; import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import javax.annotation.*;
[ "com.google.common", "com.google.javascript", "javax.annotation" ]
com.google.common; com.google.javascript; javax.annotation;
1,264,849
@Override public void setPathsEnabled(TreePath[] paths, boolean enable) { for (TreePath path : paths) { setPathEnabled(path, enable); } }
void function(TreePath[] paths, boolean enable) { for (TreePath path : paths) { setPathEnabled(path, enable); } }
/** * Sets whether or not the paths are enabled. * * @param paths the paths to enable/disable */
Sets whether or not the paths are enabled
setPathsEnabled
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.libero.libero/src/main/java/it/cnr/imaa/essi/lablib/gui/checkboxtree/DefaultTreeCheckingModel.java", "license": "gpl-2.0", "size": 23860 }
[ "javax.swing.tree.TreePath" ]
import javax.swing.tree.TreePath;
import javax.swing.tree.*;
[ "javax.swing" ]
javax.swing;
796,877
@Generated @Selector("requiresAuthentication") public native boolean requiresAuthentication();
@Selector(STR) native boolean function();
/** * authorization required before passes can be added */
authorization required before passes can be added
requiresAuthentication
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/passkit/PKIssuerProvisioningExtensionStatus.java", "license": "apache-2.0", "size": 5498 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
986,435
@Test public void testHasSizeLTE() throws IOException { assertTrue(Assertor.<Set<String>, String> ofIterable().hasSizeLTE(3).that(set).isOK()); assertTrue(Assertor.<Set<String>, String> ofIterable().hasSizeLTE(2).that(set).isOK()); assertFalse(Assertor.<Set<String>, String> ofIterabl...
void function() throws IOException { assertTrue(Assertor.<Set<String>, String> ofIterable().hasSizeLTE(3).that(set).isOK()); assertTrue(Assertor.<Set<String>, String> ofIterable().hasSizeLTE(2).that(set).isOK()); assertFalse(Assertor.<Set<String>, String> ofIterable().hasSizeLTE(1).that(set).isOK()); assertFalse(Assert...
/** * Test method for {@link AssertorIterable#hasSizeLTE}. * * @throws IOException * On not empty iterable */
Test method for <code>AssertorIterable#hasSizeLTE</code>
testHasSizeLTE
{ "repo_name": "Gilandel/utils-assertor", "path": "src/test/java/fr/landel/utils/assertor/predicate/PredicateAssertorIterableTest.java", "license": "apache-2.0", "size": 38438 }
[ "fr.landel.utils.assertor.Assertor", "java.io.IOException", "java.util.Set", "org.junit.Assert" ]
import fr.landel.utils.assertor.Assertor; import java.io.IOException; import java.util.Set; import org.junit.Assert;
import fr.landel.utils.assertor.*; import java.io.*; import java.util.*; import org.junit.*;
[ "fr.landel.utils", "java.io", "java.util", "org.junit" ]
fr.landel.utils; java.io; java.util; org.junit;
239,505
public String getValue(String name) { Attr attr = ((Attr) m_attrs.getNamedItem(name)); return (null != attr) ? attr.getValue() : null; }
String function(String name) { Attr attr = ((Attr) m_attrs.getNamedItem(name)); return (null != attr) ? attr.getValue() : null; }
/** * Look up an attribute's value by name. * * * @param name The attribute node's name * * @return The attribute node's value */
Look up an attribute's value by name
getValue
{ "repo_name": "bandcampdotcom/j2objc", "path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/utils/AttList.java", "license": "apache-2.0", "size": 6714 }
[ "org.w3c.dom.Attr" ]
import org.w3c.dom.Attr;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,728,744
public void testMultiEKWithOneRecipient() { String filename = "/data/org/opensaml/xml/encryption/SimpleRetrievalMethodEncryptedKeyResolverMultiple.xml"; SimpleXMLObject sxo = (SimpleXMLObject) unmarshallElement(filename); assertNotNull(sxo); assertNotNull(sxo.getSimpleXMLObject...
void function() { String filename = STR; SimpleXMLObject sxo = (SimpleXMLObject) unmarshallElement(filename); assertNotNull(sxo); assertNotNull(sxo.getSimpleXMLObjects().get(0)); assertNotNull(sxo.getSimpleXMLObjects().get(0).getEncryptedData()); EncryptedData encData = (EncryptedData) sxo.getSimpleXMLObjects().get(0)....
/** One recipients specified to resolver, three EncryptedKeys in instance, * two RetrievalMethod references. */
One recipients specified to resolver, three EncryptedKeys in instance
testMultiEKWithOneRecipient
{ "repo_name": "duck1123/java-xmltooling", "path": "src/test/java/org/opensaml/xml/encryption/SimpleRetrievalMethodEncryptedKeyResolverTest.java", "license": "apache-2.0", "size": 8664 }
[ "java.util.List", "org.opensaml.xml.mock.SimpleXMLObject" ]
import java.util.List; import org.opensaml.xml.mock.SimpleXMLObject;
import java.util.*; import org.opensaml.xml.mock.*;
[ "java.util", "org.opensaml.xml" ]
java.util; org.opensaml.xml;
367,787
public long insert(Question question){ return db.insert(TABLE_QUESTION, null, this.questionToContentValues(question)); }
long function(Question question){ return db.insert(TABLE_QUESTION, null, this.questionToContentValues(question)); }
/** * Insert Question into DB * @param question * @return line result */
Insert Question into DB
insert
{ "repo_name": "jeoff09/My_QCM_ANDROID", "path": "my_qcm/app/src/main/java/com/tactfactory/my_qcm/data/QuestionSQLiteAdapter.java", "license": "apache-2.0", "size": 9496 }
[ "com.tactfactory.my_qcm.entity.Question" ]
import com.tactfactory.my_qcm.entity.Question;
import com.tactfactory.my_qcm.entity.*;
[ "com.tactfactory.my_qcm" ]
com.tactfactory.my_qcm;
1,450,341
ProjectBuildingResult build( ModelSource modelSource, ProjectBuildingRequest request ) throws ProjectBuildingException;
ProjectBuildingResult build( ModelSource modelSource, ProjectBuildingRequest request ) throws ProjectBuildingException;
/** * Builds a project descriptor for the specified model source. * * @param modelSource The source of the model to built the project descriptor from, must not be {@code null}. * @param request The project building request that holds further parameters, must not be {@code null}. * @return The ...
Builds a project descriptor for the specified model source
build
{ "repo_name": "gems-uff/oceano", "path": "core/src/test/resources/maven-3-trunk/maven-core/src/main/java/org/apache/maven/project/ProjectBuilder.java", "license": "mit", "size": 4747 }
[ "org.apache.maven.model.building.ModelSource" ]
import org.apache.maven.model.building.ModelSource;
import org.apache.maven.model.building.*;
[ "org.apache.maven" ]
org.apache.maven;
700,153
public ConfigFunctionsManager getConfigFunctionsManager() { return configFunctionsManager; }
ConfigFunctionsManager function() { return configFunctionsManager; }
/** * Returns the Resource manager. * <p/> * <p> * @return The Resource manager. */
Returns the Resource manager.
getConfigFunctionsManager
{ "repo_name": "MCTCP/TerrainControl", "path": "common/src/main/java/com/khorn/terraincontrol/TerrainControlEngine.java", "license": "mit", "size": 11039 }
[ "com.khorn.terraincontrol.configuration.ConfigFunctionsManager" ]
import com.khorn.terraincontrol.configuration.ConfigFunctionsManager;
import com.khorn.terraincontrol.configuration.*;
[ "com.khorn.terraincontrol" ]
com.khorn.terraincontrol;
1,681,854
public void setCashFlow(CashFlow cashFlow) { this.cashFlow = cashFlow; }
void function(CashFlow cashFlow) { this.cashFlow = cashFlow; }
/** * Sets the cash flow. * * @param cashFlow the new cash flow */
Sets the cash flow
setCashFlow
{ "repo_name": "uaijug/chronos", "path": "src/main/java/br/com/uaijug/chronos/institution/cashFlow/controller/CashFlowController.java", "license": "gpl-3.0", "size": 10488 }
[ "br.com.uaijug.chronos.institution.cashFlow.model.CashFlow" ]
import br.com.uaijug.chronos.institution.cashFlow.model.CashFlow;
import br.com.uaijug.chronos.institution.*;
[ "br.com.uaijug" ]
br.com.uaijug;
1,691,452
int getStringWidth(String str) { if(str.equals(_section.getTextSectionView().getPaintText())) return getTotalStringWidth(); Rectangle2D rect = _fontInfo.getFontMetrics().getStringBounds( str,_section.getTextField().getGraphics()); return (int)rect.getWidth(); }
int getStringWidth(String str) { if(str.equals(_section.getTextSectionView().getPaintText())) return getTotalStringWidth(); Rectangle2D rect = _fontInfo.getFontMetrics().getStringBounds( str,_section.getTextField().getGraphics()); return (int)rect.getWidth(); }
/** * the width of the given string * * @param str the input-string * @return the width of the given string */
the width of the given string
getStringWidth
{ "repo_name": "script-solution/BBCodeEditor", "path": "bbcodeeditor/control/view/AbstractFont.java", "license": "gpl-2.0", "size": 8776 }
[ "java.awt.geom.Rectangle2D" ]
import java.awt.geom.Rectangle2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
478,133
public static Bitmap getBitmap(Context context, @DrawableRes int resId) { Drawable drawable = getDrawable(context, resId); BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable; return bitmapDrawable.getBitmap(); }
static Bitmap function(Context context, @DrawableRes int resId) { Drawable drawable = getDrawable(context, resId); BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable; return bitmapDrawable.getBitmap(); }
/** * Obtain the resource picture from the picture resource ID * * @param context context * @param resId resId * @return resource [Bitmap] */
Obtain the resource picture from the picture resource ID
getBitmap
{ "repo_name": "Jusenr/androidtools", "path": "toolslibrary/src/main/java/com/jusenr/toolslibrary/utils/ResourcesUtils.java", "license": "apache-2.0", "size": 5054 }
[ "android.content.Context", "android.graphics.Bitmap", "android.graphics.drawable.BitmapDrawable", "android.graphics.drawable.Drawable", "android.support.annotation.DrawableRes" ]
import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.support.annotation.DrawableRes;
import android.content.*; import android.graphics.*; import android.graphics.drawable.*; import android.support.annotation.*;
[ "android.content", "android.graphics", "android.support" ]
android.content; android.graphics; android.support;
1,627,581
public static MozuClient<com.mozu.api.contracts.adminuser.TenantAdminUserAuthTicket> refreshAuthTicketClient(com.mozu.api.contracts.adminuser.TenantAdminUserAuthTicket existingAuthTicket) throws Exception { return refreshAuthTicketClient( existingAuthTicket, null, null); }
static MozuClient<com.mozu.api.contracts.adminuser.TenantAdminUserAuthTicket> function(com.mozu.api.contracts.adminuser.TenantAdminUserAuthTicket existingAuthTicket) throws Exception { return refreshAuthTicketClient( existingAuthTicket, null, null); }
/** * Generates a new user authentication ticket for the specified tenant by supplying the user's existing refresh token information. * <p><pre><code> * MozuClient<com.mozu.api.contracts.adminuser.TenantAdminUserAuthTicket> mozuClient=RefreshAuthTicketClient( existingAuthTicket); * client.setBaseAddress(url...
Generates a new user authentication ticket for the specified tenant by supplying the user's existing refresh token information. <code><code> MozuClient mozuClient=RefreshAuthTicketClient( existingAuthTicket); client.setBaseAddress(url); client.executeRequest(); TenantAdminUserAuthTicket tenantAdminUserAuthTicket = clie...
refreshAuthTicketClient
{ "repo_name": "johngatti/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/platform/adminuser/TenantAdminUserAuthTicketClient.java", "license": "mit", "size": 7492 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
2,619,394
protected void createContents() { shlDecorationDemo = new Shell(); shlDecorationDemo.setSize(450, 300); shlDecorationDemo.setText("Decoration Demo"); shlDecorationDemo.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); text = new Text(shlDecorationDemo, SWT.BORDER); ControlDecoratio...
void function() { shlDecorationDemo = new Shell(); shlDecorationDemo.setSize(450, 300); shlDecorationDemo.setText(STR); shlDecorationDemo.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); text = new Text(shlDecorationDemo, SWT.BORDER); ControlDecoration controlDecoration = new ControlDecoration(text, SWT.LEFT SWT.TOP...
/** * Create contents of the window. */
Create contents of the window
createContents
{ "repo_name": "antalpeti/JFace-Tutorial", "path": "src/org/o7planning/tutorial/jface/decoration/DecorationDemo.java", "license": "mit", "size": 1809 }
[ "org.eclipse.jface.fieldassist.ControlDecoration", "org.eclipse.jface.fieldassist.FieldDecorationRegistry", "org.eclipse.swt.graphics.Image", "org.eclipse.swt.widgets.Shell", "org.eclipse.swt.widgets.Text" ]
import org.eclipse.jface.fieldassist.ControlDecoration; import org.eclipse.jface.fieldassist.FieldDecorationRegistry; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text;
import org.eclipse.jface.fieldassist.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.jface", "org.eclipse.swt" ]
org.eclipse.jface; org.eclipse.swt;
390,221
public Hashtable<Coords, Vector<Entity>> getPositionMap() { Hashtable<Coords, Vector<Entity>> positionMap = new Hashtable<Coords, Vector<Entity>>(); Vector<Entity> atPos = null; // Walk through the entities in this game. for (Entity entity : entities) { // Get the vector...
Hashtable<Coords, Vector<Entity>> function() { Hashtable<Coords, Vector<Entity>> positionMap = new Hashtable<Coords, Vector<Entity>>(); Vector<Entity> atPos = null; for (Entity entity : entities) { final Coords coords = entity.getPosition(); if (coords != null) { atPos = positionMap.get(coords); if (atPos == null) { at...
/** * Returns a <code>Hashtable</code> that maps the <code>Coords</code> of * each unit in this <code>Game</code> to a <code>Vector</code> of * <code>Entity</code>s at that positions. Units that have no position (e.g. * loaded units) will not be in the map. * * @return a <code>Hashtable</c...
Returns a <code>Hashtable</code> that maps the <code>Coords</code> of each unit in this <code>Game</code> to a <code>Vector</code> of <code>Entity</code>s at that positions. Units that have no position (e.g. loaded units) will not be in the map
getPositionMap
{ "repo_name": "chvink/kilomek", "path": "megamek/src/megamek/common/Game.java", "license": "gpl-3.0", "size": 117578 }
[ "java.util.Hashtable", "java.util.Vector" ]
import java.util.Hashtable; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,733,705
public void verify_ejbPassivate() throws RemoteException;
void function() throws RemoteException;
/** * Verifies that ejbPassivate was called on the instance with the * proper transaction context. */
Verifies that ejbPassivate was called on the instance with the proper transaction context
verify_ejbPassivate
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB1XSFRemoteSpecEJB.jar/src/com/ibm/ejb1x/base/spec/sfr/ejb/SFRa.java", "license": "epl-1.0", "size": 9106 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
2,808,685
public void waitWhileEmptyText(WebElement element, WebDriver webDriver, long timeOutInSeconds) { WebDriverWait webDriverWait = new WebDriverWait(webDriver, timeOutInSeconds, calcSleepTimeMillis(timeOutInSeconds)); webDriverWait.until(ExpectedConditions.not(ExpectedConditions.textToBePresentInElement(element, "")...
void function(WebElement element, WebDriver webDriver, long timeOutInSeconds) { WebDriverWait webDriverWait = new WebDriverWait(webDriver, timeOutInSeconds, calcSleepTimeMillis(timeOutInSeconds)); webDriverWait.until(ExpectedConditions.not(ExpectedConditions.textToBePresentInElement(element, ""))); }
/** * Waits until the selected element contains some non-empty text (warning: this method may not work as expected) * @param element * @param webDriver * @param timeOutInSeconds * @see #waitUntilAttributeNotEmpty */
Waits until the selected element contains some non-empty text (warning: this method may not work as expected)
waitWhileEmptyText
{ "repo_name": "xtianus/yadaframework", "path": "YadaWeb/src/main/java/net/yadaframework/selenium/YadaSeleniumUtil.java", "license": "mit", "size": 29078 }
[ "org.openqa.selenium.WebDriver", "org.openqa.selenium.WebElement", "org.openqa.selenium.support.ui.ExpectedConditions", "org.openqa.selenium.support.ui.WebDriverWait" ]
import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.*; import org.openqa.selenium.support.ui.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
130,566
default Optional<ServerTextChannel> getTextChannelById(long id) { return getChannelById(id) .filter(channel -> channel instanceof ServerTextChannel) .map(channel -> (ServerTextChannel) channel); }
default Optional<ServerTextChannel> getTextChannelById(long id) { return getChannelById(id) .filter(channel -> channel instanceof ServerTextChannel) .map(channel -> (ServerTextChannel) channel); }
/** * Gets a text channel by its id. * * @param id The id of the text channel. * @return The text channel with the given id. */
Gets a text channel by its id
getTextChannelById
{ "repo_name": "BtoBastian/Javacord", "path": "javacord-api/src/main/java/org/javacord/api/entity/server/Server.java", "license": "lgpl-3.0", "size": 103692 }
[ "java.util.Optional", "org.javacord.api.entity.channel.ServerTextChannel" ]
import java.util.Optional; import org.javacord.api.entity.channel.ServerTextChannel;
import java.util.*; import org.javacord.api.entity.channel.*;
[ "java.util", "org.javacord.api" ]
java.util; org.javacord.api;
1,044,746
public void setChannelPosition(Block b, BlockWriteStreams stream, long dataOffset, long ckOffset) throws IOException;
void function(Block b, BlockWriteStreams stream, long dataOffset, long ckOffset) throws IOException;
/** * Sets the file pointer of the data stream and checksum stream to * the specified values. * @param b * @param stream The stream for the data file and checksum file * @param dataOffset The position to which the file pointre for the data stream * should be set * @param ckOffset The positio...
Sets the file pointer of the data stream and checksum stream to the specified values
setChannelPosition
{ "repo_name": "simplegeo/hadoop", "path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDatasetInterface.java", "license": "apache-2.0", "size": 9446 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.Block" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.Block;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,085,909
public String getInputValue(ShaderProgramInVariable shaderProgramInVariable) throws ExportingExeption;
String function(ShaderProgramInVariable shaderProgramInVariable) throws ExportingExeption;
/** * Gets the value of an input variable. * which can be a regular value, or a link to a different variable * @param shaderProgramInVariable requested variable * @return String representing the value of the given variable */
Gets the value of an input variable. which can be a regular value, or a link to a different variable
getInputValue
{ "repo_name": "mbien/netbeans-opengl-pack", "path": "RapidShadingPrototype/src/net/java/nboglpack/visualdesigner/shader/exporter/ShaderCodeExporter.java", "license": "bsd-3-clause", "size": 1967 }
[ "net.java.nboglpack.visualdesigner.ShaderProgramInVariable" ]
import net.java.nboglpack.visualdesigner.ShaderProgramInVariable;
import net.java.nboglpack.visualdesigner.*;
[ "net.java.nboglpack" ]
net.java.nboglpack;
2,234,687
private void inspect(PdfReader pdfReader, PdfStamper pdfStamper) { // Get the fields from the reader (read-only!!!) AcroFields form = pdfReader.getAcroFields(); // Loop over the fields and get info about them Set<String> fields = form.getFields().keySet(); for (String fiel...
void function(PdfReader pdfReader, PdfStamper pdfStamper) { AcroFields form = pdfReader.getAcroFields(); Set<String> fields = form.getFields().keySet(); for (String field : fields) { switch (form.getFieldType(field)) { case AcroFields.FIELD_TYPE_CHECKBOX: LOG.debug("[" + field + STR); break; case AcroFields.FIELD_TYPE_...
/** * Inspect PDF, find input / editable fields in the interactive form * * @param pdfReader * @param pdfStamper */
Inspect PDF, find input / editable fields in the interactive form
inspect
{ "repo_name": "TerrenceMiao/camel-spring", "path": "src/main/java/org/paradise/controllers/PdfController.java", "license": "gpl-3.0", "size": 17086 }
[ "com.lowagie.text.pdf.AcroFields", "com.lowagie.text.pdf.PdfReader", "com.lowagie.text.pdf.PdfStamper", "java.util.Set" ]
import com.lowagie.text.pdf.AcroFields; import com.lowagie.text.pdf.PdfReader; import com.lowagie.text.pdf.PdfStamper; import java.util.Set;
import com.lowagie.text.pdf.*; import java.util.*;
[ "com.lowagie.text", "java.util" ]
com.lowagie.text; java.util;
2,831,740
public OneResponse info() { OneResponse response = info(client, id); super.processInfo(response); return response; }
OneResponse function() { OneResponse response = info(client, id); super.processInfo(response); return response; }
/** * Loads the xml representation of the group. * The info is also stored internally. * * @see Group#info(Client, int) */
Loads the xml representation of the group. The info is also stored internally
info
{ "repo_name": "fasrc/one", "path": "src/oca/java/src/org/opennebula/client/group/Group.java", "license": "apache-2.0", "size": 7923 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
2,566,607
@GET public String getUsersByUserGroup(@Context ServletConfig sc, @Context HttpServletRequest httpServletRequest, @QueryParam("group") Long cgId, @QueryParam("user") Long userId, @QueryParam("label") String groupName) { String xmlUsers = ""; try { if (groupName != null) { CredentialGroup crGroup = gr...
String function(@Context ServletConfig sc, @Context HttpServletRequest httpServletRequest, @QueryParam("group") Long cgId, @QueryParam("user") Long userId, @QueryParam("label") String groupName) { String xmlUsers = STRSTR\n\n" + javaUtils.getCompleteStackTrace(ex)); throw new RestWebApplicationException(Status.INTERNAL...
/** * Get users by usergroup or if there's no group id give he list of user group. * <br> * GET /rest/api/usersgroups * * @param sc * @param httpServletRequest * @param cgId group id * @param userId * @param groupName * @return Without group id <groups> <group id={groupid}> <label>{gr...
Get users by usergroup or if there's no group id give he list of user group. GET /rest/api/usersgroups
getUsersByUserGroup
{ "repo_name": "nobry/karuta-backend", "path": "karuta-webapp/src/main/java/eportfolium/com/karuta/webapp/rest/resource/CredentialGroupResource.java", "license": "apache-2.0", "size": 6450 }
[ "javax.servlet.ServletConfig", "javax.servlet.http.HttpServletRequest", "javax.ws.rs.QueryParam", "javax.ws.rs.core.Context", "javax.ws.rs.core.Response" ]
import javax.servlet.ServletConfig; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response;
import javax.servlet.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "javax.servlet", "javax.ws" ]
javax.servlet; javax.ws;
2,152,124
public static boolean isApplicationGroupCombinationExist(String subscriber, String applicationName, String groupId) throws APIManagementException { return ApiMgtDAO.getInstance().isApplicationGroupCombinationExists(applicationName, subscriber, groupId); }
static boolean function(String subscriber, String applicationName, String groupId) throws APIManagementException { return ApiMgtDAO.getInstance().isApplicationGroupCombinationExists(applicationName, subscriber, groupId); }
/** * Check whether given application , group combination exists * * @param subscriber subscriber name * @param applicationName application name * @param groupId group of the subscriber * @return true if application group combination exist * @throws APIManagementException...
Check whether given application , group combination exists
isApplicationGroupCombinationExist
{ "repo_name": "ruks/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java", "license": "apache-2.0", "size": 564037 }
[ "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO" ]
import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO;
import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.dao.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
889,362
@Test public void testGetSLDName() { MapBoxFileHandler handler = new MapBoxFileHandler(); assertTrue(handler.getSLDName(null).compareTo("") == 0); SLDData sldData = new SLDData(new StyleWrapper("workspace", "layer.sld"), "sldContents"); String sldName = handler.getSLDName(sldDa...
void function() { MapBoxFileHandler handler = new MapBoxFileHandler(); assertTrue(handler.getSLDName(null).compareTo(STRworkspaceSTRlayer.sldSTRsldContentsSTRlayer.json") == 0); }
/** * Test method for {@link * com.sldeditor.extension.filesystem.file.mapbox.MapBoxFileHandler#getSLDName(com.sldeditor.common.SLDDataInterface)}. */
Test method for <code>com.sldeditor.extension.filesystem.file.mapbox.MapBoxFileHandler#getSLDName(com.sldeditor.common.SLDDataInterface)</code>
testGetSLDName
{ "repo_name": "robward-scisys/sldeditor", "path": "modules/application/src/test/java/com/sldeditor/test/unit/extension/filesystem/file/mapbox/MapBoxFileHandlerTest.java", "license": "gpl-3.0", "size": 5855 }
[ "com.sldeditor.extension.filesystem.file.mapbox.MapBoxFileHandler", "org.junit.jupiter.api.Assertions" ]
import com.sldeditor.extension.filesystem.file.mapbox.MapBoxFileHandler; import org.junit.jupiter.api.Assertions;
import com.sldeditor.extension.filesystem.file.mapbox.*; import org.junit.jupiter.api.*;
[ "com.sldeditor.extension", "org.junit.jupiter" ]
com.sldeditor.extension; org.junit.jupiter;
1,065,728
public void testDeletion() throws Exception { // Delete does nothing if not persisted assertEquals(0, service.listSchedules().size()); ScheduledPersistedAction schedule1 = service.createSchedule(testAction); assertEquals(0, service.listSchedules().size()); service.deleteSchedule(sc...
void function() throws Exception { assertEquals(0, service.listSchedules().size()); ScheduledPersistedAction schedule1 = service.createSchedule(testAction); assertEquals(0, service.listSchedules().size()); service.deleteSchedule(schedule1); assertEquals(0, service.listSchedules().size()); ScheduledPersistedAction sched...
/** * Ensures that deletion works correctly */
Ensures that deletion works correctly
testDeletion
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/test-java/org/alfresco/repo/action/scheduled/ScheduledPersistedActionServiceTest.java", "license": "lgpl-3.0", "size": 52265 }
[ "javax.transaction.UserTransaction", "org.alfresco.service.cmr.action.scheduled.ScheduledPersistedAction", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.namespace.RegexQNamePattern" ]
import javax.transaction.UserTransaction; import org.alfresco.service.cmr.action.scheduled.ScheduledPersistedAction; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.RegexQNamePattern;
import javax.transaction.*; import org.alfresco.service.cmr.action.scheduled.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*;
[ "javax.transaction", "org.alfresco.service" ]
javax.transaction; org.alfresco.service;
2,770,231
public static CMSSignedData replaceSigners( CMSSignedData signedData, SignerInformationStore signerInformationStore) { // // copy // CMSSignedData cms = new CMSSignedData(signedData); // // replace the store // cms.signerInfoStore = signerInformationStore; // // replace the signers in th...
static CMSSignedData function( CMSSignedData signedData, SignerInformationStore signerInformationStore) { ASN1EncodableVector vec = new ASN1EncodableVector(); Iterator it = signerInformationStore.getSigners().iterator(); while(it.hasNext()) { SignerInformation signer = (SignerInformation) it.next(); digestAlgs.add(CMSS...
/** * Replace the signerinformation store associated with this * CMSSignedData object with the new one passed in. You would * probably only want to do this if you wanted to change the unsigned * attributes associated with a signer, or perhaps delete one. * * @param signedData the signed data obj...
Replace the signerinformation store associated with this CMSSignedData object with the new one passed in. You would probably only want to do this if you wanted to change the unsigned attributes associated with a signer, or perhaps delete one
replaceSigners
{ "repo_name": "SafetyCulture/DroidText", "path": "app/src/main/java/bouncycastle/repack/org/bouncycastle/cms/CMSSignedData.java", "license": "lgpl-3.0", "size": 19829 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,193,455
YangDataTypes getYangType();
YangDataTypes getYangType();
/** * Returns the YANG built in type. * * @return the YANG built in type */
Returns the YANG built in type
getYangType
{ "repo_name": "Phaneendra-Huawei/demo", "path": "utils/yangutils/src/main/java/org/onosproject/yangutils/utils/builtindatatype/YangBuiltInDataTypeInfo.java", "license": "apache-2.0", "size": 1084 }
[ "org.onosproject.yangutils.datamodel.YangDataTypes" ]
import org.onosproject.yangutils.datamodel.YangDataTypes;
import org.onosproject.yangutils.datamodel.*;
[ "org.onosproject.yangutils" ]
org.onosproject.yangutils;
1,653,216
@Benchmark public void singleBucketIntoSingleImmutableBimorphicInvocation(Blackhole bh) { try (LongKeyedBucketOrds ords = LongKeyedBucketOrds.build(bigArrays, CardinalityUpperBound.ONE)) { for (long i = 0; i < LIMIT; i++) { ords.add(0, i % DISTINCT_VALUES); } ...
void function(Blackhole bh) { try (LongKeyedBucketOrds ords = LongKeyedBucketOrds.build(bigArrays, CardinalityUpperBound.ONE)) { for (long i = 0; i < LIMIT; i++) { ords.add(0, i % DISTINCT_VALUES); } bh.consume(ords); } }
/** * Emulates the way that most aggregations use {@link LongKeyedBucketOrds}. */
Emulates the way that most aggregations use <code>LongKeyedBucketOrds</code>
singleBucketIntoSingleImmutableBimorphicInvocation
{ "repo_name": "nknize/elasticsearch", "path": "benchmarks/src/main/java/org/elasticsearch/benchmark/search/aggregations/bucket/terms/LongKeyedBucketOrdsBenchmark.java", "license": "apache-2.0", "size": 6597 }
[ "org.elasticsearch.search.aggregations.CardinalityUpperBound", "org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds", "org.openjdk.jmh.infra.Blackhole" ]
import org.elasticsearch.search.aggregations.CardinalityUpperBound; import org.elasticsearch.search.aggregations.bucket.terms.LongKeyedBucketOrds; import org.openjdk.jmh.infra.Blackhole;
import org.elasticsearch.search.aggregations.*; import org.elasticsearch.search.aggregations.bucket.terms.*; import org.openjdk.jmh.infra.*;
[ "org.elasticsearch.search", "org.openjdk.jmh" ]
org.elasticsearch.search; org.openjdk.jmh;
2,866,359
private int readChunkHeader (ResChunk_Header nextChunkHeader, byte[] data, int offset) throws IOException { nextChunkHeader.type = readUInt16(data, offset); offset += 2; nextChunkHeader.headerSize = readUInt16(data, offset); offset += 2; nextChunkHeader.size = readUInt32(data, offset); offse...
int function (ResChunk_Header nextChunkHeader, byte[] data, int offset) throws IOException { nextChunkHeader.type = readUInt16(data, offset); offset += 2; nextChunkHeader.headerSize = readUInt16(data, offset); offset += 2; nextChunkHeader.size = readUInt32(data, offset); offset += 4; return offset; }
/** * Reads a chunk header from the input stream and stores the data in the * given object. * @param nextChunkHeader The data object in which to put the chunk header * @param data The data array containing the structure * @param offset The offset from which to start reading * @throws IOException Thrown if a...
Reads a chunk header from the input stream and stores the data in the given object
readChunkHeader
{ "repo_name": "kaunder/soot-infoflow-android", "path": "src/soot/jimple/infoflow/android/resources/ARSCFileParser.java", "license": "lgpl-2.1", "size": 48792 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,972,403
private boolean isSpuriousRouteEvent(final ProvenanceEventRecord event, final Map<FlowFileRecord, StandardRepositoryRecord> records) { if (event.getEventType() == ProvenanceEventType.ROUTE) { final String relationshipName = event.getRelationship(); final Relationship relationship = n...
boolean function(final ProvenanceEventRecord event, final Map<FlowFileRecord, StandardRepositoryRecord> records) { if (event.getEventType() == ProvenanceEventType.ROUTE) { final String relationshipName = event.getRelationship(); final Relationship relationship = new Relationship.Builder().name(relationshipName).build()...
/** * Checks if the given event is a spurious ROUTE, meaning that the ROUTE * indicates that a FlowFile was routed to a relationship with only 1 * connection and that Connection is the Connection from which the FlowFile * was pulled. I.e., the FlowFile was really routed nowhere. * * @param...
Checks if the given event is a spurious ROUTE, meaning that the ROUTE indicates that a FlowFile was routed to a relationship with only 1 connection and that Connection is the Connection from which the FlowFile was pulled. I.e., the FlowFile was really routed nowhere
isSpuriousRouteEvent
{ "repo_name": "jjmeyer0/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/repository/StandardProcessSession.java", "license": "apache-2.0", "size": 154453 }
[ "java.util.Collection", "java.util.Map", "java.util.UUID", "org.apache.nifi.connectable.Connection", "org.apache.nifi.flowfile.attributes.CoreAttributes", "org.apache.nifi.processor.Relationship", "org.apache.nifi.provenance.ProvenanceEventRecord", "org.apache.nifi.provenance.ProvenanceEventType" ]
import java.util.Collection; import java.util.Map; import java.util.UUID; import org.apache.nifi.connectable.Connection; import org.apache.nifi.flowfile.attributes.CoreAttributes; import org.apache.nifi.processor.Relationship; import org.apache.nifi.provenance.ProvenanceEventRecord; import org.apache.nifi.provenance.Pr...
import java.util.*; import org.apache.nifi.connectable.*; import org.apache.nifi.flowfile.attributes.*; import org.apache.nifi.processor.*; import org.apache.nifi.provenance.*;
[ "java.util", "org.apache.nifi" ]
java.util; org.apache.nifi;
995,328
EClass getExclusionPredicate();
EClass getExclusionPredicate();
/** * Returns the meta object for class '{@link org.eclipse.oomph.workingsets.ExclusionPredicate <em>Exclusion Predicate</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Exclusion Predicate</em>'. * @see org.eclipse.oomph.workingsets.ExclusionPredicate ...
Returns the meta object for class '<code>org.eclipse.oomph.workingsets.ExclusionPredicate Exclusion Predicate</code>'.
getExclusionPredicate
{ "repo_name": "peterkir/org.eclipse.oomph", "path": "plugins/org.eclipse.oomph.workingsets/src/org/eclipse/oomph/workingsets/WorkingSetsPackage.java", "license": "epl-1.0", "size": 20571 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,768,804
@InitBinder public void initBinder(WebDataBinder binder) { binder.registerCustomEditor(FlowEncapsulationType.class, new CaseInsensitiveEnumEditor(FlowEncapsulationType.class)); binder.registerCustomEditor(PathComputationStrategy.class, new CaseInsensitiveEnumEdito...
void function(WebDataBinder binder) { binder.registerCustomEditor(FlowEncapsulationType.class, new CaseInsensitiveEnumEditor(FlowEncapsulationType.class)); binder.registerCustomEditor(PathComputationStrategy.class, new CaseInsensitiveEnumEditor(PathComputationStrategy.class)); }
/** * This method adds custom Editor to parse Enums from string ignoring case. */
This method adds custom Editor to parse Enums from string ignoring case
initBinder
{ "repo_name": "jonvestal/open-kilda", "path": "src-java/northbound-service/northbound/src/main/java/org/openkilda/northbound/controller/v1/NetworkController.java", "license": "apache-2.0", "size": 3607 }
[ "org.openkilda.model.FlowEncapsulationType", "org.openkilda.model.PathComputationStrategy", "org.openkilda.northbound.editor.CaseInsensitiveEnumEditor", "org.springframework.web.bind.WebDataBinder" ]
import org.openkilda.model.FlowEncapsulationType; import org.openkilda.model.PathComputationStrategy; import org.openkilda.northbound.editor.CaseInsensitiveEnumEditor; import org.springframework.web.bind.WebDataBinder;
import org.openkilda.model.*; import org.openkilda.northbound.editor.*; import org.springframework.web.bind.*;
[ "org.openkilda.model", "org.openkilda.northbound", "org.springframework.web" ]
org.openkilda.model; org.openkilda.northbound; org.springframework.web;
278,040
private Operator findNonFilterPredecessor(Operator current) { Operator op = current; do { List<Operator> predecessors = currentPlan.getPredecessors( op ); // if there are no predecessors return false if( predecessors == null || predecessor...
Operator function(Operator current) { Operator op = current; do { List<Operator> predecessors = currentPlan.getPredecessors( op ); if( predecessors == null predecessors.size() == 0 ) { return null; } Operator pred = predecessors.get( 0 ); if( pred instanceof LOFilter ) { op = pred; continue; } else { return pred; } } w...
/** * Starting from current operator (which is a filter), search its successors until * locating a non-filter operator. Null is returned if none is found. */
Starting from current operator (which is a filter), search its successors until locating a non-filter operator. Null is returned if none is found
findNonFilterPredecessor
{ "repo_name": "dmeister/pig-cll-gz", "path": "src/org/apache/pig/newplan/logical/rules/PushUpFilter.java", "license": "apache-2.0", "size": 16704 }
[ "java.util.List", "org.apache.pig.newplan.Operator", "org.apache.pig.newplan.logical.relational.LOFilter" ]
import java.util.List; import org.apache.pig.newplan.Operator; import org.apache.pig.newplan.logical.relational.LOFilter;
import java.util.*; import org.apache.pig.newplan.*; import org.apache.pig.newplan.logical.relational.*;
[ "java.util", "org.apache.pig" ]
java.util; org.apache.pig;
493,021
@VisibleForTesting static boolean canHandleCondition(final RexNode condition, final RelDataType leftRowType) { return analyzeCondition(condition, leftRowType).isPresent(); }
static boolean canHandleCondition(final RexNode condition, final RelDataType leftRowType) { return analyzeCondition(condition, leftRowType).isPresent(); }
/** * Returns whether {@link #analyzeCondition} would return something. */
Returns whether <code>#analyzeCondition</code> would return something
canHandleCondition
{ "repo_name": "jon-wei/druid", "path": "sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidJoinRule.java", "license": "apache-2.0", "size": 15382 }
[ "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rex.RexNode" ]
import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rex.RexNode;
import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*;
[ "org.apache.calcite" ]
org.apache.calcite;
345,917
public SSLSocketFactory getSSLSocketFactory (InputStream keyStore, String password) throws MqttSecurityException { try{ SSLContext ctx = null; SSLSocketFactory sslSockFactory=null; KeyStore ts; ts = KeyStore.getInstance("BKS"); ts.load(keyStore, password.toCharArray()); TrustManagerFactory tmf...
SSLSocketFactory function (InputStream keyStore, String password) throws MqttSecurityException { try{ SSLContext ctx = null; SSLSocketFactory sslSockFactory=null; KeyStore ts; ts = KeyStore.getInstance("BKS"); ts.load(keyStore, password.toCharArray()); TrustManagerFactory tmf = TrustManagerFactory.getInstance("X509"); ...
/** * Get the SSLSocketFactory using SSL key store and password * <p> * A convenience method, which will help user to create a SSLSocketFactory * object * </p> * * @param keyStore * the SSL key store which is generated by some SSL key tool, * such as keytool in Java JDK * @par...
Get the SSLSocketFactory using SSL key store and password A convenience method, which will help user to create a SSLSocketFactory object
getSSLSocketFactory
{ "repo_name": "jacarrichan/org.eclipse.paho.mqtt.java", "path": "org.eclipse.paho.android.service/org.eclipse.paho.android.service/src/org/eclipse/paho/android/service/MqttAndroidClient.java", "license": "epl-1.0", "size": 56684 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.io.InputStream", "java.security.KeyManagementException", "java.security.KeyStore", "java.security.KeyStoreException", "java.security.NoSuchAlgorithmException", "java.security.cert.CertificateException", "javax.net.ssl.SSLContext", "java...
import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.security.KeyManagementException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; import javax.ne...
import java.io.*; import java.security.*; import java.security.cert.*; import javax.net.ssl.*; import org.eclipse.paho.client.mqttv3.*;
[ "java.io", "java.security", "javax.net", "org.eclipse.paho" ]
java.io; java.security; javax.net; org.eclipse.paho;
1,663,115
public SortedSet<OWLIndividual> getIndividuals(OWLClassExpression description);
SortedSet<OWLIndividual> function(OWLClassExpression description);
/** * Gets all instances of a given class OWLClassExpression in the knowledge base. * @param OWLClassExpression An OWL class description. * @return All instances of the class description. */
Gets all instances of a given class OWLClassExpression in the knowledge base
getIndividuals
{ "repo_name": "MaRoe/DL-Learner", "path": "components-core/src/main/java/org/dllearner/core/IndividualReasoner.java", "license": "gpl-3.0", "size": 9271 }
[ "java.util.SortedSet", "org.semanticweb.owlapi.model.OWLClassExpression", "org.semanticweb.owlapi.model.OWLIndividual" ]
import java.util.SortedSet; import org.semanticweb.owlapi.model.OWLClassExpression; import org.semanticweb.owlapi.model.OWLIndividual;
import java.util.*; import org.semanticweb.owlapi.model.*;
[ "java.util", "org.semanticweb.owlapi" ]
java.util; org.semanticweb.owlapi;
1,148,012
public static String formatSize(long size) { if (size < 1024) { return size + " bytes"; } double sz = size; String units; double nsz; String format = "0"; if (size >= GIGABYTE) { nsz = sz/GIGABYTE; units = "GB"; format = "0.0"; } else if (size >= MEGABYTE) { nsz = sz/MEGAB...
static String function(long size) { if (size < 1024) { return size + STR; } double sz = size; String units; double nsz; String format = "0"; if (size >= GIGABYTE) { nsz = sz/GIGABYTE; units = "GB"; format = "0.0"; } else if (size >= MEGABYTE) { nsz = sz/MEGABYTE; units = "MB"; format = "0.0"; } else { nsz = sz/KILOBYTE...
/** * Formats a file size as a human-readable string. * @param size * @return human-readable file size */
Formats a file size as a human-readable string
formatSize
{ "repo_name": "gitblit/moxie", "path": "maxml/src/main/java/org/moxie/utils/FileUtils.java", "license": "apache-2.0", "size": 10831 }
[ "java.text.DecimalFormat" ]
import java.text.DecimalFormat;
import java.text.*;
[ "java.text" ]
java.text;
410,200
public static String[] parsePoint(String[] out, String externalVal, int dimension) throws InvalidShapeException { //TODO: Should we support sparse vectors? if (out == null || out.length != dimension) out = new String[dimension]; int idx = externalVal.indexOf(','); int end = idx; int start = 0; ...
static String[] function(String[] out, String externalVal, int dimension) throws InvalidShapeException { if (out == null out.length != dimension) out = new String[dimension]; int idx = externalVal.indexOf(','); int end = idx; int start = 0; int i = 0; if (idx == -1 && dimension == 1 && externalVal.length() > 0) { out[0...
/** * Given a string containing <i>dimension</i> values encoded in it, separated by commas, return a String array of length <i>dimension</i> * containing the values. * * @param out A preallocated array. Must be size dimension. If it is not it will be resized. * @param externalVal The value to p...
Given a string containing dimension values encoded in it, separated by commas, return a String array of length dimension containing the values
parsePoint
{ "repo_name": "spatial4j/spatial4j", "path": "src/main/java/org/locationtech/spatial4j/io/ParseUtils.java", "license": "apache-2.0", "size": 6931 }
[ "org.locationtech.spatial4j.exception.InvalidShapeException" ]
import org.locationtech.spatial4j.exception.InvalidShapeException;
import org.locationtech.spatial4j.exception.*;
[ "org.locationtech.spatial4j" ]
org.locationtech.spatial4j;
1,781,948
public final SecondaryDatabase getShipmentByPartDatabase() { return shipmentByPartDb; }
final SecondaryDatabase function() { return shipmentByPartDb; }
/** * Return the shipment-by-part index. */
Return the shipment-by-part index
getShipmentByPartDatabase
{ "repo_name": "mollstam/UnrealPy", "path": "UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/db-4.7.25.0/examples_java/src/collections/ship/sentity/SampleDatabase.java", "license": "mit", "size": 11790 }
[ "com.sleepycat.db.SecondaryDatabase" ]
import com.sleepycat.db.SecondaryDatabase;
import com.sleepycat.db.*;
[ "com.sleepycat.db" ]
com.sleepycat.db;
1,396,101
protected void verifySessionIsValid () { if (shouldTerminateSession()) { HttpSession httpSession = _servletRequest.getSession(false); if (httpSession != null) { AWSession awsession = AWSession.session(httpSession); if (awsession != null) { ...
void function () { if (shouldTerminateSession()) { HttpSession httpSession = _servletRequest.getSession(false); if (httpSession != null) { AWSession awsession = AWSession.session(httpSession); if (awsession != null) { awsession.terminate(); } Log.aribaweb.debug(STR, httpSession.getId()); httpSession.invalidate(); } } }
/** * If the request does not have a request handler key or if it does not have the * sessionRendevous key or return from authentication key (awsso_ar), then the * existing session should be invalidated and a new session should be established. */
If the request does not have a request handler key or if it does not have the sessionRendevous key or return from authentication key (awsso_ar), then the existing session should be invalidated and a new session should be established
verifySessionIsValid
{ "repo_name": "google-code/aribaweb", "path": "src/aribaweb/ariba/ui/servletadaptor/AWServletRequest.java", "license": "apache-2.0", "size": 11555 }
[ "javax.servlet.http.HttpSession" ]
import javax.servlet.http.HttpSession;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,777,660
public static Bound<String> withoutSharding() { return new Bound<>(DEFAULT_TEXT_CODER).withoutSharding(); } /** * Returns a transform for writing to text files that uses the given * {@link Coder} to encode each of the elements of the input * {@link PCollection} into an output text line...
static Bound<String> function() { return new Bound<>(DEFAULT_TEXT_CODER).withoutSharding(); } /** * Returns a transform for writing to text files that uses the given * {@link Coder} to encode each of the elements of the input * {@link PCollection} into an output text line. * * <p>By default, uses {@link StringUtf8Coder...
/** * Returns a transform for writing to text files that forces a single file as * output. */
Returns a transform for writing to text files that forces a single file as output
withoutSharding
{ "repo_name": "joshualitt/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/io/TextIO.java", "license": "apache-2.0", "size": 39081 }
[ "com.google.cloud.dataflow.sdk.coders.Coder", "com.google.cloud.dataflow.sdk.coders.StringUtf8Coder", "com.google.cloud.dataflow.sdk.values.PCollection" ]
import com.google.cloud.dataflow.sdk.coders.Coder; import com.google.cloud.dataflow.sdk.coders.StringUtf8Coder; import com.google.cloud.dataflow.sdk.values.PCollection;
import com.google.cloud.dataflow.sdk.coders.*; import com.google.cloud.dataflow.sdk.values.*;
[ "com.google.cloud" ]
com.google.cloud;
813,198
ResultSet getDataTypeInfo() throws DataSourceException;
ResultSet getDataTypeInfo() throws DataSourceException;
/** * Retrieves the data types associated with this host. */
Retrieves the data types associated with this host
getDataTypeInfo
{ "repo_name": "Black-millenium/rdb-executequery", "path": "java/src/org/executequery/databaseobjects/DatabaseHost.java", "license": "gpl-3.0", "size": 7767 }
[ "java.sql.ResultSet", "org.underworldlabs.jdbc.DataSourceException" ]
import java.sql.ResultSet; import org.underworldlabs.jdbc.DataSourceException;
import java.sql.*; import org.underworldlabs.jdbc.*;
[ "java.sql", "org.underworldlabs.jdbc" ]
java.sql; org.underworldlabs.jdbc;
532,411
public Future<Object> asyncGet(final String key) { return asyncGet(key, transcoder); }
Future<Object> function(final String key) { return asyncGet(key, transcoder); }
/** * Get the given key asynchronously and decode with the default * transcoder. * * @param key the key to fetch * @return a future that will hold the return value of the fetch * @throws IllegalStateException in the rare circumstance where queue * is too full to accept any more requests */
Get the given key asynchronously and decode with the default transcoder
asyncGet
{ "repo_name": "ciaranj/java-memcached-client", "path": "src/main/java/net/spy/memcached/MemcachedClient.java", "license": "mit", "size": 51549 }
[ "java.util.concurrent.Future" ]
import java.util.concurrent.Future;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,073,229
private Set<Long> getRecords() { Set<Long> longs = Sets.newHashSet(); for (long i = 0; i < TestData.getScaleCount(); i++) { longs.add(i); } return longs; }
Set<Long> function() { Set<Long> longs = Sets.newHashSet(); for (long i = 0; i < TestData.getScaleCount(); i++) { longs.add(i); } return longs; }
/** * Return a random list of longs * * @return the longs */
Return a random list of longs
getRecords
{ "repo_name": "savanibharat/concourse", "path": "concourse-integration-tests/src/test/java/org/cinchapi/concourse/CompoundOperationTest.java", "license": "apache-2.0", "size": 16196 }
[ "com.google.common.collect.Sets", "java.util.Set", "org.cinchapi.concourse.util.TestData" ]
import com.google.common.collect.Sets; import java.util.Set; import org.cinchapi.concourse.util.TestData;
import com.google.common.collect.*; import java.util.*; import org.cinchapi.concourse.util.*;
[ "com.google.common", "java.util", "org.cinchapi.concourse" ]
com.google.common; java.util; org.cinchapi.concourse;
383,015
public static byte[] md5(InputStream data) throws IOException { return digest(getMd5Digest(), data); }
static byte[] function(InputStream data) throws IOException { return digest(getMd5Digest(), data); }
/** * Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>. * * @param data * Data to digest * @return MD5 digest * @throws IOException * On error reading from the stream * @since 1.4 */
Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>
md5
{ "repo_name": "hank-cp/laxture_lib_android", "path": "src/main/java/com/laxture/lib/util/DigestUtils.java", "license": "apache-2.0", "size": 6545 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
771,643
public Iterator findPendingLedgerEntriesForAccountBalance(Map fieldValues, boolean isApproved, String currentFiscalPeriodCode, int currentFiscalYear, List<String> encumbranceBalanceTypes);
Iterator function(Map fieldValues, boolean isApproved, String currentFiscalPeriodCode, int currentFiscalYear, List<String> encumbranceBalanceTypes);
/** * This method retrieves all pending ledger entries that may belong to the given account balance record in the future * * @param fieldValues the input fields and values * @param isApproved the flag that indicates whether the pending entries are approved or don't care * @param currentFi...
This method retrieves all pending ledger entries that may belong to the given account balance record in the future
findPendingLedgerEntriesForAccountBalance
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/sys/dataaccess/GeneralLedgerPendingEntryDao.java", "license": "agpl-3.0", "size": 10803 }
[ "java.util.Iterator", "java.util.List", "java.util.Map" ]
import java.util.Iterator; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,767,250
private ContainerConfig getDbContainerConfig() { final int dbPort = 3306; final Map<String, List<PortBinding>> portBindings = new HashMap<>(); addHostPort(ALL_IP, portBindings, dbPort, dbPort); final HostConfig hostConfig = HostConfig.builder().portBindings(portBindings).build(); ...
ContainerConfig function() { final int dbPort = 3306; final Map<String, List<PortBinding>> portBindings = new HashMap<>(); addHostPort(ALL_IP, portBindings, dbPort, dbPort); final HostConfig hostConfig = HostConfig.builder().portBindings(portBindings).build(); return ContainerConfig.builder() .hostConfig(hostConfig) .e...
/** * Creation of docker container configuration for H2 database. * * @return Container configuration for database instance. */
Creation of docker container configuration for H2 database
getDbContainerConfig
{ "repo_name": "stzilli/kapua", "path": "qa/integration-steps/src/main/java/org/eclipse/kapua/qa/integration/steps/DockerSteps.java", "license": "epl-1.0", "size": 17507 }
[ "com.spotify.docker.client.messages.ContainerConfig", "com.spotify.docker.client.messages.HostConfig", "com.spotify.docker.client.messages.PortBinding", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import com.spotify.docker.client.messages.ContainerConfig; import com.spotify.docker.client.messages.HostConfig; import com.spotify.docker.client.messages.PortBinding; import java.util.HashMap; import java.util.List; import java.util.Map;
import com.spotify.docker.client.messages.*; import java.util.*;
[ "com.spotify.docker", "java.util" ]
com.spotify.docker; java.util;
966,842
ServiceLevelAssessment.ID resolveId(Serializable id); boolean ensureServiceLevelAgreementOnAssessment(ServiceLevelAssessment assessment);
ServiceLevelAssessment.ID resolveId(Serializable id); boolean ensureServiceLevelAgreementOnAssessment(ServiceLevelAssessment assessment);
/** * Ensure the assessment.getAgreement() is not null and if it is it will query and get the correct agreement according to the slaId on the assessment */
Ensure the assessment.getAgreement() is not null and if it is it will query and get the correct agreement according to the slaId on the assessment
ensureServiceLevelAgreementOnAssessment
{ "repo_name": "claudiu-stanciu/kylo", "path": "core/sla/sla-api/src/main/java/com/thinkbiganalytics/metadata/sla/spi/ServiceLevelAssessmentProvider.java", "license": "apache-2.0", "size": 1995 }
[ "com.thinkbiganalytics.metadata.sla.api.ServiceLevelAssessment", "java.io.Serializable" ]
import com.thinkbiganalytics.metadata.sla.api.ServiceLevelAssessment; import java.io.Serializable;
import com.thinkbiganalytics.metadata.sla.api.*; import java.io.*;
[ "com.thinkbiganalytics.metadata", "java.io" ]
com.thinkbiganalytics.metadata; java.io;
2,888,655