method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private List<T> merge(List<T> a, List<T> b) { List<T> ret = new ArrayList<T>(); int asize = a.size(), bsize = b.size(); // performance int ia = 0, ib = 0; while (ia < asize || ib < bsize) { if (ia < asize && ib < bsize) { if (a.get(ia).compareTo(b.get(ib)) <= 0) { ret.add(a.get(ia)); ...
List<T> function(List<T> a, List<T> b) { List<T> ret = new ArrayList<T>(); int asize = a.size(), bsize = b.size(); int ia = 0, ib = 0; while (ia < asize ib < bsize) { if (ia < asize && ib < bsize) { if (a.get(ia).compareTo(b.get(ib)) <= 0) { ret.add(a.get(ia)); ia++; } else { ret.add(b.get(ib)); ib++; } } else if (ia <...
/** * Merge to lists into a new list * * @param a * left part * @param b * right part * @return merged list */
Merge to lists into a new list
merge
{ "repo_name": "peterfuchs1/3JG", "path": "3JG/src/rekursion/MergeSort.java", "license": "gpl-2.0", "size": 1836 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,419,706
public Tuple<Collection<ExecutionLineageNode>, Collection<ChannelInstance>> collectAndMark() { return this.collectAndMark(new LinkedList<>(), new LinkedList<>()); } /** * Collect and mark all unmarked {@link LazyExecutionLineageNode}s in this instance. * * @param executionLineageColl...
Tuple<Collection<ExecutionLineageNode>, Collection<ChannelInstance>> function() { return this.collectAndMark(new LinkedList<>(), new LinkedList<>()); } /** * Collect and mark all unmarked {@link LazyExecutionLineageNode}s in this instance. * * @param executionLineageCollector collects the unmarked {@link ExecutionLinea...
/** * Collect and mark all unmarked {@link ExecutionLineageNode}s in this instance. * * @return the collected {@link ExecutionLineageNode}s and produced {@link ChannelInstance}s */
Collect and mark all unmarked <code>ExecutionLineageNode</code>s in this instance
collectAndMark
{ "repo_name": "jonasrk/rheem", "path": "rheem-core/src/main/java/org/qcri/rheem/core/platform/lineage/LazyExecutionLineageNode.java", "license": "apache-2.0", "size": 7621 }
[ "java.util.Collection", "java.util.LinkedList", "org.qcri.rheem.core.platform.ChannelInstance", "org.qcri.rheem.core.util.Tuple" ]
import java.util.Collection; import java.util.LinkedList; import org.qcri.rheem.core.platform.ChannelInstance; import org.qcri.rheem.core.util.Tuple;
import java.util.*; import org.qcri.rheem.core.platform.*; import org.qcri.rheem.core.util.*;
[ "java.util", "org.qcri.rheem" ]
java.util; org.qcri.rheem;
33,701
public BigDecimal getLevel_Max(); public static final String COLUMNNAME_Level_Min = "Level_Min";
BigDecimal function(); public static final String COLUMNNAME_Level_Min = STR;
/** Get Maximum Level. * Maximum Inventory level for this product */
Get Maximum Level. Maximum Inventory level for this product
getLevel_Max
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_M_Replenish.java", "license": "gpl-2.0", "size": 6175 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,375,176
public void changeScope(@Nullable final ThreadDelegatedContext context) { final ThreadDelegatedContext oldContext = threadLocal.get(); if (oldContext != null) { if (oldContext == context) { // If the context gets exchanged with itself, do nothing. retu...
void function(@Nullable final ThreadDelegatedContext context) { final ThreadDelegatedContext oldContext = threadLocal.get(); if (oldContext != null) { if (oldContext == context) { return; } else { oldContext.event(ScopeEvent.LEAVE); } } if (context != null) { threadLocal.set(context); context.event(ScopeEvent.ENTER); }...
/** * A thread enters the scope. Clear the current context. If a new context * was given, assign it to the scope, otherwise leave it empty. */
A thread enters the scope. Clear the current context. If a new context was given, assign it to the scope, otherwise leave it empty
changeScope
{ "repo_name": "opentable/otj-scopes", "path": "src/main/java/com/opentable/scopes/threaddelegate/ThreadDelegatedScope.java", "license": "apache-2.0", "size": 5062 }
[ "com.opentable.scopes.threaddelegate.ThreadDelegatedContext", "javax.annotation.Nullable" ]
import com.opentable.scopes.threaddelegate.ThreadDelegatedContext; import javax.annotation.Nullable;
import com.opentable.scopes.threaddelegate.*; import javax.annotation.*;
[ "com.opentable.scopes", "javax.annotation" ]
com.opentable.scopes; javax.annotation;
2,219,742
if (entry.isDirty() && entry.getDirtyState() != DirtyState.REBUILDING && entry.getDirtyState() != DirtyState.FORCED_REBUILDING) { entry.markRebuilding(); } } enum DirtyOutcome { ALREADY_PROCESSED, NEEDS_EVALUATION } private final class Evaluate implements ParallelEvaluator...
if (entry.isDirty() && entry.getDirtyState() != DirtyState.REBUILDING && entry.getDirtyState() != DirtyState.FORCED_REBUILDING) { entry.markRebuilding(); } } enum DirtyOutcome { ALREADY_PROCESSED, NEEDS_EVALUATION } private final class Evaluate implements ParallelEvaluatorContext.ComparableRunnable { private final SkyK...
/** * If the entry is dirty and not already rebuilding, puts it in a state so that it can rebuild. */
If the entry is dirty and not already rebuilding, puts it in a state so that it can rebuild
maybeMarkRebuilding
{ "repo_name": "meteorcloudy/bazel", "path": "src/main/java/com/google/devtools/build/skyframe/AbstractParallelEvaluator.java", "license": "apache-2.0", "size": 57081 }
[ "com.google.devtools.build.skyframe.NodeEntry" ]
import com.google.devtools.build.skyframe.NodeEntry;
import com.google.devtools.build.skyframe.*;
[ "com.google.devtools" ]
com.google.devtools;
2,668,698
public void initialize(List<Node> nodes, SearchService searchService, ContentService contentService, StoreRef storeRef, Ticket ticket, List<SortDefinition> sortDefinitions, List<QName> properties, File tmpLocation, NodeService nodeService);
void function(List<Node> nodes, SearchService searchService, ContentService contentService, StoreRef storeRef, Ticket ticket, List<SortDefinition> sortDefinitions, List<QName> properties, File tmpLocation, NodeService nodeService);
/** * Initialises the dependency resolver with the nodes to resolve dependencies for * * @param nodes */
Initialises the dependency resolver with the nodes to resolve dependencies for
initialize
{ "repo_name": "rivetlogic/acir", "path": "acir/src/main/java/org/rivetlogic/export/dependencyresolvers/DependencyResolver.java", "license": "gpl-3.0", "size": 1521 }
[ "com.rivetlogic.core.cma.api.ContentService", "com.rivetlogic.core.cma.api.NodeService", "com.rivetlogic.core.cma.api.SearchService", "com.rivetlogic.core.cma.repo.Node", "com.rivetlogic.core.cma.repo.SortDefinition", "com.rivetlogic.core.cma.repo.Ticket", "java.io.File", "java.util.List", "org.alfr...
import com.rivetlogic.core.cma.api.ContentService; import com.rivetlogic.core.cma.api.NodeService; import com.rivetlogic.core.cma.api.SearchService; import com.rivetlogic.core.cma.repo.Node; import com.rivetlogic.core.cma.repo.SortDefinition; import com.rivetlogic.core.cma.repo.Ticket; import java.io.File; import java....
import com.rivetlogic.core.cma.api.*; import com.rivetlogic.core.cma.repo.*; import java.io.*; import java.util.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*;
[ "com.rivetlogic.core", "java.io", "java.util", "org.alfresco.service" ]
com.rivetlogic.core; java.io; java.util; org.alfresco.service;
1,105,412
private void updateBusinessObjectDefinitionEntity(BusinessObjectDefinitionEntity businessObjectDefinitionEntity, BusinessObjectDefinitionUpdateRequest request) { // Update the entity with the new description value. businessObjectDefinitionEntity.setDescription(request.getDescription()); ...
void function(BusinessObjectDefinitionEntity businessObjectDefinitionEntity, BusinessObjectDefinitionUpdateRequest request) { businessObjectDefinitionEntity.setDescription(request.getDescription()); businessObjectDefinitionEntity.setDisplayName(request.getDisplayName()); Map<String, BusinessObjectDefinitionAttributeEnt...
/** * Update and persist the business object definition per specified update request. * * @param businessObjectDefinitionEntity the business object definition entity * @param request the business object definition update request */
Update and persist the business object definition per specified update request
updateBusinessObjectDefinitionEntity
{ "repo_name": "kusid/herd", "path": "herd-code/herd-service/src/main/java/org/finra/herd/service/impl/BusinessObjectDefinitionServiceImpl.java", "license": "apache-2.0", "size": 69155 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.commons.collections4.CollectionUtils", "org.apache.commons.lang3.StringUtils", "org.finra.herd.model.api.xml.Attribute", "org.finra.herd.model.api.xml.BusinessObjectDefinitionUpdateRequest", "org.finra.herd.mo...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.finra.herd.model.api.xml.Attribute; import org.finra.herd.model.api.xml.BusinessObjectDefinitionUpdateRequest...
import java.util.*; import org.apache.commons.collections4.*; import org.apache.commons.lang3.*; import org.finra.herd.model.api.xml.*; import org.finra.herd.model.jpa.*;
[ "java.util", "org.apache.commons", "org.finra.herd" ]
java.util; org.apache.commons; org.finra.herd;
871,321
private Document validateCustomFields() { Document doc = null; try { String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Document><Custom>" + customParameters.getText() + "</Custom></Document>"; doc = new SAXBuilder().build(new StringReader(xml)); } catch (JDOMException e) { Main.minorError("Inv...
Document function() { Document doc = null; try { String xml = STR1.0\STRUTF-8\STR + customParameters.getText() + STR; doc = new SAXBuilder().build(new StringReader(xml)); } catch (JDOMException e) { Main.minorError(STR + e.getMessage()); return null; } catch (IOException e) { Main.minorError(STR + e.getMessage()); retu...
/** * Validates the custom configuration and displays, if necessary, error messages. * @return The XML document describing the custom configuration, null if the configuration did not parse properly. */
Validates the custom configuration and displays, if necessary, error messages
validateCustomFields
{ "repo_name": "brunovam/wireless_power_control", "path": "topologyControl/src/sinalgo/gui/ProjectSelector.java", "license": "gpl-2.0", "size": 41030 }
[ "java.io.IOException", "java.io.StringReader", "org.jdom.Document", "org.jdom.JDOMException", "org.jdom.input.SAXBuilder" ]
import java.io.IOException; import java.io.StringReader; import org.jdom.Document; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder;
import java.io.*; import org.jdom.*; import org.jdom.input.*;
[ "java.io", "org.jdom", "org.jdom.input" ]
java.io; org.jdom; org.jdom.input;
603,118
private void addInternalActionToSet(final InternalActionImpl internalAction) { try { final CodeSection codeSection = this.codeSectionGenerator.getCodeSectionForID(internalAction.getId()); final ResourceDemandingInternalAction rdiaCpu = new ResourceDemandingInternalAction(ResourceDemandType.RESOURCE_TYPE...
void function(final InternalActionImpl internalAction) { try { final CodeSection codeSection = this.codeSectionGenerator.getCodeSectionForID(internalAction.getId()); final ResourceDemandingInternalAction rdiaCpu = new ResourceDemandingInternalAction(ResourceDemandType.RESOURCE_TYPE_CPU, codeSection); if (this.shouldBeI...
/** * Adding a new {@link ResourceDemandingInternalAction} based on a * {@link InternalActionImpl} to the {@link rdiaSet}. Fails silently if file from * EntityName not found! * * @param internalAction SEFF-Action to add. * */
Adding a new <code>ResourceDemandingInternalAction</code> based on a <code>InternalActionImpl</code> to the <code>rdiaSet</code>. Fails silently if file from EntityName not found
addInternalActionToSet
{ "repo_name": "Beagle-PSE/Beagle", "path": "Core/src/main/java/de/uka/ipd/sdq/beagle/core/pcmconnection/PcmRepositorySeffExtractor.java", "license": "epl-1.0", "size": 19956 }
[ "de.uka.ipd.sdq.beagle.core.CodeSection", "de.uka.ipd.sdq.beagle.core.ResourceDemandType", "de.uka.ipd.sdq.beagle.core.ResourceDemandingInternalAction", "java.io.FileNotFoundException", "org.palladiosimulator.pcm.seff.impl.InternalActionImpl" ]
import de.uka.ipd.sdq.beagle.core.CodeSection; import de.uka.ipd.sdq.beagle.core.ResourceDemandType; import de.uka.ipd.sdq.beagle.core.ResourceDemandingInternalAction; import java.io.FileNotFoundException; import org.palladiosimulator.pcm.seff.impl.InternalActionImpl;
import de.uka.ipd.sdq.beagle.core.*; import java.io.*; import org.palladiosimulator.pcm.seff.impl.*;
[ "de.uka.ipd", "java.io", "org.palladiosimulator.pcm" ]
de.uka.ipd; java.io; org.palladiosimulator.pcm;
1,511,220
private static void writeAffinityFunction(BinaryRawWriter out, AffinityFunction f) { if (f instanceof PlatformDotNetAffinityFunction) f = ((PlatformDotNetAffinityFunction)f).getFunc(); if (f instanceof RendezvousAffinityFunction) { out.writeByte((byte)2); Rendez...
static void function(BinaryRawWriter out, AffinityFunction f) { if (f instanceof PlatformDotNetAffinityFunction) f = ((PlatformDotNetAffinityFunction)f).getFunc(); if (f instanceof RendezvousAffinityFunction) { out.writeByte((byte)2); RendezvousAffinityFunction f0 = (RendezvousAffinityFunction)f; out.writeInt(f0.getPar...
/** * Writes the affinity functions. * * @param out Stream. * @param f Affinity. */
Writes the affinity functions
writeAffinityFunction
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java", "license": "apache-2.0", "size": 87032 }
[ "org.apache.ignite.binary.BinaryRawWriter", "org.apache.ignite.cache.affinity.AffinityFunction", "org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction", "org.apache.ignite.internal.processors.platform.cache.affinity.PlatformAffinityFunction", "org.apache.ignite.platform.dotnet.PlatformDotN...
import org.apache.ignite.binary.BinaryRawWriter; import org.apache.ignite.cache.affinity.AffinityFunction; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.internal.processors.platform.cache.affinity.PlatformAffinityFunction; import org.apache.ignite.platform.dotne...
import org.apache.ignite.binary.*; import org.apache.ignite.cache.affinity.*; import org.apache.ignite.cache.affinity.rendezvous.*; import org.apache.ignite.internal.processors.platform.cache.affinity.*; import org.apache.ignite.platform.dotnet.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,923,257
protected String findIdProperty(Class<?> type) { String idProp = null; DataMapper dm = getDataMapper(type); if (dm != null) { idProp = dm.getIdPropertyName(); } if (classes.contains(type)) { if (idProp == null) { // look for the annotat...
String function(Class<?> type) { String idProp = null; DataMapper dm = getDataMapper(type); if (dm != null) { idProp = dm.getIdPropertyName(); } if (classes.contains(type)) { if (idProp == null) { idProp = ReflectUtils.getInstance().getFieldNameWithAnnotation(type, PersistentId.class); } if (idProp == null) { idProp = ...
/** * This will determine the id property correctly (but fairly inefficiently) so this should be cached, * use {@link #getIdProperty(Class)} to get the id property for a class * @param type a persistent type * @return */
This will determine the id property correctly (but fairly inefficiently) so this should be cached, use <code>#getIdProperty(Class)</code> to get the id property for a class
findIdProperty
{ "repo_name": "prince1a/genericdao", "path": "src/main/java/org/sakaiproject/genericdao/springjdbc/JdbcGenericDao.java", "license": "apache-2.0", "size": 75730 }
[ "org.azeckoski.reflectutils.ReflectUtils", "org.sakaiproject.genericdao.api.annotations.PersistentId", "org.sakaiproject.genericdao.api.mappers.DataMapper" ]
import org.azeckoski.reflectutils.ReflectUtils; import org.sakaiproject.genericdao.api.annotations.PersistentId; import org.sakaiproject.genericdao.api.mappers.DataMapper;
import org.azeckoski.reflectutils.*; import org.sakaiproject.genericdao.api.annotations.*; import org.sakaiproject.genericdao.api.mappers.*;
[ "org.azeckoski.reflectutils", "org.sakaiproject.genericdao" ]
org.azeckoski.reflectutils; org.sakaiproject.genericdao;
1,034,215
private OGCGeometry extractGeometry(final JSONObject jsonObject) { // Extract geometry (if exists) final JSONObject geometryObject = jsonObject.optJSONObject("geometry"); if(geometryObject != null) { return geoJoinToGeomety(geometryObject.toString()); } return geoJoinToGeomety(jsonObject.toStri...
OGCGeometry function(final JSONObject jsonObject) { final JSONObject geometryObject = jsonObject.optJSONObject(STR); if(geometryObject != null) { return geoJoinToGeomety(geometryObject.toString()); } return geoJoinToGeomety(jsonObject.toString()); }
/** * Extract the geometry from the tuple * @param tuple * @return */
Extract the geometry from the tuple
extractGeometry
{ "repo_name": "jnidzwetzki/scalephant", "path": "bboxdb-server/src/main/java/org/bboxdb/network/query/filter/UserDefinedGeoJsonSpatialFilter.java", "license": "apache-2.0", "size": 5873 }
[ "com.esri.core.geometry.ogc.OGCGeometry", "org.json.JSONObject" ]
import com.esri.core.geometry.ogc.OGCGeometry; import org.json.JSONObject;
import com.esri.core.geometry.ogc.*; import org.json.*;
[ "com.esri.core", "org.json" ]
com.esri.core; org.json;
2,061,943
public static boolean isTrait(final Class clazz) { return clazz!=null && clazz.getAnnotation(Trait.class)!=null; }
static boolean function(final Class clazz) { return clazz!=null && clazz.getAnnotation(Trait.class)!=null; }
/** * Returns true if the specified class is a trait. * @param clazz a class to test * @return true if the classnode represents a trait */
Returns true if the specified class is a trait
isTrait
{ "repo_name": "komalsukhani/debian-groovy2", "path": "src/main/org/codehaus/groovy/transform/trait/Traits.java", "license": "apache-2.0", "size": 15721 }
[ "groovy.transform.Trait" ]
import groovy.transform.Trait;
import groovy.transform.*;
[ "groovy.transform" ]
groovy.transform;
1,361,934
public void testSubtractDiffScalePosNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; String b = "747233429293018787918347987234564568"; int bScale = -10; String c = "-7472334291698975400195996883915836900189542365.218615243205013"; ...
void function() { String a = STR; int aScale = 15; String b = STR; int bScale = -10; String c = STR; int cScale = 15; BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale); BigDecimal bNumber = new BigDecimal(new BigInteger(b), bScale); BigDecimal result = aNumber.subtract(bNumber); assertEquals(STR, c, result...
/** * Subtract two numbers of different scales; the first is positive */
Subtract two numbers of different scales; the first is positive
testSubtractDiffScalePosNeg
{ "repo_name": "freeVM/freeVM", "path": "enhanced/archive/classlib/java6/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java", "license": "apache-2.0", "size": 70999 }
[ "java.math.BigDecimal", "java.math.BigInteger" ]
import java.math.BigDecimal; import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,257,408
public void addPartition(int partitionId) { MetaPartition meta = new MetaPartition(partitionId); MetaPartition temp = partitions.putIfAbsent(partitionId, meta); // Check if the given partition is new if (temp == null) { int index = indexCounter.getAndIncrement(); checkState(partitionIndex....
void function(int partitionId) { MetaPartition meta = new MetaPartition(partitionId); MetaPartition temp = partitions.putIfAbsent(partitionId, meta); if (temp == null) { int index = indexCounter.getAndIncrement(); checkState(partitionIndex.putIfAbsent(partitionId, index) == null); int ownerThread = getOwnerThreadId(par...
/** * Add a partition * * @param partitionId id of a partition to add */
Add a partition
addPartition
{ "repo_name": "KidEinstein/giraph", "path": "giraph-core/src/main/java/org/apache/giraph/ooc/data/MetaPartitionManager.java", "license": "apache-2.0", "size": 42017 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,246,122
public br.gov.camara.edemocracia.portlets.priorizacao.model.Voto fetchByP_U( long propostaId, long userId, boolean retrieveFromCache) throws com.liferay.portal.kernel.exception.SystemException;
br.gov.camara.edemocracia.portlets.priorizacao.model.Voto function( long propostaId, long userId, boolean retrieveFromCache) throws com.liferay.portal.kernel.exception.SystemException;
/** * Returns the voto where propostaId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache. * * @param propostaId the proposta ID * @param userId the user ID * @param retrieveFromCache whether to use the finder cache * @return the ...
Returns the voto where propostaId = &#63; and userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache
fetchByP_U
{ "repo_name": "camaradosdeputadosoficial/edemocracia", "path": "cd-priorizacao-portlet/src/main/java/br/gov/camara/edemocracia/portlets/priorizacao/service/persistence/VotoPersistence.java", "license": "lgpl-2.1", "size": 23760 }
[ "br.gov.camara.edemocracia.portlets.priorizacao.model.Voto" ]
import br.gov.camara.edemocracia.portlets.priorizacao.model.Voto;
import br.gov.camara.edemocracia.portlets.priorizacao.model.*;
[ "br.gov.camara" ]
br.gov.camara;
2,733,833
@Transactional public List<User> getAllUsersWithRole(String role);
List<User> function(String role);
/** * search user by role * @param role * @return */
search user by role
getAllUsersWithRole
{ "repo_name": "raiedsiddiqui/tapcm", "path": "src/main/java/org/tapestry/service/UserManager.java", "license": "agpl-3.0", "size": 3817 }
[ "java.util.List", "org.tapestry.objects.User" ]
import java.util.List; import org.tapestry.objects.User;
import java.util.*; import org.tapestry.objects.*;
[ "java.util", "org.tapestry.objects" ]
java.util; org.tapestry.objects;
717,820
static boolean isStructuredFieldMutable(Class<?> clazz, Field field) { final int m = field.getModifiers(); // field is immutable if (Modifier.isFinal(m)) { return false; } // field is directly mutable if (Modifier.isPublic(m)) { return true; } // field has setters by which it is mutable if ...
static boolean isStructuredFieldMutable(Class<?> clazz, Field field) { final int m = field.getModifiers(); if (Modifier.isFinal(m)) { return false; } if (Modifier.isPublic(m)) { return true; } if (getStructuredFieldSetter(clazz, field).isPresent()) { return true; } throw extractionError( STR + STR, field.getName(), cla...
/** * Checks if a field is mutable or immutable. Returns {@code true} if the field is properly * mutable. Returns {@code false} if it is properly immutable. */
Checks if a field is mutable or immutable. Returns true if the field is properly mutable. Returns false if it is properly immutable
isStructuredFieldMutable
{ "repo_name": "jinglining/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/extraction/ExtractionUtils.java", "license": "apache-2.0", "size": 32145 }
[ "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,492,351
public int getQueuedSubmissionCount() { WorkQueue[] ws; WorkQueue w; VarHandle.acquireFence(); int count = 0; if ((ws = workQueues) != null) { for (int i = 0; i < ws.length; i += 2) { if ((w = ws[i]) != null) count += w.queueSize(); ...
int function() { WorkQueue[] ws; WorkQueue w; VarHandle.acquireFence(); int count = 0; if ((ws = workQueues) != null) { for (int i = 0; i < ws.length; i += 2) { if ((w = ws[i]) != null) count += w.queueSize(); } } return count; }
/** * Returns an estimate of the number of tasks submitted to this * pool that have not yet begun executing. This method may take * time proportional to the number of submissions. * * @return the number of queued submissions */
Returns an estimate of the number of tasks submitted to this pool that have not yet begun executing. This method may take time proportional to the number of submissions
getQueuedSubmissionCount
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java", "license": "gpl-2.0", "size": 140051 }
[ "java.lang.invoke.VarHandle" ]
import java.lang.invoke.VarHandle;
import java.lang.invoke.*;
[ "java.lang" ]
java.lang;
440,715
public T caseIBeXProbabilityDistribution(IBeXProbabilityDistribution object) { return null; }
T function(IBeXProbabilityDistribution object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>IBe XProbability Distribution</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * ...
Returns the result of interpreting the object as an instance of 'IBe XProbability Distribution'. This implementation returns null; returning a non-null result will terminate the switch.
caseIBeXProbabilityDistribution
{ "repo_name": "eMoflon/emoflon-ibex", "path": "org.emoflon.ibex.patternmodel/src-gen/org/emoflon/ibex/patternmodel/IBeXPatternModel/util/IBeXPatternModelSwitch.java", "license": "gpl-3.0", "size": 43736 }
[ "org.emoflon.ibex.patternmodel.IBeXPatternModel" ]
import org.emoflon.ibex.patternmodel.IBeXPatternModel;
import org.emoflon.ibex.patternmodel.*;
[ "org.emoflon.ibex" ]
org.emoflon.ibex;
81,194
public ManualRequestEditorDialog getResendDialog() { if (resendDialog == null) { resendDialog = new ManualHttpRequestEditorDialog(true, "resend", "ui.dialogs.resend"); resendDialog.setTitle(Constant.messages.getString("manReq.resend.popup")); // ZAP: i18n } return resendDialog; }
ManualRequestEditorDialog function() { if (resendDialog == null) { resendDialog = new ManualHttpRequestEditorDialog(true, STR, STR); resendDialog.setTitle(Constant.messages.getString(STR)); } return resendDialog; }
/** * This method initializes resendDialog * * @return org.parosproxy.paros.extension.history.ResendDialog */
This method initializes resendDialog
getResendDialog
{ "repo_name": "GillesMoris/OSS", "path": "src/org/parosproxy/paros/extension/history/ExtensionHistory.java", "license": "apache-2.0", "size": 29599 }
[ "org.parosproxy.paros.Constant", "org.parosproxy.paros.extension.manualrequest.ManualRequestEditorDialog", "org.parosproxy.paros.extension.manualrequest.http.impl.ManualHttpRequestEditorDialog" ]
import org.parosproxy.paros.Constant; import org.parosproxy.paros.extension.manualrequest.ManualRequestEditorDialog; import org.parosproxy.paros.extension.manualrequest.http.impl.ManualHttpRequestEditorDialog;
import org.parosproxy.paros.*; import org.parosproxy.paros.extension.manualrequest.*; import org.parosproxy.paros.extension.manualrequest.http.impl.*;
[ "org.parosproxy.paros" ]
org.parosproxy.paros;
869,056
Collection<ProcessInstanceDesc> getProcessInstances(List<Integer> states, String initiator, QueryContext queryContext);
Collection<ProcessInstanceDesc> getProcessInstances(List<Integer> states, String initiator, QueryContext queryContext);
/** * Returns list of process instance descriptions found with given statuses and initiated by <code>initiator</code>. * @param states A list of possible state (int) values that the {@link ProcessInstance} can have. * @param initiator The initiator of the {@link ProcessInstance}. * @param queryCont...
Returns list of process instance descriptions found with given statuses and initiated by <code>initiator</code>
getProcessInstances
{ "repo_name": "OnePaaS/jbpm", "path": "jbpm-services/jbpm-services-api/src/main/java/org/jbpm/services/api/RuntimeDataService.java", "license": "apache-2.0", "size": 22140 }
[ "java.util.Collection", "java.util.List", "org.jbpm.services.api.model.ProcessInstanceDesc", "org.kie.api.runtime.query.QueryContext" ]
import java.util.Collection; import java.util.List; import org.jbpm.services.api.model.ProcessInstanceDesc; import org.kie.api.runtime.query.QueryContext;
import java.util.*; import org.jbpm.services.api.model.*; import org.kie.api.runtime.query.*;
[ "java.util", "org.jbpm.services", "org.kie.api" ]
java.util; org.jbpm.services; org.kie.api;
2,581,804
public void process(Exchange camelExchange) throws Exception { LOG.trace("Process exchange: {} in sync way.", camelExchange); // create CXF exchange ExchangeImpl cxfExchange = new ExchangeImpl(); // set the Bus on the exchange in case the CXF interceptor need to access it fr...
void function(Exchange camelExchange) throws Exception { LOG.trace(STR, camelExchange); ExchangeImpl cxfExchange = new ExchangeImpl(); cxfExchange.put(Bus.class, endpoint.getBus()); BindingOperationInfo boi = prepareBindingOperation(camelExchange, cxfExchange); Map<String, Object> invocationContext = new HashMap<String...
/** * This processor binds Camel exchange to a CXF exchange and * invokes the CXF client. */
This processor binds Camel exchange to a CXF exchange and invokes the CXF client
process
{ "repo_name": "ramonmaruko/camel", "path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java", "license": "apache-2.0", "size": 17064 }
[ "java.util.HashMap", "java.util.Map", "org.apache.camel.Exchange", "org.apache.cxf.Bus", "org.apache.cxf.endpoint.Client", "org.apache.cxf.message.ExchangeImpl", "org.apache.cxf.service.model.BindingOperationInfo" ]
import java.util.HashMap; import java.util.Map; import org.apache.camel.Exchange; import org.apache.cxf.Bus; import org.apache.cxf.endpoint.Client; import org.apache.cxf.message.ExchangeImpl; import org.apache.cxf.service.model.BindingOperationInfo;
import java.util.*; import org.apache.camel.*; import org.apache.cxf.*; import org.apache.cxf.endpoint.*; import org.apache.cxf.message.*; import org.apache.cxf.service.model.*;
[ "java.util", "org.apache.camel", "org.apache.cxf" ]
java.util; org.apache.camel; org.apache.cxf;
899,534
public BigFraction subtract(final BigFraction fraction) { if (fraction == null) { throw new NullArgumentException(LocalizedFormats.FRACTION); } if (ZERO.equals(fraction)) { return this; } BigInteger num = null; BigInteger den = null; i...
BigFraction function(final BigFraction fraction) { if (fraction == null) { throw new NullArgumentException(LocalizedFormats.FRACTION); } if (ZERO.equals(fraction)) { return this; } BigInteger num = null; BigInteger den = null; if (denominator.equals(fraction.denominator)) { num = numerator.subtract(fraction.numerator);...
/** * <p> * Subtracts the value of another fraction from the value of this one, * returning the result in reduced form. * </p> * * @param fraction {@link BigFraction} to subtract, must not be {@code null}. * @return a {@link BigFraction} instance with the resulting values * @thro...
Subtracts the value of another fraction from the value of this one, returning the result in reduced form.
subtract
{ "repo_name": "charles-cooper/idylfin", "path": "src/org/apache/commons/math3/fraction/BigFraction.java", "license": "apache-2.0", "size": 38428 }
[ "java.math.BigInteger", "org.apache.commons.math3.exception.NullArgumentException", "org.apache.commons.math3.exception.util.LocalizedFormats" ]
import java.math.BigInteger; import org.apache.commons.math3.exception.NullArgumentException; import org.apache.commons.math3.exception.util.LocalizedFormats;
import java.math.*; import org.apache.commons.math3.exception.*; import org.apache.commons.math3.exception.util.*;
[ "java.math", "org.apache.commons" ]
java.math; org.apache.commons;
690,914
public boolean isIdentifiedField() { boolean isIdentifiedField = false; String dataElementTableName; Vector identifiedData = new Vector(); Logger.out.debug(this); dataElementTableName = table.getTableName(); Logger.out.debug(dataElementTableName); identifiedData = (Vector) Client.ide...
boolean function() { boolean isIdentifiedField = false; String dataElementTableName; Vector identifiedData = new Vector(); Logger.out.debug(this); dataElementTableName = table.getTableName(); Logger.out.debug(dataElementTableName); identifiedData = (Vector) Client.identifiedDataMap .get(dataElementTableName); Logger.ou...
/** * Returns true if its an Identified data field else false * @author aarti_sharma * @return */
Returns true if its an Identified data field else false
isIdentifiedField
{ "repo_name": "NCIP/wustl-common-package", "path": "src/edu/wustl/common/query/DataElement.java", "license": "bsd-3-clause", "size": 7115 }
[ "edu.wustl.common.util.logger.Logger", "java.util.Vector" ]
import edu.wustl.common.util.logger.Logger; import java.util.Vector;
import edu.wustl.common.util.logger.*; import java.util.*;
[ "edu.wustl.common", "java.util" ]
edu.wustl.common; java.util;
1,059,398
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<CertificateListDescriptionInner>> listWithResponseAsync( String resourceGroupName, String provisioningServiceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<CertificateListDescriptionInner>> function( String resourceGroupName, String provisioningServiceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == nu...
/** * Get all the certificates tied to the provisioning service. * * @param resourceGroupName Name of resource group. * @param provisioningServiceName Name of provisioning service to retrieve certificates for. * @param context The context to associate with this operation. * @throws Illegal...
Get all the certificates tied to the provisioning service
listWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/main/java/com/azure/resourcemanager/deviceprovisioningservices/implementation/DpsCertificatesClientImpl.java", "license": "mit", "size": 98004 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.deviceprovisioningservices.fluent.models.CertificateListDescriptionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.deviceprovisioningservices.fluent.models.CertificateListDescriptionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.deviceprovisioningservices.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,975,463
public boolean getBoolean(String key) throws ClassCastException, NoSuchElementException { Object o = get(key); if (o == Boolean.FALSE || o.equals("false")) { return false; } else if (o == Boolean.TRUE || o.equals("true")) { return true; } t...
boolean function(String key) throws ClassCastException, NoSuchElementException { Object o = get(key); if (o == Boolean.FALSE o.equals("false")) { return false; } else if (o == Boolean.TRUE o.equals("true")) { return true; } throw new ClassCastException(STR + quote(key) + STR); }
/** * Get the boolean value associated with a key. * @param key A key string. * @return The truth. * * @exception NoSuchElementException if the key is not found. * @exception ClassCastException * if the value is not a Boolean or the String "true" or "false". */
Get the boolean value associated with a key
getBoolean
{ "repo_name": "bjorn/tiled-java", "path": "plugins/json/src/org/json/JSONObject.java", "license": "gpl-2.0", "size": 27644 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
2,239,377
private static List<String> splitWithWhiteSpace(String input) { List<String> tokensList = new ArrayList<>(); StringBuilder token = new StringBuilder(); char insideQuoteOf = Character.MIN_VALUE; for (char c : input.toCharArray()) { if (Character.isWhitespace(c)) { // if we are in the quo...
static List<String> function(String input) { List<String> tokensList = new ArrayList<>(); StringBuilder token = new StringBuilder(); char insideQuoteOf = Character.MIN_VALUE; for (char c : input.toCharArray()) { if (Character.isWhitespace(c)) { if (insideQuoteOf != Character.MIN_VALUE) { token.append(c); } else { if (t...
/** * it's assumed that the quoted string should not have escaped quotes inside it. */
it's assumed that the quoted string should not have escaped quotes inside it
splitWithWhiteSpace
{ "repo_name": "davebarnes97/geode", "path": "geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/GfshParser.java", "license": "apache-2.0", "size": 14654 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,318,201
@Override protected Queue<E> decorated() { return (Queue<E>) super.decorated(); } //-----------------------------------------------------------------------
Queue<E> function() { return (Queue<E>) super.decorated(); }
/** * Gets the queue being decorated. * * @return the decorated queue */
Gets the queue being decorated
decorated
{ "repo_name": "krivachy/compgs03_mutation_testing", "path": "src/main/java/org/apache/commons/collections4/queue/PredicatedQueue.java", "license": "apache-2.0", "size": 4244 }
[ "java.util.Queue" ]
import java.util.Queue;
import java.util.*;
[ "java.util" ]
java.util;
141,557
@Override public void startSeriesPass(XYDataset dataset, int series, int firstItem, int lastItem, int pass, int passCount) { this.seriesPath.reset(); this.lastPointGood = false; super.startSeriesPass(dataset, series, firstItem, lastItem, pass, ...
void function(XYDataset dataset, int series, int firstItem, int lastItem, int pass, int passCount) { this.seriesPath.reset(); this.lastPointGood = false; super.startSeriesPass(dataset, series, firstItem, lastItem, pass, passCount); } }
/** * This method is called by the {@link XYPlot} at the start of each * series pass. We reset the state for the current series. * * @param dataset the dataset. * @param series the series index. * @param firstItem the first item index for this pass. ...
This method is called by the <code>XYPlot</code> at the start of each series pass. We reset the state for the current series
startSeriesPass
{ "repo_name": "simon04/jfreechart", "path": "src/main/java/org/jfree/chart/renderer/xy/XYLineAndShapeRenderer.java", "license": "lgpl-2.1", "size": 47113 }
[ "org.jfree.data.xy.XYDataset" ]
import org.jfree.data.xy.XYDataset;
import org.jfree.data.xy.*;
[ "org.jfree.data" ]
org.jfree.data;
2,501,835
public static List<ConvenioDeuda> getListWithSaldo(Convenio convenio) throws Exception { return (ArrayList<ConvenioDeuda>) GdeDAOFactory.getConvenioDeudaDAO().getListWithSaldo(convenio); }
static List<ConvenioDeuda> function(Convenio convenio) throws Exception { return (ArrayList<ConvenioDeuda>) GdeDAOFactory.getConvenioDeudaDAO().getListWithSaldo(convenio); }
/** * Obtiene la lista de ConvenioDeudas para el Convenio indicado y que tengan saldo > 0. * (Se ordena de forma descendente por fecha de vencimieto para usarla en una lista LIFO) * * @param convenio * @return listConvenioDeuda * @throws Exception */
Obtiene la lista de ConvenioDeudas para el Convenio indicado y que tengan saldo > 0. (Se ordena de forma descendente por fecha de vencimieto para usarla en una lista LIFO)
getListWithSaldo
{ "repo_name": "avdata99/SIAT", "path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/gde/buss/bean/ConvenioDeuda.java", "license": "gpl-3.0", "size": 7791 }
[ "ar.gov.rosario.siat.gde.buss.dao.GdeDAOFactory", "java.util.ArrayList", "java.util.List" ]
import ar.gov.rosario.siat.gde.buss.dao.GdeDAOFactory; import java.util.ArrayList; import java.util.List;
import ar.gov.rosario.siat.gde.buss.dao.*; import java.util.*;
[ "ar.gov.rosario", "java.util" ]
ar.gov.rosario; java.util;
561,631
ZooKeeperNode zookeeper = app.createAndManageChild(EntitySpec.create(ZooKeeperNode.class)); Storm nimbus = app.createAndManageChild(EntitySpec.create(Storm.class).configure("storm.role", Storm.Role.NIMBUS)); Storm supervisor = app.createAndManageChild(EntitySpec.create(Storm.class).confi...
ZooKeeperNode zookeeper = app.createAndManageChild(EntitySpec.create(ZooKeeperNode.class)); Storm nimbus = app.createAndManageChild(EntitySpec.create(Storm.class).configure(STR, Storm.Role.NIMBUS)); Storm supervisor = app.createAndManageChild(EntitySpec.create(Storm.class).configure(STR, Storm.Role.SUPERVISOR)); Storm ...
/** * Test that can install, start and use a Storm cluster: 1 nimbus, 1 zookeeper, 1 supervisor (worker node). */
Test that can install, start and use a Storm cluster: 1 nimbus, 1 zookeeper, 1 supervisor (worker node)
doTest
{ "repo_name": "neykov/incubator-brooklyn", "path": "software/messaging/src/test/java/brooklyn/entity/messaging/storm/StormEc2LiveTest.java", "license": "apache-2.0", "size": 2615 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
2,243,086
IInheritedBehaviors withCustomBehaviors(Collection<BatchClientBehavior> behaviors);
IInheritedBehaviors withCustomBehaviors(Collection<BatchClientBehavior> behaviors);
/** * Sets the collection of BatchClientBehavior * * @param behaviors The collection of BatchClientBehavior classes * @return The original instance */
Sets the collection of BatchClientBehavior
withCustomBehaviors
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-batch/src/main/java/com/microsoft/azure/batch/IInheritedBehaviors.java", "license": "mit", "size": 1305 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,954,866
//~ Methods ---------------------------------------------------------------- // //-----------------// // computeFontSize // //-----------------// public static Float computeFontSize (String content, FontInfo fontInfo, ...
static Float function (String content, FontInfo fontInfo, Dimension dim) { if (content == null) { return null; } Font font = new TextFont(fontInfo); float fontSize = font.getSize2D(); GlyphVector glyphVector = font.createGlyphVector(frc, content); Rectangle2D basicRect = glyphVector.getVisualBounds(); if (dim.width >= ...
/** * Convenient method to compute a font size using a string content * and dimension. * * @param content the string value * @param fontInfo OCR-based font information * @param dim string dimension in pixels * @return the computed font size */
Convenient method to compute a font size using a string content and dimension
computeFontSize
{ "repo_name": "jlpoolen/libreveris", "path": "src/main/omr/ui/symbol/TextFont.java", "license": "lgpl-3.0", "size": 5468 }
[ "java.awt.Dimension", "java.awt.Font", "java.awt.font.GlyphVector", "java.awt.geom.Rectangle2D" ]
import java.awt.Dimension; import java.awt.Font; import java.awt.font.GlyphVector; import java.awt.geom.Rectangle2D;
import java.awt.*; import java.awt.font.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
969,748
public Enumeration getUserIds() throws ZenoException;
Enumeration function() throws ZenoException;
/** Returns the ids of the users who are members of the group or, recursively, subgroups. This is synonym for getMemberIds(true, true). */
Returns the ids of the users who are members of the group or, recursively
getUserIds
{ "repo_name": "tfgordon/zeno", "path": "src/zeno2/kernel/Group.java", "license": "gpl-2.0", "size": 2144 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
152,356
public UUID subjectIdPerCall(@Nullable UUID subjId) { if (subjId != null) return subjId; return subjectIdPerCall(subjId, operationContextPerCall()); }
UUID function(@Nullable UUID subjId) { if (subjId != null) return subjId; return subjectIdPerCall(subjId, operationContextPerCall()); }
/** * Gets subject ID per call. * * @param subjId Optional already existing subject ID. * @return Subject ID per call. */
Gets subject ID per call
subjectIdPerCall
{ "repo_name": "ilantukh/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java", "license": "apache-2.0", "size": 70228 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
1,364,236
protected IElementEditpart newInstance( Class<? extends IElementEditpart> type) throws InstantiationException, IllegalAccessException { return type.newInstance(); }
IElementEditpart function( Class<? extends IElementEditpart> type) throws InstantiationException, IllegalAccessException { return type.newInstance(); }
/** * Returns a new instance of the type. * * @param type * The type of the editpart for which an instance should be * created. * @return editPart * @throws InstantiationException * e * @throws IllegalAccessException * e */
Returns a new instance of the type
newInstance
{ "repo_name": "lunifera/lunifera-mobile-vaadin", "path": "org.lunifera.mobile.vaadin.ecview.editparts.emf/src/org/lunifera/mobile/vaadin/ecview/editparts/emf/EditpartManager.java", "license": "epl-1.0", "size": 7325 }
[ "org.lunifera.ecview.core.common.editpart.IElementEditpart" ]
import org.lunifera.ecview.core.common.editpart.IElementEditpart;
import org.lunifera.ecview.core.common.editpart.*;
[ "org.lunifera.ecview" ]
org.lunifera.ecview;
1,086,659
Date getStartTime();
Date getStartTime();
/** * Returns the start time of this process instance. */
Returns the start time of this process instance
getStartTime
{ "repo_name": "lsmall/flowable-engine", "path": "modules/flowable-engine/src/main/java/org/flowable/engine/runtime/ProcessInstance.java", "license": "apache-2.0", "size": 2875 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,911,895
void estimateCost(double estimatedInputRows, RowOrdering rowOrdering, CostEstimate resultCost) throws StandardException;
void estimateCost(double estimatedInputRows, RowOrdering rowOrdering, CostEstimate resultCost) throws StandardException;
/** * Estimate the cost of doing a sort for this row ordering, given * the number of rows to be sorted. This does not take into account * whether the sort is really needed. It also estimates the number of * result rows. * * @param estimatedInputRows The estimated number of rows to sort * @param rowOrder...
Estimate the cost of doing a sort for this row ordering, given the number of rows to be sorted. This does not take into account whether the sort is really needed. It also estimates the number of result rows
estimateCost
{ "repo_name": "kavin256/Derby", "path": "java/engine/org/apache/derby/iapi/sql/compile/RequiredRowOrdering.java", "license": "apache-2.0", "size": 5621 }
[ "org.apache.derby.iapi.error.StandardException" ]
import org.apache.derby.iapi.error.StandardException;
import org.apache.derby.iapi.error.*;
[ "org.apache.derby" ]
org.apache.derby;
2,529,919
public double convexityFromCleanPrice(final BondFixedSecurity bond, final double cleanPrice) { final double yield = yieldFromCleanPrice(bond, cleanPrice); return convexityFromYield(bond, yield); }
double function(final BondFixedSecurity bond, final double cleanPrice) { final double yield = yieldFromCleanPrice(bond, cleanPrice); return convexityFromYield(bond, yield); }
/** * Computes the convexity of a bond from the clean price. * @param bond The bond security. * @param cleanPrice The bond clean price. * @return The convexity. */
Computes the convexity of a bond from the clean price
convexityFromCleanPrice
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/bond/provider/BondSecurityDiscountingMethod.java", "license": "apache-2.0", "size": 42372 }
[ "com.opengamma.analytics.financial.interestrate.bond.definition.BondFixedSecurity" ]
import com.opengamma.analytics.financial.interestrate.bond.definition.BondFixedSecurity;
import com.opengamma.analytics.financial.interestrate.bond.definition.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
1,408,429
private void purgePaxosDecision(long segmentTxId) throws IOException { File paxosFile = storage.getPaxosFile(segmentTxId); if (paxosFile.exists()) { if (!paxosFile.delete()) { throw new IOException("Unable to delete paxos file " + paxosFile); } } }
void function(long segmentTxId) throws IOException { File paxosFile = storage.getPaxosFile(segmentTxId); if (paxosFile.exists()) { if (!paxosFile.delete()) { throw new IOException(STR + paxosFile); } } }
/** * Remove the previously-recorded 'accepted recovery' information * for a given log segment, once it is no longer necessary. * @param segmentTxId the transaction ID to purge * @throws IOException if the file could not be deleted */
Remove the previously-recorded 'accepted recovery' information for a given log segment, once it is no longer necessary
purgePaxosDecision
{ "repo_name": "Ethanlm/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java", "license": "apache-2.0", "size": 41456 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
811,160
public synchronized Optional<BibEntry> getEntryByCitationKey(String key) { for (BibEntry entry : entries) { if (key.equals(entry.getCitationKey().orElse(null))) { return Optional.of(entry); } } return Optional.empty(); }
synchronized Optional<BibEntry> function(String key) { for (BibEntry entry : entries) { if (key.equals(entry.getCitationKey().orElse(null))) { return Optional.of(entry); } } return Optional.empty(); }
/** * Returns the entry with the given citation key. */
Returns the entry with the given citation key
getEntryByCitationKey
{ "repo_name": "JabRef/jabref", "path": "src/main/java/org/jabref/model/database/BibDatabase.java", "license": "mit", "size": 22104 }
[ "java.util.Optional", "org.jabref.model.entry.BibEntry" ]
import java.util.Optional; import org.jabref.model.entry.BibEntry;
import java.util.*; import org.jabref.model.entry.*;
[ "java.util", "org.jabref.model" ]
java.util; org.jabref.model;
1,478,808
@Test public void testGrouperLevels() throws Exception{ ByteBuffer value = ByteBuffer.wrap(new byte[100 * 1024]); // 100 KB value, make it easy to have multiple files //Need entropy to prevent compression so size is predictable with compression enabled/disabled new Random().nextBytes(va...
void function() throws Exception{ ByteBuffer value = ByteBuffer.wrap(new byte[100 * 1024]); new Random().nextBytes(value.array()); int rows = 40; int columns = 20; for (int r = 0; r < rows; r++) { UpdateBuilder update = UpdateBuilder.create(cfs.metadata(), String.valueOf(r)); for (int c = 0; c < columns; c++) update.ne...
/** * Ensure that the grouping operation preserves the levels of grouped tables */
Ensure that the grouping operation preserves the levels of grouped tables
testGrouperLevels
{ "repo_name": "aholmberg/cassandra", "path": "test/unit/org/apache/cassandra/db/compaction/LeveledCompactionStrategyTest.java", "license": "apache-2.0", "size": 36524 }
[ "java.nio.ByteBuffer", "java.util.Collection", "java.util.Iterator", "java.util.Random", "org.apache.cassandra.UpdateBuilder", "org.apache.cassandra.io.sstable.format.SSTableReader", "org.junit.Assert" ]
import java.nio.ByteBuffer; import java.util.Collection; import java.util.Iterator; import java.util.Random; import org.apache.cassandra.UpdateBuilder; import org.apache.cassandra.io.sstable.format.SSTableReader; import org.junit.Assert;
import java.nio.*; import java.util.*; import org.apache.cassandra.*; import org.apache.cassandra.io.sstable.format.*; import org.junit.*;
[ "java.nio", "java.util", "org.apache.cassandra", "org.junit" ]
java.nio; java.util; org.apache.cassandra; org.junit;
974,929
public void testDecodeMultipleAnswers() { Integer[] decoded = null; String S = EvalUtils.SEPARATOR; // positive decoded = EvalUtils.decodeMultipleAnswers(S+"1"+S+"4"+S+"7"+S); assertNotNull(decoded); assertEquals(1, decoded[0].intValue()); assertEquals(4, decoded[1].intValu...
void function() { Integer[] decoded = null; String S = EvalUtils.SEPARATOR; decoded = EvalUtils.decodeMultipleAnswers(S+"1"+S+"4"+S+"7"+S); assertNotNull(decoded); assertEquals(1, decoded[0].intValue()); assertEquals(4, decoded[1].intValue()); assertEquals(7, decoded[2].intValue()); decoded = EvalUtils.decodeMultipleAn...
/** * Test method for {@link org.sakaiproject.evaluation.utils.EvalUtils#decodeMultipleAnswers(java.lang.String)}. */
Test method for <code>org.sakaiproject.evaluation.utils.EvalUtils#decodeMultipleAnswers(java.lang.String)</code>
testDecodeMultipleAnswers
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "evaluation/impl/src/test/org/sakaiproject/evaluation/utils/EvalUtilsTest.java", "license": "apache-2.0", "size": 29781 }
[ "org.sakaiproject.evaluation.utils.EvalUtils" ]
import org.sakaiproject.evaluation.utils.EvalUtils;
import org.sakaiproject.evaluation.utils.*;
[ "org.sakaiproject.evaluation" ]
org.sakaiproject.evaluation;
871,699
protected boolean isLogin(HttpSession session) { return cacheUtil.doesContain(session, jspViewPath); }
boolean function(HttpSession session) { return cacheUtil.doesContain(session, jspViewPath); }
/** * Check if the user is logged in. * * @param session * @return */
Check if the user is logged in
isLogin
{ "repo_name": "Joe23/capelin-opac", "path": "capelin-mvc/src/org/capelin/mvc/controller/CatalogRecordController.java", "license": "agpl-3.0", "size": 34371 }
[ "javax.servlet.http.HttpSession" ]
import javax.servlet.http.HttpSession;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,792,181
public void deleteProject(int stage) throws WorkflowException;
void function(int stage) throws WorkflowException;
/** * Deletes a project at the given workflow level (stage) * <p> * @param stage */
Deletes a project at the given workflow level (stage)
deleteProject
{ "repo_name": "davidtrattnig/opencms-workflow2", "path": "src/main/java/com/bearingpoint/opencms/workflow2/stage/I_ProjectManager.java", "license": "lgpl-2.1", "size": 6116 }
[ "com.bearingpoint.opencms.workflow2.WorkflowException" ]
import com.bearingpoint.opencms.workflow2.WorkflowException;
import com.bearingpoint.opencms.workflow2.*;
[ "com.bearingpoint.opencms" ]
com.bearingpoint.opencms;
1,518,583
this.operator = expression.operator; this.elementsArray = expression.elementsArray; this.elements = expression.elements; } private Expression(Operator operator, Object[] elementsArray) { this.operator = operator; this.elementsArray = elementsArray; Collections.addAll(elements, elementsArray); } p...
this.operator = expression.operator; this.elementsArray = expression.elementsArray; this.elements = expression.elements; } Expression(Operator operator, Object[] elementsArray) { this.operator = operator; this.elementsArray = elementsArray; Collections.addAll(elements, elementsArray); } public Expression(String express...
/** * Copies contents of given expression into this one. * * @param expression */
Copies contents of given expression into this one
copy
{ "repo_name": "jmeetsma/Iglu-Util", "path": "src/main/java/org/ijsberg/iglu/util/logic/Expression.java", "license": "gpl-3.0", "size": 11579 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
2,896,772
void setType(TypeType value);
void setType(TypeType value);
/** * Sets the value of the '{@link org.ebxml.namespaces.trade.partner.PartyRefType#getType <em>Type</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Type</em>' attribute. * @see org.w3._1999.xlink.TypeType * @see #isSetType() * @see #unsetType()...
Sets the value of the '<code>org.ebxml.namespaces.trade.partner.PartyRefType#getType Type</code>' attribute.
setType
{ "repo_name": "GRA-UML/tool", "path": "plugins/org.ijis.gra.ebxml.cpp-cpa/src/org/ebxml/namespaces/trade/partner/PartyRefType.java", "license": "epl-1.0", "size": 4513 }
[ "org.w3._1999.xlink.TypeType" ]
import org.w3._1999.xlink.TypeType;
import org.w3.*;
[ "org.w3" ]
org.w3;
2,852,966
@GET("/movie/top_rated") ResultsPage topRated( @Query("page") Integer page, @Query("language") String language );
@GET(STR) ResultsPage topRated( @Query("page") Integer page, @Query(STR) String language );
/** * Get the list of top rated movies. By default, this list will only include movies that have 10 * or more votes. This list refreshes every day. * * @param page <em>Optional.</em> Minimum value is 1, expected value is an integer. * @param language <em>Optional.</em> ISO 639-1 code. ...
Get the list of top rated movies. By default, this list will only include movies that have 10 or more votes. This list refreshes every day
topRated
{ "repo_name": "GeorgeMe/tmdb-java", "path": "src/main/java/com/uwetrottmann/tmdb/services/MoviesService.java", "license": "apache-2.0", "size": 5152 }
[ "com.uwetrottmann.tmdb.entities.ResultsPage" ]
import com.uwetrottmann.tmdb.entities.ResultsPage;
import com.uwetrottmann.tmdb.entities.*;
[ "com.uwetrottmann.tmdb" ]
com.uwetrottmann.tmdb;
216,166
public void drawCanvas(float x, float y, final Canvas canvas) { if (canvas == null) { Log.d("Ignoring Canvas.drawCanvas() with null canvas."); } else if (canvas == this) { Log.d("Ignoring Canvas.drawCanvas() trying to draw canvas on itself."); } else i...
void function(float x, float y, final Canvas canvas) { if (canvas == null) { Log.d(STR); } else if (canvas == this) { Log.d(STR); } else if (opacity != 0) { x = x * sx + tx; y = y * sy + ty; final float width = canvas.getWidth() * canvasToDevice; final float height = canvas.getHeight() * canvasToDevice; imp.drawCanvas(...
/** * Copies the contents of another canvas to this canvas. This method uses the current alignment and opacity. * * @param x the horizontal coordinate * @param y the vertical coordinate * @param canvas the other canvas * * @since 2.1 */
Copies the contents of another canvas to this canvas. This method uses the current alignment and opacity
drawCanvas
{ "repo_name": "r0the/jeda", "path": "core/src/ch/jeda/ui/Canvas.java", "license": "lgpl-3.0", "size": 43076 }
[ "ch.jeda.Log" ]
import ch.jeda.Log;
import ch.jeda.*;
[ "ch.jeda" ]
ch.jeda;
476,252
// Missing in the theoric definition: creating a new header GradoopId newGraphid = GradoopId.get(); DataSet<GraphHead> gh = searchGraph.getGraphHead() .map(new MapGraphHeadForNewGraph(newGraphid)); DataSet<GradoopId> subgraphIds = graphPatterns.getGraphHead() .map(new Id<>()); // PHAS...
GradoopId newGraphid = GradoopId.get(); DataSet<GraphHead> gh = searchGraph.getGraphHead() .map(new MapGraphHeadForNewGraph(newGraphid)); DataSet<GradoopId> subgraphIds = graphPatterns.getGraphHead() .map(new Id<>()); DataSet<Tuple2<Vertex, GradoopId>> vWithGid = graphPatterns.getVertices() .coGroup(searchGraph.getVert...
/** * Fusing the already-combined sources * * @param searchGraph Logical Graph defining the data lake * @param graphPatterns Collection of elements representing which vertices will be merged into * a vertex * @return A single merged graph */
Fusing the already-combined sources
execute
{ "repo_name": "p3et/gradoop", "path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/fusion/VertexFusion.java", "license": "apache-2.0", "size": 6280 }
[ "org.apache.flink.api.java.DataSet", "org.apache.flink.api.java.tuple.Tuple2", "org.gradoop.common.model.impl.id.GradoopId", "org.gradoop.common.model.impl.pojo.Edge", "org.gradoop.common.model.impl.pojo.GraphHead", "org.gradoop.common.model.impl.pojo.Vertex", "org.gradoop.flink.model.impl.functions.epg...
import org.apache.flink.api.java.DataSet; import org.apache.flink.api.java.tuple.Tuple2; import org.gradoop.common.model.impl.id.GradoopId; import org.gradoop.common.model.impl.pojo.Edge; import org.gradoop.common.model.impl.pojo.GraphHead; import org.gradoop.common.model.impl.pojo.Vertex; import org.gradoop.flink.mode...
import org.apache.flink.api.java.*; import org.apache.flink.api.java.tuple.*; import org.gradoop.common.model.impl.id.*; import org.gradoop.common.model.impl.pojo.*; import org.gradoop.flink.model.impl.functions.epgm.*; import org.gradoop.flink.model.impl.functions.graphcontainment.*; import org.gradoop.flink.model.imp...
[ "org.apache.flink", "org.gradoop.common", "org.gradoop.flink" ]
org.apache.flink; org.gradoop.common; org.gradoop.flink;
1,384,928
@Test public void testClone() { double[][] a = new double[1][]; double[][] b = DataUtilities.clone(a); assertTrue(DataUtilities.equal(a, b)); a[0] = new double[] { 3.0, 4.0 }; assertFalse(DataUtilities.equal(a, b)); b[0] = new double[] { 3.0, 4.0 }; assert...
void function() { double[][] a = new double[1][]; double[][] b = DataUtilities.clone(a); assertTrue(DataUtilities.equal(a, b)); a[0] = new double[] { 3.0, 4.0 }; assertFalse(DataUtilities.equal(a, b)); b[0] = new double[] { 3.0, 4.0 }; assertTrue(DataUtilities.equal(a, b)); a = new double[2][3]; a[0][0] = 1.23; a[1][1]...
/** * Some tests for the clone() method. */
Some tests for the clone() method
testClone
{ "repo_name": "raincs13/phd", "path": "tests/org/jfree/data/DataUtilitiesTest.java", "license": "lgpl-2.1", "size": 9247 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,622,088
public Map<String, String> getReadableProperties() { return readableProperties; }
Map<String, String> function() { return readableProperties; }
/** * Get the readable properties. * * @return the readable properties. */
Get the readable properties
getReadableProperties
{ "repo_name": "arangodb/arangodb", "path": "3rdParty/rocksdb/6.29/java/src/main/java/org/rocksdb/TableProperties.java", "license": "apache-2.0", "size": 13342 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,541,898
List<Operation> getOperationChildren(Operation operationParent, List<Operation> rootOperations);
List<Operation> getOperationChildren(Operation operationParent, List<Operation> rootOperations);
/** * lists all operations sub the given parent operation. */
lists all operations sub the given parent operation
getOperationChildren
{ "repo_name": "SpoonLabs/gumtree-spoon-ast-diff", "path": "src/main/java/gumtree/spoon/diff/Diff.java", "license": "apache-2.0", "size": 2176 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,927,448
@Test public void testVisitRemoveColumn() { // given RemoveColumn removeColumn = mock(RemoveColumn.class); given(removeColumn.apply(schema)).willReturn(schema); // when upgrader.visit(removeColumn); // then verify(removeColumn).apply(schema); verify(sqlDialect).alterTabl...
void function() { RemoveColumn removeColumn = mock(RemoveColumn.class); given(removeColumn.apply(schema)).willReturn(schema); upgrader.visit(removeColumn); verify(removeColumn).apply(schema); verify(sqlDialect).alterTableDropColumnStatements(nullable(Table.class), nullable(Column.class)); verify(sqlStatementWriter).wri...
/** * Test method for {@link org.alfasoftware.morf.upgrade.InlineTableUpgrader#visit(org.alfasoftware.morf.upgrade.RemoveColumn)}. */
Test method for <code>org.alfasoftware.morf.upgrade.InlineTableUpgrader#visit(org.alfasoftware.morf.upgrade.RemoveColumn)</code>
testVisitRemoveColumn
{ "repo_name": "alfasoftware/morf", "path": "morf-core/src/test/java/org/alfasoftware/morf/upgrade/TestInlineTableUpgrader.java", "license": "apache-2.0", "size": 14125 }
[ "org.alfasoftware.morf.metadata.Column", "org.alfasoftware.morf.metadata.Table", "org.mockito.ArgumentMatchers", "org.mockito.BDDMockito", "org.mockito.Mockito" ]
import org.alfasoftware.morf.metadata.Column; import org.alfasoftware.morf.metadata.Table; import org.mockito.ArgumentMatchers; import org.mockito.BDDMockito; import org.mockito.Mockito;
import org.alfasoftware.morf.metadata.*; import org.mockito.*;
[ "org.alfasoftware.morf", "org.mockito" ]
org.alfasoftware.morf; org.mockito;
2,638,373
public void testTextViewGreetingsParameters() { Log.i(LOGGER, "Running testTextViewGreetingsParameters()"); assertEquals("Good day, Team!..", tvGreetingsTest.getText().toString()); assertEquals(LayoutParams.WRAP_CONTENT, tvGreetingsTest.getLayoutParams().height); assertEquals(LayoutParams.WRAP_CONTENT...
void function() { Log.i(LOGGER, STR); assertEquals(STR, tvGreetingsTest.getText().toString()); assertEquals(LayoutParams.WRAP_CONTENT, tvGreetingsTest.getLayoutParams().height); assertEquals(LayoutParams.WRAP_CONTENT, tvGreetingsTest.getLayoutParams().width); ViewAsserts.assertGroupContains(rLayoutOfMainActivityTest, t...
/** * Verifies the parameters of Greetings TextView of {@link MainActivity}. * * <p> * This test verifies following: * <ul> * <li>asserts that text shown in activity is equal to specified;</li> * <li>asserts layout parameters of this TextView;</li> * <li>asserts that this TextView is a child of * <co...
Verifies the parameters of Greetings TextView of <code>MainActivity</code>. This test verifies following: asserts that text shown in activity is equal to specified; asserts layout parameters of this TextView; asserts that this TextView is a child of <code>rLayoutOfMainActivityTest</code> view; asserts that this TextVie...
testTextViewGreetingsParameters
{ "repo_name": "ishumeyko/shumzApp", "path": "ApplicationTest/src/com/shumz/application/test/MainActivityTest.java", "license": "gpl-3.0", "size": 20609 }
[ "android.test.ViewAsserts", "android.util.Log", "android.view.ViewGroup" ]
import android.test.ViewAsserts; import android.util.Log; import android.view.ViewGroup;
import android.test.*; import android.util.*; import android.view.*;
[ "android.test", "android.util", "android.view" ]
android.test; android.util; android.view;
2,491,830
EReference getVectorArray_Vector();
EReference getVectorArray_Vector();
/** * Returns the meta object for the reference list '{@link gluemodel.substationStandard.Dataclasses.VectorArray#getVector <em>Vector</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Vector</em>'. * @see gluemodel.substationStandard.Dataclasses.V...
Returns the meta object for the reference list '<code>gluemodel.substationStandard.Dataclasses.VectorArray#getVector Vector</code>'.
getVectorArray_Vector
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/substationStandard/Dataclasses/DataclassesPackage.java", "license": "mit", "size": 381891 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,297,601
protected void handleReadable() { int oldState; oldState = clearFlags(WRITE_REQUIRES_READ); if (allAreSet(oldState, WRITE_REQUIRES_READ)) { unparkWriteWaiters(); if (allAreSet(oldState, WRITE_REQUESTED)) { channel.wakeupWrites(); } ...
void function() { int oldState; oldState = clearFlags(WRITE_REQUIRES_READ); if (allAreSet(oldState, WRITE_REQUIRES_READ)) { unparkWriteWaiters(); if (allAreSet(oldState, WRITE_REQUESTED)) { channel.wakeupWrites(); } } if (allAreClear(oldState, READ_READY) && anyAreSet(oldState, READ_REQUIRES_WRITE READ_REQUIRES_EXT)) {...
/** * Called when the underlying channel is readable. */
Called when the underlying channel is readable
handleReadable
{ "repo_name": "dmlloyd/xnio", "path": "api/src/main/java/org/xnio/channels/TranslatingSuspendableChannel.java", "license": "apache-2.0", "size": 33973 }
[ "org.xnio.Bits", "org.xnio.ChannelListener", "org.xnio.ChannelListeners" ]
import org.xnio.Bits; import org.xnio.ChannelListener; import org.xnio.ChannelListeners;
import org.xnio.*;
[ "org.xnio" ]
org.xnio;
875,004
public void orderSets(List<String> photosetIdList) throws Exception { logger.info("Reordering photosets."); Response response = JinxFactory.getInstance().getPhotosetsApi().orderSets(photosetIdList); if (response.getCode() != 0) { throw new Exception("There was an error while ordering sets. Code " + ...
void function(List<String> photosetIdList) throws Exception { logger.info(STR); Response response = JinxFactory.getInstance().getPhotosetsApi().orderSets(photosetIdList); if (response.getCode() != 0) { throw new Exception(STR + response.getCode() + ":" + response.getMessage()); } }
/** * Reorder photosets. * * @param photosetIdList list of photoset id's in the desired order. * @throws Exception if there are any errors. */
Reorder photosets
orderSets
{ "repo_name": "jeremybrooks/SuprSetr", "path": "src/main/java/net/jeremybrooks/suprsetr/flickr/PhotosetHelper.java", "license": "gpl-3.0", "size": 12078 }
[ "java.util.List", "net.jeremybrooks.jinx.response.Response" ]
import java.util.List; import net.jeremybrooks.jinx.response.Response;
import java.util.*; import net.jeremybrooks.jinx.response.*;
[ "java.util", "net.jeremybrooks.jinx" ]
java.util; net.jeremybrooks.jinx;
1,842,023
String generateIdentifier(QName type, NodeRef parent);
String generateIdentifier(QName type, NodeRef parent);
/** * Generate an identifier for a node with the given type and parent. * * @param type type of the node * @param parent parent of the ndoe * @return String generated identifier */
Generate an identifier for a node with the given type and parent
generateIdentifier
{ "repo_name": "dnacreative/records-management", "path": "rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/identifier/IdentifierService.java", "license": "lgpl-3.0", "size": 1983 }
[ "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.namespace.QName" ]
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName;
import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*;
[ "org.alfresco.service" ]
org.alfresco.service;
293,225
public static void check(Random random, Query q1, IndexSearcher s) { check(random, q1, s, true); }
static void function(Random random, Query q1, IndexSearcher s) { check(random, q1, s, true); }
/** * Various query sanity checks on a searcher, some checks are only done for * instanceof IndexSearcher. * * @see #check(Query) * @see #checkFirstSkipTo * @see #checkSkipTo * @see #checkExplanations * @see #checkEqual */
Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher
check
{ "repo_name": "terrancesnyder/solr-analytics", "path": "lucene/test-framework/src/java/org/apache/lucene/search/QueryUtils.java", "license": "apache-2.0", "size": 18690 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,550,928
private void checkForFailure(List<Dependency> dependencies) throws BuildException { final StringBuilder ids = new StringBuilder(); for (Dependency d : dependencies) { for (Vulnerability v : d.getVulnerabilities()) { if (v.getCvssScore() >= failBuildOnCVSS) { ...
void function(List<Dependency> dependencies) throws BuildException { final StringBuilder ids = new StringBuilder(); for (Dependency d : dependencies) { for (Vulnerability v : d.getVulnerabilities()) { if (v.getCvssScore() >= failBuildOnCVSS) { if (ids.length() == 0) { ids.append(v.getName()); } else { ids.append(STR).a...
/** * Checks to see if a vulnerability has been identified with a CVSS score that is above the threshold set in the * configuration. * * @param dependencies the list of dependency objects * @throws BuildException thrown if a CVSS score is found that is higher then the threshold set */
Checks to see if a vulnerability has been identified with a CVSS score that is above the threshold set in the configuration
checkForFailure
{ "repo_name": "sirkkalap/DependencyCheck", "path": "dependency-check-ant/src/main/java/org/owasp/dependencycheck/taskdefs/DependencyCheckTask.java", "license": "apache-2.0", "size": 36174 }
[ "java.util.List", "org.apache.tools.ant.BuildException", "org.owasp.dependencycheck.dependency.Dependency", "org.owasp.dependencycheck.dependency.Vulnerability" ]
import java.util.List; import org.apache.tools.ant.BuildException; import org.owasp.dependencycheck.dependency.Dependency; import org.owasp.dependencycheck.dependency.Vulnerability;
import java.util.*; import org.apache.tools.ant.*; import org.owasp.dependencycheck.dependency.*;
[ "java.util", "org.apache.tools", "org.owasp.dependencycheck" ]
java.util; org.apache.tools; org.owasp.dependencycheck;
1,848,229
protected void processMultiStatus(HttpResponse response) throws IOException, HttpException, DavException { if (response.getStatusLine().getStatusCode() != HttpStatus.SC_MULTI_STATUS) throw new DavNoMultiStatusException(); HttpEntity entity = response.getEntity(); if (entity == null) throw new DavNoCon...
void function(HttpResponse response) throws IOException, HttpException, DavException { if (response.getStatusLine().getStatusCode() != HttpStatus.SC_MULTI_STATUS) throw new DavNoMultiStatusException(); HttpEntity entity = response.getEntity(); if (entity == null) throw new DavNoContentException(); @Cleanup InputStream ...
/** * Process a 207 Multi-status response as defined in RFC 4918 "13. Multi-Status Response" */
Process a 207 Multi-status response as defined in RFC 4918 "13. Multi-Status Response"
processMultiStatus
{ "repo_name": "steedos/davdroid", "path": "app/src/main/java/at/bitfire/davdroid/webdav/WebDavResource.java", "license": "gpl-3.0", "size": 21023 }
[ "android.util.Log", "at.bitfire.davdroid.URIUtils", "at.bitfire.davdroid.resource.Event", "at.bitfire.davdroid.webdav.DavProp", "java.io.IOException", "java.io.InputStream", "java.util.HashMap", "java.util.LinkedList", "java.util.List", "org.apache.http.HttpEntity", "org.apache.http.HttpResponse...
import android.util.Log; import at.bitfire.davdroid.URIUtils; import at.bitfire.davdroid.resource.Event; import at.bitfire.davdroid.webdav.DavProp; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import org.apache.http.HttpEntity; imp...
import android.util.*; import at.bitfire.davdroid.*; import at.bitfire.davdroid.resource.*; import at.bitfire.davdroid.webdav.*; import java.io.*; import java.util.*; import org.apache.http.*; import org.apache.http.message.*; import org.simpleframework.xml.*; import org.simpleframework.xml.core.*;
[ "android.util", "at.bitfire.davdroid", "java.io", "java.util", "org.apache.http", "org.simpleframework.xml" ]
android.util; at.bitfire.davdroid; java.io; java.util; org.apache.http; org.simpleframework.xml;
1,063,374
public Geometry transformToStorageEpsg(EnvelopeOrGeometry geometry) throws OwsExceptionReport { return transformToStorageEpsg(geometry.toGeometry()); }
Geometry function(EnvelopeOrGeometry geometry) throws OwsExceptionReport { return transformToStorageEpsg(geometry.toGeometry()); }
/** * Transforms the geometry to the storage EPSG code. * * @param geometry * Geometry to transform * * @return Transformed geometry * * @throws OwsExceptionReport * If an error occurs */
Transforms the geometry to the storage EPSG code
transformToStorageEpsg
{ "repo_name": "CarstenHollmann/SOS", "path": "core/api/src/main/java/org/n52/sos/util/GeometryHandler.java", "license": "gpl-2.0", "size": 28022 }
[ "org.locationtech.jts.geom.Geometry", "org.n52.shetland.ogc.ows.exception.OwsExceptionReport", "org.n52.shetland.util.EnvelopeOrGeometry" ]
import org.locationtech.jts.geom.Geometry; import org.n52.shetland.ogc.ows.exception.OwsExceptionReport; import org.n52.shetland.util.EnvelopeOrGeometry;
import org.locationtech.jts.geom.*; import org.n52.shetland.ogc.ows.exception.*; import org.n52.shetland.util.*;
[ "org.locationtech.jts", "org.n52.shetland" ]
org.locationtech.jts; org.n52.shetland;
1,814,775
public ListitemRenderer getEmailTemplateEnumRenderer() { return (item, data, i) -> { EmailTemplateEnum template = (EmailTemplateEnum) data; item.setLabel(_(template.getTemplateType())); item.setValue(template); }; }
ListitemRenderer function() { return (item, data, i) -> { EmailTemplateEnum template = (EmailTemplateEnum) data; item.setLabel(_(template.getTemplateType())); item.setValue(template); }; }
/** * Used in email_templates.zul * Should be public! */
Used in email_templates.zul Should be public
getEmailTemplateEnumRenderer
{ "repo_name": "PaulLuchyn/libreplan", "path": "libreplan-webapp/src/main/java/org/libreplan/web/email/EmailTemplateController.java", "license": "agpl-3.0", "size": 6664 }
[ "org.libreplan.business.email.entities.EmailTemplateEnum", "org.zkoss.zul.ListitemRenderer" ]
import org.libreplan.business.email.entities.EmailTemplateEnum; import org.zkoss.zul.ListitemRenderer;
import org.libreplan.business.email.entities.*; import org.zkoss.zul.*;
[ "org.libreplan.business", "org.zkoss.zul" ]
org.libreplan.business; org.zkoss.zul;
58,820
@Override public boolean addAll(Collection<? extends T> elements) throws NullPointerException { elements.forEach(stack::push); fireValueChangedEvent(new StackChange(this.get(), ChangeType.PUSH.setChangedObj(new ArrayList<>(elements)))); return true; }
boolean function(Collection<? extends T> elements) throws NullPointerException { elements.forEach(stack::push); fireValueChangedEvent(new StackChange(this.get(), ChangeType.PUSH.setChangedObj(new ArrayList<>(elements)))); return true; }
/** * Adds the elements from the collection into the stack in the order they * are specified * * @param elements * the collection to be added to this stack * @return true * @throws NullPointerException * if the collection is null */
Adds the elements from the collection into the stack in the order they are specified
addAll
{ "repo_name": "callakrsos/Gargoyle", "path": "gargoyle-commons/src/main/java/com/kyj/fx/commons/utils/ObservableStack.java", "license": "gpl-2.0", "size": 9240 }
[ "java.util.ArrayList", "java.util.Collection" ]
import java.util.ArrayList; import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,129,557
public void remove() { if (polygon != null) { polygon.remove(); polygon = null; } for (Marker marker : markers) { marker.remove(); } for (PolygonHoleMarkers hole : holes) { hole.remove(); } }
void function() { if (polygon != null) { polygon.remove(); polygon = null; } for (Marker marker : markers) { marker.remove(); } for (PolygonHoleMarkers hole : holes) { hole.remove(); } }
/** * Remove from the map */
Remove from the map
remove
{ "repo_name": "boundlessgeo/geopackage-android", "path": "geopackage-sdk/src/main/java/mil/nga/geopackage/geom/map/PolygonMarkers.java", "license": "mit", "size": 2997 }
[ "com.google.android.gms.maps.model.Marker" ]
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.*;
[ "com.google.android" ]
com.google.android;
1,156,978
public static String newStringFromBytes(byte[] bytes, int start, int length) { try { return new String(bytes, start, length, UTF8_CHARSET.name()); } catch (UnsupportedEncodingException e) { throw new RuntimeException("Impossible failure: Charset.forName(\"UTF-8\") returns inv...
static String function(byte[] bytes, int start, int length) { try { return new String(bytes, start, length, UTF8_CHARSET.name()); } catch (UnsupportedEncodingException e) { throw new RuntimeException(STRUTF-8\STR, e); } } /** * Wraps the passed <code>in</code> into a {@link BufferedInputStream}
/** * Use this function instead of new String(byte[], int, int) * to avoid surprises from non-standard default encodings. */
Use this function instead of new String(byte[], int, int) to avoid surprises from non-standard default encodings
newStringFromBytes
{ "repo_name": "curso007/camel", "path": "camel-core/src/main/java/org/apache/camel/util/IOHelper.java", "license": "apache-2.0", "size": 19689 }
[ "java.io.BufferedInputStream", "java.io.UnsupportedEncodingException" ]
import java.io.BufferedInputStream; import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
299,114
public File getControllerSourceFolder() { return new File(getControllerFolder(), SOURCE_SUB_DIR); }
File function() { return new File(getControllerFolder(), SOURCE_SUB_DIR); }
/** * Source folder directory * * @return system-dependent path to source folder where code is generated before it is copied to project */
Source folder directory
getControllerSourceFolder
{ "repo_name": "magnetsystems/r2m-plugin-android", "path": "src/com/magnet/plugin/r2m/project/CacheManager.java", "license": "apache-2.0", "size": 8007 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,219,005
@Override public boolean execute() throws IOException { if (stopOnError) { for (final Action action : actions) { if (!action.execute()) { return false; } } return true; } boolean status = true; ...
boolean function() throws IOException { if (stopOnError) { for (final Action action : actions) { if (!action.execute()) { return false; } } return true; } boolean status = true; IOException exception = null; for (final Action action : actions) { try { status &= action.execute(); } catch (final IOException ex) { status ...
/** * Execute sequence of actions. * * @return true if all actions were successful. * @throws IOException on IO error. */
Execute sequence of actions
execute
{ "repo_name": "elitecodegroovy/log4j2", "path": "log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java", "license": "apache-2.0", "size": 2957 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
732,960
private static void setMinMaxValues(ColumnMetadata columnMetadata, long rowCount) { if (columnMetadata.hasSingleValue(rowCount)) { Object minValue = columnMetadata.getMinValue(); if (minValue != null && minValue instanceof String) { byte[] bytes = ((String) minValue).getBytes(); column...
static void function(ColumnMetadata columnMetadata, long rowCount) { if (columnMetadata.hasSingleValue(rowCount)) { Object minValue = columnMetadata.getMinValue(); if (minValue != null && minValue instanceof String) { byte[] bytes = ((String) minValue).getBytes(); columnMetadata.setMax(bytes); columnMetadata.setMin(byt...
/** * Checks that column has single value and replaces Min and Max by their byte values * in {@code Metadata.ColumnMetadata columnMetadata} if their values were stored as strings. * * @param columnMetadata column metadata that should be changed * @param rowCount rows count in column chunk */
Checks that column has single value and replaces Min and Max by their byte values in Metadata.ColumnMetadata columnMetadata if their values were stored as strings
setMinMaxValues
{ "repo_name": "cchang738/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetReaderUtility.java", "license": "apache-2.0", "size": 31693 }
[ "org.apache.drill.exec.store.parquet.metadata.MetadataBase" ]
import org.apache.drill.exec.store.parquet.metadata.MetadataBase;
import org.apache.drill.exec.store.parquet.metadata.*;
[ "org.apache.drill" ]
org.apache.drill;
1,706,607
@Override public void setElementCount(Count elementCount) { // case of variable size component if (elementCount.getParent() != null) setVariableSizeComponent(elementCount); // case of fixed size else this.elementCount.setValue(elementCou...
void function(Count elementCount) { if (elementCount.getParent() != null) setVariableSizeComponent(elementCount); else this.elementCount.setValue(elementCount); }
/** * Sets the elementCount property<br/> * If the Count object has a parent, it will used as an external variable size component */
Sets the elementCount property If the Count object has a parent, it will used as an external variable size component
setElementCount
{ "repo_name": "sensiasoft/lib-swe-common", "path": "swe-common-core/src/main/java/org/vast/data/AbstractArrayImpl.java", "license": "mpl-2.0", "size": 8924 }
[ "net.opengis.swe.v20.Count" ]
import net.opengis.swe.v20.Count;
import net.opengis.swe.v20.*;
[ "net.opengis.swe" ]
net.opengis.swe;
1,060,797
public interface OnConsumeMultiFinishedListener { public void onConsumeMultiFinished(List<Purchase> purchases, List<IabResult> results); }
interface OnConsumeMultiFinishedListener { public void function(List<Purchase> purchases, List<IabResult> results); }
/** * Called to notify that a consumption of multiple items has finished. * * @param purchases The purchases that were (or were to be) consumed. * @param results The results of each consumption operation, corresponding to each * sku. */
Called to notify that a consumption of multiple items has finished
onConsumeMultiFinished
{ "repo_name": "mikepenz/Gitskarios", "path": "app/src/main/java/com/alorma/github/inapp/IabHelper.java", "license": "mit", "size": 40086 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,574,077
public interface MechanismHandler { SaslServer handleMechanism( LdapSession session, BindRequest bindRequest ) throws Exception;
interface MechanismHandler { SaslServer function( LdapSession session, BindRequest bindRequest ) throws Exception;
/** * Implementors will use the session and message to determine what kind of * {@link SaslServer} to create and what initialization parameters it will require. * * @param session * @param bindRequest * @return The {@link SaslServer} to use for the duration of the bound session. * @th...
Implementors will use the session and message to determine what kind of <code>SaslServer</code> to create and what initialization parameters it will require
handleMechanism
{ "repo_name": "lucastheisen/apache-directory-server", "path": "protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/sasl/MechanismHandler.java", "license": "apache-2.0", "size": 2105 }
[ "javax.security.sasl.SaslServer", "org.apache.directory.api.ldap.model.message.BindRequest", "org.apache.directory.server.ldap.LdapSession" ]
import javax.security.sasl.SaslServer; import org.apache.directory.api.ldap.model.message.BindRequest; import org.apache.directory.server.ldap.LdapSession;
import javax.security.sasl.*; import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.server.ldap.*;
[ "javax.security", "org.apache.directory" ]
javax.security; org.apache.directory;
837,363
public static MozuClient deleteProductVariationLocalizedDeltaPriceClient(com.mozu.api.DataViewMode dataViewMode, String productCode, String variationKey, String currencyCode) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.products.ProductVariationUrl.deleteProductVariationLocalizedDelta...
static MozuClient function(com.mozu.api.DataViewMode dataViewMode, String productCode, String variationKey, String currencyCode) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.products.ProductVariationUrl.deleteProductVariationLocalizedDeltaPriceUrl(currencyCode, productCode, variationKey); S...
/** * * <p><pre><code> * MozuClient mozuClient=DeleteProductVariationLocalizedDeltaPriceClient(dataViewMode, productCode, variationKey, currencyCode); * client.setBaseAddress(url); * client.executeRequest(); * </code></pre></p> * @param currencyCode * @param productCode * @param variationKey ...
<code><code> MozuClient mozuClient=DeleteProductVariationLocalizedDeltaPriceClient(dataViewMode, productCode, variationKey, currencyCode); client.setBaseAddress(url); client.executeRequest(); </code></code>
deleteProductVariationLocalizedDeltaPriceClient
{ "repo_name": "eileenzhuang1/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/products/ProductVariationClient.java", "license": "mit", "size": 28478 }
[ "com.mozu.api.DataViewMode", "com.mozu.api.Headers", "com.mozu.api.MozuClient", "com.mozu.api.MozuUrl" ]
import com.mozu.api.DataViewMode; import com.mozu.api.Headers; import com.mozu.api.MozuClient; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
1,891,717
@SuppressWarnings({ "rawtypes" }) public List getObjects(Class cls) { List<Actor> result = new ArrayList<Actor>(); Iterator<Actor> i = objectsDisordered.iterator(); while (i.hasNext()) { Actor actor = i.next(); if (cls == null || cls.isInstance(actor)) { result.add(actor); } } r...
@SuppressWarnings({ STR }) List function(Class cls) { List<Actor> result = new ArrayList<Actor>(); Iterator<Actor> i = objectsDisordered.iterator(); while (i.hasNext()) { Actor actor = i.next(); if (cls == null cls.isInstance(actor)) { result.add(actor); } } return result; }
/** * Get all the objects in the world, or all the objects of a particular * class. * <p> * If a class is specified as a parameter, only objects of that class (or * its subclasses) will be returned. * <p> * * @param cls * Class of objects to look for ('null' will find all objects)...
Get all the objects in the world, or all the objects of a particular class. If a class is specified as a parameter, only objects of that class (or its subclasses) will be returned.
getObjects
{ "repo_name": "rhildred/droidfoot", "path": "eclipse-workspace-droidfoot/Droidfoot/src/greenfoot/World.java", "license": "gpl-2.0", "size": 20511 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
154,922
public void setParameter(IRequestCycle cycle) { if (shouldSetPropertyValue(cycle)) { boolean value = getBinding().getBoolean(); setPropertyValue(value ? Boolean.TRUE : Boolean.FALSE); } }
void function(IRequestCycle cycle) { if (shouldSetPropertyValue(cycle)) { boolean value = getBinding().getBoolean(); setPropertyValue(value ? Boolean.TRUE : Boolean.FALSE); } }
/** * Invokes {@link IBinding#getBoolean()}, which always * returns true or false (there is no concept of a null * value). * **/
Invokes <code>IBinding#getBoolean()</code>, which always returns true or false (there is no concept of a null value)
setParameter
{ "repo_name": "apache/tapestry3", "path": "tapestry-framework/src/org/apache/tapestry/param/BooleanParameterConnector.java", "license": "apache-2.0", "size": 1582 }
[ "org.apache.tapestry.IRequestCycle" ]
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.*;
[ "org.apache.tapestry" ]
org.apache.tapestry;
2,569,247
public void setExecutorService(ExecutorService regExecutor, ExecutorService largeExecutor) { regularExecutor = regExecutor; largejobExecutor = largeExecutor; }
void function(ExecutorService regExecutor, ExecutorService largeExecutor) { regularExecutor = regExecutor; largejobExecutor = largeExecutor; }
/** * Sets the executor services to be used for fan out. * * @param regularExecutor * @param largeJobExecutor */
Sets the executor services to be used for fan out
setExecutorService
{ "repo_name": "AurionProject/Aurion", "path": "Product/Production/Services/PatientDiscoveryCore/src/main/java/gov/hhs/fha/nhinc/patientdiscovery/outbound/StandardOutboundPatientDiscovery.java", "license": "bsd-3-clause", "size": 31027 }
[ "java.util.concurrent.ExecutorService" ]
import java.util.concurrent.ExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
712,006
public IterableStream<PartitionEvent> receiveFromPartition(String partitionId, int maximumMessageCount, EventPosition startingPosition) { return receiveFromPartition(partitionId, maximumMessageCount, startingPosition, timeout); }
IterableStream<PartitionEvent> function(String partitionId, int maximumMessageCount, EventPosition startingPosition) { return receiveFromPartition(partitionId, maximumMessageCount, startingPosition, timeout); }
/** * Receives a batch of {@link PartitionEvent events} from the Event Hub partition. * * @param maximumMessageCount The maximum number of messages to receive in this batch. * @param partitionId Identifier of the partition to read events from. * @param startingPosition Position within the Event...
Receives a batch of <code>PartitionEvent events</code> from the Event Hub partition
receiveFromPartition
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubConsumerClient.java", "license": "mit", "size": 12355 }
[ "com.azure.core.util.IterableStream", "com.azure.messaging.eventhubs.models.EventPosition", "com.azure.messaging.eventhubs.models.PartitionEvent" ]
import com.azure.core.util.IterableStream; import com.azure.messaging.eventhubs.models.EventPosition; import com.azure.messaging.eventhubs.models.PartitionEvent;
import com.azure.core.util.*; import com.azure.messaging.eventhubs.models.*;
[ "com.azure.core", "com.azure.messaging" ]
com.azure.core; com.azure.messaging;
444,714
public static List<String> tokenizeLine(String input) { List<String> stringParts = new ArrayList<String>(); if (input == null || input.length() == 0) return stringParts; //Heavily optimized version string split by space with all characters after : //added as a single entry. Under benchmarks, its faster t...
static List<String> function(String input) { List<String> stringParts = new ArrayList<String>(); if (input == null input.length() == 0) return stringParts; String trimmedInput = CharMatcher.WHITESPACE.trimFrom(input); int pos = 0, end; while ((end = trimmedInput.indexOf(' ', pos)) >= 0) { stringParts.add(trimmedInput.s...
/** * Tokenize IRC raw input into it's components, keeping the * 'sender' and 'message' fields intact. * @param input A string in the format [:]item [item] ... [:item [item] ...] * @return List of strings. */
Tokenize IRC raw input into it's components, keeping the 'sender' and 'message' fields intact
tokenizeLine
{ "repo_name": "AnyBot/AnyBot-Lib", "path": "src/org/pircbotx/Utils.java", "license": "gpl-3.0", "size": 3885 }
[ "com.google.common.base.CharMatcher", "java.util.ArrayList", "java.util.List" ]
import com.google.common.base.CharMatcher; import java.util.ArrayList; import java.util.List;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,759,721
public interface OnCheckedChangeListener { void onCheckedChanged(CheckedTextView view, boolean checked); } private OnCheckedChangeListener mOnCheckedChangeListener; public CheckedTextView(Context context) { super(context); init(context, null, 0, 0); } public CheckedTextView(Context context, Attribu...
interface OnCheckedChangeListener { void function(CheckedTextView view, boolean checked); } private OnCheckedChangeListener mOnCheckedChangeListener; public CheckedTextView(Context context) { super(context); init(context, null, 0, 0); } public CheckedTextView(Context context, AttributeSet attrs) { super(context, attrs)...
/** * Called when the checked state is changed. * * @param view The CheckedTextView view. * @param checked The checked state. */
Called when the checked state is changed
onCheckedChanged
{ "repo_name": "MichaelArchangel/ArchangelKit", "path": "materialdesigneffectlibrary/src/main/java/com/rey/material/widget/CheckedTextView.java", "license": "mit", "size": 4484 }
[ "android.content.Context", "android.util.AttributeSet" ]
import android.content.Context; import android.util.AttributeSet;
import android.content.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
109,584
public ConnectableDTO createConnectableDto(final Connectable connectable) { if (connectable == null) { return null; } boolean isAuthorized = connectable.isAuthorized(authorizer, RequestAction.READ, NiFiUserUtils.getNiFiUser()); final ConnectableDTO dto = new Connectable...
ConnectableDTO function(final Connectable connectable) { if (connectable == null) { return null; } boolean isAuthorized = connectable.isAuthorized(authorizer, RequestAction.READ, NiFiUserUtils.getNiFiUser()); final ConnectableDTO dto = new ConnectableDTO(); dto.setId(connectable.getIdentifier()); dto.setName(isAuthoriz...
/** * Creates a ConnectableDTO from the specified Connectable. * * @param connectable connectable * @return dto */
Creates a ConnectableDTO from the specified Connectable
createConnectableDto
{ "repo_name": "Xsixteen/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java", "license": "apache-2.0", "size": 202415 }
[ "org.apache.nifi.authorization.RequestAction", "org.apache.nifi.authorization.user.NiFiUserUtils", "org.apache.nifi.connectable.Connectable", "org.apache.nifi.groups.RemoteProcessGroup", "org.apache.nifi.remote.RemoteGroupPort" ]
import org.apache.nifi.authorization.RequestAction; import org.apache.nifi.authorization.user.NiFiUserUtils; import org.apache.nifi.connectable.Connectable; import org.apache.nifi.groups.RemoteProcessGroup; import org.apache.nifi.remote.RemoteGroupPort;
import org.apache.nifi.authorization.*; import org.apache.nifi.authorization.user.*; import org.apache.nifi.connectable.*; import org.apache.nifi.groups.*; import org.apache.nifi.remote.*;
[ "org.apache.nifi" ]
org.apache.nifi;
65,161
public Set<String> getUpdatedIndexPaths() { return indexUpdateStates.keySet(); }
Set<String> function() { return indexUpdateStates.keySet(); }
/** * Set of indexPaths which have been updated or accessed * in this indexing cycle. */
Set of indexPaths which have been updated or accessed in this indexing cycle
getUpdatedIndexPaths
{ "repo_name": "mduerig/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/progress/IndexingProgressReporter.java", "license": "apache-2.0", "size": 8972 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
48,927
public void doStop() { Set<Object> removeSet = new HashSet<Object>(_beans.keySet()); for (Object removeObj : removeSet) { removeBean(removeObj); } }
void function() { Set<Object> removeSet = new HashSet<Object>(_beans.keySet()); for (Object removeObj : removeSet) { removeBean(removeObj); } }
/** * Perform actions needed to stop lifecycle * * @see org.eclipse.jetty.util.component.AbstractLifeCycle#doStop() */
Perform actions needed to stop lifecycle
doStop
{ "repo_name": "leoleegit/jetty-8.0.4.v20111024", "path": "jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java", "license": "apache-2.0", "size": 11262 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,016,293
DeleteDbFiles.execute("data", null, true); Class.forName("org.h2.Driver"); Connection conn; conn = DriverManager.getConnection("jdbc:h2:data/test"); Statement stat = conn.createStatement(); stat.execute("create table test(id int primary key, name varchar)"); stat.execute(...
DeleteDbFiles.execute("data", null, true); Class.forName(STR); Connection conn; conn = DriverManager.getConnection(STR); Statement stat = conn.createStatement(); stat.execute(STR); stat.execute(STR); stat.execute(STR); stat.execute(STR + STR); stat.execute(STR); stat.execute(STR + STR); conn.close(); }
/** * Run just this test. * * @param args ignored */
Run just this test
main
{ "repo_name": "vdr007/ThriftyPaxos", "path": "src/applications/h2/src/test/org/h2/test/todo/TestLinkedTableFullCondition.java", "license": "apache-2.0", "size": 1516 }
[ "java.sql.Connection", "java.sql.DriverManager", "java.sql.Statement", "org.h2.tools.DeleteDbFiles" ]
import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; import org.h2.tools.DeleteDbFiles;
import java.sql.*; import org.h2.tools.*;
[ "java.sql", "org.h2.tools" ]
java.sql; org.h2.tools;
909,723
public static void setCardStyle(@NonNull CardViewStyle cardStyle) { getPrefs().put(Keys.CARD_STYLE, cardStyle.getValue()); }
static void function(@NonNull CardViewStyle cardStyle) { getPrefs().put(Keys.CARD_STYLE, cardStyle.getValue()); }
/** * Set the Card Style (Material / Flat / Compact) */
Set the Card Style (Material / Flat / Compact)
setCardStyle
{ "repo_name": "HoraApps/LeafPic", "path": "app/src/main/java/org/horaapps/leafpic/util/preferences/Prefs.java", "license": "gpl-3.0", "size": 7126 }
[ "android.support.annotation.NonNull", "org.horaapps.leafpic.CardViewStyle" ]
import android.support.annotation.NonNull; import org.horaapps.leafpic.CardViewStyle;
import android.support.annotation.*; import org.horaapps.leafpic.*;
[ "android.support", "org.horaapps.leafpic" ]
android.support; org.horaapps.leafpic;
773,742
protected void resetGenericConstrainst(GridBagConstraints genericPanelConstrainst) { genericPanelConstrainst.gridwidth = 1; genericPanelConstrainst.gridheight = 1; genericPanelConstrainst.gridx = 0; genericPanelConstrainst.gridy = 0; genericPanelConstrainst.weighty = 0; genericPanelConstrainst.weightx = ...
void function(GridBagConstraints genericPanelConstrainst) { genericPanelConstrainst.gridwidth = 1; genericPanelConstrainst.gridheight = 1; genericPanelConstrainst.gridx = 0; genericPanelConstrainst.gridy = 0; genericPanelConstrainst.weighty = 0; genericPanelConstrainst.weightx = 0; }
/** * Reset the constraints. All to 0s and width and height to 1. * * @param genericPanelConstrainst * the panel constraints to modify */
Reset the constraints. All to 0s and width and height to 1
resetGenericConstrainst
{ "repo_name": "Pablo1990/Epigraph", "path": "src/main/java/epigraph/GUI/ImageProcessingWindow.java", "license": "gpl-3.0", "size": 42389 }
[ "java.awt.GridBagConstraints" ]
import java.awt.GridBagConstraints;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,626,961
public void uncheckout() throws DavException;
void function() throws DavException;
/** * Perform an uncheckout on the version controlled resource. * * @throws DavException */
Perform an uncheckout on the version controlled resource
uncheckout
{ "repo_name": "eccosolutions/osaf-jcr-server", "path": "webdav/src/java/org/apache/jackrabbit/webdav/version/VersionControlledResource.java", "license": "apache-2.0", "size": 9983 }
[ "org.apache.jackrabbit.webdav.DavException" ]
import org.apache.jackrabbit.webdav.DavException;
import org.apache.jackrabbit.webdav.*;
[ "org.apache.jackrabbit" ]
org.apache.jackrabbit;
974,818
protected final int read(byte[] buffer, int offset, int length) throws IOException { ensureOpen(); return readFully(buffer, offset, length); }
final int function(byte[] buffer, int offset, int length) throws IOException { ensureOpen(); return readFully(buffer, offset, length); }
/** * Reads up to <code>length</code> bytes into the specified buffer, starting at the specified offset. The actual * number of bytes read will be less than <code>length</code> if there are not enough available bytes to read, or if * the buffer is not large enough. * * @return the number of byt...
Reads up to <code>length</code> bytes into the specified buffer, starting at the specified offset. The actual number of bytes read will be less than <code>length</code> if there are not enough available bytes to read, or if the buffer is not large enough
read
{ "repo_name": "stephenc/java-iso-tools", "path": "loop-fs-spi/src/main/java/com/github/stephenc/javaisotools/loopfs/spi/AbstractFileSystem.java", "license": "lgpl-2.1", "size": 3518 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,677,566
public Builder mode(String mode) { ((Create)command).mode(mode); return this; }
Builder function(String mode) { ((Create)command).mode(mode); return this; }
/** * Sets the mode parameter. * @param mode * @return */
Sets the mode parameter
mode
{ "repo_name": "christophd/citrus", "path": "endpoints/citrus-zookeeper/src/main/java/com/consol/citrus/zookeeper/actions/ZooExecuteAction.java", "license": "apache-2.0", "size": 18137 }
[ "com.consol.citrus.zookeeper.command.Create" ]
import com.consol.citrus.zookeeper.command.Create;
import com.consol.citrus.zookeeper.command.*;
[ "com.consol.citrus" ]
com.consol.citrus;
1,342,068
public static String getSubtype(ICS ics, AssetId id) { ics.PushVars(); GetSubtype gs = new GetSubtype(); gs.setAssetId(id); gs.setOutput("st"); gs.execute(ics); String ret = ics.GetVar("st"); ics.PopVars(); return ret; }
static String function(ICS ics, AssetId id) { ics.PushVars(); GetSubtype gs = new GetSubtype(); gs.setAssetId(id); gs.setOutput("st"); gs.execute(ics); String ret = ics.GetVar("st"); ics.PopVars(); return ret; }
/** * Get the subtype of the specified asset. The asset does not need to be * loaded. * * @param ics ICS context * @param id the Id of the asset to return the subtype for. * @return subtype on success */
Get the subtype of the specified asset. The asset does not need to be loaded
getSubtype
{ "repo_name": "dolfdijkstra/gst-foundation", "path": "gsf-legacy/src/main/java/com/fatwire/gst/foundation/facade/runtag/asset/GetSubtype.java", "license": "apache-2.0", "size": 3248 }
[ "com.fatwire.assetapi.data.AssetId" ]
import com.fatwire.assetapi.data.AssetId;
import com.fatwire.assetapi.data.*;
[ "com.fatwire.assetapi" ]
com.fatwire.assetapi;
1,521,797
private Artifact getIncludeArtifact(String packageRelativePath, ArtifactOwner owner) { return getPackageRelativeDerivedArtifact(packageRelativePath, targetConfig.getIncludeDirectory(), owner); }
Artifact function(String packageRelativePath, ArtifactOwner owner) { return getPackageRelativeDerivedArtifact(packageRelativePath, targetConfig.getIncludeDirectory(), owner); }
/** * Gets a derived Artifact for testing in the subdirectory of the {@link * BuildConfiguration#getIncludeDirectory()} corresponding to the package of {@code owner}. * So to specify a file foo/foo.o owned by target //foo:foo, {@code packageRelativePath} should * just be "foo.h". */
Gets a derived Artifact for testing in the subdirectory of the <code>BuildConfiguration#getIncludeDirectory()</code> corresponding to the package of owner. So to specify a file foo/foo.o owned by target //foo:foo, packageRelativePath should just be "foo.h"
getIncludeArtifact
{ "repo_name": "anupcshan/bazel", "path": "src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java", "license": "apache-2.0", "size": 71192 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.actions.ArtifactOwner" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.ArtifactOwner;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
542,287
public MetaProperty<Boolean> captureInputs() { return _captureInputs; }
MetaProperty<Boolean> function() { return _captureInputs; }
/** * The meta-property for the {@code captureInputs} property. * @return the meta-property, not null */
The meta-property for the captureInputs property
captureInputs
{ "repo_name": "jeorme/OG-Platform", "path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/server/IndividualCycleOptions.java", "license": "apache-2.0", "size": 14963 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
889,911
CompletableFuture<String> request(String request) throws NetconfException;
CompletableFuture<String> request(String request) throws NetconfException;
/** * Executes an asynchronous RPC to the server and obtains a future to be completed. * * @param request the XML containing the RPC for the server. * @return Server response or ERROR * @throws NetconfException when there is a problem in the communication process on * the underlying connec...
Executes an asynchronous RPC to the server and obtains a future to be completed
request
{ "repo_name": "Phaneendra-Huawei/demo", "path": "protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfSession.java", "license": "apache-2.0", "size": 7041 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,730,968
public static String toString(Resource file, Charset charset) throws IOException { Reader r = null; try { r = getReader(file, charset); String str = toString(r); return str; } finally { closeEL(r); } }
static String function(Resource file, Charset charset) throws IOException { Reader r = null; try { r = getReader(file, charset); String str = toString(r); return str; } finally { closeEL(r); } }
/** * reads String data from File * * @param file * @param charset * @return readed string * @throws IOException */
reads String data from File
toString
{ "repo_name": "jzuijlek/Lucee", "path": "core/src/main/java/lucee/commons/io/IOUtil.java", "license": "lgpl-2.1", "size": 33023 }
[ "java.io.IOException", "java.io.Reader", "java.nio.charset.Charset" ]
import java.io.IOException; import java.io.Reader; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
502,794
Map<HostId, IpAssignment> listAllMapping();
Map<HostId, IpAssignment> listAllMapping();
/** * Returns a collection of all the MacAddress to IPAddress mapping. * * @return the collection of the mappings */
Returns a collection of all the MacAddress to IPAddress mapping
listAllMapping
{ "repo_name": "sdnwiselab/onos", "path": "apps/dhcp/api/src/main/java/org/onosproject/dhcp/DhcpStore.java", "license": "apache-2.0", "size": 3738 }
[ "java.util.Map", "org.onosproject.net.HostId" ]
import java.util.Map; import org.onosproject.net.HostId;
import java.util.*; import org.onosproject.net.*;
[ "java.util", "org.onosproject.net" ]
java.util; org.onosproject.net;
2,644,974
public String getPrimaryKeyPropertyName() { return readableDAO.getPrimaryKeyPropertyName(); } private final class InternalReadableDAOImpl extends ReadableDAOImpl<T, K> { public InternalReadableDAOImpl(Class<T> clasz, SessionFactory sessionFactory) { super(clasz, sessionFactory); } } ...
String function() { return readableDAO.getPrimaryKeyPropertyName(); } private final class InternalReadableDAOImpl extends ReadableDAOImpl<T, K> { public InternalReadableDAOImpl(Class<T> clasz, SessionFactory sessionFactory) { super(clasz, sessionFactory); } } private final class InternalWriteableDAOImpl extends Writeab...
/** * Returns the name of the property. * * @return a {@link String}. */
Returns the name of the property
getPrimaryKeyPropertyName
{ "repo_name": "thiagohp/generic-dao-hibernate", "path": "src/main/java/br/com/arsmachina/dao/hibernate/GenericDAOImpl.java", "license": "apache-2.0", "size": 8253 }
[ "org.hibernate.SessionFactory" ]
import org.hibernate.SessionFactory;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
1,074,863
@Basic( optional = false ) @Column( name = "user_name", nullable = false, length = 45 ) public String getUserName() { return this.userName; }
@Basic( optional = false ) @Column( name = STR, nullable = false, length = 45 ) String function() { return this.userName; }
/** * Return the value associated with the column: userName. * @return A String object (this.userName) */
Return the value associated with the column: userName
getUserName
{ "repo_name": "rpgm/mi15", "path": "rpgm/modules/repository/src/main/java/org/yarlithub/yschool/repository/model/obj/yschool/User.java", "license": "apache-2.0", "size": 9631 }
[ "javax.persistence.Basic", "javax.persistence.Column" ]
import javax.persistence.Basic; import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
153,242
public void activateOptions() { // REMOVE removed rollDate from boolean to enable Alex's change if (datePattern != null) { now.setTime(System.currentTimeMillis()); sdf = new SimpleDateFormat(datePattern); int type = computeCheckPeriod(); /...
void function() { if (datePattern != null) { now.setTime(System.currentTimeMillis()); sdf = new SimpleDateFormat(datePattern); int type = computeCheckPeriod(); rc.setType(type); nextCheck = rc.getNextCheckMillis(now); } else { if (rollDate) { LogLog.error(STR + name + "]."); } } existingInit(); if (rollDate && (fileNam...
/** * Sets initial conditions including date/time roll over information, first check, scheduledFilename, and calls * <code>existingInit</code> to initialize the current # of backups. */
Sets initial conditions including date/time roll over information, first check, scheduledFilename, and calls <code>existingInit</code> to initialize the current # of backups
activateOptions
{ "repo_name": "akalankapagoda/andes", "path": "modules/andes-core/broker/src/main/java/org/apache/log4j/QpidCompositeRollingAppender.java", "license": "apache-2.0", "size": 37850 }
[ "java.io.IOException", "java.text.SimpleDateFormat", "org.apache.log4j.helpers.LogLog" ]
import java.io.IOException; import java.text.SimpleDateFormat; import org.apache.log4j.helpers.LogLog;
import java.io.*; import java.text.*; import org.apache.log4j.helpers.*;
[ "java.io", "java.text", "org.apache.log4j" ]
java.io; java.text; org.apache.log4j;
637,276
private int init(File f) throws IOException { Runtime rt = Runtime.getRuntime(); long prePhraseTableLoadMemUsed = rt.totalMemory() - rt.freeMemory(); final long startTime = System.nanoTime(); LineNumberReader reader = IOTools.getReaderFromFile(f); int numScores = -1; for (String line; (line =...
int function(File f) throws IOException { Runtime rt = Runtime.getRuntime(); long prePhraseTableLoadMemUsed = rt.totalMemory() - rt.freeMemory(); final long startTime = System.nanoTime(); LineNumberReader reader = IOTools.getReaderFromFile(f); int numScores = -1; for (String line; (line = reader.readLine()) != null;) {...
/** * Load the phrase table from file. * * @param f * @return * @throws IOException */
Load the phrase table from file
init
{ "repo_name": "Andy-Peng/phrasal", "path": "src/edu/stanford/nlp/mt/tm/CompiledPhraseTable.java", "license": "gpl-3.0", "size": 10026 }
[ "edu.stanford.nlp.mt.util.IOTools", "edu.stanford.nlp.mt.util.IString", "edu.stanford.nlp.mt.util.IStrings", "edu.stanford.nlp.mt.util.Sequence", "edu.stanford.nlp.util.StringUtils", "java.io.File", "java.io.IOException", "java.io.LineNumberReader", "java.util.List" ]
import edu.stanford.nlp.mt.util.IOTools; import edu.stanford.nlp.mt.util.IString; import edu.stanford.nlp.mt.util.IStrings; import edu.stanford.nlp.mt.util.Sequence; import edu.stanford.nlp.util.StringUtils; import java.io.File; import java.io.IOException; import java.io.LineNumberReader; import java.util.List;
import edu.stanford.nlp.mt.util.*; import edu.stanford.nlp.util.*; import java.io.*; import java.util.*;
[ "edu.stanford.nlp", "java.io", "java.util" ]
edu.stanford.nlp; java.io; java.util;
320,816