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
@Test public void testToString2() { final PhonemeList phonemes = example2.getPhonemes(); final String result = phonemes.toString(); assertNotNull(result); assertThat(result, is("b-a-l-i-n- -s-u-n- -o-v- -f-u-nd-i-n- -l-o-r-d- -o-v- -m-o-r-i-a")); }
void function() { final PhonemeList phonemes = example2.getPhonemes(); final String result = phonemes.toString(); assertNotNull(result); assertThat(result, is(STR)); }
/** * Test the <code>toString()</code> method. */
Test the <code>toString()</code> method
testToString2
{ "repo_name": "jmthompson2015/runetranscriber", "path": "core/src/test/java/org/runetranscriber/core/PhonemeListTest.java", "license": "mit", "size": 3884 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
1,167,136
public static Optional<String> resolvePassword(File privateKeyFile, BruteForceProcessor processor) { Objects.requireNonNull(processor); Optional<String> optionalPassword = Optional.empty(); try { boolean isPasswordProtected = PrivateKeyReader .isPrivateKeyPasswordProtected(privateKeyFile); if (...
static Optional<String> function(File privateKeyFile, BruteForceProcessor processor) { Objects.requireNonNull(processor); Optional<String> optionalPassword = Optional.empty(); try { boolean isPasswordProtected = PrivateKeyReader .isPrivateKeyPasswordProtected(privateKeyFile); if (!isPasswordProtected) { String attempt;...
/** * Resolve the password from the given private key file. If no password is set an empty Optional * will be returned. * * @param privateKeyFile * the private key file * @param processor * the processor * @return the optional */
Resolve the password from the given private key file. If no password is set an empty Optional will be returned
resolvePassword
{ "repo_name": "astrapi69/mystic-crypt", "path": "src/main/java/io/github/astrapi69/crypto/processor/bruteforce/PrivateKeyBruteForceProcessor.java", "license": "mit", "size": 2830 }
[ "io.github.astrapi69.crypto.key.reader.EncryptedPrivateKeyReader", "io.github.astrapi69.crypto.key.reader.PrivateKeyReader", "java.io.File", "java.io.IOException", "java.security.Security", "java.util.Objects", "java.util.Optional", "org.bouncycastle.jce.provider.BouncyCastleProvider" ]
import io.github.astrapi69.crypto.key.reader.EncryptedPrivateKeyReader; import io.github.astrapi69.crypto.key.reader.PrivateKeyReader; import java.io.File; import java.io.IOException; import java.security.Security; import java.util.Objects; import java.util.Optional; import org.bouncycastle.jce.provider.BouncyCastlePro...
import io.github.astrapi69.crypto.key.reader.*; import java.io.*; import java.security.*; import java.util.*; import org.bouncycastle.jce.provider.*;
[ "io.github.astrapi69", "java.io", "java.security", "java.util", "org.bouncycastle.jce" ]
io.github.astrapi69; java.io; java.security; java.util; org.bouncycastle.jce;
783,552
public List<Path> getSourcePaths() { return sourcePaths; }
List<Path> function() { return sourcePaths; }
/** * Getter for sourcePaths. * @return List of source-paths. */
Getter for sourcePaths
getSourcePaths
{ "repo_name": "gigaroby/hops", "path": "hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java", "license": "apache-2.0", "size": 17494 }
[ "java.util.List", "org.apache.hadoop.fs.Path" ]
import java.util.List; import org.apache.hadoop.fs.Path;
import java.util.*; import org.apache.hadoop.fs.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,822,411
public HistogramAggregationBuilder order(List<BucketOrder> orders) { if (orders == null) { throw new IllegalArgumentException("[orders] must not be null: [" + name + "]"); } // if the list only contains one order use that to avoid inconsistent xcontent order(orders.size()...
HistogramAggregationBuilder function(List<BucketOrder> orders) { if (orders == null) { throw new IllegalArgumentException(STR + name + "]"); } order(orders.size() > 1 ? BucketOrder.compound(orders) : orders.get(0)); return this; }
/** * Sets the order in which the buckets will be returned. A tie-breaker may be added to avoid non-deterministic * ordering. */
Sets the order in which the buckets will be returned. A tie-breaker may be added to avoid non-deterministic ordering
order
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/aggregations/bucket/histogram/HistogramAggregationBuilder.java", "license": "apache-2.0", "size": 16373 }
[ "java.util.List", "org.elasticsearch.search.aggregations.BucketOrder" ]
import java.util.List; import org.elasticsearch.search.aggregations.BucketOrder;
import java.util.*; import org.elasticsearch.search.aggregations.*;
[ "java.util", "org.elasticsearch.search" ]
java.util; org.elasticsearch.search;
2,611,810
public InstrumentedFilesProvider getInstrumentedFilesProvider(Iterable<Artifact> files, boolean withBaselineCoverage) { return cppConfiguration.isLipoContextCollector() ? InstrumentedFilesProviderImpl.EMPTY : InstrumentedFilesCollector.collect( ruleContext, CppRuleClasses.INSTRUM...
InstrumentedFilesProvider function(Iterable<Artifact> files, boolean withBaselineCoverage) { return cppConfiguration.isLipoContextCollector() ? InstrumentedFilesProviderImpl.EMPTY : InstrumentedFilesCollector.collect( ruleContext, CppRuleClasses.INSTRUMENTATION_SPEC, CC_METADATA_COLLECTOR, files, CppHelper.getGcovFiles...
/** * Provides support for instrumentation. */
Provides support for instrumentation
getInstrumentedFilesProvider
{ "repo_name": "kchodorow/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java", "license": "apache-2.0", "size": 26720 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.rules.test.InstrumentedFilesCollector", "com.google.devtools.build.lib.rules.test.InstrumentedFilesProvider", "com.google.devtools.build.lib.rules.test.InstrumentedFilesProviderImpl" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.rules.test.InstrumentedFilesCollector; import com.google.devtools.build.lib.rules.test.InstrumentedFilesProvider; import com.google.devtools.build.lib.rules.test.InstrumentedFilesProviderImpl;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.rules.test.*;
[ "com.google.devtools" ]
com.google.devtools;
2,184,059
@IntegerAttribute(attributeId = ServerConnectorFactoryConstants.ATTR_ACCEPT_QUEUE_SIZE, defaultValue = 0, priority = PriorityConstants.PRIORITY_05, label = "Accept queue size", description = "The accept queue size (also known as accept backlog).") public synchronized void setAcceptQueueSize(final int ac...
@IntegerAttribute(attributeId = ServerConnectorFactoryConstants.ATTR_ACCEPT_QUEUE_SIZE, defaultValue = 0, priority = PriorityConstants.PRIORITY_05, label = STR, description = STR) synchronized void function(final int acceptQueueSize) { this.acceptQueueSize = acceptQueueSize; }
/** * Setter that also updates the property on the connector without restarting it. */
Setter that also updates the property on the connector without restarting it
setAcceptQueueSize
{ "repo_name": "zsigmond-czine-everit/jetty-server-component-ecm", "path": "component/src/main/java/org/everit/jetty/server/component/ecm/internal/ServerConnectorFactoryComponent.java", "license": "apache-2.0", "size": 13242 }
[ "org.everit.jetty.server.component.ecm.PriorityConstants", "org.everit.jetty.server.component.ecm.ServerConnectorFactoryConstants", "org.everit.osgi.ecm.annotation.attribute.IntegerAttribute" ]
import org.everit.jetty.server.component.ecm.PriorityConstants; import org.everit.jetty.server.component.ecm.ServerConnectorFactoryConstants; import org.everit.osgi.ecm.annotation.attribute.IntegerAttribute;
import org.everit.jetty.server.component.ecm.*; import org.everit.osgi.ecm.annotation.attribute.*;
[ "org.everit.jetty", "org.everit.osgi" ]
org.everit.jetty; org.everit.osgi;
1,000,422
public Map<String, AbstractIndex> loadAndGetTaskIdToSegmentsMap( Map<String, List<TableBlockInfo>> segmentToTableBlocksInfos, AbsoluteTableIdentifier absoluteTableIdentifier) throws IndexBuilderException { // task id to segment map Map<String, AbstractIndex> taskIdToTableSegmentMap = new H...
Map<String, AbstractIndex> function( Map<String, List<TableBlockInfo>> segmentToTableBlocksInfos, AbsoluteTableIdentifier absoluteTableIdentifier) throws IndexBuilderException { Map<String, AbstractIndex> taskIdToTableSegmentMap = new HashMap<String, AbstractIndex>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE); addLoc...
/** * Below method will be used to load the segment of segments * One segment may have multiple task , so table segment will be loaded * based on task id and will return the map of taksId to table segment * map * * @param segmentToTableBlocksInfos segment id to block info * @param absoluteTableIde...
Below method will be used to load the segment of segments One segment may have multiple task , so table segment will be loaded based on task id and will return the map of taksId to table segment map
loadAndGetTaskIdToSegmentsMap
{ "repo_name": "foryou2030/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/carbon/datastore/SegmentTaskIndexStore.java", "license": "apache-2.0", "size": 13841 }
[ "java.util.HashMap", "java.util.Iterator", "java.util.List", "java.util.Map", "java.util.concurrent.ConcurrentHashMap", "org.apache.carbondata.core.carbon.AbsoluteTableIdentifier", "org.apache.carbondata.core.carbon.datastore.block.AbstractIndex", "org.apache.carbondata.core.carbon.datastore.block.Tab...
import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.carbondata.core.carbon.AbsoluteTableIdentifier; import org.apache.carbondata.core.carbon.datastore.block.AbstractIndex; import org.apache.carbondata.core.car...
import java.util.*; import java.util.concurrent.*; import org.apache.carbondata.core.carbon.*; import org.apache.carbondata.core.carbon.datastore.block.*; import org.apache.carbondata.core.carbon.datastore.exception.*; import org.apache.carbondata.core.constants.*; import org.apache.carbondata.core.util.*;
[ "java.util", "org.apache.carbondata" ]
java.util; org.apache.carbondata;
1,237,439
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "pedroben/ejerciciosServlets2013", "path": "src/main/java/net/daw/ejercicios2013/ejer04combosEncadenados.java", "license": "gpl-3.0", "size": 8062 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,253,249
@SuppressWarnings("unchecked") public CreateIndexRequest aliases(Map source) { try { XContentBuilder builder = XContentFactory.jsonBuilder(); builder.map(source); return aliases(builder.bytes()); } catch (IOException e) { throw new ElasticsearchGen...
@SuppressWarnings(STR) CreateIndexRequest function(Map source) { try { XContentBuilder builder = XContentFactory.jsonBuilder(); builder.map(source); return aliases(builder.bytes()); } catch (IOException e) { throw new ElasticsearchGenerationException(STR + source + "]", e); } }
/** * Sets the aliases that will be associated with the index when it gets created */
Sets the aliases that will be associated with the index when it gets created
aliases
{ "repo_name": "njlawton/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java", "license": "apache-2.0", "size": 19404 }
[ "java.io.IOException", "java.util.Map", "org.elasticsearch.ElasticsearchGenerationException", "org.elasticsearch.common.xcontent.XContentBuilder", "org.elasticsearch.common.xcontent.XContentFactory" ]
import java.io.IOException; import java.util.Map; import org.elasticsearch.ElasticsearchGenerationException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory;
import java.io.*; import java.util.*; import org.elasticsearch.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "java.util", "org.elasticsearch", "org.elasticsearch.common" ]
java.io; java.util; org.elasticsearch; org.elasticsearch.common;
1,891,606
public AffineTransform getTransform() { return mGraphics.getTransform(); }
AffineTransform function() { return mGraphics.getTransform(); }
/** * Returns the current Transform in the Graphics2D state. * @see #transform * @see #setTransform */
Returns the current Transform in the Graphics2D state
getTransform
{ "repo_name": "md-5/jdk10", "path": "src/java.desktop/share/classes/sun/print/PeekGraphics.java", "license": "gpl-2.0", "size": 71432 }
[ "java.awt.geom.AffineTransform" ]
import java.awt.geom.AffineTransform;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
823,512
public static boolean isParameterizedType(Type type) { return type instanceof ParameterizedType; }
static boolean function(Type type) { return type instanceof ParameterizedType; }
/** * Returns true if type is an instance of <code>ParameterizedType</code> * else otherwise. * * @param type type of the artifact * @return true if type is an instance of <code>ParameterizedType</code> */
Returns true if type is an instance of <code>ParameterizedType</code> else otherwise
isParameterizedType
{ "repo_name": "ullgren/camel", "path": "tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/generics/ClassUtil.java", "license": "apache-2.0", "size": 7199 }
[ "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type" ]
import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,528,009
public BusinessEntitySnapshotDAO getBusinessEntitySnapshotDao() { return getDao(BusinessEntitySnapshotDAO.class); }
BusinessEntitySnapshotDAO function() { return getDao(BusinessEntitySnapshotDAO.class); }
/** * Returns the singleton instance of {@link BusinessEntitySnapshotDAO}. * * @return */
Returns the singleton instance of <code>BusinessEntitySnapshotDAO</code>
getBusinessEntitySnapshotDao
{ "repo_name": "halober/ovirt-engine", "path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/DbFacade.java", "license": "apache-2.0", "size": 34736 }
[ "org.ovirt.engine.core.dao.BusinessEntitySnapshotDAO" ]
import org.ovirt.engine.core.dao.BusinessEntitySnapshotDAO;
import org.ovirt.engine.core.dao.*;
[ "org.ovirt.engine" ]
org.ovirt.engine;
2,509,172
public void testEquals2() { TimeSeries s1 = new TimeSeries("Series", null, null, Day.class); TimeSeries s2 = new TimeSeries("Series", null, null, Day.class); assertTrue(s1.equals(s2)); }
void function() { TimeSeries s1 = new TimeSeries(STR, null, null, Day.class); TimeSeries s2 = new TimeSeries(STR, null, null, Day.class); assertTrue(s1.equals(s2)); }
/** * Tests a specific bug report where null arguments in the constructor * cause the equals() method to fail. Fixed for 0.9.21. */
Tests a specific bug report where null arguments in the constructor cause the equals() method to fail. Fixed for 0.9.21
testEquals2
{ "repo_name": "apetresc/JFreeChart", "path": "src/test/java/org/jfree/data/time/junit/TimeSeriesTests.java", "license": "lgpl-2.1", "size": 28536 }
[ "org.jfree.data.time.Day", "org.jfree.data.time.TimeSeries" ]
import org.jfree.data.time.Day; import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.*;
[ "org.jfree.data" ]
org.jfree.data;
1,899,151
private void serverResetButton(){ setItem(17, new ItemStack(Material.REDSTONE_BLOCK), player -> { Bukkit.getPluginManager().callEvent(new ServerResetEvent(player, saveKingdoms, saveMembers)); display(); }, "&2Reset Server", "\n&6Current Settings:" + "\n&6Save Kingdoms: &7" + saveKingdoms + "\n...
void function(){ setItem(17, new ItemStack(Material.REDSTONE_BLOCK), player -> { Bukkit.getPluginManager().callEvent(new ServerResetEvent(player, saveKingdoms, saveMembers)); display(); }, STR, STR + STR + saveKingdoms + "\n"); slot++; }
/** * Server Reset Button */
Server Reset Button
serverResetButton
{ "repo_name": "M9GLiquid/Conquest", "path": "Conquest/src/main/java/eu/kingconquest/conquest/gui/ResetGUI.java", "license": "mit", "size": 3271 }
[ "eu.kingconquest.conquest.event.ServerResetEvent", "org.bukkit.Bukkit", "org.bukkit.Material", "org.bukkit.inventory.ItemStack" ]
import eu.kingconquest.conquest.event.ServerResetEvent; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.inventory.ItemStack;
import eu.kingconquest.conquest.event.*; import org.bukkit.*; import org.bukkit.inventory.*;
[ "eu.kingconquest.conquest", "org.bukkit", "org.bukkit.inventory" ]
eu.kingconquest.conquest; org.bukkit; org.bukkit.inventory;
830,812
public void disconnect() { Session.loggedUser = ""; Session.clientComm.disconnect(); }
void function() { Session.loggedUser = ""; Session.clientComm.disconnect(); }
/** * Send the disconnects order to the ClientComm. */
Send the disconnects order to the ClientComm
disconnect
{ "repo_name": "mmvpm-iscteiulpt/ES2-2017-METIPLA1-116-MiniTrader", "path": "src/main/java/mt/client/controller/Controller.java", "license": "gpl-2.0", "size": 5090 }
[ "mt.client.Session" ]
import mt.client.Session;
import mt.client.*;
[ "mt.client" ]
mt.client;
1,517,850
@Override protected File getRoot() { return Environment.getExternalStorageDirectory(); }
File function() { return Environment.getExternalStorageDirectory(); }
/** * Get the root path (lowest allowed). */
Get the root path (lowest allowed)
getRoot
{ "repo_name": "0359xiaodong/NoNonsense-FilePicker", "path": "library/src/main/java/com/nononsenseapps/filepicker/FilePickerFragment.java", "license": "gpl-2.0", "size": 6060 }
[ "android.os.Environment", "java.io.File" ]
import android.os.Environment; import java.io.File;
import android.os.*; import java.io.*;
[ "android.os", "java.io" ]
android.os; java.io;
1,551,439
public void setVideoSurfaceView(SurfaceView surfaceView) { setVideoSurfaceHolder(surfaceView == null ? null : surfaceView.getHolder()); }
void function(SurfaceView surfaceView) { setVideoSurfaceHolder(surfaceView == null ? null : surfaceView.getHolder()); }
/** * Sets the {@link SurfaceView} onto which video will be rendered. The player will track the * lifecycle of the surface automatically. * * @param surfaceView The surface view. */
Sets the <code>SurfaceView</code> onto which video will be rendered. The player will track the lifecycle of the surface automatically
setVideoSurfaceView
{ "repo_name": "sanjaysingh1990/radio", "path": "library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java", "license": "mit", "size": 26637 }
[ "android.view.SurfaceView" ]
import android.view.SurfaceView;
import android.view.*;
[ "android.view" ]
android.view;
154,794
@Test public void testCreate() throws SQLException { SpatialReferenceSystemUtils.testCreate(geoPackage); }
void function() throws SQLException { SpatialReferenceSystemUtils.testCreate(geoPackage); }
/** * Test creating * * @throws SQLException */
Test creating
testCreate
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/androidTest/java/mil/nga/geopackage/srs/SpatialReferenceSystemCreateTest.java", "license": "mit", "size": 1836 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
937,523
private String getPreferredRDFSLabel(ResourceObject resource, OntGenerationConfig config) throws RepositoryException { try { RDFSSchemaResource schemaResource = connection.findObject(RDFSSchemaResource.class, resource.getResource()); if(schemaResource != null) { CharS...
String function(ResourceObject resource, OntGenerationConfig config) throws RepositoryException { try { RDFSSchemaResource schemaResource = connection.findObject(RDFSSchemaResource.class, resource.getResource()); if(schemaResource != null) { CharSequence bestLabel = null; for (CharSequence label : schemaResource.getLab...
/** * Returns the RDFS label preferred by the given configuration. * @param resource The resource for which to get a label. * @param config The configuration object specifying the language preference. * @return Returns the RDFS label preferred or null if no label could be found. * @throws Repos...
Returns the RDFS label preferred by the given configuration
getPreferredRDFSLabel
{ "repo_name": "anno4j/anno4j", "path": "anno4j-core/src/main/java/com/github/anno4j/schema_parsing/naming/IdentifierBuilder.java", "license": "apache-2.0", "size": 20975 }
[ "com.github.anno4j.model.impl.ResourceObject", "com.github.anno4j.schema.model.rdfs.RDFSSchemaResource", "com.github.anno4j.schema_parsing.building.OntGenerationConfig", "org.openrdf.query.QueryEvaluationException", "org.openrdf.repository.RepositoryException" ]
import com.github.anno4j.model.impl.ResourceObject; import com.github.anno4j.schema.model.rdfs.RDFSSchemaResource; import com.github.anno4j.schema_parsing.building.OntGenerationConfig; import org.openrdf.query.QueryEvaluationException; import org.openrdf.repository.RepositoryException;
import com.github.anno4j.model.impl.*; import com.github.anno4j.schema.model.rdfs.*; import com.github.anno4j.schema_parsing.building.*; import org.openrdf.query.*; import org.openrdf.repository.*;
[ "com.github.anno4j", "org.openrdf.query", "org.openrdf.repository" ]
com.github.anno4j; org.openrdf.query; org.openrdf.repository;
857,237
@NotNull WSDLInput getInput();
@NotNull WSDLInput getInput();
/** * Gets the wsdl:input of this operation */
Gets the wsdl:input of this operation
getInput
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java", "license": "gpl-2.0", "size": 3698 }
[ "com.sun.istack.internal.NotNull" ]
import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.*;
[ "com.sun.istack" ]
com.sun.istack;
1,280,110
public void testSDOWithinDistanceNullParamsNotMatching() throws Exception { String sql = "select GID, GEOMETRY from SIMPLE_SPATIAL where " + "mdsys.sdo_within_distance(geometry, mdsys.sdo_geometry(3, " + "NULL, null, mdsys.sdo_elem_info_array(1,3,4), " + "mdsys.sdo_ordina...
void function() throws Exception { String sql = STR + STR + STR + STR + STR; SQLReader reader = new SQLReader(session, sql); populateTestGeometry(JGeometry.createCircle(10, 0, 0, 10, 0, -10, 0)); ReadAllQuery raq = new ReadAllQuery(SimpleSpatial.class); ExpressionBuilder eb = raq.getExpressionBuilder(); ExpressionBuild...
/** * SDO_WITHIN_DISTANCE with NULL params not matching existing */
SDO_WITHIN_DISTANCE with NULL params not matching existing
testSDOWithinDistanceNullParamsNotMatching
{ "repo_name": "gameduell/eclipselink.runtime", "path": "foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/spatial/jgeometry/Query_SpatialOp_ExpExp_Tests.java", "license": "epl-1.0", "size": 28034 }
[ "java.util.List", "oracle.spatial.geometry.JGeometry", "org.eclipse.persistence.expressions.Expression", "org.eclipse.persistence.expressions.ExpressionBuilder", "org.eclipse.persistence.expressions.spatial.SpatialExpressionFactory", "org.eclipse.persistence.expressions.spatial.SpatialParameters", "org....
import java.util.List; import oracle.spatial.geometry.JGeometry; import org.eclipse.persistence.expressions.Expression; import org.eclipse.persistence.expressions.ExpressionBuilder; import org.eclipse.persistence.expressions.spatial.SpatialExpressionFactory; import org.eclipse.persistence.expressions.spatial.SpatialPar...
import java.util.*; import oracle.spatial.geometry.*; import org.eclipse.persistence.expressions.*; import org.eclipse.persistence.expressions.spatial.*; import org.eclipse.persistence.queries.*; import org.eclipse.persistence.testing.models.spatial.jgeometry.*; import org.eclipse.persistence.testing.models.spatial.jge...
[ "java.util", "oracle.spatial.geometry", "org.eclipse.persistence" ]
java.util; oracle.spatial.geometry; org.eclipse.persistence;
34,536
public void initOAuthFile() throws IOException { oauth.init(); }
void function() throws IOException { oauth.init(); }
/** * Init oauth config file. * * @throws IOException */
Init oauth config file
initOAuthFile
{ "repo_name": "rockihack/Stud.IP-FileSync", "path": "src/de/uni/hannover/studip/sync/models/Config.java", "license": "gpl-3.0", "size": 6553 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
735,769
@Test void doGet() { StepVerifier.create(newControllerOneClient().getOks()) .assertNext(ok -> assertEquals("OK_0", ok.get("value"))) .assertNext(ok -> assertEquals("OK_1", ok.get("value"))) .assertNext(ok -> assertEquals("OK_2", ok.get("value"))) .expectNextCount(0) .veri...
void doGet() { StepVerifier.create(newControllerOneClient().getOks()) .assertNext(ok -> assertEquals("OK_0", ok.get("value"))) .assertNext(ok -> assertEquals("OK_1", ok.get("value"))) .assertNext(ok -> assertEquals("OK_2", ok.get("value"))) .expectNextCount(0) .verifyComplete(); }
/** * Do get. */
Do get
doGet
{ "repo_name": "bremersee/common", "path": "common-base-webflux/src/test/java/org/bremersee/web/reactive/function/client/proxy/WebClientProxyBuilderTest.java", "license": "apache-2.0", "size": 7150 }
[ "org.junit.jupiter.api.Assertions" ]
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
424,422
List<TOptionBean> loadActiveByListAndParentOrderedBySortorder(Integer listID, Integer parentID);
List<TOptionBean> loadActiveByListAndParentOrderedBySortorder(Integer listID, Integer parentID);
/** * Gets the active optionBean objects from the TOption table * by listID and parentID, ordered by sortorder field * Used when two or more lists might have the same parent * @param listID * @param parentID * @return */
Gets the active optionBean objects from the TOption table by listID and parentID, ordered by sortorder field Used when two or more lists might have the same parent
loadActiveByListAndParentOrderedBySortorder
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/dao/OptionDAO.java", "license": "gpl-3.0", "size": 6128 }
[ "com.aurel.track.beans.TOptionBean", "java.util.List" ]
import com.aurel.track.beans.TOptionBean; import java.util.List;
import com.aurel.track.beans.*; import java.util.*;
[ "com.aurel.track", "java.util" ]
com.aurel.track; java.util;
18,946
public boolean declareInternalPrefixes(Collection<String> individualIRIs, Collection<String> anonIndividualIRIs) { boolean containsPrefix=false; if (declarePrefixRaw("def:","internal:def#")) containsPrefix=true; if (declarePrefixRaw("defdata:","internal:defdata#")) ...
boolean function(Collection<String> individualIRIs, Collection<String> anonIndividualIRIs) { boolean containsPrefix=false; if (declarePrefixRaw("def:",STR)) containsPrefix=true; if (declarePrefixRaw(STR,STR)) containsPrefix=true; if (declarePrefixRaw("nnq:",STR)) containsPrefix=true; if (declarePrefixRaw("all:",STR)) c...
/** * Registers HermiT's internal prefixes with this object. * * @param individualIRIs the collection of IRIs used in individuals (used for registering nominal prefix names) * @return 'true' if this object already contained one of the internal prefix names */
Registers HermiT's internal prefixes with this object
declareInternalPrefixes
{ "repo_name": "wolpertinger-reasoner/Wolpertinger", "path": "wolpertinger-reasoner/src/main/java/org/semanticweb/wolpertinger/Prefixes.java", "license": "lgpl-3.0", "size": 14318 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
466,956
@Override @Generated(value = "com.sun.tools.xjc.Driver", date = "2014-09-19T03:10:02-06:00", comment = "JAXB RI v2.2.6") public String toString() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE); }
@Generated(value = STR, date = STR, comment = STR) String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE); }
/** * Generates a String representation of the contents of this type. * This is an extension method, produced by the 'ts' xjc plugin * */
Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin
toString
{ "repo_name": "angecab10/travelport-uapi-tutorial", "path": "src/com/travelport/schema/common_v29_0/DebitCard.java", "license": "gpl-3.0", "size": 4507 }
[ "javax.annotation.Generated", "org.apache.commons.lang.builder.ToStringBuilder", "org.apache.cxf.xjc.runtime.JAXBToStringStyle" ]
import javax.annotation.Generated; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle;
import javax.annotation.*; import org.apache.commons.lang.builder.*; import org.apache.cxf.xjc.runtime.*;
[ "javax.annotation", "org.apache.commons", "org.apache.cxf" ]
javax.annotation; org.apache.commons; org.apache.cxf;
976,656
private void removeNonBooleanAttributes(ExampleSet exampleSet) { // removing non boolean attributes Collection<Attribute> deleteAttributes = new ArrayList<Attribute>(); for (Attribute attribute : exampleSet.getAttributes()) { if (!attribute.isNominal() || (attribute.getMapping().size() != 2)) { del...
void function(ExampleSet exampleSet) { Collection<Attribute> deleteAttributes = new ArrayList<Attribute>(); for (Attribute attribute : exampleSet.getAttributes()) { if (!attribute.isNominal() (attribute.getMapping().size() != 2)) { deleteAttributes.add(attribute); } } for (Attribute attribute : deleteAttributes) { exam...
/** * Removes every non boolean attribute. * * @param exampleSet * exampleSet, which attributes are tested */
Removes every non boolean attribute
removeNonBooleanAttributes
{ "repo_name": "brtonnies/rapidminer-studio", "path": "src/main/java/com/rapidminer/operator/learner/associations/fpgrowth/FPGrowth.java", "license": "agpl-3.0", "size": 22997 }
[ "com.rapidminer.example.Attribute", "com.rapidminer.example.ExampleSet", "java.util.ArrayList", "java.util.Collection" ]
import com.rapidminer.example.Attribute; import com.rapidminer.example.ExampleSet; import java.util.ArrayList; import java.util.Collection;
import com.rapidminer.example.*; import java.util.*;
[ "com.rapidminer.example", "java.util" ]
com.rapidminer.example; java.util;
2,072,735
@Deprecated default boolean checkAndRowMutate(byte[] row, Filter filter, RowMutations mutations) throws IOException { return checkAndRowMutate(row, filter, TimeRange.allTime(), mutations); }
default boolean checkAndRowMutate(byte[] row, Filter filter, RowMutations mutations) throws IOException { return checkAndRowMutate(row, filter, TimeRange.allTime(), mutations); }
/** * Atomically checks if a row matches the filter and if it does, it performs the row mutations. * Use to do many mutations on a single row. Use checkAndMutate to do one checkAndMutate at a * time. * @param row to check * @param filter the filter * @param mutations data to put if check succeeds *...
Atomically checks if a row matches the filter and if it does, it performs the row mutations. Use to do many mutations on a single row. Use checkAndMutate to do one checkAndMutate at a time
checkAndRowMutate
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Region.java", "license": "apache-2.0", "size": 24974 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.RowMutations", "org.apache.hadoop.hbase.filter.Filter", "org.apache.hadoop.hbase.io.TimeRange" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.RowMutations; import org.apache.hadoop.hbase.filter.Filter; import org.apache.hadoop.hbase.io.TimeRange;
import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.filter.*; import org.apache.hadoop.hbase.io.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,163,210
NewRow convertRowData(Session session, RowData rowData);
NewRow convertRowData(Session session, RowData rowData);
/** * Converts a RowData to a NewRow. This conversion requires a RowDef, which the caller may not have, but which * implementers of this interface should. * @param rowData the row to convert * @return a NewRow representation of the RowData */
Converts a RowData to a NewRow. This conversion requires a RowDef, which the caller may not have, but which implementers of this interface should
convertRowData
{ "repo_name": "AydinSakar/sql-layer", "path": "src/main/java/com/foundationdb/server/api/DMLFunctions.java", "license": "agpl-3.0", "size": 12747 }
[ "com.foundationdb.server.api.dml.scan.NewRow", "com.foundationdb.server.rowdata.RowData", "com.foundationdb.server.service.session.Session" ]
import com.foundationdb.server.api.dml.scan.NewRow; import com.foundationdb.server.rowdata.RowData; import com.foundationdb.server.service.session.Session;
import com.foundationdb.server.api.dml.scan.*; import com.foundationdb.server.rowdata.*; import com.foundationdb.server.service.session.*;
[ "com.foundationdb.server" ]
com.foundationdb.server;
2,411,822
@Override public RepositoryEntry loadRepositoryEntry(final RepositoryEntry repositoryEntry) { return repositoryDao.loadRepositoryEntry(repositoryEntry); }
RepositoryEntry function(final RepositoryEntry repositoryEntry) { return repositoryDao.loadRepositoryEntry(repositoryEntry); }
/** * attach object to Hibernate session * * @param repositoryEntry * @return attached Hibernate object */
attach object to Hibernate session
loadRepositoryEntry
{ "repo_name": "huihoo/olat", "path": "OLAT-LMS/src/main/java/org/olat/lms/repository/RepositoryServiceImpl.java", "license": "apache-2.0", "size": 28528 }
[ "org.olat.data.repository.RepositoryEntry" ]
import org.olat.data.repository.RepositoryEntry;
import org.olat.data.repository.*;
[ "org.olat.data" ]
org.olat.data;
2,511,633
public HistogramDataset getHistogram() { return this.histogram; }
HistogramDataset function() { return this.histogram; }
/** * Getter for property histogram. * @return Value of property histogram. */
Getter for property histogram
getHistogram
{ "repo_name": "davetcc/groovychart", "path": "src/main/java/com/thecoderscorner/groovychart/dataset/series/xy/interval/HistogramDatasetBuilder.java", "license": "apache-2.0", "size": 2094 }
[ "org.jfree.data.statistics.HistogramDataset" ]
import org.jfree.data.statistics.HistogramDataset;
import org.jfree.data.statistics.*;
[ "org.jfree.data" ]
org.jfree.data;
1,384,522
public static float getWidth(Phrase phrase) { return getWidth(phrase, PdfWriter.RUN_DIRECTION_NO_BIDI, 0); }
static float function(Phrase phrase) { return getWidth(phrase, PdfWriter.RUN_DIRECTION_NO_BIDI, 0); }
/** * Gets the width that the line will occupy after writing. * Only the width of the first line is returned. * * @param phrase the <CODE>Phrase</CODE> containing the line * @return the width of the line */
Gets the width that the line will occupy after writing. Only the width of the first line is returned
getWidth
{ "repo_name": "shitalm/jsignpdf2", "path": "src/main/java/com/lowagie/text/pdf/ColumnText.java", "license": "gpl-2.0", "size": 60536 }
[ "com.lowagie.text.Phrase" ]
import com.lowagie.text.Phrase;
import com.lowagie.text.*;
[ "com.lowagie.text" ]
com.lowagie.text;
2,296,544
CategoryWrapper removeCategory(Long categoryId); /** * Retrieves all <b>LocationMasters</b> irrespective of any filters. * * @return a {@link java.util.List} of all * {@link org.codeavengers.common.dto.wrap.LocationWrapper}
CategoryWrapper removeCategory(Long categoryId); /** * Retrieves all <b>LocationMasters</b> irrespective of any filters. * * @return a {@link java.util.List} of all * {@link org.codeavengers.common.dto.wrap.LocationWrapper}
/** * This method deletes an existing <b>Category</b> from the database. * * @param categoryId * Category ID to be used for the removal * @return the deleted non-persitent instance of the Category * @author abhishek * @since 1.0 */
This method deletes an existing Category from the database
removeCategory
{ "repo_name": "aroychoudhury/codeavengers", "path": "src/main/java/org/codeavengers/main/service/MapDataService.java", "license": "apache-2.0", "size": 4175 }
[ "java.util.List", "org.codeavengers.common.dto.wrap.CategoryWrapper", "org.codeavengers.common.dto.wrap.LocationWrapper" ]
import java.util.List; import org.codeavengers.common.dto.wrap.CategoryWrapper; import org.codeavengers.common.dto.wrap.LocationWrapper;
import java.util.*; import org.codeavengers.common.dto.wrap.*;
[ "java.util", "org.codeavengers.common" ]
java.util; org.codeavengers.common;
2,890,386
protected void addValueXMLPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LocalEntry_valueXML_feature"), getString("_UI_PropertyDescriptor_d...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), EsbPackage.Literals.LOCAL_ENTRY__VALUE_XML, true, true, false, ItemPropertyDescriptor.GENERIC_VAL...
/** * This adds a property descriptor for the Value XML feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Value XML feature.
addValueXMLPropertyDescriptor
{ "repo_name": "susinda/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/LocalEntryItemProvider.java", "license": "apache-2.0", "size": 7579 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;
import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.gmf.esb.*;
[ "org.eclipse.emf", "org.wso2.developerstudio" ]
org.eclipse.emf; org.wso2.developerstudio;
2,888,839
private void processDemandActive(RdpPacket data) throws RdesktopException, IOException, CryptoException, OrderException { int type[] = new int[1]; this.rdp_shareid = data.getLittleEndian32(); this.sendConfirmActive(); this.sendSynchronize(); this.se...
void function(RdpPacket data) throws RdesktopException, IOException, CryptoException, OrderException { int type[] = new int[1]; this.rdp_shareid = data.getLittleEndian32(); this.sendConfirmActive(); this.sendSynchronize(); this.sendControl(RDP_CTL_COOPERATE); this.sendControl(RDP_CTL_REQUEST_CONTROL); this.recv(type); ...
/** * Process an activation demand from the server (received between licence * negotiation and 1st order) * * @param data Packet containing demand at current read position * @throws RdesktopException * @throws IOException * @throws CryptoException * @throws OrderException */
Process an activation demand from the server (received between licence negotiation and 1st order)
processDemandActive
{ "repo_name": "automenta/narchy", "path": "lab/lab_x/main/java/automenta/rdp/Rdp.java", "license": "agpl-3.0", "size": 55861 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,156,819
@Test public void testSerialization() throws IOException, ClassNotFoundException { LayeredBarRenderer r1 = new LayeredBarRenderer(); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(r1); ...
void function() throws IOException, ClassNotFoundException { LayeredBarRenderer r1 = new LayeredBarRenderer(); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(r1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream...
/** * Serialize an instance, restore it, and check for equality. */
Serialize an instance, restore it, and check for equality
testSerialization
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/test/java/org/jfree/chart/renderer/category/LayeredBarRendererTest.java", "license": "gpl-3.0", "size": 5079 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.ObjectInput", "java.io.ObjectInputStream", "java.io.ObjectOutput", "java.io.ObjectOutputStream", "org.junit.Assert" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
1,549,021
public void flush() throws IOException { writer.flush(); }
void function() throws IOException { writer.flush(); }
/** * Flushes the current file. * * @throws NullPointerException if not open * @throws IOException if an underlying IO operation failed */
Flushes the current file
flush
{ "repo_name": "dropbox/bazel", "path": "src/main/java/com/google/devtools/build/lib/util/SimpleLogHandler.java", "license": "apache-2.0", "size": 29540 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
213,792
public synchronized void stopEnumerating() { if (!_enumerating) { if (Log.isLoggable(Log.FAC_SEARCH, Level.INFO)) { Log.info(Log.FAC_SEARCH, "Enumerated name list: Not enumerating, so not canceling prefix."); } return; } _enumerator.cancelPrefix(_namePrefix); _enumerating = false; }
synchronized void function() { if (!_enumerating) { if (Log.isLoggable(Log.FAC_SEARCH, Level.INFO)) { Log.info(Log.FAC_SEARCH, STR); } return; } _enumerator.cancelPrefix(_namePrefix); _enumerating = false; }
/** * Cancels ongoing name enumeration. Previously-accumulated information about * children of this name are still stored and available for use. * * @return void * */
Cancels ongoing name enumeration. Previously-accumulated information about children of this name are still stored and available for use
stopEnumerating
{ "repo_name": "ryanrhymes/mobiccnx", "path": "javasrc/src/org/ccnx/ccn/profiles/nameenum/EnumeratedNameList.java", "license": "lgpl-2.1", "size": 29221 }
[ "java.util.logging.Level", "org.ccnx.ccn.impl.support.Log" ]
import java.util.logging.Level; import org.ccnx.ccn.impl.support.Log;
import java.util.logging.*; import org.ccnx.ccn.impl.support.*;
[ "java.util", "org.ccnx.ccn" ]
java.util; org.ccnx.ccn;
2,387,293
public void addTrendStrategyForOneTrendFollower(String secId, String traderId, int maShortTicks, int maLongTicks, int bcTicks, double capFactor, int volWindow, ...
void function(String secId, String traderId, int maShortTicks, int maLongTicks, int bcTicks, double capFactor, int volWindow, MultiplierTrend multiplier, PositionUpdateTrend positionUpdate, OrderOrPositionStrategyTrend orderOrPositionStrategy, VariabilityCapFactorTrend variabilityCapFactor, ShortSellingTrend shortSelli...
/** * Set up the trend follower '{@code traderId}' with a trend strategy. Call this method as * many times as there are trend strategies for this trend follower. * * @param secId the the security identifier * @param traderId the identifier for the trend follower * @param maShortTick...
Set up the trend follower 'traderId' with a trend strategy. Call this method as many times as there are trend strategies for this trend follower
addTrendStrategyForOneTrendFollower
{ "repo_name": "gitwitcho/var-agent-model", "path": "agentsimulator/src/info/financialecology/finance/abm/model/TrendValueLSAbmSimulator.java", "license": "apache-2.0", "size": 62442 }
[ "info.financialecology.finance.abm.model.agent.Trader", "info.financialecology.finance.abm.model.strategy.TrendMABCStrategy", "info.financialecology.finance.utilities.Assertion" ]
import info.financialecology.finance.abm.model.agent.Trader; import info.financialecology.finance.abm.model.strategy.TrendMABCStrategy; import info.financialecology.finance.utilities.Assertion;
import info.financialecology.finance.abm.model.agent.*; import info.financialecology.finance.abm.model.strategy.*; import info.financialecology.finance.utilities.*;
[ "info.financialecology.finance" ]
info.financialecology.finance;
2,819,174
public static File buildFile(URL url) throws URISyntaxException { return buildFile(url.getFile()); }
static File function(URL url) throws URISyntaxException { return buildFile(url.getFile()); }
/** * Build and return a file for the specified URL. * NB: There is a bug in jdk1.4.x the prevents us from getting * a resource that has spaces (or other special characters) in * its name.... (see Sun's Java bug 4466485) */
Build and return a file for the specified URL. a resource that has spaces (or other special characters) in its name.... (see Sun's Java bug 4466485)
buildFile
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "utils/eclipselink.utils.workbench/utility/source/org/eclipse/persistence/tools/workbench/utility/io/FileTools.java", "license": "epl-1.0", "size": 35877 }
[ "java.io.File", "java.net.URISyntaxException" ]
import java.io.File; import java.net.URISyntaxException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,491,939
@VisibleForTesting static String parseRgbArguments(CssFunctionNode function) throws NumberFormatException { CssFunctionArgumentsNode args = function.getArguments(); int numArgs = 0; StringBuilder hexValue = new StringBuilder("#"); for (CssValueNode rgbValue : args.getChildren()) { if (r...
static String parseRgbArguments(CssFunctionNode function) throws NumberFormatException { CssFunctionArgumentsNode args = function.getArguments(); int numArgs = 0; StringBuilder hexValue = new StringBuilder("#"); for (CssValueNode rgbValue : args.getChildren()) { if (rgbValue instanceof CssNumericNode) { numArgs++; CssN...
/** * Extract the rgb function arguments and convert them to a standard RGB * hex value. * @param function A function node. * @return The 6-digit hex value, including leading # sign. * @throws NumberFormatException when input is invalid. */
Extract the rgb function arguments and convert them to a standard RGB hex value
parseRgbArguments
{ "repo_name": "varshluck/closure-stylesheets", "path": "src/com/google/common/css/compiler/passes/ColorValueOptimizer.java", "license": "apache-2.0", "size": 6727 }
[ "com.google.common.css.compiler.ast.CssFunctionArgumentsNode", "com.google.common.css.compiler.ast.CssFunctionNode", "com.google.common.css.compiler.ast.CssLiteralNode", "com.google.common.css.compiler.ast.CssNumericNode", "com.google.common.css.compiler.ast.CssValueNode" ]
import com.google.common.css.compiler.ast.CssFunctionArgumentsNode; import com.google.common.css.compiler.ast.CssFunctionNode; import com.google.common.css.compiler.ast.CssLiteralNode; import com.google.common.css.compiler.ast.CssNumericNode; import com.google.common.css.compiler.ast.CssValueNode;
import com.google.common.css.compiler.ast.*;
[ "com.google.common" ]
com.google.common;
1,385,378
public static FunctionSignature namedOnly(int numMandatory, String... names) { return of(0, 0, numMandatory, false, false, names); } protected static class SignatureException extends Exception { @Nullable private final Parameter<?, ?> parameter; public SignatureException(String message, @Nul...
static FunctionSignature function(int numMandatory, String... names) { return of(0, 0, numMandatory, false, false, names); } protected static class SignatureException extends Exception { @Nullable private final Parameter<?, ?> parameter; public SignatureException(String message, @Nullable Parameter<?, ?> parameter) { s...
/** * Constructs a function signature from named-only argument names. * * @param numMandatory an int for the number of mandatory named-only parameters * @param names an Array of String for the named-only parameter names * @return a FunctionSignature */
Constructs a function signature from named-only argument names
namedOnly
{ "repo_name": "spxtr/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/FunctionSignature.java", "license": "apache-2.0", "size": 21514 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,690,565
@Path("test-nodes-available") @GET @NoCache public GlobalRequestResult testNodesAvailable() { auth.requireManage(); logger.debug("Test availability of cluster nodes"); adminEvent.operation(OperationType.ACTION).resourcePath(uriInfo).success(); return new ResourceAdminMana...
@Path(STR) GlobalRequestResult function() { auth.requireManage(); logger.debug(STR); adminEvent.operation(OperationType.ACTION).resourcePath(uriInfo).success(); return new ResourceAdminManager(session).testNodesAvailability(uriInfo.getRequestUri(), realm, client); }
/** * Test if registered cluster nodes are available * * Tests availability by sending 'ping' request to all cluster nodes. * * @return */
Test if registered cluster nodes are available Tests availability by sending 'ping' request to all cluster nodes
testNodesAvailable
{ "repo_name": "cfsnyder/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/ClientResource.java", "license": "apache-2.0", "size": 15844 }
[ "javax.ws.rs.Path", "org.keycloak.events.admin.OperationType", "org.keycloak.representations.adapters.action.GlobalRequestResult", "org.keycloak.services.managers.ResourceAdminManager" ]
import javax.ws.rs.Path; import org.keycloak.events.admin.OperationType; import org.keycloak.representations.adapters.action.GlobalRequestResult; import org.keycloak.services.managers.ResourceAdminManager;
import javax.ws.rs.*; import org.keycloak.events.admin.*; import org.keycloak.representations.adapters.action.*; import org.keycloak.services.managers.*;
[ "javax.ws", "org.keycloak.events", "org.keycloak.representations", "org.keycloak.services" ]
javax.ws; org.keycloak.events; org.keycloak.representations; org.keycloak.services;
1,443,634
public void router(String method, JSONArray arg);
void function(String method, JSONArray arg);
/** * The registered objects will receive the the name of * method called and arguments passed via this method. * The objects can then handle them appropriately. * * @param method the name of the method called from javascript * @param arg a JSONArray containing the arguments passed */
The registered objects will receive the the name of method called and arguments passed via this method. The objects can then handle them appropriately
router
{ "repo_name": "ignitesol/androidsockets", "path": "java/com/ignite/webview_communicator/Communicator.java", "license": "mit", "size": 644 }
[ "org.json.JSONArray" ]
import org.json.JSONArray;
import org.json.*;
[ "org.json" ]
org.json;
1,989,517
@Deprecated public boolean delete(String src) throws IOException { checkOpen(); return namenode.delete(src, true); }
boolean function(String src) throws IOException { checkOpen(); return namenode.delete(src, true); }
/** * Delete file or directory. * See {@link ClientProtocol#delete(String, boolean)}. */
Delete file or directory. See <code>ClientProtocol#delete(String, boolean)</code>
delete
{ "repo_name": "tomatoKiller/Hadoop_Source_Learn", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java", "license": "apache-2.0", "size": 95752 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,287,707
private static void warnUserPage(HttpServletResponse resp, String link, String user, ApplicationId id) throws IOException { //Set the cookie when we warn which overrides the query parameter //This is so that if a user passes in the approved query parameter without //having first visited this page t...
static void function(HttpServletResponse resp, String link, String user, ApplicationId id) throws IOException { resp.addCookie(makeCheckCookie(id, false)); resp.setContentType(MimeType.HTML); Page p = new Page(resp.getWriter()); p.html(). h1(STR).h3(). _(STR).a(link, "here"). _(STR, user). _(). _(); }
/** * Warn the user that the link may not be safe! * @param resp the http response * @param link the link to point to * @param user the user that owns the link. * @throws IOException on any error. */
Warn the user that the link may not be safe
warnUserPage
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java", "license": "apache-2.0", "size": 12848 }
[ "java.io.IOException", "javax.servlet.http.HttpServletResponse", "org.apache.hadoop.yarn.api.records.ApplicationId", "org.apache.hadoop.yarn.webapp.MimeType" ]
import java.io.IOException; import javax.servlet.http.HttpServletResponse; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.webapp.MimeType;
import java.io.*; import javax.servlet.http.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.webapp.*;
[ "java.io", "javax.servlet", "org.apache.hadoop" ]
java.io; javax.servlet; org.apache.hadoop;
1,524,333
protected final void notifyListChanged(){ if (mContentType != ContentType.LIST){ Log.e(TAG, "Can't update a list in a non listing adapter"); } else{ if (mListHolder == null){ Log.e(TAG, "Can't update a non-existing default list"); } ...
final void function(){ if (mContentType != ContentType.LIST){ Log.e(TAG, STR); } else{ if (mListHolder == null){ Log.e(TAG, STR); } else{ mListHolder.mList.requestLayout(); } } }
/** * Lets the adapter know that the default list holder's RecyclerView needs to change * bounds to accommodate item insertions or deletions. */
Lets the adapter know that the default list holder's RecyclerView needs to change bounds to accommodate item insertions or deletions
notifyListChanged
{ "repo_name": "tndatacommons/android-app", "path": "compass/src/main/java/org/tndata/android/compass/adapter/MaterialAdapter.java", "license": "mit", "size": 24288 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,237,285
private void addFoaf(Graph graph, Contact contact, Reference contactRef) { addFoaf(graph, (User) contact, contactRef); addFoafProperty(graph, contactRef, "nickname", contact.getNickname()); }
void function(Graph graph, Contact contact, Reference contactRef) { addFoaf(graph, (User) contact, contactRef); addFoafProperty(graph, contactRef, STR, contact.getNickname()); }
/** * Completes the given set of links with the links due to the contact. * * @param graph * The graph to complete. * @param contact * The contact. * @param contactRef * Its URI. */
Completes the given set of links with the links due to the contact
addFoaf
{ "repo_name": "theanuradha/debrief", "path": "org.mwc.asset.comms/docs/restlet_src/org.restlet.example/org/restlet/example/ext/rdf/foaf/resources/BaseResource.java", "license": "epl-1.0", "size": 7659 }
[ "org.restlet.data.Reference", "org.restlet.example.ext.rdf.foaf.objects.Contact", "org.restlet.example.ext.rdf.foaf.objects.User", "org.restlet.ext.rdf.Graph" ]
import org.restlet.data.Reference; import org.restlet.example.ext.rdf.foaf.objects.Contact; import org.restlet.example.ext.rdf.foaf.objects.User; import org.restlet.ext.rdf.Graph;
import org.restlet.data.*; import org.restlet.example.ext.rdf.foaf.objects.*; import org.restlet.ext.rdf.*;
[ "org.restlet.data", "org.restlet.example", "org.restlet.ext" ]
org.restlet.data; org.restlet.example; org.restlet.ext;
1,845,880
boolean deleteById(final Map<String, Value<?>> pIds);
boolean deleteById(final Map<String, Value<?>> pIds);
/** * Delete current record into database by provided ids ( MULTI Policy Only ) * * @param pIds * @return */
Delete current record into database by provided ids ( MULTI Policy Only )
deleteById
{ "repo_name": "silentbalanceyh/lyra", "path": "lyra-bus/db-star/src/main/java/com/lyra/db/sql/RecordWriter.java", "license": "gpl-3.0", "size": 1705 }
[ "com.lyra.meta.Value", "java.util.Map" ]
import com.lyra.meta.Value; import java.util.Map;
import com.lyra.meta.*; import java.util.*;
[ "com.lyra.meta", "java.util" ]
com.lyra.meta; java.util;
2,563,727
public void onItemsRemoved(@NonNull RecyclerView recyclerView, int positionStart, int itemCount) { } /** * Called when items have been changed in the adapter. * To receive payload, override {@link #onItemsUpdated(RecyclerView, int, int, Object)}
void function(@NonNull RecyclerView recyclerView, int positionStart, int itemCount) { } /** * Called when items have been changed in the adapter. * To receive payload, override {@link #onItemsUpdated(RecyclerView, int, int, Object)}
/** * Called when items have been removed from the adapter. * * @param recyclerView * @param positionStart * @param itemCount */
Called when items have been removed from the adapter
onItemsRemoved
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "v7/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java", "license": "apache-2.0", "size": 582575 }
[ "androidx.annotation.NonNull" ]
import androidx.annotation.NonNull;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,943,023
List<WritableInMemoryJavaFileObject> getOutputFiles() { return ImmutableList.copyOf(outputFiles); }
List<WritableInMemoryJavaFileObject> getOutputFiles() { return ImmutableList.copyOf(outputFiles); }
/** * Returns classes compiled from inputs. */
Returns classes compiled from inputs
getOutputFiles
{ "repo_name": "pomack/closure-templates", "path": "java/src/com/google/template/soy/javasrc/dyncompile/DynamicCompilerJavaFileManager.java", "license": "apache-2.0", "size": 7297 }
[ "com.google.common.collect.ImmutableList", "java.util.List" ]
import com.google.common.collect.ImmutableList; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
538,588
@Override public Coord getInitialLocation() { List<MapNode> nodes = map.getNodes(); MapNode n,n2; Coord n2Location, nLocation, placement; double dx, dy; double rnd = rng.nextDouble(); // choose a random node (from OK types if such are defined) do { n = nodes.get(rng.nextInt(nodes.size(...
Coord function() { List<MapNode> nodes = map.getNodes(); MapNode n,n2; Coord n2Location, nLocation, placement; double dx, dy; double rnd = rng.nextDouble(); do { n = nodes.get(rng.nextInt(nodes.size())); } while (okMapNodeTypes != null && !n.isType(okMapNodeTypes)); n2 = n.getNeighbors().get(rng.nextInt(n.getNeighbors(...
/** * Returns a (random) coordinate that is between two adjacent MapNodes */
Returns a (random) coordinate that is between two adjacent MapNodes
getInitialLocation
{ "repo_name": "tinda/probenet", "path": "movement/MapBasedMovement.java", "license": "gpl-3.0", "size": 12735 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,428,924
GSFileOptionsBuilder optionsBuilder = new GSFileOptionsBuilder() .setBucket(bucketName) .setKey(name); return fileService.createNewGSFile(optionsBuilder.build()); }
GSFileOptionsBuilder optionsBuilder = new GSFileOptionsBuilder() .setBucket(bucketName) .setKey(name); return fileService.createNewGSFile(optionsBuilder.build()); }
/** * Create a new file on Cloud storage */
Create a new file on Cloud storage
newFile
{ "repo_name": "dataiku/wt1", "path": "src/main/java/com/dataiku/wt1/storage/GCSGAEStorageProcessor.java", "license": "apache-2.0", "size": 6365 }
[ "com.google.appengine.api.files.GSFileOptions" ]
import com.google.appengine.api.files.GSFileOptions;
import com.google.appengine.api.files.*;
[ "com.google.appengine" ]
com.google.appengine;
2,483,332
public boolean engineCanResolve(Element element, String baseURI, StorageResolver storage) { throw new UnsupportedOperationException(); }
boolean function(Element element, String baseURI, StorageResolver storage) { throw new UnsupportedOperationException(); }
/** * This method returns whether the KeyResolverSpi is able to perform the requested action. * * @param element * @param baseURI * @param storage * @return whether the KeyResolverSpi is able to perform the requested action. */
This method returns whether the KeyResolverSpi is able to perform the requested action
engineCanResolve
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolverSpi.java", "license": "apache-2.0", "size": 7998 }
[ "com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver", "org.w3c.dom.Element" ]
import com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver; import org.w3c.dom.Element;
import com.sun.org.apache.xml.internal.security.keys.storage.*; import org.w3c.dom.*;
[ "com.sun.org", "org.w3c.dom" ]
com.sun.org; org.w3c.dom;
1,216,728
public static MIMETypes loadDefault() { InputStream in = null; try { in = Misc.getResource(MIME_TYPES_FILE_RES); if (in == null) { LOG.error("{} not found", MIME_TYPES_FILE); return new MIMETypes(); } return read(in); ...
static MIMETypes function() { InputStream in = null; try { in = Misc.getResource(MIME_TYPES_FILE_RES); if (in == null) { LOG.error(STR, MIME_TYPES_FILE); return new MIMETypes(); } return read(in); } catch (IOException ioe) { LOG.error(STR, ioe); } finally { if (in != null) { try { in.close(); } catch (IOException ioe) ...
/** * Load mime types from ressources. * @return The default mime types. */
Load mime types from ressources
loadDefault
{ "repo_name": "gdi-by/downloadclient", "path": "src/main/java/de/bayern/gdi/model/MIMETypes.java", "license": "apache-2.0", "size": 5693 }
[ "de.bayern.gdi.utils.Misc", "java.io.IOException", "java.io.InputStream" ]
import de.bayern.gdi.utils.Misc; import java.io.IOException; import java.io.InputStream;
import de.bayern.gdi.utils.*; import java.io.*;
[ "de.bayern.gdi", "java.io" ]
de.bayern.gdi; java.io;
1,412,570
private void writeObject(ObjectOutputStream out) throws IOException { maybeParse(); out.defaultWriteObject(); }
void function(ObjectOutputStream out) throws IOException { maybeParse(); out.defaultWriteObject(); }
/** * Ensure object is fully parsed before invoking java serialization. The backing byte array * is transient so if the object has parseLazy = true and hasn't invoked checkParse yet * then data will be lost during serialization. */
Ensure object is fully parsed before invoking java serialization. The backing byte array is transient so if the object has parseLazy = true and hasn't invoked checkParse yet then data will be lost during serialization
writeObject
{ "repo_name": "incredible-hulk/betacoinj", "path": "core/src/main/java/com/google/betacoin/core/Transaction.java", "license": "apache-2.0", "size": 59976 }
[ "java.io.IOException", "java.io.ObjectOutputStream" ]
import java.io.IOException; import java.io.ObjectOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,250,063
if (amqpMessage == null) { return 0; } int payloadSize = getPayloadSize(amqpMessage); // EventData - accepts only PartitionKey - which is a String & stuffed into MessageAnnotation final MessageAnnotations messageAnnotations = amqpMessage.getMessageAnnotations(); fin...
if (amqpMessage == null) { return 0; } int payloadSize = getPayloadSize(amqpMessage); final MessageAnnotations messageAnnotations = amqpMessage.getMessageAnnotations(); final ApplicationProperties applicationProperties = amqpMessage.getApplicationProperties(); int annotationsSize = 0; int applicationPropertiesSize = 0;...
/** * Gets the serialized size of the AMQP message. */
Gets the serialized size of the AMQP message
getSize
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/eventhubs/azure-messaging-eventhubs-track2-perf/src/main/java/com/azure/messaging/eventhubs/perf/PerfMessageSerializer.java", "license": "mit", "size": 4449 }
[ "java.util.Map", "org.apache.qpid.proton.amqp.Symbol", "org.apache.qpid.proton.amqp.messaging.ApplicationProperties", "org.apache.qpid.proton.amqp.messaging.MessageAnnotations" ]
import java.util.Map; import org.apache.qpid.proton.amqp.Symbol; import org.apache.qpid.proton.amqp.messaging.ApplicationProperties; import org.apache.qpid.proton.amqp.messaging.MessageAnnotations;
import java.util.*; import org.apache.qpid.proton.amqp.*; import org.apache.qpid.proton.amqp.messaging.*;
[ "java.util", "org.apache.qpid" ]
java.util; org.apache.qpid;
2,378,088
private Repository valueOf(final MicrosoftRepository microsoftRepository) { if (microsoftRepository == null) { return null; } return dtoFactory .createDto(Repository.class) .withFork(false) .withName(microsoftRepository.getName()) .withParent(null) .withPriva...
Repository function(final MicrosoftRepository microsoftRepository) { if (microsoftRepository == null) { return null; } return dtoFactory .createDto(Repository.class) .withFork(false) .withName(microsoftRepository.getName()) .withParent(null) .withPrivateRepo(false) .withCloneUrl(microsoftRepository.getUrl()); }
/** * Converts an instance of {@link * org.eclipse.che.ide.ext.microsoft.shared.dto.MicrosoftRepository} into a {@link Repository}. * * @param microsoftRepository the MicrosoftVstsRestClient repository to convert. * @return the corresponding {@link Repository} instance or {@code null} if given * m...
Converts an instance of <code>org.eclipse.che.ide.ext.microsoft.shared.dto.MicrosoftRepository</code> into a <code>Repository</code>
valueOf
{ "repo_name": "codenvy/codenvy", "path": "plugins/plugin-microsoft/codenvy-plugin-microsoft-vsts-pullrequest/src/main/java/com/codenvy/plugin/pullrequest/client/MicrosoftHostingService.java", "license": "epl-1.0", "size": 14242 }
[ "org.eclipse.che.ide.ext.microsoft.shared.dto.MicrosoftRepository", "org.eclipse.che.plugin.pullrequest.shared.dto.Repository" ]
import org.eclipse.che.ide.ext.microsoft.shared.dto.MicrosoftRepository; import org.eclipse.che.plugin.pullrequest.shared.dto.Repository;
import org.eclipse.che.ide.ext.microsoft.shared.dto.*; import org.eclipse.che.plugin.pullrequest.shared.dto.*;
[ "org.eclipse.che" ]
org.eclipse.che;
465,546
Set<Symbol> getDefinedSymbols();
Set<Symbol> getDefinedSymbols();
/** * Get the symbols for which transitions are defined. This function will never return the epsilon symbol. * Instead, this symbol should automatically be assumed. * @return Symbols for which there are transitions. */
Get the symbols for which transitions are defined. This function will never return the epsilon symbol. Instead, this symbol should automatically be assumed
getDefinedSymbols
{ "repo_name": "CvO-Theory/apt", "path": "src/lib/uniol/apt/adt/automaton/State.java", "license": "gpl-2.0", "size": 1989 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,833,877
@PUT @Consumes(TEXT) @Produces(TEXT) @Path(ONE_PERM) @Description("Updates the permissions granted to a particular user.") @Nonnull Permission setPermission(@Nonnull @PathParam("id") String id, @Nonnull Permission perm);
@Consumes(TEXT) @Produces(TEXT) @Path(ONE_PERM) @Description(STR) Permission setPermission(@Nonnull @PathParam("id") String id, @Nonnull Permission perm);
/** * Update the permission granted to a user. * * @param id * The name of the user whose permissions are to be updated. Note * that the owner always has full permissions. * @param perm * The permission level to set. * @return The permission level that has actually been...
Update the permission granted to a user
setPermission
{ "repo_name": "apache/incubator-taverna-server", "path": "taverna-server-webapp/src/main/java/org/apache/taverna/server/master/rest/TavernaServerSecurityREST.java", "license": "apache-2.0", "size": 24517 }
[ "javax.annotation.Nonnull", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "org.apache.cxf.jaxrs.model.wadl.Description", "org.apache.taverna.server.master.common.Permission" ]
import javax.annotation.Nonnull; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import org.apache.cxf.jaxrs.model.wadl.Description; import org.apache.taverna.server.master.common.Permission;
import javax.annotation.*; import javax.ws.rs.*; import org.apache.cxf.jaxrs.model.wadl.*; import org.apache.taverna.server.master.common.*;
[ "javax.annotation", "javax.ws", "org.apache.cxf", "org.apache.taverna" ]
javax.annotation; javax.ws; org.apache.cxf; org.apache.taverna;
1,867,435
public Result[] askList(String question, float relThresh) { question = QuestionNormalizer.transformList(question); Result[] results = askFactoid(question, Integer.MAX_VALUE, 0); if (results.length == 0) { // assume that question asks for proper names AnalyzedQuestion aq = QuestionAnalysis.an...
Result[] function(String question, float relThresh) { question = QuestionNormalizer.transformList(question); Result[] results = askFactoid(question, Integer.MAX_VALUE, 0); if (results.length == 0) { AnalyzedQuestion aq = QuestionAnalysis.analyze(question); aq.setAnswerTypes(new String[] {STR}); initFactoidCorpus(); Res...
/** * Asks Ephyra a list question and returns results that have a score of at * least <code>relThresh * top score</code>. This method is optimized for * the TREC evaluation: if no answers are found, it simply returns a list * of proper names. * * @param question list question * @param relThresh re...
Asks Ephyra a list question and returns results that have a score of at least <code>relThresh * top score</code>. This method is optimized for the TREC evaluation: if no answers are found, it simply returns a list of proper names
askList
{ "repo_name": "vishnujayvel/QAGenerator", "path": "src/info/ephyra/trec/OpenEphyraCorpus.java", "license": "gpl-3.0", "size": 10246 }
[ "info.ephyra.questionanalysis.AnalyzedQuestion", "info.ephyra.questionanalysis.QuestionAnalysis", "info.ephyra.questionanalysis.QuestionNormalizer", "info.ephyra.search.Result", "java.util.ArrayList" ]
import info.ephyra.questionanalysis.AnalyzedQuestion; import info.ephyra.questionanalysis.QuestionAnalysis; import info.ephyra.questionanalysis.QuestionNormalizer; import info.ephyra.search.Result; import java.util.ArrayList;
import info.ephyra.questionanalysis.*; import info.ephyra.search.*; import java.util.*;
[ "info.ephyra.questionanalysis", "info.ephyra.search", "java.util" ]
info.ephyra.questionanalysis; info.ephyra.search; java.util;
2,844,997
@Test @Category(NeedsRunner.class) public void testWriteWithSessions() throws IOException { List<String> inputs = Arrays.asList("Critical canary", "Apprehensive eagle", "Intimidating pigeon", "Pedantic gull", "Frisky finch"); runWrite( inputs, new WindowAndReshuffle<>( ...
@Category(NeedsRunner.class) void function() throws IOException { List<String> inputs = Arrays.asList(STR, STR, STR, STR, STR); runWrite( inputs, new WindowAndReshuffle<>( Window.<String>into(Sessions.withGapDuration(Duration.millis(1)))), getBaseOutputFilename(), WriteFiles.to(makeSimpleSink())); }
/** * Test a WriteFiles with sessions. */
Test a WriteFiles with sessions
testWriteWithSessions
{ "repo_name": "wtanaka/beam", "path": "sdks/java/core/src/test/java/org/apache/beam/sdk/io/WriteFilesTest.java", "license": "apache-2.0", "size": 19570 }
[ "java.io.IOException", "java.util.Arrays", "java.util.List", "org.apache.beam.sdk.testing.NeedsRunner", "org.apache.beam.sdk.transforms.windowing.Sessions", "org.apache.beam.sdk.transforms.windowing.Window", "org.joda.time.Duration", "org.junit.experimental.categories.Category" ]
import java.io.IOException; import java.util.Arrays; import java.util.List; import org.apache.beam.sdk.testing.NeedsRunner; import org.apache.beam.sdk.transforms.windowing.Sessions; import org.apache.beam.sdk.transforms.windowing.Window; import org.joda.time.Duration; import org.junit.experimental.categories.Category;
import java.io.*; import java.util.*; import org.apache.beam.sdk.testing.*; import org.apache.beam.sdk.transforms.windowing.*; import org.joda.time.*; import org.junit.experimental.categories.*;
[ "java.io", "java.util", "org.apache.beam", "org.joda.time", "org.junit.experimental" ]
java.io; java.util; org.apache.beam; org.joda.time; org.junit.experimental;
1,263,661
public static LocalDate parse(String str, DateTimeFormatter formatter) { return formatter.parseLocalDate(str); }
static LocalDate function(String str, DateTimeFormatter formatter) { return formatter.parseLocalDate(str); }
/** * Parses a {@code LocalDate} from the specified string using a formatter. * * @param str the string to parse, not null * @param formatter the formatter to use, not null * @since 2.0 */
Parses a LocalDate from the specified string using a formatter
parse
{ "repo_name": "0359xiaodong/joda-time-android", "path": "library/src/org/joda/time/LocalDate.java", "license": "apache-2.0", "size": 81625 }
[ "org.joda.time.format.DateTimeFormatter" ]
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.*;
[ "org.joda.time" ]
org.joda.time;
218,811
public void testSubmit() throws Exception { HtmlSpan span = null; HtmlSpan spanCA = null; HtmlSubmitInput submit = (HtmlSubmitInput) element("form:submit"); submit(submit); assertEquals("context1", title()); // Validate FacesContext Values span = (HtmlSpan)...
void function() throws Exception { HtmlSpan span = null; HtmlSpan spanCA = null; HtmlSubmitInput submit = (HtmlSubmitInput) element(STR); submit(submit); assertEquals(STR, title()); span = (HtmlSpan) element(STR); assertEquals(STR, span.asText()); span = (HtmlSpan) element(STR); assertEquals(STR, span.asText()); span =...
/** * <p>Submit the initial form and validate the resulting values.</p> */
Submit the initial form and validate the resulting values
testSubmit
{ "repo_name": "codelibs/cl-struts", "path": "contrib/struts-faces/sysclient-app/src/java/org/apache/struts/faces/sysclient/ContextTestCase.java", "license": "apache-2.0", "size": 8272 }
[ "com.gargoylesoftware.htmlunit.html.HtmlSpan", "com.gargoylesoftware.htmlunit.html.HtmlSubmitInput" ]
import com.gargoylesoftware.htmlunit.html.HtmlSpan; import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
import com.gargoylesoftware.htmlunit.html.*;
[ "com.gargoylesoftware.htmlunit" ]
com.gargoylesoftware.htmlunit;
466,116
void setMinute(BigInteger value);
void setMinute(BigInteger value);
/** * Sets the value of the '{@link org.casa.dsltesting.Qt48XmlschemaQwtEnhanced.Time#getMinute <em>Minute</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Minute</em>' attribute. * @see #getMinute() * @generated */
Sets the value of the '<code>org.casa.dsltesting.Qt48XmlschemaQwtEnhanced.Time#getMinute Minute</code>' attribute.
setMinute
{ "repo_name": "pedromateo/tug_qt_unit_testing_fw", "path": "qt48_model/src/org/casa/dsltesting/Qt48XmlschemaQwtEnhanced/Time.java", "license": "gpl-3.0", "size": 3811 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,862,849
private UnaryCallable<String, List<KeyOffset>> createSampleRowKeysCallable() { String methodName = "SampleRowKeys";
UnaryCallable<String, List<KeyOffset>> function() { String methodName = STR;
/** * Creates a callable chain to handle SampleRowKeys RPcs. The chain will: * * <ul> * <li>Convert a table id to a {@link com.google.bigtable.v2.SampleRowKeysRequest}. * <li>Dispatch the request to the GAPIC's {@link BigtableStub#sampleRowKeysCallable()}. * <li>Spool responses into a list. *...
Creates a callable chain to handle SampleRowKeys RPcs. The chain will: Convert a table id to a <code>com.google.bigtable.v2.SampleRowKeysRequest</code>. Dispatch the request to the GAPIC's <code>BigtableStub#sampleRowKeysCallable()</code>. Spool responses into a list. Retry on failure. Convert the responses into <code>...
createSampleRowKeysCallable
{ "repo_name": "googleapis/java-bigtable", "path": "google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java", "license": "apache-2.0", "size": 39680 }
[ "com.google.api.gax.rpc.UnaryCallable", "com.google.cloud.bigtable.data.v2.models.KeyOffset", "java.util.List" ]
import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.bigtable.data.v2.models.KeyOffset; import java.util.List;
import com.google.api.gax.rpc.*; import com.google.cloud.bigtable.data.v2.models.*; import java.util.*;
[ "com.google.api", "com.google.cloud", "java.util" ]
com.google.api; com.google.cloud; java.util;
595,189
public List getBasicInfoOfAllActivePublishedAssessments(String orderBy, boolean ascending) { try { PublishedAssessmentService service = new PublishedAssessmentService(); return service.getBasicInfoOfAllActivePublishedAssessments(orderBy, ascending); } catch (Exception ex) { thr...
List function(String orderBy, boolean ascending) { try { PublishedAssessmentService service = new PublishedAssessmentService(); return service.getBasicInfoOfAllActivePublishedAssessments(orderBy, ascending); } catch (Exception ex) { throw new AssessmentServiceException(ex); } }
/** * Get list of all active published assessments with only basic info populated. * @param ascending true if ascending sort. * @param orderBy sort order field. * @return the list. */
Get list of all active published assessments with only basic info populated
getBasicInfoOfAllActivePublishedAssessments
{ "repo_name": "bzhouduke123/sakai", "path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/shared/impl/assessment/PublishedAssessmentServiceImpl.java", "license": "apache-2.0", "size": 16234 }
[ "java.util.List", "org.sakaiproject.tool.assessment.services.assessment.AssessmentServiceException", "org.sakaiproject.tool.assessment.services.assessment.PublishedAssessmentService" ]
import java.util.List; import org.sakaiproject.tool.assessment.services.assessment.AssessmentServiceException; import org.sakaiproject.tool.assessment.services.assessment.PublishedAssessmentService;
import java.util.*; import org.sakaiproject.tool.assessment.services.assessment.*;
[ "java.util", "org.sakaiproject.tool" ]
java.util; org.sakaiproject.tool;
2,217,152
public final void getText(CharTermAttribute t) { t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); } public StandardTokenizerImpl31(java.io.Reader in) { this.zzReader = in; } public StandardTokenizerImpl31(java.io.InputStream in) { this(new java.io.InputStreamReader(in)); }
final void function(CharTermAttribute t) { t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); } public StandardTokenizerImpl31(java.io.Reader in) { this.zzReader = in; } public StandardTokenizerImpl31(java.io.InputStream in) { this(new java.io.InputStreamReader(in)); }
/** * Fills CharTermAttribute with the current token text. */
Fills CharTermAttribute with the current token text
getText
{ "repo_name": "fnp/pylucene", "path": "lucene-java-3.5.0/lucene/src/java/org/apache/lucene/analysis/standard/std31/StandardTokenizerImpl31.java", "license": "apache-2.0", "size": 41408 }
[ "org.apache.lucene.analysis.tokenattributes.CharTermAttribute" ]
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.analysis.tokenattributes.*;
[ "org.apache.lucene" ]
org.apache.lucene;
96,321
@Override public DurationTracker trackDuration(final String key, final long count) { if (counterMap.containsKey(key)) { return new StatisticDurationTracker(this, key, count); } else { return stubDurationTracker(); } }
DurationTracker function(final String key, final long count) { if (counterMap.containsKey(key)) { return new StatisticDurationTracker(this, key, count); } else { return stubDurationTracker(); } }
/** * If the store is tracking the given key, return the * duration tracker for it. If not tracked, return the * stub tracker. * @param key statistic key prefix * @param count #of times to increment the matching counter in this * operation. * @return a tracker. */
If the store is tracking the given key, return the duration tracker for it. If not tracked, return the stub tracker
trackDuration
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/impl/IOStatisticsStoreImpl.java", "license": "apache-2.0", "size": 15205 }
[ "org.apache.hadoop.fs.statistics.DurationTracker", "org.apache.hadoop.fs.statistics.IOStatisticsSupport" ]
import org.apache.hadoop.fs.statistics.DurationTracker; import org.apache.hadoop.fs.statistics.IOStatisticsSupport;
import org.apache.hadoop.fs.statistics.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,996,071
public RacePointsList initPoints(Race r, EntryList entries, Division div) { clearAll(r); RacePointsList rList = new RacePointsList(); for (Iterator iter = entries.iterator(); iter.hasNext();) { Entry e = (Entry) iter.next(); Finish f = r.getFinish(e); if (f == null) { f = new Finish(r, e); f.s...
RacePointsList function(Race r, EntryList entries, Division div) { clearAll(r); RacePointsList rList = new RacePointsList(); for (Iterator iter = entries.iterator(); iter.hasNext();) { Entry e = (Entry) iter.next(); Finish f = r.getFinish(e); if (f == null) { f = new Finish(r, e); f.setFinishPosition(new FinishPosition...
/** * clears old points for race, and creates a new set of them, returns a RacePointsList of points for this race.. AND * autoamtically adds DNC finishes for entries without finishes */
clears old points for race, and creates a new set of them, returns a RacePointsList of points for this race.. AND autoamtically adds DNC finishes for entries without finishes
initPoints
{ "repo_name": "sgrosven/gromurph", "path": "Javascore/src/main/java/org/gromurph/javascore/model/RacePointsList.java", "license": "gpl-2.0", "size": 16852 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
791,530
@Deprecated public final void changed(ImmutableBag<Entity> entities) {}
public final void changed(ImmutableBag<Entity> entities) {}
/** * This method no longer performs any operations due to entity subscriptions lists * being refactored into {@link com.artemis.AspectSubscriptionManager} and * {@link com.artemis.EntitySubscription}. */
This method no longer performs any operations due to entity subscriptions lists being refactored into <code>com.artemis.AspectSubscriptionManager</code> and <code>com.artemis.EntitySubscription</code>
added
{ "repo_name": "antag99/artemis-odb", "path": "artemis/src/main/java/com/artemis/EntitySystem.java", "license": "apache-2.0", "size": 5370 }
[ "com.artemis.utils.ImmutableBag" ]
import com.artemis.utils.ImmutableBag;
import com.artemis.utils.*;
[ "com.artemis.utils" ]
com.artemis.utils;
517,402
protected void playDispenseSound(IBlockSource source) { if (this.succeeded) { source.getWorld().playEvent(1000, source.getBlockPos(), 0); } else { source.getWorld().playEvent(1...
void function(IBlockSource source) { if (this.succeeded) { source.getWorld().playEvent(1000, source.getBlockPos(), 0); } else { source.getWorld().playEvent(1001, source.getBlockPos(), 0); } }
/** * Play the dispense sound from the specified block. */
Play the dispense sound from the specified block
playDispenseSound
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/init/Bootstrap.java", "license": "gpl-3.0", "size": 31174 }
[ "net.minecraft.dispenser.IBlockSource" ]
import net.minecraft.dispenser.IBlockSource;
import net.minecraft.dispenser.*;
[ "net.minecraft.dispenser" ]
net.minecraft.dispenser;
502,611
GroupElement getSubRule();
GroupElement getSubRule();
/** * Retrieve the subrule that was activated. * * @return */
Retrieve the subrule that was activated
getSubRule
{ "repo_name": "Buble1981/MyDroolsFork", "path": "drools-core/src/main/java/org/drools/core/spi/Activation.java", "license": "apache-2.0", "size": 4030 }
[ "org.drools.core.rule.GroupElement" ]
import org.drools.core.rule.GroupElement;
import org.drools.core.rule.*;
[ "org.drools.core" ]
org.drools.core;
1,047,788
private long borrowOrAllocateFreePage(long pageId) throws GridOffHeapOutOfMemoryException { if (pagesCntr != null) pagesCntr.getAndIncrement(); long relPtr = borrowFreePage(); return relPtr != INVALID_REL_PTR ? relPtr : allocateFreePage(pageId); }
long function(long pageId) throws GridOffHeapOutOfMemoryException { if (pagesCntr != null) pagesCntr.getAndIncrement(); long relPtr = borrowFreePage(); return relPtr != INVALID_REL_PTR ? relPtr : allocateFreePage(pageId); }
/** * Allocates a new free page. * * @param pageId Page ID to to initialize. * @return Relative pointer to the allocated page. * @throws GridOffHeapOutOfMemoryException If failed to allocate new free page. */
Allocates a new free page
borrowOrAllocateFreePage
{ "repo_name": "WilliamDo/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java", "license": "apache-2.0", "size": 79433 }
[ "org.apache.ignite.internal.util.offheap.GridOffHeapOutOfMemoryException" ]
import org.apache.ignite.internal.util.offheap.GridOffHeapOutOfMemoryException;
import org.apache.ignite.internal.util.offheap.*;
[ "org.apache.ignite" ]
org.apache.ignite;
88,943
public void post(final String path, JSONObject params, RetryPolicy retryPolicy, Listener listener, ErrorListener errorListener) { final JsonRestRequest request = mRestClient.makeRequest(mRestClient.getAbsoluteURL(path), params, listener, errorListener); if (retry...
void function(final String path, JSONObject params, RetryPolicy retryPolicy, Listener listener, ErrorListener errorListener) { final JsonRestRequest request = mRestClient.makeRequest(mRestClient.getAbsoluteURL(path), params, listener, errorListener); if (retryPolicy == null) { retryPolicy = new DefaultRetryPolicy(REST_...
/** * Make a JSON POST request */
Make a JSON POST request
post
{ "repo_name": "joansmith/WordPress-Android", "path": "libs/networking/WordPressNetworking/src/main/java/org/wordpress/android/networking/RestClientUtils.java", "license": "gpl-2.0", "size": 14011 }
[ "com.android.volley.DefaultRetryPolicy", "com.android.volley.RetryPolicy", "com.wordpress.rest.JsonRestRequest", "com.wordpress.rest.RestRequest", "org.json.JSONObject" ]
import com.android.volley.DefaultRetryPolicy; import com.android.volley.RetryPolicy; import com.wordpress.rest.JsonRestRequest; import com.wordpress.rest.RestRequest; import org.json.JSONObject;
import com.android.volley.*; import com.wordpress.rest.*; import org.json.*;
[ "com.android.volley", "com.wordpress.rest", "org.json" ]
com.android.volley; com.wordpress.rest; org.json;
2,518,586
public V1 setExtra(Bundle extra) { N.setExtra(extra); return this; }
V1 function(Bundle extra) { N.setExtra(extra); return this; }
/** * Set metadata. * * @param extra */
Set metadata
setExtra
{ "repo_name": "lamydev/Android-Notification", "path": "core/src/zemin/notification/NotificationBuilder.java", "license": "apache-2.0", "size": 26477 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
2,876,690
if (neighbors != null) { List<Edge<E>> edges = new LinkedList<>(); for (int id : neighbors) { edges.add(new Edge<E>((Vertex<E>) adjacencyList[id])); } ((Vertex<E>) adjacencyList[index]).setEdges(edges); } }
if (neighbors != null) { List<Edge<E>> edges = new LinkedList<>(); for (int id : neighbors) { edges.add(new Edge<E>((Vertex<E>) adjacencyList[id])); } ((Vertex<E>) adjacencyList[index]).setEdges(edges); } }
/** * Indexes are used to map numbers to specific Vertices * * @param index * @param neighbors */
Indexes are used to map numbers to specific Vertices
addEdges
{ "repo_name": "skurski/know-how", "path": "src/main/java/know/how/datastructure/graph/Graph.java", "license": "gpl-3.0", "size": 4811 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
720,300
private Rule findBestRule(List<Example> remainingExamples, List<Selector> selectors, Ontology o, FTKBase dm, Sort descriptionSort, List<FeatureTerm> differentSolutions) throws FeatureTermException { List<Rule> star = new LinkedList<Rule>(); star.add(new Rule((TermFeatureTerm) descriptionSort.createFeatureTer...
Rule function(List<Example> remainingExamples, List<Selector> selectors, Ontology o, FTKBase dm, Sort descriptionSort, List<FeatureTerm> differentSolutions) throws FeatureTermException { List<Rule> star = new LinkedList<Rule>(); star.add(new Rule((TermFeatureTerm) descriptionSort.createFeatureTerm(), remainingExamples,...
/** * Find best rule. * * @param remainingExamples * the remaining examples * @param selectors * the selectors * @param o * the o * @param dm * the dm * @param descriptionSort * the description sort * @param differentSolutions * ...
Find best rule
findBestRule
{ "repo_name": "santiontanon/fterm", "path": "src/ftl/learning/inductivemethods/CN2.java", "license": "bsd-3-clause", "size": 15947 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,281,128
return PLUGIN; } /** * Retrieve the {@link SparkGraphPlugin}. * * @return the {@link SparkGraphPlugin}
return PLUGIN; } /** * Retrieve the {@link SparkGraphPlugin}. * * @return the {@link SparkGraphPlugin}
/** * Retrieve the {@link SparkBasicPlugin}. * * @return the {@link SparkBasicPlugin} */
Retrieve the <code>SparkBasicPlugin</code>
basicPlugin
{ "repo_name": "daqcri/rheem", "path": "rheem-platforms/rheem-spark/src/main/java/org/qcri/rheem/spark/Spark.java", "license": "apache-2.0", "size": 1408 }
[ "org.qcri.rheem.spark.plugin.SparkGraphPlugin" ]
import org.qcri.rheem.spark.plugin.SparkGraphPlugin;
import org.qcri.rheem.spark.plugin.*;
[ "org.qcri.rheem" ]
org.qcri.rheem;
1,630,371
@Override @Deprecated public Signature getSignature(int index) { return jDigiDocFacade.getSignature(index); }
Signature function(int index) { return jDigiDocFacade.getSignature(index); }
/** * Return signature * * @param index index number of the signature to return * @return signature * @deprecated will be removed in the future. */
Return signature
getSignature
{ "repo_name": "keijokapp/digidoc4j", "path": "src/org/digidoc4j/impl/ddoc/DDocContainer.java", "license": "lgpl-2.1", "size": 9601 }
[ "org.digidoc4j.Signature" ]
import org.digidoc4j.Signature;
import org.digidoc4j.*;
[ "org.digidoc4j" ]
org.digidoc4j;
184,663
public void init(Message header);
void function(Message header);
/** * Called once after creating this buffer manager and before * it begins processing. */
Called once after creating this buffer manager and before it begins processing
init
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/corba/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerRead.java", "license": "mit", "size": 3108 }
[ "com.sun.corba.se.impl.protocol.giopmsgheaders.Message" ]
import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
import com.sun.corba.se.impl.protocol.giopmsgheaders.*;
[ "com.sun.corba" ]
com.sun.corba;
395,142
public float calcDamageByCreature(int level, EnumCreatureAttribute creatureType) { return 0.0F; }
float function(int level, EnumCreatureAttribute creatureType) { return 0.0F; }
/** * Calculates the additional damage that will be dealt by an item with this enchantment. This alternative to * calcModifierDamage is sensitive to the targets EnumCreatureAttribute. */
Calculates the additional damage that will be dealt by an item with this enchantment. This alternative to calcModifierDamage is sensitive to the targets EnumCreatureAttribute
calcDamageByCreature
{ "repo_name": "MartyParty21/AwakenDreamsClient", "path": "mcp/src/minecraft/net/minecraft/enchantment/Enchantment.java", "license": "gpl-3.0", "size": 11014 }
[ "net.minecraft.entity.EnumCreatureAttribute" ]
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
627,669
public static void bootstrapConf(SolrZkClient zkClient, CoreContainer cc, String solrHome) throws IOException, KeeperException, InterruptedException { //List<String> allCoreNames = cfg.getAllCoreNames(); List<CoreDescriptor> cds = cc.getCoresLocator().discover(cc); log.info("bootstrapping conf...
static void function(SolrZkClient zkClient, CoreContainer cc, String solrHome) throws IOException, KeeperException, InterruptedException { List<CoreDescriptor> cds = cc.getCoresLocator().discover(cc); log.info(STR + cds.size() + STR + solrHome); for (CoreDescriptor cd : cds) { String coreName = cd.getName(); String con...
/** * If in SolrCloud mode, upload config sets for each SolrCore in solr.xml. */
If in SolrCloud mode, upload config sets for each SolrCore in solr.xml
bootstrapConf
{ "repo_name": "yintaoxue/read-open-source-code", "path": "solr-4.10.4/src/org/apache/solr/cloud/ZkController.java", "license": "apache-2.0", "size": 78849 }
[ "java.io.File", "java.io.IOException", "java.util.List", "org.apache.commons.lang.StringUtils", "org.apache.solr.common.cloud.SolrZkClient", "org.apache.solr.core.CoreContainer", "org.apache.solr.core.CoreDescriptor", "org.apache.zookeeper.KeeperException" ]
import java.io.File; import java.io.IOException; import java.util.List; import org.apache.commons.lang.StringUtils; import org.apache.solr.common.cloud.SolrZkClient; import org.apache.solr.core.CoreContainer; import org.apache.solr.core.CoreDescriptor; import org.apache.zookeeper.KeeperException;
import java.io.*; import java.util.*; import org.apache.commons.lang.*; import org.apache.solr.common.cloud.*; import org.apache.solr.core.*; import org.apache.zookeeper.*;
[ "java.io", "java.util", "org.apache.commons", "org.apache.solr", "org.apache.zookeeper" ]
java.io; java.util; org.apache.commons; org.apache.solr; org.apache.zookeeper;
1,715,755
public FeatureCollection<SimpleFeatureType, SimpleFeature> getOrigin() { return results; }
FeatureCollection<SimpleFeatureType, SimpleFeature> function() { return results; }
/** * Returns the feature results wrapped by this reprojecting feature results * */
Returns the feature results wrapped by this reprojecting feature results
getOrigin
{ "repo_name": "FUNCATE/TerraMobile", "path": "sldparser/src/main/geotools/data/crs/ReprojectFeatureResults.java", "license": "apache-2.0", "size": 8130 }
[ "org.geotools.feature.FeatureCollection", "org.opengis.feature.simple.SimpleFeature", "org.opengis.feature.simple.SimpleFeatureType" ]
import org.geotools.feature.FeatureCollection; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType;
import org.geotools.feature.*; import org.opengis.feature.simple.*;
[ "org.geotools.feature", "org.opengis.feature" ]
org.geotools.feature; org.opengis.feature;
75,530
public static byte[] getPasswordHash(final byte[] passKey, final String algo) throws NoSuchAlgorithmException, UnsupportedEncodingException{ MessageDigest md = MessageDigest.getInstance(algo); md.update(passKey); byte[] raw = md.digest(); return raw; }
static byte[] function(final byte[] passKey, final String algo) throws NoSuchAlgorithmException, UnsupportedEncodingException{ MessageDigest md = MessageDigest.getInstance(algo); md.update(passKey); byte[] raw = md.digest(); return raw; }
/** * Method to generate the MD5 sum of the password. */
Method to generate the MD5 sum of the password
getPasswordHash
{ "repo_name": "wiztools/wizcrypt", "path": "src/main/java/org/wiztools/wizcrypt/CipherHashGen.java", "license": "apache-2.0", "size": 3024 }
[ "java.io.UnsupportedEncodingException", "java.security.MessageDigest", "java.security.NoSuchAlgorithmException" ]
import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
import java.io.*; import java.security.*;
[ "java.io", "java.security" ]
java.io; java.security;
2,349,882
@Override public Schema getById(MD5Digest id) throws IOException, SchemaRegistryException { if (_schemaHashMap.containsKey(id)) { return _schemaHashMap.get(id); } else { throw new SchemaRegistryException("Could not find schema with id : " + id.asString()); }...
Schema function(MD5Digest id) throws IOException, SchemaRegistryException { if (_schemaHashMap.containsKey(id)) { return _schemaHashMap.get(id); } else { throw new SchemaRegistryException(STR + id.asString()); } } /** * Will throw a SchemaRegistryException if it cannot find any schema for the provided name. * {@inherit...
/** * Get a schema given an id * @param id * @return * @throws IOException * @throws SchemaRegistryException */
Get a schema given an id
getById
{ "repo_name": "shirshanka/gobblin", "path": "gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/kafka/schemareg/ConfigDrivenMd5SchemaRegistry.java", "license": "apache-2.0", "size": 4667 }
[ "java.io.IOException", "org.apache.avro.Schema", "org.apache.gobblin.kafka.serialize.MD5Digest" ]
import java.io.IOException; import org.apache.avro.Schema; import org.apache.gobblin.kafka.serialize.MD5Digest;
import java.io.*; import org.apache.avro.*; import org.apache.gobblin.kafka.serialize.*;
[ "java.io", "org.apache.avro", "org.apache.gobblin" ]
java.io; org.apache.avro; org.apache.gobblin;
971,187
private void writeTypeAndTokenMap(State state) { TypeComparator comparator = new TypeComparator(state); Map<TypeElement, SortedSet<TypeElement>> domainToClientMappings = new TreeMap<TypeElement, SortedSet<TypeElement>>(comparator); // Map accumulated by previous visitors Map<Element, Elem...
void function(State state) { TypeComparator comparator = new TypeComparator(state); Map<TypeElement, SortedSet<TypeElement>> domainToClientMappings = new TreeMap<TypeElement, SortedSet<TypeElement>>(comparator); Map<Element, Element> clientToDomainMap = state.getClientToDomainMap(); Set<TypeElement> referredTypes = Ref...
/** * Write calls to {@code withRawTypeToken} and * {@code withClientToDomainMappings}. */
Write calls to withRawTypeToken and withClientToDomainMappings
writeTypeAndTokenMap
{ "repo_name": "syntelos/gwtcc", "path": "src/com/google/web/bindery/requestfactory/apt/DeobfuscatorBuilder.java", "license": "apache-2.0", "size": 9051 }
[ "com.google.web.bindery.requestfactory.vm.impl.OperationKey", "java.util.Map", "java.util.Set", "java.util.SortedSet", "java.util.TreeMap", "java.util.TreeSet", "javax.lang.model.element.Element", "javax.lang.model.element.TypeElement" ]
import com.google.web.bindery.requestfactory.vm.impl.OperationKey; import java.util.Map; import java.util.Set; import java.util.SortedSet; import java.util.TreeMap; import java.util.TreeSet; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement;
import com.google.web.bindery.requestfactory.vm.impl.*; import java.util.*; import javax.lang.model.element.*;
[ "com.google.web", "java.util", "javax.lang" ]
com.google.web; java.util; javax.lang;
1,956,482
public void createJob(String jobId, PoolInformation poolInfo) throws BatchErrorException, IOException { createJob(jobId, poolInfo, null); }
void function(String jobId, PoolInformation poolInfo) throws BatchErrorException, IOException { createJob(jobId, poolInfo, null); }
/** * Adds a job to the Batch account. * * @param jobId The ID of the job to be added. * @param poolInfo Specifies how a job should be assigned to a pool. * @throws BatchErrorException Exception thrown when an error response is received from the Batch service. * @throws IOException Excepti...
Adds a job to the Batch account
createJob
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/batch/microsoft-azure-batch/src/main/java/com/microsoft/azure/batch/JobOperations.java", "license": "mit", "size": 42742 }
[ "com.microsoft.azure.batch.protocol.models.BatchErrorException", "com.microsoft.azure.batch.protocol.models.PoolInformation", "java.io.IOException" ]
import com.microsoft.azure.batch.protocol.models.BatchErrorException; import com.microsoft.azure.batch.protocol.models.PoolInformation; import java.io.IOException;
import com.microsoft.azure.batch.protocol.models.*; import java.io.*;
[ "com.microsoft.azure", "java.io" ]
com.microsoft.azure; java.io;
436,554
protected DocumentBuilder builder() { HtmlDocumentBuilder builder = new HtmlDocumentBuilder(); builder.setErrorHandler(this); return builder; }
DocumentBuilder function() { HtmlDocumentBuilder builder = new HtmlDocumentBuilder(); builder.setErrorHandler(this); return builder; }
/** * Constructs and returns an HTML5 HtmlDocumentBuilder. */
Constructs and returns an HTML5 HtmlDocumentBuilder
builder
{ "repo_name": "55minutes/fiftyfive-wicket-2.x", "path": "test/src/main/java/fiftyfive/wicket/test/Html5Validator.java", "license": "apache-2.0", "size": 1356 }
[ "javax.xml.parsers.DocumentBuilder", "nu.validator.htmlparser.dom.HtmlDocumentBuilder" ]
import javax.xml.parsers.DocumentBuilder; import nu.validator.htmlparser.dom.HtmlDocumentBuilder;
import javax.xml.parsers.*; import nu.validator.htmlparser.dom.*;
[ "javax.xml", "nu.validator.htmlparser" ]
javax.xml; nu.validator.htmlparser;
1,638,802
public void testElementFormUnqualifiedNoCtxNoDRE() throws Exception { Schema generatedSchema = null; try { boolean setSchemaContext = false; boolean setDefaultRootElement = false; Project prj = new TestProject(setSchemaContext, setDefaultRootElement); ...
void function() throws Exception { Schema generatedSchema = null; try { boolean setSchemaContext = false; boolean setDefaultRootElement = false; Project prj = new TestProject(setSchemaContext, setDefaultRootElement); loginProject(prj); List<Descriptor> descriptorsToProcess = setupDescriptorList(prj); SchemaModelGenerat...
/** * No schema should be generated since there is no default root element * or schema context set on any descriptors */
No schema should be generated since there is no default root element or schema context set on any descriptors
testElementFormUnqualifiedNoCtxNoDRE
{ "repo_name": "gameduell/eclipselink.runtime", "path": "moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/GenerateSingleSchemaTestCases.java", "license": "epl-1.0", "size": 16992 }
[ "java.util.List", "java.util.Map", "org.eclipse.persistence.internal.oxm.mappings.Descriptor", "org.eclipse.persistence.internal.oxm.schema.SchemaModelGeneratorProperties", "org.eclipse.persistence.internal.oxm.schema.model.Schema", "org.eclipse.persistence.sessions.Project" ]
import java.util.List; import java.util.Map; import org.eclipse.persistence.internal.oxm.mappings.Descriptor; import org.eclipse.persistence.internal.oxm.schema.SchemaModelGeneratorProperties; import org.eclipse.persistence.internal.oxm.schema.model.Schema; import org.eclipse.persistence.sessions.Project;
import java.util.*; import org.eclipse.persistence.internal.oxm.mappings.*; import org.eclipse.persistence.internal.oxm.schema.*; import org.eclipse.persistence.internal.oxm.schema.model.*; import org.eclipse.persistence.sessions.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
1,242,004
public void testEngineGenerateCertPathLjava_io_InputStream01() { CertificateFactorySpi certFactorySpi = new MyCertificateFactorySpi(); MyCertificateFactorySpi.putMode(true); ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); DataInputStream dis = new DataInputStream(...
void function() { CertificateFactorySpi certFactorySpi = new MyCertificateFactorySpi(); MyCertificateFactorySpi.putMode(true); ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]); DataInputStream dis = new DataInputStream(bais); try { assertNull(certFactorySpi.engineGenerateCertPath(dis)); } catch (Certif...
/** * Test for <code>engineGenerateCertPath(InputStream)</code> method. * Assertion: Generates a <code>CertPath</code> object and initializes it * with the data read from the <code>InputStream</code> */
Test for <code>engineGenerateCertPath(InputStream)</code> method. Assertion: Generates a <code>CertPath</code> object and initializes it with the data read from the <code>InputStream</code>
testEngineGenerateCertPathLjava_io_InputStream01
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "luni/src/test/java/tests/security/cert/CertificateFactorySpiTest.java", "license": "gpl-2.0", "size": 16633 }
[ "java.io.ByteArrayInputStream", "java.io.DataInputStream", "java.security.cert.CertificateException", "java.security.cert.CertificateFactorySpi", "org.apache.harmony.security.tests.support.cert.MyCertificateFactorySpi" ]
import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.security.cert.CertificateException; import java.security.cert.CertificateFactorySpi; import org.apache.harmony.security.tests.support.cert.MyCertificateFactorySpi;
import java.io.*; import java.security.cert.*; import org.apache.harmony.security.tests.support.cert.*;
[ "java.io", "java.security", "org.apache.harmony" ]
java.io; java.security; org.apache.harmony;
750,367
public SelectItem[] pickerCallback(int filterIndex, final String contains) { final FacesContext context = FacesContext.getCurrentInstance();
SelectItem[] function(int filterIndex, final String contains) { final FacesContext context = FacesContext.getCurrentInstance();
/** * Query callback method executed by the Generic Picker component. This * method is part of the contract to the Generic Picker, it is up to the * backing bean to execute whatever query is appropriate and return the * results. * * @param filterIndex Index of the filter drop-down selecti...
Query callback method executed by the Generic Picker component. This method is part of the contract to the Generic Picker, it is up to the backing bean to execute whatever query is appropriate and return the results
pickerCallback
{ "repo_name": "Alfresco/community-edition", "path": "projects/web-client/source/java/org/alfresco/web/bean/groups/AddUsersDialog.java", "license": "lgpl-3.0", "size": 12280 }
[ "javax.faces.context.FacesContext", "javax.faces.model.SelectItem" ]
import javax.faces.context.FacesContext; import javax.faces.model.SelectItem;
import javax.faces.context.*; import javax.faces.model.*;
[ "javax.faces" ]
javax.faces;
2,447,525
public void setCatalog(String catalog) throws SQLException { checkIfClosed(); // silently ignoring this request like the javadoc said. return; }
void function(String catalog) throws SQLException { checkIfClosed(); return; }
/** * A sub-space of this Connection's database may be selected by setting a * catalog name. If the driver does not support catalogs it will * silently ignore this request. * * @exception SQLException if a database-access error occurs. */
A sub-space of this Connection's database may be selected by setting a catalog name. If the driver does not support catalogs it will silently ignore this request
setCatalog
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "license": "apache-2.0", "size": 128383 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
711,670
public void start() { if (state == State.READY) { if (rUncompressed) { payloadSize = 0; audioRecorder.startRecording(); audioRecorder.read(buffer, 0, buffer.length); } else { mediaRecorder.start(); } state = State.RECORDING; } else { Log.e(ExtAudioRecorder.class.get...
void function() { if (state == State.READY) { if (rUncompressed) { payloadSize = 0; audioRecorder.startRecording(); audioRecorder.read(buffer, 0, buffer.length); } else { mediaRecorder.start(); } state = State.RECORDING; } else { Log.e(ExtAudioRecorder.class.getName(), STR); state = State.ERROR; } }
/** * * * Starts the recording, and sets the state to RECORDING. * Call after prepare(). * */
Starts the recording, and sets the state to RECORDING. Call after prepare()
start
{ "repo_name": "ycaihua/storymaker", "path": "app/src/info/guardianproject/mrapp/media/ExtAudioRecorder.java", "license": "gpl-2.0", "size": 14474 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,579,415
@Override protected AndroidManifest createAppManifest(FsFile manifestFile, FsFile resDir, FsFile assetsDir) { AndroidManifest manifest = new MapzenAndroidManifest(manifestFile, resDir, assetsDir); String packageName = System.getProperty("android.package"); manifest.setPackage...
AndroidManifest function(FsFile manifestFile, FsFile resDir, FsFile assetsDir) { AndroidManifest manifest = new MapzenAndroidManifest(manifestFile, resDir, assetsDir); String packageName = System.getProperty(STR); manifest.setPackageName(packageName); return manifest; }
/** * Uses custom manifest as workaround to maintain backward compatibility with library projects * that do not yet include the <code>&lt;application/&gt;</code> tag in AndroidManifest.xml. * <p /> * See https://github.com/robolectric/robolectric/pull/1309 for more info. */
Uses custom manifest as workaround to maintain backward compatibility with library projects that do not yet include the <code>&lt;application/&gt;</code> tag in AndroidManifest.xml. See HREF for more info
createAppManifest
{ "repo_name": "opensciencemap/open", "path": "src/test/java/com/mapzen/open/support/MapzenTestRunner.java", "license": "gpl-3.0", "size": 4126 }
[ "org.robolectric.AndroidManifest", "org.robolectric.MapzenAndroidManifest", "org.robolectric.res.FsFile" ]
import org.robolectric.AndroidManifest; import org.robolectric.MapzenAndroidManifest; import org.robolectric.res.FsFile;
import org.robolectric.*; import org.robolectric.res.*;
[ "org.robolectric", "org.robolectric.res" ]
org.robolectric; org.robolectric.res;
684,869
@SuppressWarnings("deprecation") public String getCellDataFromParticularTestCase(String ExcelFileName,String sheetName, String TCName, String colName) throws Exception { int rowNum = 0; try { workbook = new XSSFWorkbook(ExcelFileName); int index = workbook.getSheetIndex(sheetName); int col_Num = ...
@SuppressWarnings(STR) String function(String ExcelFileName,String sheetName, String TCName, String colName) throws Exception { int rowNum = 0; try { workbook = new XSSFWorkbook(ExcelFileName); int index = workbook.getSheetIndex(sheetName); int col_Num = -1; if (index == -1) return STR@nullSTRSTRSTR/STR/STRSTRFile IO E...
/** * Function to get cell data from Particular test case * @author saikiran.nataraja * @param ExcelFileName * @param sheetName * @param TCName * @param colName * @return * @throws Exception */
Function to get cell data from Particular test case
getCellDataFromParticularTestCase
{ "repo_name": "saikiran40cs/MavenTestNG", "path": "src/main/java/utilities/XL_Reader.java", "license": "epl-1.0", "size": 17751 }
[ "org.apache.poi.xssf.usermodel.XSSFWorkbook" ]
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.poi.xssf.usermodel.*;
[ "org.apache.poi" ]
org.apache.poi;
1,949,208
public void setDataSources(List<DS> dataSources) { this.dataSources = dataSources; }
void function(List<DS> dataSources) { this.dataSources = dataSources; }
/** * Sets the data sources. * * @param dataSources the new data sources */
Sets the data sources
setDataSources
{ "repo_name": "aihua/opennms", "path": "opennms-rrd/opennms-rrd-model/src/main/java/org/opennms/netmgt/rrd/model/v1/RRDv1.java", "license": "agpl-3.0", "size": 3858 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,777,401
BiConsumer<Partition<T, K, L>, T> getTriggerPolicy();
BiConsumer<Partition<T, K, L>, T> getTriggerPolicy();
/** * Returns the window's trigger policy. * The trigger policy is invoked (triggered) by * the insertion of a tuple into a partition. * * @return trigger policy for this window. */
Returns the window's trigger policy. The trigger policy is invoked (triggered) by the insertion of a tuple into a partition
getTriggerPolicy
{ "repo_name": "dlaboss/incubator-quarks", "path": "api/window/src/main/java/org/apache/edgent/window/Window.java", "license": "apache-2.0", "size": 6504 }
[ "org.apache.edgent.function.BiConsumer" ]
import org.apache.edgent.function.BiConsumer;
import org.apache.edgent.function.*;
[ "org.apache.edgent" ]
org.apache.edgent;
1,903,112
public static ToIntFunction<String> containsDash() { return s -> (s.contains("-")) ? 1 : 0; }
static ToIntFunction<String> function() { return s -> (s.contains("-")) ? 1 : 0; }
/** * Feature #6 * * Checks if a word contains a Dash * * @return int */
Feature #6 Checks if a word contains a Dash
containsDash
{ "repo_name": "lucapertile/POSExtractor", "path": "src/main/java/com/luca/exercise/Features.java", "license": "mit", "size": 3644 }
[ "java.util.function.ToIntFunction" ]
import java.util.function.ToIntFunction;
import java.util.function.*;
[ "java.util" ]
java.util;
2,378,080
Observable<ServiceResponse<List<DateTime>>> getDateTimeInvalidCharsWithServiceResponseAsync();
Observable<ServiceResponse<List<DateTime>>> getDateTimeInvalidCharsWithServiceResponseAsync();
/** * Get date array value ['2000-12-01t00:00:01z', 'date-time']. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List&lt;DateTime&gt; object */
Get date array value ['2000-12-01t00:00:01z', 'date-time']
getDateTimeInvalidCharsWithServiceResponseAsync
{ "repo_name": "balajikris/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyarray/Arrays.java", "license": "mit", "size": 104816 }
[ "com.microsoft.rest.ServiceResponse", "java.util.List", "org.joda.time.DateTime" ]
import com.microsoft.rest.ServiceResponse; import java.util.List; import org.joda.time.DateTime;
import com.microsoft.rest.*; import java.util.*; import org.joda.time.*;
[ "com.microsoft.rest", "java.util", "org.joda.time" ]
com.microsoft.rest; java.util; org.joda.time;
120,570