method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static void example11() { System.out.println("\n\nexample 11"); TermOrder to = new TermOrder(TermOrder.INVLEX); BigRational cfac = new BigRational(1); String[] vars = new String[] { "x" }; GenPolynomialRing<BigRational> pfac = new GenPolynomialRing<BigRational>(cfac, ...
static void function() { System.out.println(STR); TermOrder to = new TermOrder(TermOrder.INVLEX); BigRational cfac = new BigRational(1); String[] vars = new String[] { "x" }; GenPolynomialRing<BigRational> pfac = new GenPolynomialRing<BigRational>(cfac, 1, to, vars); GenPolynomial<BigRational> D = pfac.parse(STR); GenP...
/** * example11. Rothstein-Trager algorithm. */
example11. Rothstein-Trager algorithm
example11
{ "repo_name": "breandan/java-algebra-system", "path": "src/edu/jas/ufd/ExamplesPartialFraction.java", "license": "gpl-2.0", "size": 6193 }
[ "edu.jas.arith.BigRational", "edu.jas.poly.GenPolynomial", "edu.jas.poly.GenPolynomialRing", "edu.jas.poly.TermOrder" ]
import edu.jas.arith.BigRational; import edu.jas.poly.GenPolynomial; import edu.jas.poly.GenPolynomialRing; import edu.jas.poly.TermOrder;
import edu.jas.arith.*; import edu.jas.poly.*;
[ "edu.jas.arith", "edu.jas.poly" ]
edu.jas.arith; edu.jas.poly;
735,628
private static ILogger iLogger() { //endless loop //CsrfGuard csrfGuard = CsrfGuard.getInstance(); //ILogger iLogger = csrfGuard == null ? null : csrfGuard.getLogger(); //return iLogger; return null; }
static ILogger function() { return null; }
/** * get the logger instance * @return the ilogger */
get the logger instance
iLogger
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/csrfguard/org/owasp/csrfguard/config/overlay/ConfigPropertiesCascadeBase.java", "license": "gpl-2.0", "size": 39421 }
[ "org.owasp.csrfguard.log.ILogger" ]
import org.owasp.csrfguard.log.ILogger;
import org.owasp.csrfguard.log.*;
[ "org.owasp.csrfguard" ]
org.owasp.csrfguard;
1,479,119
void registerSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin);
void registerSpaceTemplatePlugin(SpaceTemplateConfigPlugin spaceTemplateConfigPlugin);
/** * Adds space template config plugin for configuring the space applications, visibility, registration and banner. * <br> * * @param spaceTemplateConfigPlugin The space template config plugin to be added. */
Adds space template config plugin for configuring the space applications, visibility, registration and banner.
registerSpaceTemplatePlugin
{ "repo_name": "exodev/social", "path": "component/core/src/main/java/org/exoplatform/social/core/space/spi/SpaceTemplateService.java", "license": "lgpl-3.0", "size": 3835 }
[ "org.exoplatform.social.core.space.SpaceTemplateConfigPlugin" ]
import org.exoplatform.social.core.space.SpaceTemplateConfigPlugin;
import org.exoplatform.social.core.space.*;
[ "org.exoplatform.social" ]
org.exoplatform.social;
1,440,880
public ArmeriaRetrofitBuilder withClientOptions( BiFunction<String, ? super ClientOptionsBuilder, ClientOptionsBuilder> configurator) { this.configurator = requireNonNull(configurator, "configurator"); return this; }
ArmeriaRetrofitBuilder function( BiFunction<String, ? super ClientOptionsBuilder, ClientOptionsBuilder> configurator) { this.configurator = requireNonNull(configurator, STR); return this; }
/** * Sets the {@link BiFunction} that is applied to the underlying {@link HttpClient}. * * @param configurator a {@link BiFunction} whose first argument is the the URI of the server endpoint and * whose second argument is the {@link ClientOptionsBuilder} with default options of ...
Sets the <code>BiFunction</code> that is applied to the underlying <code>HttpClient</code>
withClientOptions
{ "repo_name": "jonefeewang/armeria", "path": "retrofit2/src/main/java/com/linecorp/armeria/client/http/retrofit2/ArmeriaRetrofitBuilder.java", "license": "apache-2.0", "size": 8263 }
[ "com.linecorp.armeria.client.ClientOptionsBuilder", "java.util.Objects", "java.util.function.BiFunction" ]
import com.linecorp.armeria.client.ClientOptionsBuilder; import java.util.Objects; import java.util.function.BiFunction;
import com.linecorp.armeria.client.*; import java.util.*; import java.util.function.*;
[ "com.linecorp.armeria", "java.util" ]
com.linecorp.armeria; java.util;
1,988,162
public static void processRevisionExit(TreeWalkListener listener, GeneratedYangParser.RevisionStatementContext ctx) { // Check for stack to be non empty. checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.dateArgumentString().getText(), EXIT); Parsable tmpRevisio...
static void function(TreeWalkListener listener, GeneratedYangParser.RevisionStatementContext ctx) { checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.dateArgumentString().getText(), EXIT); Parsable tmpRevisionNode = listener.getParsedDataStack().peek(); if (tmpRevisionNode instanceof YangRevision) { lis...
/** * It is called when parser exits from grammar rule (revision), it perform * validations and update the data model tree. * * @param listener Listener's object * @param ctx context object of the grammar rule */
It is called when parser exits from grammar rule (revision), it perform validations and update the data model tree
processRevisionExit
{ "repo_name": "Phaneendra-Huawei/demo", "path": "utils/yangutils/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RevisionListener.java", "license": "apache-2.0", "size": 7268 }
[ "org.onosproject.yangutils.datamodel.YangModule", "org.onosproject.yangutils.datamodel.YangRevision", "org.onosproject.yangutils.datamodel.YangSubModule", "org.onosproject.yangutils.parser.Parsable", "org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser", "org.onosproject.yangutils.parser.exc...
import org.onosproject.yangutils.datamodel.YangModule; import org.onosproject.yangutils.datamodel.YangRevision; import org.onosproject.yangutils.datamodel.YangSubModule; import org.onosproject.yangutils.parser.Parsable; import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser; import org.onosproject.yan...
import org.onosproject.yangutils.datamodel.*; import org.onosproject.yangutils.parser.*; import org.onosproject.yangutils.parser.antlrgencode.*; import org.onosproject.yangutils.parser.exceptions.*; import org.onosproject.yangutils.parser.impl.*; import org.onosproject.yangutils.parser.impl.parserutils.*;
[ "org.onosproject.yangutils" ]
org.onosproject.yangutils;
1,510,261
public void setProfiles(List<IProfile> profiles) { mAccountHeaderBuilder.mProfiles = profiles; mAccountHeaderBuilder.updateHeaderAndList(); }
void function(List<IProfile> profiles) { mAccountHeaderBuilder.mProfiles = profiles; mAccountHeaderBuilder.updateHeaderAndList(); }
/** * Set a new list of profiles for the header * * @param profiles */
Set a new list of profiles for the header
setProfiles
{ "repo_name": "McUsaVsUrss/MaterialDrawer", "path": "library/src/main/java/com/mikepenz/materialdrawer/AccountHeader.java", "license": "apache-2.0", "size": 12758 }
[ "com.mikepenz.materialdrawer.model.interfaces.IProfile", "java.util.List" ]
import com.mikepenz.materialdrawer.model.interfaces.IProfile; import java.util.List;
import com.mikepenz.materialdrawer.model.interfaces.*; import java.util.*;
[ "com.mikepenz.materialdrawer", "java.util" ]
com.mikepenz.materialdrawer; java.util;
2,583,040
public final Property<CurrencyBean> numerator() { return metaBean().numerator().createProperty(this); }
final Property<CurrencyBean> function() { return metaBean().numerator().createProperty(this); }
/** * Gets the the {@code numerator} property. * @return the property, not null */
Gets the the numerator property
numerator
{ "repo_name": "McLeodMoores/starling", "path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/future/ForeignExchangeFutureBean.java", "license": "apache-2.0", "size": 7896 }
[ "com.opengamma.masterdb.security.hibernate.CurrencyBean", "org.joda.beans.Property" ]
import com.opengamma.masterdb.security.hibernate.CurrencyBean; import org.joda.beans.Property;
import com.opengamma.masterdb.security.hibernate.*; import org.joda.beans.*;
[ "com.opengamma.masterdb", "org.joda.beans" ]
com.opengamma.masterdb; org.joda.beans;
2,741,569
public void processRequest(Request request) { if (!finished) { queuedRequests.add(request); } }
void function(Request request) { if (!finished) { queuedRequests.add(request); } }
/** * Simply queue the request, which will be processed in FIFO order. */
Simply queue the request, which will be processed in FIFO order
processRequest
{ "repo_name": "sagarc/zookeeperGla", "path": "src/java/main/org/apache/zookeeper/server/quorum/ObserverRequestProcessor.java", "license": "apache-2.0", "size": 4437 }
[ "org.apache.zookeeper.server.Request" ]
import org.apache.zookeeper.server.Request;
import org.apache.zookeeper.server.*;
[ "org.apache.zookeeper" ]
org.apache.zookeeper;
437,748
public Builder setHandler(RejectedExecutionHandler handler) { this.handler = handler; return this; }
Builder function(RejectedExecutionHandler handler) { this.handler = handler; return this; }
/** * Sets rejected execution handler * * @param handler rejected handler */
Sets rejected execution handler
setHandler
{ "repo_name": "GregoryHo/FastHook", "path": "fast-hook/src/main/java/com/ns/greg/library/fasthook/ThreadExecutorFactory.java", "license": "mit", "size": 8923 }
[ "java.util.concurrent.RejectedExecutionHandler" ]
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,453,638
static BaseLongColumnValueSelector makeColumnValueSelectorWithLongDefault( final ColumnSelectorFactory metricFactory, final ExprMacroTable macroTable, @Nullable final String fieldName, @Nullable final String fieldExpression, final long nullValue ) { if ((fieldName == null) == (fi...
static BaseLongColumnValueSelector makeColumnValueSelectorWithLongDefault( final ColumnSelectorFactory metricFactory, final ExprMacroTable macroTable, @Nullable final String fieldName, @Nullable final String fieldExpression, final long nullValue ) { if ((fieldName == null) == (fieldExpression == null)) { throw new Ille...
/** * Only one of fieldName and fieldExpression should be non-null */
Only one of fieldName and fieldExpression should be non-null
makeColumnValueSelectorWithLongDefault
{ "repo_name": "dkhwangbo/druid", "path": "processing/src/main/java/org/apache/druid/query/aggregation/AggregatorUtil.java", "license": "apache-2.0", "size": 12676 }
[ "javax.annotation.Nullable", "org.apache.druid.math.expr.ExprMacroTable", "org.apache.druid.segment.BaseLongColumnValueSelector", "org.apache.druid.segment.ColumnSelectorFactory" ]
import javax.annotation.Nullable; import org.apache.druid.math.expr.ExprMacroTable; import org.apache.druid.segment.BaseLongColumnValueSelector; import org.apache.druid.segment.ColumnSelectorFactory;
import javax.annotation.*; import org.apache.druid.math.expr.*; import org.apache.druid.segment.*;
[ "javax.annotation", "org.apache.druid" ]
javax.annotation; org.apache.druid;
2,190,261
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<QuotaInner> listAsync(String location, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<QuotaInner> function(String location, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); }
/** * This method returns region-specific quotas and resource usage information for the Database Migration Service. * * @param location The Azure region of the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail ...
This method returns region-specific quotas and resource usage information for the Database Migration Service
listAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/UsagesClientImpl.java", "license": "mit", "size": 14350 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.core.util.Context", "com.azure.resourcemanager.datamigration.fluent.models.QuotaInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.datamigration.fluent.models.QuotaInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.datamigration.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,754,449
public BigInteger toBigInteger() { return new BigInteger(1, bytes); }
BigInteger function() { return new BigInteger(1, bytes); }
/** * Returns the bytes interpreted as a positive integer. */
Returns the bytes interpreted as a positive integer
toBigInteger
{ "repo_name": "bitbandi/spreadcoinj", "path": "core/src/main/java/org/spreadcoinj/core/Sha256Hash.java", "license": "apache-2.0", "size": 4413 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
401,196
public static Element createMetricsNode(Element problem, Element domain){ //hold problem, domain and project theproblem = problem; thedomain = domain; theproject = domain.getDocument().getRootElement(); //METRICS PREPARATION //set metrics node Element metrics = new Ele...
static Element function(Element problem, Element domain){ theproblem = problem; thedomain = domain; theproject = domain.getDocument().getRootElement(); Element metrics = new Element(STR); List<Element> metricList = new ArrayList<Element>(); List domainMetrics = null; try { XPath path = new JDOMXPath(STR); domainMetrics...
/** * This method creates the metrics node for containing all metrics (together) from domain and problem * for filling the datasets * @param problem * @param domain */
This method creates the metrics node for containing all metrics (together) from domain and problem for filling the datasets
createMetricsNode
{ "repo_name": "javiercu/itsimple", "path": "src/planning/PlanSimulator.java", "license": "gpl-3.0", "size": 179007 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.jaxen.JaxenException", "org.jaxen.XPath", "org.jaxen.jdom.JDOMXPath", "org.jdom.Element" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.jaxen.JaxenException; import org.jaxen.XPath; import org.jaxen.jdom.JDOMXPath; import org.jdom.Element;
import java.util.*; import org.jaxen.*; import org.jaxen.jdom.*; import org.jdom.*;
[ "java.util", "org.jaxen", "org.jaxen.jdom", "org.jdom" ]
java.util; org.jaxen; org.jaxen.jdom; org.jdom;
2,463,306
@Nullable Status get(NegativeCacheKey key);
Status get(NegativeCacheKey key);
/** * Retrieve an entry from negative cache. * * @param key cache key * @return cached {@link Status} or null if no cache entry found */
Retrieve an entry from negative cache
get
{ "repo_name": "sonatype/nexus-public", "path": "components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/cache/NegativeCacheFacet.java", "license": "epl-1.0", "size": 2131 }
[ "org.sonatype.nexus.repository.view.Status" ]
import org.sonatype.nexus.repository.view.Status;
import org.sonatype.nexus.repository.view.*;
[ "org.sonatype.nexus" ]
org.sonatype.nexus;
1,556,617
public static Matcher<? super TypeDescriptor> typeDescriptor(String name) { return new TypeDescriptorMatcher(name); }
static Matcher<? super TypeDescriptor> function(String name) { return new TypeDescriptorMatcher(name); }
/** * Return a {@link TypeDescriptorMatcher}. * * @param name * The expected full qualified types name. * @return The {@link TypeDescriptorMatcher}. */
Return a <code>TypeDescriptorMatcher</code>
typeDescriptor
{ "repo_name": "khmarbaise/jqassistant", "path": "plugin/java/src/test/java/com/buschmais/jqassistant/plugin/java/test/matcher/TypeDescriptorMatcher.java", "license": "gpl-3.0", "size": 1471 }
[ "com.buschmais.jqassistant.plugin.java.api.model.TypeDescriptor", "org.hamcrest.Matcher" ]
import com.buschmais.jqassistant.plugin.java.api.model.TypeDescriptor; import org.hamcrest.Matcher;
import com.buschmais.jqassistant.plugin.java.api.model.*; import org.hamcrest.*;
[ "com.buschmais.jqassistant", "org.hamcrest" ]
com.buschmais.jqassistant; org.hamcrest;
2,590,584
@NonNull Single<Boolean> delete(@NonNull final T id);
Single<Boolean> delete(@NonNull final T id);
/** * Takes an identifier to be deleted, and returns Single that emits when the operation has been * executed. * * @param id Id of the persisted item. * @return Single that emits true if value was deleted, and false otherwise. */
Takes an identifier to be deleted, and returns Single that emits when the operation has been executed
delete
{ "repo_name": "ulx/reark", "path": "reark/src/main/java/io/reark/reark/data/stores/interfaces/StoreCoreInterface.java", "license": "mit", "size": 5432 }
[ "android.support.annotation.NonNull", "io.reactivex.Single" ]
import android.support.annotation.NonNull; import io.reactivex.Single;
import android.support.annotation.*; import io.reactivex.*;
[ "android.support", "io.reactivex" ]
android.support; io.reactivex;
938,901
public void addToTrail(TrailElement element) { this.trail.push(element); }
void function(TrailElement element) { this.trail.push(element); }
/** * Add an object to the trail of this ChoicePoint. * @param element The TrailElement to be added to the trail. */
Add an object to the trail of this ChoicePoint
addToTrail
{ "repo_name": "wwu-pi/muggl", "path": "muggl-core/src/de/wwu/muggl/symbolic/searchAlgorithms/choice/array/ArrayInitializationChoicePoint.java", "license": "gpl-3.0", "size": 20303 }
[ "de.wwu.muggl.symbolic.searchAlgorithms.depthFirst.trailelements.TrailElement" ]
import de.wwu.muggl.symbolic.searchAlgorithms.depthFirst.trailelements.TrailElement;
import de.wwu.muggl.symbolic.*;
[ "de.wwu.muggl" ]
de.wwu.muggl;
2,559,370
public Collection<Pin> get_component_pins(int p_component_no) { Collection<Pin> result = new LinkedList<Pin>(); Iterator<UndoableObjects.UndoableObjectNode> it = item_list.start_read_object(); for (;;) { Item curr_item = (Item) item_list.read_object(it); i...
Collection<Pin> function(int p_component_no) { Collection<Pin> result = new LinkedList<Pin>(); Iterator<UndoableObjects.UndoableObjectNode> it = item_list.start_read_object(); for (;;) { Item curr_item = (Item) item_list.read_object(it); if (curr_item == null) { break; } if (curr_item.get_component_no() == p_component_...
/** * Returns all pins with the input component number */
Returns all pins with the input component number
get_component_pins
{ "repo_name": "jslhs/freerouting-1", "path": "src/board/BasicBoard.java", "license": "gpl-3.0", "size": 54241 }
[ "java.util.Collection", "java.util.Iterator", "java.util.LinkedList" ]
import java.util.Collection; import java.util.Iterator; import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
1,249,044
void swap(INDArray x,INDArray y);
void swap(INDArray x,INDArray y);
/** * swaps a vector with another vector. * @param x * @param y */
swaps a vector with another vector
swap
{ "repo_name": "GeorgeMe/nd4j", "path": "nd4j-api/src/main/java/org/nd4j/linalg/api/blas/Level1.java", "license": "apache-2.0", "size": 6438 }
[ "org.nd4j.linalg.api.ndarray.INDArray" ]
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ndarray.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
2,388,766
private static String generateHashValue(final String password) throws NoSuchAlgorithmException, IOException{ MessageDigest md = MessageDigest.getInstance("SHA1"); ByteArrayInputStream fis = new ByteArrayInputStream(password.getBytes("UTF-8")); byte[] dataBytes = new byte[1024]; int nread = 0; ...
static String function(final String password) throws NoSuchAlgorithmException, IOException{ MessageDigest md = MessageDigest.getInstance("SHA1"); ByteArrayInputStream fis = new ByteArrayInputStream(password.getBytes("UTF-8")); byte[] dataBytes = new byte[1024]; int nread = 0; while ((nread = fis.read(dataBytes)) != -1)...
/** * Generates a hash value to store in the database. * @param password the password to convert * @return the converted String * @throws NoSuchAlgorithmException * @throws IOException */
Generates a hash value to store in the database
generateHashValue
{ "repo_name": "situx/MafiaManager", "path": "src/main/java/com/github/situx/lndwa/data/datamanagement/ManageUsers.java", "license": "gpl-3.0", "size": 4374 }
[ "java.io.ByteArrayInputStream", "java.io.IOException", "java.security.MessageDigest", "java.security.NoSuchAlgorithmException" ]
import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
import java.io.*; import java.security.*;
[ "java.io", "java.security" ]
java.io; java.security;
2,565,874
public Set<BuildingConnector> getBuildingConnections(Building building1, Building building2) { Set<BuildingConnector> result = ConcurrentHashMap.newKeySet(); Iterator<BuildingConnector> i = buildingConnections.iterator(); while (i.hasNext()) { BuildingConnector connector = i.next(); if ((buildin...
Set<BuildingConnector> function(Building building1, Building building2) { Set<BuildingConnector> result = ConcurrentHashMap.newKeySet(); Iterator<BuildingConnector> i = buildingConnections.iterator(); while (i.hasNext()) { BuildingConnector connector = i.next(); if ((building1.equals(connector.getBuilding1()) && buildi...
/** * Gets all of the building connections between two buildings. * * @param building1 the first building. * @param building2 the second building. * @return a set of building connectors. */
Gets all of the building connections between two buildings
getBuildingConnections
{ "repo_name": "mars-sim/mars-sim", "path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/structure/building/connection/BuildingConnectorManager.java", "license": "gpl-3.0", "size": 29609 }
[ "java.util.Iterator", "java.util.Set", "java.util.concurrent.ConcurrentHashMap", "org.mars_sim.msp.core.structure.building.Building" ]
import java.util.Iterator; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import org.mars_sim.msp.core.structure.building.Building;
import java.util.*; import java.util.concurrent.*; import org.mars_sim.msp.core.structure.building.*;
[ "java.util", "org.mars_sim.msp" ]
java.util; org.mars_sim.msp;
2,025,957
public Long bytesToLong(byte[] b) throws IOException;
Long function(byte[] b) throws IOException;
/** * Cast data from bytearray to long value. * @param b bytearray to be cast. * @return Long value. * @throws IOException if the value cannot be cast. */
Cast data from bytearray to long value
bytesToLong
{ "repo_name": "simplegeo/hadoop-pig", "path": "src/org/apache/pig/LoadCaster.java", "license": "apache-2.0", "size": 3902 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,748,892
public void setProperties(String prefix, Properties props) { setPropertyPrefix(prefix); prefix = PropUtils.getScopedPropertyPrefix(this); // Space-separated list of marker names for different // DTEDDirectoryHandlers Vector directoryHandlerList = PropUtils.parseSpacedMarker...
void function(String prefix, Properties props) { setPropertyPrefix(prefix); prefix = PropUtils.getScopedPropertyPrefix(this); Vector directoryHandlerList = PropUtils.parseSpacedMarkers(props.getProperty(prefix + DTEDDirectoryHandlerProperty)); for (Iterator it = directoryHandlerList.iterator(); it.hasNext();) { String ...
/** * PropertyConsumer method. */
PropertyConsumer method
setProperties
{ "repo_name": "d2fn/passage", "path": "src/main/java/com/bbn/openmap/dataAccess/dted/DTEDFrameCache.java", "license": "mit", "size": 24781 }
[ "com.bbn.openmap.util.PropUtils", "java.util.Iterator", "java.util.Properties", "java.util.Vector" ]
import com.bbn.openmap.util.PropUtils; import java.util.Iterator; import java.util.Properties; import java.util.Vector;
import com.bbn.openmap.util.*; import java.util.*;
[ "com.bbn.openmap", "java.util" ]
com.bbn.openmap; java.util;
2,824,004
public void initNativeCompositor(boolean lowMemDevice, WindowAndroid windowAndroid, LayerTitleCache layerTitleCache, TabContentManager tabContentManager) { mWindowAndroid = windowAndroid; mLayerTitleCache = layerTitleCache; mTabContentManager = tabContentManager; mNative...
void function(boolean lowMemDevice, WindowAndroid windowAndroid, LayerTitleCache layerTitleCache, TabContentManager tabContentManager) { mWindowAndroid = windowAndroid; mLayerTitleCache = layerTitleCache; mTabContentManager = tabContentManager; mNativeCompositorView = nativeInit(lowMemDevice, ApiCompatibilityUtils.getC...
/** * Initializes the {@link CompositorView}'s native parts (e.g. the rendering parts). * @param lowMemDevice If this is a low memory device. * @param windowAndroid A {@link WindowAndroid} instance. * @param layerTitleCache A {@link LayerTitleCache} instance. * @param tabCon...
Initializes the <code>CompositorView</code>'s native parts (e.g. the rendering parts)
initNativeCompositor
{ "repo_name": "Chilledheart/chromium", "path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorView.java", "license": "bsd-3-clause", "size": 21505 }
[ "android.graphics.Color", "android.view.View", "org.chromium.base.ApiCompatibilityUtils", "org.chromium.chrome.browser.compositor.layouts.content.TabContentManager", "org.chromium.ui.base.WindowAndroid" ]
import android.graphics.Color; import android.view.View; import org.chromium.base.ApiCompatibilityUtils; import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.ui.base.WindowAndroid;
import android.graphics.*; import android.view.*; import org.chromium.base.*; import org.chromium.chrome.browser.compositor.layouts.content.*; import org.chromium.ui.base.*;
[ "android.graphics", "android.view", "org.chromium.base", "org.chromium.chrome", "org.chromium.ui" ]
android.graphics; android.view; org.chromium.base; org.chromium.chrome; org.chromium.ui;
52,534
@Test public void asyncReturns_FormatsExceptionsInUnorderedList() { String docs = new DocumentationBuilder() .description("Some service docs") .param("paramOne", "param one docs") .returns("CompletableFuture of success") .asyncThrows("FooException", "Foo d...
void function() { String docs = new DocumentationBuilder() .description(STR) .param(STR, STR) .returns(STR) .asyncThrows(STR, STR) .asyncThrows(STR, STR) .build(); assertThat(docs).isEqualTo(toPlatformLfs(STR + "\n" + STR + STR + STR + STR + STR + STR + STR)); }
/** * For async methods that return a {@link java.util.concurrent.CompletableFuture} no exception is thrown from the method, * instead the future is completed exceptionally with the exception. As such we document this in the @returns section * of the Javadocs rather than having @throws for each exception...
For async methods that return a <code>java.util.concurrent.CompletableFuture</code> no exception is thrown from the method, instead the future is completed exceptionally with the exception. As such we document this in the @returns section of the Javadocs rather than having @throws for each exception
asyncReturns_FormatsExceptionsInUnorderedList
{ "repo_name": "aws/aws-sdk-java-v2", "path": "codegen/src/test/java/software/amazon/awssdk/codegen/model/intermediate/DocumentationBuilderTest.java", "license": "apache-2.0", "size": 5461 }
[ "org.assertj.core.api.Assertions", "software.amazon.awssdk.codegen.docs.DocumentationBuilder" ]
import org.assertj.core.api.Assertions; import software.amazon.awssdk.codegen.docs.DocumentationBuilder;
import org.assertj.core.api.*; import software.amazon.awssdk.codegen.docs.*;
[ "org.assertj.core", "software.amazon.awssdk" ]
org.assertj.core; software.amazon.awssdk;
2,361,715
public String fixQdoxAnnotationString(String value) { Pattern singleLineCommentPattern = Pattern.compile("\\/\\/[^\n\r]*[\n\r]", Pattern.MULTILINE); value = singleLineCommentPattern.matcher(value).replaceAll(""); Pattern multiLineCommentPattern2 = Pattern.compile(Regexes.JAVA_COMMENT_MULTILINE); value...
String function(String value) { Pattern singleLineCommentPattern = Pattern.compile(STR, Pattern.MULTILINE); value = singleLineCommentPattern.matcher(value).replaceAll(STRSTR[\\s\\[\"]", ""); }
/** * The qdox parser seems to choke on many simple annotations. The following hack attempts * to fix strings the qdox parser produces. This hack removes comments, extra whitespace * brackets and quotation marks that might be in the resulting string though they are not * supposed to be. */
The qdox parser seems to choke on many simple annotations. The following hack attempts to fix strings the qdox parser produces. This hack removes comments, extra whitespace brackets and quotation marks that might be in the resulting string though they are not supposed to be
fixQdoxAnnotationString
{ "repo_name": "NCIP/cagrid-grid-incubation", "path": "grid-incubation/incubator/projects/InterfacesExtension/projects/interfaces/src/interfaces/extension/edu/umn/msi/cagrid/introduce/interfaces/configuration/ConfigurationFactory.java", "license": "bsd-3-clause", "size": 12691 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,682,576
List<ConsumerVertexGroup> getConsumerVertexGroups();
List<ConsumerVertexGroup> getConsumerVertexGroups();
/** * Gets the {@link ConsumerVertexGroup}s. * * @return list of {@link ConsumerVertexGroup}s */
Gets the <code>ConsumerVertexGroup</code>s
getConsumerVertexGroups
{ "repo_name": "StephanEwen/incubator-flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/strategy/SchedulingResultPartition.java", "license": "apache-2.0", "size": 2142 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
360,394
private boolean isSendNotificationMessage(JCUser user) { return (sendingNotificationsEnabledProperty.booleanValue() && user.isSendPmNotification()); } /** * {@inheritDoc}
boolean function(JCUser user) { return (sendingNotificationsEnabledProperty.booleanValue() && user.isSendPmNotification()); } /** * {@inheritDoc}
/** * Check - sending notification is allow * * @param user User for which we check allow sending pm notification * @return flag with value (send or not) */
Check - sending notification is allow
isSendNotificationMessage
{ "repo_name": "Noctrunal/jcommune", "path": "jcommune-service/src/main/java/org/jtalks/jcommune/service/transactional/TransactionalPrivateMessageService.java", "license": "lgpl-2.1", "size": 12632 }
[ "org.jtalks.jcommune.model.entity.JCUser" ]
import org.jtalks.jcommune.model.entity.JCUser;
import org.jtalks.jcommune.model.entity.*;
[ "org.jtalks.jcommune" ]
org.jtalks.jcommune;
590,887
drive = new Drive(); intake = new Intake(); shooter = new Shooter(); aimShooter = new AimShooter(); vision = new Vision(); intakeRoller = new IntakeRoller(); oi = new OI(); // instantiate the command used for the autonomous period autonomousCommand = new Autonomous(); SmartDashboard.putData("Aim", n...
drive = new Drive(); intake = new Intake(); shooter = new Shooter(); aimShooter = new AimShooter(); vision = new Vision(); intakeRoller = new IntakeRoller(); oi = new OI(); autonomousCommand = new Autonomous(); SmartDashboard.putData("Aim", new Aim()); SmartDashboard.putData(STR, new RunRollerSystem()); }
/** * This function is run when the robot is first started up and should be used for any initialization code. */
This function is run when the robot is first started up and should be used for any initialization code
robotInit
{ "repo_name": "agardner15/frc-2016", "path": "src/org/usfirst/frc/team166/robot/Robot.java", "license": "mit", "size": 3180 }
[ "edu.wpi.first.wpilibj.smartdashboard.SmartDashboard", "org.usfirst.frc.team166.robot.commands.Autonomous", "org.usfirst.frc.team166.robot.commands.aimShooter.Aim", "org.usfirst.frc.team166.robot.commands.roller.RunRollerSystem", "org.usfirst.frc.team166.robot.subsystems.AimShooter", "org.usfirst.frc.team...
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import org.usfirst.frc.team166.robot.commands.Autonomous; import org.usfirst.frc.team166.robot.commands.aimShooter.Aim; import org.usfirst.frc.team166.robot.commands.roller.RunRollerSystem; import org.usfirst.frc.team166.robot.subsystems.AimShooter; import org...
import edu.wpi.first.wpilibj.smartdashboard.*; import org.usfirst.frc.team166.robot.commands.*; import org.usfirst.frc.team166.robot.commands.roller.*; import org.usfirst.frc.team166.robot.subsystems.*;
[ "edu.wpi.first", "org.usfirst.frc" ]
edu.wpi.first; org.usfirst.frc;
2,096,674
public ItemLabelPosition getNegativeItemLabelPosition(int row, int column); /** * Returns the item label position for negative values in ALL series. * * @return The item label position (possibly <code>null</code>). * * @see #setNegativeItemLabelPosition(ItemLabelPosition) * ...
ItemLabelPosition function(int row, int column); /** * Returns the item label position for negative values in ALL series. * * @return The item label position (possibly <code>null</code>). * * @see #setNegativeItemLabelPosition(ItemLabelPosition) * * @deprecated This method should no longer be used (as of version 1.0.6)...
/** * Returns the item label position for negative values. This method can be * overridden to provide customisation of the item label position for * individual data items. * * @param row the row index (zero-based). * @param column the column (zero-based). * * @return The it...
Returns the item label position for negative values. This method can be overridden to provide customisation of the item label position for individual data items
getNegativeItemLabelPosition
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/renderer/category/CategoryItemRenderer.java", "license": "mit", "size": 66885 }
[ "org.jfree.chart.labels.ItemLabelPosition" ]
import org.jfree.chart.labels.ItemLabelPosition;
import org.jfree.chart.labels.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,517,049
public void flush() throws IOException { Domain.debug("XServletOutputStreamFacade:flush()"); prStream.flush(); }
void function() throws IOException { Domain.debug(STR); prStream.flush(); }
/** Will send the buffer to the client. */
Will send the buffer to the client
flush
{ "repo_name": "integrated/jakarta-slide-server", "path": "src/webdav/server/org/apache/slide/webdav/logger/XServletOutputStreamFacade.java", "license": "apache-2.0", "size": 4779 }
[ "java.io.IOException", "org.apache.slide.common.Domain" ]
import java.io.IOException; import org.apache.slide.common.Domain;
import java.io.*; import org.apache.slide.common.*;
[ "java.io", "org.apache.slide" ]
java.io; org.apache.slide;
2,469,727
public void setFormattingPattern(String aFormattingPattern) { ArgumentNotValid.checkNotNull(aFormattingPattern, "String aFormattingPattern"); this.formattingPattern = aFormattingPattern; }
void function(String aFormattingPattern) { ArgumentNotValid.checkNotNull(aFormattingPattern, STR); this.formattingPattern = aFormattingPattern; }
/** * Set a formatting pattern for this extendefield. * @param aFormattingPattern a formatting pattern for this extendedfield */
Set a formatting pattern for this extendefield
setFormattingPattern
{ "repo_name": "netarchivesuite/netarchivesuite-svngit-migration", "path": "src/dk/netarkivet/harvester/datamodel/extendedfield/ExtendedField.java", "license": "lgpl-2.1", "size": 9673 }
[ "dk.netarkivet.common.exceptions.ArgumentNotValid" ]
import dk.netarkivet.common.exceptions.ArgumentNotValid;
import dk.netarkivet.common.exceptions.*;
[ "dk.netarkivet.common" ]
dk.netarkivet.common;
2,363,836
public static boolean checkIfExpressionContainsColumn(Expression expression) { if (expression instanceof ColumnExpression) { return true; } for (Expression child : expression.getChildren()) { if (checkIfExpressionContainsColumn(child)) { return true; } } return false; ...
static boolean function(Expression expression) { if (expression instanceof ColumnExpression) { return true; } for (Expression child : expression.getChildren()) { if (checkIfExpressionContainsColumn(child)) { return true; } } return false; }
/** * This method will check if a given expression contains a column expression * recursively. * * @return */
This method will check if a given expression contains a column expression recursively
checkIfExpressionContainsColumn
{ "repo_name": "aniketadnaik/carbondataStreamIngest", "path": "core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java", "license": "apache-2.0", "size": 69343 }
[ "org.apache.carbondata.core.scan.expression.ColumnExpression", "org.apache.carbondata.core.scan.expression.Expression" ]
import org.apache.carbondata.core.scan.expression.ColumnExpression; import org.apache.carbondata.core.scan.expression.Expression;
import org.apache.carbondata.core.scan.expression.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
975,770
public final Map<String, SQLFunction> getFunctions() { return sqlFunctions; } // native identifier generation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
final Map<String, SQLFunction> function() { return sqlFunctions; }
/** * Retrieves a map of the dialect's registered functions * (functionName => {@link org.hibernate.dialect.function.SQLFunction}). * * @return The map of registered functions. */
Retrieves a map of the dialect's registered functions (functionName => <code>org.hibernate.dialect.function.SQLFunction</code>)
getFunctions
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/hibernate-core/org/hibernate/dialect/Dialect.java", "license": "gpl-2.0", "size": 103612 }
[ "java.util.Map", "org.hibernate.dialect.function.SQLFunction" ]
import java.util.Map; import org.hibernate.dialect.function.SQLFunction;
import java.util.*; import org.hibernate.dialect.function.*;
[ "java.util", "org.hibernate.dialect" ]
java.util; org.hibernate.dialect;
1,698,592
if (this.resultCompatability == null) { return NullResultCompatibility.INSTANCE; } return this.resultCompatability; }
if (this.resultCompatability == null) { return NullResultCompatibility.INSTANCE; } return this.resultCompatability; }
/** * Get the <code>ResultCompatability</code> which this result is * using for comparing * * @return the compatability check, or NullResultCompatability */
Get the <code>ResultCompatability</code> which this result is using for comparing
getResultCompatability
{ "repo_name": "sanger-pathogens/GeneDB", "path": "ng/src/org/genedb/query/SimpleListResult.java", "license": "gpl-3.0", "size": 3109 }
[ "org.genedb.query.compatability.NullResultCompatibility" ]
import org.genedb.query.compatability.NullResultCompatibility;
import org.genedb.query.compatability.*;
[ "org.genedb.query" ]
org.genedb.query;
2,848,081
private AuditEventDetails setAuditEventDetails(Long id,String elementName,String previousValue,String currentValue) { AuditEventDetails auditEventDetails=new AuditEventDetails(); auditEventDetails.setId(id); auditEventDetails.setElementName(elementName); auditEventDetails.setPreviousValue(previousValue...
AuditEventDetails function(Long id,String elementName,String previousValue,String currentValue) { AuditEventDetails auditEventDetails=new AuditEventDetails(); auditEventDetails.setId(id); auditEventDetails.setElementName(elementName); auditEventDetails.setPreviousValue(previousValue); auditEventDetails.setCurrentValue(...
/** * This function sets the AuditEventDetails object's values * @param id * @param elementName * @param previousValue * @param currentValue * @return AuditEvenDetails */
This function sets the AuditEventDetails object's values
setAuditEventDetails
{ "repo_name": "NCIP/cab2b", "path": "software/dependencies/commonpackage/HEAD_TAG_10_Jan_2007_RELEASE_BRANCH_FOR_V11/src/edu/wustl/common/audit/AuditManager.java", "license": "bsd-3-clause", "size": 19569 }
[ "edu.wustl.common.domain.AuditEventDetails" ]
import edu.wustl.common.domain.AuditEventDetails;
import edu.wustl.common.domain.*;
[ "edu.wustl.common" ]
edu.wustl.common;
2,841,327
public StringOrRef getDescription();
StringOrRef function();
/** * Returns the description. * * @return the description, can be <code>null</code> */
Returns the description
getDescription
{ "repo_name": "deegree/deegree3", "path": "deegree-core/deegree-core-base/src/main/java/org/deegree/gml/dictionary/Definition.java", "license": "lgpl-2.1", "size": 2333 }
[ "org.deegree.commons.tom.ows.StringOrRef" ]
import org.deegree.commons.tom.ows.StringOrRef;
import org.deegree.commons.tom.ows.*;
[ "org.deegree.commons" ]
org.deegree.commons;
370,153
protected Connection createConnection() throws JMSException { return getConnectionFactory().createConnection(); }
Connection function() throws JMSException { return getConnectionFactory().createConnection(); }
/** * Create a JMS Connection via this template's ConnectionFactory. * <p>This implementation uses JMS 1.1 API. * @return the new JMS Connection * @throws javax.jms.JMSException if thrown by JMS API methods */
Create a JMS Connection via this template's ConnectionFactory. This implementation uses JMS 1.1 API
createConnection
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/jms/connection/JmsTransactionManager.java", "license": "unlicense", "size": 13241 }
[ "javax.jms.Connection", "javax.jms.JMSException" ]
import javax.jms.Connection; import javax.jms.JMSException;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
2,489,704
private SimpleNode createSimpleNode(String name) { SimpleNode simpleNode = new SimpleNode(name); int w = name.length() * 8; // an initial approximation of the width simpleNode.setSizeInLayout(Math.max(w, INITIAL_NODE_WIDTH), INITIAL_NODE_HEIGHT); return simpleNode; }
SimpleNode function(String name) { SimpleNode simpleNode = new SimpleNode(name); int w = name.length() * 8; simpleNode.setSizeInLayout(Math.max(w, INITIAL_NODE_WIDTH), INITIAL_NODE_HEIGHT); return simpleNode; }
/** * Creates a SimpleNode * @param name * @return SimpleNode */
Creates a SimpleNode
createSimpleNode
{ "repo_name": "uci-sdcl/lighthouse", "path": "deprecated/org.eclipse.zest.layouts/src/org/eclipse/zest/layouts/exampleUses/SimpleSWTExample.java", "license": "epl-1.0", "size": 26844 }
[ "org.eclipse.zest.layouts.exampleStructures.SimpleNode" ]
import org.eclipse.zest.layouts.exampleStructures.SimpleNode;
import org.eclipse.zest.layouts.*;
[ "org.eclipse.zest" ]
org.eclipse.zest;
2,390,345
private void updateAsyncEventQueue(ObjectName mbeanName) throws IOException { try { String memberName = mbeanName.getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_MEMBER); if (cluster.getMembersHMap().containsKey(memberName)) { Cluster.Member existingMember = cluster.getMembersHMap().get(memb...
void function(ObjectName mbeanName) throws IOException { try { String memberName = mbeanName.getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_MEMBER); if (cluster.getMembersHMap().containsKey(memberName)) { Cluster.Member existingMember = cluster.getMembersHMap().get(memberName); Cluster.AsyncEventQueue asyncQ = initAs...
/** * function used for getting list of Gateway Senders from mBean for giving member and update the * list of gateway senders for respective member object */
function used for getting list of Gateway Senders from mBean for giving member and update the list of gateway senders for respective member object
updateAsyncEventQueue
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/data/JMXDataUpdater.java", "license": "apache-2.0", "size": 80158 }
[ "java.io.IOException", "java.util.Iterator", "javax.management.AttributeNotFoundException", "javax.management.InstanceNotFoundException", "javax.management.IntrospectionException", "javax.management.MBeanException", "javax.management.ObjectName", "javax.management.ReflectionException" ]
import java.io.IOException; import java.util.Iterator; import javax.management.AttributeNotFoundException; import javax.management.InstanceNotFoundException; import javax.management.IntrospectionException; import javax.management.MBeanException; import javax.management.ObjectName; import javax.management.ReflectionExce...
import java.io.*; import java.util.*; import javax.management.*;
[ "java.io", "java.util", "javax.management" ]
java.io; java.util; javax.management;
1,280,619
@Nonnull @Override @SuppressWarnings("unchecked") public Iterator<V> iterator() { return (Iterator<V>) iterator(IndexedIterator.VALUE_FAILFAST); }
@SuppressWarnings(STR) Iterator<V> function() { return (Iterator<V>) iterator(IndexedIterator.VALUE_FAILFAST); }
/** * Returns an iterator over the elements in this set. */
Returns an iterator over the elements in this set
iterator
{ "repo_name": "Devexperts/QD", "path": "dxlib/src/main/java/com/devexperts/util/IndexedSet.java", "license": "mpl-2.0", "size": 55233 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
601,331
public PrimaryDisplay getPrimaryDisplay() { return primaryDisplay; }
PrimaryDisplay function() { return primaryDisplay; }
/** * Get the primary display device * * @return The primary display */
Get the primary display device
getPrimaryDisplay
{ "repo_name": "codesqueak/Nascom", "path": "src/main/java/com/codingrodent/emulator/emulator/SystemContext.java", "license": "mit", "size": 4837 }
[ "com.codingrodent.emulator.emulator.display.PrimaryDisplay" ]
import com.codingrodent.emulator.emulator.display.PrimaryDisplay;
import com.codingrodent.emulator.emulator.display.*;
[ "com.codingrodent.emulator" ]
com.codingrodent.emulator;
726,432
public synchronized void scheduleMaintenance() { // this code assumes that after this method is called // no more executors will be offered job except by // the pop() code. for (Entry<Executor, JobOffer> av : parked.entrySet()) { if (av.getValue().workUnit == null) { ...
synchronized void function() { for (Entry<Executor, JobOffer> av : parked.entrySet()) { if (av.getValue().workUnit == null) { av.getValue().event.signal(); return; } } }
/** * Checks the queue and runs anything that can be run. * * <p> * When conditions are changed, this method should be invoked. * <p> * This wakes up one {@link Executor} so that it will maintain a queue. */
Checks the queue and runs anything that can be run. When conditions are changed, this method should be invoked. This wakes up one <code>Executor</code> so that it will maintain a queue
scheduleMaintenance
{ "repo_name": "0814jimmy/jenkins", "path": "core/src/main/java/hudson/model/Queue.java", "license": "mit", "size": 65554 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
30,152
public void testSortByValueAscending() { DefaultKeyedValues data = new DefaultKeyedValues(); data.addValue("C", new Double(1.0)); data.addValue("B", null); data.addValue("D", new Double(3.0)); data.addValue("A", new Double(2.0)); data.sortByValues(SortOrder.ASCENDIN...
void function() { DefaultKeyedValues data = new DefaultKeyedValues(); data.addValue("C", new Double(1.0)); data.addValue("B", null); data.addValue("D", new Double(3.0)); data.addValue("A", new Double(2.0)); data.sortByValues(SortOrder.ASCENDING); assertEquals(data.getKey(0), "C"); assertEquals(data.getKey(1), "A"); ass...
/** * Tests sorting of data by value (ascending). */
Tests sorting of data by value (ascending)
testSortByValueAscending
{ "repo_name": "JSansalone/JFreeChart", "path": "tests/org/jfree/data/junit/DefaultKeyedValuesTests.java", "license": "lgpl-2.1", "size": 16825 }
[ "org.jfree.data.DefaultKeyedValues", "org.jfree.util.SortOrder" ]
import org.jfree.data.DefaultKeyedValues; import org.jfree.util.SortOrder;
import org.jfree.data.*; import org.jfree.util.*;
[ "org.jfree.data", "org.jfree.util" ]
org.jfree.data; org.jfree.util;
1,802,274
public Iterator allUsers() { return null; }
Iterator function() { return null; }
/** * Return an iterator over all Users associated with * this instance. * * @return Iterator an iterator over all users */
Return an iterator over all Users associated with this instance
allUsers
{ "repo_name": "xkollar/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/user/legacy/UserImpl.java", "license": "gpl-2.0", "size": 35872 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,610,485
@Override public boolean isMultipart() { return MimeTypes.MULTIPART.equals(request().contentType()); }
boolean function() { return MimeTypes.MULTIPART.equals(request().contentType()); }
/** * Check if request is of type multipart. Important when you want to process * uploads for instance. * <p> * Also check out: http://commons.apache.org/fileupload/streaming.html * * @return true if request is of type multipart. */
Check if request is of type multipart. Important when you want to process uploads for instance. Also check out: HREF
isMultipart
{ "repo_name": "evrignaud/wisdom", "path": "core/wisdom-netty-engine/src/main/java/org/wisdom/engine/wrapper/ContextFromNetty.java", "license": "apache-2.0", "size": 23543 }
[ "org.wisdom.api.http.MimeTypes" ]
import org.wisdom.api.http.MimeTypes;
import org.wisdom.api.http.*;
[ "org.wisdom.api" ]
org.wisdom.api;
293,489
// 5.4 pg 29 public boolean verifySignature( byte[] message, BigInteger r, BigInteger s) { BigInteger n = key.getParameters().getN(); BigInteger e = calculateE(n, message); // r in the range [1,n-1] if (r.compareTo(ONE) < 0 || r.compareTo(n) >...
boolean function( byte[] message, BigInteger r, BigInteger s) { BigInteger n = key.getParameters().getN(); BigInteger e = calculateE(n, message); if (r.compareTo(ONE) < 0 r.compareTo(n) >= 0) { return false; } if (s.compareTo(ONE) < 0 s.compareTo(n) >= 0) { return false; } BigInteger c = s.modInverse(n); BigInteger u1 ...
/** * return true if the value r and s represent a DSA signature for * the passed in message (for standard DSA the message should be * a SHA-1 hash of the real message to be verified). */
return true if the value r and s represent a DSA signature for the passed in message (for standard DSA the message should be a SHA-1 hash of the real message to be verified)
verifySignature
{ "repo_name": "bullda/DroidText", "path": "src/bouncycastle/repack/org/bouncycastle/crypto/signers/ECDSASigner.java", "license": "lgpl-3.0", "size": 4539 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
379,868
public void setSeriesOutlineStroke(Stroke stroke) { this.seriesOutlineStroke = stroke; notifyListeners(new PlotChangeEvent(this)); }
void function(Stroke stroke) { this.seriesOutlineStroke = stroke; notifyListeners(new PlotChangeEvent(this)); }
/** * Sets the outline stroke for ALL series in the plot. If this is set to * </code> null</code>, then a list of paints is used instead (to allow * different colors to be used for each series). * * @param stroke the stroke (<code>null</code> permitted). */
Sets the outline stroke for ALL series in the plot. If this is set to </code> null</code>, then a list of paints is used instead (to allow different colors to be used for each series)
setSeriesOutlineStroke
{ "repo_name": "opensim-org/opensim-gui", "path": "Gui/opensim/jfreechart/src/org/jfree/chart/plot/SpiderWebPlot.java", "license": "apache-2.0", "size": 54845 }
[ "java.awt.Stroke", "org.jfree.chart.event.PlotChangeEvent" ]
import java.awt.Stroke; import org.jfree.chart.event.PlotChangeEvent;
import java.awt.*; import org.jfree.chart.event.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,659,852
void onFileDelete(final File file);
void onFileDelete(final File file);
/** * File deleted Event. * * @param file The file deleted */
File deleted Event
onFileDelete
{ "repo_name": "fesch/Moenagade", "path": "src/org/apache/commons/io/monitor/FileAlterationListener.java", "license": "gpl-3.0", "size": 2505 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,993,359
public JobQueueInfo[] getQueues() throws IOException { return jobSubmitClient.getQueues(); }
JobQueueInfo[] function() throws IOException { return jobSubmitClient.getQueues(); }
/** * Return an array of queue information objects about all the Job Queues * configured. * * @return Array of JobQueueInfo objects * @throws IOException */
Return an array of queue information objects about all the Job Queues configured
getQueues
{ "repo_name": "toddlipcon/hadoop", "path": "src/mapred/org/apache/hadoop/mapred/JobClient.java", "license": "apache-2.0", "size": 64290 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
464,373
public YAxis getAxisRight() { return mAxisRight; }
YAxis function() { return mAxisRight; }
/** * Returns the right y-axis object. In the horizontal bar-chart, this is the * bottom axis. * * @return */
Returns the right y-axis object. In the horizontal bar-chart, this is the bottom axis
getAxisRight
{ "repo_name": "wapalxj/Android_C2_UI", "path": "C2_UI_2/chart/src/main/java/com/github/mikephil/charting/charts/BarLineChartBase.java", "license": "apache-2.0", "size": 50353 }
[ "com.github.mikephil.charting.components.YAxis" ]
import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.components.*;
[ "com.github.mikephil" ]
com.github.mikephil;
2,691,400
private long nextAbsoluteSegmentIndex(long curIdx) throws IgniteCheckedException { synchronized (this) { if (cleanErr != null) throw cleanErr; assert curIdx == curAbsWalIdx; curAbsWalIdx++; // Notify archiver thre...
long function(long curIdx) throws IgniteCheckedException { synchronized (this) { if (cleanErr != null) throw cleanErr; assert curIdx == curAbsWalIdx; curAbsWalIdx++; notifyAll(); while (curAbsWalIdx - lastAbsArchivedIdx > dsCfg.getWalSegments() && cleanErr == null) { try { wait(); } catch (InterruptedException ignore) ...
/** * Gets the absolute index of the next WAL segment available to write. Blocks till there are available file to * write * * @param curIdx Current absolute index that we want to increment. * @return Next index (curWalSegmIdx+1) when it is ready to be written. * @th...
Gets the absolute index of the next WAL segment available to write. Blocks till there are available file to write
nextAbsoluteSegmentIndex
{ "repo_name": "vladisav/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java", "license": "apache-2.0", "size": 118308 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,464,599
public SaslPropertiesResolver getSaslPropsResolver() { return saslPropsResolver; }
SaslPropertiesResolver function() { return saslPropsResolver; }
/** * Returns the SaslPropertiesResolver configured for use with * DataTransferProtocol, or null if not configured. * * @return SaslPropertiesResolver configured for use with DataTransferProtocol */
Returns the SaslPropertiesResolver configured for use with DataTransferProtocol, or null if not configured
getSaslPropsResolver
{ "repo_name": "littlezhou/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DNConf.java", "license": "apache-2.0", "size": 17340 }
[ "org.apache.hadoop.security.SaslPropertiesResolver" ]
import org.apache.hadoop.security.SaslPropertiesResolver;
import org.apache.hadoop.security.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
982,241
@NonNull protected RequestCreator onPrepareRequestCreator(@NonNull Picasso loader) { final RequestCreator creator = loader.load(mTarget); if (mPlaceholderRes != NO_RESOURCE_ID) creator.error(mPlaceholderRes); if (mPlaceholder != null) creator.error(mPlaceholder); if (mErrorRes != NO_RESOURCE_ID) creator.pla...
RequestCreator function(@NonNull Picasso loader) { final RequestCreator creator = loader.load(mTarget); if (mPlaceholderRes != NO_RESOURCE_ID) creator.error(mPlaceholderRes); if (mPlaceholder != null) creator.error(mPlaceholder); if (mErrorRes != NO_RESOURCE_ID) creator.placeholder(mErrorRes); if (mError != null) creat...
/** * Prepares loading request creator with configuration based on this task's parameters. * * @param loader Loader used to obtain the creator. * @return Prepared image loading request creator to be executed. */
Prepares loading request creator with configuration based on this task's parameters
onPrepareRequestCreator
{ "repo_name": "android-libraries/android_image_loader", "path": "library/src/picasso/java/com/albedinsky/android/imageloader/ImageTask.java", "license": "apache-2.0", "size": 6968 }
[ "android.support.annotation.NonNull", "com.squareup.picasso.Picasso", "com.squareup.picasso.RequestCreator" ]
import android.support.annotation.NonNull; import com.squareup.picasso.Picasso; import com.squareup.picasso.RequestCreator;
import android.support.annotation.*; import com.squareup.picasso.*;
[ "android.support", "com.squareup.picasso" ]
android.support; com.squareup.picasso;
516,592
public int getBackOrderQuantity(String backOrderID) { int backOrderQuantity = -1; Util.debug("BackOrderMgr.getBackOrderQuantity() - Entered"); // BackOrderLocal backOrder = getBackOrderLocalHome().findByPrimaryKey(new BackOrderKey(backOrderID)); BackOrder backOrder = em.find(BackOrder.class, backOrderI...
int function(String backOrderID) { int backOrderQuantity = -1; Util.debug(STR); BackOrder backOrder = em.find(BackOrder.class, backOrderID); backOrderQuantity = backOrder.getQuantity(); return backOrderQuantity; }
/** * Method getBackOrderQuantity. * @param backOrderID * @return int */
Method getBackOrderQuantity
getBackOrderQuantity
{ "repo_name": "WASdev/sample.mono-to-ms.pbw-monolith", "path": "PlantsByWebSphere/src/main/java/com/ibm/websphere/samples/pbw/ejb/BackOrderMgr.java", "license": "apache-2.0", "size": 8514 }
[ "com.ibm.websphere.samples.pbw.jpa.BackOrder", "com.ibm.websphere.samples.pbw.utils.Util" ]
import com.ibm.websphere.samples.pbw.jpa.BackOrder; import com.ibm.websphere.samples.pbw.utils.Util;
import com.ibm.websphere.samples.pbw.jpa.*; import com.ibm.websphere.samples.pbw.utils.*;
[ "com.ibm.websphere" ]
com.ibm.websphere;
2,580,885
public static HashMap<String, SettingSection> readFile(final String fileName, SettingsActivityView view) { HashMap<String, SettingSection> sections = new SettingsSectionMap(); File ini = getSettingsFile(fileName); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(ini)); ...
static HashMap<String, SettingSection> function(final String fileName, SettingsActivityView view) { HashMap<String, SettingSection> sections = new SettingsSectionMap(); File ini = getSettingsFile(fileName); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(ini)); SettingSection current = nu...
/** * Reads a given .ini file from disk and returns it as a HashMap of SettingSections, themselves * effectively a HashMap of key/value settings. If unsuccessful, outputs an error telling why it * failed. * * @param fileName The name of the settings file without a path or extension. * @param view The cu...
Reads a given .ini file from disk and returns it as a HashMap of SettingSections, themselves effectively a HashMap of key/value settings. If unsuccessful, outputs an error telling why it failed
readFile
{ "repo_name": "delroth/dolphin", "path": "Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/SettingsFile.java", "license": "gpl-2.0", "size": 21925 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileNotFoundException", "java.io.FileReader", "java.io.IOException", "java.util.HashMap", "org.dolphinemu.dolphinemu.model.settings.Setting", "org.dolphinemu.dolphinemu.model.settings.SettingSection", "org.dolphinemu.dolphinemu.ui.settings.SettingsA...
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.HashMap; import org.dolphinemu.dolphinemu.model.settings.Setting; import org.dolphinemu.dolphinemu.model.settings.SettingSection; import org.dolphinemu.dolphi...
import java.io.*; import java.util.*; import org.dolphinemu.dolphinemu.model.settings.*; import org.dolphinemu.dolphinemu.ui.settings.*;
[ "java.io", "java.util", "org.dolphinemu.dolphinemu" ]
java.io; java.util; org.dolphinemu.dolphinemu;
580,493
protected void buildShape(BridgeContext ctx, Element e, ShapeNode shapeNode) { try { SVGOMLineElement le = (SVGOMLineElement) e; // 'x1' attribute - default is 0 float x1 = le.getX1().getAnimVal().getValue(); ...
void function(BridgeContext ctx, Element e, ShapeNode shapeNode) { try { SVGOMLineElement le = (SVGOMLineElement) e; float x1 = le.getX1().getAnimVal().getValue(); float y1 = le.getY1().getAnimVal().getValue(); float x2 = le.getX2().getAnimVal().getValue(); float y2 = le.getY2().getAnimVal().getValue(); shapeNode.setSh...
/** * Constructs a line according to the specified parameters. * * @param ctx the bridge context to use * @param e the element that describes a rect element * @param shapeNode the shape node to initialize */
Constructs a line according to the specified parameters
buildShape
{ "repo_name": "Uni-Sol/batik", "path": "sources/org/apache/batik/bridge/SVGLineElementBridge.java", "license": "apache-2.0", "size": 4336 }
[ "java.awt.geom.Line2D", "org.apache.batik.dom.svg.LiveAttributeException", "org.apache.batik.dom.svg.SVGOMLineElement", "org.apache.batik.gvt.ShapeNode", "org.w3c.dom.Element" ]
import java.awt.geom.Line2D; import org.apache.batik.dom.svg.LiveAttributeException; import org.apache.batik.dom.svg.SVGOMLineElement; import org.apache.batik.gvt.ShapeNode; import org.w3c.dom.Element;
import java.awt.geom.*; import org.apache.batik.dom.svg.*; import org.apache.batik.gvt.*; import org.w3c.dom.*;
[ "java.awt", "org.apache.batik", "org.w3c.dom" ]
java.awt; org.apache.batik; org.w3c.dom;
1,012,071
private YtbNodeInfo getParentYtbInfo() { YdtExtendedContext parentExtContext = extBuilder.getCurNode(); return (YtbNodeInfo) parentExtContext.getAppInfo(YTB); }
YtbNodeInfo function() { YdtExtendedContext parentExtContext = extBuilder.getCurNode(); return (YtbNodeInfo) parentExtContext.getAppInfo(YTB); }
/** * Returns the YTB info from the parent node, so that its own bounded * object can be taken out. * * @return parent node YTB node info */
Returns the YTB info from the parent node, so that its own bounded object can be taken out
getParentYtbInfo
{ "repo_name": "sdnwiselab/onos", "path": "apps/yms/app/src/main/java/org/onosproject/yms/app/ytb/YdtBuilderFromYo.java", "license": "apache-2.0", "size": 42648 }
[ "org.onosproject.yms.app.ydt.YdtExtendedContext" ]
import org.onosproject.yms.app.ydt.YdtExtendedContext;
import org.onosproject.yms.app.ydt.*;
[ "org.onosproject.yms" ]
org.onosproject.yms;
2,070,680
public Control cloneForSpatial(Spatial spatial) { ChaseCamera cc = new ChaseCamera(cam, spatial, inputManager); cc.setMaxDistance(getMaxDistance()); cc.setMinDistance(getMinDistance()); return cc; }
Control function(Spatial spatial) { ChaseCamera cc = new ChaseCamera(cam, spatial, inputManager); cc.setMaxDistance(getMaxDistance()); cc.setMinDistance(getMinDistance()); return cc; }
/** * clone this camera for a spatial * @param spatial * @return */
clone this camera for a spatial
cloneForSpatial
{ "repo_name": "chototsu/MikuMikuStudio", "path": "engine/src/core/com/jme3/input/ChaseCamera.java", "license": "bsd-2-clause", "size": 32647 }
[ "com.jme3.scene.Spatial", "com.jme3.scene.control.Control" ]
import com.jme3.scene.Spatial; import com.jme3.scene.control.Control;
import com.jme3.scene.*; import com.jme3.scene.control.*;
[ "com.jme3.scene" ]
com.jme3.scene;
2,621,191
protected void printElementWrapperTagStart( boolean isOnline, CmsObject cms, CmsContainerElementBean elementBean, boolean isGroupContainer) throws IOException, CmsException { if (!isOnline) { pageContext.getOut().print(getElementWrapperTagStart(cms, elementBean, ...
void function( boolean isOnline, CmsObject cms, CmsContainerElementBean elementBean, boolean isGroupContainer) throws IOException, CmsException { if (!isOnline) { pageContext.getOut().print(getElementWrapperTagStart(cms, elementBean, isGroupContainer)); } }
/** * Prints the opening element wrapper tag for the container page editor if we are in Offline mode.<p> * * @param isOnline true if we are in Online mode * @param cms the Cms context * @param elementBean the element bean * @param isGroupContainer true if the element is a group-contai...
Prints the opening element wrapper tag for the container page editor if we are in Offline mode
printElementWrapperTagStart
{ "repo_name": "serrapos/opencms-core", "path": "src/org/opencms/jsp/CmsJspTagContainer.java", "license": "lgpl-2.1", "size": 39314 }
[ "java.io.IOException", "org.opencms.file.CmsObject", "org.opencms.main.CmsException", "org.opencms.xml.containerpage.CmsContainerElementBean" ]
import java.io.IOException; import org.opencms.file.CmsObject; import org.opencms.main.CmsException; import org.opencms.xml.containerpage.CmsContainerElementBean;
import java.io.*; import org.opencms.file.*; import org.opencms.main.*; import org.opencms.xml.containerpage.*;
[ "java.io", "org.opencms.file", "org.opencms.main", "org.opencms.xml" ]
java.io; org.opencms.file; org.opencms.main; org.opencms.xml;
654,443
public void setDollarAmount(KualiDecimal dollarAmount) { this.dollarAmount = dollarAmount; }
void function(KualiDecimal dollarAmount) { this.dollarAmount = dollarAmount; }
/** * Sets the dollarAmount attribute value. * * @param dollarAmount The dollarAmount to set. */
Sets the dollarAmount attribute value
setDollarAmount
{ "repo_name": "bhutchinson/kfs", "path": "kfs-core/src/main/java/org/kuali/kfs/gl/batch/service/impl/ColumnReconciliation.java", "license": "agpl-3.0", "size": 2412 }
[ "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.rice" ]
org.kuali.rice;
655,925
void setContent(RichStringViewRef value);
void setContent(RichStringViewRef value);
/** * Sets the value of the '{@link org.lunifera.doc.dsl.doccompiler.ViewRefStart#getContent <em>Content</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Content</em>' reference. * @see #getContent() * @generated */
Sets the value of the '<code>org.lunifera.doc.dsl.doccompiler.ViewRefStart#getContent Content</code>' reference.
setContent
{ "repo_name": "lunifera/lunifera-doc", "path": "org.lunifera.doc.dsl.semantic/src/org/lunifera/doc/dsl/doccompiler/ViewRefStart.java", "license": "epl-1.0", "size": 2531 }
[ "org.lunifera.doc.dsl.luniferadoc.richstring.RichStringViewRef" ]
import org.lunifera.doc.dsl.luniferadoc.richstring.RichStringViewRef;
import org.lunifera.doc.dsl.luniferadoc.richstring.*;
[ "org.lunifera.doc" ]
org.lunifera.doc;
2,652,866
public boolean classHasMethod(AnnotatedType<?> cl, AnnotatedMethod<?> method) { return AnnotatedTypeUtil.findMethod(cl, method) != null; }
boolean function(AnnotatedType<?> cl, AnnotatedMethod<?> method) { return AnnotatedTypeUtil.findMethod(cl, method) != null; }
/** * Tests is a method is declared in a class. */
Tests is a method is declared in a class
classHasMethod
{ "repo_name": "WelcomeHUME/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/ejb/cfg/EjbBean.java", "license": "gpl-2.0", "size": 47328 }
[ "com.caucho.config.reflect.AnnotatedTypeUtil", "javax.enterprise.inject.spi.AnnotatedMethod", "javax.enterprise.inject.spi.AnnotatedType" ]
import com.caucho.config.reflect.AnnotatedTypeUtil; import javax.enterprise.inject.spi.AnnotatedMethod; import javax.enterprise.inject.spi.AnnotatedType;
import com.caucho.config.reflect.*; import javax.enterprise.inject.spi.*;
[ "com.caucho.config", "javax.enterprise" ]
com.caucho.config; javax.enterprise;
1,407,735
public static Package createBroken( String archiveOsPath, Properties sourceProps, Map<String, String> addonProps, String error) { String nameId = getProperty(sourceProps, PkgProps.ADDON_NAME_ID, null); String nameDisp = getProperty(sourceProps, Pkg...
static Package function( String archiveOsPath, Properties sourceProps, Map<String, String> addonProps, String error) { String nameId = getProperty(sourceProps, PkgProps.ADDON_NAME_ID, null); String nameDisp = getProperty(sourceProps, PkgProps.ADDON_NAME_DISPLAY, null); if (nameDisp == null) { nameDisp = getProperty(sou...
/** * Creates a broken addon which we know failed to load properly. * * @param archiveOsPath The absolute OS path of the addon folder. * @param sourceProps The properties parsed from the addon's source.properties. Can be null. * @param addonProps The properties parsed from the addon manifest (N...
Creates a broken addon which we know failed to load properly
createBroken
{ "repo_name": "consulo/consulo-android", "path": "tools-base/sdklib/src/main/java/com/android/sdklib/internal/repository/packages/AddonPackage.java", "license": "apache-2.0", "size": 28251 }
[ "com.android.sdklib.AndroidVersion", "com.android.sdklib.repository.AddonManifestIniProps", "com.android.sdklib.repository.MajorRevision", "com.android.sdklib.repository.PkgProps", "com.android.sdklib.repository.descriptors.IPkgDesc", "com.android.sdklib.repository.descriptors.IdDisplay", "com.android.s...
import com.android.sdklib.AndroidVersion; import com.android.sdklib.repository.AddonManifestIniProps; import com.android.sdklib.repository.MajorRevision; import com.android.sdklib.repository.PkgProps; import com.android.sdklib.repository.descriptors.IPkgDesc; import com.android.sdklib.repository.descriptors.IdDisplay; ...
import com.android.sdklib.*; import com.android.sdklib.repository.*; import com.android.sdklib.repository.descriptors.*; import com.android.sdklib.repository.local.*; import java.util.*;
[ "com.android.sdklib", "java.util" ]
com.android.sdklib; java.util;
2,702,368
public static Time changeTimezone(MySQLConnection conn, Calendar sessionCalendar, Calendar targetCalendar, Time t, TimeZone fromTz, TimeZone toTz, boolean rollForward) { if ((conn != null)) { if (conn.getUseTimezone() && !conn.getNoTimezoneConversionForTimeType()) { // Convert the ...
static Time function(MySQLConnection conn, Calendar sessionCalendar, Calendar targetCalendar, Time t, TimeZone fromTz, TimeZone toTz, boolean rollForward) { if ((conn != null)) { if (conn.getUseTimezone() && !conn.getNoTimezoneConversionForTimeType()) { Calendar fromCal = Calendar.getInstance(fromTz); fromCal.setTime(t...
/** * Change the given times from one timezone to another * * @param conn * the current connection to the MySQL server * @param t * the times to change * @param fromTz * the timezone to change from * @param toTz * the timezone to change to * * @retur...
Change the given times from one timezone to another
changeTimezone
{ "repo_name": "vaisaghvt/gameAnalyzer", "path": "mysql-connector-java-5.1.22/src/com/mysql/jdbc/TimeUtil.java", "license": "mit", "size": 58799 }
[ "java.sql.Time", "java.util.Calendar", "java.util.TimeZone" ]
import java.sql.Time; import java.util.Calendar; import java.util.TimeZone;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
869,824
@Test public void testSumGroupedAggregation() throws Exception { String tablename=generateUniqueName(); String tenantId = getOrganizationId(); String query = "SELECT feature,sum(unique_users),sum(cpu_utilization),sum(transactions),sum(db_utilization),sum(response_time),count(1) c FROM "+...
void function() throws Exception { String tablename=generateUniqueName(); String tenantId = getOrganizationId(); String query = STR+tablename+STR; Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(getUrl(), props); try { initTableValues(tablename, tenantId, getSp...
/** * Test grouped aggregation query with a mix of aggregated data types * @throws Exception */
Test grouped aggregation query with a mix of aggregated data types
testSumGroupedAggregation
{ "repo_name": "shehzaadn/phoenix", "path": "phoenix-core/src/it/java/org/apache/phoenix/end2end/ProductMetricsIT.java", "license": "apache-2.0", "size": 76820 }
[ "java.math.BigDecimal", "java.sql.Connection", "java.sql.DriverManager", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.util.Properties", "org.apache.phoenix.util.PropertiesUtil", "org.junit.Assert" ]
import java.math.BigDecimal; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Properties; import org.apache.phoenix.util.PropertiesUtil; import org.junit.Assert;
import java.math.*; import java.sql.*; import java.util.*; import org.apache.phoenix.util.*; import org.junit.*;
[ "java.math", "java.sql", "java.util", "org.apache.phoenix", "org.junit" ]
java.math; java.sql; java.util; org.apache.phoenix; org.junit;
1,134,005
HostPoolManager hostPool = manager.getCapability(HostPoolManager.class); HostData host = hostPool.getHost(event.getHostId()); if (this.isStressed(host) && host.getCurrentStatus().getOutgoingMigrationCount() == 0) { // Perform VM Relocation process within the scope of the Rack. // If it fails, request...
HostPoolManager hostPool = manager.getCapability(HostPoolManager.class); HostData host = hostPool.getHost(event.getHostId()); if (this.isStressed(host) && host.getCurrentStatus().getOutgoingMigrationCount() == 0) { if (!this.performInternalVmRelocation(event.getHostId())) { simulation.getLogger().debug(String.format(ST...
/** * Performs a stress check on the Host indicated by the event. If the host is stressed * and has no pending outgoing migrations, a Relocation process is started. */
Performs a stress check on the Host indicated by the event. If the host is stressed and has no pending outgoing migrations, a Relocation process is started
execute
{ "repo_name": "digs-uwo/dcsim-projects", "path": "src/edu/uwo/csd/dcsim/projects/hierarchical/policies/RelocationPolicyLevel1.java", "license": "gpl-3.0", "size": 61150 }
[ "edu.uwo.csd.dcsim.management.HostData", "edu.uwo.csd.dcsim.management.capabilities.HostPoolManager", "edu.uwo.csd.dcsim.projects.hierarchical.capabilities.RackManager" ]
import edu.uwo.csd.dcsim.management.HostData; import edu.uwo.csd.dcsim.management.capabilities.HostPoolManager; import edu.uwo.csd.dcsim.projects.hierarchical.capabilities.RackManager;
import edu.uwo.csd.dcsim.management.*; import edu.uwo.csd.dcsim.management.capabilities.*; import edu.uwo.csd.dcsim.projects.hierarchical.capabilities.*;
[ "edu.uwo.csd" ]
edu.uwo.csd;
2,399,958
@Path("/") @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Response processAccountUpdate(final MultivaluedMap<String, String> formData) { if (auth == null) { return login(null); } auth.require(AccountRoles.MANAGE_ACCOUNT); String action = formD...
@Path("/") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) Response function(final MultivaluedMap<String, String> formData) { if (auth == null) { return login(null); } auth.require(AccountRoles.MANAGE_ACCOUNT); String action = formData.getFirst(STR); if (action != null && action.equals(STR)) { setReferrerOnPage(); ret...
/** * Update account information. * <p> * Form params: * <p> * firstName * lastName * email * * @param formData * @return */
Update account information. Form params: firstName lastName email
processAccountUpdate
{ "repo_name": "brat000012001/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/account/AccountFormService.java", "license": "apache-2.0", "size": 46144 }
[ "java.util.List", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.MultivaluedMap", "javax.ws.rs.core.Response", "org.keycloak.events.EventType", "org.keycloak.forms.account.AccountPages", "org.keycloak.models.AccountRoles", "org.keycloak.models.ModelDupl...
import java.util.List; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; import org.keycloak.events.EventType; import org.keycloak.forms.account.AccountPages; import org.keycloak.models.AccountRoles; import ...
import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.keycloak.events.*; import org.keycloak.forms.account.*; import org.keycloak.models.*; import org.keycloak.models.utils.*; import org.keycloak.services.messages.*; import org.keycloak.services.resources.*; import org.keycloak.services.valida...
[ "java.util", "javax.ws", "org.keycloak.events", "org.keycloak.forms", "org.keycloak.models", "org.keycloak.services", "org.keycloak.storage" ]
java.util; javax.ws; org.keycloak.events; org.keycloak.forms; org.keycloak.models; org.keycloak.services; org.keycloak.storage;
1,860,462
public void loadModule(ModuleReference mref) { ModuleDescriptor descriptor = mref.descriptor(); String mn = descriptor.name(); if (nameToModule.putIfAbsent(mn, mref) != null) { throw new InternalError(mn + " already defined to this loader"); } LoadedModule loaded...
void function(ModuleReference mref) { ModuleDescriptor descriptor = mref.descriptor(); String mn = descriptor.name(); if (nameToModule.putIfAbsent(mn, mref) != null) { throw new InternalError(mn + STR); } LoadedModule loadedModule = new LoadedModule(this, mref); for (String pn : descriptor.packages()) { LoadedModule ot...
/** * Register a module this class loader. This has the effect of making the * types in the module visible. */
Register a module this class loader. This has the effect of making the types in the module visible
loadModule
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/jdk/internal/loader/BuiltinClassLoader.java", "license": "apache-2.0", "size": 38210 }
[ "java.lang.module.ModuleDescriptor", "java.lang.module.ModuleReference" ]
import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleReference;
import java.lang.module.*;
[ "java.lang" ]
java.lang;
1,710,166
Optional<InternalGroup> get(AccountGroup.Id groupId);
Optional<InternalGroup> get(AccountGroup.Id groupId);
/** * Looks up an internal group by its ID. * * @param groupId the ID of the internal group * @return an {@code Optional} of the internal group, or an empty {@code Optional} if no internal * group with this ID exists on this server or an error occurred during lookup */
Looks up an internal group by its ID
get
{ "repo_name": "qtproject/qtqa-gerrit", "path": "java/com/google/gerrit/server/account/GroupCache.java", "license": "apache-2.0", "size": 3322 }
[ "com.google.gerrit.reviewdb.client.AccountGroup", "com.google.gerrit.server.group.InternalGroup", "java.util.Optional" ]
import com.google.gerrit.reviewdb.client.AccountGroup; import com.google.gerrit.server.group.InternalGroup; import java.util.Optional;
import com.google.gerrit.reviewdb.client.*; import com.google.gerrit.server.group.*; import java.util.*;
[ "com.google.gerrit", "java.util" ]
com.google.gerrit; java.util;
1,002,564
@SelectProvider(type=VerifyConstraintsSqlProvider.class, method="selectByExample") @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="PARENT_ID", property="parentId", jdbcType=JdbcType.BIGINT), @Result(column="NAME", property="name", jdbcTy...
@SelectProvider(type=VerifyConstraintsSqlProvider.class, method=STR) @Results({ @Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column=STR, property=STR, jdbcType=JdbcType.BIGINT), @Result(column="NAME", property="name", jdbcType=JdbcType.VARCHAR) }) List<VerifyConstraints> selectByExamp...
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table VERIFY_CONSTRAINTS * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table VERIFY_CONSTRAINTS
selectByExample
{ "repo_name": "agwlvssainokuni/springapp", "path": "foundation/src/test/java/cherry/foundation/db/gen/mapper/VerifyConstraintsMapper.java", "license": "apache-2.0", "size": 6025 }
[ "java.util.List", "org.apache.ibatis.annotations.Result", "org.apache.ibatis.annotations.Results", "org.apache.ibatis.annotations.SelectProvider", "org.apache.ibatis.type.JdbcType" ]
import java.util.List; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; import org.apache.ibatis.annotations.SelectProvider; import org.apache.ibatis.type.JdbcType;
import java.util.*; import org.apache.ibatis.annotations.*; import org.apache.ibatis.type.*;
[ "java.util", "org.apache.ibatis" ]
java.util; org.apache.ibatis;
2,268,671
@Nullable CharSequence[] getCharSequenceArray(@Nullable String key) { unparcel(); Object o = mMap.get(key); if (o == null) { return null; } try { return (CharSequence[]) o; } catch (ClassCastException e) { typeWarning(key, o, "C...
CharSequence[] getCharSequenceArray(@Nullable String key) { unparcel(); Object o = mMap.get(key); if (o == null) { return null; } try { return (CharSequence[]) o; } catch (ClassCastException e) { typeWarning(key, o, STR, e); return null; } }
/** * Returns the value associated with the given key, or null if * no mapping of the desired type exists for the given key or a null * value is explicitly associated with the key. * * @param key a String, or null * @return a CharSequence[] value, or null */
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key
getCharSequenceArray
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/os/BaseBundle.java", "license": "gpl-3.0", "size": 41590 }
[ "android.annotation.Nullable" ]
import android.annotation.Nullable;
import android.annotation.*;
[ "android.annotation" ]
android.annotation;
2,000,314
public void setup(SCB p) { WorldEditManager.p = p; org.bukkit.plugin.Plugin WE = WorldEditManager.p.getServer().getPluginManager().getPlugin("WorldEdit"); if (WE instanceof WorldEditPlugin) { WEP = (WorldEditPlugin) WE; } }
void function(SCB p) { WorldEditManager.p = p; org.bukkit.plugin.Plugin WE = WorldEditManager.p.getServer().getPluginManager().getPlugin(STR); if (WE instanceof WorldEditPlugin) { WEP = (WorldEditPlugin) WE; } }
/** * Sets up WorldEditManager Just pass it instance of SCB * * @param p SCB */
Sets up WorldEditManager Just pass it instance of SCB
setup
{ "repo_name": "Relicum/SuperSkyBros", "path": "src/main/java/com/relicum/scb/utils/WorldEditManager.java", "license": "gpl-3.0", "size": 1801 }
[ "com.sk89q.worldedit.bukkit.WorldEditPlugin" ]
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldedit.bukkit.*;
[ "com.sk89q.worldedit" ]
com.sk89q.worldedit;
895,420
this.searchResults = result; adapter.clear(); //ArrayAdapter.addAll() requires minsdk > 10 for(ItunesAdapter.Podcast p: result) { adapter.add(p); } adapter.notifyDataSetInvalidated(); } public ItunesSearchFragment() { // Required empty public c...
this.searchResults = result; adapter.clear(); for(ItunesAdapter.Podcast p: result) { adapter.add(p); } adapter.notifyDataSetInvalidated(); } public ItunesSearchFragment() { }
/** * Replace adapter data with provided search results from SearchTask. * @param result List of Podcast objects containing search results */
Replace adapter data with provided search results from SearchTask
updateData
{ "repo_name": "Woogis/SisatongPodcast", "path": "app/src/main/java/net/sisatong/podcast/fragment/ItunesSearchFragment.java", "license": "mit", "size": 7180 }
[ "net.sisatong.podcast.adapter.itunes.ItunesAdapter" ]
import net.sisatong.podcast.adapter.itunes.ItunesAdapter;
import net.sisatong.podcast.adapter.itunes.*;
[ "net.sisatong.podcast" ]
net.sisatong.podcast;
143,058
static void copyModuleMessagesIntoWebapp(Module mod, String realPath) { for (Entry<String, Properties> localeEntry : mod.getMessages().entrySet()) { if (log.isDebugEnabled()) { log.debug("Copying message property file: " + localeEntry.getKey()); } Properties props = localeEntry.getValue(); ...
static void copyModuleMessagesIntoWebapp(Module mod, String realPath) { for (Entry<String, Properties> localeEntry : mod.getMessages().entrySet()) { if (log.isDebugEnabled()) { log.debug(STR + localeEntry.getKey()); } Properties props = localeEntry.getValue(); if (!"true".equalsIgnoreCase(props .getProperty(ModuleConst...
/** * Method visibility is package-private for testing * * @param mod * @param realPath * @should prefix messages with module id * @should not prefix messages with module id if override setting is specified */
Method visibility is package-private for testing
copyModuleMessagesIntoWebapp
{ "repo_name": "pselle/openmrs-core", "path": "web/src/main/java/org/openmrs/module/web/WebModuleUtil.java", "license": "mpl-2.0", "size": 38092 }
[ "java.util.List", "java.util.Map", "java.util.Properties", "java.util.Vector", "org.openmrs.module.Module", "org.openmrs.module.ModuleConstants" ]
import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Vector; import org.openmrs.module.Module; import org.openmrs.module.ModuleConstants;
import java.util.*; import org.openmrs.module.*;
[ "java.util", "org.openmrs.module" ]
java.util; org.openmrs.module;
1,819,661
public ArrayList<String> getOriginalTypes(Card c) { ArrayList<String> returnList = new ArrayList<String>(); if (originalTypes.containsKey(c)) { returnList.addAll(originalTypes.get(c)); } return returnList; }
ArrayList<String> function(Card c) { ArrayList<String> returnList = new ArrayList<String>(); if (originalTypes.containsKey(c)) { returnList.addAll(originalTypes.get(c)); } return returnList; }
/** * <p>Getter for the field <code>originalTypes</code>.</p> * * @param c a {@link forge.Card} object. * @return a {@link java.util.ArrayList} object. */
Getter for the field <code>originalTypes</code>
getOriginalTypes
{ "repo_name": "xitongzou/cardforge", "path": "src/forge/StaticEffect.java", "license": "gpl-3.0", "size": 15888 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
276,466
@Override public void visit(Mapping m, int line, int col, int nextLine, int nextCol) throws IOException { if (previousLine != line) { previousColumn = 0; } if (line != nextLine || col != nextCol) { if (previousLine == line) { // not the first entry for the line ...
void function(Mapping m, int line, int col, int nextLine, int nextCol) throws IOException { if (previousLine != line) { previousColumn = 0; } if (line != nextLine col != nextCol) { if (previousLine == line) { out.append(','); } writeEntry(m, col); previousLine = line; previousColumn = col; } for (int i = line; i <= nex...
/** * As each segment is visited write out the appropriate line mapping. */
As each segment is visited write out the appropriate line mapping
visit
{ "repo_name": "jhiswin/idiil-closure-compiler", "path": "src/com/google/debugging/sourcemap/SourceMapGeneratorV3.java", "license": "apache-2.0", "size": 26431 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,457,226
public MoreLikeThisRequest searchSource(String searchSource) { this.searchSource = new BytesArray(searchSource); this.searchSourceUnsafe = false; return this; }
MoreLikeThisRequest function(String searchSource) { this.searchSource = new BytesArray(searchSource); this.searchSourceUnsafe = false; return this; }
/** * An optional search source request allowing to control the search request for the * more like this documents. */
An optional search source request allowing to control the search request for the more like this documents
searchSource
{ "repo_name": "zhaocloud/elasticsearch", "path": "src/main/java/org/elasticsearch/action/mlt/MoreLikeThisRequest.java", "license": "apache-2.0", "size": 21128 }
[ "org.elasticsearch.common.bytes.BytesArray" ]
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.common.bytes.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,147,359
public void setTemplateTypeNames(List<TemplateType> keys) { Preconditions.checkNotNull(keys); for (TemplateType key : keys) { templateTypes.put(key.getReferenceName(), key); } }
void function(List<TemplateType> keys) { Preconditions.checkNotNull(keys); for (TemplateType key : keys) { templateTypes.put(key.getReferenceName(), key); } }
/** * Sets the template type name. */
Sets the template type name
setTemplateTypeNames
{ "repo_name": "robbert/closure-compiler", "path": "src/com/google/javascript/rhino/jstype/JSTypeRegistry.java", "license": "apache-2.0", "size": 68593 }
[ "com.google.common.base.Preconditions", "java.util.List" ]
import com.google.common.base.Preconditions; import java.util.List;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
979,057
private InputStream getDirectoryListing(File f) { String fileList[] = f.list(); ByteArrayOutputStream bytes = new java.io.ByteArrayOutputStream(); PrintStream out = new PrintStream(bytes); out.print("<title>Directory Listing</title>\n"); out.print("<base href=\"file:"); out.print(f.getPath().replace('\\'...
InputStream function(File f) { String fileList[] = f.list(); ByteArrayOutputStream bytes = new java.io.ByteArrayOutputStream(); PrintStream out = new PrintStream(bytes); out.print(STR); out.print(STRfile:STR/\"><h1>" + f.getPath() + STR); int i; for (i = 0; i < fileList.length; i++) { out.print(fileList[i] + STR); } ou...
/** * Returns the directory listing of the file component as an input stream. * * @return the input stream of the directory listing */
Returns the directory listing of the file component as an input stream
getDirectoryListing
{ "repo_name": "webos21/xi", "path": "java/jcl/src/java/org/apache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java", "license": "apache-2.0", "size": 5435 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.File", "java.io.InputStream", "java.io.PrintStream" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.InputStream; import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
398,530
public void checkAbandoned() { try { createPool().checkAbandoned(); }catch (SQLException x) { throw new RuntimeException(x); } }
void function() { try { createPool().checkAbandoned(); }catch (SQLException x) { throw new RuntimeException(x); } }
/** * Forces an abandon check on the connection pool. * If connections that have been abandoned exists, they will be closed during this run */
Forces an abandon check on the connection pool. If connections that have been abandoned exists, they will be closed during this run
checkAbandoned
{ "repo_name": "Nickname0806/Test_Q4", "path": "modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java", "license": "apache-2.0", "size": 34115 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,865,219
public static long getSecondFromCalendar(Calendar calendar) { int days = getDayFromCalendar(calendar); long result = (long) days * 86400; result += calendar.get(Calendar.HOUR_OF_DAY) * 60 * 60; result += calendar.get(Calendar.MINUTE) * 60; result += calendar.get(Calendar.SECO...
static long function(Calendar calendar) { int days = getDayFromCalendar(calendar); long result = (long) days * 86400; result += calendar.get(Calendar.HOUR_OF_DAY) * 60 * 60; result += calendar.get(Calendar.MINUTE) * 60; result += calendar.get(Calendar.SECOND); return result; }
/** * Converts the date and time as the number of elapsed seconds from {@code 0001/01/01 (YYYY/MM/DD) 00:00:00}. * @param calendar the target calendar object * @return the number of elapsed seconds (0-origin) * @since 0.2.2 */
Converts the date and time as the number of elapsed seconds from 0001/01/01 (YYYY/MM/DD) 00:00:00
getSecondFromCalendar
{ "repo_name": "asakusafw/asakusafw", "path": "core-project/asakusa-runtime/src/main/java/com/asakusafw/runtime/value/DateUtil.java", "license": "apache-2.0", "size": 20213 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
168,844
if(!tryConnect()) { System.err.println("[!] Server appears to be down. Please start the server before attacking!"); return; } Socket socket = null; try { socket = buildSocket(); OutputStream os = socket.getOutputStream(); int overhead = 7; if(PAYLOAD_SIZE > 0xFFFF) { overhead = 1...
if(!tryConnect()) { System.err.println(STR); return; } Socket socket = null; try { socket = buildSocket(); OutputStream os = socket.getOutputStream(); int overhead = 7; if(PAYLOAD_SIZE > 0xFFFF) { overhead = 13; } String requestHeader = REQUEST_START.replace(STR, String.valueOf(PAYLOAD_SIZE + overhead)); os.write(reque...
/** * Start attacking the app. Keep track of the rate of reading from the server * end, which can be used to detect memory exhaustion. * @throws IOException */
Start attacking the app. Keep track of the rate of reading from the server end, which can be used to detect memory exhaustion
runAttack
{ "repo_name": "Contrast-Security-OSS/jinfinity", "path": "src/main/java/com/contrastsecurity/jinfinity/demo/DemoClient.java", "license": "bsd-3-clause", "size": 2016 }
[ "com.contrastsecurity.jinfinity.JInfinity", "java.io.OutputStream", "java.net.Socket", "org.apache.commons.io.IOUtils" ]
import com.contrastsecurity.jinfinity.JInfinity; import java.io.OutputStream; import java.net.Socket; import org.apache.commons.io.IOUtils;
import com.contrastsecurity.jinfinity.*; import java.io.*; import java.net.*; import org.apache.commons.io.*;
[ "com.contrastsecurity.jinfinity", "java.io", "java.net", "org.apache.commons" ]
com.contrastsecurity.jinfinity; java.io; java.net; org.apache.commons;
2,041,041
public Object create() { ByteArrayOutputStream baos = new ByteArrayOutputStream(512); ByteArrayInputStream bais = null; try { ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(iPrototype); bais = new...
Object function() { ByteArrayOutputStream baos = new ByteArrayOutputStream(512); ByteArrayInputStream bais = null; try { ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(iPrototype); bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream in = new ObjectInputStream(bais); return in....
/** * Creates an object using serialization. * * @return the new object */
Creates an object using serialization
create
{ "repo_name": "leodmurillo/sonar", "path": "plugins/sonar-squid-java-plugin/test-resources/commons-collections-3.2.1/src/org/apache/commons/collections/functors/PrototypeFactory.java", "license": "lgpl-3.0", "size": 7590 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.ObjectInputStream", "java.io.ObjectOutputStream", "org.apache.commons.collections.FunctorException" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.apache.commons.collections.FunctorException;
import java.io.*; import org.apache.commons.collections.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,689,179
@Test public void testMake_in_empty_table_case() throws URISyntaxException { ChartPane.make( Paths.get(getClass().getClassLoader().getResource("chart").toURI()).toString(), ChartPane.Category.DIARY, "日記2017-01" ); }
void function() throws URISyntaxException { ChartPane.make( Paths.get(getClass().getClassLoader().getResource("chart").toURI()).toString(), ChartPane.Category.DIARY, STR ); }
/** * {@link ChartPane#make(java.lang.String, java.lang.String, java.lang.String)}'s test method. * @throws URISyntaxException */
<code>ChartPane#make(java.lang.String, java.lang.String, java.lang.String)</code>'s test method
testMake_in_empty_table_case
{ "repo_name": "toastkidjp/Yobidashi", "path": "src/test/java/jp/toastkid/chart/ChartPaneTest.java", "license": "epl-1.0", "size": 4406 }
[ "java.net.URISyntaxException", "java.nio.file.Paths", "jp.toastkid.chart.ChartPane" ]
import java.net.URISyntaxException; import java.nio.file.Paths; import jp.toastkid.chart.ChartPane;
import java.net.*; import java.nio.file.*; import jp.toastkid.chart.*;
[ "java.net", "java.nio", "jp.toastkid.chart" ]
java.net; java.nio; jp.toastkid.chart;
37,302
protected void dumpMethodBody(PrintStream out, Method meth, Map<TypeVariable<?>, Type> typeEnv) { Type returnType = meth.getGenericReturnType(); String typeName = returnType.toString(); if(typeName.equals("void")) return; indent(out); out.print("return "); dumpDefaultValue(out,returnType, typeEnv); out...
void function(PrintStream out, Method meth, Map<TypeVariable<?>, Type> typeEnv) { Type returnType = meth.getGenericReturnType(); String typeName = returnType.toString(); if(typeName.equals("void")) return; indent(out); out.print(STR); dumpDefaultValue(out,returnType, typeEnv); out.println(";"); }
/** * Dumps the result of a method. Relies on the default value. * @param out output stream * @param returnType type of the result for which a return is done. */
Dumps the result of a method. Relies on the default value
dumpMethodBody
{ "repo_name": "Orange-OpenSource/matos-profiles", "path": "matos-stub-generator/src/main/java/com/francetelecom/rd/stubs/engine/ClassDumper.java", "license": "apache-2.0", "size": 40390 }
[ "java.io.PrintStream", "java.lang.reflect.Method", "java.lang.reflect.Type", "java.lang.reflect.TypeVariable", "java.util.Map" ]
import java.io.PrintStream; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.Map;
import java.io.*; import java.lang.reflect.*; import java.util.*;
[ "java.io", "java.lang", "java.util" ]
java.io; java.lang; java.util;
1,438,919
@Message(id = 38019, value = "Unexpected exception composing inbound REST response") String unexpectedExceptionComposingRESTResponse();
@Message(id = 38019, value = STR) String unexpectedExceptionComposingRESTResponse();
/** * unexpectedExceptionComposingRESTResponse method definition. * @return String */
unexpectedExceptionComposingRESTResponse method definition
unexpectedExceptionComposingRESTResponse
{ "repo_name": "tadayosi/switchyard", "path": "components/resteasy/src/main/java/org/switchyard/component/resteasy/RestEasyMessages.java", "license": "apache-2.0", "size": 3828 }
[ "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
222,238
public static List<String> compileFiles(File root, List<File> installedFiles) throws Exception { final SarlBatchCompiler compiler = getSarlBatchCompiler(); final List<String> issues = new ArrayList<>(); compiler.setBasePath(root.getAbsolutePath()); compiler.setTempDirectory(getTempPath(root)); compiler.add...
static List<String> function(File root, List<File> installedFiles) throws Exception { final SarlBatchCompiler compiler = getSarlBatchCompiler(); final List<String> issues = new ArrayList<>(); compiler.setBasePath(root.getAbsolutePath()); compiler.setTempDirectory(getTempPath(root)); compiler.addSourcePath(getSourcePath...
/** Compile the given files with the given batch compiler. * * @param root the root folder of the project. * @param installedFiles the installed files. * @return the list of issues. * @throws Exception if compilation cannot be proceeded. */
Compile the given files with the given batch compiler
compileFiles
{ "repo_name": "sarl/sarl", "path": "contribs/io.sarl.examples/io.sarl.examples.tests/src/test/java/io/sarl/examples/tests/utils/ExamplesTestUtils.java", "license": "apache-2.0", "size": 22676 }
[ "io.sarl.lang.SARLVersion", "io.sarl.lang.compiler.batch.CleaningPolicy", "io.sarl.lang.compiler.batch.SarlBatchCompiler", "java.io.File", "java.util.ArrayList", "java.util.Collections", "java.util.List", "java.util.logging.Level", "java.util.logging.Logger", "org.eclipse.xtext.diagnostics.Severit...
import io.sarl.lang.SARLVersion; import io.sarl.lang.compiler.batch.CleaningPolicy; import io.sarl.lang.compiler.batch.SarlBatchCompiler; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import org.ecli...
import io.sarl.lang.*; import io.sarl.lang.compiler.batch.*; import java.io.*; import java.util.*; import java.util.logging.*; import org.eclipse.xtext.diagnostics.*; import org.eclipse.xtext.xbase.validation.*;
[ "io.sarl.lang", "java.io", "java.util", "org.eclipse.xtext" ]
io.sarl.lang; java.io; java.util; org.eclipse.xtext;
787,036
EClass getFAMTerminator();
EClass getFAMTerminator();
/** * Returns the meta object for class '{@link functionalarchitecture.FAMTerminator <em>FAM Terminator</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>FAM Terminator</em>'. * @see functionalarchitecture.FAMTerminator * @generated */
Returns the meta object for class '<code>functionalarchitecture.FAMTerminator FAM Terminator</code>'.
getFAMTerminator
{ "repo_name": "viatra/VIATRA-Generator", "path": "Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/src/functionalarchitecture/FunctionalarchitecturePackage.java", "license": "epl-1.0", "size": 32782 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,452,769
@Test(groups = {"ticket:2946", "broken"}) public void testDeleteImagePixelsFileOwnedByOtherRWR() throws Exception { // set up collaborative group and one user, "the owner" newUserAndGroup("rwr---"); Image img = makeImageWithPixelsFile(); Pixels pix = img.getPrimaryPixels(); ...
@Test(groups = {STR, STR}) void function() throws Exception { newUserAndGroup(STR); Image img = makeImageWithPixelsFile(); Pixels pix = img.getPrimaryPixels(); assertFileExists(pix.getId().getValue(), REF_PIXELS); newUserInGroup(); Delete2 dc = Requests.delete().target(img).build(); Delete2Response report = deleteWithR...
/** * Test to try to delete an image owned by another user in a collaborative * group i.e. RWR--- * * @throws Exception * Thrown if an error occurred. */
Test to try to delete an image owned by another user in a collaborative group i.e. RWR---
testDeleteImagePixelsFileOwnedByOtherRWR
{ "repo_name": "knabar/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/DeleteServiceFilesTest.java", "license": "gpl-2.0", "size": 39972 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
725,492
protected void cleanup(Context context ) throws IOException, InterruptedException { // NOTHING }
void function(Context context ) throws IOException, InterruptedException { }
/** * Called once at the end of the task. */
Called once at the end of the task
cleanup
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java", "license": "apache-2.0", "size": 6166 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,296,879
public Unit getExtraUnit() { return this.extraUnit; }
Unit function() { return this.extraUnit; }
/** * Get the extra <code>Unit</code>. * * @return The extra <code>Unit</code>, or null if none. */
Get the extra <code>Unit</code>
getExtraUnit
{ "repo_name": "edijman/SOEN_6431_Colonization_Game", "path": "src/net/sf/freecol/common/networking/DiplomacyMessage.java", "license": "gpl-2.0", "size": 15394 }
[ "net.sf.freecol.common.model.Unit" ]
import net.sf.freecol.common.model.Unit;
import net.sf.freecol.common.model.*;
[ "net.sf.freecol" ]
net.sf.freecol;
2,025,864
public static void resetKeywords( JSnippetFrame frame ) { JSnippet.KEYWORDS.delete(); JSnippet.copyText( "/res/keywords.txt", JSnippet.KEYWORDS ); JOptionPane.showMessageDialog( frame, "Keywords reset" ); }
static void function( JSnippetFrame frame ) { JSnippet.KEYWORDS.delete(); JSnippet.copyText( STR, JSnippet.KEYWORDS ); JOptionPane.showMessageDialog( frame, STR ); }
/** * Resets the default templates to the program's original. * * @param frame * The frame. */
Resets the default templates to the program's original
resetKeywords
{ "repo_name": "donofanne/jsnippet", "path": "src/com/github/obsidianarch/jsnippet/MenuItemActions.java", "license": "mit", "size": 5323 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
285,646
private static boolean maybeInitMetaDataFromHelpVar(Builder builder, @Nullable Node sibling) throws MalformedException { if ((sibling != null) && (sibling.isVar())) { Node nameNode = sibling.getFirstChild(); String name = nameNode.getString(); if (name.equals(builder.getKey() + DESC_SUFFIX...
static boolean function(Builder builder, @Nullable Node sibling) throws MalformedException { if ((sibling != null) && (sibling.isVar())) { Node nameNode = sibling.getFirstChild(); String name = nameNode.getString(); if (name.equals(builder.getKey() + DESC_SUFFIX)) { Node valueNode = nameNode.getFirstChild(); String des...
/** * Initializes the meta data in a JsMessage by examining a node just before or after a message VAR * node. * * @param builder the message builder whose meta data will be initialized * @param sibling a node adjacent to the message VAR node * @return true iff message has corresponding description var...
Initializes the meta data in a JsMessage by examining a node just before or after a message VAR node
maybeInitMetaDataFromHelpVar
{ "repo_name": "Yannic/closure-compiler", "path": "src/com/google/javascript/jscomp/JsMessageVisitor.java", "license": "apache-2.0", "size": 35142 }
[ "com.google.javascript.jscomp.JsMessage", "com.google.javascript.rhino.Node", "javax.annotation.Nullable" ]
import com.google.javascript.jscomp.JsMessage; import com.google.javascript.rhino.Node; import javax.annotation.Nullable;
import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import javax.annotation.*;
[ "com.google.javascript", "javax.annotation" ]
com.google.javascript; javax.annotation;
2,394,760
private View render(LayoutInflater inflater, Plot plot, Activity activity, ViewGroup parent, DisplayMode mode) { if (getCurrentUdfDefinitions(mode).isEmpty()) { // If there are no udfDefinitions, we shouldn't show the group at all return null; } final View groupContai...
View function(LayoutInflater inflater, Plot plot, Activity activity, ViewGroup parent, DisplayMode mode) { if (getCurrentUdfDefinitions(mode).isEmpty()) { return null; } final View groupContainer = inflater.inflate(R.layout.collection_udf_field_group, parent, false); final TextView groupLabel = (TextView) groupContaine...
/** * Handles the common functionality between rendering collection UDFs for edit and for display * Dispatches to helpers for those parts which are different based on DisplayMode */
Handles the common functionality between rendering collection UDFs for edit and for display Dispatches to helpers for those parts which are different based on DisplayMode
render
{ "repo_name": "maurizi/otm-android", "path": "OpenTreeMap/src/main/java/org/azavea/otm/fields/UDFCollectionFieldGroup.java", "license": "agpl-3.0", "size": 12137 }
[ "android.app.Activity", "android.view.LayoutInflater", "android.view.View", "android.view.ViewGroup", "android.widget.Button", "android.widget.LinearLayout", "android.widget.TextView", "java.util.Collection", "org.azavea.otm.data.Plot" ]
import android.app.Activity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; import java.util.Collection; import org.azavea.otm.data.Plot;
import android.app.*; import android.view.*; import android.widget.*; import java.util.*; import org.azavea.otm.data.*;
[ "android.app", "android.view", "android.widget", "java.util", "org.azavea.otm" ]
android.app; android.view; android.widget; java.util; org.azavea.otm;
694,812
default Instant currentInstant() { UnixTime ut = this.currentTime(); return Instant.ofEpochSecond(ut.getPosixTime() , ut.getNanosecond()) ; }
default Instant currentInstant() { UnixTime ut = this.currentTime(); return Instant.ofEpochSecond(ut.getPosixTime() , ut.getNanosecond()) ; }
/** * <p>Obtains the current instant. </p> * * @return current instant as JSR-310-type * @since 5.6 */
Obtains the current instant.
currentInstant
{ "repo_name": "MenoData/Time4J", "path": "base/src/main/java/net/time4j/base/TimeSource.java", "license": "lgpl-2.1", "size": 2323 }
[ "java.time.Instant" ]
import java.time.Instant;
import java.time.*;
[ "java.time" ]
java.time;
2,797,943
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "occiware/Multi-Cloud-Studio", "path": "plugins/org.eclipse.cmf.occi.multicloud.aws.ec2.edit/src-gen/org/eclipse/cmf/occi/multicloud/aws/ec2/provider/M2_4xlargeItemProvider.java", "license": "epl-1.0", "size": 7018 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
342,779
this.groupPermissionFormats.clear(); if (groupPermissionFormats != null) this.groupPermissionFormats.addAll(groupPermissionFormats); } /** * Set group permission format strings for assigned groups. * * @param assignedGroupPermissionFormats the group permission format strings...
this.groupPermissionFormats.clear(); if (groupPermissionFormats != null) this.groupPermissionFormats.addAll(groupPermissionFormats); } /** * Set group permission format strings for assigned groups. * * @param assignedGroupPermissionFormats the group permission format strings, * suitable for use with {@link String#forma...
/** * Set group permission format strings. * * @param groupPermissionFormats the group permission format strings, * suitable for use with {@link String#format(String, Object...)} */
Set group permission format strings
setGroupPermissionFormats
{ "repo_name": "MineYourMind/zPermissions", "path": "src/main/java/org/tyrannyofheaven/bukkit/zPermissions/PermissionsResolver.java", "license": "apache-2.0", "size": 20014 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,310,267
private long getAndIncrementCallCounts(Object identity) throws InterruptedException { // We will increment the count, or create it if no such count exists List<AtomicLong> count = this.callCounts.get(identity); if (count == null) { // Create the counts since no such count exists. // idx ...
long function(Object identity) throws InterruptedException { List<AtomicLong> count = this.callCounts.get(identity); if (count == null) { count = new ArrayList<AtomicLong>(2); count.add(new AtomicLong(0)); count.add(new AtomicLong(0)); List<AtomicLong> otherCount = callCounts.putIfAbsent(identity, count); if (otherCoun...
/** * Get the number of occurrences and increment atomically. * @param identity the identity of the user to increment * @return the value before incrementation */
Get the number of occurrences and increment atomically
getAndIncrementCallCounts
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java", "license": "apache-2.0", "size": 33358 }
[ "java.util.ArrayList", "java.util.List", "java.util.concurrent.atomic.AtomicLong" ]
import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicLong;
import java.util.*; import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
1,013,027
Results checkCardinality(final BpmnGraph target, final BpmnGraphNode candidate, final Operation operation);
Results checkCardinality(final BpmnGraph target, final BpmnGraphNode candidate, final Operation operation);
/** * Check whether adding the proposed Node to the target Process breaks any cardinality Rules * @param target Target process * @param candidate Candidate node * @param operation Is the candidate Node being added or removed * @return */
Check whether adding the proposed Node to the target Process breaks any cardinality Rules
checkCardinality
{ "repo_name": "karreiro/uberfire", "path": "uberfire-extensions/uberfire-wires/uberfire-wires-bpmn/uberfire-wires-bpmn-client/src/main/java/org/uberfire/ext/wires/bpmn/client/rules/RuleManager.java", "license": "apache-2.0", "size": 3522 }
[ "org.uberfire.ext.wires.bpmn.api.model.BpmnGraph", "org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode", "org.uberfire.ext.wires.bpmn.client.commands.Results" ]
import org.uberfire.ext.wires.bpmn.api.model.BpmnGraph; import org.uberfire.ext.wires.bpmn.api.model.BpmnGraphNode; import org.uberfire.ext.wires.bpmn.client.commands.Results;
import org.uberfire.ext.wires.bpmn.api.model.*; import org.uberfire.ext.wires.bpmn.client.commands.*;
[ "org.uberfire.ext" ]
org.uberfire.ext;
147,466