method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public EditingDomain getEditingDomain(IEditorPart editor) { if (editor == null) { editor = getActiveEditor(); } if (editor instanceof IMultiDiagramEditor) { Object domain = editor.getAdapter(EditingDomain.class); if (domain instanceof E...
EditingDomain function(IEditorPart editor) { if (editor == null) { editor = getActiveEditor(); } if (editor instanceof IMultiDiagramEditor) { Object domain = editor.getAdapter(EditingDomain.class); if (domain instanceof EditingDomain) { return (EditingDomain) domain; } } return null; }
/** * Get the editing domain. * * @param editor the editor or null for currently active one * @return the editing domain. */
Get the editing domain
getEditingDomain
{ "repo_name": "pgaufillet/topcased-req", "path": "plugins/org.topcased.requirement.bundle.papyrus/src/org/topcased/requirement/bundle/papyrus/services/PapyrusEditorServices.java", "license": "epl-1.0", "size": 16485 }
[ "org.eclipse.emf.edit.domain.EditingDomain", "org.eclipse.papyrus.core.editor.IMultiDiagramEditor", "org.eclipse.ui.IEditorPart" ]
import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.papyrus.core.editor.IMultiDiagramEditor; import org.eclipse.ui.IEditorPart;
import org.eclipse.emf.edit.domain.*; import org.eclipse.papyrus.core.editor.*; import org.eclipse.ui.*;
[ "org.eclipse.emf", "org.eclipse.papyrus", "org.eclipse.ui" ]
org.eclipse.emf; org.eclipse.papyrus; org.eclipse.ui;
366,585
public static java.util.Set extractAssessmentFolderSet(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.AssessmentFolderVoCollection voCollection) { return extractAssessmentFolderSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.AssessmentFolderVoCollection voCollection) { return extractAssessmentFolderSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.assessment.configuration.domain.objects.AssessmentFolder set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.assessment.configuration.domain.objects.AssessmentFolder set from the value object collection
extractAssessmentFolderSet
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/AssessmentFolderVoAssembler.java", "license": "agpl-3.0", "size": 17065 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
162,651
private static Pair<Map<String, ITrain<?>>, Map<String, IDoor<?>>> train( final Network p_network, final Map<String, String> p_agents, final IFactory p_factory, final ITime p_time, ...
static Pair<Map<String, ITrain<?>>, Map<String, IDoor<?>>> function( final Network p_network, final Map<String, String> p_agents, final IFactory p_factory, final ITime p_time, final double p_minfreetimetoclose ) { final String l_dooragent = IStatefulElement.getDefaultAsl( "door" ); final Map<String, IElement.IGenerator...
/** * create the train list * * @param p_network network component * @param p_agents map with agent asl scripts * @param p_factory factory * @return unmodifiable map with trains */
create the train list
train
{ "repo_name": "APTD/Simulation", "path": "src/main/java/com/github/aptd/simulation/datamodel/CXMLReader.java", "license": "lgpl-3.0", "size": 27269 }
[ "com.github.aptd.simulation.core.time.ITime", "com.github.aptd.simulation.datamodel.xml.Network", "com.github.aptd.simulation.elements.IElement", "com.github.aptd.simulation.elements.IStatefulElement", "com.github.aptd.simulation.elements.train.CTrain", "com.github.aptd.simulation.elements.train.IDoor", ...
import com.github.aptd.simulation.core.time.ITime; import com.github.aptd.simulation.datamodel.xml.Network; import com.github.aptd.simulation.elements.IElement; import com.github.aptd.simulation.elements.IStatefulElement; import com.github.aptd.simulation.elements.train.CTrain; import com.github.aptd.simulation.element...
import com.github.aptd.simulation.core.time.*; import com.github.aptd.simulation.datamodel.xml.*; import com.github.aptd.simulation.elements.*; import com.github.aptd.simulation.elements.train.*; import com.github.aptd.simulation.error.*; import com.github.aptd.simulation.factory.*; import java.math.*; import java.time...
[ "com.github.aptd", "java.math", "java.time", "java.util", "org.apache.commons", "org.lightjason.agentspeak", "org.railml.schemas" ]
com.github.aptd; java.math; java.time; java.util; org.apache.commons; org.lightjason.agentspeak; org.railml.schemas;
1,402,524
public void addWindowStateListener (WindowStateListener wsl) { windowStateListener = AWTEventMulticaster.add (windowStateListener, wsl); }
void function (WindowStateListener wsl) { windowStateListener = AWTEventMulticaster.add (windowStateListener, wsl); }
/** * Adds the specified listener to this window. * * @since 1.4 */
Adds the specified listener to this window
addWindowStateListener
{ "repo_name": "aosm/gcc_40", "path": "libjava/java/awt/Window.java", "license": "gpl-2.0", "size": 24595 }
[ "java.awt.event.WindowStateListener" ]
import java.awt.event.WindowStateListener;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,002,134
protected boolean dataDictionaryValidate(MaintenanceDocument document) { LOG.debug("MaintenanceDocument validation beginning"); // explicitly put the errorPath that the dictionaryValidationService // requires GlobalVariables.getMessageMap().addToErrorPath("document.newMaintaina...
boolean function(MaintenanceDocument document) { LOG.debug(STR); GlobalVariables.getMessageMap().addToErrorPath(STR); Maintainable newMaintainable = document.getNewMaintainableObject(); if (newMaintainable == null) { GlobalVariables.getMessageMap().removeFromErrorPath(STR); throw new ValidationException( STR + document...
/** * This method executes the DataDictionary Validation against the document. * * @param document * @return true if it passes DD validation, false otherwise */
This method executes the DataDictionary Validation against the document
dataDictionaryValidate
{ "repo_name": "jruchcolo/rice-cd", "path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/maintenance/rules/MaintenanceDocumentRuleBase.java", "license": "apache-2.0", "size": 69713 }
[ "org.apache.commons.collections.CollectionUtils", "org.kuali.rice.kns.document.MaintenanceDocument", "org.kuali.rice.kns.maintenance.Maintainable", "org.kuali.rice.krad.bo.BusinessObject", "org.kuali.rice.krad.bo.PersistableBusinessObject", "org.kuali.rice.krad.exception.ValidationException", "org.kuali...
import org.apache.commons.collections.CollectionUtils; import org.kuali.rice.kns.document.MaintenanceDocument; import org.kuali.rice.kns.maintenance.Maintainable; import org.kuali.rice.krad.bo.BusinessObject; import org.kuali.rice.krad.bo.PersistableBusinessObject; import org.kuali.rice.krad.exception.ValidationExcepti...
import org.apache.commons.collections.*; import org.kuali.rice.kns.document.*; import org.kuali.rice.kns.maintenance.*; import org.kuali.rice.krad.bo.*; import org.kuali.rice.krad.exception.*; import org.kuali.rice.krad.util.*;
[ "org.apache.commons", "org.kuali.rice" ]
org.apache.commons; org.kuali.rice;
2,709,759
public Path.Any canFollow(K key);
Path.Any function(K key);
/** * Returns {@code null} if the item cannot be followed, or the known follow path. */
Returns null if the item cannot be followed, or the known follow path
canFollow
{ "repo_name": "google/agi", "path": "gapic/src/main/com/google/gapid/models/Follower.java", "license": "apache-2.0", "size": 9899 }
[ "com.google.gapid.proto.service.path.Path" ]
import com.google.gapid.proto.service.path.Path;
import com.google.gapid.proto.service.path.*;
[ "com.google.gapid" ]
com.google.gapid;
692,314
private Type toKuduType(String name, Schema schema, Set<String> primaryKeys) throws TypeConversionException { Schema.Type type = schema.getType(); if (primaryKeys.contains(name)) { // primary key cannot be BOOL, FLOAT, or DOUBLE in Kudu // so if type is one of them, then convert to String ...
Type function(String name, Schema schema, Set<String> primaryKeys) throws TypeConversionException { Schema.Type type = schema.getType(); if (primaryKeys.contains(name)) { if (type == Schema.Type.DOUBLE type == Schema.Type.FLOAT type == Schema.Type.BOOLEAN) { return Type.STRING; } } if (type == Schema.Type.STRING) { ret...
/** * Convert from {@link Schema.Type} to {@link Type}. * * @param schema {@link StructuredRecord} field schema. * @return {@link Type} Kudu type. * @throws TypeConversionException thrown when can't be converted. */
Convert from <code>Schema.Type</code> to <code>Type</code>
toKuduType
{ "repo_name": "data-integrations/change-data-capture", "path": "src/main/java/io/cdap/plugin/cdc/sink/CDCKudu.java", "license": "apache-2.0", "size": 15161 }
[ "io.cdap.cdap.api.data.schema.Schema", "java.util.Set", "org.apache.kudu.Type" ]
import io.cdap.cdap.api.data.schema.Schema; import java.util.Set; import org.apache.kudu.Type;
import io.cdap.cdap.api.data.schema.*; import java.util.*; import org.apache.kudu.*;
[ "io.cdap.cdap", "java.util", "org.apache.kudu" ]
io.cdap.cdap; java.util; org.apache.kudu;
450,102
static public HColumnDescriptor colDescFromThrift(ColumnDescriptor in) throws IllegalArgument { Compression.Algorithm comp = Compression.getCompressionAlgorithmByName(in.compression.toLowerCase()); StoreFile.BloomType bt = BloomType.valueOf(in.bloomFilterType); if (in.name == null || !i...
static HColumnDescriptor function(ColumnDescriptor in) throws IllegalArgument { Compression.Algorithm comp = Compression.getCompressionAlgorithmByName(in.compression.toLowerCase()); StoreFile.BloomType bt = BloomType.valueOf(in.bloomFilterType); if (in.name == null !in.name.hasRemaining()) { throw new IllegalArgument(S...
/** * This utility method creates a new Hbase HColumnDescriptor object based on a * Thrift ColumnDescriptor "struct". * * @param in * Thrift ColumnDescriptor object * @return HColumnDescriptor * @throws IllegalArgument */
This utility method creates a new Hbase HColumnDescriptor object based on a Thrift ColumnDescriptor "struct"
colDescFromThrift
{ "repo_name": "matteobertozzi/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/thrift/ThriftUtilities.java", "license": "apache-2.0", "size": 6362 }
[ "org.apache.hadoop.hbase.HColumnDescriptor", "org.apache.hadoop.hbase.KeyValue", "org.apache.hadoop.hbase.io.hfile.Compression", "org.apache.hadoop.hbase.regionserver.StoreFile", "org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor", "org.apache.hadoop.hbase.thrift.generated.IllegalArgument", "org...
import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.io.hfile.Compression; import org.apache.hadoop.hbase.regionserver.StoreFile; import org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor; import org.apache.hadoop.hbase.thrift.generated.Illegal...
import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.io.hfile.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.thrift.generated.*; import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,241,159
public List<PDFileSpecification> getEmbeddedFDFs() throws IOException { List<PDFileSpecification> retval = null; COSArray embeddedArray = (COSArray) fdf.getDictionaryObject(COSName.EMBEDDED_FDFS); if (embeddedArray != null) { List<PDFileSpecification> embedded = new A...
List<PDFileSpecification> function() throws IOException { List<PDFileSpecification> retval = null; COSArray embeddedArray = (COSArray) fdf.getDictionaryObject(COSName.EMBEDDED_FDFS); if (embeddedArray != null) { List<PDFileSpecification> embedded = new ArrayList<PDFileSpecification>(); for (int i = 0; i < embeddedArray...
/** * This will get the list of embedded FDF entries, or null if the entry is null. This will return a list of * PDFileSpecification objects. * * @return A list of embedded FDF files. * * @throws IOException If there is an error creating the file spec. */
This will get the list of embedded FDF entries, or null if the entry is null. This will return a list of PDFileSpecification objects
getEmbeddedFDFs
{ "repo_name": "TomRoush/PdfBox-Android", "path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/fdf/FDFDictionary.java", "license": "apache-2.0", "size": 19809 }
[ "com.tom_roush.pdfbox.cos.COSArray", "com.tom_roush.pdfbox.cos.COSName", "com.tom_roush.pdfbox.pdmodel.common.COSArrayList", "com.tom_roush.pdfbox.pdmodel.common.filespecification.PDFileSpecification", "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import com.tom_roush.pdfbox.cos.COSArray; import com.tom_roush.pdfbox.cos.COSName; import com.tom_roush.pdfbox.pdmodel.common.COSArrayList; import com.tom_roush.pdfbox.pdmodel.common.filespecification.PDFileSpecification; import java.io.IOException; import java.util.ArrayList; import java.util.List;
import com.tom_roush.pdfbox.cos.*; import com.tom_roush.pdfbox.pdmodel.common.*; import com.tom_roush.pdfbox.pdmodel.common.filespecification.*; import java.io.*; import java.util.*;
[ "com.tom_roush.pdfbox", "java.io", "java.util" ]
com.tom_roush.pdfbox; java.io; java.util;
490,104
@Override public void onPictureTaken(byte[] data, Camera camera) { int rotation = ( displayOrientation + orientationListener.getRememberedNormalOrientation() + layoutOrientation ) % 360; Bitmap bitmap = ImageUtility.rotateP...
void function(byte[] data, Camera camera) { int rotation = ( displayOrientation + orientationListener.getRememberedNormalOrientation() + layoutOrientation ) % 360; Bitmap bitmap = ImageUtility.rotatePicture(getActivity(), rotation, data); Uri uri = ImageUtility.savePicture(getActivity(), bitmap); ((PhotoActivity) getAc...
/** * A picture has been taken * @param data * @param camera */
A picture has been taken
onPictureTaken
{ "repo_name": "AshkanImmortal/Big-Brother", "path": "Src/bigbrother/src/main/java/com/aetava/bigbrother/CameraFragment.java", "license": "apache-2.0", "size": 17019 }
[ "android.content.Context", "android.graphics.Bitmap", "android.hardware.Camera", "android.hardware.SensorManager", "android.net.Uri", "android.view.OrientationEventListener", "com.aetava.bigbrother.utils.ImageUtility" ]
import android.content.Context; import android.graphics.Bitmap; import android.hardware.Camera; import android.hardware.SensorManager; import android.net.Uri; import android.view.OrientationEventListener; import com.aetava.bigbrother.utils.ImageUtility;
import android.content.*; import android.graphics.*; import android.hardware.*; import android.net.*; import android.view.*; import com.aetava.bigbrother.utils.*;
[ "android.content", "android.graphics", "android.hardware", "android.net", "android.view", "com.aetava.bigbrother" ]
android.content; android.graphics; android.hardware; android.net; android.view; com.aetava.bigbrother;
893,920
public static RenderedOp create(RenderedImage source0, RenderingHints hints) { ParameterBlockJAI pb = new ParameterBlockJAI("Magnitude", RenderedRegistryMode.MODE_NAME); pb.setSource("source0", source0); ...
static RenderedOp function(RenderedImage source0, RenderingHints hints) { ParameterBlockJAI pb = new ParameterBlockJAI(STR, RenderedRegistryMode.MODE_NAME); pb.setSource(STR, source0); return JAI.create(STR, pb, hints); }
/** * Find the magnitude of each pixel of an image. * * <p>Creates a <code>ParameterBlockJAI</code> from all * supplied arguments except <code>hints</code> and invokes * {@link JAI#create(String,ParameterBlock,RenderingHints)}. * * @see JAI * @see ParameterBlockJAI ...
Find the magnitude of each pixel of an image. Creates a <code>ParameterBlockJAI</code> from all supplied arguments except <code>hints</code> and invokes <code>JAI#create(String,ParameterBlock,RenderingHints)</code>
create
{ "repo_name": "RoProducts/rastertheque", "path": "JAILibrary/src/javax/media/jai/operator/MagnitudeDescriptor.java", "license": "gpl-2.0", "size": 7156 }
[ "java.awt.RenderingHints", "java.awt.image.RenderedImage", "javax.media.jai.JAI", "javax.media.jai.ParameterBlockJAI", "javax.media.jai.RenderedOp", "javax.media.jai.registry.RenderedRegistryMode" ]
import java.awt.RenderingHints; import java.awt.image.RenderedImage; import javax.media.jai.JAI; import javax.media.jai.ParameterBlockJAI; import javax.media.jai.RenderedOp; import javax.media.jai.registry.RenderedRegistryMode;
import java.awt.*; import java.awt.image.*; import javax.media.jai.*; import javax.media.jai.registry.*;
[ "java.awt", "javax.media" ]
java.awt; javax.media;
2,887,180
public MathTransform createMathTransform(final ParameterValueGroup parameters) throws ParameterNotFoundException { return new IdrGoode(parameters); } }
MathTransform function(final ParameterValueGroup parameters) throws ParameterNotFoundException { return new IdrGoode(parameters); } }
/** * Creates a transform from the specified group of parameter values. * * @param parameters The group of parameter values. * @return The created math transform. * @throws ParameterNotFoundException if a required parameter was not found. */
Creates a transform from the specified group of parameter values
createMathTransform
{ "repo_name": "iCarto/siga", "path": "libJCRS/src/org/geotools/referencing/operation/projection/IdrGoode.java", "license": "gpl-3.0", "size": 3473 }
[ "org.opengis.parameter.ParameterNotFoundException", "org.opengis.parameter.ParameterValueGroup", "org.opengis.referencing.operation.MathTransform" ]
import org.opengis.parameter.ParameterNotFoundException; import org.opengis.parameter.ParameterValueGroup; import org.opengis.referencing.operation.MathTransform;
import org.opengis.parameter.*; import org.opengis.referencing.operation.*;
[ "org.opengis.parameter", "org.opengis.referencing" ]
org.opengis.parameter; org.opengis.referencing;
1,944,686
@Override public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); } return itemPropertyDescriptors; }
List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); } return itemPropertyDescriptors; }
/** * This returns the property descriptors for the adapted class. * @generated */
This returns the property descriptors for the adapted class
getPropertyDescriptors
{ "repo_name": "parraman/micobs", "path": "mclev/es.uah.aut.srg.micobs.mclev/src/es/uah/aut/srg/micobs/mclev/mclevmcad/provider/MDriverSLibInstanceItemProvider.java", "license": "epl-1.0", "size": 4786 }
[ "java.util.List", "org.eclipse.emf.edit.provider.IItemPropertyDescriptor" ]
import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import java.util.*; import org.eclipse.emf.edit.provider.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
303,793
public static String parseHostNameFromLogFile(Path p) { try { if (AbstractFSWALProvider.isArchivedLogFile(p)) { return BackupUtils.parseHostFromOldLog(p); } else { ServerName sname = AbstractFSWALProvider.getServerNameFromWALDirectoryName(p); if (sname != null) { retu...
static String function(Path p) { try { if (AbstractFSWALProvider.isArchivedLogFile(p)) { return BackupUtils.parseHostFromOldLog(p); } else { ServerName sname = AbstractFSWALProvider.getServerNameFromWALDirectoryName(p); if (sname != null) { return sname.getAddress().toString(); } else { LOG.error(STR + p); return null;...
/** * Parses hostname:port from WAL file path * @param p path to WAL file * @return hostname:port */
Parses hostname:port from WAL file path
parseHostNameFromLogFile
{ "repo_name": "francisliu/hbase", "path": "hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java", "license": "apache-2.0", "size": 27023 }
[ "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.ServerName", "org.apache.hadoop.hbase.wal.AbstractFSWALProvider" ]
import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.wal.AbstractFSWALProvider;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.wal.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
733,924
@WebMethod(operationName = "download") ServiceResponse<FileInfo> download0(@WebParam(name = "lookup") String lookup, @WebParam(name = "filename") String filename, @WebParam(name = "path") List<String> path);
@WebMethod(operationName = STR) ServiceResponse<FileInfo> download0(@WebParam(name = STR) String lookup, @WebParam(name = STR) String filename, @WebParam(name = "path") List<String> path);
/** * Service retrieves the file * * @param lookup * @param filename - file name * @param path - file path * @return file to be downloaded */
Service retrieves the file
download0
{ "repo_name": "firejack-open/Firejack-Platform", "path": "platform/src/main/java/net/firejack/platform/service/filestore/endpoint/IFileStoreEndpoint.java", "license": "apache-2.0", "size": 5116 }
[ "java.util.List", "javax.jws.WebMethod", "javax.jws.WebParam", "net.firejack.platform.api.content.domain.FileInfo", "net.firejack.platform.core.response.ServiceResponse" ]
import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import net.firejack.platform.api.content.domain.FileInfo; import net.firejack.platform.core.response.ServiceResponse;
import java.util.*; import javax.jws.*; import net.firejack.platform.api.content.domain.*; import net.firejack.platform.core.response.*;
[ "java.util", "javax.jws", "net.firejack.platform" ]
java.util; javax.jws; net.firejack.platform;
2,762,785
public static GetNamespaceDescriptorRequest buildGetNamespaceDescriptorRequest(final String name) { GetNamespaceDescriptorRequest.Builder builder = GetNamespaceDescriptorRequest.newBuilder(); builder.setNamespaceName(name); return builder.build(); }
static GetNamespaceDescriptorRequest function(final String name) { GetNamespaceDescriptorRequest.Builder builder = GetNamespaceDescriptorRequest.newBuilder(); builder.setNamespaceName(name); return builder.build(); }
/** * Creates a protocol buffer GetNamespaceDescriptorRequest * @param name * @return a GetNamespaceDescriptorRequest */
Creates a protocol buffer GetNamespaceDescriptorRequest
buildGetNamespaceDescriptorRequest
{ "repo_name": "apurtell/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java", "license": "apache-2.0", "size": 79432 }
[ "org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos" ]
import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,914,013
public int execADAT(byte[] data) throws IOException { if (data != null) { return sendCommand(CMD_ADAT, Base64.encodeBase64StringUnChunked(data)); } else { return sendCommand(CMD_ADAT); } }
int function(byte[] data) throws IOException { if (data != null) { return sendCommand(CMD_ADAT, Base64.encodeBase64StringUnChunked(data)); } else { return sendCommand(CMD_ADAT); } }
/** * Send the ADAT command with the specified authentication data. * @param data The data to send with the command. * @return server reply. * @throws IOException If an I/O error occurs while sending * the command. * @since 3.0 */
Send the ADAT command with the specified authentication data
execADAT
{ "repo_name": "chenxiwen/CommonShellUtils", "path": "src/main/java/org/apache/commons/net/ftp/FTPSClient.java", "license": "apache-2.0", "size": 30197 }
[ "java.io.IOException", "org.apache.commons.net.util.Base64" ]
import java.io.IOException; import org.apache.commons.net.util.Base64;
import java.io.*; import org.apache.commons.net.util.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,199,370
public static <T, TKey extends Comparable> OrderedQueryable<T> orderBy( Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) { throw Extensions.todo(); }
static <T, TKey extends Comparable> OrderedQueryable<T> function( Queryable<T> source, FunctionExpression<Function1<T, TKey>> keySelector) { throw Extensions.todo(); }
/** * Sorts the elements of a sequence in ascending * order according to a key. * * @see #thenBy */
Sorts the elements of a sequence in ascending order according to a key
orderBy
{ "repo_name": "b-slim/calcite", "path": "linq4j/src/main/java/org/apache/calcite/linq4j/QueryableDefaults.java", "license": "apache-2.0", "size": 39975 }
[ "org.apache.calcite.linq4j.function.Function1", "org.apache.calcite.linq4j.tree.FunctionExpression" ]
import org.apache.calcite.linq4j.function.Function1; import org.apache.calcite.linq4j.tree.FunctionExpression;
import org.apache.calcite.linq4j.function.*; import org.apache.calcite.linq4j.tree.*;
[ "org.apache.calcite" ]
org.apache.calcite;
1,716,385
private static void removeRoleCreateForLoggedInUser(String destinationName) throws EventBrokerException { //For registry we use a modified queue name String newDestinationName = destinationName.replace("@", AT_REPLACE_CHAR); String roleName = UserCoreUtil.addInternalDomainName(T...
static void function(String destinationName) throws EventBrokerException { String newDestinationName = destinationName.replace("@", AT_REPLACE_CHAR); String roleName = UserCoreUtil.addInternalDomainName(TOPIC_ROLE_PREFIX + newDestinationName.replace("/", "-")); try { UserStoreManager userStoreManager = CarbonContext.ge...
/** * Every queue/topic has a role with the same name as the queue/topic name. This role is used * to store the permissions for the user who created the queue/topic.This role should be * deleted when the queue/topic is deleted. * * @param destinationName name of the queue or topic * @throw...
Every queue/topic has a role with the same name as the queue/topic name. This role is used to store the permissions for the user who created the queue/topic.This role should be deleted when the queue/topic is deleted
removeRoleCreateForLoggedInUser
{ "repo_name": "wattale/carbon-commons", "path": "components/event/org.wso2.carbon.event.core/src/main/java/org/wso2/carbon/event/core/internal/topic/registry/RegistryTopicManager.java", "license": "apache-2.0", "size": 26421 }
[ "org.wso2.carbon.context.CarbonContext", "org.wso2.carbon.event.core.exception.EventBrokerException", "org.wso2.carbon.user.api.UserStoreException", "org.wso2.carbon.user.api.UserStoreManager", "org.wso2.carbon.user.core.util.UserCoreUtil" ]
import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.event.core.exception.EventBrokerException; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.api.UserStoreManager; import org.wso2.carbon.user.core.util.UserCoreUtil;
import org.wso2.carbon.context.*; import org.wso2.carbon.event.core.exception.*; import org.wso2.carbon.user.api.*; import org.wso2.carbon.user.core.util.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,610,606
@Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { return commandHandler.HandleCommand(sender, command, label, args); }
boolean function(CommandSender sender, Command command, String label, String[] args) { return commandHandler.HandleCommand(sender, command, label, args); }
/** * Run a command with our CommandSender. * @param sender Our sender; entity or otherwise. * @param command The command being sent. * @param label The label for the command. * @param args The arguments passed in. * @return true if the command is handled; false otherwise. */
Run a command with our CommandSender
onCommand
{ "repo_name": "cppchriscpp/WeatherSync", "path": "net/cpprograms/minecraft/General/PluginBase.java", "license": "bsd-2-clause", "size": 6971 }
[ "org.bukkit.command.Command", "org.bukkit.command.CommandSender" ]
import org.bukkit.command.Command; import org.bukkit.command.CommandSender;
import org.bukkit.command.*;
[ "org.bukkit.command" ]
org.bukkit.command;
1,304,727
public DrawerBuilder withDrawerItems(@NonNull ArrayList<IDrawerItem> drawerItems) { this.getAdapter().setDrawerItems(IdDistributor.checkIds(drawerItems)); return this; }
DrawerBuilder function(@NonNull ArrayList<IDrawerItem> drawerItems) { this.getAdapter().setDrawerItems(IdDistributor.checkIds(drawerItems)); return this; }
/** * Set the initial List of IDrawerItems for the Drawer * * @param drawerItems * @return */
Set the initial List of IDrawerItems for the Drawer
withDrawerItems
{ "repo_name": "amatkivskiy/MaterialDrawer-Xamarin", "path": "library/MaterialDrawerLibrary/JavaSrc/com/mikepenz/materialdrawer/DrawerBuilder.java", "license": "apache-2.0", "size": 62323 }
[ "android.support.annotation.NonNull", "com.mikepenz.materialdrawer.model.interfaces.IDrawerItem", "com.mikepenz.materialdrawer.util.IdDistributor", "java.util.ArrayList" ]
import android.support.annotation.NonNull; import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem; import com.mikepenz.materialdrawer.util.IdDistributor; import java.util.ArrayList;
import android.support.annotation.*; import com.mikepenz.materialdrawer.model.interfaces.*; import com.mikepenz.materialdrawer.util.*; import java.util.*;
[ "android.support", "com.mikepenz.materialdrawer", "java.util" ]
android.support; com.mikepenz.materialdrawer; java.util;
1,915,729
public static Document constructDocumentFromXml(final String xmlString) { LOGGER.trace("Attempting to construct an instance of Document from xml: [{}]", xmlString); try { val builder = new SAXBuilder(); builder.setFeature("http://xml.org/sax/features/external-parameter-entiti...
static Document function(final String xmlString) { LOGGER.trace(STR, xmlString); try { val builder = new SAXBuilder(); builder.setFeature(STRhttp: builder.setFeature("http: return builder.build(new ByteArrayInputStream(xmlString.getBytes(Charset.defaultCharset()))); } catch (final Exception e) { LOGGER.error(e.getMessa...
/** * Construct document from xml string. * * @param xmlString the xml string * @return the document */
Construct document from xml string
constructDocumentFromXml
{ "repo_name": "leleuj/cas", "path": "support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/util/AbstractSamlObjectBuilder.java", "license": "apache-2.0", "size": 18716 }
[ "java.io.ByteArrayInputStream", "java.nio.charset.Charset", "org.jdom2.Document", "org.jdom2.input.SAXBuilder" ]
import java.io.ByteArrayInputStream; import java.nio.charset.Charset; import org.jdom2.Document; import org.jdom2.input.SAXBuilder;
import java.io.*; import java.nio.charset.*; import org.jdom2.*; import org.jdom2.input.*;
[ "java.io", "java.nio", "org.jdom2", "org.jdom2.input" ]
java.io; java.nio; org.jdom2; org.jdom2.input;
2,497,537
void translate(String filename) throws IOException { long startTime = System.currentTimeMillis(); int beginningErrorLevel = getCurrentErrorLevel(); logger.finest("reading " + filename); // Read file currentFileName = filename; String source = getSource(filename); if (source == null) { ...
void translate(String filename) throws IOException { long startTime = System.currentTimeMillis(); int beginningErrorLevel = getCurrentErrorLevel(); logger.finest(STR + filename); currentFileName = filename; String source = getSource(filename); if (source == null) { error(STR + filename); return; } long readTime = Syste...
/** * Parse a specified Java source file and generate Objective C header(s) * and implementation file(s) from it. * * @param filename the source file to translate */
Parse a specified Java source file and generate Objective C header(s) and implementation file(s) from it
translate
{ "repo_name": "rwl/j2objc", "path": "src/main/java/com/google/devtools/j2objc/J2ObjC.java", "license": "apache-2.0", "size": 26258 }
[ "com.google.devtools.j2objc.gen.ObjectiveCHeaderGenerator", "com.google.devtools.j2objc.gen.ObjectiveCImplementationGenerator", "com.google.devtools.j2objc.util.ASTNodeException", "java.io.IOException" ]
import com.google.devtools.j2objc.gen.ObjectiveCHeaderGenerator; import com.google.devtools.j2objc.gen.ObjectiveCImplementationGenerator; import com.google.devtools.j2objc.util.ASTNodeException; import java.io.IOException;
import com.google.devtools.j2objc.gen.*; import com.google.devtools.j2objc.util.*; import java.io.*;
[ "com.google.devtools", "java.io" ]
com.google.devtools; java.io;
2,190,217
default <T extends SebElement> T initSebElement(T element) { return getSeb().initSebElement(element); }
default <T extends SebElement> T initSebElement(T element) { return getSeb().initSebElement(element); }
/** * Initialize already constructed element. * * @param element * The element instance to initialize * @return The same element instance */
Initialize already constructed element
initSebElement
{ "repo_name": "etnetera/SeleniumBrowser", "path": "src/main/java/cz/etnetera/seb/SebContext.java", "license": "apache-2.0", "size": 27433 }
[ "cz.etnetera.seb.element.SebElement" ]
import cz.etnetera.seb.element.SebElement;
import cz.etnetera.seb.element.*;
[ "cz.etnetera.seb" ]
cz.etnetera.seb;
1,129,265
public static IStatus validateTypeVariableName(String name) { return validateIdentifier(name, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3); }
static IStatus function(String name) { return validateIdentifier(name, CompilerOptions.VERSION_1_3, CompilerOptions.VERSION_1_3); }
/** * Validate the given type variable name. * <p> * Syntax of a type variable name corresponds to a Java identifier (JLS3 4.3). * For example, <code>"E"</code>. * * @param name the name of a type variable * @return a status object with code <code>IStatus.OK</code> if * the given name is valid as a typ...
Validate the given type variable name. Syntax of a type variable name corresponds to a Java identifier (JLS3 4.3). For example, <code>"E"</code>
validateTypeVariableName
{ "repo_name": "dhuebner/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/core/JavaConventions.java", "license": "epl-1.0", "size": 37183 }
[ "org.eclipse.core.runtime.IStatus", "org.eclipse.jdt.internal.compiler.impl.CompilerOptions" ]
import org.eclipse.core.runtime.IStatus; import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.core.runtime.*; import org.eclipse.jdt.internal.compiler.impl.*;
[ "org.eclipse.core", "org.eclipse.jdt" ]
org.eclipse.core; org.eclipse.jdt;
1,346,030
public FreeColXMLReader getClientOptionsFreeColXMLReader() throws IOException, XMLStreamException { return new FreeColXMLReader(getInputStream(CLIENT_OPTIONS)); }
FreeColXMLReader function() throws IOException, XMLStreamException { return new FreeColXMLReader(getInputStream(CLIENT_OPTIONS)); }
/** * Get a reader for the client options data. * * @return A reader for the file "client-options.xml" within this file. * @exception IOException if there is a problem opening the input stream. * @exception XMLStreamException if there is a problem creating the reader. */
Get a reader for the client options data
getClientOptionsFreeColXMLReader
{ "repo_name": "FreeCol/freecol", "path": "src/net/sf/freecol/common/io/FreeColSavegameFile.java", "license": "gpl-2.0", "size": 6423 }
[ "java.io.IOException", "javax.xml.stream.XMLStreamException" ]
import java.io.IOException; import javax.xml.stream.XMLStreamException;
import java.io.*; import javax.xml.stream.*;
[ "java.io", "javax.xml" ]
java.io; javax.xml;
159,361
public Viewer getViewer() { return currentViewer; }
Viewer function() { return currentViewer; }
/** * This returns the viewer as required by the {@link IViewerProvider} interface. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the viewer as required by the <code>IViewerProvider</code> interface.
getViewer
{ "repo_name": "mbats/mindstorms", "path": "plugins/fr.obeo.dsl.mindstorms.editor/src-gen/fr/obeo/dsl/mindstorms/presentation/MindstormsEditor.java", "license": "epl-1.0", "size": 54945 }
[ "org.eclipse.jface.viewers.Viewer" ]
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
2,339,876
public void setDateFin(Date dateFin) { this.dateFin = dateFin; }
void function(Date dateFin) { this.dateFin = dateFin; }
/** * dateFin setter * * @param dateFin dateFin */
dateFin setter
setDateFin
{ "repo_name": "acheype/cantharella", "path": "cantharella.data/src/main/java/nc/ird/cantharella/data/model/Campagne.java", "license": "agpl-3.0", "size": 10813 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,668,468
@Test public void testGetClustersOrderBysCollectionField() { final Set<String> orderBys = new HashSet<>(); orderBys.add("tags"); final List<Application> applications = this.service.getApplications(null, null, null, null, 0, 10, true, orderBys); Assert.assertEquals...
void function() { final Set<String> orderBys = new HashSet<>(); orderBys.add("tags"); final List<Application> applications = this.service.getApplications(null, null, null, null, 0, 10, true, orderBys); Assert.assertEquals(3, applications.size()); Assert.assertEquals(APP_3_ID, applications.get(0).getId()); Assert.assert...
/** * Test the get applications method order by a collection field should return the order by default value (updated). */
Test the get applications method order by a collection field should return the order by default value (updated)
testGetClustersOrderBysCollectionField
{ "repo_name": "gorcz/genie", "path": "genie-server/src/test/java/com/netflix/genie/server/services/impl/jpa/TestApplicationConfigServiceJPAImpl.java", "license": "apache-2.0", "size": 43910 }
[ "com.netflix.genie.common.model.Application", "java.util.HashSet", "java.util.List", "java.util.Set", "org.junit.Assert" ]
import com.netflix.genie.common.model.Application; import java.util.HashSet; import java.util.List; import java.util.Set; import org.junit.Assert;
import com.netflix.genie.common.model.*; import java.util.*; import org.junit.*;
[ "com.netflix.genie", "java.util", "org.junit" ]
com.netflix.genie; java.util; org.junit;
2,040,330
@Override protected void onSaveInstanceState(@NotNull Bundle outState) { super.onSaveInstanceState(outState); outState.putString(ConstantUtil.PROJECT_ID_KEY, projectId); // store most state by saving the update as a draft until we get restarted saveAsDraft(false); /...
void function(@NotNull Bundle outState) { super.onSaveInstanceState(outState); outState.putString(ConstantUtil.PROJECT_ID_KEY, projectId); saveAsDraft(false); outState.putString(ConstantUtil.UPDATE_ID_KEY, update.getId()); outState.putString(ConstantUtil.IMAGE_FILENAME_KEY, captureFilename); }
/** * saves update being worked on before we leave the activity */
saves update being worked on before we leave the activity
onSaveInstanceState
{ "repo_name": "akvo/akvo-rsr-up", "path": "android/AkvoRSR/app/src/main/java/org/akvo/rsr/up/UpdateEditorActivity.java", "license": "agpl-3.0", "size": 32525 }
[ "android.os.Bundle", "org.akvo.rsr.up.util.ConstantUtil", "org.jetbrains.annotations.NotNull" ]
import android.os.Bundle; import org.akvo.rsr.up.util.ConstantUtil; import org.jetbrains.annotations.NotNull;
import android.os.*; import org.akvo.rsr.up.util.*; import org.jetbrains.annotations.*;
[ "android.os", "org.akvo.rsr", "org.jetbrains.annotations" ]
android.os; org.akvo.rsr; org.jetbrains.annotations;
2,525,516
protected void addBrowseUnsupportedRoute(RouterBuilder builder) { builder.route(browseUnsupportedHandler.getRoute()); }
void function(RouterBuilder builder) { builder.route(browseUnsupportedHandler.getRoute()); }
/** * Adds route to redirect access directly with a browser to a handler with links to the repo's components and * assets. */
Adds route to redirect access directly with a browser to a handler with links to the repo's components and assets
addBrowseUnsupportedRoute
{ "repo_name": "sonatype/nexus-public", "path": "components/nexus-repository-config/src/main/java/org/sonatype/nexus/repository/RecipeSupport.java", "license": "epl-1.0", "size": 2276 }
[ "org.sonatype.nexus.repository.recipe.RouterBuilder" ]
import org.sonatype.nexus.repository.recipe.RouterBuilder;
import org.sonatype.nexus.repository.recipe.*;
[ "org.sonatype.nexus" ]
org.sonatype.nexus;
1,093,416
public static TreeNode makeAnd(List<TreeNode> nodes) { return new AndNode(nodes); }
static TreeNode function(List<TreeNode> nodes) { return new AndNode(nodes); }
/** * Invoke this function to create a node representing an and-clause. * * @param nodes Nodes in the 'and' clause. * @return Node representing an and-clause */
Invoke this function to create a node representing an and-clause
makeAnd
{ "repo_name": "xhochy/arrow", "path": "java/gandiva/src/main/java/org/apache/arrow/gandiva/expression/TreeBuilder.java", "license": "apache-2.0", "size": 7404 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,856,771
List<Game> list();
List<Game> list();
/** * Listing all the Games from the database. * * @return a list of all the Games that exist inside the table Avatar. */
Listing all the Games from the database
list
{ "repo_name": "EaW1805/data", "path": "src/main/java/com/eaw1805/data/managers/beans/GameManagerBean.java", "license": "mit", "size": 2978 }
[ "com.eaw1805.data.model.Game", "java.util.List" ]
import com.eaw1805.data.model.Game; import java.util.List;
import com.eaw1805.data.model.*; import java.util.*;
[ "com.eaw1805.data", "java.util" ]
com.eaw1805.data; java.util;
451,393
EReference getCoherenceConstraintCS_TupleDescriptor();
EReference getCoherenceConstraintCS_TupleDescriptor();
/** * Returns the meta object for the containment reference '{@link org.muml.psm.allocation.language.cs.CoherenceConstraintCS#getTupleDescriptor <em>Tuple Descriptor</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Tuple Descriptor</em>'. *...
Returns the meta object for the containment reference '<code>org.muml.psm.allocation.language.cs.CoherenceConstraintCS#getTupleDescriptor Tuple Descriptor</code>'.
getCoherenceConstraintCS_TupleDescriptor
{ "repo_name": "upohl/eloquent", "path": "plugins/org.muml.psm.allocation.language/src/org/muml/psm/allocation/language/cs/CsPackage.java", "license": "epl-1.0", "size": 108228 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,489,973
EAttribute getMBrickd_Port();
EAttribute getMBrickd_Port();
/** * Returns the meta object for the attribute '{@link org.openhab.binding.tinkerforge.internal.model.MBrickd#getPort <em>Port</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Port</em>'. * @see org.openhab.binding.tinkerforge.internal.model.MBri...
Returns the meta object for the attribute '<code>org.openhab.binding.tinkerforge.internal.model.MBrickd#getPort Port</code>'.
getMBrickd_Port
{ "repo_name": "noushadali/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/ModelPackage.java", "license": "gpl-3.0", "size": 247420 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,609,246
public static boolean holdsLock(Object object) { return RVMThread.getCurrentThread().holdsLock(object); }
static boolean function(Object object) { return RVMThread.getCurrentThread().holdsLock(object); }
/** * Returns whether the current thread has a monitor lock on the specified * object. * * @param object the object to test for the monitor lock * @return true when the current thread has a monitor lock on the specified * object */
Returns whether the current thread has a monitor lock on the specified object
holdsLock
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/libraryInterface/Harmony/ASF/src/java/lang/Thread.java", "license": "epl-1.0", "size": 31758 }
[ "org.jikesrvm.scheduler.RVMThread" ]
import org.jikesrvm.scheduler.RVMThread;
import org.jikesrvm.scheduler.*;
[ "org.jikesrvm.scheduler" ]
org.jikesrvm.scheduler;
1,518,274
@Override public String getOutputFilePath(Map<String, Object> properties) { String path = (String) properties.get(SparkPropertiesConstants.FS_OUTPUT_FILE_PATH); if (path == null || path.isEmpty()) { throw new KunderaException( "Please set the path of o...
String function(Map<String, Object> properties) { String path = (String) properties.get(SparkPropertiesConstants.FS_OUTPUT_FILE_PATH); if (path == null path.isEmpty()) { throw new KunderaException( STR + "\"STR\"."); } return path; }
/** * Gets the output file path. * * @param properties * the properties * @return the output file path */
Gets the output file path
getOutputFilePath
{ "repo_name": "ravisund/Kundera", "path": "src/kundera-spark/spark-core/src/main/java/com/impetus/spark/client/FSClient.java", "license": "apache-2.0", "size": 7985 }
[ "com.impetus.kundera.KunderaException", "com.impetus.spark.constants.SparkPropertiesConstants", "java.util.Map" ]
import com.impetus.kundera.KunderaException; import com.impetus.spark.constants.SparkPropertiesConstants; import java.util.Map;
import com.impetus.kundera.*; import com.impetus.spark.constants.*; import java.util.*;
[ "com.impetus.kundera", "com.impetus.spark", "java.util" ]
com.impetus.kundera; com.impetus.spark; java.util;
743,956
public static MozuUrl addTransactionUrl(Integer accountId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/transactions"); formatter.formatUrl("accountId", accountId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
static MozuUrl function(Integer accountId) { UrlFormatter formatter = new UrlFormatter(STR); formatter.formatUrl(STR, accountId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
/** * Get Resource Url for AddTransaction * @param accountId Unique identifier of the customer account. * @return String Resource Url */
Get Resource Url for AddTransaction
addTransactionUrl
{ "repo_name": "carsonreinke/mozu-java-sdk", "path": "src/main/java/com/mozu/api/urls/commerce/customer/accounts/TransactionUrl.java", "license": "mit", "size": 1928 }
[ "com.mozu.api.MozuUrl", "com.mozu.api.utils.UrlFormatter" ]
import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter;
import com.mozu.api.*; import com.mozu.api.utils.*;
[ "com.mozu.api" ]
com.mozu.api;
238,409
public static double[] getDataTypeMinMax(int dataType, double[] minmax) { if (minmax == null) { minmax = new double[2]; } if (dataType == DataBuffer.TYPE_BYTE || dataType == DataBuffer.TYPE_INT) { minmax[0] = 0.0; minmax[1] = 255.0; ...
static double[] function(int dataType, double[] minmax) { if (minmax == null) { minmax = new double[2]; } if (dataType == DataBuffer.TYPE_BYTE dataType == DataBuffer.TYPE_INT) { minmax[0] = 0.0; minmax[1] = 255.0; } else if (dataType == DataBuffer.TYPE_SHORT) { minmax[0] = Short.MIN_VALUE; minmax[1] = Short.MAX_VALUE; ...
/** * Returns an array containing the minimum and maximum value of the native data type used to store pixel values in * the given image. * * @param dataType a data type as defined in <code>DataBuffer</code> * @see java.awt.image.DataBuffer */
Returns an array containing the minimum and maximum value of the native data type used to store pixel values in the given image
getDataTypeMinMax
{ "repo_name": "arraydev/snap-engine", "path": "snap-core/src/main/java/org/esa/snap/util/ImageUtils.java", "license": "gpl-3.0", "size": 17363 }
[ "java.awt.image.DataBuffer" ]
import java.awt.image.DataBuffer;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
2,172,479
@Test public void testFindBestMove_CheckmateInTwo() throws Exception { assertFindMoveAtDepth(Move.create(BISHOP, F4_IDX, C1_IDX), FEN_CHECKMATE_1_1, 2); assertFindMoveAtDepth(Move.createCapture(ROOK, E8_IDX, G8_IDX, QUEEN), FEN_CHECKMATE_2_7, 2); int actual = findBestMoveWithDepth(FEN_C...
void function() throws Exception { assertFindMoveAtDepth(Move.create(BISHOP, F4_IDX, C1_IDX), FEN_CHECKMATE_1_1, 2); assertFindMoveAtDepth(Move.createCapture(ROOK, E8_IDX, G8_IDX, QUEEN), FEN_CHECKMATE_2_7, 2); int actual = findBestMoveWithDepth(FEN_CHECKMATE_3_1, 2); int f3d1 = Move.create(QUEEN, F3_IDX, D1_IDX); int ...
/** * Tests calling findBestMove with positions that result in forced checkmate in two moves. */
Tests calling findBestMove with positions that result in forced checkmate in two moves
testFindBestMove_CheckmateInTwo
{ "repo_name": "dykstrom/ronja", "path": "src/test/java/se/dykstrom/ronja/engine/core/AlphaBetaFinderTest.java", "license": "gpl-3.0", "size": 13679 }
[ "org.junit.Assert", "se.dykstrom.ronja.common.model.Move", "se.dykstrom.ronja.test.TestUtils" ]
import org.junit.Assert; import se.dykstrom.ronja.common.model.Move; import se.dykstrom.ronja.test.TestUtils;
import org.junit.*; import se.dykstrom.ronja.common.model.*; import se.dykstrom.ronja.test.*;
[ "org.junit", "se.dykstrom.ronja" ]
org.junit; se.dykstrom.ronja;
944,399
public void open() throws FileNotFoundException { raf = new RandomAccessFile(elmLogFile, "r"); }
void function() throws FileNotFoundException { raf = new RandomAccessFile(elmLogFile, "r"); }
/** * open me * * @throws FileNotFoundException */
open me
open
{ "repo_name": "BITPlan/can4eve", "path": "obdii/src/main/java/com/bitplan/obdii/elm327/RandomAccessLogReader.java", "license": "apache-2.0", "size": 8961 }
[ "java.io.FileNotFoundException", "java.io.RandomAccessFile" ]
import java.io.FileNotFoundException; import java.io.RandomAccessFile;
import java.io.*;
[ "java.io" ]
java.io;
998,626
protected ComplexEvent cloneComplexEvent(ComplexEvent complexEvent) { if (receiveStreamEvent) { return streamEventCloner.copyStreamEvent((StreamEvent) complexEvent); } else { return stateEventCloner.copyStateEvent((StateEvent) complexEvent); } }
ComplexEvent function(ComplexEvent complexEvent) { if (receiveStreamEvent) { return streamEventCloner.copyStreamEvent((StreamEvent) complexEvent); } else { return stateEventCloner.copyStateEvent((StateEvent) complexEvent); } }
/** * Clones a given complex event. * * @param complexEvent Complex event to be cloned * @return Cloned complex event */
Clones a given complex event
cloneComplexEvent
{ "repo_name": "codemogroup/siddhi", "path": "modules/siddhi-core/src/main/java/org/wso2/siddhi/core/query/output/ratelimit/snapshot/SnapshotOutputRateLimiter.java", "license": "apache-2.0", "size": 3667 }
[ "org.wso2.siddhi.core.event.ComplexEvent", "org.wso2.siddhi.core.event.state.StateEvent", "org.wso2.siddhi.core.event.stream.StreamEvent" ]
import org.wso2.siddhi.core.event.ComplexEvent; import org.wso2.siddhi.core.event.state.StateEvent; import org.wso2.siddhi.core.event.stream.StreamEvent;
import org.wso2.siddhi.core.event.*; import org.wso2.siddhi.core.event.state.*; import org.wso2.siddhi.core.event.stream.*;
[ "org.wso2.siddhi" ]
org.wso2.siddhi;
1,798,131
public Builder precision(double meters) { int level = GeoUtils.geoHashLevelsForPrecision(meters); // Ceiling precision: we might return more results if (GeoUtils.geoHashCellSize(level) < meters) { level = Math.max(1, level - 1); } return...
Builder function(double meters) { int level = GeoUtils.geoHashLevelsForPrecision(meters); if (GeoUtils.geoHashCellSize(level) < meters) { level = Math.max(1, level - 1); } return precision(level); }
/** * Set the precision use o make suggestions * * @param meters * precision as distance in meters * @return this */
Set the precision use o make suggestions
precision
{ "repo_name": "henakamaMSFT/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/suggest/completion/context/GeoContextMapping.java", "license": "apache-2.0", "size": 15551 }
[ "org.elasticsearch.common.geo.GeoUtils" ]
import org.elasticsearch.common.geo.GeoUtils;
import org.elasticsearch.common.geo.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,585,729
NavigableMap<Integer, T> getMapByNum();
NavigableMap<Integer, T> getMapByNum();
/** * A mapping from internal scan numbers. */
A mapping from internal scan numbers
getMapByNum
{ "repo_name": "chhh/MSFTBX", "path": "MSFileToolbox/src/main/java/umich/ms/datatypes/index/Index.java", "license": "apache-2.0", "size": 1868 }
[ "java.util.NavigableMap" ]
import java.util.NavigableMap;
import java.util.*;
[ "java.util" ]
java.util;
2,257,677
protected static List<WebElement> waitForElements(final By locator) { FluentWait<WebDriver> wait = new FluentWait<WebDriver>(getWebDriver()) .withTimeout(30, TimeUnit.SECONDS) .pollingEvery(500, TimeUnit.MILLISECONDS) .ignoring(NoSuchElementException.class);
static List<WebElement> function(final By locator) { FluentWait<WebDriver> wait = new FluentWait<WebDriver>(getWebDriver()) .withTimeout(30, TimeUnit.SECONDS) .pollingEvery(500, TimeUnit.MILLISECONDS) .ignoring(NoSuchElementException.class);
/** * Wait for elements. * * @param locator * the locator * @return the list */
Wait for elements
waitForElements
{ "repo_name": "openMF/mifosx-e2e-testing", "path": "MifosTestAutomation/src/test/java/com/mifos/pages/MifosWebPage.java", "license": "mpl-2.0", "size": 59471 }
[ "java.util.List", "java.util.concurrent.TimeUnit", "org.openqa.selenium.By", "org.openqa.selenium.NoSuchElementException", "org.openqa.selenium.WebDriver", "org.openqa.selenium.WebElement", "org.openqa.selenium.support.ui.FluentWait" ]
import java.util.List; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.FluentWait;
import java.util.*; import java.util.concurrent.*; import org.openqa.selenium.*; import org.openqa.selenium.support.ui.*;
[ "java.util", "org.openqa.selenium" ]
java.util; org.openqa.selenium;
1,136,921
public int minX() { int minX = points[0].x; for(Point p : points) { if(p.x < minX) minX = p.x; } return minX; }
int function() { int minX = points[0].x; for(Point p : points) { if(p.x < minX) minX = p.x; } return minX; }
/** * Returns the minimum X position contained in the piece * @return */
Returns the minimum X position contained in the piece
minX
{ "repo_name": "dieubware/Tetrek", "path": "Tetrek/src/org/dieubware/tetrek/model/BlockPiece.java", "license": "gpl-3.0", "size": 3717 }
[ "org.dieubware.jbrik.Point" ]
import org.dieubware.jbrik.Point;
import org.dieubware.jbrik.*;
[ "org.dieubware.jbrik" ]
org.dieubware.jbrik;
2,570,242
public void onConnectionFailed() { Log.d(LOG_TAG, "onConnectionFailed"); anymoteSender = null; // if (!platform.isWifiAvailable()) { // return; // } moteServer.onConnectionFailed(); // Find Google TV devices to connect to anymoteClientService.selectD...
void function() { Log.d(LOG_TAG, STR); anymoteSender = null; moteServer.onConnectionFailed(); anymoteClientService.selectDevice(); }
/** * ClientListener callback when the attempted connection to the Google TV device failed * @see com.motelabs.chromemote.bridge.java.anymote.client.ClientListener#onConnectionFailed() */
ClientListener callback when the attempted connection to the Google TV device failed
onConnectionFailed
{ "repo_name": "nevets801/Chromemote-Bridge", "path": "src/com/motelabs/chromemote/bridge/BackgroundService.java", "license": "gpl-2.0", "size": 12089 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
690,188
public List<ContactPoint> getContacts() { return this.cachedContacts; }
List<ContactPoint> function() { return this.cachedContacts; }
/** * Returns the list of contact points. * @return List&lt;{@link Vector2}&gt; */
Returns the list of contact points
getContacts
{ "repo_name": "dmitrykolesnikovich/dyn4j", "path": "sandbox/src/org/dyn4j/sandbox/ContactCounter.java", "license": "bsd-3-clause", "size": 6243 }
[ "java.util.List", "org.dyn4j.dynamics.contact.ContactPoint" ]
import java.util.List; import org.dyn4j.dynamics.contact.ContactPoint;
import java.util.*; import org.dyn4j.dynamics.contact.*;
[ "java.util", "org.dyn4j.dynamics" ]
java.util; org.dyn4j.dynamics;
2,216,002
public void handle(final Callback[] callbacks) throws UnsupportedCallbackException, IOException { if (callbacks == null || callbacks.length == 0) { return; } for (Callback cb : callbacks) { if (cb instanceof NameCallback) { ...
void function(final Callback[] callbacks) throws UnsupportedCallbackException, IOException { if (callbacks == null callbacks.length == 0) { return; } for (Callback cb : callbacks) { if (cb instanceof NameCallback) { NameCallback ncb = (NameCallback) cb; ncb.setName(uname); } else if (cb instanceof PasswordCallback) { P...
/** * Handle a callback. * * @param callbacks The list of callbacks to process. * * @throws UnsupportedCallbackException If callbacks has a callback other than {@link NameCallback} or * {@link PasswordCallback}. */
Handle a callback
handle
{ "repo_name": "Yubico/yubico-shibboleth-idp-multifactor-login-handler", "path": "src/main/java/com/yubico/shibboleth/idp/multifactor/MultiFactorAuthLoginServlet.java", "license": "apache-2.0", "size": 12974 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Collections", "javax.security.auth.callback.Callback", "javax.security.auth.callback.NameCallback", "javax.security.auth.callback.PasswordCallback", "javax.security.auth.callback.UnsupportedCallbackException" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import javax.security.auth.callback.Callback; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; import javax.security.auth.callback.UnsupportedCallbackException;
import java.io.*; import java.util.*; import javax.security.auth.callback.*;
[ "java.io", "java.util", "javax.security" ]
java.io; java.util; javax.security;
1,237,002
public Observable<ServiceResponse<DatabaseAccountListReadOnlyKeysResultInner>> listReadOnlyKeysWithServiceResponseAsync(String resourceGroupName, String accountName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is requir...
Observable<ServiceResponse<DatabaseAccountListReadOnlyKeysResultInner>> function(String resourceGroupName, String accountName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (accountName == null) { t...
/** * Lists the read-only access keys for the specified Azure Cosmos DB database account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @throws IllegalArgumentException thrown if parameters fail...
Lists the read-only access keys for the specified Azure Cosmos DB database account
listReadOnlyKeysWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cosmos/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_04_01/implementation/DatabaseAccountsInner.java", "license": "mit", "size": 153860 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
407,403
public Result execute(Result prev_result, int nr, Repository rep, Job parentJob) { prev_result.setResult( evaluate(prev_result) ); return prev_result; }
Result function(Result prev_result, int nr, Repository rep, Job parentJob) { prev_result.setResult( evaluate(prev_result) ); return prev_result; }
/** * Execute this job entry and return the result. * In this case it means, just set the result boolean in the Result class. * @param prev_result The result of the previous execution * @return The Result of the execution. */
Execute this job entry and return the result. In this case it means, just set the result boolean in the Result class
execute
{ "repo_name": "ontometrics/ontokettle", "path": "src/be/ibridge/kettle/job/entry/eval/JobEntryEval.java", "license": "lgpl-2.1", "size": 7373 }
[ "be.ibridge.kettle.core.Result", "be.ibridge.kettle.job.Job", "be.ibridge.kettle.repository.Repository" ]
import be.ibridge.kettle.core.Result; import be.ibridge.kettle.job.Job; import be.ibridge.kettle.repository.Repository;
import be.ibridge.kettle.core.*; import be.ibridge.kettle.job.*; import be.ibridge.kettle.repository.*;
[ "be.ibridge.kettle" ]
be.ibridge.kettle;
807,425
public void addStanzaAcknowledgedListener(StanzaListener listener) { stanzaAcknowledgedListeners.add(listener); }
void function(StanzaListener listener) { stanzaAcknowledgedListeners.add(listener); }
/** * Add a Stanza acknowledged listener. * <p> * Those listeners will be invoked every time a Stanza has been acknowledged by the server. The will not get * automatically removed. Consider using {@link #addStanzaIdAcknowledgedListener(String, StanzaListener)} when * possible. * </p> ...
Add a Stanza acknowledged listener. Those listeners will be invoked every time a Stanza has been acknowledged by the server. The will not get automatically removed. Consider using <code>#addStanzaIdAcknowledgedListener(String, StanzaListener)</code> when possible.
addStanzaAcknowledgedListener
{ "repo_name": "esl/Smack", "path": "smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java", "license": "apache-2.0", "size": 87634 }
[ "org.jivesoftware.smack.StanzaListener" ]
import org.jivesoftware.smack.StanzaListener;
import org.jivesoftware.smack.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
1,333,456
public static Float convertImpliedDecimalFormat(String format, String toConvert) { long decimalPlace = 1; int indexOf = format.indexOf('V'); if (indexOf > -1) { boolean isV = false; for (int i = 0; i < format.length(); i++) { char charAt = format.charA...
static Float function(String format, String toConvert) { long decimalPlace = 1; int indexOf = format.indexOf('V'); if (indexOf > -1) { boolean isV = false; for (int i = 0; i < format.length(); i++) { char charAt = format.charAt(i); if (charAt == '9' && isV) { decimalPlace = 10 * decimalPlace; } else if (charAt == 'V') ...
/** * return numbers using an implied decimal format. * * {Category} Numeric * * {talendTypes} float | Float * * {param} String("9V99") format: float pointing format. * * {param} String("123") toConvert: read this value. * * {example} convertImpliedDecimalForm...
return numbers using an implied decimal format. {Category} Numeric {talendTypes} float | Float {param} String("9V99") format: float pointing format. {param} String("123") toConvert: read this value. {example} convertImpliedDecimalFormat("9V99", "123") result: 1.23 ..
convertImpliedDecimalFormat
{ "repo_name": "bio2rdf/bio2rdf-rest", "path": "src/routines/Numeric.java", "license": "mit", "size": 4091 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
691,177
User getUser(String username, String password) throws UserNotFoundException, SQLException, IOException;
User getUser(String username, String password) throws UserNotFoundException, SQLException, IOException;
/** * Gets user with specified username and password. * If a user with specific parametres cannot be found, * an exception is thrown. * * @param username of user to get. * @param password of user to get. * @return User instance if a user is found. * @throws SQLException ...
Gets user with specified username and password. If a user with specific parametres cannot be found, an exception is thrown
getUser
{ "repo_name": "claudiosv/MyCollections", "path": "src/main/it/unibz/MyCollections/DatabaseHandler.java", "license": "gpl-3.0", "size": 10471 }
[ "java.io.IOException", "java.sql.SQLException" ]
import java.io.IOException; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
1,297,280
public DatabaseSchema dbSchema() { return dbSchema; }
DatabaseSchema function() { return dbSchema; }
/** * Get DatabaseSchema entity. * @return DatabaseSchema entity */
Get DatabaseSchema entity
dbSchema
{ "repo_name": "sdnwiselab/onos", "path": "protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/AbstractOvsdbTableService.java", "license": "apache-2.0", "size": 9838 }
[ "org.onosproject.ovsdb.rfc.schema.DatabaseSchema" ]
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
import org.onosproject.ovsdb.rfc.schema.*;
[ "org.onosproject.ovsdb" ]
org.onosproject.ovsdb;
52,392
public int readVectorHeader() throws IOException { return in.readInt(); }
int function() throws IOException { return in.readInt(); }
/** * Reads the header following a <code>Type.VECTOR</code> code. * * @return the number of elements in the vector * @throws IOException */
Reads the header following a <code>Type.VECTOR</code> code
readVectorHeader
{ "repo_name": "vineetgarg02/hive", "path": "contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/TypedBytesInput.java", "license": "apache-2.0", "size": 12150 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,637,566
public MovieDetails getMovieDetails(int movieTmdbId) { String languageCode = DisplaySettings.getMoviesLanguage(context); return getMovieDetails(languageCode, movieTmdbId); }
MovieDetails function(int movieTmdbId) { String languageCode = DisplaySettings.getMoviesLanguage(context); return getMovieDetails(languageCode, movieTmdbId); }
/** * Download movie data from trakt and TMDb using the {@link DisplaySettings#getMoviesLanguage(Context)}. */
Download movie data from trakt and TMDb using the <code>DisplaySettings#getMoviesLanguage(Context)</code>
getMovieDetails
{ "repo_name": "TreyWiranta/ASV", "path": "SeriesGuide/src/main/java/com/battlelancer/seriesguide/util/MovieTools.java", "license": "unlicense", "size": 42931 }
[ "com.battlelancer.seriesguide.items.MovieDetails", "com.battlelancer.seriesguide.settings.DisplaySettings" ]
import com.battlelancer.seriesguide.items.MovieDetails; import com.battlelancer.seriesguide.settings.DisplaySettings;
import com.battlelancer.seriesguide.items.*; import com.battlelancer.seriesguide.settings.*;
[ "com.battlelancer.seriesguide" ]
com.battlelancer.seriesguide;
1,837,218
private void writeObject(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); }
void function(ObjectOutputStream out) throws IOException { out.defaultWriteObject(); }
/** Override of the default way to serialize this class. * * @param out Stream that the object will be written to. * @throws IOException In case there is an error from the underlying stream, * or this object cannot be serialized. */
Override of the default way to serialize this class
writeObject
{ "repo_name": "netarchivesuite/netarchivesuite-svngit-migration", "path": "src/dk/netarkivet/common/utils/batch/LoadableFileBatchJob.java", "license": "lgpl-2.1", "size": 7899 }
[ "java.io.IOException", "java.io.ObjectOutputStream" ]
import java.io.IOException; import java.io.ObjectOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,629,169
private Class getCompileTimeElementType() { if (propertyType instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) propertyType; Type[] typeArgs = parameterizedType.getActualTypeArguments(); if (typeArgs.length == 1) { ...
Class function() { if (propertyType instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) propertyType; Type[] typeArgs = parameterizedType.getActualTypeArguments(); if (typeArgs.length == 1) { Type firstTypeArg = typeArgs[0]; if (firstTypeArg instanceof Class) { return (Class) typeA...
/** * Uses reflection at runtime to get the elementType of an empty Collection * * @return the actual elementType of the Collection at runtime */
Uses reflection at runtime to get the elementType of an empty Collection
getCompileTimeElementType
{ "repo_name": "dsyrstad/wicket-web-beans", "path": "wicketwebbeans/src/main/java/com/googlecode/wicketwebbeans/model/ElementMetaData.java", "license": "apache-2.0", "size": 15423 }
[ "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type" ]
import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,618,782
public Type getType() { return typeAndQualifiers.type; }
Type function() { return typeAndQualifiers.type; }
/** * This method always returns the original type declared on the injection point, unlike {@link #getRequiredType()}. * * @return the type specified at the injection point */
This method always returns the original type declared on the injection point, unlike <code>#getRequiredType()</code>
getType
{ "repo_name": "quarkusio/quarkus", "path": "independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InjectionPointInfo.java", "license": "apache-2.0", "size": 13484 }
[ "org.jboss.jandex.Type" ]
import org.jboss.jandex.Type;
import org.jboss.jandex.*;
[ "org.jboss.jandex" ]
org.jboss.jandex;
757,210
public List<Condition> getWarningConditions() { return warningConditions; }
List<Condition> function() { return warningConditions; }
/** * Returns a list of warning conditions set by the model. Returns an empty list if no warning conditions were set. * * @return List of warning conditions. */
Returns a list of warning conditions set by the model. Returns an empty list if no warning conditions were set
getWarningConditions
{ "repo_name": "scholzj/barnabas", "path": "cluster-operator/src/main/java/io/strimzi/operator/cluster/model/AbstractModel.java", "license": "apache-2.0", "size": 69138 }
[ "io.strimzi.api.kafka.model.status.Condition", "java.util.List" ]
import io.strimzi.api.kafka.model.status.Condition; import java.util.List;
import io.strimzi.api.kafka.model.status.*; import java.util.*;
[ "io.strimzi.api", "java.util" ]
io.strimzi.api; java.util;
198,046
public boolean equals (Object obj) { if (! (obj instanceof Attributes)) return false; Attributes bs = (Attributes) obj; if (ignoreCase != bs.isCaseIgnored() || attributes.size () != bs.size ()) return false; NamingEnumeration bas = bs.getAll(); while (bas.hasMoreElements())...
boolean function (Object obj) { if (! (obj instanceof Attributes)) return false; Attributes bs = (Attributes) obj; if (ignoreCase != bs.isCaseIgnored() attributes.size () != bs.size ()) return false; NamingEnumeration bas = bs.getAll(); while (bas.hasMoreElements()) { Attribute a = (Attribute) bas.nextElement(); Attrib...
/** * Returns true if and only if the given Object is an instance of * Attributes, the given attributes both do or don't ignore case for * IDs and the collection of attributes is the same. */
Returns true if and only if the given Object is an instance of Attributes, the given attributes both do or don't ignore case for IDs and the collection of attributes is the same
equals
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/naming/directory/BasicAttributes.java", "license": "gpl-2.0", "size": 7376 }
[ "javax.naming.NamingEnumeration" ]
import javax.naming.NamingEnumeration;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
2,341,896
private String parseWords(String separators, boolean write, boolean withSeparator) throws IOException { String word = ""; //$NON-NLS-1$ char lastChar; char character = 'a'; // initial value any character not in // separators while (buffer.ready() && separators.indexOf(character) == -1) { l...
String function(String separators, boolean write, boolean withSeparator) throws IOException { String word = ""; char lastChar; char character = 'a'; while (buffer.ready() && separators.indexOf(character) == -1) { lastChar = character; character = (char) buffer.read(); if (character == '/') { lastChar = character; chara...
/** * Parses the words. * @param separators * the separators * @param write * the write * @param withSeparator * the with separator * @return the string * @throws IOException * Signals that an I/O exception has occurred. */
Parses the words
parseWords
{ "repo_name": "heartsome/tmxeditor8", "path": "hsconverter/net.heartsome.cat.converter.rc/src/net/heartsome/cat/converter/rc/Rc2Xliff.java", "license": "gpl-2.0", "size": 32622 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,066,155
protected Item process(OboTerm term) throws ObjectStoreException { if (term.isObsolete()) { LOG.info("Not processing obsolete OBO term: " + term.getId() + " " + term.getName()); return null; } String termId = (term.getId() == null ? term.getName() : term.getId()); ...
Item function(OboTerm term) throws ObjectStoreException { if (term.isObsolete()) { LOG.info(STR + term.getId() + " " + term.getName()); return null; } String termId = (term.getId() == null ? term.getName() : term.getId()); if (prefix != null && !termId.toLowerCase().startsWith(prefix.toLowerCase())) { final String msg ...
/** * Convert a OboTerm into an Item and relation Items, and write the relations to the writer. * * @param term a DagTerm * @return an Item representing the term * @throws ObjectStoreException if an error occurs while writing to the itemWriter */
Convert a OboTerm into an Item and relation Items, and write the relations to the writer
process
{ "repo_name": "JoeCarlson/intermine", "path": "bio/core/main/src/org/intermine/bio/dataconversion/OboConverter.java", "license": "lgpl-2.1", "size": 12245 }
[ "org.intermine.bio.ontology.OboTerm", "org.intermine.objectstore.ObjectStoreException", "org.intermine.xml.full.Item" ]
import org.intermine.bio.ontology.OboTerm; import org.intermine.objectstore.ObjectStoreException; import org.intermine.xml.full.Item;
import org.intermine.bio.ontology.*; import org.intermine.objectstore.*; import org.intermine.xml.full.*;
[ "org.intermine.bio", "org.intermine.objectstore", "org.intermine.xml" ]
org.intermine.bio; org.intermine.objectstore; org.intermine.xml;
873,709
public static void writeStaticField(Field field, Object value, boolean forceAccess) throws IllegalAccessException { if (field == null) { throw new IllegalArgumentException("The field must not be null"); } if (!Modifier.isStatic(field.getModifiers())) { throw new Illeg...
static void function(Field field, Object value, boolean forceAccess) throws IllegalAccessException { if (field == null) { throw new IllegalArgumentException(STR); } if (!Modifier.isStatic(field.getModifiers())) { throw new IllegalArgumentException(STR + field.getName() + STR); } writeField(field, (Object) null, value, ...
/** * Write a static Field. * @param field to write * @param value to set * @param forceAccess whether to break scope restrictions using the * <code>setAccessible</code> method. <code>False</code> will only * match public fields. * @throws IllegalArgumentException if the field is n...
Write a static Field
writeStaticField
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/clang/src/main/java/org/apache/commons/lang/reflect/FieldUtils.java", "license": "gpl-2.0", "size": 26157 }
[ "java.lang.reflect.Field", "java.lang.reflect.Modifier" ]
import java.lang.reflect.Field; import java.lang.reflect.Modifier;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,508,389
public void setChoices(double[] limits, String formats[]) { if (limits.length != formats.length) { throw new IllegalArgumentException( "Array and limit arrays must be of the same length."); } choiceLimits = Arrays.copyOf(limits, limits.length); choiceForma...
void function(double[] limits, String formats[]) { if (limits.length != formats.length) { throw new IllegalArgumentException( STR); } choiceLimits = Arrays.copyOf(limits, limits.length); choiceFormats = Arrays.copyOf(formats, formats.length); }
/** * Set the choices to be used in formatting. * @param limits contains the top value that you want * parsed with that format,and should be in ascending sorted order. When * formatting X, the choice will be the i, where * limit[i] &lt;= X &lt; limit[i+1]. * If the limit array is not in as...
Set the choices to be used in formatting
setChoices
{ "repo_name": "karianna/jdk8_tl", "path": "jdk/src/share/classes/java/text/ChoiceFormat.java", "license": "gpl-2.0", "size": 23315 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,034,747
public GridCacheVersionConflictContext<K, V> conflictResolve(GridCacheVersionedEntryEx<K, V> oldEntry, GridCacheVersionedEntryEx<K, V> newEntry, boolean atomicVerComp) throws IgniteCheckedException { assert conflictRslvr != null : "Should not reach this place."; GridCacheVersionConflictCont...
GridCacheVersionConflictContext<K, V> function(GridCacheVersionedEntryEx<K, V> oldEntry, GridCacheVersionedEntryEx<K, V> newEntry, boolean atomicVerComp) throws IgniteCheckedException { assert conflictRslvr != null : STR; GridCacheVersionConflictContext<K, V> ctx = conflictRslvr.resolve(cacheObjCtx, oldEntry, newEntry,...
/** * Resolve DR conflict. * * @param oldEntry Old entry. * @param newEntry New entry. * @param atomicVerComp Whether to use atomic version comparator. * @return Conflict resolution result. * @throws IgniteCheckedException In case of exception. */
Resolve DR conflict
conflictResolve
{ "repo_name": "ptupitsyn/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java", "license": "apache-2.0", "size": 70234 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.cache.version.GridCacheVersionConflictContext", "org.apache.ignite.internal.processors.cache.version.GridCacheVersionedEntryEx" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.version.GridCacheVersionConflictContext; import org.apache.ignite.internal.processors.cache.version.GridCacheVersionedEntryEx;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.version.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,444,953
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) public void onMobDeath(EntityDeathEvent event) { LivingEntity entity = event.getEntity(); //killer is null if it's not a player Player killer = entity.getKiller(); //Check if it's not player because we are alre...
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGH) void function(EntityDeathEvent event) { LivingEntity entity = event.getEntity(); Player killer = entity.getKiller(); if (entity.getType() != EntityType.PLAYER && Settings.isActiveWorld(entity.getWorld().getName())) { database.getStats(killer).ifPresen...
/** * Tracks the mob kills. * * @param event the death event */
Tracks the mob kills
onMobDeath
{ "repo_name": "games647/ScoreboardStats", "path": "pvp/src/main/java/com/github/games647/scoreboardstats/pvp/StatsListener.java", "license": "mit", "size": 4335 }
[ "com.github.games647.scoreboardstats.config.Settings", "com.github.games647.scoreboardstats.variables.ReplaceManager", "org.bukkit.entity.EntityType", "org.bukkit.entity.LivingEntity", "org.bukkit.entity.Player", "org.bukkit.event.EventHandler", "org.bukkit.event.EventPriority", "org.bukkit.event.enti...
import com.github.games647.scoreboardstats.config.Settings; import com.github.games647.scoreboardstats.variables.ReplaceManager; import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; impor...
import com.github.games647.scoreboardstats.config.*; import com.github.games647.scoreboardstats.variables.*; import org.bukkit.entity.*; import org.bukkit.event.*; import org.bukkit.event.entity.*;
[ "com.github.games647", "org.bukkit.entity", "org.bukkit.event" ]
com.github.games647; org.bukkit.entity; org.bukkit.event;
1,829,238
public void drop( ) throws SemanticException { throw new IllegalOperationException( ); }
void function( ) throws SemanticException { throw new IllegalOperationException( ); }
/** * This method is not defined for private styles. It will raise an assertion * if called. To change the element that owns this private style, use * <code>getElementHandle</code> to first get a handle to that element. * * @see org.eclipse.birt.report.model.api.DesignElementHandle#drop() */
This method is not defined for private styles. It will raise an assertion if called. To change the element that owns this private style, use <code>getElementHandle</code> to first get a handle to that element
drop
{ "repo_name": "Charling-Huang/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/PrivateStyleHandle.java", "license": "epl-1.0", "size": 6515 }
[ "org.eclipse.birt.report.model.api.activity.SemanticException" ]
import org.eclipse.birt.report.model.api.activity.SemanticException;
import org.eclipse.birt.report.model.api.activity.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
38,753
private String printTrackList(List trackingList) { if (trackingList != null) { StringBuffer sb = new StringBuffer(); Iterator iter = trackingList.iterator(); sb.append("Trace list:"); sb.append('\n'); while (iter.hasNext()) { sb.app...
String function(List trackingList) { if (trackingList != null) { StringBuffer sb = new StringBuffer(); Iterator iter = trackingList.iterator(); sb.append(STR); sb.append('\n'); while (iter.hasNext()) { sb.append((TrackingInfo) iter.next()); sb.append('\n'); } return sb.toString(); } else { return null; } }
/** * Dump a tracking list into a string. */
Dump a tracking list into a string
printTrackList
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/je-3.2.74/src/com/sleepycat/je/recovery/RecoveryManager.java", "license": "gpl-2.0", "size": 92565 }
[ "com.sleepycat.je.tree.TrackingInfo", "java.util.Iterator", "java.util.List" ]
import com.sleepycat.je.tree.TrackingInfo; import java.util.Iterator; import java.util.List;
import com.sleepycat.je.tree.*; import java.util.*;
[ "com.sleepycat.je", "java.util" ]
com.sleepycat.je; java.util;
1,914,793
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; nodePanel = new javax.swing.JPanel(); bnEditIngestSettings = new javax.swing.JButt...
@SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; nodePanel = new javax.swing.JPanel(); bnEditIngestSettings = new javax.swing.JButton(); bnEditReportSettings = new javax.swing.JButton(); javax.swing.JTextPane ingestDescriptionTextPane = new javax.swing.JTextPane(); javax.swing.JL...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/commandlineingest/CommandLineIngestSettingsPanel.java", "license": "apache-2.0", "size": 18005 }
[ "java.awt.BorderLayout" ]
import java.awt.BorderLayout;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,309,743
@Override public int getMaxColumnsInOrderBy() throws SQLException { return 0; }
int function() throws SQLException { return 0; }
/** * <p> * <h1>Implementation Details:</h1><br> * Returns 0 * </p> */
Implementation Details: Returns 0
getMaxColumnsInOrderBy
{ "repo_name": "jonathanswenson/starschema-bigquery-jdbc", "path": "src/main/java/net/starschema/clouddb/jdbc/BQDatabaseMetadata.java", "license": "bsd-2-clause", "size": 92438 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,012,168
private void createDevices(int numDevices, int numPorts) { List<Device> devices = new ArrayList<>(); for (int i = 1; i <= numDevices; i++) { DeviceId devId = getDeviceId(i); Device device = createMock(Device.class); expect(device.id()).andReturn(devId).anyTimes()...
void function(int numDevices, int numPorts) { List<Device> devices = new ArrayList<>(); for (int i = 1; i <= numDevices; i++) { DeviceId devId = getDeviceId(i); Device device = createMock(Device.class); expect(device.id()).andReturn(devId).anyTimes(); replay(device); devices.add(device); List<Port> ports = new ArrayLis...
/** * Creates the devices for the fake topology. */
Creates the devices for the fake topology
createDevices
{ "repo_name": "packet-tracker/onos", "path": "core/net/src/test/java/org/onosproject/net/proxyarp/impl/ProxyArpManagerTest.java", "license": "apache-2.0", "size": 25484 }
[ "java.util.ArrayList", "java.util.List", "org.easymock.EasyMock", "org.onosproject.net.Device", "org.onosproject.net.DeviceId", "org.onosproject.net.Port", "org.onosproject.net.PortNumber" ]
import java.util.ArrayList; import java.util.List; import org.easymock.EasyMock; import org.onosproject.net.Device; import org.onosproject.net.DeviceId; import org.onosproject.net.Port; import org.onosproject.net.PortNumber;
import java.util.*; import org.easymock.*; import org.onosproject.net.*;
[ "java.util", "org.easymock", "org.onosproject.net" ]
java.util; org.easymock; org.onosproject.net;
256,364
@Override public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { PathRegex annot = parameter.getParameterAnnotation(PathRegex.class); String regex = annot.value(); HttpServletRequest reque...
Object function(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { PathRegex annot = parameter.getParameterAnnotation(PathRegex.class); String regex = annot.value(); HttpServletRequest request = webRequest.getNativeRequest(H...
/** * Return a Map with all URI template variables or an empty map. */
Return a Map with all URI template variables or an empty map
resolveArgument
{ "repo_name": "tanhaichao/leopard-mvc", "path": "leopard-xparam/src/main/java/io/leopard/web/xparam/resolver/PathRegexHandlerMethodArgumentResolver.java", "license": "apache-2.0", "size": 1827 }
[ "io.leopard.web.xparam.PathRegex", "java.util.regex.Matcher", "java.util.regex.Pattern", "javax.servlet.http.HttpServletRequest", "org.springframework.core.MethodParameter", "org.springframework.web.bind.support.WebDataBinderFactory", "org.springframework.web.context.request.NativeWebRequest", "org.sp...
import io.leopard.web.xparam.PathRegex; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; import org.springframework.core.MethodParameter; import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.context.request.NativeWe...
import io.leopard.web.xparam.*; import java.util.regex.*; import javax.servlet.http.*; import org.springframework.core.*; import org.springframework.web.bind.support.*; import org.springframework.web.context.request.*; import org.springframework.web.method.support.*;
[ "io.leopard.web", "java.util", "javax.servlet", "org.springframework.core", "org.springframework.web" ]
io.leopard.web; java.util; javax.servlet; org.springframework.core; org.springframework.web;
1,236,473
private void writeObject(ObjectOutputStream out) throws IOException { maybeParse(); out.defaultWriteObject(); }
void function(ObjectOutputStream out) throws IOException { maybeParse(); out.defaultWriteObject(); }
/** * Ensure object is fully parsed before invoking java serialization. The backing byte array * is transient so if the object has parseLazy = true and hasn't invoked checkParse yet * then data will be lost during serialization. */
Ensure object is fully parsed before invoking java serialization. The backing byte array is transient so if the object has parseLazy = true and hasn't invoked checkParse yet then data will be lost during serialization
writeObject
{ "repo_name": "Huck/worldcoinj", "path": "core/src/main/java/com/google/worldcoin/core/TransactionInput.java", "license": "apache-2.0", "size": 18696 }
[ "java.io.IOException", "java.io.ObjectOutputStream" ]
import java.io.IOException; import java.io.ObjectOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,292,707
public Run getRun(String id, UserCredentials credentials) throws NetworkConnectionException { return getRunsFromServer(credentials).get(id); }
Run function(String id, UserCredentials credentials) throws NetworkConnectionException { return getRunsFromServer(credentials).get(id); }
/** * Get the Run instance hosted by this Server by its id. * * @param id * The id of the Run instance to get. * @return the Run instance. */
Get the Run instance hosted by this Server by its id
getRun
{ "repo_name": "Phoenix1708/t2-server-jar-android-0.1", "path": "t2-server-jar-android-0.1-hyde/src/main/java/uk/org/taverna/server/client/Server.java", "license": "bsd-3-clause", "size": 13830 }
[ "uk.org.taverna.server.client.connection.UserCredentials" ]
import uk.org.taverna.server.client.connection.UserCredentials;
import uk.org.taverna.server.client.connection.*;
[ "uk.org.taverna" ]
uk.org.taverna;
1,755,831
private static String toString(final ISPO spo) { return (SPO.toString(spo.s()) + ":" + SPO.toString(spo.p()) + ":" + SPO.toString(spo.o())); }
static String function(final ISPO spo) { return (SPO.toString(spo.s()) + ":" + SPO.toString(spo.p()) + ":" + SPO.toString(spo.o())); }
/** * Pretty print the inline spo. Calling SPO.toString() results in an * infinite loop. */
Pretty print the inline spo. Calling SPO.toString() results in an infinite loop
toString
{ "repo_name": "blazegraph/database", "path": "bigdata-core/bigdata-rdf/src/java/com/bigdata/rdf/internal/impl/bnode/SidIV.java", "license": "gpl-2.0", "size": 11664 }
[ "com.bigdata.rdf.spo.SPO" ]
import com.bigdata.rdf.spo.SPO;
import com.bigdata.rdf.spo.*;
[ "com.bigdata.rdf" ]
com.bigdata.rdf;
2,006,715
@Bean public FlowDefinitionRegistry flowRegistry() { return getFlowDefinitionRegistryBuilder(flowBuilderServices()) .setBasePath("/WEB-INF/flows") .addFlowLocationPattern("/**/*-flow.xml").build(); }
FlowDefinitionRegistry function() { return getFlowDefinitionRegistryBuilder(flowBuilderServices()) .setBasePath(STR) .addFlowLocationPattern(STR).build(); }
/** * FlowDefinitionRegistry tells Spring WebFlow where to look for flow xml files. */
FlowDefinitionRegistry tells Spring WebFlow where to look for flow xml files
flowRegistry
{ "repo_name": "blueinblue/tbase", "path": "tbase/src/main/java/org/bib/tbase/config/web/WebFlowConfig.java", "license": "mit", "size": 5419 }
[ "org.springframework.webflow.definition.registry.FlowDefinitionRegistry" ]
import org.springframework.webflow.definition.registry.FlowDefinitionRegistry;
import org.springframework.webflow.definition.registry.*;
[ "org.springframework.webflow" ]
org.springframework.webflow;
1,292,399
static void warmUpEdekCache(final ExecutorService executor, final FSDirectory fsd, final int delay, final int interval) { fsd.readLock(); try { String[] edeks = fsd.ezManager.getKeyNames(); executor.execute( new EDEKCacheLoader(edeks, fsd.getProvider(), delay, interval)); } fi...
static void warmUpEdekCache(final ExecutorService executor, final FSDirectory fsd, final int delay, final int interval) { fsd.readLock(); try { String[] edeks = fsd.ezManager.getKeyNames(); executor.execute( new EDEKCacheLoader(edeks, fsd.getProvider(), delay, interval)); } finally { fsd.readUnlock(); } } static class ...
/** * Proactively warm up the edek cache. We'll get all the edek key names, * then launch up a separate thread to warm them up. */
Proactively warm up the edek cache. We'll get all the edek key names, then launch up a separate thread to warm them up
warmUpEdekCache
{ "repo_name": "mapr/hadoop-common", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirEncryptionZoneOp.java", "license": "apache-2.0", "size": 29062 }
[ "java.util.concurrent.ExecutorService", "org.apache.hadoop.crypto.key.KeyProviderCryptoExtension" ]
import java.util.concurrent.ExecutorService; import org.apache.hadoop.crypto.key.KeyProviderCryptoExtension;
import java.util.concurrent.*; import org.apache.hadoop.crypto.key.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,125,380
private void logIP() { Connection con = null; Statement st1 = null; String delSQL = "DELETE FROM tbliptracking WHERE ipaddr='" + StringEscapeUtils.escapeSql(handler.getOriginalFullRequest() .getRemoteAddr()) + "'"; String insSQL = "INSERT INTO tbliptracking (ipaddr, securityuserid) VALUES ('" ...
void function() { Connection con = null; Statement st1 = null; String delSQL = STR + StringEscapeUtils.escapeSql(handler.getOriginalFullRequest() .getRemoteAddr()) + "'"; String insSQL = STR + StringEscapeUtils.escapeSql(handler.getOriginalFullRequest() .getRemoteAddr()) + STR+this.getSecurityUserID()+"')"; try { con =...
/** * Log the IP address for security auditing purposes */
Log the IP address for security auditing purposes
logIP
{ "repo_name": "petebrew/tellervo", "path": "tellervo-server/src/main/java/org/tellervo/server/Auth.java", "license": "gpl-3.0", "size": 17964 }
[ "java.sql.Connection", "java.sql.SQLException", "java.sql.Statement", "org.apache.commons.lang.StringEscapeUtils", "org.tellervo.schema.TellervoRequestStatus" ]
import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import org.apache.commons.lang.StringEscapeUtils; import org.tellervo.schema.TellervoRequestStatus;
import java.sql.*; import org.apache.commons.lang.*; import org.tellervo.schema.*;
[ "java.sql", "org.apache.commons", "org.tellervo.schema" ]
java.sql; org.apache.commons; org.tellervo.schema;
2,759,747
azure .networks() .manager() .serviceClient() .getVpnGateways() .startPacketCapture( "rg1", "vpngw", new VpnGatewayPacketCaptureStartParameters() .withFilterData( "{'Tr...
azure .networks() .manager() .serviceClient() .getVpnGateways() .startPacketCapture( "rg1", "vpngw", new VpnGatewayPacketCaptureStartParameters() .withFilterData( STR + STR + STR + STR), Context.NONE); }
/** * Sample code: Start packet capture on vpn gateway with filter. * * @param azure The entry point for accessing resource management APIs in Azure. */
Sample code: Start packet capture on vpn gateway with filter
startPacketCaptureOnVpnGatewayWithFilter
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/VpnGatewaysStartPacketCaptureSamples.java", "license": "mit", "size": 2315 }
[ "com.azure.core.util.Context", "com.azure.resourcemanager.network.models.VpnGatewayPacketCaptureStartParameters" ]
import com.azure.core.util.Context; import com.azure.resourcemanager.network.models.VpnGatewayPacketCaptureStartParameters;
import com.azure.core.util.*; import com.azure.resourcemanager.network.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,533,555
public static FlashMap getOutputFlashMap(HttpServletRequest request) { return (FlashMap) request.getAttribute(DispatcherServlet.OUTPUT_FLASH_MAP_ATTRIBUTE); }
static FlashMap function(HttpServletRequest request) { return (FlashMap) request.getAttribute(DispatcherServlet.OUTPUT_FLASH_MAP_ATTRIBUTE); }
/** * Return the "output" FlashMap with attributes to save for a subsequent request. * @param request the current request * @return a {@link FlashMap} instance (never {@code null} within a DispatcherServlet request) * @see FlashMap */
Return the "output" FlashMap with attributes to save for a subsequent request
getOutputFlashMap
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.webmvc/org/springframework/web/servlet/support/RequestContextUtils.java", "license": "mit", "size": 10526 }
[ "javax.servlet.http.HttpServletRequest", "org.springframework.web.servlet.DispatcherServlet", "org.springframework.web.servlet.FlashMap" ]
import javax.servlet.http.HttpServletRequest; import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.FlashMap;
import javax.servlet.http.*; import org.springframework.web.servlet.*;
[ "javax.servlet", "org.springframework.web" ]
javax.servlet; org.springframework.web;
2,886,944
public List<T> getList() { return list; }
List<T> function() { return list; }
/** * Same as {@link #list()}, Bean property compatible. * @return a List of the elements held in this Partition. */
Same as <code>#list()</code>, Bean property compatible
getList
{ "repo_name": "bitzl/openwayback", "path": "wayback-core/src/main/java/org/archive/wayback/util/partition/Partition.java", "license": "apache-2.0", "size": 3836 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,524,298
protected List<CmsResource> readAll(Collection<CmsUUID> structureIds, CmsResourceFilter filter) { List<CmsResource> result = new ArrayList<CmsResource>(); for (CmsUUID id : structureIds) { try { result.add(getCmsObject().readResource(id, filter)); } catch (Cm...
List<CmsResource> function(Collection<CmsUUID> structureIds, CmsResourceFilter filter) { List<CmsResource> result = new ArrayList<CmsResource>(); for (CmsUUID id : structureIds) { try { result.add(getCmsObject().readResource(id, filter)); } catch (CmsException e) { LOG.info(e.getLocalizedMessage(), e); } } return resul...
/** * Reads the resources for a collection of structure ids and returns the list of resources which could be read.<p> * * @param structureIds the structure ids for which we want to read the resources * @param filter the filter used to read the resource * * @return the list of resources for...
Reads the resources for a collection of structure ids and returns the list of resources which could be read
readAll
{ "repo_name": "gallardo/opencms-core", "path": "src/org/opencms/ade/galleries/CmsGalleryService.java", "license": "lgpl-2.1", "size": 125777 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "org.opencms.file.CmsResource", "org.opencms.file.CmsResourceFilter", "org.opencms.main.CmsException", "org.opencms.util.CmsUUID" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.main.CmsException; import org.opencms.util.CmsUUID;
import java.util.*; import org.opencms.file.*; import org.opencms.main.*; import org.opencms.util.*;
[ "java.util", "org.opencms.file", "org.opencms.main", "org.opencms.util" ]
java.util; org.opencms.file; org.opencms.main; org.opencms.util;
1,502,754
public void initializeScreenInfo(Activity activity) { DisplayMetrics metric = new DisplayMetrics(); activity.getWindowManager().getDefaultDisplay().getMetrics(metric); mDensity = metric.density; mDensityDpi = metric.densityDpi; if (metric.heightPixels >= metric.widthPixels) {...
void function(Activity activity) { DisplayMetrics metric = new DisplayMetrics(); activity.getWindowManager().getDefaultDisplay().getMetrics(metric); mDensity = metric.density; mDensityDpi = metric.densityDpi; if (metric.heightPixels >= metric.widthPixels) { screenWidthForPortrait = metric.widthPixels; screenHeightForPo...
/** * init get device information * * @param activity */
init get device information
initializeScreenInfo
{ "repo_name": "androidmalin/DecodeLocalBigBitmap", "path": "app/src/main/java/com/malin/decode/bitmap/util/DeviceInfo.java", "license": "mit", "size": 2744 }
[ "android.app.Activity", "android.util.DisplayMetrics" ]
import android.app.Activity; import android.util.DisplayMetrics;
import android.app.*; import android.util.*;
[ "android.app", "android.util" ]
android.app; android.util;
1,208,830
private GenericAvroConverter<GenericRecord> getConverter(String schema) { LOG.trace("Get converter for schema [{}]", schema); Map<String, GenericAvroConverter<GenericRecord>> converterMap = converters.get(); GenericAvroConverter<GenericRecord> genAvroConverter = converterMap.get(schema); ...
GenericAvroConverter<GenericRecord> function(String schema) { LOG.trace(STR, schema); Map<String, GenericAvroConverter<GenericRecord>> converterMap = converters.get(); GenericAvroConverter<GenericRecord> genAvroConverter = converterMap.get(schema); if (genAvroConverter == null) { LOG.trace(STR, schema); genAvroConverte...
/** * Gets the converter. * * @param schema * the schema * @return the converter */
Gets the converter
getConverter
{ "repo_name": "Deepnekroz/kaa", "path": "server/appenders/kafka-appender/src/main/java/org/kaaproject/kaa/server/appenders/kafka/appender/KafkaLogAppender.java", "license": "apache-2.0", "size": 9821 }
[ "java.util.Map", "org.apache.avro.generic.GenericRecord", "org.kaaproject.kaa.common.avro.GenericAvroConverter" ]
import java.util.Map; import org.apache.avro.generic.GenericRecord; import org.kaaproject.kaa.common.avro.GenericAvroConverter;
import java.util.*; import org.apache.avro.generic.*; import org.kaaproject.kaa.common.avro.*;
[ "java.util", "org.apache.avro", "org.kaaproject.kaa" ]
java.util; org.apache.avro; org.kaaproject.kaa;
2,890,673
static void setFragment(PreferenceManager manager, PreferenceFragment fragment) { // stub }
static void setFragment(PreferenceManager manager, PreferenceFragment fragment) { }
/** * Sets the owning preference fragment */
Sets the owning preference fragment
setFragment
{ "repo_name": "tsdl2013/COCOFramework", "path": "framework/src/main/java/com/cocosw/framework/preference/PreferenceManagerCompat.java", "license": "apache-2.0", "size": 9613 }
[ "android.preference.PreferenceManager" ]
import android.preference.PreferenceManager;
import android.preference.*;
[ "android.preference" ]
android.preference;
1,072,959
@Override public boolean isSingleton(String name) throws NoSuchBeanDefinitionException { getBean(name); return true; }
boolean function(String name) throws NoSuchBeanDefinitionException { getBean(name); return true; }
/** * Is the bean a singleton? Always true because all beans in Oddjob * are singletons in Spring terms. * * @param name The id of the bean in Oddjob. * * @return Always true if the bean exists. * * @throws NoSuchBeanDefinitionException if there is no bean with the given name * * @see ...
Is the bean a singleton? Always true because all beans in Oddjob are singletons in Spring terms
isSingleton
{ "repo_name": "robjg/oj-spring", "path": "src/main/java/org/oddjob/spring/OddjobBeanFactory.java", "license": "apache-2.0", "size": 8604 }
[ "org.springframework.beans.factory.NoSuchBeanDefinitionException" ]
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.*;
[ "org.springframework.beans" ]
org.springframework.beans;
1,306,562
public static <L,R> Pair<Optional<L>,R> lopair( @Nullable final L left, @Nonnull final R right ) { return new Pair<>( Optional.fromNullable( left ), right ); }
static <L,R> Pair<Optional<L>,R> function( @Nullable final L left, @Nonnull final R right ) { return new Pair<>( Optional.fromNullable( left ), right ); }
/** * Convenience constructor for a left optional pair. * * @param left The left value * @param right The right value * @param <L> The left type * @param <R> The right type * @return The new pair */
Convenience constructor for a left optional pair
lopair
{ "repo_name": "davenpcj5542009/eucalyptus", "path": "clc/modules/msgs/src/main/java/com/eucalyptus/util/Pair.java", "license": "gpl-3.0", "size": 6350 }
[ "com.google.common.base.Optional", "javax.annotation.Nonnull", "javax.annotation.Nullable" ]
import com.google.common.base.Optional; import javax.annotation.Nonnull; import javax.annotation.Nullable;
import com.google.common.base.*; import javax.annotation.*;
[ "com.google.common", "javax.annotation" ]
com.google.common; javax.annotation;
355,602
public static long getDistanceSquared2D(@NotNull final BlockPos block1, @NotNull final BlockPos block2) { final long xDiff = (long) block1.getX() - block2.getX(); final long zDiff = (long) block1.getZ() - block2.getZ(); final long result = xDiff * xDiff + zDiff * zDiff; if (resu...
static long function(@NotNull final BlockPos block1, @NotNull final BlockPos block2) { final long xDiff = (long) block1.getX() - block2.getX(); final long zDiff = (long) block1.getZ() - block2.getZ(); final long result = xDiff * xDiff + zDiff * zDiff; if (result < 0) { throw new IllegalStateException(STR + xDiff + " " ...
/** * 2D Squared distance between two BlockPos. * * @param block1 position one. * @param block2 position two. * @return 2D squared distance. */
2D Squared distance between two BlockPos
getDistanceSquared2D
{ "repo_name": "xavierh/minecolonies", "path": "src/main/java/com/minecolonies/coremod/util/BlockPosUtil.java", "license": "gpl-3.0", "size": 14311 }
[ "net.minecraft.util.math.BlockPos", "org.jetbrains.annotations.NotNull" ]
import net.minecraft.util.math.BlockPos; import org.jetbrains.annotations.NotNull;
import net.minecraft.util.math.*; import org.jetbrains.annotations.*;
[ "net.minecraft.util", "org.jetbrains.annotations" ]
net.minecraft.util; org.jetbrains.annotations;
988,080
public Iterator<Item> iterator() { return new ListIterator<Item>(first); } // an iterator, doesn't implement remove() since it's optional private class ListIterator<Item> implements Iterator<Item> { private Node<Item> current; public ListIterator(Node<Item> first) { ...
Iterator<Item> function() { return new ListIterator<Item>(first); } private class ListIterator<Item> implements Iterator<Item> { private Node<Item> current; public ListIterator(Node<Item> first) { current = first; } public boolean hasNext() { return current != null; }
/** * Returns an iterator that iterates over the items in this queue in FIFO order. * @return an iterator that iterates over the items in this queue in FIFO order */
Returns an iterator that iterates over the items in this queue in FIFO order
iterator
{ "repo_name": "ynagarjuna1995/java_jail", "path": "cp/stdlibpack/Queue.java", "license": "agpl-3.0", "size": 5139 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
320,830
public void setAvatarInUse(AvatarSPI avatar, boolean isLocal) { settings.setAvatarNameInUse(avatar.getName()); // Write out the avatar currently in use to the configuration file. try { AvatarConfigUtils.saveConfigSettings(avatarCollection, settings); } catch (jav...
void function(AvatarSPI avatar, boolean isLocal) { settings.setAvatarNameInUse(avatar.getName()); try { AvatarConfigUtils.saveConfigSettings(avatarCollection, settings); } catch (java.lang.Exception excp) { LOGGER.log(Level.WARNING, STR, excp); } fireAvatarInUseListener(avatar, isLocal); }
/** * Sets the avatar currently in use. This always sets the avatar, even if * it is the same one in use. The 'isLocal' flag indicates whether the * avatar should only be updated locally or for all clients. * * @param avatar The avatar configuration to use * @param isLocal True if the avat...
Sets the avatar currently in use. This always sets the avatar, even if it is the same one in use. The 'isLocal' flag indicates whether the avatar should only be updated locally or for all clients
setAvatarInUse
{ "repo_name": "AsherBond/MondocosmOS", "path": "wonderland/modules/world/avatarbase/src/classes/org/jdesktop/wonderland/modules/avatarbase/client/registry/AvatarRegistry.java", "license": "agpl-3.0", "size": 13273 }
[ "java.util.logging.Level", "org.jdesktop.wonderland.modules.avatarbase.client.registry.spi.AvatarSPI" ]
import java.util.logging.Level; import org.jdesktop.wonderland.modules.avatarbase.client.registry.spi.AvatarSPI;
import java.util.logging.*; import org.jdesktop.wonderland.modules.avatarbase.client.registry.spi.*;
[ "java.util", "org.jdesktop.wonderland" ]
java.util; org.jdesktop.wonderland;
78,179
DeleteSnapshotRequestBuilder prepareDeleteSnapshot(String repository, String... snapshot);
DeleteSnapshotRequestBuilder prepareDeleteSnapshot(String repository, String... snapshot);
/** * Delete snapshot. */
Delete snapshot
prepareDeleteSnapshot
{ "repo_name": "ern/elasticsearch", "path": "server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java", "license": "apache-2.0", "size": 28517 }
[ "org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequestBuilder" ]
import org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequestBuilder;
import org.elasticsearch.action.admin.cluster.snapshots.delete.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
737,641
private SeleniumWComponentWebElement findElementInt(final By by, final boolean wait) { if (wait) { waitForPageReady(); } return wrapElement(driver.findElement(by)); }
SeleniumWComponentWebElement function(final By by, final boolean wait) { if (wait) { waitForPageReady(); } return wrapElement(driver.findElement(by)); }
/** * Internal implementation to send the findElement command to the driver. * * @param by the By to search. * @param wait true if wait for page ready before doing find * @return the found WebElement. */
Internal implementation to send the findElement command to the driver
findElementInt
{ "repo_name": "marksreeves/wcomponents", "path": "wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/selenium/driver/SeleniumWComponentsWebDriver.java", "license": "gpl-3.0", "size": 20486 }
[ "com.github.bordertech.wcomponents.test.selenium.element.SeleniumWComponentWebElement", "org.openqa.selenium.By" ]
import com.github.bordertech.wcomponents.test.selenium.element.SeleniumWComponentWebElement; import org.openqa.selenium.By;
import com.github.bordertech.wcomponents.test.selenium.element.*; import org.openqa.selenium.*;
[ "com.github.bordertech", "org.openqa.selenium" ]
com.github.bordertech; org.openqa.selenium;
286,093
public List<String> days() { return this.days; }
List<String> function() { return this.days; }
/** * Get the days value. * * @return the days value */
Get the days value
days
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-insights/src/main/java/com/microsoft/azure/management/gallery/RecurrentSchedule.java", "license": "mit", "size": 5854 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,022,624
@Override protected AmazonCloudWatch build(AwsSyncClientParams params) { return new AmazonCloudWatchClient(params); }
AmazonCloudWatch function(AwsSyncClientParams params) { return new AmazonCloudWatchClient(params); }
/** * Construct a synchronous implementation of AmazonCloudWatch using the current builder configuration. * * @param params * Current builder configuration represented as a parameter object. * @return Fully configured implementation of AmazonCloudWatch. */
Construct a synchronous implementation of AmazonCloudWatch using the current builder configuration
build
{ "repo_name": "dagnir/aws-sdk-java", "path": "aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/AmazonCloudWatchClientBuilder.java", "license": "apache-2.0", "size": 2381 }
[ "com.amazonaws.client.AwsSyncClientParams" ]
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.*;
[ "com.amazonaws.client" ]
com.amazonaws.client;
935,896
return new HostnameVerifier() {
return new HostnameVerifier() {
/** * We will accept all hostnames * @return */
We will accept all hostnames
newAllValidHostnameVerifier
{ "repo_name": "dremio/dremio-oss", "path": "sabot/kernel/src/main/java/com/dremio/ssl/SSLHelper.java", "license": "apache-2.0", "size": 2255 }
[ "javax.net.ssl.HostnameVerifier" ]
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
545,347
List<String> process(String name, WidgetConfig widgetConfig);
List<String> process(String name, WidgetConfig widgetConfig);
/** * Process a widget. * @param name The name of the list. * @param widgetConfig The widget. * @return A list of strings to output. */
Process a widget
process
{ "repo_name": "tomck/intermine", "path": "intermine/web/main/src/org/intermine/webservice/server/widget/WidgetProcessor.java", "license": "lgpl-2.1", "size": 735 }
[ "java.util.List", "org.intermine.web.logic.widget.config.WidgetConfig" ]
import java.util.List; import org.intermine.web.logic.widget.config.WidgetConfig;
import java.util.*; import org.intermine.web.logic.widget.config.*;
[ "java.util", "org.intermine.web" ]
java.util; org.intermine.web;
2,479,691
public static boolean isAdministrator() { Boolean b = (Boolean) registry.lookup(LookupNames.USER_ADMINISTRATOR); if (b == null) return false; return b.booleanValue(); }
static boolean function() { Boolean b = (Boolean) registry.lookup(LookupNames.USER_ADMINISTRATOR); if (b == null) return false; return b.booleanValue(); }
/** * Returns <code>true</code> if the currently logged in user * is an administrator, <code>false</code> otherwise. * * @return See above. */
Returns <code>true</code> if the currently logged in user is an administrator, <code>false</code> otherwise
isAdministrator
{ "repo_name": "MontpellierRessourcesImagerie/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/MetadataViewerAgent.java", "license": "gpl-2.0", "size": 15082 }
[ "org.openmicroscopy.shoola.env.LookupNames" ]
import org.openmicroscopy.shoola.env.LookupNames;
import org.openmicroscopy.shoola.env.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
1,569,418
public List<Property<Properties<T>>> getAllProperty();
List<Property<Properties<T>>> function();
/** * Returns all <code>property</code> elements * * @return list of <code>property</code> */
Returns all <code>property</code> elements
getAllProperty
{ "repo_name": "forge/javaee-descriptors", "path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/persistence10/Properties.java", "license": "epl-1.0", "size": 1871 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,752,357