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
return input .map(new MapTo<T, LongValue>(new LongValue(1))) .returns(LONG_VALUE_TYPE_INFO) .name("Emit 1") .reduce(new AddLongValue()) .name("Sum"); }
return input .map(new MapTo<T, LongValue>(new LongValue(1))) .returns(LONG_VALUE_TYPE_INFO) .name(STR) .reduce(new AddLongValue()) .name("Sum"); }
/** * Count the number of elements in a DataSet. * * @param input DataSet of elements to be counted * @param <T> element type * @return count */
Count the number of elements in a DataSet
count
{ "repo_name": "hongyuhong/flink", "path": "flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/utils/GraphUtils.java", "license": "apache-2.0", "size": 3539 }
[ "org.apache.flink.types.LongValue" ]
import org.apache.flink.types.LongValue;
import org.apache.flink.types.*;
[ "org.apache.flink" ]
org.apache.flink;
2,821,583
public void setReadLockIdempotentReleaseExecutorService(ScheduledExecutorService readLockIdempotentReleaseExecutorService) { this.readLockIdempotentReleaseExecutorService = readLockIdempotentReleaseExecutorService; }
void function(ScheduledExecutorService readLockIdempotentReleaseExecutorService) { this.readLockIdempotentReleaseExecutorService = readLockIdempotentReleaseExecutorService; }
/** * To use a custom and shared thread pool for asynchronous release tasks. */
To use a custom and shared thread pool for asynchronous release tasks
setReadLockIdempotentReleaseExecutorService
{ "repo_name": "objectiser/camel", "path": "components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileIdempotentChangedRepositoryReadLockStrategy.java", "license": "apache-2.0", "size": 13006 }
[ "java.util.concurrent.ScheduledExecutorService" ]
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,125,806
private String getSerializedParams(Map<String, String> params) throws UnsupportedEncodingException { String rv = null; if (params != null && !params.isEmpty()) { TreeMap<String, String> sortedParams = new TreeMap<String, String>(); for (String key : params.keySet()) { ...
String function(Map<String, String> params) throws UnsupportedEncodingException { String rv = null; if (params != null && !params.isEmpty()) { TreeMap<String, String> sortedParams = new TreeMap<String, String>(); for (String key : params.keySet()) { if (key != null && params.get(key) != null) { sortedParams.put(key, pa...
/** * Prepares and returns a string ready to be signed from the params of an * HTTP request * <p> * The params must be only those included in the body of the HTTP request * when its content type is application/x-www-urlencoded and must be * urldecoded. * @param params The params of an...
Prepares and returns a string ready to be signed from the params of an HTTP request The params must be only those included in the body of the HTTP request when its content type is application/x-www-urlencoded and must be urldecoded
getSerializedParams
{ "repo_name": "ElevenPaths/latch-webcasts-2014", "path": "Java/app/com/elevenpaths/latch/Latch.java", "license": "apache-2.0", "size": 24867 }
[ "java.io.UnsupportedEncodingException", "java.net.URLEncoder", "java.util.Map", "java.util.TreeMap" ]
import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Map; import java.util.TreeMap;
import java.io.*; import java.net.*; import java.util.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
414,732
protected List<HeaderItem> getHeaderItems() { List<HeaderItem> headerItems = new ArrayList<HeaderItem>(); headerItems.add(CssHeaderItem .forReference(new PackageResourceReference(FormPanel.class, "FormPanel.css"))); return headerItems; }
List<HeaderItem> function() { List<HeaderItem> headerItems = new ArrayList<HeaderItem>(); headerItems.add(CssHeaderItem .forReference(new PackageResourceReference(FormPanel.class, STR))); return headerItems; }
/** * Retrieves all {@link HeaderItem}s like Javascript files and CSS files * that should be included in each page that contains a {@link FormPanel}. * Override this method to provide different CSS. * * @return all {@link HeaderItem}s to add to the page. */
Retrieves all <code>HeaderItem</code>s like Javascript files and CSS files that should be included in each page that contains a <code>FormPanel</code>. Override this method to provide different CSS
getHeaderItems
{ "repo_name": "thombergs/wicked-forms", "path": "wicked-forms/wicked-forms-wicket6/src/main/java/de/adesso/wickedforms/wicket6/components/FormPanel.java", "license": "apache-2.0", "size": 5287 }
[ "java.util.ArrayList", "java.util.List", "org.apache.wicket.markup.head.CssHeaderItem", "org.apache.wicket.markup.head.HeaderItem", "org.apache.wicket.request.resource.PackageResourceReference" ]
import java.util.ArrayList; import java.util.List; import org.apache.wicket.markup.head.CssHeaderItem; import org.apache.wicket.markup.head.HeaderItem; import org.apache.wicket.request.resource.PackageResourceReference;
import java.util.*; import org.apache.wicket.markup.head.*; import org.apache.wicket.request.resource.*;
[ "java.util", "org.apache.wicket" ]
java.util; org.apache.wicket;
2,601,105
public void startDocument() throws SAXException{ }//end-method
void function() throws SAXException{ }
/** * Operations performed at the start of document */
Operations performed at the start of document
startDocument
{ "repo_name": "optsicom-urjc/optsicom-framework", "path": "es.optsicom.lib.npst/src/main/java/javanpst/data/readers/distributionReaders/WilcoxonRankSumReaderFormat.java", "license": "epl-1.0", "size": 3302 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,055,915
@Override public boolean cancel() { synchronized (this) { if (isDone()) return true; U.log(log, "Cancelled rebalancing from all nodes [topology=" + topologyVersion() + ']'); if (!ctx.kernalContext().isStopping()) { ...
@Override boolean function() { synchronized (this) { if (isDone()) return true; U.log(log, STR + topologyVersion() + ']'); if (!ctx.kernalContext().isStopping()) { for (UUID nodeId : remaining.keySet()) cleanupRemoteContexts(nodeId); } remaining.clear(); checkIsDone(true ); } return true; }
/** * Cancels this future. * * @return {@code True}. */
Cancels this future
cancel
{ "repo_name": "alexzaitzev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java", "license": "apache-2.0", "size": 47441 }
[ "org.apache.ignite.internal.util.typedef.internal.U" ]
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,918,485
public void createThumbnails(NodeRef nodeRef, Set<String> thumbnailNames) { if(thumbnailNames == null || thumbnailNames.size() == 0) { return; } ThumbnailRegistry registry = thumbnailService.getThumbnailRegistry(); // If there's nothing currently registered to gen...
void function(NodeRef nodeRef, Set<String> thumbnailNames) { if(thumbnailNames == null thumbnailNames.size() == 0) { return; } ThumbnailRegistry registry = thumbnailService.getThumbnailRegistry(); Serializable value = this.nodeService.getProperty(nodeRef, ContentModel.PROP_CONTENT); ContentData contentData = DefaultTyp...
/** * Asynchronously generates thumbnails for the given node. * * @param nodeRef NodeRef */
Asynchronously generates thumbnails for the given node
createThumbnails
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java", "license": "lgpl-3.0", "size": 150987 }
[ "java.io.Serializable", "java.util.Set", "org.alfresco.model.ContentModel", "org.alfresco.repo.thumbnail.ThumbnailDefinition", "org.alfresco.repo.thumbnail.ThumbnailHelper", "org.alfresco.repo.thumbnail.ThumbnailRegistry", "org.alfresco.service.cmr.repository.ContentData", "org.alfresco.service.cmr.re...
import java.io.Serializable; import java.util.Set; import org.alfresco.model.ContentModel; import org.alfresco.repo.thumbnail.ThumbnailDefinition; import org.alfresco.repo.thumbnail.ThumbnailHelper; import org.alfresco.repo.thumbnail.ThumbnailRegistry; import org.alfresco.service.cmr.repository.ContentData; import org....
import java.io.*; import java.util.*; import org.alfresco.model.*; import org.alfresco.repo.thumbnail.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.cmr.repository.datatype.*; import org.apache.chemistry.opencmis.commons.enums.*;
[ "java.io", "java.util", "org.alfresco.model", "org.alfresco.repo", "org.alfresco.service", "org.apache.chemistry" ]
java.io; java.util; org.alfresco.model; org.alfresco.repo; org.alfresco.service; org.apache.chemistry;
2,661,029
public static Deserializer<BaseOptions> deserializer() { return (data, offset, length) -> { checkInput(data, offset, length, FIXED_HEADER_LENGTH); BaseOptions baseOptions = new BaseOptions(); ByteBuffer bb = ByteBuffer.wrap(data, offset, length); baseOptions...
static Deserializer<BaseOptions> function() { return (data, offset, length) -> { checkInput(data, offset, length, FIXED_HEADER_LENGTH); BaseOptions baseOptions = new BaseOptions(); ByteBuffer bb = ByteBuffer.wrap(data, offset, length); baseOptions.nextHeader = bb.get(); baseOptions.headerExtLength = bb.get(); int optio...
/** * Deserializer function for IPv6 base options. * * @return deserializer function */
Deserializer function for IPv6 base options
deserializer
{ "repo_name": "gkatsikas/onos", "path": "utils/misc/src/main/java/org/onlab/packet/ipv6/BaseOptions.java", "license": "apache-2.0", "size": 6991 }
[ "java.nio.ByteBuffer", "org.onlab.packet.Data", "org.onlab.packet.Deserializer", "org.onlab.packet.IPacket", "org.onlab.packet.IPv6", "org.onlab.packet.PacketUtils" ]
import java.nio.ByteBuffer; import org.onlab.packet.Data; import org.onlab.packet.Deserializer; import org.onlab.packet.IPacket; import org.onlab.packet.IPv6; import org.onlab.packet.PacketUtils;
import java.nio.*; import org.onlab.packet.*;
[ "java.nio", "org.onlab.packet" ]
java.nio; org.onlab.packet;
2,844,120
public void onBypassFeedback(L2PcInstance player, String command) { if (command.equalsIgnoreCase("TerritoryStatus")) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); if (getCastle().getOwnerId() > 0) { html.setFile("data/html/territorystatus.htm"); L2Clan clan = ClanTable.getInsta...
void function(L2PcInstance player, String command) { if (command.equalsIgnoreCase(STR)) { NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); if (getCastle().getOwnerId() > 0) { html.setFile(STR); L2Clan clan = ClanTable.getInstance().getClan(getCastle().getOwnerId()); html.replace(STR, clan.getName()); html.repla...
/** * Open a quest or chat window on client with the text of the L2Npc in function of the command. * @param player The player to test * @param command The command string received from client */
Open a quest or chat window on client with the text of the L2Npc in function of the command
onBypassFeedback
{ "repo_name": "VytautasBoznis/l2.skilas.lt", "path": "aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/L2Npc.java", "license": "gpl-2.0", "size": 55009 }
[ "net.sf.l2j.gameserver.datatables.ClanTable", "net.sf.l2j.gameserver.model.L2Clan", "net.sf.l2j.gameserver.model.actor.instance.L2PcInstance", "net.sf.l2j.gameserver.model.quest.Quest", "net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage" ]
import net.sf.l2j.gameserver.datatables.ClanTable; import net.sf.l2j.gameserver.model.L2Clan; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.quest.Quest; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
import net.sf.l2j.gameserver.datatables.*; import net.sf.l2j.gameserver.model.*; import net.sf.l2j.gameserver.model.actor.instance.*; import net.sf.l2j.gameserver.model.quest.*; import net.sf.l2j.gameserver.network.serverpackets.*;
[ "net.sf.l2j" ]
net.sf.l2j;
2,190,562
public Optional<HelperFunctions.ValueConverterHelperInfo> converterFor(SoyType valueType) { // Since updateTables... is idempotent we just rerun it to boil it down to a key into our table. Optional<SoyType> keyTypeOpt = updateTablesBasedOnValueType(valueType, false); if (keyTypeOpt.isPresent()) { re...
Optional<HelperFunctions.ValueConverterHelperInfo> function(SoyType valueType) { Optional<SoyType> keyTypeOpt = updateTablesBasedOnValueType(valueType, false); if (keyTypeOpt.isPresent()) { return Optional.of(valueConverterHelperInfo.get(keyTypeOpt.get())); } else { return Optional.absent(); } }
/** * The info for the converter for the given type or absent if no conversion is necessary. */
The info for the converter for the given type or absent if no conversion is necessary
converterFor
{ "repo_name": "iacdingping/closure-templates", "path": "java/src/com/google/template/soy/jssrc/internal/CollectTypeHelpersExprVisitor.java", "license": "apache-2.0", "size": 15347 }
[ "com.google.common.base.Optional", "com.google.template.soy.types.SoyType" ]
import com.google.common.base.Optional; import com.google.template.soy.types.SoyType;
import com.google.common.base.*; import com.google.template.soy.types.*;
[ "com.google.common", "com.google.template" ]
com.google.common; com.google.template;
109,134
public static int[] getRGB( BufferedImage image, int x, int y, int width, int height, int[] pixels ) { int type = image.getType(); if ( type == BufferedImage.TYPE_INT_ARGB || type == BufferedImage.TYPE_INT_RGB ) return (int [])image.getRaster().getDataElements( x, y, width, height, pixels ); return image.ge...
static int[] function( BufferedImage image, int x, int y, int width, int height, int[] pixels ) { int type = image.getType(); if ( type == BufferedImage.TYPE_INT_ARGB type == BufferedImage.TYPE_INT_RGB ) return (int [])image.getRaster().getDataElements( x, y, width, height, pixels ); return image.getRGB( x, y, width, h...
/** * A convenience method for getting ARGB pixels from an image. This tries to avoid the performance * penalty of BufferedImage.getRGB unmanaging the image. * @param image a BufferedImage object * @param x the left edge of the pixel block * @param y the right edge of the pixel block ...
A convenience method for getting ARGB pixels from an image. This tries to avoid the performance penalty of BufferedImage.getRGB unmanaging the image
getRGB
{ "repo_name": "x3r/WarpImage", "path": "src/com/jhlabs/image/ImageUtils.java", "license": "mit", "size": 9619 }
[ "java.awt.image.BufferedImage" ]
import java.awt.image.BufferedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
1,948,283
static HttpData copyOf(ByteBuf data) { requireNonNull(data, "data"); if (!data.isReadable()) { return empty(); } return wrap(ByteBufUtil.getBytes(data)); } /** * Converts the specified {@code text} into an {@link HttpData}. * * @param charset the ...
static HttpData copyOf(ByteBuf data) { requireNonNull(data, "data"); if (!data.isReadable()) { return empty(); } return wrap(ByteBufUtil.getBytes(data)); } /** * Converts the specified {@code text} into an {@link HttpData}. * * @param charset the {@link Charset} to use for encoding {@code text}
/** * Creates a new instance from the specified {@link ByteBuf} by first copying it's content. The reference * count of {@link ByteBuf} will not be changed. * * @return a new {@link HttpData}. {@link #empty()} if the length of the specified array is 0. */
Creates a new instance from the specified <code>ByteBuf</code> by first copying it's content. The reference count of <code>ByteBuf</code> will not be changed
copyOf
{ "repo_name": "anuraaga/armeria", "path": "core/src/main/java/com/linecorp/armeria/common/HttpData.java", "license": "apache-2.0", "size": 13337 }
[ "io.netty.buffer.ByteBuf", "io.netty.buffer.ByteBufUtil", "java.nio.charset.Charset", "java.util.Objects" ]
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufUtil; import java.nio.charset.Charset; import java.util.Objects;
import io.netty.buffer.*; import java.nio.charset.*; import java.util.*;
[ "io.netty.buffer", "java.nio", "java.util" ]
io.netty.buffer; java.nio; java.util;
2,381,257
@SuppressWarnings("RedundantTypeArguments") private void recordEvent(int type, long topVer, ClusterNode node, Collection<ClusterNode> topSnapshot) { assert node != null; if (ctx.event().isRecordable(type)) { DiscoveryEvent evt = new DiscoveryEvent(); ...
@SuppressWarnings(STR) void function(int type, long topVer, ClusterNode node, Collection<ClusterNode> topSnapshot) { assert node != null; if (ctx.event().isRecordable(type)) { DiscoveryEvent evt = new DiscoveryEvent(); evt.node(ctx.discovery().localNode()); evt.eventNode(node); evt.type(type); evt.topologySnapshot(topV...
/** * Method is called when any discovery event occurs. * * @param type Discovery event type. See {@link DiscoveryEvent} for more details. * @param topVer Topology version. * @param node Remote node this event is connected with. * @param topSnapshot Topology snapsho...
Method is called when any discovery event occurs
recordEvent
{ "repo_name": "agoncharuk/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java", "license": "apache-2.0", "size": 104025 }
[ "java.util.Collection", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.events.DiscoveryEvent" ]
import java.util.Collection; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.events.DiscoveryEvent;
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.events.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,709,222
public GQuery keyup(Function... f) { return bindOrFire(Event.ONKEYUP, null, f); }
GQuery function(Function... f) { return bindOrFire(Event.ONKEYUP, null, f); }
/** * Bind a set of functions to the keyup event of each matched element. Or trigger the event if no * functions are provided. */
Bind a set of functions to the keyup event of each matched element. Or trigger the event if no functions are provided
keyup
{ "repo_name": "manolo/gquery", "path": "gwtquery-core/src/main/java/com/google/gwt/query/client/GQuery.java", "license": "mit", "size": 164596 }
[ "com.google.gwt.user.client.Event" ]
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.*;
[ "com.google.gwt" ]
com.google.gwt;
1,162,157
@Deprecated public static Map createIdentityMapIfPossible(int initialCapacity) { return new IdentityHashMap(initialCapacity); }
static Map function(int initialCapacity) { return new IdentityHashMap(initialCapacity); }
/** * Create an identity Map if possible: This implementation always * creates a {@link java.util.IdentityHashMap}, since Spring 2.5 * requires JDK 1.4 anyway. * @param initialCapacity the initial capacity of the Map * @return the new Map instance * @deprecated as of Spring 2.5, for usage on JDK 1.4 or high...
Create an identity Map if possible: This implementation always creates a <code>java.util.IdentityHashMap</code>, since Spring 2.5 requires JDK 1.4 anyway
createIdentityMapIfPossible
{ "repo_name": "TinyGroup/tiny", "path": "framework/org.tinygroup.commons/src/main/java/org/tinygroup/commons/tools/CollectionFactory.java", "license": "gpl-3.0", "size": 11126 }
[ "java.util.IdentityHashMap", "java.util.Map" ]
import java.util.IdentityHashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,042,399
public String readLine() throws IOException { return this.fileReader.readLine(); }
String function() throws IOException { return this.fileReader.readLine(); }
/** * Read line. * * @return the string * @throws IOException * Signals that an I/O exception has occurred. */
Read line
readLine
{ "repo_name": "deric/clusteval-parent", "path": "wi-utils/src/main/java/de/wiwie/wiutils/utils/parse/TextFileParser.java", "license": "gpl-3.0", "size": 19864 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
250,131
@Override public Collection<? extends EStructuralFeature> getChildrenFeatures( Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(TimePackage.Literals.TRANSLATION__START); childrenFeatures.add(TimePackage.Literals.TRANSLATION__OFFSET); } ...
Collection<? extends EStructuralFeature> function( Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(TimePackage.Literals.TRANSLATION__START); childrenFeatures.add(TimePackage.Literals.TRANSLATION__OFFSET); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-u...
This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>.
getChildrenFeatures
{ "repo_name": "smadelenat/CapellaModeAutomata", "path": "Language/Time/com.thalesgroup.trt.mde.vp.time.model.edit/src/com/thalesgroup/trt/mde/vp/time/time/provider/TranslationItemProvider.java", "license": "epl-1.0", "size": 8493 }
[ "com.thalesgroup.trt.mde.vp.time.time.TimePackage", "java.util.Collection", "org.eclipse.emf.ecore.EStructuralFeature" ]
import com.thalesgroup.trt.mde.vp.time.time.TimePackage; import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature;
import com.thalesgroup.trt.mde.vp.time.time.*; import java.util.*; import org.eclipse.emf.ecore.*;
[ "com.thalesgroup.trt", "java.util", "org.eclipse.emf" ]
com.thalesgroup.trt; java.util; org.eclipse.emf;
1,492,408
static RuleSet getJoinTransitiveClosureRules() { return RuleSets.ofList(ImmutableSet.<RelOptRule> builder() .add( RuleInstance.DRILL_JOIN_PUSH_TRANSITIVE_PREDICATES_RULE, DrillFilterJoinRules.DRILL_FILTER_INTO_JOIN, RuleInstance.REMOVE_IS_NOT_DISTINCT_FROM_RULE, ...
static RuleSet getJoinTransitiveClosureRules() { return RuleSets.ofList(ImmutableSet.<RelOptRule> builder() .add( RuleInstance.DRILL_JOIN_PUSH_TRANSITIVE_PREDICATES_RULE, DrillFilterJoinRules.DRILL_FILTER_INTO_JOIN, RuleInstance.REMOVE_IS_NOT_DISTINCT_FROM_RULE, DrillFilterAggregateTransposeRule.DRILL_LOGICAL_INSTANCE,...
/** * RuleSet for join transitive closure, used only in HepPlanner.<p> * TODO: {@link RuleInstance#DRILL_JOIN_PUSH_TRANSITIVE_PREDICATES_RULE} should be moved into {@link #staticRuleSet}, * (with using {@link DrillRelFactories#LOGICAL_BUILDER}) once CALCITE-1048 is solved. This block can be removed then. * ...
RuleSet for join transitive closure, used only in HepPlanner. (with using <code>DrillRelFactories#LOGICAL_BUILDER</code>) once CALCITE-1048 is solved. This block can be removed then
getJoinTransitiveClosureRules
{ "repo_name": "kkhatua/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/planner/PlannerPhase.java", "license": "apache-2.0", "size": 26686 }
[ "org.apache.calcite.plan.RelOptRule", "org.apache.calcite.tools.RuleSet", "org.apache.calcite.tools.RuleSets", "org.apache.drill.exec.planner.logical.DrillFilterAggregateTransposeRule", "org.apache.drill.exec.planner.logical.DrillFilterJoinRules", "org.apache.drill.shaded.guava.com.google.common.collect.I...
import org.apache.calcite.plan.RelOptRule; import org.apache.calcite.tools.RuleSet; import org.apache.calcite.tools.RuleSets; import org.apache.drill.exec.planner.logical.DrillFilterAggregateTransposeRule; import org.apache.drill.exec.planner.logical.DrillFilterJoinRules; import org.apache.drill.shaded.guava.com.google...
import org.apache.calcite.plan.*; import org.apache.calcite.tools.*; import org.apache.drill.exec.planner.logical.*; import org.apache.drill.shaded.guava.com.google.common.collect.*;
[ "org.apache.calcite", "org.apache.drill" ]
org.apache.calcite; org.apache.drill;
507,841
public int read(byte[] data, int ofs, int len) throws IOException;
int function(byte[] data, int ofs, int len) throws IOException;
/** * Read up to len bytes from the stream * * @param data The array to read into * @param ofs The offset into the array at which to start writing * @param len The maximum number of bytes to read * @return The number of bytes read or -1 to indicate no more bytes are available * @throws IOException...
Read up to len bytes from the stream
read
{ "repo_name": "fluddokt/opsu", "path": "src/org/newdawn/slick/openal/AudioInputStream.java", "license": "gpl-3.0", "size": 3879 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
878,449
public void doTreeRefreshRequest() throws Exception { HttpSession session = m_classReq.getSession(); String vocab = m_classReq.getParameter("vocab"); vocab = m_eBean.getVocabAttr(m_eUser, vocab, EVSSearch.VOCAB_DISPLAY, EVSSearch.VO...
void function() throws Exception { HttpSession session = m_classReq.getSession(); String vocab = m_classReq.getParameter("vocab"); vocab = m_eBean.getVocabAttr(m_eUser, vocab, EVSSearch.VOCAB_DISPLAY, EVSSearch.VOCAB_NAME); DataManager.setAttribute(session, STR, vocab); this.doCollapseAllNodes(vocab); EVSMasterTree tre...
/** * gets request parameters to store the selected values in the session according to what the menu action is * * @throws Exception */
gets request parameters to store the selected values in the session according to what the menu action is
doTreeRefreshRequest
{ "repo_name": "NCIP/cadsr-cdecurate", "path": "src/gov/nih/nci/cadsr/cdecurate/tool/EVSSearch.java", "license": "bsd-3-clause", "size": 284529 }
[ "gov.nih.nci.cadsr.cdecurate.util.DataManager", "javax.servlet.http.HttpSession" ]
import gov.nih.nci.cadsr.cdecurate.util.DataManager; import javax.servlet.http.HttpSession;
import gov.nih.nci.cadsr.cdecurate.util.*; import javax.servlet.http.*;
[ "gov.nih.nci", "javax.servlet" ]
gov.nih.nci; javax.servlet;
2,581,392
@Nullable PublicKey getPublicKeyForIBAN(String iban);
PublicKey getPublicKeyForIBAN(String iban);
/** * Get the public key for the user with given IBAN * * @param iban IBAM * @return A public key of type EdDSA25519, or null if not found */
Get the public key for the user with given IBAN
getPublicKeyForIBAN
{ "repo_name": "MatthijsKok/TI2806-Contextproject", "path": "BankChain/app/src/main/java/nl/tudelft/ewi/ds/bankchain/blockchain/IBlockchain.java", "license": "lgpl-3.0", "size": 1229 }
[ "java.security.PublicKey" ]
import java.security.PublicKey;
import java.security.*;
[ "java.security" ]
java.security;
466,969
public NamedGraph getGraph(TimeSpan ts) { return this.getNamedGraphSet().getGraph(getGraphNameFor(ts)); }
NamedGraph function(TimeSpan ts) { return this.getNamedGraphSet().getGraph(getGraphNameFor(ts)); }
/** * Returns the corresponding graph. * * @param ts * The time span defining the graph. * * @return The corresponding graph or null. */
Returns the corresponding graph
getGraph
{ "repo_name": "ox-it/gaboto", "path": "src/main/java/net/sf/gaboto/Gaboto.java", "license": "bsd-3-clause", "size": 42205 }
[ "de.fuberlin.wiwiss.ng4j.NamedGraph", "net.sf.gaboto.time.TimeSpan" ]
import de.fuberlin.wiwiss.ng4j.NamedGraph; import net.sf.gaboto.time.TimeSpan;
import de.fuberlin.wiwiss.ng4j.*; import net.sf.gaboto.time.*;
[ "de.fuberlin.wiwiss", "net.sf.gaboto" ]
de.fuberlin.wiwiss; net.sf.gaboto;
743,477
// get a soffice factory object SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF()); try { log.println( "creating a sheetdocument" ); xSheetDoc = SOF.createCalcDoc(null); } catch (com.sun.star.uno.Exception e) { // Some exce...
SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)tParam.getMSF()); try { log.println( STR ); xSheetDoc = SOF.createCalcDoc(null); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException( STR, e ); } }
/** * Creates Spreadsheet document. */
Creates Spreadsheet document
initialize
{ "repo_name": "qt-haiku/LibreOffice", "path": "qadevOOo/tests/java/mod/_sc/ScLabelRangesObj.java", "license": "gpl-3.0", "size": 5208 }
[ "com.sun.star.lang.XMultiServiceFactory" ]
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.*;
[ "com.sun.star" ]
com.sun.star;
1,330,040
public Collection<String> attributes() { return attributeInfo.keySet(); }
Collection<String> function() { return attributeInfo.keySet(); }
/** * Returns a collection containing the name of * each attribute in the schema. * same as fields(), just for convenience - CDS * @return the collection of the schema's attribute names */
Returns a collection containing the name of each attribute in the schema. same as fields(), just for convenience - CDS
attributes
{ "repo_name": "RonyK/SuaDB", "path": "suadb-server/src/suadb/record/Schema.java", "license": "apache-2.0", "size": 9111 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
803,041
public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.NULL); setControl(container); container.setLayout(new GridLayout(3, false)); lblLocation = new Label(container, SWT.NONE); lblLocation.setLayoutData(new GridDa...
void function(Composite parent) { Composite container = new Composite(parent, SWT.NULL); setControl(container); container.setLayout(new GridLayout(3, false)); lblLocation = new Label(container, SWT.NONE); lblLocation.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); lblLocation.setText(Resources.g...
/** * Creates the design of this page * * This adds all the controls to the page along with their listeners. * * @param parent the parent * @note {@link #tablePreview} is not visible until a file is loaded. */
Creates the design of this page This adds all the controls to the page along with their listeners
createControl
{ "repo_name": "jgaupp/arx", "path": "src/gui/org/deidentifier/arx/gui/view/impl/wizard/ImportWizardPageCSV.java", "license": "apache-2.0", "size": 31034 }
[ "org.deidentifier.arx.gui.resources.Resources", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.layout.GridLayout", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Label" ]
import org.deidentifier.arx.gui.resources.Resources; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label;
import org.deidentifier.arx.gui.resources.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.deidentifier.arx", "org.eclipse.swt" ]
org.deidentifier.arx; org.eclipse.swt;
1,840,174
@Override public void setupDialog( Dialog dialog, int style ){ Bundle args = getArguments(); if ( args != null ) mBuzaToUse = args.getParcelable(ARG_BUZA); View v = null; TextView tv = null;
void function( Dialog dialog, int style ){ Bundle args = getArguments(); if ( args != null ) mBuzaToUse = args.getParcelable(ARG_BUZA); View v = null; TextView tv = null;
/** * Defines the dialog to use for the bottom sheet * * @param dialog - The dialog in use * @param style - A style to apply */
Defines the dialog to use for the bottom sheet
setupDialog
{ "repo_name": "pylapp/Buza", "path": "app/src/main/java/pylapp/buza/android/views/ModalBottomSheet.java", "license": "mit", "size": 9828 }
[ "android.app.Dialog", "android.os.Bundle", "android.view.View", "android.widget.TextView" ]
import android.app.Dialog; import android.os.Bundle; import android.view.View; import android.widget.TextView;
import android.app.*; import android.os.*; import android.view.*; import android.widget.*;
[ "android.app", "android.os", "android.view", "android.widget" ]
android.app; android.os; android.view; android.widget;
178,685
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<NamespaceResourceInner> listByResourceGroup(String resourceGroupName);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<NamespaceResourceInner> listByResourceGroup(String resourceGroupName);
/** * Lists the available namespaces within a resourceGroup. * * @param resourceGroupName The name of the resource group. If resourceGroupName value is null the method lists all * the namespaces within subscription. * @throws IllegalArgumentException thrown if parameters fail the validation...
Lists the available namespaces within a resourceGroup
listByResourceGroup
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/notificationhubs/azure-resourcemanager-notificationhubs/src/main/java/com/azure/resourcemanager/notificationhubs/fluent/NamespacesClient.java", "license": "mit", "size": 24889 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.resourcemanager.notificationhubs.fluent.models.NamespaceResourceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.notificationhubs.fluent.models.NamespaceResourceInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.notificationhubs.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,117,151
private static boolean tokenRefetchNeeded(IOException ex, InetSocketAddress targetAddr) { if (ex instanceof InvalidBlockTokenException || ex instanceof InvalidToken) { LOG.info("Access token was invalid when connecting to " + targetAddr + " : " + ex); return true; } return...
static boolean function(IOException ex, InetSocketAddress targetAddr) { if (ex instanceof InvalidBlockTokenException ex instanceof InvalidToken) { LOG.info(STR + targetAddr + STR + ex); return true; } return false; }
/** * Should the block access token be refetched on an exception * * @param ex Exception received * @param targetAddr Target datanode address from where exception was received * @return true if block access token has expired or invalid and it should be * refetched */
Should the block access token be refetched on an exception
tokenRefetchNeeded
{ "repo_name": "yelshater/hadoop-2.3.0", "path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/DFSClient.java", "license": "apache-2.0", "size": 108346 }
[ "java.io.IOException", "java.net.InetSocketAddress", "org.apache.hadoop.hdfs.security.token.block.InvalidBlockTokenException", "org.apache.hadoop.security.token.SecretManager" ]
import java.io.IOException; import java.net.InetSocketAddress; import org.apache.hadoop.hdfs.security.token.block.InvalidBlockTokenException; import org.apache.hadoop.security.token.SecretManager;
import java.io.*; import java.net.*; import org.apache.hadoop.hdfs.security.token.block.*; import org.apache.hadoop.security.token.*;
[ "java.io", "java.net", "org.apache.hadoop" ]
java.io; java.net; org.apache.hadoop;
2,161,302
@Override public void run() { long maintainTime = 0; // Loop until we receive a shutdown command while (sendfileRunning) { // Loop if endpoint is paused while (sendfileRunning && paused) { try { ...
void function() { long maintainTime = 0; while (sendfileRunning) { while (sendfileRunning && paused) { try { Thread.sleep(1000); } catch (InterruptedException e) { } } while (sendfileRunning && sendfileCount < 1 && addS.size() < 1) { maintainTime = 0; try { synchronized (this) { this.wait(); } } catch (InterruptedExcep...
/** * The background thread that listens for incoming TCP/IP connections * and hands them off to an appropriate processor. */
The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor
run
{ "repo_name": "Nickname0806/Test_Q4", "path": "java/org/apache/tomcat/util/net/AprEndpoint.java", "license": "apache-2.0", "size": 108828 }
[ "org.apache.tomcat.jni.Error", "org.apache.tomcat.jni.Poll", "org.apache.tomcat.jni.Pool", "org.apache.tomcat.jni.Socket", "org.apache.tomcat.jni.Status", "org.apache.tomcat.util.ExceptionUtils" ]
import org.apache.tomcat.jni.Error; import org.apache.tomcat.jni.Poll; import org.apache.tomcat.jni.Pool; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.jni.Status; import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.jni.*; import org.apache.tomcat.util.*;
[ "org.apache.tomcat" ]
org.apache.tomcat;
2,273,360
public void parseLine(String line) { Objects.requireNonNull(line, "The argument 'line' must not be null."); lineParser = lineParser.parseLine(line); }
void function(String line) { Objects.requireNonNull(line, STR); lineParser = lineParser.parseLine(line); }
/** * Parses the specified line. * <p> * As soon as a new {@link Violation} is created it is handed to the {@link Consumer} specified during * construction. * * @param line * the line to parse */
Parses the specified line. As soon as a new <code>Violation</code> is created it is handed to the <code>Consumer</code> specified during construction
parseLine
{ "repo_name": "CodeFX-org/jdeps-wall-of-shame", "path": "src/main/java/org/codefx/jwos/jdeps/parse/ViolationParser.java", "license": "gpl-3.0", "size": 5656 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,842,713
public void setForClazz(final Class<? extends AbstractResource> forClass) { forClazz = forClass; }
void function(final Class<? extends AbstractResource> forClass) { forClazz = forClass; }
/** * Sets the class the builder can build. * @forClass The class the builder can build. */
Sets the class the builder can build
setForClazz
{ "repo_name": "FTSRG/massif", "path": "maven/hu.bme.mit.massif.oslc.adaptor/src/main/java/hu/bme/mit/massif/oslc/adaptor/resources/factory/AbstractResourceBuilder.java", "license": "epl-1.0", "size": 4855 }
[ "org.eclipse.lyo.oslc4j.core.model.AbstractResource" ]
import org.eclipse.lyo.oslc4j.core.model.AbstractResource;
import org.eclipse.lyo.oslc4j.core.model.*;
[ "org.eclipse.lyo" ]
org.eclipse.lyo;
566,208
public S prepare(Provider<? extends Source<? extends T>> provider) { if (provider == null) { throw new IllegalArgumentException("objects must not be null"); //$NON-NLS-1$ } return prepare(toDataModelSourceFactory(provider)); }
S function(Provider<? extends Source<? extends T>> provider) { if (provider == null) { throw new IllegalArgumentException(STR); } return prepare(toDataModelSourceFactory(provider)); }
/** * Sets the test data set for this input. * @param provider the test data set provider * @return this * @since 0.6.0 */
Sets the test data set for this input
prepare
{ "repo_name": "asakusafw/asakusafw", "path": "testing-project/asakusa-test-driver/src/main/java/com/asakusafw/testdriver/FlowDriverInput.java", "license": "apache-2.0", "size": 7954 }
[ "com.asakusafw.utils.io.Provider", "com.asakusafw.utils.io.Source" ]
import com.asakusafw.utils.io.Provider; import com.asakusafw.utils.io.Source;
import com.asakusafw.utils.io.*;
[ "com.asakusafw.utils" ]
com.asakusafw.utils;
2,261,760
public T caseAnimateType(AnimateType object) { return null; }
T function(AnimateType object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Animate Type</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of in...
Returns the result of interpreting the object as an instance of 'Animate Type'. This implementation returns null; returning a non-null result will terminate the switch.
caseAnimateType
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore/src/org/w3/_2001/smil20/language/util/LanguageSwitch.java", "license": "apache-2.0", "size": 9454 }
[ "org.w3._2001.smil20.language.AnimateType" ]
import org.w3._2001.smil20.language.AnimateType;
import org.w3.*;
[ "org.w3" ]
org.w3;
2,546,204
public ResourceLocalService getResourceLocalService() { return resourceLocalService; }
ResourceLocalService function() { return resourceLocalService; }
/** * Returns the resource local service. * * @return the resource local service */
Returns the resource local service
getResourceLocalService
{ "repo_name": "fraunhoferfokus/govapps", "path": "data-portlet/src/main/java/de/fraunhofer/fokus/movepla/service/base/EntitlementLocalServiceBaseImpl.java", "license": "bsd-3-clause", "size": 42460 }
[ "com.liferay.portal.service.ResourceLocalService" ]
import com.liferay.portal.service.ResourceLocalService;
import com.liferay.portal.service.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,476,736
public FileHandle[] list () { if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot list a classpath directory: " + file); String[] relativePaths = file().list(); if (relativePaths == null) return new FileHandle[0]; FileHandle[] handles = new FileHandle[relativePaths.length]; for (int ...
FileHandle[] function () { if (type == FileType.Classpath) throw new GdxRuntimeException(STR + file); String[] relativePaths = file().list(); if (relativePaths == null) return new FileHandle[0]; FileHandle[] handles = new FileHandle[relativePaths.length]; for (int i = 0, n = relativePaths.length; i < n; i++) handles[i]...
/** Returns the paths to the children of this directory. Returns an empty list if this file handle represents a file and not a * directory. On the desktop, an {@link FileType#Internal} handle to a directory on the classpath will return a zero length * array. * @throws GdxRuntimeException if this file is an {@l...
Returns the paths to the children of this directory. Returns an empty list if this file handle represents a file and not a directory. On the desktop, an <code>FileType#Internal</code> handle to a directory on the classpath will return a zero length array
list
{ "repo_name": "jiachenning/libgdx", "path": "gdx/src/com/badlogic/gdx/files/FileHandle.java", "license": "apache-2.0", "size": 31073 }
[ "com.badlogic.gdx.Files", "com.badlogic.gdx.utils.GdxRuntimeException" ]
import com.badlogic.gdx.Files; import com.badlogic.gdx.utils.GdxRuntimeException;
import com.badlogic.gdx.*; import com.badlogic.gdx.utils.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
1,104,489
private static JsonObject preProcessEndpointConfig(JsonObject configObject) { if (configObject.has(ImportExportConstants.ENDPOINT_CONFIG)) { JsonObject endpointConfig = configObject.get(ImportExportConstants.ENDPOINT_CONFIG).getAsJsonObject(); if (endpointConfig.has(APIConstants.ENDP...
static JsonObject function(JsonObject configObject) { if (configObject.has(ImportExportConstants.ENDPOINT_CONFIG)) { JsonObject endpointConfig = configObject.get(ImportExportConstants.ENDPOINT_CONFIG).getAsJsonObject(); if (endpointConfig.has(APIConstants.ENDPOINT_SECURITY)) { JsonObject endpointSecurity = endpointConf...
/** * This function will preprocess endpoint config security. * * @param configObject Data object from the API/API Product configuration * @return API config object with pre processed endpoint config */
This function will preprocess endpoint config security
preProcessEndpointConfig
{ "repo_name": "chamindias/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/ImportUtils.java", "license": "apache-2.0", "size": 122878 }
[ "com.google.gson.JsonObject", "org.wso2.carbon.apimgt.impl.APIConstants", "org.wso2.carbon.apimgt.impl.importexport.ImportExportConstants" ]
import com.google.gson.JsonObject; import org.wso2.carbon.apimgt.impl.APIConstants; import org.wso2.carbon.apimgt.impl.importexport.ImportExportConstants;
import com.google.gson.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.importexport.*;
[ "com.google.gson", "org.wso2.carbon" ]
com.google.gson; org.wso2.carbon;
2,684,262
public NamingEnumeration list(String name) throws NamingException { return getBoundContext().list(parseName(name)); }
NamingEnumeration function(String name) throws NamingException { return getBoundContext().list(parseName(name)); }
/** * Enumerates the names bound in the named context, along with the class * names of objects bound to them. * * @param name the name of the context to list * @return an enumeration of the names and class names of the bindings in * this context. Each element of the enumeration is of ty...
Enumerates the names bound in the named context, along with the class names of objects bound to them
list
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-connectors/naming/src/org/apache/naming/modules/java/SelectorContext.java", "license": "apache-2.0", "size": 26757 }
[ "javax.naming.NamingEnumeration", "javax.naming.NamingException" ]
import javax.naming.NamingEnumeration; import javax.naming.NamingException;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
291,980
@Override public Iterator<E> iterator() { return new SimpleSetIterator(); } private class SimpleSetIterator implements Iterator<E> { private int index = 0;
Iterator<E> function() { return new SimpleSetIterator(); } private class SimpleSetIterator implements Iterator<E> { private int index = 0;
/** * method return iterator of set. * * @return iterator of set */
method return iterator of set
iterator
{ "repo_name": "Basil135/vkucyh", "path": "chapter_005/src/main/java/ru/job4j/pro/set/SimpleArraySet.java", "license": "apache-2.0", "size": 2876 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,650,105
public SnapshotsClient getSnapshots() { return this.snapshots; } private final DiskEncryptionSetsClient diskEncryptionSets;
SnapshotsClient function() { return this.snapshots; } private final DiskEncryptionSetsClient diskEncryptionSets;
/** * Gets the SnapshotsClient object to access its operations. * * @return the SnapshotsClient object. */
Gets the SnapshotsClient object to access its operations
getSnapshots
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java", "license": "mit", "size": 31289 }
[ "com.azure.resourcemanager.compute.fluent.DiskEncryptionSetsClient", "com.azure.resourcemanager.compute.fluent.SnapshotsClient" ]
import com.azure.resourcemanager.compute.fluent.DiskEncryptionSetsClient; import com.azure.resourcemanager.compute.fluent.SnapshotsClient;
import com.azure.resourcemanager.compute.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
719,662
@Override public void run() { final Map<String,String> mdc = Logging.getCopyOfContextMap(); try { Logging.putPrefix("rtc"); processEvent(); } catch (Throwable t) { LOG.warn("Unexpected exception processing event", t); Logging.setContextMap...
void function() { final Map<String,String> mdc = Logging.getCopyOfContextMap(); try { Logging.putPrefix("rtc"); processEvent(); } catch (Throwable t) { LOG.warn(STR, t); Logging.setContextMap(mdc); } }
/** * Process the event depending on the UEI and update date */
Process the event depending on the UEI and update date
run
{ "repo_name": "tdefilip/opennms", "path": "opennms-services/src/main/java/org/opennms/netmgt/rtc/DataUpdater.java", "license": "agpl-3.0", "size": 17791 }
[ "java.util.Map", "org.opennms.core.logging.Logging" ]
import java.util.Map; import org.opennms.core.logging.Logging;
import java.util.*; import org.opennms.core.logging.*;
[ "java.util", "org.opennms.core" ]
java.util; org.opennms.core;
1,004,740
protected final BigInteger popValue() { currentValue = valueStack.pop(); return currentValue; }
final BigInteger function() { currentValue = valueStack.pop(); return currentValue; }
/** * Pops a value off the stack and makes it the current value. * @return pop a value off the stack and make it the current value */
Pops a value off the stack and makes it the current value
popValue
{ "repo_name": "rmswimkktt/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/metrics/AbstractComplexityCheck.java", "license": "lgpl-2.1", "size": 5546 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
41,128
public static void main(String[] args) { ClassCache cache = new ClassCache(); Enumeration<String> packages = cache.packages(); while (packages.hasMoreElements()) { String key = packages.nextElement(); System.out.println(key + ": " + cache.getClassnames(key).size()); } }
static void function(String[] args) { ClassCache cache = new ClassCache(); Enumeration<String> packages = cache.packages(); while (packages.hasMoreElements()) { String key = packages.nextElement(); System.out.println(key + STR + cache.getClassnames(key).size()); } }
/** * For testing only. * * @param args ignored */
For testing only
main
{ "repo_name": "sp4x/kd-cloud", "path": "weka-stripped/src/main/java/weka/core/ClassCache.java", "license": "agpl-3.0", "size": 9294 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
676,938
public Object clone() throws CloneNotSupportedException { return super.clone(); } public static class Pin extends DialPointer { static final long serialVersionUID = -8445860485367689750L; private transient Paint paint; private transient Flo...
Object function() throws CloneNotSupportedException { return super.clone(); } public static class Pin extends DialPointer { static final long serialVersionUID = -8445860485367689750L; private transient Paint paint; private transient Float stroke; public Pin() { this(0); } public Pin(int datasetIndex) { super(datasetInd...
/** * Returns a clone of the pointer. * * @return a clone. * * @throws CloneNotSupportedException if one of the attributes cannot * be cloned. */
Returns a clone of the pointer
clone
{ "repo_name": "djun100/afreechart", "path": "src/org/afree/chart/plot/dial/DialPointer.java", "license": "lgpl-3.0", "size": 20703 }
[ "android.graphics.Color", "android.graphics.Paint" ]
import android.graphics.Color; import android.graphics.Paint;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
764,918
public String format(DateTimeFormatter formatter) { Objects.requireNonNull(formatter, "formatter"); return formatter.format(this); }
String function(DateTimeFormatter formatter) { Objects.requireNonNull(formatter, STR); return formatter.format(this); }
/** * Formats this month-day using the specified formatter. * <p> * This month-day will be passed to the formatter to produce a string. * * @param formatter the formatter to use, not null * @return the formatted month-day string, not null * @throws DateTimeException if an error occur...
Formats this month-day using the specified formatter. This month-day will be passed to the formatter to produce a string
format
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/java.base/share/classes/java/time/MonthDay.java", "license": "gpl-2.0", "size": 32767 }
[ "java.time.format.DateTimeFormatter", "java.util.Objects" ]
import java.time.format.DateTimeFormatter; import java.util.Objects;
import java.time.format.*; import java.util.*;
[ "java.time", "java.util" ]
java.time; java.util;
849,053
@Override public Iterator<Map.Entry<String, JsonNode>> fields() { return _children.entrySet().iterator(); }
Iterator<Map.Entry<String, JsonNode>> function() { return _children.entrySet().iterator(); }
/** * Method to use for accessing all fields (with both names * and values) of this JSON Object. */
Method to use for accessing all fields (with both names and values) of this JSON Object
fields
{ "repo_name": "sabob/ratel", "path": "ratel/src/com/google/ratel/deps/jackson/databind/node/ObjectNode.java", "license": "apache-2.0", "size": 24034 }
[ "com.google.ratel.deps.jackson.databind.JsonNode", "java.util.Iterator", "java.util.Map" ]
import com.google.ratel.deps.jackson.databind.JsonNode; import java.util.Iterator; import java.util.Map;
import com.google.ratel.deps.jackson.databind.*; import java.util.*;
[ "com.google.ratel", "java.util" ]
com.google.ratel; java.util;
297,779
public void setUser(Person user) { this.user = user; }
void function(Person user) { this.user = user; }
/** * Sets the user attribute value. * @param user The user to set. */
Sets the user attribute value
setUser
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/ld/document/LaborExpenseTransferDocumentBase.java", "license": "apache-2.0", "size": 6604 }
[ "org.kuali.rice.kim.api.identity.Person" ]
import org.kuali.rice.kim.api.identity.Person;
import org.kuali.rice.kim.api.identity.*;
[ "org.kuali.rice" ]
org.kuali.rice;
629,228
@Deprecated default <T> T gauge(String name, T obj, ToDoubleFunction<T> f) { return gauge(createId(name), obj, f); }
default <T> T gauge(String name, T obj, ToDoubleFunction<T> f) { return gauge(createId(name), obj, f); }
/** * See {@link #gauge(Id, Object, ToDoubleFunction)} for more information. * * @param name * Name of the metric being registered. * @param obj * Object used to compute a value. * @param f * Function that is applied on the value for the number. * @return * The object that ...
See <code>#gauge(Id, Object, ToDoubleFunction)</code> for more information
gauge
{ "repo_name": "brharrington/spectator", "path": "spectator-api/src/main/java/com/netflix/spectator/api/Registry.java", "license": "apache-2.0", "size": 33577 }
[ "java.util.function.ToDoubleFunction" ]
import java.util.function.ToDoubleFunction;
import java.util.function.*;
[ "java.util" ]
java.util;
1,255,809
boolean createSiteCloneRemote(String siteId, String sandboxBranch, String remoteName, String remoteUrl, String remoteBranch, boolean singleBranch, String authenticationType, String remoteUsername, String remotePassword, String remoteToken, ...
boolean createSiteCloneRemote(String siteId, String sandboxBranch, String remoteName, String remoteUrl, String remoteBranch, boolean singleBranch, String authenticationType, String remoteUsername, String remotePassword, String remoteToken, String remotePrivateKey, Map<String, String> params, boolean createAsOrphan) thr...
/** * Create new site as a clone from remote repository * * @param siteId site identifier * @param sandboxBranch sandbox branch name * @param remoteName remote name * @param remoteUrl remote repository url * @param remoteBranch remote branch name * @param sing...
Create new site as a clone from remote repository
createSiteCloneRemote
{ "repo_name": "craftercms/studio", "path": "src/main/java/org/craftercms/studio/api/v2/repository/ContentRepository.java", "license": "gpl-3.0", "size": 13848 }
[ "java.util.Map", "org.craftercms.studio.api.v1.exception.ServiceLayerException", "org.craftercms.studio.api.v1.exception.repository.InvalidRemoteRepositoryCredentialsException", "org.craftercms.studio.api.v1.exception.repository.InvalidRemoteRepositoryException", "org.craftercms.studio.api.v1.exception.repo...
import java.util.Map; import org.craftercms.studio.api.v1.exception.ServiceLayerException; import org.craftercms.studio.api.v1.exception.repository.InvalidRemoteRepositoryCredentialsException; import org.craftercms.studio.api.v1.exception.repository.InvalidRemoteRepositoryException; import org.craftercms.studio.api.v1....
import java.util.*; import org.craftercms.studio.api.v1.exception.*; import org.craftercms.studio.api.v1.exception.repository.*;
[ "java.util", "org.craftercms.studio" ]
java.util; org.craftercms.studio;
1,191,248
public List<PDThreadBead> getThreadBeads() { COSArray beads = (COSArray) page.getDictionaryObject(COSName.B); if (beads == null) { beads = new COSArray(); } List<PDThreadBead> pdObjects = new ArrayList<PDThreadBead>(); for (int i = 0; i < beads.size();...
List<PDThreadBead> function() { COSArray beads = (COSArray) page.getDictionaryObject(COSName.B); if (beads == null) { beads = new COSArray(); } List<PDThreadBead> pdObjects = new ArrayList<PDThreadBead>(); for (int i = 0; i < beads.size(); i++) { COSBase base = beads.getObject(i); PDThreadBead bead = null; if (base ins...
/** * This will get a list of PDThreadBead objects, which are article threads in the document. This * will return an empty list if there are no thread beads. * * @return A list of article threads on this page, never null. The returned list is backed by * the beads COSArray, so any adding or del...
This will get a list of PDThreadBead objects, which are article threads in the document. This will return an empty list if there are no thread beads
getThreadBeads
{ "repo_name": "TomRoush/PdfBox-Android", "path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/PDPage.java", "license": "apache-2.0", "size": 23665 }
[ "com.tom_roush.pdfbox.cos.COSArray", "com.tom_roush.pdfbox.cos.COSBase", "com.tom_roush.pdfbox.cos.COSDictionary", "com.tom_roush.pdfbox.cos.COSName", "com.tom_roush.pdfbox.pdmodel.common.COSArrayList", "com.tom_roush.pdfbox.pdmodel.interactive.pagenavigation.PDThreadBead", "java.util.ArrayList", "jav...
import com.tom_roush.pdfbox.cos.COSArray; import com.tom_roush.pdfbox.cos.COSBase; import com.tom_roush.pdfbox.cos.COSDictionary; import com.tom_roush.pdfbox.cos.COSName; import com.tom_roush.pdfbox.pdmodel.common.COSArrayList; import com.tom_roush.pdfbox.pdmodel.interactive.pagenavigation.PDThreadBead; import java.uti...
import com.tom_roush.pdfbox.cos.*; import com.tom_roush.pdfbox.pdmodel.common.*; import com.tom_roush.pdfbox.pdmodel.interactive.pagenavigation.*; import java.util.*;
[ "com.tom_roush.pdfbox", "java.util" ]
com.tom_roush.pdfbox; java.util;
1,035,900
static private void openHtmlFile(String html) throws IOException { File temp = File.createTempFile(IgniteUuid.randomUuid().toString(), ".html"); BufferedWriter bw = new BufferedWriter(new FileWriter(temp)); bw.write(html); bw.close(); Desktop.getDesktop().browse(temp.toUR...
static void function(String html) throws IOException { File temp = File.createTempFile(IgniteUuid.randomUuid().toString(), ".html"); BufferedWriter bw = new BufferedWriter(new FileWriter(temp)); bw.write(html); bw.close(); Desktop.getDesktop().browse(temp.toURI()); }
/** * Opens file in the browser with given HTML content. * * @param html HTML content. * @throws IOException Thrown in case of any errors. */
Opens file in the browser with given HTML content
openHtmlFile
{ "repo_name": "nivanov/ignite", "path": "modules/math/src/main/java/org/apache/ignite/math/Tracer.java", "license": "apache-2.0", "size": 14147 }
[ "java.awt.Desktop", "java.io.BufferedWriter", "java.io.File", "java.io.FileWriter", "java.io.IOException", "org.apache.ignite.lang.IgniteUuid" ]
import java.awt.Desktop; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.apache.ignite.lang.IgniteUuid;
import java.awt.*; import java.io.*; import org.apache.ignite.lang.*;
[ "java.awt", "java.io", "org.apache.ignite" ]
java.awt; java.io; org.apache.ignite;
459,403
EAttribute getClipBlockWithFrame_StartFrame();
EAttribute getClipBlockWithFrame_StartFrame();
/** * Returns the meta object for the attribute '{@link org.roboid.studio.contentscomposer.ClipBlockWithFrame#getStartFrame <em>Start Frame</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Start Frame</em>'. * @see org.roboid.studio.contentscomposer.Cl...
Returns the meta object for the attribute '<code>org.roboid.studio.contentscomposer.ClipBlockWithFrame#getStartFrame Start Frame</code>'.
getClipBlockWithFrame_StartFrame
{ "repo_name": "roboidstudio/embedded", "path": "org.roboid.studio.contentscomposer.model/src/org/roboid/studio/contentscomposer/ContentsComposerPackage.java", "license": "lgpl-2.1", "size": 131603 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
74,430
public void encodeTo(OutputStream out) throws IOException { // atomically write to the final output, to minimize the chance of something else getting in between the output. // even with this, it is still technically possible to get such a mix-up to occur (for example, // if Java program is r...
void function(OutputStream out) throws IOException { out.write(encodeToBytes().toByteArray()); } /** * Prints this note into a writer. * * <p> * Technically, this method only works if the {@link Writer} to {@link OutputStream}
/** * Prints this note into a stream. * * <p> * The most typical use of this is {@code n.encodedTo(System.out)} where stdout is connected to Hudson. * The encoded form doesn't include any new line character to work better in the line-oriented nature * of {@link ConsoleAnnotator}. */
Prints this note into a stream. The most typical use of this is n.encodedTo(System.out) where stdout is connected to Hudson. The encoded form doesn't include any new line character to work better in the line-oriented nature of <code>ConsoleAnnotator</code>
encodeTo
{ "repo_name": "bkmeneguello/jenkins", "path": "core/src/main/java/hudson/console/ConsoleNote.java", "license": "mit", "size": 15746 }
[ "java.io.IOException", "java.io.OutputStream", "java.io.Writer" ]
import java.io.IOException; import java.io.OutputStream; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
1,916,041
static Method getReadMethod(Class<?> clazz, String property) { // first character in uppercase (compatibility with JavaBeans) property = property.substring(0, 1).toUpperCase(Locale.ENGLISH) + property.substring(1); String getMethod = GET_METHOD_PREFIX + proper...
static Method getReadMethod(Class<?> clazz, String property) { property = property.substring(0, 1).toUpperCase(Locale.ENGLISH) + property.substring(1); String getMethod = GET_METHOD_PREFIX + property; String isMethod = IS_METHOD_PREFIX + property; for (Method m: getReadMethods(clazz)) { String name = m.getName(); if (n...
/** * Returns the "getter" to read the given property from the given class or * {@code null} if no method is found. */
Returns the "getter" to read the given property from the given class or null if no method is found
getReadMethod
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/com/sun/jmx/mbeanserver/Introspector.java", "license": "gpl-2.0", "size": 28801 }
[ "java.lang.reflect.Method", "java.util.Locale" ]
import java.lang.reflect.Method; import java.util.Locale;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,232,384
public int createNewBlockStoreForReplay(Date dateToReplayFrom) throws IOException, BlockStoreException { log.debug("Loading/ creating blockstore ..."); if (blockStore != null) { try { blockStore.close(); blockStore = null; } catch (NullPointerE...
int function(Date dateToReplayFrom) throws IOException, BlockStoreException { log.debug(STR); if (blockStore != null) { try { blockStore.close(); blockStore = null; } catch (NullPointerException npe) { log.debug(STR); } } if (dateToReplayFrom != null) { blockStore = createBlockStore(dateToReplayFrom, true); } else { Da...
/** * Create a new block store. * @param dateToReplayFrom * @return height tof new block chain after truncate. * @throws IOException * @throws BlockStoreException */
Create a new block store
createNewBlockStoreForReplay
{ "repo_name": "Rogaven/multibit", "path": "src/main/java/org/multibit/network/MultiBitService.java", "license": "mit", "size": 32163 }
[ "com.google.bitcoin.core.MultiBitBlockChain", "com.google.bitcoin.store.BlockStoreException", "java.io.IOException", "java.util.Date", "java.util.List", "org.multibit.model.bitcoin.WalletData" ]
import com.google.bitcoin.core.MultiBitBlockChain; import com.google.bitcoin.store.BlockStoreException; import java.io.IOException; import java.util.Date; import java.util.List; import org.multibit.model.bitcoin.WalletData;
import com.google.bitcoin.core.*; import com.google.bitcoin.store.*; import java.io.*; import java.util.*; import org.multibit.model.bitcoin.*;
[ "com.google.bitcoin", "java.io", "java.util", "org.multibit.model" ]
com.google.bitcoin; java.io; java.util; org.multibit.model;
1,607,419
public static int getErrno(@Nullable String errorMessage) { if (errorMessage == null) { return 0; } int tagPos = errorMessage.indexOf("(errno "); if (tagPos == -1) { return 0; } int start = tagPos + "(errno ".length(); if (start >= errorMessage.length()) { return 0; }...
static int function(@Nullable String errorMessage) { if (errorMessage == null) { return 0; } int tagPos = errorMessage.indexOf(STR); if (tagPos == -1) { return 0; } int start = tagPos + STR.length(); if (start >= errorMessage.length()) { return 0; } int end = errorMessage.indexOf(')', start); if (end == -1) { return 0;...
/** * Extracts the MySQL errno from a Vitess error message, if any. * * <p> * If no errno information is found, it returns {@code 0}. */
Extracts the MySQL errno from a Vitess error message, if any. If no errno information is found, it returns 0
getErrno
{ "repo_name": "mattharden/vitess", "path": "java/client/src/main/java/io/vitess/client/Proto.java", "license": "bsd-3-clause", "size": 11734 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
957,138
@Override public Adapter createAbsoluteValueAdapter() { if (absoluteValueItemProvider == null) { absoluteValueItemProvider = new AbsoluteValueItemProvider(this); } return absoluteValueItemProvider; } protected EqualItemProvider equalItemProvider;
Adapter function() { if (absoluteValueItemProvider == null) { absoluteValueItemProvider = new AbsoluteValueItemProvider(this); } return absoluteValueItemProvider; } protected EqualItemProvider equalItemProvider;
/** * This creates an adapter for a {@link org.wso2.developerstudio.datamapper.AbsoluteValue}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.datamapper.AbsoluteValue</code>.
createAbsoluteValueAdapter
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.visualdatamapper.edit/src/org/wso2/developerstudio/datamapper/provider/DataMapperItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 41714 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,428,892
public final void statsInit(PluginMetrics metrics) { Graph statusGraph = metrics.createGraph(type.getStatsKey()); statusGraph.addPlotters( new PluginMetrics.Plotter("Enabled") { @Override public int getValue() { return enabled ? 1 : 0; }
final void function(PluginMetrics metrics) { Graph statusGraph = metrics.createGraph(type.getStatsKey()); statusGraph.addPlotters( new PluginMetrics.Plotter(STR) { @Override public int getValue() { return enabled ? 1 : 0; }
/** * Initializes the plugin statistic */
Initializes the plugin statistic
statsInit
{ "repo_name": "bitWolfy/MorePhysics", "path": "src/com/shackledmc/physics/components/Component.java", "license": "gpl-3.0", "size": 2757 }
[ "com.shackledmc.physics.metrics.PluginMetrics" ]
import com.shackledmc.physics.metrics.PluginMetrics;
import com.shackledmc.physics.metrics.*;
[ "com.shackledmc.physics" ]
com.shackledmc.physics;
1,172,138
private void moveOriginToStayWithinView() { Rectangle2D r = basicMap.getDimensions(); if (getWidth() >= VIEW_MARGIN) { if (posOfOriginX > getWidth() - VIEW_MARGIN) { posOfOriginX = getWidth() - VIEW_MARGIN; } else { int w = (int) (r.getWidth() * scaleTable[scaleIndex]); if ...
void function() { Rectangle2D r = basicMap.getDimensions(); if (getWidth() >= VIEW_MARGIN) { if (posOfOriginX > getWidth() - VIEW_MARGIN) { posOfOriginX = getWidth() - VIEW_MARGIN; } else { int w = (int) (r.getWidth() * scaleTable[scaleIndex]); if (posOfOriginX + w < VIEW_MARGIN) { posOfOriginX = VIEW_MARGIN - w; } } }...
/** * Move the origin to stay within view. */
Move the origin to stay within view
moveOriginToStayWithinView
{ "repo_name": "bowzheng/AIM4_delay", "path": "src/main/java/aim4/gui/Canvas.java", "license": "gpl-3.0", "size": 43302 }
[ "java.awt.geom.Rectangle2D" ]
import java.awt.geom.Rectangle2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,812,267
public int getSiteOfPhysicalPosition(int physicalPosition, Chromosome chromosome);
int function(int physicalPosition, Chromosome chromosome);
/** * Return site of given physical position in chromosome. If the physical * position doesn't exist, (-(insertion point) - 1) is returned. If * chromosome is not found, an exception is thrown. * * @param physicalPosition physical position * @param chromosome chromosome. if null, the first...
Return site of given physical position in chromosome. If the physical position doesn't exist, (-(insertion point) - 1) is returned. If chromosome is not found, an exception is thrown
getSiteOfPhysicalPosition
{ "repo_name": "guilherme-pereira/tassel4-poly", "path": "src/net/maizegenetics/pal/alignment/AlignmentNew.java", "license": "gpl-3.0", "size": 26753 }
[ "net.maizegenetics.pal.site.Chromosome" ]
import net.maizegenetics.pal.site.Chromosome;
import net.maizegenetics.pal.site.*;
[ "net.maizegenetics.pal" ]
net.maizegenetics.pal;
2,406,757
@Override public Object visit( final Literal expression, final Object data ) { return new LinkedList(); }
Object function( final Literal expression, final Object data ) { return new LinkedList(); }
/** * Please note we are only visiting literals involved in spatial operations. * * @param literal * , hopefully a Geometry or Envelope * @param data * Incoming BoundingBox (or Envelope or CRS) * * @return ReferencedEnvelope updated to reflect literal */
Please note we are only visiting literals involved in spatial operations
visit
{ "repo_name": "viggyprabhu/geowave", "path": "geowave-vector/src/main/java/mil/nga/giat/geowave/vector/plugin/ExtractAttributesFilter.java", "license": "apache-2.0", "size": 6326 }
[ "java.util.LinkedList", "org.opengis.filter.expression.Literal" ]
import java.util.LinkedList; import org.opengis.filter.expression.Literal;
import java.util.*; import org.opengis.filter.expression.*;
[ "java.util", "org.opengis.filter" ]
java.util; org.opengis.filter;
187,289
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Void>> sendChatReadReceiptWithResponseAsync(String chatThreadId, SendReadReceiptRequest body) { return FluxUtil.withContext( context -> service.sendChatReadReceipt( th...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function(String chatThreadId, SendReadReceiptRequest body) { return FluxUtil.withContext( context -> service.sendChatReadReceipt( this.getEndpoint(), chatThreadId, this.getApiVersion(), body, context)); }
/** * Sends a read receipt event to a thread, on behalf of a user. * * @param chatThreadId Thread id to send the read receipt event to. * @param body Request payload for sending a read receipt. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorExce...
Sends a read receipt event to a thread, on behalf of a user
sendChatReadReceiptWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/AzureCommunicationChatServiceImpl.java", "license": "mit", "size": 111033 }
[ "com.azure.communication.chat.implementation.models.SendReadReceiptRequest", "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil" ]
import com.azure.communication.chat.implementation.models.SendReadReceiptRequest; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil;
import com.azure.communication.chat.implementation.models.*; import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.communication", "com.azure.core" ]
com.azure.communication; com.azure.core;
2,282,144
public UnsafeSorterIterator getIterator(int startIndex) throws IOException { if (spillWriters.isEmpty()) { assert(inMemSorter != null); UnsafeSorterIterator iter = inMemSorter.getSortedIterator(); moveOver(iter, startIndex); return iter; } else { LinkedList<UnsafeSorterIterator> ...
UnsafeSorterIterator function(int startIndex) throws IOException { if (spillWriters.isEmpty()) { assert(inMemSorter != null); UnsafeSorterIterator iter = inMemSorter.getSortedIterator(); moveOver(iter, startIndex); return iter; } else { LinkedList<UnsafeSorterIterator> queue = new LinkedList<>(); int i = 0; for (Unsafe...
/** * Returns an iterator starts from startIndex, which will return the rows in the order as * inserted. * * It is the caller's responsibility to call `cleanupResources()` * after consuming this iterator. * * TODO: support forced spilling */
Returns an iterator starts from startIndex, which will return the rows in the order as inserted. It is the caller's responsibility to call `cleanupResources()` after consuming this iterator
getIterator
{ "repo_name": "pgandhi999/spark", "path": "core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java", "license": "apache-2.0", "size": 25455 }
[ "java.io.IOException", "java.util.LinkedList" ]
import java.io.IOException; import java.util.LinkedList;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
553,294
protected void initialize(int[] heights, double cells){ // TODO: Get rid of this super.initialize(heights.length); this.heights = heights; this.rowCount = cells / heights.length; double gFactor = super.getGeneralizationFactor(); double sFactor = super.getSup...
void function(int[] heights, double cells){ super.initialize(heights.length); this.heights = heights; this.rowCount = cells / heights.length; double gFactor = super.getGeneralizationFactor(); double sFactor = super.getSuppressionFactor(); double[] min = new double[heights.length]; Arrays.fill(min, 0d); double[] max = n...
/** * For backwards compatibility only. * * @param heights * @param cells */
For backwards compatibility only
initialize
{ "repo_name": "RaffaelBild/arx", "path": "src/main/org/deidentifier/arx/metric/v2/MetricMDNMPrecision.java", "license": "apache-2.0", "size": 12984 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
266,992
public SpecializedBlobClientBuilder customerProvidedKey(CustomerProvidedKey customerProvidedKey) { if (customerProvidedKey == null) { this.customerProvidedKey = null; } else { this.customerProvidedKey = new CpkInfo() .setEncryptionKey(customerProvidedKey.getKe...
SpecializedBlobClientBuilder function(CustomerProvidedKey customerProvidedKey) { if (customerProvidedKey == null) { this.customerProvidedKey = null; } else { this.customerProvidedKey = new CpkInfo() .setEncryptionKey(customerProvidedKey.getKey()) .setEncryptionKeySha256(customerProvidedKey.getKeySha256()) .setEncryptio...
/** * Sets the {@link CustomerProvidedKey customer provided key} that is used to encrypt blob contents on the server. * * @param customerProvidedKey Customer provided key containing the encryption key information. * @return the updated SpecializedBlobClientBuilder object */
Sets the <code>CustomerProvidedKey customer provided key</code> that is used to encrypt blob contents on the server
customerProvidedKey
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/specialized/SpecializedBlobClientBuilder.java", "license": "mit", "size": 24605 }
[ "com.azure.storage.blob.models.CpkInfo", "com.azure.storage.blob.models.CustomerProvidedKey" ]
import com.azure.storage.blob.models.CpkInfo; import com.azure.storage.blob.models.CustomerProvidedKey;
import com.azure.storage.blob.models.*;
[ "com.azure.storage" ]
com.azure.storage;
2,142,446
public final SelectableChannel configureBlocking(boolean block) throws IOException { synchronized (regLock) { if (!isOpen()) throw new ClosedChannelException(); boolean blocking = !nonBlocking; if (block != blocking) { if (block...
final SelectableChannel function(boolean block) throws IOException { synchronized (regLock) { if (!isOpen()) throw new ClosedChannelException(); boolean blocking = !nonBlocking; if (block != blocking) { if (block && haveValidKeys()) throw new IllegalBlockingModeException(); implConfigureBlocking(block); nonBlocking = !...
/** * Adjusts this channel's blocking mode. * * <p> If the given blocking mode is different from the current blocking * mode then this method invokes the {@link #implConfigureBlocking * implConfigureBlocking} method, while holding the appropriate locks, in * order to change the mode. </p>...
Adjusts this channel's blocking mode. If the given blocking mode is different from the current blocking mode then this method invokes the <code>#implConfigureBlocking implConfigureBlocking</code> method, while holding the appropriate locks, in order to change the mode.
configureBlocking
{ "repo_name": "md-5/jdk10", "path": "src/java.base/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java", "license": "gpl-2.0", "size": 11689 }
[ "java.io.IOException", "java.nio.channels.ClosedChannelException", "java.nio.channels.IllegalBlockingModeException", "java.nio.channels.SelectableChannel" ]
import java.io.IOException; import java.nio.channels.ClosedChannelException; import java.nio.channels.IllegalBlockingModeException; import java.nio.channels.SelectableChannel;
import java.io.*; import java.nio.channels.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
203,097
private CommandOutput<?, ?> executeSql(List<Command> cmds) { String query = null; int fetchSize = 0; for (Command cmd : cmds) { if (cmd instanceof JdbcCommand) { JdbcCommandType type = (JdbcCommandType) cmd.getCommandType(); switch (type) { case QUERY: query = ...
CommandOutput<?, ?> function(List<Command> cmds) { String query = null; int fetchSize = 0; for (Command cmd : cmds) { if (cmd instanceof JdbcCommand) { JdbcCommandType type = (JdbcCommandType) cmd.getCommandType(); switch (type) { case QUERY: query = cmd.getParams().get(0); break; case FETCHSIZE: fetchSize = Integer.pa...
/** * Execute query using JDBC simple Statement Set fetch size * * @param cmds commands - query, fetch size * @return JDBC ResultSet * @throws Exception */
Execute query using JDBC simple Statement Set fetch size
executeSql
{ "repo_name": "jenniferzheng/gobblin", "path": "gobblin-modules/gobblin-sql/src/main/java/org/apache/gobblin/source/jdbc/JdbcExtractor.java", "license": "apache-2.0", "size": 43184 }
[ "java.sql.ResultSet", "java.sql.Statement", "java.util.List", "org.apache.gobblin.source.extractor.extract.Command", "org.apache.gobblin.source.extractor.extract.CommandOutput", "org.apache.gobblin.source.jdbc.JdbcCommand" ]
import java.sql.ResultSet; import java.sql.Statement; import java.util.List; import org.apache.gobblin.source.extractor.extract.Command; import org.apache.gobblin.source.extractor.extract.CommandOutput; import org.apache.gobblin.source.jdbc.JdbcCommand;
import java.sql.*; import java.util.*; import org.apache.gobblin.source.extractor.extract.*; import org.apache.gobblin.source.jdbc.*;
[ "java.sql", "java.util", "org.apache.gobblin" ]
java.sql; java.util; org.apache.gobblin;
1,280,781
public void updateUser(User user) { URLBuilder url = new URLBuilder(host, "/api/users/" + user.getId() + ".xml"); StringBuilder sb = new StringBuilder(); sb.append("<user>"); sb.append("<login>").append(user.getLogin()).append("</login>"); sb.append("<email>").append(user.ge...
void function(User user) { URLBuilder url = new URLBuilder(host, STR + user.getId() + ".xml"); StringBuilder sb = new StringBuilder(); sb.append(STR); sb.append(STR).append(user.getLogin()).append(STR); sb.append(STR).append(user.getEmail()).append(STR); sb.append(STR).append(user.getFirstName()).append(STR); sb.append...
/** * Update existing user * * @param user */
Update existing user
updateUser
{ "repo_name": "raupachz/raupach-me.com", "path": "src/main/java/org/beanstalk4j/BeanstalkApi.java", "license": "apache-2.0", "size": 38736 }
[ "org.beanstalk4j.http.URLBuilder", "org.beanstalk4j.model.User" ]
import org.beanstalk4j.http.URLBuilder; import org.beanstalk4j.model.User;
import org.beanstalk4j.http.*; import org.beanstalk4j.model.*;
[ "org.beanstalk4j.http", "org.beanstalk4j.model" ]
org.beanstalk4j.http; org.beanstalk4j.model;
1,105,824
void onZoneRequest(ZoneRequestEvent event);
void onZoneRequest(ZoneRequestEvent event);
/** * Called when something has requested a zone update. Should be implemented by instances which can update the zone. * * @param event * The event. */
Called when something has requested a zone update. Should be implemented by instances which can update the zone
onZoneRequest
{ "repo_name": "Raphcal/sigmah", "path": "src/main/java/org/sigmah/client/ui/zone/handler/ZoneRequestHandler.java", "license": "gpl-3.0", "size": 1296 }
[ "org.sigmah.client.ui.zone.event.ZoneRequestEvent" ]
import org.sigmah.client.ui.zone.event.ZoneRequestEvent;
import org.sigmah.client.ui.zone.event.*;
[ "org.sigmah.client" ]
org.sigmah.client;
977,517
public IDataset getThickness();
IDataset function();
/** * thickness along path of neutron travel * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_LENGTH * </p> * * @return the value. */
thickness along path of neutron travel Type: NX_FLOAT Units: NX_LENGTH
getThickness
{ "repo_name": "xen-0/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXflipper.java", "license": "epl-1.0", "size": 8472 }
[ "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.january.dataset.IDataset;
import org.eclipse.january.dataset.*;
[ "org.eclipse.january" ]
org.eclipse.january;
1,841,700
public DocumentRetrieveResults retrieveDocuments(DocumentRetrieve documentModel);
DocumentRetrieveResults function(DocumentRetrieve documentModel);
/** * received from UI to build DoucmentRetrieve Request to retrieve from Repository * * @param documentModel DocumentRetrieve UI values passed. * @return DoucmentRetrieveResults bean have HCID,RepositoryId,DocumentUniqueId,Document and MimeType from * DocumentRetrieve Response. */
received from UI to build DoucmentRetrieve Request to retrieve from Repository
retrieveDocuments
{ "repo_name": "beiyuxinke/CONNECT", "path": "Product/Production/Adapters/General/CONNECTAdminGUI/src/main/java/gov/hhs/fha/nhinc/admingui/services/DocumentRetrieveService.java", "license": "bsd-3-clause", "size": 2333 }
[ "gov.hhs.fha.nhinc.docretrieve.model.DocumentRetrieve", "gov.hhs.fha.nhinc.docretrieve.model.DocumentRetrieveResults" ]
import gov.hhs.fha.nhinc.docretrieve.model.DocumentRetrieve; import gov.hhs.fha.nhinc.docretrieve.model.DocumentRetrieveResults;
import gov.hhs.fha.nhinc.docretrieve.model.*;
[ "gov.hhs.fha" ]
gov.hhs.fha;
2,139,793
View getActiveView(int position) { int index = position - mFirstActivePosition; final View[] activeViews = mActiveViews; if (index >= 0 && index < activeViews.length) { final View match = activeViews[index]; activeViews[index] = null; ...
View getActiveView(int position) { int index = position - mFirstActivePosition; final View[] activeViews = mActiveViews; if (index >= 0 && index < activeViews.length) { final View match = activeViews[index]; activeViews[index] = null; return match; } return null; }
/** * Get the view corresponding to the specified position. The view will * be removed from mActiveViews if it is found. * * @param position * The position to look up in mActiveViews * @return The view if it is found, null otherwise */
Get the view corresponding to the specified position. The view will be removed from mActiveViews if it is found
getActiveView
{ "repo_name": "ShawnDongAi/AEASSISTANT", "path": "AEAssistant/src/com/zzn/aeassistant/view/pla/internal/PLA_AbsListView.java", "license": "apache-2.0", "size": 113100 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,422,565
EndpointProfilesPageDto findByEndpointGroupId(PageLinkDto pageLink);
EndpointProfilesPageDto findByEndpointGroupId(PageLinkDto pageLink);
/** * Find endpoint profile by endpoint group id. * * @param pageLink the page link dto * @return the endpoint profiles page dto */
Find endpoint profile by endpoint group id
findByEndpointGroupId
{ "repo_name": "sashadidukh/kaa", "path": "server/common/dao/src/main/java/org/kaaproject/kaa/server/common/dao/impl/EndpointProfileDao.java", "license": "apache-2.0", "size": 3995 }
[ "org.kaaproject.kaa.common.dto.EndpointProfilesPageDto", "org.kaaproject.kaa.common.dto.PageLinkDto" ]
import org.kaaproject.kaa.common.dto.EndpointProfilesPageDto; import org.kaaproject.kaa.common.dto.PageLinkDto;
import org.kaaproject.kaa.common.dto.*;
[ "org.kaaproject.kaa" ]
org.kaaproject.kaa;
730,356
// generate all partition pairs List<TolerancePair> allPairs = this.createPartitionPairs(this.kb.getConditionals(), this.domain); Collections.sort(allPairs); this.pairs = new LinkedList<TolerancePair>(); this.explanations = new LinkedList<StringBuffer>(); // test each pair double i = 0; for (Tolerance...
List<TolerancePair> allPairs = this.createPartitionPairs(this.kb.getConditionals(), this.domain); Collections.sort(allPairs); this.pairs = new LinkedList<TolerancePair>(); this.explanations = new LinkedList<StringBuffer>(); double i = 0; for (TolerancePair pair : allPairs) { RelationalSystemZ rsz = new RelationalSystem...
/** * Starts the creation progress. A reference to an object implementing the * listener interface can be passed, which will then receive updates * regarding the progress. * @param listener * Progress listener */
Starts the creation progress. A reference to an object implementing the listener interface can be passed, which will then receive updates regarding the progress
createPairs
{ "repo_name": "tbsflk/RelationalSystemZ", "path": "src/semantics/tolerancepair/BruteForceTolerancePairCreator.java", "license": "gpl-3.0", "size": 5620 }
[ "java.util.Collections", "java.util.LinkedList", "java.util.List" ]
import java.util.Collections; import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,656,696
public void write(MessageContext messageSendingContext, String peerHost, int peerPort) { m_sender.addToQ(messageSendingContext); }
void function(MessageContext messageSendingContext, String peerHost, int peerPort) { m_sender.addToQ(messageSendingContext); }
/** * asynchronously creates a packet and sends it * * @param packet message to send * @param peerHost destination address * @param peerPort destination port number */
asynchronously creates a packet and sends it
write
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.sipcontainer/src/com/ibm/ws/sip/stack/transaction/transport/connections/udp/SIPListenningConnectionImpl.java", "license": "epl-1.0", "size": 7381 }
[ "com.ibm.ws.sip.stack.context.MessageContext" ]
import com.ibm.ws.sip.stack.context.MessageContext;
import com.ibm.ws.sip.stack.context.*;
[ "com.ibm.ws" ]
com.ibm.ws;
52,227
public ResultMatcher name(String expectedViewName) { return result -> { ModelAndView mav = result.getModelAndView(); if (mav == null) { fail("No ModelAndView found"); } assertEquals("View name", expectedViewName, mav.getViewName()); }; }
ResultMatcher function(String expectedViewName) { return result -> { ModelAndView mav = result.getModelAndView(); if (mav == null) { fail(STR); } assertEquals(STR, expectedViewName, mav.getViewName()); }; }
/** * Assert the selected view name. */
Assert the selected view name
name
{ "repo_name": "spring-projects/spring-framework", "path": "spring-test/src/main/java/org/springframework/test/web/servlet/result/ViewResultMatchers.java", "license": "apache-2.0", "size": 2024 }
[ "org.springframework.test.util.AssertionErrors", "org.springframework.test.web.servlet.ResultMatcher", "org.springframework.web.servlet.ModelAndView" ]
import org.springframework.test.util.AssertionErrors; import org.springframework.test.web.servlet.ResultMatcher; import org.springframework.web.servlet.ModelAndView;
import org.springframework.test.util.*; import org.springframework.test.web.servlet.*; import org.springframework.web.servlet.*;
[ "org.springframework.test", "org.springframework.web" ]
org.springframework.test; org.springframework.web;
590,656
public void testGetLengths() throws RepositoryException { if (multiple) { Value[] values = prop.getValues(); long[] lengths = prop.getLengths(); for (int i = 0; i < lengths.length; i++) { if (lengths[i] > -1) { assertEquals("Property.ge...
void function() throws RepositoryException { if (multiple) { Value[] values = prop.getValues(); long[] lengths = prop.getLengths(); for (int i = 0; i < lengths.length; i++) { if (lengths[i] > -1) { assertEquals(STR + STR, values[i].getString().length(), lengths[i]); } } } else { try { prop.getLengths(); fail(STR + STR)...
/** * Tests the Property.getLengths() method. The returned values are either -1 * or the lengths of the according strings. */
Tests the Property.getLengths() method. The returned values are either -1 or the lengths of the according strings
testGetLengths
{ "repo_name": "jalkanen/Priha", "path": "tests/tck/org/apache/jackrabbit/test/api/StringPropertyTest.java", "license": "apache-2.0", "size": 10428 }
[ "javax.jcr.RepositoryException", "javax.jcr.Value", "javax.jcr.ValueFormatException" ]
import javax.jcr.RepositoryException; import javax.jcr.Value; import javax.jcr.ValueFormatException;
import javax.jcr.*;
[ "javax.jcr" ]
javax.jcr;
2,134,587
@Override public LogChannelInterface getLogChannel() { return log; }
LogChannelInterface function() { return log; }
/** * Gets the log channel interface for the transformation. * * @return the log channel * @see org.pentaho.di.core.logging.HasLogChannelInterface#getLogChannel() */
Gets the log channel interface for the transformation
getLogChannel
{ "repo_name": "denisprotopopov/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 196543 }
[ "org.pentaho.di.core.logging.LogChannelInterface" ]
import org.pentaho.di.core.logging.LogChannelInterface;
import org.pentaho.di.core.logging.*;
[ "org.pentaho.di" ]
org.pentaho.di;
652,578
public static void streamToStream(InputStream in, OutputStream out) throws IOException { streamToStream(in, out, 1024); }
static void function(InputStream in, OutputStream out) throws IOException { streamToStream(in, out, 1024); }
/** * Convenience method for reading data from an <code>InputStream</code> * and then immediately writing that data to an <code>OutputStream</code> * with a default buffer size of one kilobyte (1,024 bytes). * * @param in * a data source * @param out * a dat...
Convenience method for reading data from an <code>InputStream</code> and then immediately writing that data to an <code>OutputStream</code> with a default buffer size of one kilobyte (1,024 bytes)
streamToStream
{ "repo_name": "rfdrake/opennms", "path": "opennms-util/src/main/java/org/opennms/core/utils/StreamUtils.java", "license": "gpl-2.0", "size": 4131 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
27,666
public static IterationBuilderOver over(String source) { Iteration iterationImpl = new Iteration(new NamedFramesSelector(source)); iterationImpl.setPayloadManager(new NamedIterationPayloadManager(singleVariableIterationName(source))); return iterationImpl; }
static IterationBuilderOver function(String source) { Iteration iterationImpl = new Iteration(new NamedFramesSelector(source)); iterationImpl.setPayloadManager(new NamedIterationPayloadManager(singleVariableIterationName(source))); return iterationImpl; }
/** * Begin an {@link Iteration} over the named selection. Also sets the name of the variable for this iteration's "current element". */
Begin an <code>Iteration</code> over the named selection. Also sets the name of the variable for this iteration's "current element"
over
{ "repo_name": "OndraZizka/windup", "path": "config/api/src/main/java/org/jboss/windup/config/operation/Iteration.java", "license": "epl-1.0", "size": 20266 }
[ "org.jboss.windup.config.operation.iteration.IterationBuilderOver", "org.jboss.windup.config.operation.iteration.NamedFramesSelector", "org.jboss.windup.config.operation.iteration.NamedIterationPayloadManager" ]
import org.jboss.windup.config.operation.iteration.IterationBuilderOver; import org.jboss.windup.config.operation.iteration.NamedFramesSelector; import org.jboss.windup.config.operation.iteration.NamedIterationPayloadManager;
import org.jboss.windup.config.operation.iteration.*;
[ "org.jboss.windup" ]
org.jboss.windup;
587,733
public static ParsedAndroidData from(List<DependencyAndroidData> dependencyAndroidDataList) throws IOException, MergingException { final ParsedAndroidDataBuildingPathWalker pathWalker = ParsedAndroidDataBuildingPathWalker.create(Builder.newBuilder()); for (DependencyAndroidData data : dependency...
static ParsedAndroidData function(List<DependencyAndroidData> dependencyAndroidDataList) throws IOException, MergingException { final ParsedAndroidDataBuildingPathWalker pathWalker = ParsedAndroidDataBuildingPathWalker.create(Builder.newBuilder()); for (DependencyAndroidData data : dependencyAndroidDataList) { data.wal...
/** * Creates an ParsedAndroidData from a list of DependencyAndroidData instances. * * The adding process parses out all the provided symbol into DataResources and DataAssets * objects. * * @param dependencyAndroidDataList The dependency data to parse into DataResources and * DataAssets. ...
Creates an ParsedAndroidData from a list of DependencyAndroidData instances. The adding process parses out all the provided symbol into DataResources and DataAssets objects
from
{ "repo_name": "juhalindfors/bazel-patches", "path": "src/tools/android/java/com/google/devtools/build/android/ParsedAndroidData.java", "license": "apache-2.0", "size": 26310 }
[ "com.google.devtools.build.android.AndroidResourceMerger", "java.io.IOException", "java.util.List", "java.util.concurrent.Callable" ]
import com.google.devtools.build.android.AndroidResourceMerger; import java.io.IOException; import java.util.List; import java.util.concurrent.Callable;
import com.google.devtools.build.android.*; import java.io.*; import java.util.*; import java.util.concurrent.*;
[ "com.google.devtools", "java.io", "java.util" ]
com.google.devtools; java.io; java.util;
871,617
public static Event validateEventIdForMatchingTransitionInContext(final String eventId, final Optional<RequestContext> context, final Map<String, Object> attributes) { ...
static Event function(final String eventId, final Optional<RequestContext> context, final Map<String, Object> attributes) { val attributesMap = new LocalAttributeMap<Object>(attributes); val event = new Event(eventId, eventId, attributesMap); return context.map(ctx -> { val def = ctx.getMatchingTransition(event.getId()...
/** * Validate event id for matching transition in context event. * * @param eventId the event id * @param context the context * @param attributes the attributes * @return the event */
Validate event id for matching transition in context event
validateEventIdForMatchingTransitionInContext
{ "repo_name": "rrenomeron/cas", "path": "core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/MultifactorAuthenticationUtils.java", "license": "apache-2.0", "size": 12087 }
[ "java.util.Map", "java.util.Optional", "org.springframework.webflow.core.collection.LocalAttributeMap", "org.springframework.webflow.execution.Event", "org.springframework.webflow.execution.RequestContext" ]
import java.util.Map; import java.util.Optional; import org.springframework.webflow.core.collection.LocalAttributeMap; import org.springframework.webflow.execution.Event; import org.springframework.webflow.execution.RequestContext;
import java.util.*; import org.springframework.webflow.core.collection.*; import org.springframework.webflow.execution.*;
[ "java.util", "org.springframework.webflow" ]
java.util; org.springframework.webflow;
494,888
private static int sumHashValues(HashMap<Integer, Integer> theMap) { int sum = 0; sum = theMap.keySet().stream() .map((key) -> theMap.get(key) % 2).reduce(sum, Integer::sum); return sum; }
static int function(HashMap<Integer, Integer> theMap) { int sum = 0; sum = theMap.keySet().stream() .map((key) -> theMap.get(key) % 2).reduce(sum, Integer::sum); return sum; }
/** * In order to check if a rectangle is solution, we sum the mod2 of the * elements * */
In order to check if a rectangle is solution, we sum the mod2 of the elements
sumHashValues
{ "repo_name": "pgeadas/hackerrank-solutions", "path": "src/main/java/com/pgeadas/hr/palindromes/PalindromicTable.java", "license": "apache-2.0", "size": 8923 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,297,740
static TreeArtifactValue create(Map<TreeFileArtifact, FileArtifactValue> childFileValues) { Map<String, FileArtifactValue> digestBuilder = Maps.newHashMapWithExpectedSize(childFileValues.size()); for (Map.Entry<TreeFileArtifact, FileArtifactValue> e : childFileValues.entrySet()) { digestBuilder....
static TreeArtifactValue create(Map<TreeFileArtifact, FileArtifactValue> childFileValues) { Map<String, FileArtifactValue> digestBuilder = Maps.newHashMapWithExpectedSize(childFileValues.size()); for (Map.Entry<TreeFileArtifact, FileArtifactValue> e : childFileValues.entrySet()) { digestBuilder.put(e.getKey().getParent...
/** * Returns a TreeArtifactValue out of the given Artifact-relative path fragments * and their corresponding FileArtifactValues. */
Returns a TreeArtifactValue out of the given Artifact-relative path fragments and their corresponding FileArtifactValues
create
{ "repo_name": "ButterflyNetwork/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/TreeArtifactValue.java", "license": "apache-2.0", "size": 8447 }
[ "com.google.common.collect.ImmutableMap", "com.google.common.collect.Maps", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.actions.FileArtifactValue", "com.google.devtools.build.lib.actions.cache.DigestUtils", "java.util.Map" ]
import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.FileArtifactValue; import com.google.devtools.build.lib.actions.cache.DigestUtils; import java.util.Map;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.actions.cache.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,186,279
protected MockResponse buildResponse(int status, byte[] body) { return buildResponse(status).setBody(body); }
MockResponse function(int status, byte[] body) { return buildResponse(status).setBody(body); }
/** * Helper to build a response from the MockWebServer. * * @param status The HTTP status code to return for this response * @param body The body to return in this response * @return Returns the mock web server response that was queued (which can be modified) */
Helper to build a response from the MockWebServer
buildResponse
{ "repo_name": "haikuowuya/android_system_code", "path": "src/android/app/DownloadManagerBaseTest.java", "license": "apache-2.0", "size": 39155 }
[ "com.google.mockwebserver.MockResponse" ]
import com.google.mockwebserver.MockResponse;
import com.google.mockwebserver.*;
[ "com.google.mockwebserver" ]
com.google.mockwebserver;
1,550,987
public RelationshipsType<EjbJarDescriptor> getOrCreateRelationships() { Node node = model.getOrCreate("relationships"); RelationshipsType<EjbJarDescriptor> relationships = new RelationshipsTypeImpl<EjbJarDescriptor>(this, "relationships", model, node); return relationships; }
RelationshipsType<EjbJarDescriptor> function() { Node node = model.getOrCreate(STR); RelationshipsType<EjbJarDescriptor> relationships = new RelationshipsTypeImpl<EjbJarDescriptor>(this, STR, model, node); return relationships; }
/** * If not already created, a new <code>relationships</code> element with the given value will be created. * Otherwise, the existing <code>relationships</code> element will be returned. * @return a new or existing instance of <code>RelationshipsType<EjbJarDescriptor></code> */
If not already created, a new <code>relationships</code> element with the given value will be created. Otherwise, the existing <code>relationships</code> element will be returned
getOrCreateRelationships
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar31/EjbJarDescriptorImpl.java", "license": "epl-1.0", "size": 21195 }
[ "org.jboss.shrinkwrap.descriptor.api.ejbjar31.EjbJarDescriptor", "org.jboss.shrinkwrap.descriptor.api.ejbjar31.RelationshipsType", "org.jboss.shrinkwrap.descriptor.spi.node.Node" ]
import org.jboss.shrinkwrap.descriptor.api.ejbjar31.EjbJarDescriptor; import org.jboss.shrinkwrap.descriptor.api.ejbjar31.RelationshipsType; import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import org.jboss.shrinkwrap.descriptor.api.ejbjar31.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
2,840,360
public EsriLineSymbolInterface getLineSymbol(JsonObject obj) { for(String lineSymbolType : lineSymbolMap.keySet()) { JsonElement element = obj.get(lineSymbolType); if(element != null) { return lineSymbolMap.get(lineSymbolType); } ...
EsriLineSymbolInterface function(JsonObject obj) { for(String lineSymbolType : lineSymbolMap.keySet()) { JsonElement element = obj.get(lineSymbolType); if(element != null) { return lineSymbolMap.get(lineSymbolType); } } return null; }
/** * Gets the line symbol. * * @param obj the obj * @return the line symbol */
Gets the line symbol
getLineSymbol
{ "repo_name": "robward-scisys/sldeditor", "path": "modules/import/export-sld/src/main/java/com/sldeditor/exportdata/esri/symbols/SymbolManager.java", "license": "gpl-3.0", "size": 9186 }
[ "com.google.gson.JsonElement", "com.google.gson.JsonObject" ]
import com.google.gson.JsonElement; import com.google.gson.JsonObject;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
1,588,141
public void setSearchComboTime(int value) { Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHCOMBOTIME); if (null == el) { el = new Element(SETTING_SEARCHCOMBOTIME); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(val...
void function(int value) { Element el = settingsFile.getRootElement().getChild(SETTING_SEARCHCOMBOTIME); if (null == el) { el = new Element(SETTING_SEARCHCOMBOTIME); settingsFile.getRootElement().addContent(el); } el.setText(String.valueOf(value)); }
/** * This method keeps the selection of the combobox in the search dialog (CSearchDlg), which * stores the information whether the user wanted to search for entries with a certain * create-date, changed-date or both. * * @param value the index of the selected item. */
This method keeps the selection of the combobox in the search dialog (CSearchDlg), which stores the information whether the user wanted to search for entries with a certain create-date, changed-date or both
setSearchComboTime
{ "repo_name": "sjPlot/Zettelkasten", "path": "src/main/java/de/danielluedecke/zettelkasten/database/Settings.java", "license": "gpl-3.0", "size": 218287 }
[ "org.jdom2.Element" ]
import org.jdom2.Element;
import org.jdom2.*;
[ "org.jdom2" ]
org.jdom2;
1,759,846
public int getMaxCatalogNameLength() throws SQLException { return 128; }
int function() throws SQLException { return 128; }
/** * Retrieves the maximum number of characters that this database allows in a * catalog name. * * <!-- start release-specific documentation --> * <div class="ReleaseSpecificDocumentation"> * <h3>HSQLDB-Specific Information:</h3> <p> * * Starting with 2.0, HSQLDB implements the ...
Retrieves the maximum number of characters that this database allows in a catalog name. HSQLDB-Specific Information: Starting with 2.0, HSQLDB implements the SQL standard, which is 128 for all names.
getMaxCatalogNameLength
{ "repo_name": "ThangBK2009/android-source-browsing.platform--external--hsqldb", "path": "src/org/hsqldb/jdbc/JDBCDatabaseMetaData.java", "license": "bsd-3-clause", "size": 263631 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
765,519
@Test public void ttlFileDelete() throws Exception { CreateFileOptions options = CreateFileOptions.defaults().setBlockSizeBytes(Constants.KB).setRecursive(true).setTtl(0); long fileId = mFileSystemMaster.createFile(NESTED_FILE_URI, options); FileInfo fileInfo = mFileSystemMaster.getFileInfo(file...
void function() throws Exception { CreateFileOptions options = CreateFileOptions.defaults().setBlockSizeBytes(Constants.KB).setRecursive(true).setTtl(0); long fileId = mFileSystemMaster.createFile(NESTED_FILE_URI, options); FileInfo fileInfo = mFileSystemMaster.getFileInfo(fileId); assertEquals(fileInfo.getFileId(), fi...
/** * Tests that an exception is in the * {@link FileSystemMaster#createFile(AlluxioURI, CreateFileOptions)} with a TTL set in the * {@link CreateFileOptions} after the TTL check was done once. */
Tests that an exception is in the <code>FileSystemMaster#createFile(AlluxioURI, CreateFileOptions)</code> with a TTL set in the <code>CreateFileOptions</code> after the TTL check was done once
ttlFileDelete
{ "repo_name": "maboelhassan/alluxio", "path": "core/server/master/src/test/java/alluxio/master/file/FileSystemMasterTest.java", "license": "apache-2.0", "size": 84885 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
877,545
public static Supplier<List<MenuItem>> getCleanupURLMenu(TextArea textArea) { return () -> { CustomMenuItem cleanupURL = new CustomMenuItem(new Label(Localization.lang("Cleanup URL link"))); cleanupURL.setDisable(textArea.textProperty().isEmpty().get()); cleanupURL.setOnA...
static Supplier<List<MenuItem>> function(TextArea textArea) { return () -> { CustomMenuItem cleanupURL = new CustomMenuItem(new Label(Localization.lang(STR))); cleanupURL.setDisable(textArea.textProperty().isEmpty().get()); cleanupURL.setOnAction(event -> textArea.setText(new CleanupURLFormatter().format(textArea.getTe...
/** * The default context menu with a specific menu item to cleanup URL. * * @param textArea text-area that this menu will be connected to * @return menu containing items of the default menu and an item to cleanup a URL */
The default context menu with a specific menu item to cleanup URL
getCleanupURLMenu
{ "repo_name": "zellerdev/jabref", "path": "src/main/java/org/jabref/gui/fieldeditors/contextmenu/EditorMenus.java", "license": "mit", "size": 4834 }
[ "java.util.ArrayList", "java.util.List", "java.util.function.Supplier", "org.jabref.logic.formatter.bibtexfields.CleanupURLFormatter", "org.jabref.logic.l10n.Localization" ]
import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; import org.jabref.logic.formatter.bibtexfields.CleanupURLFormatter; import org.jabref.logic.l10n.Localization;
import java.util.*; import java.util.function.*; import org.jabref.logic.formatter.bibtexfields.*; import org.jabref.logic.l10n.*;
[ "java.util", "org.jabref.logic" ]
java.util; org.jabref.logic;
1,195,228
R collate(Map<KOut, VOut> reducedResults);
R collate(Map<KOut, VOut> reducedResults);
/** * Collates all reduced results and returns R to invoker of distributed task. * * @return final result of distributed task computation */
Collates all reduced results and returns R to invoker of distributed task
collate
{ "repo_name": "nmldiegues/stibt", "path": "infinispan/core/src/main/java/org/infinispan/distexec/mapreduce/Collator.java", "license": "apache-2.0", "size": 1726 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,461,212
public boolean downloadUrlToStream(String urlString, OutputStream outputStream) { disableConnectionReuseIfNecessary(); HttpURLConnection urlConnection = null; BufferedOutputStream out = null; BufferedInputStream in = null; try { final URL url = new URL(urlString); urlConnection = (Htt...
boolean function(String urlString, OutputStream outputStream) { disableConnectionReuseIfNecessary(); HttpURLConnection urlConnection = null; BufferedOutputStream out = null; BufferedInputStream in = null; try { final URL url = new URL(urlString); urlConnection = (HttpURLConnection) url.openConnection(); in = new Buffer...
/** * Download a bitmap from a URL and write the content to an output stream. * * @param urlString The URL to fetch * @return true if successful, false otherwise */
Download a bitmap from a URL and write the content to an output stream
downloadUrlToStream
{ "repo_name": "snailee/QGallery", "path": "src/com/example/android/displayingbitmaps/util/ImageFetcher.java", "license": "apache-2.0", "size": 9550 }
[ "com.example.android.common.logger.Log", "java.io.BufferedInputStream", "java.io.BufferedOutputStream", "java.io.IOException", "java.io.OutputStream", "java.net.HttpURLConnection" ]
import com.example.android.common.logger.Log; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection;
import com.example.android.common.logger.*; import java.io.*; import java.net.*;
[ "com.example.android", "java.io", "java.net" ]
com.example.android; java.io; java.net;
1,498,853
public void threadRead(String msg, int readFrom) { Logger.logD("Sending thread read", 5); Intent localIntent = new Intent(NetworkConstants.BROADCAST_MESSAGE) .putExtra(NetworkConstants.MESSAGE, msg) .putExtra(NetworkConstants.INDEX, readFrom); LocalBroadcastManage...
void function(String msg, int readFrom) { Logger.logD(STR, 5); Intent localIntent = new Intent(NetworkConstants.BROADCAST_MESSAGE) .putExtra(NetworkConstants.MESSAGE, msg) .putExtra(NetworkConstants.INDEX, readFrom); LocalBroadcastManager.getInstance(this).sendBroadcast(localIntent); }
/** * Sends an intent for {@link ResponseReceiver} to signal that data has been read from the network. * * @param msg Message that was read from the network. * @param readFrom The playerID of the device that the message was received from. * If the client has not received a playe...
Sends an intent for <code>ResponseReceiver</code> to signal that data has been read from the network
threadRead
{ "repo_name": "semaphore-soft/Cypher", "path": "Source/Cypher/app/src/main/java/com/semaphore_soft/apps/cypher/networking/ServerService.java", "license": "gpl-3.0", "size": 4949 }
[ "android.content.Intent", "android.support.v4.content.LocalBroadcastManager", "com.semaphore_soft.apps.cypher.utils.Logger" ]
import android.content.Intent; import android.support.v4.content.LocalBroadcastManager; import com.semaphore_soft.apps.cypher.utils.Logger;
import android.content.*; import android.support.v4.content.*; import com.semaphore_soft.apps.cypher.utils.*;
[ "android.content", "android.support", "com.semaphore_soft.apps" ]
android.content; android.support; com.semaphore_soft.apps;
1,975,889
public void evalGroup(QueryContext context) throws SQLException { _expr.evalGroup(context); _min.evalGroup(context); _max.evalGroup(context); }
void function(QueryContext context) throws SQLException { _expr.evalGroup(context); _min.evalGroup(context); _max.evalGroup(context); }
/** * Evaluates aggregate functions during the group phase. * * @param state the current database tuple */
Evaluates aggregate functions during the group phase
evalGroup
{ "repo_name": "WelcomeHUME/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/db/sql/BetweenExpr.java", "license": "gpl-2.0", "size": 3308 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
200,919
private synchronized DatanodeInfo blockSeekTo(long target) throws IOException { if (target >= getFileLength()) { throw new IOException("Attempted to read past end of file"); } // Will be getting a new BlockReader. closeCurrentBlockReader(); // // Connect to best DataNode for desired Bl...
synchronized DatanodeInfo function(long target) throws IOException { if (target >= getFileLength()) { throw new IOException(STR); } closeCurrentBlockReader(); int refetchToken = 1; int refetchEncryptionKey = 1; boolean connectFailedOnce = false; while (true) { assert (target==pos) : STR + pos + STR + target; long offse...
/** * Open a DataInputStream to a DataNode so that it can be read from. * We get block ID and the IDs of the destinations at startup, from the namenode. */
Open a DataInputStream to a DataNode so that it can be read from. We get block ID and the IDs of the destinations at startup, from the namenode
blockSeekTo
{ "repo_name": "wankunde/cloudera_hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java", "license": "apache-2.0", "size": 66520 }
[ "java.io.IOException", "java.net.InetSocketAddress", "org.apache.hadoop.hdfs.protocol.DatanodeInfo", "org.apache.hadoop.hdfs.protocol.ExtendedBlock", "org.apache.hadoop.hdfs.protocol.datatransfer.InvalidEncryptionKeyException", "org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier", "org.apa...
import java.io.IOException; import java.net.InetSocketAddress; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.protocol.datatransfer.InvalidEncryptionKeyException; import org.apache.hadoop.hdfs.security.token.block.BlockTokenIdenti...
import java.io.*; import java.net.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*; import org.apache.hadoop.hdfs.security.token.block.*; import org.apache.hadoop.hdfs.server.datanode.*; import org.apache.hadoop.security.token.*;
[ "java.io", "java.net", "org.apache.hadoop" ]
java.io; java.net; org.apache.hadoop;
53,667
public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException { if (x == null) { setNull(parameterIndex, java.sql.Types.DECIMAL); } else { setInternal(parameterIndex, StringUtils.fixDecimalExponent(StringUtils.consistentToString(x))); this.param...
void function(int parameterIndex, BigDecimal x) throws SQLException { if (x == null) { setNull(parameterIndex, java.sql.Types.DECIMAL); } else { setInternal(parameterIndex, StringUtils.fixDecimalExponent(StringUtils.consistentToString(x))); this.parameterTypes[parameterIndex - 1 + getParameterIndexOffset()] = Types.DEC...
/** * Set a parameter to a java.math.BigDecimal value. The driver converts this * to a SQL NUMERIC value when it sends it to the database. * * @param parameterIndex * the first parameter is 1... * @param x * the parameter value * * @exception SQLExcep...
Set a parameter to a java.math.BigDecimal value. The driver converts this to a SQL NUMERIC value when it sends it to the database
setBigDecimal
{ "repo_name": "mwaylabs/mysql-connector-j", "path": "src/com/mysql/jdbc/PreparedStatement.java", "license": "gpl-2.0", "size": 199515 }
[ "java.math.BigDecimal", "java.sql.SQLException", "java.sql.Types" ]
import java.math.BigDecimal; import java.sql.SQLException; import java.sql.Types;
import java.math.*; import java.sql.*;
[ "java.math", "java.sql" ]
java.math; java.sql;
2,859,992
public T caseLessThanOrEqual(LessThanOrEqual object) { return null; }
T function(LessThanOrEqual object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Less Than Or Equal</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result...
Returns the result of interpreting the object as an instance of 'Less Than Or Equal'. This implementation returns null; returning a non-null result will terminate the switch.
caseLessThanOrEqual
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/finiteIntRanges/util/FiniteIntRangesSwitch.java", "license": "epl-1.0", "size": 15284 }
[ "fr.lip6.move.pnml.symmetricnet.finiteIntRanges.LessThanOrEqual" ]
import fr.lip6.move.pnml.symmetricnet.finiteIntRanges.LessThanOrEqual;
import fr.lip6.move.pnml.symmetricnet.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,695,906
@Override protected void mutate(Configuration jgapConfig, final ChromosomeMaterial target, Set<Allele> allelesToAdd, Set<Allele> allelesToRemove) { if ((jgapConfig instanceof NeatConfiguration) == false) throw new AnjiRequiredException("com.anji.neat.NeatConfiguration"); NeatConfiguration config = (NeatConfi...
void function(Configuration jgapConfig, final ChromosomeMaterial target, Set<Allele> allelesToAdd, Set<Allele> allelesToRemove) { if ((jgapConfig instanceof NeatConfiguration) == false) throw new AnjiRequiredException(STR); NeatConfiguration config = (NeatConfiguration) jgapConfig; List<NeuronAllele> neuronList = NeatC...
/** * Adds connections according to <a href="http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf">NEAT </a> add * connection mutation. * * @param jgapConfig * @param target chromosome material to mutate * @param allelesToAdd <code>Set</code> contains <code>Allele</code> objects * @param allelesToRe...
Adds connections according to NEAT add connection mutation
mutate
{ "repo_name": "jbrant/ahni", "path": "src/com/anji/neat/AddConnectionMutationOperator.java", "license": "gpl-3.0", "size": 7756 }
[ "com.anji.integration.AnjiRequiredException", "java.util.List", "java.util.Set", "java.util.SortedMap", "org.jgapcustomised.Allele", "org.jgapcustomised.ChromosomeMaterial", "org.jgapcustomised.Configuration" ]
import com.anji.integration.AnjiRequiredException; import java.util.List; import java.util.Set; import java.util.SortedMap; import org.jgapcustomised.Allele; import org.jgapcustomised.ChromosomeMaterial; import org.jgapcustomised.Configuration;
import com.anji.integration.*; import java.util.*; import org.jgapcustomised.*;
[ "com.anji.integration", "java.util", "org.jgapcustomised" ]
com.anji.integration; java.util; org.jgapcustomised;
2,515,091
private void parsePackages(List<String> resultantPackages, Path sourcePath) { List<String> addedPackages = new ArrayList<>(); List<DirSet> dirSets = new ArrayList<DirSet>(packageSets); // for each sourcePath entry, add a directoryset with includes // taken from packagenames attribut...
void function(List<String> resultantPackages, Path sourcePath) { List<String> addedPackages = new ArrayList<>(); List<DirSet> dirSets = new ArrayList<DirSet>(packageSets); if (this.sourcePath != null) { PatternSet ps = new PatternSet(); if (!packageNames.isEmpty()) { for (String pn : packageNames) { String pkg = pn.rep...
/** * Add the directories matched by the nested dirsets to the resulting * packages list and the base directories of the dirsets to the Path. * It also handles the packages and excludepackages attributes and * elements. * * @param resultantPackages a list to which we add the packages found...
Add the directories matched by the nested dirsets to the resulting packages list and the base directories of the dirsets to the Path. It also handles the packages and excludepackages attributes and elements
parsePackages
{ "repo_name": "armsargis/groovy", "path": "subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovydoc.java", "license": "apache-2.0", "size": 20391 }
[ "java.io.File", "java.util.ArrayList", "java.util.List", "java.util.StringTokenizer", "org.apache.tools.ant.DirectoryScanner", "org.apache.tools.ant.types.DirSet", "org.apache.tools.ant.types.Path", "org.apache.tools.ant.types.PatternSet" ]
import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.types.DirSet; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.PatternSet;
import java.io.*; import java.util.*; import org.apache.tools.ant.*; import org.apache.tools.ant.types.*;
[ "java.io", "java.util", "org.apache.tools" ]
java.io; java.util; org.apache.tools;
1,257,455
private static void addHiveSiteDirToClasspath(String hiveSiteDir) { LOG.info("Adding " + hiveSiteDir + " to CLASSPATH"); File f = new File(hiveSiteDir); try { URL u = f.toURI().toURL(); URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class<URLClassLoa...
static void function(String hiveSiteDir) { LOG.info(STR + hiveSiteDir + STR); File f = new File(hiveSiteDir); try { URL u = f.toURI().toURL(); URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class<URLClassLoader> urlClass = URLClassLoader.class; Method method = urlClass.getDeclaredM...
/** * Helper method to add the directory containing the hive-site.xml file to the classpath * @param hiveSiteDir is the path to to the folder containing the hive-site.xml file */
Helper method to add the directory containing the hive-site.xml file to the classpath
addHiveSiteDirToClasspath
{ "repo_name": "jenniferzheng/gobblin", "path": "gobblin-utility/src/main/java/org/apache/gobblin/util/HiveJdbcConnector.java", "license": "apache-2.0", "size": 11123 }
[ "java.io.File", "java.io.IOException", "java.lang.reflect.Method", "java.net.URLClassLoader" ]
import java.io.File; import java.io.IOException; import java.lang.reflect.Method; import java.net.URLClassLoader;
import java.io.*; import java.lang.reflect.*; import java.net.*;
[ "java.io", "java.lang", "java.net" ]
java.io; java.lang; java.net;
161,964