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
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<ActionGroupResourceInner> listByResourceGroup(String resourceGroupName, Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ActionGroupResourceInner> function(String resourceGroupName, Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); }
/** * Get a list of all action groups in a resource group. * * @param resourceGroupName The name of the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException ...
Get a list of all action groups in a resource group
listByResourceGroup
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/ActionGroupsClientImpl.java", "license": "mit", "size": 58951 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.monitor.fluent.models.ActionGroupResourceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.monitor.fluent.models.ActionGroupResourceInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.monitor.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
791,114
private int decryptBlock( byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException { if ((inOff + blockSize) > in.length) { throw new DataLengthException("input buffer too short"); } if ((...
int function( byte[] in, int inOff, byte[] out, int outOff) throws DataLengthException, IllegalStateException { if ((inOff + blockSize) > in.length) { throw new DataLengthException(STR); } if ((outOff + blockSize) > out.length) { throw new DataLengthException(STR); } cipher.processBlock(FR, 0, FRE, 0); for (int n = 0; ...
/** * Do the appropriate processing for CFB mode decryption. * * @param in the array containing the data to be decrypted. * @param inOff offset into the in array the data starts at. * @param out the array the encrypted data will be copied into. * @param outOff the offset into the out array...
Do the appropriate processing for CFB mode decryption
decryptBlock
{ "repo_name": "mobilesec/openuat-platform-j2me", "path": "thirdparty/bouncycastle-x509-deps/org/bouncycastle/crypto/modes/PGPCFBBlockCipher.java", "license": "lgpl-3.0", "size": 13609 }
[ "org.bouncycastle.crypto.DataLengthException" ]
import org.bouncycastle.crypto.DataLengthException;
import org.bouncycastle.crypto.*;
[ "org.bouncycastle.crypto" ]
org.bouncycastle.crypto;
832,571
private boolean parseXML(boolean showOsmInfo){ anzahl_ways = 0; anzahl_ways_Building = 0; anzahl_ways_Car = 0; long index_loop = 0; //start reading xml data via "stream" try { parser_loop: while ( parser.hasNext() ) { index_loop++; if ((index_loop % 1000000) ...
boolean function(boolean showOsmInfo){ anzahl_ways = 0; anzahl_ways_Building = 0; anzahl_ways_Car = 0; long index_loop = 0; try { parser_loop: while ( parser.hasNext() ) { index_loop++; if ((index_loop % 1000000) == 0) { System.out.print((new GregorianCalendar()).getTime().toString() + " " + index_loop); System.out.pri...
/** * Parses the XML file to a dynamic osmData Datastructure * @return true if no error */
Parses the XML file to a dynamic osmData Datastructure
parseXML
{ "repo_name": "hhucn/JXMapMatchV3", "path": "src/myClasses/myOSMMap.java", "license": "mit", "size": 16269 }
[ "java.util.GregorianCalendar", "javax.xml.stream.XMLStreamConstants" ]
import java.util.GregorianCalendar; import javax.xml.stream.XMLStreamConstants;
import java.util.*; import javax.xml.stream.*;
[ "java.util", "javax.xml" ]
java.util; javax.xml;
1,048,085
public void setSrcdir(File srcdir) { this.srcdir = srcdir; }
void function(File srcdir) { this.srcdir = srcdir; }
/** * Sets the directory to be scanned by the tool. This should be the * directory containing the source files whose metrics are to be * analysed. * @param srcdir the directory to be scanned by the tool. */
Sets the directory to be scanned by the tool. This should be the directory containing the source files whose metrics are to be analysed
setSrcdir
{ "repo_name": "kauffmj/razza", "path": "tools/javancss-32.53/src/main/java/javancss/JavancssAntTask.java", "license": "gpl-2.0", "size": 29488 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
180,172
public void setImeiCheckLifetimeValue(String imeiCheckLifetimeValue) throws JNCException { setImeiCheckLifetimeValue(new YangString(imeiCheckLifetimeValue)); }
void function(String imeiCheckLifetimeValue) throws JNCException { setImeiCheckLifetimeValue(new YangString(imeiCheckLifetimeValue)); }
/** * Sets the value for child leaf "imei-check-lifetime", * using a String value. * @param imeiCheckLifetimeValue used during instantiation. */
Sets the value for child leaf "imei-check-lifetime", using a String value
setImeiCheckLifetimeValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/feature/MmeEquipIdentityCheck.java", "license": "apache-2.0", "size": 13791 }
[ "com.tailf.jnc.YangString" ]
import com.tailf.jnc.YangString;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
1,342,099
public final List<Category> getCategoryList() { return categoryList; }
final List<Category> function() { return categoryList; }
/** * Gets the category list. * * @return the category list */
Gets the category list
getCategoryList
{ "repo_name": "SampleSizeShop/WebServiceCommon", "path": "src/edu/ucdenver/bios/webservice/common/domain/BetweenParticipantFactor.java", "license": "gpl-2.0", "size": 4085 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,369,475
public static Collection<Descriptor> getSortedDescriptorsForGlobalConfig() { return getSortedDescriptorsForGlobalConfig(Predicates.<GlobalConfigurationCategory>alwaysTrue()); }
static Collection<Descriptor> function() { return getSortedDescriptorsForGlobalConfig(Predicates.<GlobalConfigurationCategory>alwaysTrue()); }
/** * Like {@link #getSortedDescriptorsForGlobalConfig(Predicate)} but with a constant truth predicate, to include all descriptors. */
Like <code>#getSortedDescriptorsForGlobalConfig(Predicate)</code> but with a constant truth predicate, to include all descriptors
getSortedDescriptorsForGlobalConfig
{ "repo_name": "ajshastri/jenkins", "path": "core/src/main/java/hudson/Functions.java", "license": "mit", "size": 74762 }
[ "com.google.common.base.Predicates", "hudson.model.Descriptor", "java.util.Collection" ]
import com.google.common.base.Predicates; import hudson.model.Descriptor; import java.util.Collection;
import com.google.common.base.*; import hudson.model.*; import java.util.*;
[ "com.google.common", "hudson.model", "java.util" ]
com.google.common; hudson.model; java.util;
142,966
void setText(@Nonnull CharSequence text);
void setText(@Nonnull CharSequence text);
/** * Set the text that is supposed to be displayed in the text field. * * @param text the text that is supposed to be displayed */
Set the text that is supposed to be displayed in the text field
setText
{ "repo_name": "mkaring/nifty-gui", "path": "nifty-controls/src/main/java/de/lessvoid/nifty/controls/TextField.java", "license": "bsd-2-clause", "size": 6219 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
385,634
public void setWriter(Writer writer) { // if we are tracing events we need to trace what // characters are written to the output writer. if (m_tracer != null && !(writer instanceof SerializerTraceWriter) ) m_writer = new SerializerTraceWriter(writer, m_tracer); ...
void function(Writer writer) { if (m_tracer != null && !(writer instanceof SerializerTraceWriter) ) m_writer = new SerializerTraceWriter(writer, m_tracer); else m_writer = writer; }
/** * Specifies a writer to which the document should be serialized. * This method should not be called while the serializer is in * the process of serializing a document. * * @param writer The output writer stream */
Specifies a writer to which the document should be serialized. This method should not be called while the serializer is in the process of serializing a document
setWriter
{ "repo_name": "karianna/jdk8_tl", "path": "jaxp/src/com/sun/org/apache/xml/internal/serializer/ToStream.java", "license": "gpl-2.0", "size": 110211 }
[ "java.io.Writer" ]
import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
2,719,811
public FileItem getSingleFile() { return FileUploadUtil.getFile(getFileItems()); }
FileItem function() { return FileUploadUtil.getFile(getFileItems()); }
/** * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> compliant * multipart/form-data stream and returns the item whose the type is a file. If there is several * items that represent a file, then only the first one is returned. * @return the file item representing a file in the multi...
Processes an RFC 1867 compliant multipart/form-data stream and returns the item whose the type is a file. If there is several items that represent a file, then only the first one is returned
getSingleFile
{ "repo_name": "SilverDav/Silverpeas-Core", "path": "core-rs/src/main/java/org/silverpeas/core/web/http/HttpRequest.java", "license": "agpl-3.0", "size": 23397 }
[ "org.apache.commons.fileupload.FileItem", "org.silverpeas.core.util.file.FileUploadUtil" ]
import org.apache.commons.fileupload.FileItem; import org.silverpeas.core.util.file.FileUploadUtil;
import org.apache.commons.fileupload.*; import org.silverpeas.core.util.file.*;
[ "org.apache.commons", "org.silverpeas.core" ]
org.apache.commons; org.silverpeas.core;
2,579,977
public byte[] readBytesReverse(int amount) { return readBytesReverse(amount, ByteModification.STANDARD); }
byte[] function(int amount) { return readBytesReverse(amount, ByteModification.STANDARD); }
/** * Reads a series of bytes in reverse. * * @param amount The amount of bytes to read. * * @return The bytes in reverse. */
Reads a series of bytes in reverse
readBytesReverse
{ "repo_name": "Vult-R/Astraeus-Java-Framework", "path": "src/main/java/com/astraeus/net/codec/game/ByteBufReader.java", "license": "gpl-3.0", "size": 13699 }
[ "com.astraeus.net.codec.ByteModification" ]
import com.astraeus.net.codec.ByteModification;
import com.astraeus.net.codec.*;
[ "com.astraeus.net" ]
com.astraeus.net;
1,422,353
public void writeMerged(final JarOutputStream jos) throws IOException;
void function(final JarOutputStream jos) throws IOException;
/** * Called once the jar builder main has completed the scans and written all resources to the jar. * The impleentation of this method should write its merged content to the passed jar output stream. * @param jos The jar output stream the merger should write the merged resources to */
Called once the jar builder main has completed the scans and written all resources to the jar. The impleentation of this method should write its merged content to the passed jar output stream
writeMerged
{ "repo_name": "nickman/heliosutils", "path": "src/main/java/com/heliosapm/utils/jar/ResourceMerger.java", "license": "apache-2.0", "size": 3036 }
[ "java.io.IOException", "java.util.jar.JarOutputStream" ]
import java.io.IOException; import java.util.jar.JarOutputStream;
import java.io.*; import java.util.jar.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,889,964
protected RequestInterceptor createRequestInterceptorChain() { Configuration conf = getConfig(); List<String> interceptorClassNames = getInterceptorClassNames(conf); RequestInterceptor pipeline = null; RequestInterceptor current = null; for (String interceptorClassName : interceptorClassNames) {...
RequestInterceptor function() { Configuration conf = getConfig(); List<String> interceptorClassNames = getInterceptorClassNames(conf); RequestInterceptor pipeline = null; RequestInterceptor current = null; for (String interceptorClassName : interceptorClassNames) { try { Class<?> interceptorClass = conf.getClassByName(...
/** * This method creates and returns reference of the first intercepter in the * chain of request intercepter instances. * * @return the reference of the first intercepter in the chain */
This method creates and returns reference of the first intercepter in the chain of request intercepter instances
createRequestInterceptorChain
{ "repo_name": "lukmajercak/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/AMRMProxyService.java", "license": "apache-2.0", "size": 32082 }
[ "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.util.ReflectionUtils", "org.apache.hadoop.yarn.exceptions.YarnRuntimeException" ]
import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.util.*; import org.apache.hadoop.yarn.exceptions.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,496,049
public static void overflowCondition(final long offset, final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions, final String firstOperand) { final OperandSize qw = OperandSize.QWORD; final OperandSize dw = OperandSize.DWORD; final O...
static void function(final long offset, final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions, final String firstOperand) { final OperandSize qw = OperandSize.QWORD; final OperandSize dw = OperandSize.DWORD; final OperandSize bt = OperandSize.BYTE; final Str...
/** * overflow condition for unsigned operations * * @param offset * @param environment * @param instruction * @param instructions * @param firstOperand */
overflow condition for unsigned operations
overflowCondition
{ "repo_name": "google/binnavi", "path": "src/main/java/com/google/security/zynamics/reil/translators/arm/Helpers.java", "license": "apache-2.0", "size": 49449 }
[ "com.google.security.zynamics.reil.OperandSize", "com.google.security.zynamics.reil.ReilHelpers", "com.google.security.zynamics.reil.ReilInstruction", "com.google.security.zynamics.reil.translators.ITranslationEnvironment", "com.google.security.zynamics.zylib.disassembly.IInstruction", "java.util.List" ]
import com.google.security.zynamics.reil.OperandSize; import com.google.security.zynamics.reil.ReilHelpers; import com.google.security.zynamics.reil.ReilInstruction; import com.google.security.zynamics.reil.translators.ITranslationEnvironment; import com.google.security.zynamics.zylib.disassembly.IInstruction; import j...
import com.google.security.zynamics.reil.*; import com.google.security.zynamics.reil.translators.*; import com.google.security.zynamics.zylib.disassembly.*; import java.util.*;
[ "com.google.security", "java.util" ]
com.google.security; java.util;
385,114
public void init(final IMemento memento) { if (memento != null) { _svpPath = memento.getString(SVP_FILE); _intervalPath = memento.getString(INTERVAL_FILE); final Integer depth = memento.getInteger(DEPTH_VAL); if (depth != null) _curDepth = depth; } }
void function(final IMemento memento) { if (memento != null) { _svpPath = memento.getString(SVP_FILE); _intervalPath = memento.getString(INTERVAL_FILE); final Integer depth = memento.getInteger(DEPTH_VAL); if (depth != null) _curDepth = depth; } }
/** * initialise ourselves from the memento * */
initialise ourselves from the memento
init
{ "repo_name": "theanuradha/debrief", "path": "org.mwc.debrief.multipath2/src/org/mwc/debrief/multipath2/MultiPathPresenter.java", "license": "epl-1.0", "size": 13010 }
[ "org.eclipse.ui.IMemento" ]
import org.eclipse.ui.IMemento;
import org.eclipse.ui.*;
[ "org.eclipse.ui" ]
org.eclipse.ui;
1,485,424
IPOBootReceiver mIPOBootReceiver; public View create() { if (!checkIfCurrentLayer()) { Log.v(TAG, "Package : " + PACKAGE_NAME + " is disabled"); return null; } long real_start = SystemClock.elapsedRealtime(); long thread_start = SystemClock.currentThread...
IPOBootReceiver mIPOBootReceiver; View function() { if (!checkIfCurrentLayer()) { Log.v(TAG, STR + PACKAGE_NAME + STR); return null; } long real_start = SystemClock.elapsedRealtime(); long thread_start = SystemClock.currentThreadTimeMillis(); setupStage(); setupBackground(); if (mIsProfiling) { long real_end = SystemCl...
/** * Called by LockScreen to create VideoOrbView. * VideoOrbView has to detect whether it has been set as current style. * In order to speed up launching, only set up necessary actors in create(). * Requested in IKeyguardLayer */
Called by LockScreen to create VideoOrbView. VideoOrbView has to detect whether it has been set as current style. In order to speed up launching, only set up necessary actors in create(). Requested in IKeyguardLayer
create
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/packages/apps/VideoOrbPlugin/src/com/mediatek/videoorbplugin/VideoOrbView.java", "license": "gpl-2.0", "size": 20206 }
[ "android.os.SystemClock", "android.util.Log", "android.view.View" ]
import android.os.SystemClock; import android.util.Log; import android.view.View;
import android.os.*; import android.util.*; import android.view.*;
[ "android.os", "android.util", "android.view" ]
android.os; android.util; android.view;
369,890
private Method getGenerateMethod(Object generator) { Method[] methods = generator.getClass().getMethods(); for (Method method : methods) { if (method.getName().equals("generate") && method.getReturnType().getSimpleName().equals("byte[]") && method....
Method function(Object generator) { Method[] methods = generator.getClass().getMethods(); for (Method method : methods) { if (method.getName().equals(STR) && method.getReturnType().getSimpleName().equals(STR) && method.getParameterTypes().length == 1) { return method; } } return null; }
/** * Retrieves the actual Method that generates and returns the bytecode * * @param generator * GeneratorStrategy instance * @return Method that generates and returns the bytecode */
Retrieves the actual Method that generates and returns the bytecode
getGenerateMethod
{ "repo_name": "HotswapProjects/HotswapAgent", "path": "plugin/hotswap-agent-proxy-plugin/src/main/java/org/hotswap/agent/plugin/proxy/hscglib/CglibProxyBytecodeGenerator.java", "license": "gpl-2.0", "size": 2300 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,225,761
private void removeUselessDefiners(final int reg) { Map<JavaClass, List<MethodInfo>> definers = parameterDefiners.get(Integer.valueOf(reg)); if (CollectionUtils.isEmpty(definers)) { return; } String methodSig = getSigConstantOperand(); String methodName = getName...
void function(final int reg) { Map<JavaClass, List<MethodInfo>> definers = parameterDefiners.get(Integer.valueOf(reg)); if (CollectionUtils.isEmpty(definers)) { return; } String methodSig = getSigConstantOperand(); String methodName = getNameConstantOperand(); MethodInfo methodInfo = new MethodInfo(methodName, methodSi...
/** * parses through the interface that 'may' define a parameter defined by reg, and look to see if we can rule it out, because a method is called on the * object that can't be satisfied by the interface, if so remove that candidate interface. * * @param reg * the parameter register ...
parses through the interface that 'may' define a parameter defined by reg, and look to see if we can rule it out, because a method is called on the object that can't be satisfied by the interface, if so remove that candidate interface
removeUselessDefiners
{ "repo_name": "rblasch/fb-contrib", "path": "src/main/java/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java", "license": "lgpl-2.1", "size": 28195 }
[ "com.mebigfatguy.fbcontrib.utils.CollectionUtils", "java.util.Iterator", "java.util.List", "java.util.Map", "org.apache.bcel.classfile.JavaClass" ]
import com.mebigfatguy.fbcontrib.utils.CollectionUtils; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.bcel.classfile.JavaClass;
import com.mebigfatguy.fbcontrib.utils.*; import java.util.*; import org.apache.bcel.classfile.*;
[ "com.mebigfatguy.fbcontrib", "java.util", "org.apache.bcel" ]
com.mebigfatguy.fbcontrib; java.util; org.apache.bcel;
2,139,668
public void assignAuthUser(AuthOrganizationVO vo) { AuthOrganization domain = BeanHelper.copyProperties(AuthOrganization.class, vo); domain.assignAuthUserByIds(StringUtils.split(vo.getUserId(), ",")); }
void function(AuthOrganizationVO vo) { AuthOrganization domain = BeanHelper.copyProperties(AuthOrganization.class, vo); domain.assignAuthUserByIds(StringUtils.split(vo.getUserId(), ",")); }
/** * <pre> * assign AuthUser by id * </pre> * * @param ids AuthUser id * (non-Javadoc) * @author <a href="mailto:iffiff1@gmail.com">Tyler Chen</a> * @see com.foreveross.qdp.application.system.auth.AuthOrganizationApplication#assignAuthUser(AuthOrganizationVO, ...
<code> assign AuthUser by id </code>
assignAuthUser
{ "repo_name": "tylerchen/foss-qdp-project-v4", "path": "src/main/java/com/foreveross/qdp/application/system/auth/impl/AuthOrganizationApplicationImpl.java", "license": "apache-2.0", "size": 14839 }
[ "com.foreveross.qdp.domain.system.auth.AuthOrganization", "com.foreveross.qdp.infra.vo.system.auth.AuthOrganizationVO", "org.apache.commons.lang3.StringUtils", "org.iff.infra.util.BeanHelper" ]
import com.foreveross.qdp.domain.system.auth.AuthOrganization; import com.foreveross.qdp.infra.vo.system.auth.AuthOrganizationVO; import org.apache.commons.lang3.StringUtils; import org.iff.infra.util.BeanHelper;
import com.foreveross.qdp.domain.system.auth.*; import com.foreveross.qdp.infra.vo.system.auth.*; import org.apache.commons.lang3.*; import org.iff.infra.util.*;
[ "com.foreveross.qdp", "org.apache.commons", "org.iff.infra" ]
com.foreveross.qdp; org.apache.commons; org.iff.infra;
489,951
private void performGeoprocessing(final FeatureCollectionTable featureCollectionTable) { // geoprocessing parameters final ListenableFuture<GeoprocessingParameters> parameterFuture = mGeoprocessingTask.createDefaultParametersAsync(); parameterFuture.addDoneListener(() -> { try { Geoprocessin...
void function(final FeatureCollectionTable featureCollectionTable) { final ListenableFuture<GeoprocessingParameters> parameterFuture = mGeoprocessingTask.createDefaultParametersAsync(); parameterFuture.addDoneListener(() -> { try { GeoprocessingParameters parameters = parameterFuture.get(); parameters.setProcessSpatial...
/** * Creates a GeoprocessingJob from the GeoprocessingTask. Displays the resulting viewshed on the map. * * @param featureCollectionTable containing the observation point. */
Creates a GeoprocessingJob from the GeoprocessingTask. Displays the resulting viewshed on the map
performGeoprocessing
{ "repo_name": "Esri/arcgis-runtime-samples-android", "path": "java/viewshed-geoprocessing/src/main/java/com/esri/arcgisruntime/sample/viewshedgeoprocessing/MainActivity.java", "license": "apache-2.0", "size": 9023 }
[ "com.esri.arcgisruntime.concurrent.ListenableFuture", "com.esri.arcgisruntime.data.FeatureCollectionTable", "com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingFeatures", "com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingParameters" ]
import com.esri.arcgisruntime.concurrent.ListenableFuture; import com.esri.arcgisruntime.data.FeatureCollectionTable; import com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingFeatures; import com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingParameters;
import com.esri.arcgisruntime.concurrent.*; import com.esri.arcgisruntime.data.*; import com.esri.arcgisruntime.tasks.geoprocessing.*;
[ "com.esri.arcgisruntime" ]
com.esri.arcgisruntime;
784,297
public IDataset getInterior_atmosphere();
IDataset function();
/** * <p> * <p><b>Enumeration:</b><ul> * <li><b>vacuum</b> </li> * <li><b>helium</b> </li> * <li><b>argon</b> </li></ul></p> * </p> * * @return the value. */
Enumeration: vacuum helium argon
getInterior_atmosphere
{ "repo_name": "willrogers/dawnsci", "path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXgrating.java", "license": "epl-1.0", "size": 4507 }
[ "org.eclipse.dawnsci.analysis.api.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.dataset.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
2,595,818
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String namespaceName, String alias) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function(String resourceGroupName, String namespaceName, String alias) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException(S...
/** * Deletes an Alias(Disaster Recovery configuration). * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param alias The Disaster Recovery configuration name. * @throws IllegalArgumentException thrown if p...
Deletes an Alias(Disaster Recovery configuration)
deleteWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryConfigsClientImpl.java", "license": "mit", "size": 101562 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
1,091,037
@Override public int size() { int size = 0; try { // Get an iterator for the XMP packet, starting at the top level schema nodes XMPIterator nsIter = xmpData.iterator( new IteratorOptions().setJustChildren( true ) .setOmitQualifiers( true ) ); ...
int function() { int size = 0; try { XMPIterator nsIter = xmpData.iterator( new IteratorOptions().setJustChildren( true ) .setOmitQualifiers( true ) ); while (nsIter.hasNext()) { nsIter.next(); size++; } } catch (XMPException e) { } return size; }
/** * Returns the number of top-level namespaces */
Returns the number of top-level namespaces
size
{ "repo_name": "zamattiac/tika", "path": "tika-xmp/src/main/java/org/apache/tika/xmp/XMPMetadata.java", "license": "apache-2.0", "size": 22300 }
[ "com.adobe.xmp.XMPException", "com.adobe.xmp.XMPIterator", "com.adobe.xmp.options.IteratorOptions" ]
import com.adobe.xmp.XMPException; import com.adobe.xmp.XMPIterator; import com.adobe.xmp.options.IteratorOptions;
import com.adobe.xmp.*; import com.adobe.xmp.options.*;
[ "com.adobe.xmp" ]
com.adobe.xmp;
465,105
private boolean checkRowForElimination() { // This is the variable we'll return at the end boolean bChanged = false; // Iterate over each row for (int row = 0; row < 9; ++row) { // Get the unsolved cells in the current row List<Cell> values = getRowsUnsolvedCells(row); ...
boolean function() { boolean bChanged = false; for (int row = 0; row < 9; ++row) { List<Cell> values = getRowsUnsolvedCells(row); List<Integer> missingValues = getValuesNotInRow(row); for (Integer missingValue : missingValues) { int numOpenings = 0; int openLocation = 0; for (Cell cell : values) { if (!(blockHasValueBy...
/** * Check each row to see if each missing value can only * be in one empty slot. * * @return whether the puzzle was changed */
Check each row to see if each missing value can only be in one empty slot
checkRowForElimination
{ "repo_name": "argonium/sudoku-struggler", "path": "src/io/miti/sudoku/Sudoku.java", "license": "mit", "size": 39693 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
851,849
public void trimTranslog() { verifyNotClosed(); final Engine engine = getEngine(); engine.trimTranslog(); }
void function() { verifyNotClosed(); final Engine engine = getEngine(); engine.trimTranslog(); }
/** * checks and removes translog files that no longer need to be retained. See * {@link org.elasticsearch.index.translog.TranslogDeletionPolicy} for details */
checks and removes translog files that no longer need to be retained. See <code>org.elasticsearch.index.translog.TranslogDeletionPolicy</code> for details
trimTranslog
{ "repo_name": "sneivandt/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 117724 }
[ "org.elasticsearch.index.engine.Engine" ]
import org.elasticsearch.index.engine.Engine;
import org.elasticsearch.index.engine.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
1,936,344
public static Permutation createForNElements(final int numElements, final Random rng) { final int[] permutation = IntUtils.arange(numElements); IntUtils.shuffle(permutation, checkNotNull(rng)); return new Permutation(permutation); }
static Permutation function(final int numElements, final Random rng) { final int[] permutation = IntUtils.arange(numElements); IntUtils.shuffle(permutation, checkNotNull(rng)); return new Permutation(permutation); }
/** * Creates a random permutation of n elements using the supplied random number generator. Note * that for all but small numbers of elements most possible permutations will not be sampled by * this because the random generator's space is much smaller than the number of possible * permutations. */
Creates a random permutation of n elements using the supplied random number generator. Note that for all but small numbers of elements most possible permutations will not be sampled by this because the random generator's space is much smaller than the number of possible permutations
createForNElements
{ "repo_name": "BBN-E/bue-common-open", "path": "common-core-open/src/main/java/com/bbn/bue/common/math/Permutation.java", "license": "mit", "size": 5000 }
[ "com.bbn.bue.common.primitives.IntUtils", "com.google.common.base.Preconditions", "java.util.Random" ]
import com.bbn.bue.common.primitives.IntUtils; import com.google.common.base.Preconditions; import java.util.Random;
import com.bbn.bue.common.primitives.*; import com.google.common.base.*; import java.util.*;
[ "com.bbn.bue", "com.google.common", "java.util" ]
com.bbn.bue; com.google.common; java.util;
2,524,190
private static List<byte[]> parseVorbisCodecPrivate(byte[] codecPrivate) throws ParserException { try { if (codecPrivate[0] != 0x02) { throw new ParserException("Error parsing vorbis codec private"); } int offset = 1; int vorbisInfoLength = 0; while (c...
static List<byte[]> function(byte[] codecPrivate) throws ParserException { try { if (codecPrivate[0] != 0x02) { throw new ParserException(STR); } int offset = 1; int vorbisInfoLength = 0; while (codecPrivate[offset] == (byte) 0xFF) { vorbisInfoLength += 0xFF; offset++; } vorbisInfoLength += codecPrivate[offset++]; int ...
/** * Builds initialization data for a {@link Format} from Vorbis codec private data. * * @return The initialization data for the {@link Format}. * @throws ParserException If the initialization data could not be built. */
Builds initialization data for a <code>Format</code> from Vorbis codec private data
parseVorbisCodecPrivate
{ "repo_name": "profosure/porogram", "path": "TMessagesProj/src/main/java/com/porogram/profosure1/messenger/exoplayer2/extractor/mkv/MatroskaExtractor.java", "license": "gpl-2.0", "size": 65805 }
[ "com.porogram.profosure1.messenger.exoplayer2.ParserException", "java.util.ArrayList", "java.util.List" ]
import com.porogram.profosure1.messenger.exoplayer2.ParserException; import java.util.ArrayList; import java.util.List;
import com.porogram.profosure1.messenger.exoplayer2.*; import java.util.*;
[ "com.porogram.profosure1", "java.util" ]
com.porogram.profosure1; java.util;
532,154
public AccessibleRole getAccessibleRole() { return AccessibleRole.CHECK_BOX; } } // inner class AccessibleJCheckBoxMenuItem
AccessibleRole function() { return AccessibleRole.CHECK_BOX; } }
/** * Get the role of this object. * * @return an instance of AccessibleRole describing the role of the * object */
Get the role of this object
getAccessibleRole
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JCheckBoxMenuItem.java", "license": "apache-2.0", "size": 11805 }
[ "javax.accessibility.AccessibleRole" ]
import javax.accessibility.AccessibleRole;
import javax.accessibility.*;
[ "javax.accessibility" ]
javax.accessibility;
2,305,539
ImmutableSet<SourcePath> getAssetsDirectories();
ImmutableSet<SourcePath> getAssetsDirectories();
/** * Directories containing assets to be included directly in the apk, * under the "assets" directory. */
Directories containing assets to be included directly in the apk, under the "assets" directory
getAssetsDirectories
{ "repo_name": "daedric/buck", "path": "src/com/facebook/buck/android/AbstractAndroidPackageableCollection.java", "license": "apache-2.0", "size": 4888 }
[ "com.facebook.buck.rules.SourcePath", "com.google.common.collect.ImmutableSet" ]
import com.facebook.buck.rules.SourcePath; import com.google.common.collect.ImmutableSet;
import com.facebook.buck.rules.*; import com.google.common.collect.*;
[ "com.facebook.buck", "com.google.common" ]
com.facebook.buck; com.google.common;
1,457,843
assertTrue("Exact value was expected to match", MavenVersionRangeParser.rangeAccepts("3", "3")); assertTrue("Exact value was expected to match", MavenVersionRangeParser.rangeAccepts("1.0", "1.0")); assertTrue("Exact value was expected to match", MavenVersionRangeParser.rangeAccepts("2.1.4", "2.1.4")); ...
assertTrue(STR, MavenVersionRangeParser.rangeAccepts("3", "3")); assertTrue(STR, MavenVersionRangeParser.rangeAccepts("1.0", "1.0")); assertTrue(STR, MavenVersionRangeParser.rangeAccepts("2.1.4", "2.1.4")); }
/** * Tests the {@link MavenVersionRangeParser#rangeAccepts(String, String)} works correctly when the range * and the value being compared are the same exact values */
Tests the <code>MavenVersionRangeParser#rangeAccepts(String, String)</code> works correctly when the range and the value being compared are the same exact values
testExactValue
{ "repo_name": "apache/ant-ivy", "path": "test/java/org/apache/ivy/plugins/parser/m2/MavenVersionRangeParserTest.java", "license": "apache-2.0", "size": 9047 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,276,779
private void saveValues(Project project, Set<Project> done) { if (!done.contains(project)) { done.add(project); if (project.getName().endsWith(QmConstants.CFG_POSTFIX)) { Bundle.getLogger(ModelModifier.class).debug("Saving ", project.getName()); ...
void function(Project project, Set<Project> done) { if (!done.contains(project)) { done.add(project); if (project.getName().endsWith(QmConstants.CFG_POSTFIX)) { Bundle.getLogger(ModelModifier.class).debug(STR, project.getName()); try { Configuration tmpConfig = new Configuration(project, true); new QmPrunedConfigSaver(...
/** * Saves the values of configuration projects(recursive function). * @param project The copied QM model (the starting point, which imports all the other models). * @param done The list of already saved projects, should be empty at the beginning. */
Saves the values of configuration projects(recursive function)
saveValues
{ "repo_name": "QualiMaster/QM-EASyProducer", "path": "QualiMaster.Extension/src/eu/qualimaster/easy/extension/modelop/ModelModifier.java", "license": "apache-2.0", "size": 19258 }
[ "eu.qualimaster.easy.extension.QmConstants", "eu.qualimaster.easy.extension.internal.Bundle", "java.util.Set", "net.ssehub.easy.varModel.confModel.Configuration", "net.ssehub.easy.varModel.confModel.ConfigurationException", "net.ssehub.easy.varModel.model.Project" ]
import eu.qualimaster.easy.extension.QmConstants; import eu.qualimaster.easy.extension.internal.Bundle; import java.util.Set; import net.ssehub.easy.varModel.confModel.Configuration; import net.ssehub.easy.varModel.confModel.ConfigurationException; import net.ssehub.easy.varModel.model.Project;
import eu.qualimaster.easy.extension.*; import eu.qualimaster.easy.extension.internal.*; import java.util.*; import net.ssehub.easy.*;
[ "eu.qualimaster.easy", "java.util", "net.ssehub.easy" ]
eu.qualimaster.easy; java.util; net.ssehub.easy;
2,602,812
@Test public void testCopy() { AbstractConfiguration config = setUpDestConfig(); Configuration srcConfig = setUpSourceConfig(); config.copy(srcConfig); for (int i = 0; i < PROP_COUNT; i++) { String key = KEY_PREFIX + i; if (srcConfig.containsKe...
void function() { AbstractConfiguration config = setUpDestConfig(); Configuration srcConfig = setUpSourceConfig(); config.copy(srcConfig); for (int i = 0; i < PROP_COUNT; i++) { String key = KEY_PREFIX + i; if (srcConfig.containsKey(key)) { assertEquals(STR + key, srcConfig .getProperty(key), config.getProperty(key)); ...
/** * Tests the copy() method. */
Tests the copy() method
testCopy
{ "repo_name": "mohanaraosv/commons-configuration", "path": "src/test/java/org/apache/commons/configuration2/TestAbstractConfigurationBasicFeatures.java", "license": "apache-2.0", "size": 42180 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,818,233
public int doStartTag() throws JspException { PageContextImpl pc = (PageContextImpl) pageContext; TimeZone timeZone = null; if (_value instanceof TimeZone) { timeZone = (TimeZone) _value; } else if (_value instanceof String) { String string = (String) _value; string = str...
int function() throws JspException { PageContextImpl pc = (PageContextImpl) pageContext; TimeZone timeZone = null; if (_value instanceof TimeZone) { timeZone = (TimeZone) _value; } else if (_value instanceof String) { String string = (String) _value; string = string.trim(); if (string.equals(STRGMTSTRGMT"); String var ...
/** * Process the tag. */
Process the tag
doStartTag
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/jstl/rt/FmtSetTimeZoneTag.java", "license": "gpl-2.0", "size": 2601 }
[ "com.caucho.jsp.PageContextImpl", "java.util.TimeZone", "javax.servlet.jsp.JspException", "javax.servlet.jsp.jstl.core.Config" ]
import com.caucho.jsp.PageContextImpl; import java.util.TimeZone; import javax.servlet.jsp.JspException; import javax.servlet.jsp.jstl.core.Config;
import com.caucho.jsp.*; import java.util.*; import javax.servlet.jsp.*; import javax.servlet.jsp.jstl.core.*;
[ "com.caucho.jsp", "java.util", "javax.servlet" ]
com.caucho.jsp; java.util; javax.servlet;
2,729,065
private static ArrayList<String> getRowColAndGapsTrimmed(String s) { if (s.indexOf('|') != -1) s = StringUtil.replaceAll(s, "\\|", "]["); ArrayList<String> retList = new ArrayList<String>(Math.max(s.length() >> 2 + 1, 3)); // Approx return length. int s0 = 0, s1 = 0; // '[' and ']' count....
static ArrayList<String> function(String s) { if (s.indexOf(' ') != -1) s = StringUtil.replaceAll(s, STR, "]["); ArrayList<String> retList = new ArrayList<String>(Math.max(s.length() >> 2 + 1, 3)); int s0 = 0, s1 = 0; int st = 0; for (int i = 0, iSz = s.length(); i < iSz; i++) { char c = s.charAt(i); if (c == '[') { s0...
/** Parses "AAA[BBB]CCC[DDD]EEE" into {"AAA", "BBB", "CCC", "DDD", "EEE", "FFF"}. Handles empty parts. Will always start and end outside * a [] block so that the number of returned elemets will always be uneven and at least of length 3. * <p> * "|" is interpreted as "][". * @param s The string. Might be "" but ...
Parses "AAA[BBB]CCC[DDD]EEE" into {"AAA", "BBB", "CCC", "DDD", "EEE", "FFF"}. Handles empty parts. Will always start and end outside a [] block so that the number of returned elemets will always be uneven and at least of length 3. "|" is interpreted as "]["
getRowColAndGapsTrimmed
{ "repo_name": "skyHALud/codenameone", "path": "CodenameOne/src/com/codename1/ui/layouts/mig/ConstraintParser.java", "license": "gpl-2.0", "size": 49545 }
[ "com.codename1.util.StringUtil", "java.util.ArrayList" ]
import com.codename1.util.StringUtil; import java.util.ArrayList;
import com.codename1.util.*; import java.util.*;
[ "com.codename1.util", "java.util" ]
com.codename1.util; java.util;
658,710
public void clearAllHighScores(){ SharedPreferences gamePrefs = this.gameView.getContext().getSharedPreferences("BrokenScores", Context.MODE_PRIVATE); SharedPreferences.Editor editor = gamePrefs.edit(); editor.clear(); editor.commit(); }
void function(){ SharedPreferences gamePrefs = this.gameView.getContext().getSharedPreferences(STR, Context.MODE_PRIVATE); SharedPreferences.Editor editor = gamePrefs.edit(); editor.clear(); editor.commit(); }
/** * Clears all stored high scores */
Clears all stored high scores
clearAllHighScores
{ "repo_name": "dom96/BrokenBonez", "path": "BrokenBonez/app/src/main/java/com/dragonfruitstudios/brokenbonez/HighScores/HighScore.java", "license": "mit", "size": 9138 }
[ "android.content.Context", "android.content.SharedPreferences" ]
import android.content.Context; import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
780,822
public static TestContainer createContainer(String configurationClassName) throws Exception { Option[] options = getConfigurationOptions(configurationClassName); ExamSystem system = DefaultExamSystem.create(options); TestContainer testContainer = PaxExamRuntime.createContainer(system); ...
static TestContainer function(String configurationClassName) throws Exception { Option[] options = getConfigurationOptions(configurationClassName); ExamSystem system = DefaultExamSystem.create(options); TestContainer testContainer = PaxExamRuntime.createContainer(system); testContainer.start(); return testContainer; }
/** * Creates and starts a test container using options from a configuration class. * * @param configurationClassName * fully qualified class name of a configuration class. * @return started test container * @throws Exception when options cannot be parsed */
Creates and starts a test container using options from a configuration class
createContainer
{ "repo_name": "koma-akdb/org.ops4j.pax.exam2", "path": "core/pax-exam-spi/src/main/java/org/ops4j/pax/exam/spi/PaxExamRuntime.java", "license": "apache-2.0", "size": 12100 }
[ "org.ops4j.pax.exam.ExamSystem", "org.ops4j.pax.exam.Option", "org.ops4j.pax.exam.TestContainer" ]
import org.ops4j.pax.exam.ExamSystem; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.TestContainer;
import org.ops4j.pax.exam.*;
[ "org.ops4j.pax" ]
org.ops4j.pax;
2,023,001
@Nullable public static OrderedSetMultimap<Dependency, ConfiguredAspect> resolveAspectDependencies( SkyFunction.Environment env, Map<SkyKey, ConfiguredTargetAndData> configuredTargetMap, Iterable<Dependency> deps, @Nullable NestedSetBuilder<Package> transitivePackages) throws AspectCre...
static OrderedSetMultimap<Dependency, ConfiguredAspect> function( SkyFunction.Environment env, Map<SkyKey, ConfiguredTargetAndData> configuredTargetMap, Iterable<Dependency> deps, @Nullable NestedSetBuilder<Package> transitivePackages) throws AspectCreationException, InterruptedException { OrderedSetMultimap<Dependency...
/** * Given a list of {@link Dependency} objects, returns a multimap from the {@link Dependency}s to * the {@link ConfiguredAspect} instances that should be merged with them. * * <p>Returns null if the required aspects are not yet available from Skyframe. */
Given a list of <code>Dependency</code> objects, returns a multimap from the <code>Dependency</code>s to the <code>ConfiguredAspect</code> instances that should be merged with them. Returns null if the required aspects are not yet available from Skyframe
resolveAspectDependencies
{ "repo_name": "akira-baruah/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/AspectResolver.java", "license": "apache-2.0", "size": 7970 }
[ "com.google.devtools.build.lib.causes.LabelCause", "com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder", "com.google.devtools.build.lib.packages.AspectDescriptor", "com.google.devtools.build.lib.packages.NoSuchThingException", "com.google.devtools.build.lib.packages.Package", "com.google.dev...
import com.google.devtools.build.lib.causes.LabelCause; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.packages.AspectDescriptor; import com.google.devtools.build.lib.packages.NoSuchThingException; import com.google.devtools.build.lib.packages.Package; impo...
import com.google.devtools.build.lib.causes.*; import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.skyframe.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.skyframe.*; import java.util.*; import ...
[ "com.google.devtools", "java.util", "javax.annotation" ]
com.google.devtools; java.util; javax.annotation;
2,617,979
public static BundleContext getContext() { return context; }
static BundleContext function() { return context; }
/** * Returns the bundle context of this bundle * * @return the bundle context */
Returns the bundle context of this bundle
getContext
{ "repo_name": "computergeek1507/openhab", "path": "bundles/binding/org.openhab.binding.xbmc/src/main/java/org/openhab/binding/xbmc/internal/XbmcActivator.java", "license": "epl-1.0", "size": 1512 }
[ "org.osgi.framework.BundleContext" ]
import org.osgi.framework.BundleContext;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
1,674,165
public Resource getMaximumAllocationPerQueue(String queue) { String queuePrefix = getQueuePrefix(queue); int maxAllocationMbPerQueue = getInt(queuePrefix + MAXIMUM_ALLOCATION_MB, (int)UNDEFINED); int maxAllocationVcoresPerQueue = getInt( queuePrefix + MAXIMUM_ALLOCATION_VCORES, (int)UNDEFI...
Resource function(String queue) { String queuePrefix = getQueuePrefix(queue); int maxAllocationMbPerQueue = getInt(queuePrefix + MAXIMUM_ALLOCATION_MB, (int)UNDEFINED); int maxAllocationVcoresPerQueue = getInt( queuePrefix + MAXIMUM_ALLOCATION_VCORES, (int)UNDEFINED); if (LOG.isDebugEnabled()) { LOG.debug(STR + queue +...
/** * Get the per queue setting for the maximum limit to allocate to * each container request. * * @param queue * name of the queue * @return setting specified per queue else falls back to the cluster setting */
Get the per queue setting for the maximum limit to allocate to each container request
getMaximumAllocationPerQueue
{ "repo_name": "hasonhai/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/CapacitySchedulerConfiguration.java", "license": "apache-2.0", "size": 30206 }
[ "org.apache.hadoop.yarn.api.records.Resource", "org.apache.hadoop.yarn.util.resource.Resources" ]
import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.util.resource.Resources;
import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.util.resource.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,583,844
@Test public void updateBRETriggerTest() throws ApiException { String eventName = null; BreTriggerResource breTriggerResource = null; BreTriggerResource response = api.updateBRETrigger(eventName, breTriggerResource); // TODO: test validations }
void function() throws ApiException { String eventName = null; BreTriggerResource breTriggerResource = null; BreTriggerResource response = api.updateBRETrigger(eventName, breTriggerResource); }
/** * Update a trigger * * May fail if new parameters mismatch requirements of existing rules. Cannot update core triggers. &lt;br&gt;&lt;br&gt;&lt;b&gt;Permissions Needed:&lt;/b&gt; BRE_RULE_ENGINE_TRIGGERS_ADMIN * * @throws ApiException * if the Api call fails */
Update a trigger May fail if new parameters mismatch requirements of existing rules. Cannot update core triggers. &lt;br&gt;&lt;br&gt;&lt;b&gt;Permissions Needed:&lt;/b&gt; BRE_RULE_ENGINE_TRIGGERS_ADMIN
updateBRETriggerTest
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/test/java/com/knetikcloud/api/RuleEngineTriggersApiTest.java", "license": "apache-2.0", "size": 3865 }
[ "com.knetikcloud.client.ApiException", "com.knetikcloud.model.BreTriggerResource" ]
import com.knetikcloud.client.ApiException; import com.knetikcloud.model.BreTriggerResource;
import com.knetikcloud.client.*; import com.knetikcloud.model.*;
[ "com.knetikcloud.client", "com.knetikcloud.model" ]
com.knetikcloud.client; com.knetikcloud.model;
2,402,456
Stream<IgniteBiTuple<Integer, Double>> values(int idx);
Stream<IgniteBiTuple<Integer, Double>> values(int idx);
/** * Projection of data on feature with the given index. * * @param idx Feature index. * @return Projection of data on feature with the given index. */
Projection of data on feature with the given index
values
{ "repo_name": "WilliamDo/ignite", "path": "modules/ml/src/main/java/org/apache/ignite/ml/trees/trainers/columnbased/ColumnDecisionTreeTrainerInput.java", "license": "apache-2.0", "size": 1859 }
[ "java.util.stream.Stream", "org.apache.ignite.lang.IgniteBiTuple" ]
import java.util.stream.Stream; import org.apache.ignite.lang.IgniteBiTuple;
import java.util.stream.*; import org.apache.ignite.lang.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,175,498
// d433583, add an overload method public static String putQueueMessage(Object text, QueueConnectionFactory queueConnectionFactory, Queue queue) throws Exception { svLogger.info("Requests to put message '" + text + "' with Queue Connection Factory '" + queueConnectionFactory + "' and Queue '" + queue ...
static String function(Object text, QueueConnectionFactory queueConnectionFactory, Queue queue) throws Exception { svLogger.info(STR + text + STR + queueConnectionFactory + STR + queue + "'."); String messageID = null; FATJMSHelper jms = new FATJMSHelper(); jms.createQueueConnection(queueConnectionFactory); jms.createQ...
/** * Put a text message on a specified queue * * @param text * : message * @param queueConnectionFactory * : JNDI context for queue connection factory * @param queue * : JNDI context for the queue * @return Message ID * @throws Exceptio...
Put a text message on a specified queue
putQueueMessage
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/io.openliberty.ejbcontainer.jakarta.fat_tools/src/io/openliberty/ejbcontainer/jakarta/test/tools/FATMDBHelper.java", "license": "epl-1.0", "size": 9239 }
[ "jakarta.jms.Queue", "jakarta.jms.QueueConnectionFactory" ]
import jakarta.jms.Queue; import jakarta.jms.QueueConnectionFactory;
import jakarta.jms.*;
[ "jakarta.jms" ]
jakarta.jms;
1,498,989
public void releaseBitmap() { if (mBitmapCanvas != null) { mBitmapCanvas.setBitmap(null); mBitmapCanvas = null; } if (mDrawBitmap != null) { mDrawBitmap.get().recycle(); mDrawBitmap.clear(); mDrawBitmap = null; } } ...
void function() { if (mBitmapCanvas != null) { mBitmapCanvas.setBitmap(null); mBitmapCanvas = null; } if (mDrawBitmap != null) { mDrawBitmap.get().recycle(); mDrawBitmap.clear(); mDrawBitmap = null; } } private class DataSetImageCache { private Path mCirclePathBuffer = new Path(); private Bitmap[] circleBitmaps;
/** * Releases the drawing bitmap. This should be called when {@link LineChart#onDetachedFromWindow()}. */
Releases the drawing bitmap. This should be called when <code>LineChart#onDetachedFromWindow()</code>
releaseBitmap
{ "repo_name": "xyjincan/snore-test", "path": "Snore/MPChartLib/src/main/java/com/github/mikephil/charting/renderer/LineChartRenderer.java", "license": "apache-2.0", "size": 27775 }
[ "android.graphics.Bitmap", "android.graphics.Path" ]
import android.graphics.Bitmap; import android.graphics.Path;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,360,365
T setType(Type<?> type);
T setType(Type<?> type);
/** * Sets the type * * @param type the type * @return this */
Sets the type
setType
{ "repo_name": "ftomassetti/java-symbol-solver", "path": "java-symbol-solver-testing/src/test/resources/javaparser_new_src/javaparser-core/com/github/javaparser/ast/nodeTypes/NodeWithType.java", "license": "apache-2.0", "size": 2105 }
[ "com.github.javaparser.ast.type.Type" ]
import com.github.javaparser.ast.type.Type;
import com.github.javaparser.ast.type.*;
[ "com.github.javaparser" ]
com.github.javaparser;
1,140,541
RelNode getInput();
RelNode getInput();
/** * Returns the sole input relational expression * * @return child relational expression */
Returns the sole input relational expression
getInput
{ "repo_name": "googleinterns/calcite", "path": "core/src/main/java/org/apache/calcite/rel/convert/Converter.java", "license": "apache-2.0", "size": 3126 }
[ "org.apache.calcite.rel.RelNode" ]
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.*;
[ "org.apache.calcite" ]
org.apache.calcite;
1,849,230
@Override public Adapter adapt(Notifier notifier, Object type) { return super.adapt(notifier, this); }
Adapter function(Notifier notifier, Object type) { return super.adapt(notifier, this); }
/** * This implementation substitutes the factory itself as the key for the adapter. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This implementation substitutes the factory itself as the key for the adapter.
adapt
{ "repo_name": "markus1978/clickwatch", "path": "analysis/de.hub.clickwatch.analysis.results.edit/src/de/hub/clickwatch/analysis/results/provider/ResultsItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 16282 }
[ "org.eclipse.emf.common.notify.Adapter", "org.eclipse.emf.common.notify.Notifier" ]
import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,900,903
@Test public void recoversAfterFailure() throws Exception { final Aether aether = new Aether( this.project(), this.temp.newFolder() ); try { aether.resolve( new DefaultArtifact("com.jcabi:jcabi-x:jar:0.0.0"), JavaScopes....
void function() throws Exception { final Aether aether = new Aether( this.project(), this.temp.newFolder() ); try { aether.resolve( new DefaultArtifact(STR), JavaScopes.TEST ); Assert.fail(STR); } catch (final DependencyResolutionException ex) { MatcherAssert.assertThat( Logger.format(STR, ex), Matchers.allOf( Matchers...
/** * Aether can recover after failure. * @throws Exception If there is some problem inside */
Aether can recover after failure
recoversAfterFailure
{ "repo_name": "krzyk/jcabi-aether", "path": "src/test/java/com/jcabi/aether/AetherTest.java", "license": "bsd-3-clause", "size": 11479 }
[ "com.jcabi.log.Logger", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.junit.Assert", "org.sonatype.aether.artifact.Artifact", "org.sonatype.aether.resolution.DependencyResolutionException", "org.sonatype.aether.util.artifact.DefaultArtifact", "org.sonatype.aether.util.artifact.JavaScopes...
import com.jcabi.log.Logger; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.Assert; import org.sonatype.aether.artifact.Artifact; import org.sonatype.aether.resolution.DependencyResolutionException; import org.sonatype.aether.util.artifact.DefaultArtifact; import org.sonatype.aether.u...
import com.jcabi.log.*; import org.hamcrest.*; import org.junit.*; import org.sonatype.aether.artifact.*; import org.sonatype.aether.resolution.*; import org.sonatype.aether.util.artifact.*;
[ "com.jcabi.log", "org.hamcrest", "org.junit", "org.sonatype.aether" ]
com.jcabi.log; org.hamcrest; org.junit; org.sonatype.aether;
2,393,816
public static void setResourcePermissions(String username, String visibility, String[] roles, String artifactPath) throws APIManagementException { setResourcePermissions(username, visibility, roles, artifactPath, null); }
static void function(String username, String visibility, String[] roles, String artifactPath) throws APIManagementException { setResourcePermissions(username, visibility, roles, artifactPath, null); }
/** * This function is to set resource permissions based on its visibility * * @param username Username * @param visibility API visibility * @param roles Authorized roles * @param artifactPath API resource path * @throws APIManagementException Throwing exception */
This function is to set resource permissions based on its visibility
setResourcePermissions
{ "repo_name": "praminda/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/utils/RegistryPersistenceUtil.java", "license": "apache-2.0", "size": 88756 }
[ "org.wso2.carbon.apimgt.api.APIManagementException" ]
import org.wso2.carbon.apimgt.api.APIManagementException;
import org.wso2.carbon.apimgt.api.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,913,615
private Partition constructPartition( JobContext context, OutputJobInfo jobInfo, String partLocnRoot, String dynPartPath, Map<String, String> partKVs, HCatSchema outputSchema, Map<String, String> params, Table table, FileSystem fs, String grpName, FsPermission perms) throws IOException { Part...
Partition function( JobContext context, OutputJobInfo jobInfo, String partLocnRoot, String dynPartPath, Map<String, String> partKVs, HCatSchema outputSchema, Map<String, String> params, Table table, FileSystem fs, String grpName, FsPermission perms) throws IOException { Partition partition = new Partition(); partition....
/** * Generate partition metadata object to be used to add to metadata. * @param context The job context. * @param jobInfo The OutputJobInfo. * @param partLocnRoot The table-equivalent location root of the partition * (temporary dir if dynamic partition, table dir if static) * @p...
Generate partition metadata object to be used to add to metadata
constructPartition
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java", "license": "apache-2.0", "size": 43579 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.Map", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.permission.FsPermission", "org.apache.hadoop.hive.metastore.api.FieldSchema", "org.apache.hadoop.hive.metastore.api.Partition", "or...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metas...
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.ql.metadata.*; import org.apache.hadoop.hive.shims.*; import org.apache.hadoop.mapreduce.*; import org.apache.hive.hcatalog.data.sch...
[ "java.io", "java.util", "org.apache.hadoop", "org.apache.hive" ]
java.io; java.util; org.apache.hadoop; org.apache.hive;
2,492,480
@ApiModelProperty(example = "null", value = "Time the war was retracted but both sides could still shoot each other") public DateTime getRetracted() { return retracted; }
@ApiModelProperty(example = "null", value = STR) DateTime function() { return retracted; }
/** * Time the war was retracted but both sides could still shoot each other * @return retracted **/
Time the war was retracted but both sides could still shoot each other
getRetracted
{ "repo_name": "Tmin10/EVE-Security-Service", "path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/model/GetWarsWarIdOk.java", "license": "gpl-3.0", "size": 8579 }
[ "io.swagger.annotations.ApiModelProperty", "org.joda.time.DateTime" ]
import io.swagger.annotations.ApiModelProperty; import org.joda.time.DateTime;
import io.swagger.annotations.*; import org.joda.time.*;
[ "io.swagger.annotations", "org.joda.time" ]
io.swagger.annotations; org.joda.time;
2,588,923
EDataType getFeatureId();
EDataType getFeatureId();
/** * Returns the meta object for data type '{@link org.opengis.filter.identity.FeatureId <em>Feature Id</em>}'. * <!-- begin-user-doc --> <!-- * end-user-doc --> * @return the meta object for data type '<em>Feature Id</em>'. * @see org.opengis.filter.identity.FeatureId * @model instanceClass="org.o...
Returns the meta object for data type '<code>org.opengis.filter.identity.FeatureId Feature Id</code>'.
getFeatureId
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/Wfs20Package.java", "license": "lgpl-2.1", "size": 404067 }
[ "org.eclipse.emf.ecore.EDataType" ]
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,181,705
public UserCodeCharset getUserCodeCharset() { return userCodeCharset; }
UserCodeCharset function() { return userCodeCharset; }
/** * Get the character set for end-user verification codes * ({@code user_code}) for Device Flow. * * @return * The character set for end-user verification codes * ({@code user_code}) for Device Flow. * * @since 2.43 */
Get the character set for end-user verification codes (user_code) for Device Flow
getUserCodeCharset
{ "repo_name": "authlete/authlete-java-common", "path": "src/main/java/com/authlete/common/dto/Service.java", "license": "apache-2.0", "size": 222386 }
[ "com.authlete.common.types.UserCodeCharset" ]
import com.authlete.common.types.UserCodeCharset;
import com.authlete.common.types.*;
[ "com.authlete.common" ]
com.authlete.common;
1,505,222
if (isInitialized()) { mTracker.setScreenName(screenName); mTracker.send(new HitBuilders.AppViewBuilder().build()); LOGD(TAG, "Screen View recorded: " + screenName); } }
if (isInitialized()) { mTracker.setScreenName(screenName); mTracker.send(new HitBuilders.AppViewBuilder().build()); LOGD(TAG, STR + screenName); } }
/** * Log a specific screen view under the {@code screenName} string. */
Log a specific screen view under the screenName string
sendScreenView
{ "repo_name": "lokling/AndroiditoJZ", "path": "android/src/main/java/com/google/samples/apps/iosched/util/AnalyticsHelper.java", "license": "apache-2.0", "size": 14367 }
[ "com.google.android.gms.analytics.HitBuilders" ]
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.*;
[ "com.google.android" ]
com.google.android;
1,890,704
public void processInputChar(final File statsDir, final OutputStream os, final char c) throws IOException { System.out.print(c); // Deal with CLI prompt immediately... if((c == '>') && (0 == inputBuf.length())...
void function(final File statsDir, final OutputStream os, final char c) throws IOException { System.out.print(c); if((c == '>') && (0 == inputBuf.length())) { if(null != os) { os.write('E'); os.write('\n'); os.flush(); } return; } if((c == '\r') (c == '\n')) { if(0 == inputBuf.length()) { return; } switch(inputBuf.char...
/**Process a single new input char from the OpenTRV serial connection. * @param statsDir directory into which stats are saved * @param inputBuf buffer in which input for a single line is gathered * @param os output stream back to the OpernTRV unit, else null if not available * @param c new charac...
Process a single new input char from the OpenTRV serial connection
processInputChar
{ "repo_name": "opentrv/OpenTRV-Java", "path": "java/snapshots/0.0.5/util/IOHandlingV0p2.java", "license": "apache-2.0", "size": 11930 }
[ "java.io.File", "java.io.IOException", "java.io.OutputStream" ]
import java.io.File; import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,347,672
public static NumberFormat getNumberInstance(Locale inLocale) { return getInstance(inLocale, NUMBERSTYLE); }
static NumberFormat function(Locale inLocale) { return getInstance(inLocale, NUMBERSTYLE); }
/** * Returns a general-purpose number format for the specified locale. */
Returns a general-purpose number format for the specified locale
getNumberInstance
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "ojluni/src/main/java/java/text/NumberFormat.java", "license": "gpl-2.0", "size": 46245 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,217,488
OrderByOption getOrderByOption();
OrderByOption getOrderByOption();
/** * Gets the order by option. * @return a {@link OrderByOption} (but never <code>null</code>) */
Gets the order by option
getOrderByOption
{ "repo_name": "apache/olingo-odata4", "path": "lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/apply/OrderBy.java", "license": "apache-2.0", "size": 1273 }
[ "org.apache.olingo.server.api.uri.queryoption.OrderByOption" ]
import org.apache.olingo.server.api.uri.queryoption.OrderByOption;
import org.apache.olingo.server.api.uri.queryoption.*;
[ "org.apache.olingo" ]
org.apache.olingo;
1,038,389
public void unbindFromContext(Context context) { context.unbindService(this); }
void function(Context context) { context.unbindService(this); }
/** * Unbinds this service connection from the given context. * @param context The context to be unbound from. */
Unbinds this service connection from the given context
unbindFromContext
{ "repo_name": "slp/Telegram-FOSS", "path": "TMessagesProj/src/main/java/org/telegram/messenger/support/customtabs/PostMessageServiceConnection.java", "license": "gpl-2.0", "size": 4337 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,465,416
public boolean equals(Object thatObject) { //System.out.println("MimeTypeParameterList.equals("+this+","+thatObject+")"); if (!(thatObject instanceof MimeTypeParameterList)) { return false; } MimeTypeParameterList that = (MimeTypeParameterList)thatObject; if (this...
boolean function(Object thatObject) { if (!(thatObject instanceof MimeTypeParameterList)) { return false; } MimeTypeParameterList that = (MimeTypeParameterList)thatObject; if (this.size() != that.size()) { return false; } String name = null; String thisValue = null; String thatValue = null; Set<Map.Entry<String, String...
/** * Two parameter lists are considered equal if they have exactly * the same set of parameter names and associated values. The * order of the parameters is not considered. */
Two parameter lists are considered equal if they have exactly the same set of parameter names and associated values. The order of the parameters is not considered
equals
{ "repo_name": "lostdj/Jaklin-OpenJDK-JDK", "path": "src/java.desktop/share/classes/java/awt/datatransfer/MimeTypeParameterList.java", "license": "gpl-2.0", "size": 14977 }
[ "java.util.Iterator", "java.util.Map", "java.util.Set" ]
import java.util.Iterator; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
321,435
public void setVertices(Vertex[] vertices){ this.getGeometryInfo().reconstruct( vertices, this.getGeometryInfo().getNormals(), this.getGeometryInfo().getIndices(), this.isUseDirectGL(), this.isUseVBOs(), this.getStyleInfo()); if (this.isBoundsAutoCompute()){ if (geomet...
void function(Vertex[] vertices){ this.getGeometryInfo().reconstruct( vertices, this.getGeometryInfo().getNormals(), this.getGeometryInfo().getIndices(), this.isUseDirectGL(), this.isUseVBOs(), this.getStyleInfo()); if (this.isBoundsAutoCompute()){ if (geometryInfo.getVertices().length >= 3){ this.setBounds(this.comput...
/** * Sets new vertices for that shape. * and generates new vertex arrays for opengl mode. * <li>Re-computes and sets the shapes default bounding shape. * * @param vertices the vertices */
Sets new vertices for that shape. and generates new vertex arrays for opengl mode. Re-computes and sets the shapes default bounding shape
setVertices
{ "repo_name": "nppotdar/touchtable-menu", "path": "src/org/mt4j/components/visibleComponents/shapes/AbstractShape.java", "license": "gpl-2.0", "size": 55997 }
[ "org.mt4j.util.math.Vertex" ]
import org.mt4j.util.math.Vertex;
import org.mt4j.util.math.*;
[ "org.mt4j.util" ]
org.mt4j.util;
655,551
public Adapter createDateAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link iso20022.Date <em>Date</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @retur...
Creates a new adapter for an object of class '<code>iso20022.Date Date</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createDateAdapter
{ "repo_name": "ISO20022ArchitectForum/sample-code-public", "path": "DLT/Corda/ISO20022Generated/src/iso20022/util/Iso20022AdapterFactory.java", "license": "apache-2.0", "size": 55827 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
781,740
public List<String> getAllDescription() { List<String> result = new ArrayList<String>(); List<Node> nodes = childNode.get("description"); for (Node node : nodes) { result.add(node.getText()); } return result; }
List<String> function() { List<String> result = new ArrayList<String>(); List<Node> nodes = childNode.get(STR); for (Node node : nodes) { result.add(node.getText()); } return result; }
/** * Returns all <code>description</code> elements * @return list of <code>description</code> */
Returns all <code>description</code> elements
getAllDescription
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar30/InterceptorBindingTypeImpl.java", "license": "epl-1.0", "size": 13140 }
[ "java.util.ArrayList", "java.util.List", "org.jboss.shrinkwrap.descriptor.spi.node.Node" ]
import java.util.ArrayList; import java.util.List; import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import java.util.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;
[ "java.util", "org.jboss.shrinkwrap" ]
java.util; org.jboss.shrinkwrap;
937,627
public List<String> disabledAlerts() { return this.disabledAlerts; }
List<String> function() { return this.disabledAlerts; }
/** * Get the disabledAlerts value. * * @return the disabledAlerts value */
Get the disabledAlerts value
disabledAlerts
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "postgresql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/postgresql/v2017_12_01/implementation/ServerSecurityAlertPolicyInner.java", "license": "mit", "size": 6069 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
214,987
private boolean isSubsettingPermitted(TrueTypeFont ttf) throws IOException { if (ttf.getOS2Windows() != null) { int fsType = ttf.getOS2Windows().getFsType(); if ((fsType & OS2WindowsMetricsTable.FSTYPE_NO_SUBSETTING) == OS2WindowsMetricsTable.FST...
boolean function(TrueTypeFont ttf) throws IOException { if (ttf.getOS2Windows() != null) { int fsType = ttf.getOS2Windows().getFsType(); if ((fsType & OS2WindowsMetricsTable.FSTYPE_NO_SUBSETTING) == OS2WindowsMetricsTable.FSTYPE_NO_SUBSETTING) { return false; } } return true; }
/** * Returns true if the fsType in the OS/2 table permits subsetting. */
Returns true if the fsType in the OS/2 table permits subsetting
isSubsettingPermitted
{ "repo_name": "benmccann/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/TrueTypeEmbedder.java", "license": "apache-2.0", "size": 10755 }
[ "java.io.IOException", "org.apache.fontbox.ttf.OS2WindowsMetricsTable", "org.apache.fontbox.ttf.TrueTypeFont" ]
import java.io.IOException; import org.apache.fontbox.ttf.OS2WindowsMetricsTable; import org.apache.fontbox.ttf.TrueTypeFont;
import java.io.*; import org.apache.fontbox.ttf.*;
[ "java.io", "org.apache.fontbox" ]
java.io; org.apache.fontbox;
1,185,401
public synchronized Vector<Measurement> getHistoric() { return historic; }
synchronized Vector<Measurement> function() { return historic; }
/** * Gets the historic measurements for the sensor * * @return The historic measurements */
Gets the historic measurements for the sensor
getHistoric
{ "repo_name": "Razican/RDO-server", "path": "src/com/example/rdo_server/sensors/Sensor.java", "license": "gpl-3.0", "size": 1959 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
511,817
public void closeSubPath() throws IOException { if (inTextMode) { throw new IOException("Error: closeSubPath is not allowed within a text block."); } appendRawCommands(CLOSE_SUBPATH); }
void function() throws IOException { if (inTextMode) { throw new IOException(STR); } appendRawCommands(CLOSE_SUBPATH); }
/** * Close subpath. * * @throws IOException If there is an error while closing the subpath. */
Close subpath
closeSubPath
{ "repo_name": "sencko/NALB", "path": "nalb2013/src/org/apache/pdfbox/pdmodel/edit/PDPageContentStream.java", "license": "gpl-2.0", "size": 48071 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
957,913
public ServiceCall<Void> putValidAsync(Siamese complexBody, final ServiceCallback<Void> serviceCallback) { return ServiceCall.fromResponse(putValidWithServiceResponseAsync(complexBody), serviceCallback); }
ServiceCall<Void> function(Siamese complexBody, final ServiceCallback<Void> serviceCallback) { return ServiceCall.fromResponse(putValidWithServiceResponseAsync(complexBody), serviceCallback); }
/** * Put complex types that extend others. * * @param complexBody Please put a siamese with id=2, name="Siameee", color=green, breed=persion, which hates 2 dogs, the 1st one named "Potato" with id=1 and food="tomato", and the 2nd one named "Tomato" with id=-1 and food="french fries". * @param servi...
Put complex types that extend others
putValidAsync
{ "repo_name": "matthchr/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodycomplex/implementation/InheritancesImpl.java", "license": "mit", "size": 8331 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,079,301
public void show(PrintWriter prw) { if (prw == null) { prw = new PrintWriter(System.out, true); } prw.println("<resource "); prw.println(" id=" + quote(id)); prw.println(" class=" + quote(zenoClass)); prw.println(" title=" + quote(title)); prw.println(" rank=" + quote(rank)); ...
void function(PrintWriter prw) { if (prw == null) { prw = new PrintWriter(System.out, true); } prw.println(STR); prw.println(STR + quote(id)); prw.println(STR + quote(zenoClass)); prw.println(STR + quote(title)); prw.println(STR + quote(rank)); prw.println(STR + quote(creator)); prw.println(STR + quote(creationDate)); ...
/** * Description of the Method * *@param prw Description of Parameter *@since */
Description of the Method
show
{ "repo_name": "tfgordon/zeno", "path": "src/zeno2/db/ResourceImpl.java", "license": "gpl-2.0", "size": 43431 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
64,726
public static NumberFormat getNumberFormat(int maximumFractionDigits) { NumberFormat format = NumberFormat.getInstance(Locale.ENGLISH); format.setMaximumFractionDigits(maximumFractionDigits); format.setGroupingUsed(false); return format; }
static NumberFormat function(int maximumFractionDigits) { NumberFormat format = NumberFormat.getInstance(Locale.ENGLISH); format.setMaximumFractionDigits(maximumFractionDigits); format.setGroupingUsed(false); return format; }
/** Return a number formatter with maximum fraction digits, no grouping, locale ENGLISH. */
Return a number formatter with maximum fraction digits
getNumberFormat
{ "repo_name": "noe/sgf.importer", "path": "src/sgfimporter/util/StringUtil.java", "license": "gpl-2.0", "size": 7845 }
[ "java.text.NumberFormat", "java.util.Locale" ]
import java.text.NumberFormat; import java.util.Locale;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
94,493
private static PluginResourceProvider m_designTimePluginResourceProvider = null; @Deprecated public static Image getPluginImage(Object plugin, String name) { try { URL url = getPluginImageURL(plugin, name); if (url != null) { return getPluginImageFromUrl(url); } } catch (Throwable e) { // Ign...
static PluginResourceProvider m_designTimePluginResourceProvider = null; public static Image function(Object plugin, String name) { try { URL url = getPluginImageURL(plugin, name); if (url != null) { return getPluginImageFromUrl(url); } } catch (Throwable e) { } return null; }
/** * Returns an {@link Image} based on a plugin and file path. * * @param plugin * the plugin {@link Object} containing the image * @param name * the path to the image within the plugin * @return the {@link Image} stored in the file at the specified path * * @deprecated Use {@...
Returns an <code>Image</code> based on a plugin and file path
getPluginImage
{ "repo_name": "kozzeluc/dmlj", "path": "Eclipse CA IDMS Schema Diagram Editor/bundles/org.lh.dmlj.schema.editor.dictionary.tools/src/org/eclipse/wb/swt/ResourceManager.java", "license": "gpl-3.0", "size": 14374 }
[ "org.eclipse.swt.graphics.Image" ]
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,786,317
public Cohort getPatientsHavingEncounters(EncounterType encounterType, Location location, Form form, Date fromDate, Date toDate, Integer minCount, Integer maxCount);
Cohort function(EncounterType encounterType, Location location, Form form, Date fromDate, Date toDate, Integer minCount, Integer maxCount);
/** * Searches for patients who have encounters as described by the arguments to this method * * @param encounterType * @param location * @param form * @param fromDate * @param toDate * @param minCount * @param maxCount * @return all patients with encounters matching the arguments to this method ...
Searches for patients who have encounters as described by the arguments to this method
getPatientsHavingEncounters
{ "repo_name": "kabariyamilind/openMRSDEV", "path": "api/src/main/java/org/openmrs/api/PatientSetService.java", "license": "mpl-2.0", "size": 20177 }
[ "java.util.Date", "org.openmrs.Cohort", "org.openmrs.EncounterType", "org.openmrs.Form", "org.openmrs.Location" ]
import java.util.Date; import org.openmrs.Cohort; import org.openmrs.EncounterType; import org.openmrs.Form; import org.openmrs.Location;
import java.util.*; import org.openmrs.*;
[ "java.util", "org.openmrs" ]
java.util; org.openmrs;
285,546
@Override public void ejbPassivate() throws RemoteException { throw new UnsupportedOperationException(); // OK } // ejbPassivate
void function() throws RemoteException { throw new UnsupportedOperationException(); }
/** * EJS homes must never be passivated. <p> */
EJS homes must never be passivated.
ejbPassivate
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSHome.java", "license": "epl-1.0", "size": 155847 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
1,389,889
public final Provider getProvider() { return provider; }
final Provider function() { return provider; }
/** * Returns the provider for this {@code TrustManagerFactory} instance. * * @return the provider for this {@code TrustManagerFactory} instance. */
Returns the provider for this TrustManagerFactory instance
getProvider
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java", "license": "gpl-2.0", "size": 8666 }
[ "java.security.Provider" ]
import java.security.Provider;
import java.security.*;
[ "java.security" ]
java.security;
2,573,840
public final void refreshSystemConfig() throws IOException { config.save(true); }
final void function() throws IOException { config.save(true); }
/** * Refreshes the backing {@link ConfigurationNode} and saves the {@link SystemConfig}. * * @throws IOException If the config could not be saved. */
Refreshes the backing <code>ConfigurationNode</code> and saves the <code>SystemConfig</code>
refreshSystemConfig
{ "repo_name": "NucleusPowered/QuickStartModuleLoader", "path": "src/main/java/uk/co/drnaylor/quickstart/ModuleHolder.java", "license": "mit", "size": 40035 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,013,357
protected DoublyIndexedTable getTraitInformationTable() { return xmlTraitInformation; }
DoublyIndexedTable function() { return xmlTraitInformation; }
/** * Returns the table of TraitInformation objects for this element. */
Returns the table of TraitInformation objects for this element
getTraitInformationTable
{ "repo_name": "Groostav/CMPT880-term-project", "path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/svg/SVGOMFEDisplacementMapElement.java", "license": "apache-2.0", "size": 6084 }
[ "org.apache.batik.dom.util.DoublyIndexedTable" ]
import org.apache.batik.dom.util.DoublyIndexedTable;
import org.apache.batik.dom.util.*;
[ "org.apache.batik" ]
org.apache.batik;
1,772,062
private void registerEventProcessor() { Stopwatchs.start("Register Event Processors"); LOGGER.log(Level.INFO, "Registering event processors...."); try { final EventManager eventManager = beanManager.getReference(EventManager.class); // Comment eventManag...
void function() { Stopwatchs.start(STR); LOGGER.log(Level.INFO, STR); try { final EventManager eventManager = beanManager.getReference(EventManager.class); eventManager.registerListener(new ArticleCommentReplyNotifier()); eventManager.registerListener(new PageCommentReplyNotifier()); eventManager.registerListener(new P...
/** * Register event processors. */
Register event processors
registerEventProcessor
{ "repo_name": "sshiting/solo", "path": "src/main/java/org/b3log/solo/SoloServletListener.java", "license": "apache-2.0", "size": 10604 }
[ "org.b3log.latke.event.EventManager", "org.b3log.latke.logging.Level", "org.b3log.latke.plugin.ViewLoadEventHandler", "org.b3log.latke.util.Stopwatchs", "org.b3log.solo.event.comment.ArticleCommentReplyNotifier", "org.b3log.solo.event.comment.PageCommentReplyNotifier", "org.b3log.solo.event.plugin.Plugi...
import org.b3log.latke.event.EventManager; import org.b3log.latke.logging.Level; import org.b3log.latke.plugin.ViewLoadEventHandler; import org.b3log.latke.util.Stopwatchs; import org.b3log.solo.event.comment.ArticleCommentReplyNotifier; import org.b3log.solo.event.comment.PageCommentReplyNotifier; import org.b3log.sol...
import org.b3log.latke.event.*; import org.b3log.latke.logging.*; import org.b3log.latke.plugin.*; import org.b3log.latke.util.*; import org.b3log.solo.event.comment.*; import org.b3log.solo.event.plugin.*; import org.b3log.solo.event.rhythm.*; import org.b3log.solo.event.symphony.*;
[ "org.b3log.latke", "org.b3log.solo" ]
org.b3log.latke; org.b3log.solo;
1,357,738
public static Path validateAndNormalizeUri(URI archiveDirUri) { final String scheme = archiveDirUri.getScheme(); final String path = archiveDirUri.getPath(); // some validity checks if (scheme == null) { throw new IllegalArgumentException("The scheme (hdfs://, file://, etc) is null. " + "Please speci...
static Path function(URI archiveDirUri) { final String scheme = archiveDirUri.getScheme(); final String path = archiveDirUri.getPath(); if (scheme == null) { throw new IllegalArgumentException(STRPlease specify the file system scheme explicitly in the URI.STRThe path to store the job archive data in is null. STRPlease ...
/** * Checks and normalizes the given URI. This method first checks the validity of the * URI (scheme and path are not null) and then normalizes the URI to a path. * * @param archiveDirUri The URI to check and normalize. * @return A normalized URI as a Path. * * @throws IllegalArgumentException Thrown, if...
Checks and normalizes the given URI. This method first checks the validity of the URI (scheme and path are not null) and then normalizes the URI to a path
validateAndNormalizeUri
{ "repo_name": "zohar-mizrahi/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/WebMonitorUtils.java", "license": "apache-2.0", "size": 9993 }
[ "org.apache.flink.core.fs.Path" ]
import org.apache.flink.core.fs.Path;
import org.apache.flink.core.fs.*;
[ "org.apache.flink" ]
org.apache.flink;
1,785,727
@Test(expected = AuditException.class) public void invalidDataSourceNameTest() throws FactoryException, AuditException, UnsupportedEncodingException, SQLException { Map<String, String> props = new HashMap<>(); // the JDBC Processor configuration props.put(MapBasedJdbcPropsB...
@Test(expected = AuditException.class) void function() throws FactoryException, AuditException, UnsupportedEncodingException, SQLException { Map<String, String> props = new HashMap<>(); props.put(MapBasedJdbcPropsBuilder.KEY_DATA_SOURCE_NAME, DS_NAME + STR); props.put(MapBasedJdbcPropsBuilder.KEY_EVENT_ID_FIELD_NAME, E...
/** * Test that an invalid data source name throws an exception */
Test that an invalid data source name throws an exception
invalidDataSourceNameTest
{ "repo_name": "mbeiter/eaudit4j", "path": "processors/jdbc/src/test/java/org/beiter/michael/eaudit4j/processors/jdbc/JdbcDsProcessorTest.java", "license": "bsd-3-clause", "size": 11480 }
[ "java.io.UnsupportedEncodingException", "java.sql.SQLException", "java.util.HashMap", "java.util.Map", "org.beiter.michael.eaudit4j.common.Audit", "org.beiter.michael.eaudit4j.common.AuditException", "org.beiter.michael.eaudit4j.common.AuditFactory", "org.beiter.michael.eaudit4j.common.Event", "org....
import java.io.UnsupportedEncodingException; import java.sql.SQLException; import java.util.HashMap; import java.util.Map; import org.beiter.michael.eaudit4j.common.Audit; import org.beiter.michael.eaudit4j.common.AuditException; import org.beiter.michael.eaudit4j.common.AuditFactory; import org.beiter.michael.eaudit4j...
import java.io.*; import java.sql.*; import java.util.*; import org.beiter.michael.eaudit4j.common.*; import org.beiter.michael.eaudit4j.processors.jdbc.propsbuilder.*; import org.junit.*;
[ "java.io", "java.sql", "java.util", "org.beiter.michael", "org.junit" ]
java.io; java.sql; java.util; org.beiter.michael; org.junit;
2,469,250
public Document processing(String input, String assetPath) { return processing(input, assetPath, -1, -1); }
Document function(String input, String assetPath) { return processing(input, assetPath, -1, -1); }
/** * Segment a PDF document into high level zones: cover page, document header, * page footer, page header, body, page numbers, biblio section and annexes. * * @param input filename of pdf file * @param assetPath if not null, the PDF assets (embedded images) will be extracted and * ...
Segment a PDF document into high level zones: cover page, document header, page footer, page header, body, page numbers, biblio section and annexes
processing
{ "repo_name": "chrismattmann/grobid", "path": "grobid-core/src/main/java/org/grobid/core/engines/Segmentation.java", "license": "apache-2.0", "size": 54605 }
[ "org.grobid.core.document.Document" ]
import org.grobid.core.document.Document;
import org.grobid.core.document.*;
[ "org.grobid.core" ]
org.grobid.core;
2,246,439
public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); }
void function(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); }
/** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */
Write a object instance to data output stream
tightMarshal2
{ "repo_name": "jonathanchristison/fabric8", "path": "gateway/gateway-core/src/main/java/io/fabric8/gateway/handlers/detecting/protocol/openwire/codec/v1/ActiveMQObjectMessageMarshaller.java", "license": "apache-2.0", "size": 3689 }
[ "io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.BooleanStream", "io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat", "java.io.IOException", "org.fusesource.hawtbuf.DataByteArrayOutputStream" ]
import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.BooleanStream; import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat; import java.io.IOException; import org.fusesource.hawtbuf.DataByteArrayOutputStream;
import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.*; import java.io.*; import org.fusesource.hawtbuf.*;
[ "io.fabric8.gateway", "java.io", "org.fusesource.hawtbuf" ]
io.fabric8.gateway; java.io; org.fusesource.hawtbuf;
1,411,165
protected StringBuffer consolidateFieldNames(List fieldNames, String delimiter) { StringBuffer sb = new StringBuffer(); // setup some vars boolean firstPass = true; String delim = ""; // walk through the list for (Iterator iter = fieldNames.iterator(); iter....
StringBuffer function(List fieldNames, String delimiter) { StringBuffer sb = new StringBuffer(); boolean firstPass = true; String delim = ""; for (Iterator iter = fieldNames.iterator(); iter.hasNext(); ) { String fieldName = (String) iter.next(); sb.append(delim + getDataDictionaryService().getAttributeLabel(newDataObj...
/** * This method turns a list of field property names, into a delimited string of the human-readable names. * * @param fieldNames - List of fieldNames * @return A filled StringBuffer ready to go in an error message */
This method turns a list of field property names, into a delimited string of the human-readable names
consolidateFieldNames
{ "repo_name": "sbower/kuali-rice-1", "path": "krad/krad-web-framework/src/main/java/org/kuali/rice/krad/rules/MaintenanceDocumentRuleBase.java", "license": "apache-2.0", "size": 61237 }
[ "java.util.Iterator", "java.util.List" ]
import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
956,609
public static Connection initialize() throws Exception { //gets the data source from the configuration builder. dataSource = StatusMonitorConfigurationBuilder.getDataSource(); //gets the sql connection. getConnection(); //initializes the service and state lists. ser...
static Connection function() throws Exception { dataSource = StatusMonitorConfigurationBuilder.getDataSource(); getConnection(); serviceList = getServiceNamesList(); statusList = getStateNameList(); if (log.isDebugEnabled()) { log.debug(STR); } return conn; }
/** * gets the sql connection and initializes the MySQLConnectionInitializer. * * @return Static Connection * @throws Exception, throws exception MySQLConnectionInitializer */
gets the sql connection and initializes the MySQLConnectionInitializer
initialize
{ "repo_name": "panelion/incubator-stratos", "path": "components/org.apache.stratos.status.monitor.core/src/main/java/org/apache/stratos/status/monitor/core/jdbc/MySQLConnectionInitializer.java", "license": "apache-2.0", "size": 8345 }
[ "java.sql.Connection", "org.apache.stratos.status.monitor.core.StatusMonitorConfigurationBuilder" ]
import java.sql.Connection; import org.apache.stratos.status.monitor.core.StatusMonitorConfigurationBuilder;
import java.sql.*; import org.apache.stratos.status.monitor.core.*;
[ "java.sql", "org.apache.stratos" ]
java.sql; org.apache.stratos;
2,228,665
public final boolean checkTXOnRemoteNode() { // Remote TX may have TXStateProxy set and may go down to TXState. // Reverse means will take function execution route which will set the // TXStateProxy in GemFireTransaction in any case. final TXStateInterface tx = this.txState; return tx == TXStatePr...
final boolean function() { final TXStateInterface tx = this.txState; return tx == TXStateProxy.TX_NOT_SET tx == null tx.getProxy() == tx; }
/** * Check if TXState on remote node may need to be set from thread-local one. * This is used only by {@link GfxdIndexManager} currently. */
Check if TXState on remote node may need to be set from thread-local one. This is used only by <code>GfxdIndexManager</code> currently
checkTXOnRemoteNode
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/engine/access/GemFireTransaction.java", "license": "apache-2.0", "size": 148971 }
[ "com.gemstone.gemfire.internal.cache.TXStateInterface", "com.gemstone.gemfire.internal.cache.TXStateProxy" ]
import com.gemstone.gemfire.internal.cache.TXStateInterface; import com.gemstone.gemfire.internal.cache.TXStateProxy;
import com.gemstone.gemfire.internal.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
472,054
@Override public int setValue(RequestToken iValue, boolean iAdmin, IValidatorFactory validatorFactory) { // Never are allowed to set a _count keyword element, even as an // admin action return DMErrorCodes.SET_KEYWORD; }
int function(RequestToken iValue, boolean iAdmin, IValidatorFactory validatorFactory) { return DMErrorCodes.SET_KEYWORD; }
/** * Attempt to set the value of this data model element to the value * indicated by the dot-notation token. * * @param iValue * A token (<code>RequestToken</code>) object that provides the * value to be set and may include a set of delimiters. * @param iAdmin * ...
Attempt to set the value of this data model element to the value indicated by the dot-notation token
setValue
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "scorm/scorm-api/src/java/org/adl/datamodels/Count.java", "license": "apache-2.0", "size": 7910 }
[ "org.adl.datamodels.ieee.IValidatorFactory" ]
import org.adl.datamodels.ieee.IValidatorFactory;
import org.adl.datamodels.ieee.*;
[ "org.adl.datamodels" ]
org.adl.datamodels;
1,421,109
public Node find(Node node) throws XPathException { if (node == null) throw new NullPointerException(); Env env = XPath.createEnv(); // XXX: doesn't make sense for a match to have a context? //env.setCurrentNode(node); //env.setContextNode(node); Iterator iter = pattern.selec...
Node function(Node node) throws XPathException { if (node == null) throw new NullPointerException(); Env env = XPath.createEnv(); Iterator iter = pattern.select(node, env); Node value = null; if (iter.hasNext()) value = (Node) iter.next(); XPath.freeEnv(env); return value; }
/** * Returns the first node matching the pattern. The pattern should * be a select pattern. * * @param node node represented by '.' and start of match. * * @return first matching node */
Returns the first node matching the pattern. The pattern should be a select pattern
find
{ "repo_name": "dlitz/resin", "path": "modules/kernel/src/com/caucho/xpath/Pattern.java", "license": "gpl-2.0", "size": 5564 }
[ "java.util.Iterator", "org.w3c.dom.Node" ]
import java.util.Iterator; import org.w3c.dom.Node;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
21,202
public Builder applyToAllUnaryMethods( ApiFunction<UnaryCallSettings.Builder, Void> settingsUpdater) throws Exception { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
Builder function( ApiFunction<UnaryCallSettings.Builder, Void> settingsUpdater) throws Exception { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
/** * Applies the given settings updater function to all of the unary API methods in this service. * * <p>Note: This method does not support applying settings to streaming methods. */
Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods
applyToAllUnaryMethods
{ "repo_name": "shinfan/gcloud-java", "path": "google-cloud-logging/src/main/java/com/google/cloud/logging/v2/MetricsSettings.java", "license": "apache-2.0", "size": 19916 }
[ "com.google.api.core.ApiFunction", "com.google.api.gax.rpc.UnaryCallSettings" ]
import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.core.*; import com.google.api.gax.rpc.*;
[ "com.google.api" ]
com.google.api;
2,786,903
private void refreshListViewHeight(ListView listView) { ListAdapter listAdapter = listView.getAdapter(); int totalHeight = 0; for (int i = 0; i < listAdapter.getCount(); i++) { View listItem = listAdapter.getView(i, null, listView); listItem.measure(0, 0); ...
void function(ListView listView) { ListAdapter listAdapter = listView.getAdapter(); int totalHeight = 0; for (int i = 0; i < listAdapter.getCount(); i++) { View listItem = listAdapter.getView(i, null, listView); listItem.measure(0, 0); totalHeight += listItem.getMeasuredHeight(); } ViewGroup.LayoutParams params = listV...
/** * Refresh the listview height because the listviews are displayed in a scrollview. * @param listView the listview. */
Refresh the listview height because the listviews are displayed in a scrollview
refreshListViewHeight
{ "repo_name": "matrix-org/matrix-android-console", "path": "console/src/main/java/org/matrix/console/activity/NotificationSettingsActivity.java", "license": "apache-2.0", "size": 14329 }
[ "android.view.View", "android.view.ViewGroup", "android.widget.ListAdapter", "android.widget.ListView" ]
import android.view.View; import android.view.ViewGroup; import android.widget.ListAdapter; import android.widget.ListView;
import android.view.*; import android.widget.*;
[ "android.view", "android.widget" ]
android.view; android.widget;
2,539,343
private static void encodeDataPair(final StringBuilder buffer, final String key, final String value) throws UnsupportedEncodingException { buffer.append('&').append(encode(key)).append('=').append(encode(value)); }
static void function(final StringBuilder buffer, final String key, final String value) throws UnsupportedEncodingException { buffer.append('&').append(encode(key)).append('=').append(encode(value)); }
/** * <p>Encode a key/value data pair to be used in a HTTP post request. This INCLUDES a & so the first * key/value pair MUST be included manually, e.g:</p> * <code> * StringBuffer data = new StringBuffer(); * data.append(encode("guid")).append('=').append(encode(guid)); * encodeDataPair(d...
Encode a key/value data pair to be used in a HTTP post request. This INCLUDES a & so the first key/value pair MUST be included manually, e.g: <code> StringBuffer data = new StringBuffer(); data.append(encode("guid")).append('=').append(encode(guid)); encodeDataPair(data, "version", description.getVersion()); </code>
encodeDataPair
{ "repo_name": "doglover129/GriefLog", "path": "src/tk/blackwolf12333/grieflog/Metrics.java", "license": "gpl-3.0", "size": 22804 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
40,555
@Test @MediumTest public void testUploadingWithoutCrashDir() { File webviewCrashDir = mTestRule.getExistingCacheDir(); // Delete the WebView crash directory to ensure MinidumpUploadJob doesn't crash without it. FileUtils.recursivelyDeleteFile(webviewCrashDir, FileUtils.DELETE_ALL); ...
void function() { File webviewCrashDir = mTestRule.getExistingCacheDir(); FileUtils.recursivelyDeleteFile(webviewCrashDir, FileUtils.DELETE_ALL); Assert.assertFalse(webviewCrashDir.exists()); PlatformServiceBridge.injectInstance(new TestPlatformServiceBridge(true)); final CrashReportingPermissionManager permManager = n...
/** * Ensure MinidumpUploadJobImpl doesn't crash even if the WebView Crash dir doesn't exist (could * happen e.g. if a Job persists across WebView-updates? * * MinidumpUploadJobImpl should automatically recreate the directory. */
Ensure MinidumpUploadJobImpl doesn't crash even if the WebView Crash dir doesn't exist (could happen e.g. if a Job persists across WebView-updates? MinidumpUploadJobImpl should automatically recreate the directory
testUploadingWithoutCrashDir
{ "repo_name": "endlessm/chromium-browser", "path": "android_webview/javatests/src/org/chromium/android_webview/test/services/MinidumpUploadJobTest.java", "license": "bsd-3-clause", "size": 21773 }
[ "java.io.File", "org.chromium.android_webview.common.PlatformServiceBridge", "org.chromium.base.FileUtils", "org.chromium.components.minidump_uploader.CrashTestRule", "org.chromium.components.minidump_uploader.util.CrashReportingPermissionManager", "org.junit.Assert" ]
import java.io.File; import org.chromium.android_webview.common.PlatformServiceBridge; import org.chromium.base.FileUtils; import org.chromium.components.minidump_uploader.CrashTestRule; import org.chromium.components.minidump_uploader.util.CrashReportingPermissionManager; import org.junit.Assert;
import java.io.*; import org.chromium.android_webview.common.*; import org.chromium.base.*; import org.chromium.components.minidump_uploader.*; import org.chromium.components.minidump_uploader.util.*; import org.junit.*;
[ "java.io", "org.chromium.android_webview", "org.chromium.base", "org.chromium.components", "org.junit" ]
java.io; org.chromium.android_webview; org.chromium.base; org.chromium.components; org.junit;
1,161,035
@XmlElement(name="serializable",namespace=Const.XJC_EXTENSION_URI) void setXjcSerializable(BISerializable s) { this.serializable = s; } private static final class TypeSubstitutionElement { @XmlAttribute String type; }
@XmlElement(name=STR,namespace=Const.XJC_EXTENSION_URI) void setXjcSerializable(BISerializable s) { this.serializable = s; } private static final class TypeSubstitutionElement { String type; }
/** * Another 1.0 compatibility customization (but we accept it * and treat it as {@link #serializable}) */
Another 1.0 compatibility customization (but we accept it and treat it as <code>#serializable</code>)
setXjcSerializable
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/BIGlobalBinding.java", "license": "mit", "size": 19169 }
[ "com.sun.tools.internal.xjc.reader.Const", "javax.xml.bind.annotation.XmlElement" ]
import com.sun.tools.internal.xjc.reader.Const; import javax.xml.bind.annotation.XmlElement;
import com.sun.tools.internal.xjc.reader.*; import javax.xml.bind.annotation.*;
[ "com.sun.tools", "javax.xml" ]
com.sun.tools; javax.xml;
2,723,867
@Override public int compareTo(ContainerInfo o) { return this.compare(this, o); } public static class Builder { private HddsProtos.LifeCycleState state; private Pipeline pipeline; private long allocated; private long used; private long keys; private long stateEnterTime; priva...
int function(ContainerInfo o) { return this.compare(this, o); } public static class Builder { private HddsProtos.LifeCycleState state; private Pipeline pipeline; private long allocated; private long used; private long keys; private long stateEnterTime; private String owner; private String containerName; private long co...
/** * Compares this object with the specified object for order. Returns a * negative integer, zero, or a positive integer as this object is less than, * equal to, or greater than the specified object. * * @param o the object to be compared. * @return a negative integer, zero, or a positive integer as...
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
compareTo
{ "repo_name": "ChetnaChaudhari/hadoop", "path": "hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/common/helpers/ContainerInfo.java", "license": "apache-2.0", "size": 9754 }
[ "org.apache.hadoop.hdds.protocol.proto.HddsProtos" ]
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
import org.apache.hadoop.hdds.protocol.proto.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
888,544
InputStream getContentStream() throws MessagingException { if (mimePart != null) { return mimePart.read(); } if (contentStream != null) return ((SharedInputStream)contentStream).newStream(0, -1); if (content != null) return new ByteArrayInputStrea...
InputStream getContentStream() throws MessagingException { if (mimePart != null) { return mimePart.read(); } if (contentStream != null) return ((SharedInputStream)contentStream).newStream(0, -1); if (content != null) return new ByteArrayInputStream(content,start,contentLength); throw new MessagingException(STR); }
/** * Produce the raw bytes of the content. This method is used * when creating a DataHandler object for the content. Subclasses * that can provide a separate input stream for just the MimeBodyPart * content might want to override this method. <p> * * @see #content */
Produce the raw bytes of the content. This method is used when creating a DataHandler object for the content. Subclasses that can provide a separate input stream for just the MimeBodyPart content might want to override this method.
getContentStream
{ "repo_name": "FauxFaux/jdk9-jaxws", "path": "src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java", "license": "gpl-2.0", "size": 42154 }
[ "com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException", "java.io.ByteArrayInputStream", "java.io.InputStream" ]
import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; import java.io.ByteArrayInputStream; import java.io.InputStream;
import com.sun.xml.internal.messaging.saaj.packaging.mime.*; import java.io.*;
[ "com.sun.xml", "java.io" ]
com.sun.xml; java.io;
2,229,393
default Future<?> submit( String executorName, Runnable task ) { return executor( executorName ).submit( task ); }
default Future<?> submit( String executorName, Runnable task ) { return executor( executorName ).submit( task ); }
/** * Submits a Runnable task to a configured Application Executor and returns a Future representing that task. * <p> * The Future's get method will return null upon successful completion * See {@link ExecutorService#submit(java.lang.Runnable)}. * * @param executorName The name of a config...
Submits a Runnable task to a configured Application Executor and returns a Future representing that task. The Future's get method will return null upon successful completion See <code>ExecutorService#submit(java.lang.Runnable)</code>
submit
{ "repo_name": "werval/werval", "path": "io.werval/io.werval.api/src/main/java/io/werval/api/ApplicationExecutors.java", "license": "apache-2.0", "size": 17469 }
[ "java.util.concurrent.Future" ]
import java.util.concurrent.Future;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,599,937
private IndexColumn calculateAffinityKeyColumn() { // If custome affinity key mapper is set, we do not know how to convert _KEY to partition, return null. if (desc.type().customAffinityKeyMapper()) return null; String affKeyFieldName = desc.type().affinityKey(); // If e...
IndexColumn function() { if (desc.type().customAffinityKeyMapper()) return null; String affKeyFieldName = desc.type().affinityKey(); if (affKeyFieldName == null) return indexColumn(QueryUtils.KEY_COL, SortOrder.ASCENDING); if (!doesColumnExist(affKeyFieldName)) return null; int colId = getColumn(affKeyFieldName).getCol...
/** * Calculate affinity key column which will be used for partition pruning and distributed joins. * * @return Affinity column or {@code null} if none can be used. */
Calculate affinity key column which will be used for partition pruning and distributed joins
calculateAffinityKeyColumn
{ "repo_name": "ptupitsyn/ignite", "path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java", "license": "apache-2.0", "size": 41418 }
[ "org.apache.ignite.internal.processors.query.QueryUtils", "org.h2.result.SortOrder", "org.h2.table.IndexColumn" ]
import org.apache.ignite.internal.processors.query.QueryUtils; import org.h2.result.SortOrder; import org.h2.table.IndexColumn;
import org.apache.ignite.internal.processors.query.*; import org.h2.result.*; import org.h2.table.*;
[ "org.apache.ignite", "org.h2.result", "org.h2.table" ]
org.apache.ignite; org.h2.result; org.h2.table;
2,608,705
@Nullable() public final String getStartupID() { return startupID; }
@Nullable() final String function() { return startupID; }
/** * Retrieves the Directory Server startup ID for this access log message. * * @return The Directory Server startup ID for this access log message, or * {@code null} if it is not included in the log message. */
Retrieves the Directory Server startup ID for this access log message
getStartupID
{ "repo_name": "UnboundID/ldapsdk", "path": "src/com/unboundid/ldap/sdk/unboundidds/logs/AccessLogMessage.java", "license": "gpl-2.0", "size": 5504 }
[ "com.unboundid.util.Nullable" ]
import com.unboundid.util.Nullable;
import com.unboundid.util.*;
[ "com.unboundid.util" ]
com.unboundid.util;
2,572,605
@Test public void errorExceptionAndFormattedStringWithTwoInts() { RuntimeException exception = new RuntimeException(); logger.errorf(exception, "%d + %d", 1, 2); if (errorEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.ERROR), same(exception), any(PrintfStyleFormatter.class), eq("%d + %d"), eq(...
void function() { RuntimeException exception = new RuntimeException(); logger.errorf(exception, STR, 1, 2); if (errorEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.ERROR), same(exception), any(PrintfStyleFormatter.class), eq(STR), eq(1), eq(2)); } else { verify(provider, never()).log(anyInt(), anyString(), a...
/** * Verifies that an exception and a formatted string with two integer arguments will be logged correctly at * {@link Level#ERROR ERROR} level. */
Verifies that an exception and a formatted string with two integer arguments will be logged correctly at <code>Level#ERROR ERROR</code> level
errorExceptionAndFormattedStringWithTwoInts
{ "repo_name": "pmwmedia/tinylog", "path": "jboss-tinylog/src/test/java/org/tinylog/jboss/TinylogLoggerTest.java", "license": "apache-2.0", "size": 189291 }
[ "org.mockito.ArgumentMatchers", "org.mockito.Mockito", "org.tinylog.Level", "org.tinylog.format.PrintfStyleFormatter" ]
import org.mockito.ArgumentMatchers; import org.mockito.Mockito; import org.tinylog.Level; import org.tinylog.format.PrintfStyleFormatter;
import org.mockito.*; import org.tinylog.*; import org.tinylog.format.*;
[ "org.mockito", "org.tinylog", "org.tinylog.format" ]
org.mockito; org.tinylog; org.tinylog.format;
1,061,240
public Text getRow() { return getRow(new Text()); }
Text function() { return getRow(new Text()); }
/** * Gets the row ID as a <code>Text</code> object. * * @return Text containing the row ID */
Gets the row ID as a <code>Text</code> object
getRow
{ "repo_name": "joshelser/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/data/Key.java", "license": "apache-2.0", "size": 34335 }
[ "org.apache.hadoop.io.Text" ]
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,580,923
@Test public void characterValueGeneratorEmptyAllowableCharactersAndNullChance() { this.expectedException.expect(AssertionError.class); this.expectedException.expectMessage("The 'allowableCharacters' parameter cannot be empty."); new CharacterValueGenerator(new ArrayList<Character>(), Character...
void function() { this.expectedException.expect(AssertionError.class); this.expectedException.expectMessage(STR); new CharacterValueGenerator(new ArrayList<Character>(), CharacterValueGenerator.DEFAULT_NULL_CHANCE); }
/** * Test for attempting to create a {@link CharacterValueGenerator} with an empty list of allowable characters and a valid null chance. */
Test for attempting to create a <code>CharacterValueGenerator</code> with an empty list of allowable characters and a valid null chance
characterValueGeneratorEmptyAllowableCharactersAndNullChance
{ "repo_name": "arosini/wildstyle-generator", "path": "src/test/java/ar/wildstyle/valuegenerator/CharacterValueGeneratorTests.java", "license": "mit", "size": 8366 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,387,576
public int rowToProcess(WindowFrameDef wFrameDef) { int rowToProcess = numRowsReceived - 1 - Math.max(0, wFrameDef.getEnd().getRelativeOffset()); return rowToProcess >= 0 ? rowToProcess : -1; }
int function(WindowFrameDef wFrameDef) { int rowToProcess = numRowsReceived - 1 - Math.max(0, wFrameDef.getEnd().getRelativeOffset()); return rowToProcess >= 0 ? rowToProcess : -1; }
/** * Gets the next row index that the data within the window are available and can be processed * @param wFrameDef * @return */
Gets the next row index that the data within the window are available and can be processed
rowToProcess
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/PTFRollingPartition.java", "license": "apache-2.0", "size": 5586 }
[ "org.apache.hadoop.hive.ql.plan.ptf.WindowFrameDef" ]
import org.apache.hadoop.hive.ql.plan.ptf.WindowFrameDef;
import org.apache.hadoop.hive.ql.plan.ptf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
517,150
public void severe(final Marker marker, final Message msg);
void function(final Marker marker, final Message msg);
/** * Logs a message with the specific Marker at the;@code SEVERE} level. * * @param marker * the marker data specific to this log statement * @param msg * the message string to be logged */
Logs a message with the specific Marker at the;@code SEVERE} level
severe
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/GemFireLogger.java", "license": "apache-2.0", "size": 27574 }
[ "org.apache.logging.log4j.Marker", "org.apache.logging.log4j.message.Message" ]
import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.message.Message;
import org.apache.logging.log4j.*; import org.apache.logging.log4j.message.*;
[ "org.apache.logging" ]
org.apache.logging;
368,546
public Field getField() { return this.field; }
Field function() { return this.field; }
/** * Return the wrapped Field, if any. * <p>Note: Either MethodParameter or Field is available. * @return the Field, or {@code null} if none */
Return the wrapped Field, if any. Note: Either MethodParameter or Field is available
getField
{ "repo_name": "shivpun/spring-framework", "path": "spring-beans/src/main/java/org/springframework/beans/factory/InjectionPoint.java", "license": "apache-2.0", "size": 4987 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,542,026