method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public boolean canCommandSenderUseCommand(ICommandSender p_71519_1_) { return MinecraftServer.getServer().isSinglePlayer() || super.canCommandSenderUseCommand(p_71519_1_); }
boolean function(ICommandSender p_71519_1_) { return MinecraftServer.getServer().isSinglePlayer() super.canCommandSenderUseCommand(p_71519_1_); }
/** * Returns true if the given command sender is allowed to use this command. */
Returns true if the given command sender is allowed to use this command
canCommandSenderUseCommand
{ "repo_name": "CheeseL0ver/Ore-TTM", "path": "build/tmp/recompSrc/net/minecraft/command/CommandShowSeed.java", "license": "lgpl-2.1", "size": 1342 }
[ "net.minecraft.server.MinecraftServer" ]
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.*;
[ "net.minecraft.server" ]
net.minecraft.server;
2,780,688
public static void main(String[] args) { try { Thread.currentThread().setName(module.getName()); propertyFileName = (args.length != 0) ? args[0] : PROPERTY_FILE_NAME; Properties properties = readPropertiesFromFile(propertyFileName); AsmReader reader...
static void function(String[] args) { try { Thread.currentThread().setName(module.getName()); propertyFileName = (args.length != 0) ? args[0] : PROPERTY_FILE_NAME; Properties properties = readPropertiesFromFile(propertyFileName); AsmReader reader = AsmReader.getInstance(); int epaWaitTime = Integer.parseInt(properties....
/** * Called when testing. * @param args arguments */
Called when testing
main
{ "repo_name": "CA-APM/ca-apm-fieldpack-asm", "path": "asm-monitor/src/main/java/com/ca/apm/swat/epaplugins/asm/AsmReader.java", "license": "epl-1.0", "size": 31019 }
[ "com.ca.apm.swat.epaplugins.asm.reporting.MetricWriter", "com.ca.apm.swat.epaplugins.asm.reporting.TextMetricWriter", "com.ca.apm.swat.epaplugins.utils.AsmMessages", "com.ca.apm.swat.epaplugins.utils.ErrorUtils", "com.wily.util.feedback.SeverityLevel", "java.util.Properties" ]
import com.ca.apm.swat.epaplugins.asm.reporting.MetricWriter; import com.ca.apm.swat.epaplugins.asm.reporting.TextMetricWriter; import com.ca.apm.swat.epaplugins.utils.AsmMessages; import com.ca.apm.swat.epaplugins.utils.ErrorUtils; import com.wily.util.feedback.SeverityLevel; import java.util.Properties;
import com.ca.apm.swat.epaplugins.asm.reporting.*; import com.ca.apm.swat.epaplugins.utils.*; import com.wily.util.feedback.*; import java.util.*;
[ "com.ca.apm", "com.wily.util", "java.util" ]
com.ca.apm; com.wily.util; java.util;
1,162,253
public Builder withOutWriter(PrintWriter outWriter) { this.outWriter = outWriter; return this; }
Builder function(PrintWriter outWriter) { this.outWriter = outWriter; return this; }
/** * The text output stream writer used to print normal output. * @param outWriter the output writer. * @return this builder. */
The text output stream writer used to print normal output
withOutWriter
{ "repo_name": "francescomari/jackrabbit-oak", "path": "oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/tool/Check.java", "license": "apache-2.0", "size": 8067 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,164,055
static ControlLab newControlLab() { return new ControlLabImpl( LoggerFactory.getLogger(MethodHandles.lookup().lookupClass())); }
static ControlLab newControlLab() { return new ControlLabImpl( LoggerFactory.getLogger(MethodHandles.lookup().lookupClass())); }
/** * Returns a new ControlLab instance. * @return a new ControlLab instance */
Returns a new ControlLab instance
newControlLab
{ "repo_name": "chabala/brick-control-lab", "path": "src/main/java/org/chabala/brick/controllab/ControlLab.java", "license": "lgpl-3.0", "size": 5534 }
[ "java.lang.invoke.MethodHandles", "org.slf4j.LoggerFactory" ]
import java.lang.invoke.MethodHandles; import org.slf4j.LoggerFactory;
import java.lang.invoke.*; import org.slf4j.*;
[ "java.lang", "org.slf4j" ]
java.lang; org.slf4j;
2,536,450
@Generated @Selector("setColumns:") public native void setColumns(@NUInt long value);
@Selector(STR) native void function(@NUInt long value);
/** * [@property] columns * <p> * The number of columns in a matrix. */
[@property] columns The number of columns in a matrix
setColumns
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/metalperformanceshaders/MPSMatrixDescriptor.java", "license": "apache-2.0", "size": 11137 }
[ "org.moe.natj.general.ann.NUInt", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.NUInt; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,330,786
public static long stringToHierarchicalLedgerId(String hierarchicalLedgerPath) throws IOException { String[] hierarchicalParts = hierarchicalLedgerPath.split("/"); if (hierarchicalParts.length != 3) { throw new IOException("it is not a valid hierarchical path name : " + hiera...
static long function(String hierarchicalLedgerPath) throws IOException { String[] hierarchicalParts = hierarchicalLedgerPath.split("/"); if (hierarchicalParts.length != 3) { throw new IOException(STR + hierarchicalLedgerPath); } hierarchicalParts[2] = hierarchicalParts[2].substring(LEDGER_NODE_PREFIX.length()); return ...
/** * Parse the hierarchical ledger path to its ledger id. * * @param hierarchicalLedgerPath * @return the ledger id * @throws IOException */
Parse the hierarchical ledger path to its ledger id
stringToHierarchicalLedgerId
{ "repo_name": "sijie/bookkeeper", "path": "bookkeeper-server/src/main/java/org/apache/bookkeeper/util/StringUtils.java", "license": "apache-2.0", "size": 6605 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,114,475
private void startLeaving() { Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.leaving(getLocalTokens())); tokenMetadata.addLeavingEndpoint(FBUtilities.getBroadcastAddress()); PendingRangeCalculatorService.instance.update(); }
void function() { Gossiper.instance.addLocalApplicationState(ApplicationState.STATUS, valueFactory.leaving(getLocalTokens())); tokenMetadata.addLeavingEndpoint(FBUtilities.getBroadcastAddress()); PendingRangeCalculatorService.instance.update(); }
/** * Broadcast leaving status and update local tokenMetadata accordingly */
Broadcast leaving status and update local tokenMetadata accordingly
startLeaving
{ "repo_name": "hobinyoon/apache-cassandra-2.2.3-src", "path": "src/java/org/apache/cassandra/service/StorageService.java", "license": "apache-2.0", "size": 183550 }
[ "org.apache.cassandra.gms.ApplicationState", "org.apache.cassandra.gms.Gossiper", "org.apache.cassandra.utils.FBUtilities" ]
import org.apache.cassandra.gms.ApplicationState; import org.apache.cassandra.gms.Gossiper; import org.apache.cassandra.utils.FBUtilities;
import org.apache.cassandra.gms.*; import org.apache.cassandra.utils.*;
[ "org.apache.cassandra" ]
org.apache.cassandra;
19,467
private List<Pattern> compileXpathExpressions( final List<String> ignorableXPathsRegex) { final List<Pattern> compiledRegexList = new ArrayList<Pattern>(); Iterator<String> it = ignorableXPathsRegex.iterator(); while (it.hasNext()) { final Pattern pattern = Pattern.compile(it.next().toString()); compi...
List<Pattern> function( final List<String> ignorableXPathsRegex) { final List<Pattern> compiledRegexList = new ArrayList<Pattern>(); Iterator<String> it = ignorableXPathsRegex.iterator(); while (it.hasNext()) { final Pattern pattern = Pattern.compile(it.next().toString()); compiledRegexList.add(pattern); } return compi...
/** * compile all regular expressions once. * * @param ignorableXPathsRegex * list of regular expressions for ignorable xpath locations. * @return list of compiled regular expressions. */
compile all regular expressions once
compileXpathExpressions
{ "repo_name": "OBHITA/Consent2Share", "path": "DS4P/consent-gen/src/test/java/gov/samhsa/consent/RegexBasedDifferenceListener.java", "license": "bsd-3-clause", "size": 4355 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "java.util.regex.Pattern" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.regex.Pattern;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
1,075,862
public Paint getShadowPaint() { return this.shadowPaint; }
Paint function() { return this.shadowPaint; }
/** * Returns the shadow paint. * * @return The shadow paint. * * @see #setShadowPaint(Paint) * * @since 1.0.11 */
Returns the shadow paint
getShadowPaint
{ "repo_name": "GitoMat/jfreechart", "path": "src/main/java/org/jfree/chart/renderer/category/BarRenderer.java", "license": "lgpl-2.1", "size": 50094 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
151,283
public final GoogleAccountCredential setSleeper(Sleeper sleeper) { this.sleeper = Preconditions.checkNotNull(sleeper); return this; }
final GoogleAccountCredential function(Sleeper sleeper) { this.sleeper = Preconditions.checkNotNull(sleeper); return this; }
/** * Sets the sleeper. The default value is {@link Sleeper#DEFAULT}. * * @since 1.15 */
Sets the sleeper. The default value is <code>Sleeper#DEFAULT</code>
setSleeper
{ "repo_name": "googleapis/google-api-java-client", "path": "google-api-client-android/src/main/java/com/google/api/client/googleapis/extensions/android/gms/auth/GoogleAccountCredential.java", "license": "apache-2.0", "size": 9711 }
[ "com.google.api.client.util.Preconditions", "com.google.api.client.util.Sleeper" ]
import com.google.api.client.util.Preconditions; import com.google.api.client.util.Sleeper;
import com.google.api.client.util.*;
[ "com.google.api" ]
com.google.api;
525,738
@RolesAllowed("user") @Transactional(readOnly = true) public Set<IObject> loadTagSets(Parameters options) { Set result = new HashSet(); Parameters po = new Parameters(options); Parameters param = new Parameters(); StringBuilder sb = new StringBuilder(); param.addString("include", N...
@RolesAllowed("user") @Transactional(readOnly = true) Set<IObject> function(Parameters options) { Set result = new HashSet(); Parameters po = new Parameters(options); Parameters param = new Parameters(); StringBuilder sb = new StringBuilder(); param.addString(STR, NS_INSIGHT_TAG_SET); sb.append(STR); sb.append(STR); sb...
/** * Implemented as specified by the {@link IMetadata} I/F * @see IMetadata#loadTagSets(Parameters) */
Implemented as specified by the <code>IMetadata</code> I/F
loadTagSets
{ "repo_name": "emilroz/openmicroscopy", "path": "components/server/src/ome/logic/MetadataImpl.java", "license": "gpl-2.0", "size": 41274 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.Iterator", "java.util.List", "java.util.Set", "org.springframework.transaction.annotation.Transactional" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import org.springframework.transaction.annotation.*;
[ "java.util", "org.springframework.transaction" ]
java.util; org.springframework.transaction;
1,267,685
@Override public Rectangle getBounds ();
Rectangle function ();
/** * Return a COPY of the absolute bounding box. * * @return the absolute bounding box */
Return a COPY of the absolute bounding box
getBounds
{ "repo_name": "jlpoolen/libreveris", "path": "src/main/omr/lag/Section.java", "license": "lgpl-3.0", "size": 17809 }
[ "java.awt.Rectangle" ]
import java.awt.Rectangle;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,367,904
protected void cancel() { commitTableEdit(); if (currentTranslation != null) { if (currentTranslation.isDirty()) { try { if (!querySave()) { return; } } catch (IOException e) { WriteErrorDialog.error(e, GameModule.getGameModul...
void function() { commitTableEdit(); if (currentTranslation != null) { if (currentTranslation.isDirty()) { try { if (!querySave()) { return; } } catch (IOException e) { WriteErrorDialog.error(e, GameModule.getGameModule().getArchiveWriter().getName()); } } } dispose(); }
/** * Cancel button clicked. Check for outstanding changes. */
Cancel button clicked. Check for outstanding changes
cancel
{ "repo_name": "ethaneldridge/vassal", "path": "src/VASSAL/i18n/TranslateWindow.java", "license": "lgpl-2.1", "size": 24478 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,856,698
@SimpleProperty( category = PropertyCategory.BEHAVIOR, description = "The minimum interval, in milliseconds, between sounds. If you play a sound, " + "all further Play() calls will be ignored until the interval has elapsed.") public int MinimumInterval() { return minimumInterval; }
@SimpleProperty( category = PropertyCategory.BEHAVIOR, description = STR + STR) int function() { return minimumInterval; }
/** * Returns the minimum interval required between calls to Play(), in * milliseconds. * Once the sound starts playing, all further Play() calls will be ignored * until the interval has elapsed. * @return minimum interval in ms */
Returns the minimum interval required between calls to Play(), in milliseconds. Once the sound starts playing, all further Play() calls will be ignored until the interval has elapsed
MinimumInterval
{ "repo_name": "warren922/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Sound.java", "license": "apache-2.0", "size": 14171 }
[ "com.google.appinventor.components.annotations.PropertyCategory", "com.google.appinventor.components.annotations.SimpleProperty" ]
import com.google.appinventor.components.annotations.PropertyCategory; import com.google.appinventor.components.annotations.SimpleProperty;
import com.google.appinventor.components.annotations.*;
[ "com.google.appinventor" ]
com.google.appinventor;
1,328,727
void execute(ListIterator<Handler> handlers, ListIterator<Handle> handles);
void execute(ListIterator<Handler> handlers, ListIterator<Handle> handles);
/** * Defines the execute method, which controls the dispatch flow by calling * methods on the dispatch object iterators. * * @param handlers The handlers iterator. * @param handles The handles iterator. */
Defines the execute method, which controls the dispatch flow by calling methods on the dispatch object iterators
execute
{ "repo_name": "lrezek/EasyDispatch", "path": "src/main/java/com/lrezek/easydispatch/dispatch/flow/DispatchFlowControl.java", "license": "mit", "size": 1753 }
[ "com.lrezek.easydispatch.handle.Handle", "com.lrezek.easydispatch.handle.Handler", "java.util.ListIterator" ]
import com.lrezek.easydispatch.handle.Handle; import com.lrezek.easydispatch.handle.Handler; import java.util.ListIterator;
import com.lrezek.easydispatch.handle.*; import java.util.*;
[ "com.lrezek.easydispatch", "java.util" ]
com.lrezek.easydispatch; java.util;
2,298,825
if (clip == null) throw new NullPointerException(); FloatControl c = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN); Float max = c.getMaximum(); Float min = c.getMinimum(); Float distance = Math.abs(max - min); c.setValue(min + (distance / ...
if (clip == null) throw new NullPointerException(); FloatControl c = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN); Float max = c.getMaximum(); Float min = c.getMinimum(); Float distance = Math.abs(max - min); c.setValue(min + (distance / range) * volume); }
/** Sets the volume for the master gain control of the line. * @param volume * @param range The range of the volume, e.g. for range 0-100, range * would be 100. */
Sets the volume for the master gain control of the line
setVolume
{ "repo_name": "fluks/timer-ng", "path": "src/fluks/timerng/sound/AbstractClipWrapper.java", "license": "gpl-2.0", "size": 2837 }
[ "javax.sound.sampled.FloatControl" ]
import javax.sound.sampled.FloatControl;
import javax.sound.sampled.*;
[ "javax.sound" ]
javax.sound;
974,266
public void postPreDeleteEvent( final QualifiedName name, final MetacatRequestContext metacatRequestContext ) { if (name.isPartitionDefinition()) { final PartitionsSaveRequestDto partitionsSaveRequestDto = new PartitionsSaveRequestDto(); partitionsSaveRequestDto.s...
void function( final QualifiedName name, final MetacatRequestContext metacatRequestContext ) { if (name.isPartitionDefinition()) { final PartitionsSaveRequestDto partitionsSaveRequestDto = new PartitionsSaveRequestDto(); partitionsSaveRequestDto.setPartitionIdsForDeletes(Lists.newArrayList(name.getPartitionName())); th...
/** * Calls the right method of the event bus for the given qualified name. * * @param name name * @param metacatRequestContext context */
Calls the right method of the event bus for the given qualified name
postPreDeleteEvent
{ "repo_name": "tgianos/metacat", "path": "metacat-main/src/main/java/com/netflix/metacat/main/services/MetacatServiceHelper.java", "license": "apache-2.0", "size": 10696 }
[ "com.google.common.collect.Lists", "com.netflix.metacat.common.MetacatRequestContext", "com.netflix.metacat.common.QualifiedName", "com.netflix.metacat.common.dto.DatabaseDto", "com.netflix.metacat.common.dto.PartitionsSaveRequestDto", "com.netflix.metacat.common.server.events.MetacatDeleteDatabasePreEven...
import com.google.common.collect.Lists; import com.netflix.metacat.common.MetacatRequestContext; import com.netflix.metacat.common.QualifiedName; import com.netflix.metacat.common.dto.DatabaseDto; import com.netflix.metacat.common.dto.PartitionsSaveRequestDto; import com.netflix.metacat.common.server.events.MetacatDele...
import com.google.common.collect.*; import com.netflix.metacat.common.*; import com.netflix.metacat.common.dto.*; import com.netflix.metacat.common.server.events.*;
[ "com.google.common", "com.netflix.metacat" ]
com.google.common; com.netflix.metacat;
2,027,140
public static void main(String args[]) { System.setProperty("swing.defaultlaf", UIManager.getSystemLookAndFeelClassName()); Logging.logSetup("traymonitor"); new TrayMonitor(args); }
static void function(String args[]) { System.setProperty(STR, UIManager.getSystemLookAndFeelClassName()); Logging.logSetup(STR); new TrayMonitor(args); }
/** * Main entry point. * @param args passed to any launched application, ignored otherwise */
Main entry point
main
{ "repo_name": "drytoastman/wwscc", "path": "swingapps/src/org/wwscc/tray/TrayMonitor.java", "license": "gpl-3.0", "size": 6913 }
[ "javax.swing.UIManager", "org.wwscc.util.Logging" ]
import javax.swing.UIManager; import org.wwscc.util.Logging;
import javax.swing.*; import org.wwscc.util.*;
[ "javax.swing", "org.wwscc.util" ]
javax.swing; org.wwscc.util;
1,086,800
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<GalleryImageInner>> getWithResponseAsync( String resourceGroupName, String galleryName, String galleryImageName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<GalleryImageInner>> function( String resourceGroupName, String galleryName, String galleryImageName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == nul...
/** * Retrieves information about a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. * @param galleryImageName The name of the gallery Image Defi...
Retrieves information about a gallery Image Definition
getWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/GalleryImagesClientImpl.java", "license": "mit", "size": 76471 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.compute.fluent.models.GalleryImageInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.compute.fluent.models.GalleryImageInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,179,815
public void setSeriesOutlinePaint(int series, Paint paint); // FIXME: add setSeriesOutlinePaint(int, Paint, boolean)?
void function(int series, Paint paint);
/** * Sets the paint used for a series outline and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero-based). * @param paint the paint (<code>null</code> permitted). * * @see #getSeriesOutlinePaint(int) */
Sets the paint used for a series outline and sends a <code>RendererChangeEvent</code> to all registered listeners
setSeriesOutlinePaint
{ "repo_name": "sebkur/JFreeChart", "path": "src/main/java/org/jfree/chart/renderer/xy/XYItemRenderer.java", "license": "lgpl-3.0", "size": 64436 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,960,007
public final IsColor getBorderColor() { return ColorBuilder.parse(getBorderColorAsString()); } // ------------------------------------------------------ // HOVER // ------------------------------------------------------
final IsColor function() { return ColorBuilder.parse(getBorderColorAsString()); }
/** * Returns the border color. * * @return the border color. */
Returns the border color
getBorderColor
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/options/AbstractElement.java", "license": "apache-2.0", "size": 7422 }
[ "org.pepstock.charba.client.colors.ColorBuilder", "org.pepstock.charba.client.colors.IsColor" ]
import org.pepstock.charba.client.colors.ColorBuilder; import org.pepstock.charba.client.colors.IsColor;
import org.pepstock.charba.client.colors.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
351,558
public void nodeExpand(ExpandEvent event) { final Item i = tree.getItem(event.getItemId()); if (!tree.hasChildren(i)) { // populate tree's node which was expanded populateNode(event.getItemId().toString(), event.getItemId()); } }
void function(ExpandEvent event) { final Item i = tree.getItem(event.getItemId()); if (!tree.hasChildren(i)) { populateNode(event.getItemId().toString(), event.getItemId()); } }
/** * Handle tree expand event, populate expanded node's childs with new files * and directories. */
Handle tree expand event, populate expanded node's childs with new files and directories
nodeExpand
{ "repo_name": "informera/nutchManager", "path": "src/main/java/de/informera/dev/nutchManager/sysGui/FileChooser.java", "license": "apache-2.0", "size": 4058 }
[ "com.vaadin.data.Item", "com.vaadin.ui.Tree" ]
import com.vaadin.data.Item; import com.vaadin.ui.Tree;
import com.vaadin.data.*; import com.vaadin.ui.*;
[ "com.vaadin.data", "com.vaadin.ui" ]
com.vaadin.data; com.vaadin.ui;
913,389
public SearchSourceBuilder aggregations(BytesReference aggregationsBinary) { this.aggregationsBinary = aggregationsBinary; return this; }
SearchSourceBuilder function(BytesReference aggregationsBinary) { this.aggregationsBinary = aggregationsBinary; return this; }
/** * Sets a raw (xcontent / json) addAggregation. */
Sets a raw (xcontent / json) addAggregation
aggregations
{ "repo_name": "arowla/elasticsearch", "path": "src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java", "license": "apache-2.0", "size": 33479 }
[ "org.elasticsearch.common.bytes.BytesReference" ]
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.bytes.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,740,162
INDArray result = layer.getParam(variable).dup(); if (Nd4j.getRandom().getStatePointer() != null) { Nd4j.getExecutioner().exec(new DropOut(result, result, layer.conf().getLayer().getDropOut())); } else { Nd4j.getExecutioner().exec(new LegacyDropOut(result, result, layer.conf().ge...
INDArray result = layer.getParam(variable).dup(); if (Nd4j.getRandom().getStatePointer() != null) { Nd4j.getExecutioner().exec(new DropOut(result, result, layer.conf().getLayer().getDropOut())); } else { Nd4j.getExecutioner().exec(new LegacyDropOut(result, result, layer.conf().getLayer().getDropOut())); } return result...
/** * Apply drop connect to the given variable * @param layer the layer with the variables * @param variable the variable to apply * @return the post applied drop connect */
Apply drop connect to the given variable
applyDropConnect
{ "repo_name": "crockpotveggies/deeplearning4j", "path": "deeplearning4j-nn/src/main/java/org/deeplearning4j/util/Dropout.java", "license": "apache-2.0", "size": 1672 }
[ "org.nd4j.linalg.api.ndarray.INDArray", "org.nd4j.linalg.api.ops.impl.transforms.LegacyDropOut", "org.nd4j.linalg.api.ops.random.impl.DropOut", "org.nd4j.linalg.factory.Nd4j" ]
import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.api.ops.impl.transforms.LegacyDropOut; import org.nd4j.linalg.api.ops.random.impl.DropOut; import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.api.ndarray.*; import org.nd4j.linalg.api.ops.impl.transforms.*; import org.nd4j.linalg.api.ops.random.impl.*; import org.nd4j.linalg.factory.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
830,353
public ExchangePattern getExchangePattern() { return exchangePattern; }
ExchangePattern function() { return exchangePattern; }
/** * Returns the default exchange pattern to use when creating an exchange. */
Returns the default exchange pattern to use when creating an exchange
getExchangePattern
{ "repo_name": "grgrzybek/camel", "path": "camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java", "license": "apache-2.0", "size": 18379 }
[ "org.apache.camel.ExchangePattern" ]
import org.apache.camel.ExchangePattern;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,186,075
public void removeParameters(String key) { if (key == null) { throw new NullPointerException("The key may not be null"); } Map<String, TechniqueParameters> oldMap = this.parameters; Map<String, TechniqueParameters> newMap = new LinkedHashMap<String, TechniqueParamete...
void function(String key) { if (key == null) { throw new NullPointerException(STR); } Map<String, TechniqueParameters> oldMap = this.parameters; Map<String, TechniqueParameters> newMap = new LinkedHashMap<String, TechniqueParameters>(); if (oldMap!= null) { newMap.putAll(oldMap); } newMap.remove(key); if (newMap.isEmpt...
/** * Remove the given parameters. The parameters of this instance will be * replaced with a map that contains all previous mappings, except for * the one with the given key.<br> * If this new map would be empty, then it will be set to * <code>null</code>. * * @param key ...
Remove the given parameters. The parameters of this instance will be replaced with a map that contains all previous mappings, except for the one with the given key. If this new map would be empty, then it will be set to <code>null</code>
removeParameters
{ "repo_name": "javagl/JglTF", "path": "jgltf-impl-v1/src/main/java/de/javagl/jgltf/impl/v1/Technique.java", "license": "mit", "size": 11552 }
[ "java.util.LinkedHashMap", "java.util.Map" ]
import java.util.LinkedHashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
502,157
private void validateParamExists(Map<String, Object> request, String paramName) throws ValidationException { if (!request.containsKey(paramName)) { throw new ValidationException(INVALID_PARAMS); } } /** * Translates the parameter into a {@link List}. * We then validate...
void function(Map<String, Object> request, String paramName) throws ValidationException { if (!request.containsKey(paramName)) { throw new ValidationException(INVALID_PARAMS); } } /** * Translates the parameter into a {@link List}. * We then validate if the amount of elements does not exceed the maximum allowed. * Afte...
/** * Checks if a parameter exists in the map * * @param request All request parameters * @param paramName The name of the parameter we are looking for * @throws ValidationException if <tt>request</tt> does not contain <tt>paramName</tt> */
Checks if a parameter exists in the map
validateParamExists
{ "repo_name": "jserv/iri", "path": "src/main/java/com/iota/iri/service/API.java", "license": "gpl-3.0", "size": 75465 }
[ "com.iota.iri.conf.APIConfig", "java.util.List", "java.util.Map" ]
import com.iota.iri.conf.APIConfig; import java.util.List; import java.util.Map;
import com.iota.iri.conf.*; import java.util.*;
[ "com.iota.iri", "java.util" ]
com.iota.iri; java.util;
1,535,859
public void setPaymentFileEmailService(PdpEmailService paymentFileEmailService) { this.paymentFileEmailService = paymentFileEmailService; }
void function(PdpEmailService paymentFileEmailService) { this.paymentFileEmailService = paymentFileEmailService; }
/** * Sets the paymentFileEmailService attribute value. * * @param paymentFileEmailService The paymentFileEmailService to set. */
Sets the paymentFileEmailService attribute value
setPaymentFileEmailService
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/pdp/batch/service/impl/ExtractPaymentServiceImpl.java", "license": "agpl-3.0", "size": 36744 }
[ "org.kuali.kfs.pdp.service.PdpEmailService" ]
import org.kuali.kfs.pdp.service.PdpEmailService;
import org.kuali.kfs.pdp.service.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,227,557
public static ImageDescriptor getImageDescriptor(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); }
static ImageDescriptor function(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); }
/** * Returns an image descriptor for the image file at the given * plug-in relative path * * @param path the path * @return the image descriptor */
Returns an image descriptor for the image file at the given plug-in relative path
getImageDescriptor
{ "repo_name": "drzhonghao/grapa", "path": "src/partial/code/grapa/Activator.java", "license": "lgpl-3.0", "size": 1357 }
[ "org.eclipse.jface.resource.ImageDescriptor" ]
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
2,390,667
void addServiceCallConfiguration(String serviceName, ServiceCallConfigurationDefinition configuration);
void addServiceCallConfiguration(String serviceName, ServiceCallConfigurationDefinition configuration);
/** * Adds the service call configuration * * @param serviceName name of the service * @param configuration the configuration */
Adds the service call configuration
addServiceCallConfiguration
{ "repo_name": "curso007/camel", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 79052 }
[ "org.apache.camel.model.cloud.ServiceCallConfigurationDefinition" ]
import org.apache.camel.model.cloud.ServiceCallConfigurationDefinition;
import org.apache.camel.model.cloud.*;
[ "org.apache.camel" ]
org.apache.camel;
686,523
public SupportLongSparseArrayIterable<V> values(Object... values);
SupportLongSparseArrayIterable<V> function(Object... values);
/** * Creates a filter matching the specified entry values. * * @param values the values to match. * @return the filtered iterable. */
Creates a filter matching the specified entry values
values
{ "repo_name": "davide-maestroni/robo-fashion", "path": "library/src/main/java/com/github/dm/rf/android/filter/SupportLongSparseArrayFilterBuilder.java", "license": "apache-2.0", "size": 3107 }
[ "com.github.dm.rf.android.iterator.SupportLongSparseArrayIterable" ]
import com.github.dm.rf.android.iterator.SupportLongSparseArrayIterable;
import com.github.dm.rf.android.iterator.*;
[ "com.github.dm" ]
com.github.dm;
749,402
@NotNull public String readCurrentBranch() { return branchExist() ? RepositoryUtil.tryLoadFile(myCurrentBranch) : HgRepository.DEFAULT_BRANCH; }
String function() { return branchExist() ? RepositoryUtil.tryLoadFile(myCurrentBranch) : HgRepository.DEFAULT_BRANCH; }
/** * Return current branch */
Return current branch
readCurrentBranch
{ "repo_name": "android-ia/platform_tools_idea", "path": "plugins/hg4idea/src/org/zmlx/hg4idea/repo/HgRepositoryReader.java", "license": "apache-2.0", "size": 4819 }
[ "com.intellij.dvcs.repo.RepositoryUtil" ]
import com.intellij.dvcs.repo.RepositoryUtil;
import com.intellij.dvcs.repo.*;
[ "com.intellij.dvcs" ]
com.intellij.dvcs;
982,590
PiAction mapTreatment(TrafficTreatment treatment, PiTableId piTableId) throws PiInterpreterException;
PiAction mapTreatment(TrafficTreatment treatment, PiTableId piTableId) throws PiInterpreterException;
/** * Returns an action of a PI pipeline that is functionally equivalent to the * given traffic treatment for the given table. * * @param treatment traffic treatment * @param piTableId PI table ID * @return action object * @throws PiInterpreterException if the treatment cannot be mapp...
Returns an action of a PI pipeline that is functionally equivalent to the given traffic treatment for the given table
mapTreatment
{ "repo_name": "kuujo/onos", "path": "core/api/src/main/java/org/onosproject/net/pi/model/PiPipelineInterpreter.java", "license": "apache-2.0", "size": 5652 }
[ "org.onosproject.net.flow.TrafficTreatment", "org.onosproject.net.pi.runtime.PiAction" ]
import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.pi.runtime.PiAction;
import org.onosproject.net.flow.*; import org.onosproject.net.pi.runtime.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,600,410
public TiledMap load (String fileName, TmxMapLoader.Parameters parameters) { try { this.convertObjectToTileSpace = parameters.convertObjectToTileSpace; FileHandle tmxFile = resolve(fileName); root = xml.parse(tmxFile); ObjectMap<String, Texture> textures = new ObjectMap<String, Texture>(); for (File...
TiledMap function (String fileName, TmxMapLoader.Parameters parameters) { try { this.convertObjectToTileSpace = parameters.convertObjectToTileSpace; FileHandle tmxFile = resolve(fileName); root = xml.parse(tmxFile); ObjectMap<String, Texture> textures = new ObjectMap<String, Texture>(); for (FileHandle textureFile : lo...
/** Loads the {@link TiledMap} from the given file. The file is resolved via the {@link FileHandleResolver} set in the * constructor of this class. By default it will resolve to an internal file. * @param fileName the filename * @param parameters specifies whether to use y-up, generate mip maps etc. * @return t...
Loads the <code>TiledMap</code> from the given file. The file is resolved via the <code>FileHandleResolver</code> set in the constructor of this class. By default it will resolve to an internal file
load
{ "repo_name": "nooone/libgdx", "path": "gdx/src/com/badlogic/gdx/maps/tiled/TmxMapLoader.java", "license": "apache-2.0", "size": 17253 }
[ "com.badlogic.gdx.files.FileHandle", "com.badlogic.gdx.graphics.Texture", "com.badlogic.gdx.maps.ImageResolver", "com.badlogic.gdx.utils.GdxRuntimeException", "com.badlogic.gdx.utils.ObjectMap", "java.io.IOException" ]
import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.maps.ImageResolver; import com.badlogic.gdx.utils.GdxRuntimeException; import com.badlogic.gdx.utils.ObjectMap; import java.io.IOException;
import com.badlogic.gdx.files.*; import com.badlogic.gdx.graphics.*; import com.badlogic.gdx.maps.*; import com.badlogic.gdx.utils.*; import java.io.*;
[ "com.badlogic.gdx", "java.io" ]
com.badlogic.gdx; java.io;
1,265,421
private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writePaint(this.paint, stream); SerialUtilities.writePaint(this.backgroundPaint, stream); SerialUtilities.writePaint(this.outlinePaint, stream); SerialUtiliti...
void function(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writePaint(this.paint, stream); SerialUtilities.writePaint(this.backgroundPaint, stream); SerialUtilities.writePaint(this.outlinePaint, stream); SerialUtilities.writeStroke(this.outlineStroke, stream); }
/** * Provides serialization support. * * @param stream the output stream. * * @throws IOException if there is an I/O error. */
Provides serialization support
writeObject
{ "repo_name": "aaronc/jfreechart", "path": "source/org/jfree/chart/plot/dial/DialValueIndicator.java", "license": "lgpl-2.1", "size": 22922 }
[ "java.io.IOException", "java.io.ObjectOutputStream", "org.jfree.io.SerialUtilities" ]
import java.io.IOException; import java.io.ObjectOutputStream; import org.jfree.io.SerialUtilities;
import java.io.*; import org.jfree.io.*;
[ "java.io", "org.jfree.io" ]
java.io; org.jfree.io;
686,686
private synchronized byte[] createLogData(String clientID, String name, long time, Level level, Object message, Throwable t, Formatter formatter) { byte[] data = null; try { byteArrayOutputStream.reset(); dataOutputStream.writeLong(time); dataOutputStream.writeUTF(formatter.format(clientID,...
synchronized byte[] function(String clientID, String name, long time, Level level, Object message, Throwable t, Formatter formatter) { byte[] data = null; try { byteArrayOutputStream.reset(); dataOutputStream.writeLong(time); dataOutputStream.writeUTF(formatter.format(clientID, name, time, level, message, t)); data = b...
/** * Create the log data. * <p> * Executed only by the master. * * @param clientID * the client id. * @param name * the name of the logger. * @param time * the relative time when the logging was done. * @param level * the level to use for...
Create the log data. Executed only by the master
createLogData
{ "repo_name": "yuuhhe/microlog", "path": "net/sf/microlog/midp/appender/RecordStoreAppender.java", "license": "apache-2.0", "size": 11955 }
[ "java.io.IOException", "net.sf.microlog.core.Formatter", "net.sf.microlog.core.Level" ]
import java.io.IOException; import net.sf.microlog.core.Formatter; import net.sf.microlog.core.Level;
import java.io.*; import net.sf.microlog.core.*;
[ "java.io", "net.sf.microlog" ]
java.io; net.sf.microlog;
615,562
@Override public void exitPolicy(@NotNull PoCoParser.PolicyContext ctx) { }
@Override public void exitPolicy(@NotNull PoCoParser.PolicyContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterPolicy
{ "repo_name": "Corjuh/PoCo-Compiler", "path": "Parser/gen/PoCoParserBaseListener.java", "license": "lgpl-2.1", "size": 18482 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
706,450
default boolean isPresent(WebElement element) { return getSeb().isPresent(element); }
default boolean isPresent(WebElement element) { return getSeb().isPresent(element); }
/** * Returns true if element exists on actual page. It is opposite to * {@link SebContext#isNotPresent(WebElement)}. * * @param element * The element to test * @return <code>true</code> if element is present */
Returns true if element exists on actual page. It is opposite to <code>SebContext#isNotPresent(WebElement)</code>
isPresent
{ "repo_name": "etnetera/SeleniumBrowser", "path": "src/main/java/cz/etnetera/seb/SebContext.java", "license": "apache-2.0", "size": 27433 }
[ "org.openqa.selenium.WebElement" ]
import org.openqa.selenium.WebElement;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
1,129,272
public void testRereplicate1() throws Exception { List<DatanodeDescriptor> chosenNodes = new ArrayList<DatanodeDescriptor>(); chosenNodes.add(dataNodes[0]); DatanodeDescriptor[] targets; targets = replicator.chooseTarget(filename, 0, dataNodes[0], chosenN...
void function() throws Exception { List<DatanodeDescriptor> chosenNodes = new ArrayList<DatanodeDescriptor>(); chosenNodes.add(dataNodes[0]); DatanodeDescriptor[] targets; targets = replicator.chooseTarget(filename, 0, dataNodes[0], chosenNodes, BLOCK_SIZE); assertEquals(targets.length, 0); targets = replicator.chooseT...
/** * This testcase tests re-replication, when dataNodes[0] is already chosen. * So the 1st replica can be placed on random rack. * the 2nd replica should be placed on different node by same rack as * the 1st replica. The 3rd replica can be placed randomly. * @throws Exception */
This testcase tests re-replication, when dataNodes[0] is already chosen. So the 1st replica can be placed on random rack. the 2nd replica should be placed on different node by same rack as the 1st replica. The 3rd replica can be placed randomly
testRereplicate1
{ "repo_name": "cloudera/hadoop-hdfs", "path": "src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestReplicationPolicy.java", "license": "apache-2.0", "size": 17972 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
501,733
@Test public void testAddSongsLast() { final Queue queue = new Queue(); final SongInfo a = new SongInfo(5); final SongInfo b = null; final SongInfo c = new SongInfo(7); final SongInfo d = new SongInfo(11); final List<SongInfo> songs = Arrays.asList(a, b, c, d); ...
void function() { final Queue queue = new Queue(); final SongInfo a = new SongInfo(5); final SongInfo b = null; final SongInfo c = new SongInfo(7); final SongInfo d = new SongInfo(11); final List<SongInfo> songs = Arrays.asList(a, b, c, d); assertTrue(queue.addSongsLast(songs)); assertEquals(3, queue.size()); assertEqu...
/** * Tests to ensure that {@link Queue#addSongsLast(Collection)} will correctly add a collection of songs to the end * of the queue. */
Tests to ensure that <code>Queue#addSongsLast(Collection)</code> will correctly add a collection of songs to the end of the queue
testAddSongsLast
{ "repo_name": "eviljoe/evilmusic", "path": "src/test/java/em/model/QueueTest.java", "license": "gpl-3.0", "size": 14125 }
[ "java.util.Arrays", "java.util.List", "org.junit.gen5.api.Assertions" ]
import java.util.Arrays; import java.util.List; import org.junit.gen5.api.Assertions;
import java.util.*; import org.junit.gen5.api.*;
[ "java.util", "org.junit.gen5" ]
java.util; org.junit.gen5;
755,441
public static void insertCorrelationType(Connection conn, CorrelationAttributeInstance.Type correlationType) throws SQLException { String sql = "INSERT INTO correlation_types(id, display_name, db_table_name, supported, enabled) VALUES (?, ?, ?, ?, ?)"; try (PreparedStatement preparedStatement = con...
static void function(Connection conn, CorrelationAttributeInstance.Type correlationType) throws SQLException { String sql = STR; try (PreparedStatement preparedStatement = conn.prepareStatement(sql)) { preparedStatement.setInt(1, correlationType.getId()); preparedStatement.setString(2, correlationType.getDisplayName())...
/** * Inserts the specified correlation type into the database. * * @param conn Open connection to use. * @param correlationType New correlation type to add. * */
Inserts the specified correlation type into the database
insertCorrelationType
{ "repo_name": "eugene7646/autopsy", "path": "Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUtil.java", "license": "apache-2.0", "size": 12578 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,118,205
protected String resolveCodeWithoutArguments(String code, Locale locale) { String result = null; for (int i = 0; result == null && i < this.basenames.length; i++) { ResourceBundle bundle = getResourceBundle(this.basenames[i], locale); if (bundle != null) { result = getStringOrNull(bundle, code); ...
String function(String code, Locale locale) { String result = null; for (int i = 0; result == null && i < this.basenames.length; i++) { ResourceBundle bundle = getResourceBundle(this.basenames[i], locale); if (bundle != null) { result = getStringOrNull(bundle, code); } } return result; }
/** * Resolves the given message code as key in the registered resource bundles, * returning the value found in the bundle as-is (without MessageFormat parsing). */
Resolves the given message code as key in the registered resource bundles, returning the value found in the bundle as-is (without MessageFormat parsing)
resolveCodeWithoutArguments
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/context/support/ResourceBundleMessageSource.java", "license": "unlicense", "size": 11731 }
[ "java.util.Locale", "java.util.ResourceBundle" ]
import java.util.Locale; import java.util.ResourceBundle;
import java.util.*;
[ "java.util" ]
java.util;
2,575,301
public static InteractBlockEvent.Secondary createInteractBlockEventSecondary(Game game, Cause cause, Optional<Vector3d> interactionPoint, BlockSnapshot targetBlock, Direction targetSide) { Map<String, Object> values = Maps.newHashMap(); values.put("game", game); values.put("cause", cause); ...
static InteractBlockEvent.Secondary function(Game game, Cause cause, Optional<Vector3d> interactionPoint, BlockSnapshot targetBlock, Direction targetSide) { Map<String, Object> values = Maps.newHashMap(); values.put("game", game); values.put("cause", cause); values.put(STR, interactionPoint); values.put(STR, targetBloc...
/** * AUTOMATICALLY GENERATED, DO NOT EDIT. * Creates a new instance of * {@link org.spongepowered.api.event.block.InteractBlockEvent.Secondary}. * * @param game The game * @param cause The cause * @param interactionPoint The interaction point * @param targetBlock The target blo...
AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.block.InteractBlockEvent.Secondary</code>
createInteractBlockEventSecondary
{ "repo_name": "jamierocks/SpongeAPI", "path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java", "license": "mit", "size": 196993 }
[ "com.flowpowered.math.vector.Vector3d", "com.google.common.collect.Maps", "java.util.Map", "java.util.Optional", "org.spongepowered.api.Game", "org.spongepowered.api.block.BlockSnapshot", "org.spongepowered.api.event.block.InteractBlockEvent", "org.spongepowered.api.event.cause.Cause", "org.spongepo...
import com.flowpowered.math.vector.Vector3d; import com.google.common.collect.Maps; import java.util.Map; import java.util.Optional; import org.spongepowered.api.Game; import org.spongepowered.api.block.BlockSnapshot; import org.spongepowered.api.event.block.InteractBlockEvent; import org.spongepowered.api.event.cause....
import com.flowpowered.math.vector.*; import com.google.common.collect.*; import java.util.*; import org.spongepowered.api.*; import org.spongepowered.api.block.*; import org.spongepowered.api.event.block.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.util.*;
[ "com.flowpowered.math", "com.google.common", "java.util", "org.spongepowered.api" ]
com.flowpowered.math; com.google.common; java.util; org.spongepowered.api;
2,173,163
public UserAccount getOwner() { return Base.getAll_as(this.model, this.getResource(), OWNER, UserAccount.class).firstValue(); }
UserAccount function() { return Base.getAll_as(this.model, this.getResource(), OWNER, UserAccount.class).firstValue(); }
/** * Get all values of property Owner as a ReactorResult of UserAccount * * @return a ReactorResult of $type which can conveniently be converted to * iterator, list or array * * [Generated from RDFReactor template rule * #get12dynamic-reactorresult] */
Get all values of property Owner as a ReactorResult of UserAccount
getOwner
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java", "license": "mit", "size": 317844 }
[ "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdfreactor" ]
org.ontoware.rdfreactor;
1,083,928
if (array1 == null) { return array2 == null; } if (array2 == null) { return false; } if (array1.length != array2.length) { return false; } Set<Integer> foundIndexes = Sets.newHashSet(); for (int i = 0; i < array1.length; i++) { boolean found = false; for (int j = 0; j < array2.length; j++...
if (array1 == null) { return array2 == null; } if (array2 == null) { return false; } if (array1.length != array2.length) { return false; } Set<Integer> foundIndexes = Sets.newHashSet(); for (int i = 0; i < array1.length; i++) { boolean found = false; for (int j = 0; j < array2.length; j++) { if (!foundIndexes.contains(...
/** * Compares 2 arrays to see if thier content is the same independent of * order and considering nulls * @param array1 * @param array2 * @return */
Compares 2 arrays to see if thier content is the same independent of order and considering nulls
arraysEqual
{ "repo_name": "sschuberth/spdx-tools", "path": "src/org/spdx/rdfparser/RdfModelHelper.java", "license": "apache-2.0", "size": 4556 }
[ "com.google.common.base.Objects", "com.google.common.collect.Sets", "java.util.Set" ]
import com.google.common.base.Objects; import com.google.common.collect.Sets; import java.util.Set;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,920,483
@Nullable public Entity getControllingPassenger() { return this.getPassengers().isEmpty() ? null : (Entity)this.getPassengers().get(0); }
Entity function() { return this.getPassengers().isEmpty() ? null : (Entity)this.getPassengers().get(0); }
/** * For vehicles, the first passenger is generally considered the controller and "drives" the vehicle. For example, * Pigs, Horses, and Boats are generally "steered" by the controlling passenger. */
For vehicles, the first passenger is generally considered the controller and "drives" the vehicle. For example, Pigs, Horses, and Boats are generally "steered" by the controlling passenger
getControllingPassenger
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/passive/EntityPig.java", "license": "lgpl-2.1", "size": 12198 }
[ "net.minecraft.entity.Entity" ]
import net.minecraft.entity.Entity;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
1,657,764
public void sendWelcomeMessage(Player player) { if (service.getProperty(RegistrationSettings.USE_WELCOME_MESSAGE)) { List<String> welcomeMessage = getWelcomeMessage(player); if (service.getProperty(RegistrationSettings.BROADCAST_WELCOME_MESSAGE)) { welcomeMessage.forE...
void function(Player player) { if (service.getProperty(RegistrationSettings.USE_WELCOME_MESSAGE)) { List<String> welcomeMessage = getWelcomeMessage(player); if (service.getProperty(RegistrationSettings.BROADCAST_WELCOME_MESSAGE)) { welcomeMessage.forEach(bukkitService::broadcastMessage); } else { welcomeMessage.forEach...
/** * Sends the welcome message accordingly to the configuration * * @param player the player for whom the welcome message should be prepared */
Sends the welcome message accordingly to the configuration
sendWelcomeMessage
{ "repo_name": "Xephi/AuthMeReloaded", "path": "src/main/java/fr/xephi/authme/settings/WelcomeMessageConfiguration.java", "license": "gpl-3.0", "size": 4811 }
[ "fr.xephi.authme.settings.properties.RegistrationSettings", "java.util.List", "org.bukkit.entity.Player" ]
import fr.xephi.authme.settings.properties.RegistrationSettings; import java.util.List; import org.bukkit.entity.Player;
import fr.xephi.authme.settings.properties.*; import java.util.*; import org.bukkit.entity.*;
[ "fr.xephi.authme", "java.util", "org.bukkit.entity" ]
fr.xephi.authme; java.util; org.bukkit.entity;
584,397
List<EcfInfoDto> findVacantEventClassFamiliesByApplicationId(String applicationId);
List<EcfInfoDto> findVacantEventClassFamiliesByApplicationId(String applicationId);
/** * Find Vacant Event Class Families by application id. * * @param applicationId the application id * @return the list of found Event Class Families */
Find Vacant Event Class Families by application id
findVacantEventClassFamiliesByApplicationId
{ "repo_name": "forGGe/kaa", "path": "server/common/dao/src/main/java/org/kaaproject/kaa/server/common/dao/ApplicationEventMapService.java", "license": "apache-2.0", "size": 3044 }
[ "java.util.List", "org.kaaproject.kaa.common.dto.event.EcfInfoDto" ]
import java.util.List; import org.kaaproject.kaa.common.dto.event.EcfInfoDto;
import java.util.*; import org.kaaproject.kaa.common.dto.event.*;
[ "java.util", "org.kaaproject.kaa" ]
java.util; org.kaaproject.kaa;
1,046,054
interface WithPremierAddOnTags { Update withPremierAddOnTags(Map<String, String> premierAddOnTags); }
interface WithPremierAddOnTags { Update withPremierAddOnTags(Map<String, String> premierAddOnTags); }
/** * Specifies premierAddOnTags. */
Specifies premierAddOnTags
withPremierAddOnTags
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "appservice/resource-manager/v2016_08_01/src/main/java/com/microsoft/azure/management/appservice/v2016_08_01/PremierAddOn.java", "license": "mit", "size": 10191 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
439,056
private File getLandFile(Land land) { return new File(landsDir + "/" + land.getName() + "." + land.getGenealogy() + EXT_CONF); }
File function(Land land) { return new File(landsDir + "/" + land.getName() + "." + land.getGenealogy() + EXT_CONF); }
/** * Gets the land file. * * @param land the land * @return the land file */
Gets the land file
getLandFile
{ "repo_name": "Tabinol/Factoid", "path": "src/main/java/me/tabinol/factoid/storage/StorageFlat.java", "license": "gpl-3.0", "size": 21587 }
[ "java.io.File", "me.tabinol.factoid.lands.Land" ]
import java.io.File; import me.tabinol.factoid.lands.Land;
import java.io.*; import me.tabinol.factoid.lands.*;
[ "java.io", "me.tabinol.factoid" ]
java.io; me.tabinol.factoid;
487,314
void onKnownCustomEmojiChangeName(KnownCustomEmojiChangeNameEvent event);
void onKnownCustomEmojiChangeName(KnownCustomEmojiChangeNameEvent event);
/** * This method is called every time a custom emoji's name changed. * * @param event The event. */
This method is called every time a custom emoji's name changed
onKnownCustomEmojiChangeName
{ "repo_name": "BtoBastian/Javacord", "path": "javacord-api/src/main/java/org/javacord/api/listener/server/emoji/KnownCustomEmojiChangeNameListener.java", "license": "lgpl-3.0", "size": 899 }
[ "org.javacord.api.event.server.emoji.KnownCustomEmojiChangeNameEvent" ]
import org.javacord.api.event.server.emoji.KnownCustomEmojiChangeNameEvent;
import org.javacord.api.event.server.emoji.*;
[ "org.javacord.api" ]
org.javacord.api;
173,364
@SuppressWarnings("deprecation") private static void addDeprecatedKeys() { Configuration.addDeprecations(new DeprecationDelta[] { new DeprecationDelta("mapred.temp.dir", MRConfig.TEMP_DIR), new DeprecationDelta("mapred.local.dir", MRConfig.LOCAL_DIR), new DeprecationDelta("map...
@SuppressWarnings(STR) static void function() { Configuration.addDeprecations(new DeprecationDelta[] { new DeprecationDelta(STR, MRConfig.TEMP_DIR), new DeprecationDelta(STR, MRConfig.LOCAL_DIR), new DeprecationDelta(STR, MRConfig.MAPMEMORY_MB), new DeprecationDelta(STR, MRConfig.REDUCEMEMORY_MB), new DeprecationDelta(...
/** * Adds deprecated keys and the corresponding new keys to the Configuration */
Adds deprecated keys and the corresponding new keys to the Configuration
addDeprecatedKeys
{ "repo_name": "apurtell/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ConfigUtil.java", "license": "apache-2.0", "size": 21388 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.mapreduce.Job", "org.apache.hadoop.mapreduce.MRConfig", "org.apache.hadoop.mapreduce.MRJobConfig", "org.apache.hadoop.mapreduce.lib.input.FileInputFormat", "org.apache.hadoop.mapreduce.server.jobtracker.JTConfig", "org.apache.hadoop.mapreduce.se...
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.MRConfig; import org.apache.hadoop.mapreduce.MRJobConfig; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.server.jobtracker.JTConfig; import org.apache...
import org.apache.hadoop.conf.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.lib.input.*; import org.apache.hadoop.mapreduce.server.jobtracker.*; import org.apache.hadoop.mapreduce.server.tasktracker.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,317,322
public OneResponse disable() { return enable(false); }
OneResponse function() { return enable(false); }
/** * Disables the MarketPlaceApp. * * @return If successful the message contains the MarketPlaceApp id. */
Disables the MarketPlaceApp
disable
{ "repo_name": "unistra/one", "path": "src/oca/java/src/org/opennebula/client/marketplaceapp/MarketPlaceApp.java", "license": "apache-2.0", "size": 14824 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
2,857,711
public void saveDocument(String fileName) throws Docx4JException { wordMLPackage.save(new File(fileName)); }
void function(String fileName) throws Docx4JException { wordMLPackage.save(new File(fileName)); }
/** * Saves the document with replaced values to the given file path. * @param fileName the full path to where you want to store your file. * @throws Docx4JException */
Saves the document with replaced values to the given file path
saveDocument
{ "repo_name": "joelacummings/Templatr", "path": "src/main/java/ca/joelcummings/templatr/Templatr.java", "license": "apache-2.0", "size": 12137 }
[ "java.io.File", "org.docx4j.openpackaging.exceptions.Docx4JException" ]
import java.io.File; import org.docx4j.openpackaging.exceptions.Docx4JException;
import java.io.*; import org.docx4j.openpackaging.exceptions.*;
[ "java.io", "org.docx4j.openpackaging" ]
java.io; org.docx4j.openpackaging;
1,786,214
public MinecraftServer getServer() { return entity.getServer(); } }; ICommandManager icommandmanager = server.getCommandManager(); try { int j = icommandmanager.executeCommand(icommandsen...
MinecraftServer function() { return entity.getServer(); } }; ICommandManager icommandmanager = server.getCommandManager(); try { int j = icommandmanager.executeCommand(icommandsender, s); if (j < 1) { throw new CommandException(STR, new Object[] {s}); } } catch (Throwable var24) { throw new CommandException(STR, new Ob...
/** * Get the Minecraft server instance */
Get the Minecraft server instance
getServer
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/command/CommandExecuteAt.java", "license": "gpl-3.0", "size": 7223 }
[ "net.minecraft.server.MinecraftServer" ]
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.*;
[ "net.minecraft.server" ]
net.minecraft.server;
2,563,712
@Override public int quantize(double value) throws QuantizationException { try { return values.get(getMiddleRange(value)); } catch (ExecutionException e) { throw new QuantizationException(e); } }
int function(double value) throws QuantizationException { try { return values.get(getMiddleRange(value)); } catch (ExecutionException e) { throw new QuantizationException(e); } }
/** * Implemented as specified in {@link QuantumStrategy}. * * @see QuantumStrategy#quantize(double) */
Implemented as specified in <code>QuantumStrategy</code>
quantize
{ "repo_name": "simleo/openmicroscopy", "path": "components/rendering/src/omeis/providers/re/quantum/Quantization_float.java", "license": "gpl-2.0", "size": 7600 }
[ "java.util.concurrent.ExecutionException" ]
import java.util.concurrent.ExecutionException;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,565,390
// Shape Drawing methods section private void addDot(int x, int y, Color RGB){ // Get the corresponding Color on this Color tRGB = new Color(this.getRGB(x, y)); // Get the new values int nRed = tRGB.getRed() + RGB.getRed(); int nGreen = tRGB.getGreen() + RGB.getGreen(); ...
void function(int x, int y, Color RGB){ Color tRGB = new Color(this.getRGB(x, y)); int nRed = tRGB.getRed() + RGB.getRed(); int nGreen = tRGB.getGreen() + RGB.getGreen(); int nBlue = tRGB.getBlue() + RGB.getBlue(); if(nRed > 255){nRed = 255;} if(nGreen > 255){nGreen = 255;} if(nBlue > 255){nBlue = 255;} Color nColor = ...
/** * Sets the pixel at the specified coordinate (x,y) to the RGB Color. */
Sets the pixel at the specified coordinate (x,y) to the RGB Color
addDot
{ "repo_name": "ali-185/ComicBookCreator", "path": "src/comicBookModel/PositionedImage.java", "license": "gpl-2.0", "size": 20860 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,337,915
private void createSimpleCubeSixMeshes(GVRContext gvrContext, boolean facingOut, String vertexDesc, ArrayList<GVRTexture> textureList) { GVRSceneObject[] children = new GVRSceneObject[6]; GVRMesh[] meshes = new GVRMesh[6]; GVRVertexBuffer vbuf = new GVRVertexBuffer(gvrContext...
void function(GVRContext gvrContext, boolean facingOut, String vertexDesc, ArrayList<GVRTexture> textureList) { GVRSceneObject[] children = new GVRSceneObject[6]; GVRMesh[] meshes = new GVRMesh[6]; GVRVertexBuffer vbuf = new GVRVertexBuffer(gvrContext, vertexDesc, SIMPLE_VERTICES.length); if (facingOut) { vbuf.setFloat...
/** * Creates a cube with each face as a separate mesh using a different texture. * The meshes will share a common vertex array but will have separate index buffers. * @param gvrContext context to use for creating cube * @param facingOut true for outward normals, false for inward normals ...
Creates a cube with each face as a separate mesh using a different texture. The meshes will share a common vertex array but will have separate index buffers
createSimpleCubeSixMeshes
{ "repo_name": "roshanch/GearVRf", "path": "GVRf/Framework/framework/src/main/java/org/gearvrf/scene_objects/GVRCubeSceneObject.java", "license": "apache-2.0", "size": 38468 }
[ "java.util.ArrayList", "org.gearvrf.GVRContext", "org.gearvrf.GVRMesh", "org.gearvrf.GVRRenderData", "org.gearvrf.GVRSceneObject", "org.gearvrf.GVRTexture", "org.gearvrf.GVRVertexBuffer" ]
import java.util.ArrayList; import org.gearvrf.GVRContext; import org.gearvrf.GVRMesh; import org.gearvrf.GVRRenderData; import org.gearvrf.GVRSceneObject; import org.gearvrf.GVRTexture; import org.gearvrf.GVRVertexBuffer;
import java.util.*; import org.gearvrf.*;
[ "java.util", "org.gearvrf" ]
java.util; org.gearvrf;
1,823,186
private void addDaoConfiguration(Map<String, Object> params) { // <bean id="templateDAO" class="com.ideyatech.veeui.dao.impl.TemplateJpaImpl" // parent="baseDAO" autowire="byName" /> String xmlFilename = (new File(".")).getAbsolutePath() + contextPath + daoContextFile; Element bean = DocumentHelper.crea...
void function(Map<String, Object> params) { String xmlFilename = (new File(".")).getAbsolutePath() + contextPath + daoContextFile; Element bean = DocumentHelper.createElement("bean"); bean.addAttribute("id", params.get(STR)+"DAO"); bean.addAttribute("class", params.get(STR)+"."+params.get(STR)+STR); bean.addAttribute(S...
/** * Adds dao bean to spring config * @param params */
Adds dao bean to spring config
addDaoConfiguration
{ "repo_name": "Letractively/open-tides", "path": "src/org/hightides/annotations/processor/SpringConfigProcessor.java", "license": "apache-2.0", "size": 7887 }
[ "java.io.File", "java.util.Map", "org.dom4j.DocumentHelper", "org.dom4j.Element", "org.hightides.annotations.util.SpringXMLUtil" ]
import java.io.File; import java.util.Map; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.hightides.annotations.util.SpringXMLUtil;
import java.io.*; import java.util.*; import org.dom4j.*; import org.hightides.annotations.util.*;
[ "java.io", "java.util", "org.dom4j", "org.hightides.annotations" ]
java.io; java.util; org.dom4j; org.hightides.annotations;
1,565,976
public File getEnvironmentHome() { return environmentHome; }
File function() { return environmentHome; }
/** * Return the target environment directory. * * @return the environment directory. */
Return the target environment directory
getEnvironmentHome
{ "repo_name": "prat0318/dbms", "path": "mini_dbms/je-5.0.103/src/com/sleepycat/je/jmx/JEMBeanHelper.java", "license": "mit", "size": 31637 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
885,164
@Deprecated public File getTemporaryFile() { return tmpPath.toFile(); }
File function() { return tmpPath.toFile(); }
/** * Until the data is committed, this file captures * the written content. * * @deprecated Use getTemporaryPath() */
Until the data is committed, this file captures the written content
getTemporaryFile
{ "repo_name": "dariver/jenkins", "path": "core/src/main/java/hudson/util/AtomicFileWriter.java", "license": "mit", "size": 9263 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,667,511
public FacesConfigNavigationCaseType<T> toViewId(String toViewId) { childNode.getOrCreate("to-view-id").text(toViewId); return this; }
FacesConfigNavigationCaseType<T> function(String toViewId) { childNode.getOrCreate(STR).text(toViewId); return this; }
/** * Sets the <code>to-view-id</code> element * @param toViewId the value for the element <code>to-view-id</code> * @return the current instance of <code>FacesConfigNavigationCaseType<T></code> */
Sets the <code>to-view-id</code> element
toViewId
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig21/FacesConfigNavigationCaseTypeImpl.java", "license": "epl-1.0", "size": 15010 }
[ "org.jboss.shrinkwrap.descriptor.api.facesconfig21.FacesConfigNavigationCaseType" ]
import org.jboss.shrinkwrap.descriptor.api.facesconfig21.FacesConfigNavigationCaseType;
import org.jboss.shrinkwrap.descriptor.api.facesconfig21.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
261,528
public void removeParticipant(IBuilderParticipant participant) { new ParticipantRemovedTask(participant).run(); }
void function(IBuilderParticipant participant) { new ParticipantRemovedTask(participant).run(); }
/** * Called by OSGi-DS. * * @param participant */
Called by OSGi-DS
removeParticipant
{ "repo_name": "cvgaviao/lunifera-xtext-runtimebuilder", "path": "org.lunifera.xtext.builder.metadata.services/src/org/lunifera/xtext/builder/metadata/services/impl/MetadataBuilder.java", "license": "epl-1.0", "size": 21431 }
[ "org.lunifera.xtext.builder.metadata.services.IBuilderParticipant" ]
import org.lunifera.xtext.builder.metadata.services.IBuilderParticipant;
import org.lunifera.xtext.builder.metadata.services.*;
[ "org.lunifera.xtext" ]
org.lunifera.xtext;
2,296,457
@ServiceMethod(returns = ReturnType.SINGLE) Response<VirtualMachineInstanceViewInner> instanceViewWithResponse( String resourceGroupName, String vmName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<VirtualMachineInstanceViewInner> instanceViewWithResponse( String resourceGroupName, String vmName, Context context);
/** * Retrieves information about the run-time state of a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown ...
Retrieves information about the run-time state of a virtual machine
instanceViewWithResponse
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java", "license": "mit", "size": 106942 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.compute.fluent.models.VirtualMachineInstanceViewInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineInstanceViewInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,054,082
public boolean isMatch(String url) { for (int i = 0; i < _patternList.size(); i++) { Pattern pattern = _patternList.get(i); if (pattern.matcher(url).find()) return true; } return _patternList.size() == 0; }
boolean function(String url) { for (int i = 0; i < _patternList.size(); i++) { Pattern pattern = _patternList.get(i); if (pattern.matcher(url).find()) return true; } return _patternList.size() == 0; }
/** * Returns true for the URL match */
Returns true for the URL match
isMatch
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/security/Allow.java", "license": "gpl-2.0", "size": 5194 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,229,851
public boolean addConnectBehavior(TransportService transportService, StubbableTransport.OpenConnectionBehavior connectBehavior) { boolean noRegistered = true; for (TransportAddress transportAddress : extractTransportAddresses(transportService)) { noRegistered &= addConnectBehavior(transp...
boolean function(TransportService transportService, StubbableTransport.OpenConnectionBehavior connectBehavior) { boolean noRegistered = true; for (TransportAddress transportAddress : extractTransportAddresses(transportService)) { noRegistered &= addConnectBehavior(transportAddress, connectBehavior); } return noRegister...
/** * Adds a new connect behavior that is used for creating connections with the given delegate service. * * @return {@code true} if no other send behavior was registered for any of the addresses bound by delegate service. */
Adds a new connect behavior that is used for creating connections with the given delegate service
addConnectBehavior
{ "repo_name": "gingerwizard/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/transport/MockTransportService.java", "license": "apache-2.0", "size": 27264 }
[ "org.elasticsearch.common.transport.TransportAddress", "org.elasticsearch.transport.TransportService" ]
import org.elasticsearch.common.transport.TransportAddress; import org.elasticsearch.transport.TransportService;
import org.elasticsearch.common.transport.*; import org.elasticsearch.transport.*;
[ "org.elasticsearch.common", "org.elasticsearch.transport" ]
org.elasticsearch.common; org.elasticsearch.transport;
1,811,660
public RespT parseResponse(InputStream input) { return responseMarshaller.parse(input); }
RespT function(InputStream input) { return responseMarshaller.parse(input); }
/** * Parse a response payload from the given {@link InputStream}. * * @param input stream containing response message to parse. * @return parsed response message object. */
Parse a response payload from the given <code>InputStream</code>
parseResponse
{ "repo_name": "xzy256/grpc-java-mips64", "path": "core/src/main/java/io/grpc/MethodDescriptor.java", "license": "bsd-3-clause", "size": 9310 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,841,234
return typeSafeMatcher( DatePicker.class, "is empty", datePicker -> String.format("DatePicker's content: %s.", datePicker.getValue()), datePicker -> (datePicker.getValue() == null) ); }
return typeSafeMatcher( DatePicker.class, STR, datePicker -> String.format(STR, datePicker.getValue()), datePicker -> (datePicker.getValue() == null) ); }
/** * Creates a matcher that matches all {@link DatePicker}s that are empty. */
Creates a matcher that matches all <code>DatePicker</code>s that are empty
isEmpty
{ "repo_name": "ekleinod/edgeutils", "path": "edgeutils/src/main/java/de/edgesoft/edgeutils/testfx/DatePickerMatcher.java", "license": "lgpl-3.0", "size": 2214 }
[ "org.testfx.matcher.base.GeneralMatchers" ]
import org.testfx.matcher.base.GeneralMatchers;
import org.testfx.matcher.base.*;
[ "org.testfx.matcher" ]
org.testfx.matcher;
2,625,052
public ICoreEvent removeDailyEvent(int id) { ICoreEvent temp = dailyEvents.remove(id); if (temp != null) { for (int i = 0; i < prevEventTriggers.size(); i++) { if (prevEventTriggers.get(i).getUniqueId().getId() == id) { CoreLogfileManager.ENGINE_LOGMNGR.logWithParams(CoreConstants.SYS_LOG_FILE, Level...
ICoreEvent function(int id) { ICoreEvent temp = dailyEvents.remove(id); if (temp != null) { for (int i = 0; i < prevEventTriggers.size(); i++) { if (prevEventTriggers.get(i).getUniqueId().getId() == id) { CoreLogfileManager.ENGINE_LOGMNGR.logWithParams(CoreConstants.SYS_LOG_FILE, Level.FINEST, this.getClass(), STR, STR...
/** * Removes an event based on the id * @param id the id of the event to remove * @return the IEvent removed, or null if nothing was removed */
Removes an event based on the id
removeDailyEvent
{ "repo_name": "SuperSimpleGuy/dytenjin", "path": "Dytenjin/src/core/CoreEventHandler.java", "license": "gpl-3.0", "size": 13857 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
279,656
protected AbstractUploadListener getCurrentListener(HttpServletRequest request) { if (isAppEngine()) { return MemoryUploadListener.current(request.getSession().getId()); } else { return UploadListener.current(request); } }
AbstractUploadListener function(HttpServletRequest request) { if (isAppEngine()) { return MemoryUploadListener.current(request.getSession().getId()); } else { return UploadListener.current(request); } }
/** * Get the listener active in this session. * * @param request * @return the listener active */
Get the listener active in this session
getCurrentListener
{ "repo_name": "jijo-paulose/gwtupload", "path": "core/src/main/java/gwtupload/server/UploadServlet.java", "license": "apache-2.0", "size": 38870 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
899,677
public BlobKey put(byte[] value, int offset, int len) throws IOException { return putBuffer(null, null, value, offset, len); }
BlobKey function(byte[] value, int offset, int len) throws IOException { return putBuffer(null, null, value, offset, len); }
/** * Uploads data from the given byte array to the BLOB server in a content-addressable manner. * * @param value * the buffer to upload data from * @param offset * the read offset within the buffer * @param len * the number of bytes to upload from the buffer * @return the compute...
Uploads data from the given byte array to the BLOB server in a content-addressable manner
put
{ "repo_name": "DieBauer/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobClient.java", "license": "apache-2.0", "size": 27992 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
394,791
private void select() { try { // wait for connect events. acceptSelector.select(); // process the io events we received Iterator<SelectionKey> selectedKeys = acceptSelector.selectedKeys().iterator(); while (!stopped_ && selectedKeys.hasNext()) { SelectionKey ...
void function() { try { acceptSelector.select(); Iterator<SelectionKey> selectedKeys = acceptSelector.selectedKeys().iterator(); while (!stopped_ && selectedKeys.hasNext()) { SelectionKey key = selectedKeys.next(); selectedKeys.remove(); if (!key.isValid()) { continue; } if (key.isAcceptable()) { handleAccept(); } else...
/** * Select and process IO events appropriately: If there are connections to * be accepted, accept them. */
Select and process IO events appropriately: If there are connections to be accepted, accept them
select
{ "repo_name": "rmhartog/thrift", "path": "lib/java/src/org/apache/thrift/server/TThreadedSelectorServer.java", "license": "apache-2.0", "size": 21279 }
[ "java.io.IOException", "java.nio.channels.SelectionKey", "java.util.Iterator" ]
import java.io.IOException; import java.nio.channels.SelectionKey; import java.util.Iterator;
import java.io.*; import java.nio.channels.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
1,459,254
private static double calculateStdDeviation(DoubleArray vector, double mean) { double deviation = 0; for (double val : vector.data) { deviation += Math.pow(mean - val, 2); } return Math.sqrt(deviation / (vector.data.length - 1)); }
static double function(DoubleArray vector, double mean) { double deviation = 0; for (double val : vector.data) { deviation += Math.pow(mean - val, 2); } return Math.sqrt(deviation / (vector.data.length - 1)); }
/** * This method calculate the standard deviation of a list of double. * Note that it divides by n-1 instead of n, assuming that it is * the standard deviation of a sample rather than a population. * @param list the list of doubles * @param the man of the list of double values * @return the standard deviat...
This method calculate the standard deviation of a list of double. Note that it divides by n-1 instead of n, assuming that it is the standard deviation of a sample rather than a population
calculateStdDeviation
{ "repo_name": "ArneBinder/LanguageAnalyzer", "path": "src/main/java/ca/pfv/spmf/algorithms/clustering/distanceFunctions/DistanceCorrelation.java", "license": "gpl-3.0", "size": 5468 }
[ "ca.pfv.spmf.patterns.cluster.DoubleArray" ]
import ca.pfv.spmf.patterns.cluster.DoubleArray;
import ca.pfv.spmf.patterns.cluster.*;
[ "ca.pfv.spmf" ]
ca.pfv.spmf;
1,280,255
Owner findById(int id) throws DataAccessException;
Owner findById(int id) throws DataAccessException;
/** * Retrieve an <code>Owner</code> from the data store by id. * * @param id the id to search for * @return the <code>Owner</code> if found * @throws org.springframework.dao.DataRetrievalFailureException * if not found */
Retrieve an <code>Owner</code> from the data store by id
findById
{ "repo_name": "osanchezhuerta/hospitalbooklet-app", "path": "hospitalbooklet/hospitalbooklet-soa/hospitalbooklet-soa-persistence/src/main/java/org/osanchezhuerta/hospitalbooklet/soa/persistence/dao/OwnerRepository.java", "license": "apache-2.0", "size": 2836 }
[ "org.osanchezhuerta.hospitalbooklet.soa.model.Owner", "org.springframework.dao.DataAccessException" ]
import org.osanchezhuerta.hospitalbooklet.soa.model.Owner; import org.springframework.dao.DataAccessException;
import org.osanchezhuerta.hospitalbooklet.soa.model.*; import org.springframework.dao.*;
[ "org.osanchezhuerta.hospitalbooklet", "org.springframework.dao" ]
org.osanchezhuerta.hospitalbooklet; org.springframework.dao;
1,119,662
Alignment getAlignment();
Alignment getAlignment();
/** * Get the object's alignment. * * @return the object's alignment */
Get the object's alignment
getAlignment
{ "repo_name": "dianaui/dianaui-universal", "path": "core/src/main/java/com/dianaui/universal/core/client/ui/base/HasAlignment.java", "license": "apache-2.0", "size": 1223 }
[ "com.dianaui.universal.core.client.ui.constants.Alignment" ]
import com.dianaui.universal.core.client.ui.constants.Alignment;
import com.dianaui.universal.core.client.ui.constants.*;
[ "com.dianaui.universal" ]
com.dianaui.universal;
2,831,976
public JButton getJbtEdit() { return jbtEdit; }
JButton function() { return jbtEdit; }
/** * An accessor method for <code>jbtEdit</code>. * * @return The edit button of the current view. */
An accessor method for <code>jbtEdit</code>
getJbtEdit
{ "repo_name": "ivan-guerra/graphing_calculator", "path": "src/calculator_views/HistoryView.java", "license": "mit", "size": 3417 }
[ "javax.swing.JButton" ]
import javax.swing.JButton;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
964,361
@Test public void initiateMessageTest10() throws PcepParseException { byte[] initiateDeletionMsg = new byte[]{0x20, 0x0C, 0x00, 0x44, 0x21, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, //SRP object 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0...
void function() throws PcepParseException { byte[] initiateDeletionMsg = new byte[]{0x20, 0x0C, 0x00, 0x44, 0x21, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, 0x20, 0x10, 0x00, 0x2c, 0x00, 0x00, 0x10, 0x03, 0x00, 0x12, 0x00, 0x10, (byte) 0xb6, 0x02, 0...
/** * This test case checks for SRP, LSP (StatefulIPv4LspIdentidiersTlv, StatefulRsvpErrorSpecTlv) * objects in PcInitiate message. */
This test case checks for SRP, LSP (StatefulIPv4LspIdentidiersTlv, StatefulRsvpErrorSpecTlv) objects in PcInitiate message
initiateMessageTest10
{ "repo_name": "rvhub/onos", "path": "pcep/pcepio/src/test/java/org/onosproject/pcepio/PcepInitiateMsgTest.java", "license": "apache-2.0", "size": 60632 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.core.Is", "org.hamcrest.core.IsSame", "org.jboss.netty.buffer.ChannelBuffer", "org.jboss.netty.buffer.ChannelBuffers", "org.onosproject.pcepio.exceptions.PcepParseException", "org.onosproject.pcepio.protocol.PcepFactories", "org.onosproject.pcepio.protocol.P...
import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.hamcrest.core.IsSame; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepParseException; import org.onosproject.pcepio.protocol.PcepFactories; import org.onospr...
import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*; import org.onosproject.pcepio.protocol.*;
[ "org.hamcrest", "org.hamcrest.core", "org.jboss.netty", "org.onosproject.pcepio" ]
org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio;
2,216,465
public boolean stop(String name) { DeployController<?> controller = getDeployContainer().findController(keyToName(name)); if (controller == null) { if (log.isLoggable(Level.FINE)) log.log(Level.FINE, L.l("unknown name '{0}'", name)); if (log.isLoggable(Level.FINER)) log.l...
boolean function(String name) { DeployController<?> controller = getDeployContainer().findController(keyToName(name)); if (controller == null) { if (log.isLoggable(Level.FINE)) log.log(Level.FINE, L.l(STR, name)); if (log.isLoggable(Level.FINER)) log.log(Level.FINER, L.l(STR, getNamesAsString())); return false; } contr...
/** * Stop the archive. */
Stop the archive
stop
{ "repo_name": "gruppo4/quercus-upstream", "path": "modules/resin/src/com/caucho/env/deploy/ExpandDeployGenerator.java", "license": "gpl-2.0", "size": 22467 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,708,254
EReference getActionInput_InputCheckingAction();
EReference getActionInput_InputCheckingAction();
/** * Returns the meta object for the reference list '{@link com.thalesgroup.trt.mde.vp.al.al.ActionInput#getInputCheckingAction <em>Input Checking Action</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Input Checking Action</em>'. * @see co...
Returns the meta object for the reference list '<code>com.thalesgroup.trt.mde.vp.al.al.ActionInput#getInputCheckingAction Input Checking Action</code>'.
getActionInput_InputCheckingAction
{ "repo_name": "smadelenat/CapellaModeAutomata", "path": "Language/ActionLanguage/com.thalesgroup.trt.mde.vp.al.model/src/com/thalesgroup/trt/mde/vp/al/al/AlPackage.java", "license": "epl-1.0", "size": 119399 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,554,180
public static RepMode fromPerAligned(byte[] encodedBytes) { RepMode result = new RepMode(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
static RepMode function(byte[] encodedBytes) { RepMode result = new RepMode(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new RepMode from encoded stream. */
Creates a new RepMode from encoded stream
fromPerAligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/supl_triggered_response/RepMode.java", "license": "apache-2.0", "size": 4482 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
1,404,995
List<Vo> getVosByPerunBean(PerunSession sess, Resource resource) throws InternalErrorException, VoNotExistsException;
List<Vo> getVosByPerunBean(PerunSession sess, Resource resource) throws InternalErrorException, VoNotExistsException;
/** * Returns list of vos connected with a resource * * @param sess * @param resource * @return list of vos connected with resource * @throws InternalErrorException */
Returns list of vos connected with a resource
getVosByPerunBean
{ "repo_name": "stavamichal/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/VosManagerBl.java", "license": "bsd-2-clause", "size": 15341 }
[ "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.Resource", "cz.metacentrum.perun.core.api.Vo", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.VoNotExistsException", "java.util.List" ]
import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Resource; import cz.metacentrum.perun.core.api.Vo; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.VoNotExistsException; import java.util.List;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
2,255,230
public static synchronized void deregisterDriver(Driver driver) throws SQLException { if (driver == null) { return; } // Gets the classloader of the code that called this method, // may be null. ClassLoader callerCL = Thread.currentThread().getCon...
static synchronized void function(Driver driver) throws SQLException { if (driver == null) { return; } ClassLoader callerCL = Thread.currentThread().getContextClassLoader(); println(STR + driver); DriverInfo aDriver = new DriverInfo(driver); if(registeredDrivers.contains(aDriver)) { if (isDriverAllowed(driver, callerCL...
/** * Drops a driver from the <code>DriverManager</code>'s list. * Applets can only deregister drivers from their own classloaders. * * @param driver the JDBC Driver to drop * @exception SQLException if a database access error occurs */
Drops a driver from the <code>DriverManager</code>'s list. Applets can only deregister drivers from their own classloaders
deregisterDriver
{ "repo_name": "sumeetchhetri/gatf", "path": "alldep-jar/src/main/java/com/CustomDriverManager.java", "license": "apache-2.0", "size": 23673 }
[ "java.sql.Driver", "java.sql.SQLException" ]
import java.sql.Driver; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
228,498
public RequestDelete<Group> deleteGroup(int id) { String url = String.format(Constants.GROUPS_DETAIL_URL, getNotEmptyInstanceName(), id); return new RequestDelete<>(Group.class, url, this); }
RequestDelete<Group> function(int id) { String url = String.format(Constants.GROUPS_DETAIL_URL, getNotEmptyInstanceName(), id); return new RequestDelete<>(Group.class, url, this); }
/** * Delete a Group. * * @param id Id of existing Group. * @return Success or error information */
Delete a Group
deleteGroup
{ "repo_name": "Syncano/syncano-android", "path": "library/src/main/java/com/syncano/library/SyncanoDashboard.java", "license": "mit", "size": 24946 }
[ "com.syncano.library.api.RequestDelete", "com.syncano.library.data.Group" ]
import com.syncano.library.api.RequestDelete; import com.syncano.library.data.Group;
import com.syncano.library.api.*; import com.syncano.library.data.*;
[ "com.syncano.library" ]
com.syncano.library;
1,590,277
public static <T extends Object> LinkedList<Row> findAll(String table, int column, T value) { return findAll(table, getTable(table).getColumns().get(column).getName(), value); }
static <T extends Object> LinkedList<Row> function(String table, int column, T value) { return findAll(table, getTable(table).getColumns().get(column).getName(), value); }
/** * Finds all entrys that contain the given value in the given column * * @param tbl * @param column * @param value * @return a list of rows who contain the searched value (empty if nothing was * found) */
Finds all entrys that contain the given value in the given column
findAll
{ "repo_name": "otting/NebenkostenAssistent", "path": "src/db/DbHandle.java", "license": "gpl-3.0", "size": 7751 }
[ "com.healthmarketscience.jackcess.Row", "java.util.LinkedList" ]
import com.healthmarketscience.jackcess.Row; import java.util.LinkedList;
import com.healthmarketscience.jackcess.*; import java.util.*;
[ "com.healthmarketscience.jackcess", "java.util" ]
com.healthmarketscience.jackcess; java.util;
157,172
protected void processElement(String defaultNamespace, final Properties namespaces) throws Exception { final String fullName = XMLUtil.scanIdentifier(reader); String name = fullName; XMLUtil.skipWhitespace(reader, null); String prefix = null; int colonIndex = name.indexOf(':'); if (colonIndex > 0) { p...
void function(String defaultNamespace, final Properties namespaces) throws Exception { final String fullName = XMLUtil.scanIdentifier(reader); String name = fullName; XMLUtil.skipWhitespace(reader, null); String prefix = null; int colonIndex = name.indexOf(':'); if (colonIndex > 0) { prefix = name.substring(0, colonInd...
/** * Processes a regular element. * * @param defaultNamespace * the default namespace URI (or null) * @param namespaces * list of defined namespaces * @throws java.lang.Exception * if something went wrong */
Processes a regular element
processElement
{ "repo_name": "freeplane/freeplane", "path": "freeplane/src/main/java/org/freeplane/n3/nanoxml/StdXMLParser.java", "license": "gpl-2.0", "size": 15593 }
[ "java.util.Enumeration", "java.util.Properties", "java.util.Vector" ]
import java.util.Enumeration; import java.util.Properties; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,112,966
private void ensureSequenceNumbers() { // Get the current highest sequence number SQLitePersistence.Query sequenceNumberQuery = new SQLitePersistence.Query( db, "SELECT highest_listen_sequence_number FROM target_globals LIMIT 1"); Long boxedSequenceNumber = sequenceNumberQuery.firstVal...
void function() { SQLitePersistence.Query sequenceNumberQuery = new SQLitePersistence.Query( db, STR); Long boxedSequenceNumber = sequenceNumberQuery.firstValue(c -> c.getLong(0)); hardAssert(boxedSequenceNumber != null, STR); long sequenceNumber = boxedSequenceNumber; SQLiteStatement tagDocument = db.compileStatement(...
/** * Ensures that each entry in the remote document cache has a corresponding sentinel row. Any * entries that lack a sentinel row are given one with the sequence number set to the highest * recorded sequence number from the target metadata. */
Ensures that each entry in the remote document cache has a corresponding sentinel row. Any entries that lack a sentinel row are given one with the sequence number set to the highest recorded sequence number from the target metadata
ensureSequenceNumbers
{ "repo_name": "firebase/firebase-android-sdk", "path": "firebase-firestore/src/main/java/com/google/firebase/firestore/local/SQLiteSchema.java", "license": "apache-2.0", "size": 28079 }
[ "android.database.sqlite.SQLiteStatement", "com.google.firebase.firestore.util.Assert" ]
import android.database.sqlite.SQLiteStatement; import com.google.firebase.firestore.util.Assert;
import android.database.sqlite.*; import com.google.firebase.firestore.util.*;
[ "android.database", "com.google.firebase" ]
android.database; com.google.firebase;
827,698
@Test public void testParse_version() throws Exception { String[] args = {"-version"}; CliParser instance = new CliParser(getSettings()); instance.parse(args); Assert.assertTrue(instance.isGetVersion()); Assert.assertFalse(instance.isGetHelp()); Assert.assertFal...
void function() throws Exception { String[] args = {STR}; CliParser instance = new CliParser(getSettings()); instance.parse(args); Assert.assertTrue(instance.isGetVersion()); Assert.assertFalse(instance.isGetHelp()); Assert.assertFalse(instance.isRunScan()); }
/** * Test of parse method with version arg, of class CliParser. * * @throws Exception thrown when an exception occurs. */
Test of parse method with version arg, of class CliParser
testParse_version
{ "repo_name": "stefanneuhaus/DependencyCheck", "path": "cli/src/test/java/org/owasp/dependencycheck/CliParserTest.java", "license": "apache-2.0", "size": 12895 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,550,313
private static void handleNPCDeath(final NPC npc) { Location deathLocation = npc.getLocation(); //TODO: Change this to load from saved spot - Stephen npc.playAnimation(Animation.create(npc.getDefinition().getDeathAnimation())); World.getWorld().submit(new Event(2400, false) {
static void function(final NPC npc) { Location deathLocation = npc.getLocation(); npc.playAnimation(Animation.create(npc.getDefinition().getDeathAnimation())); World.getWorld().submit(new Event(2400, false) {
/** * Handles the death of an NPC. * @param npc The npc who has died. */
Handles the death of an NPC
handleNPCDeath
{ "repo_name": "ubjelly/Derithium", "path": "src/main/java/org/hyperion/rs2/content/combat/EntityDeath.java", "license": "gpl-2.0", "size": 5760 }
[ "org.hyperion.rs2.event.Event", "org.hyperion.rs2.model.Animation", "org.hyperion.rs2.model.Location", "org.hyperion.rs2.model.World" ]
import org.hyperion.rs2.event.Event; import org.hyperion.rs2.model.Animation; import org.hyperion.rs2.model.Location; import org.hyperion.rs2.model.World;
import org.hyperion.rs2.event.*; import org.hyperion.rs2.model.*;
[ "org.hyperion.rs2" ]
org.hyperion.rs2;
1,429,573
public String GetTagIdAndParentsIds(Guid tagId) { tags tag = GetTagById(tagId); return GetTagIdAndParentsIds(tag); }
String function(Guid tagId) { tags tag = GetTagById(tagId); return GetTagIdAndParentsIds(tag); }
/** * This function will return the tag's ID and its parents IDs. * * @param tagId * the tag ID. * @return a comma seperated list of IDs. */
This function will return the tag's ID and its parents IDs
GetTagIdAndParentsIds
{ "repo_name": "derekhiggins/ovirt-engine", "path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TagsDirector.java", "license": "apache-2.0", "size": 14974 }
[ "org.ovirt.engine.core.compat.Guid" ]
import org.ovirt.engine.core.compat.Guid;
import org.ovirt.engine.core.compat.*;
[ "org.ovirt.engine" ]
org.ovirt.engine;
523,885
public ServiceLocationServiceChannel findServiceLocationServiceChannel(ServiceLocationServiceChannelId serviceLocationServiceChannelId);
ServiceLocationServiceChannel function(ServiceLocationServiceChannelId serviceLocationServiceChannelId);
/** * Finds service location service channel * * @param serviceLocationServiceChannelId service location service channel id * @return Returns a location service channel */
Finds service location service channel
findServiceLocationServiceChannel
{ "repo_name": "Metatavu/kunta-api-server", "path": "src/main/java/fi/metatavu/kuntaapi/server/integrations/ServiceChannelProvider.java", "license": "agpl-3.0", "size": 5460 }
[ "fi.metatavu.kuntaapi.server.id.ServiceLocationServiceChannelId", "fi.metatavu.kuntaapi.server.rest.model.ServiceLocationServiceChannel" ]
import fi.metatavu.kuntaapi.server.id.ServiceLocationServiceChannelId; import fi.metatavu.kuntaapi.server.rest.model.ServiceLocationServiceChannel;
import fi.metatavu.kuntaapi.server.id.*; import fi.metatavu.kuntaapi.server.rest.model.*;
[ "fi.metatavu.kuntaapi" ]
fi.metatavu.kuntaapi;
2,249,705
@Override public final Jid getFrom() { return from; }
final Jid function() { return from; }
/** * <blockquote> * <p>The {@code <body/>} element of the first request MAY also possess a 'from' attribute, which specifies the originator of the first stream and which enables the connection manager to forward the originating entity's identity to the application server.</p> * </blockquote> * ...
The element of the first request MAY also possess a 'from' attribute, which specifies the originator of the first stream and which enables the connection manager to forward the originating entity's identity to the application server.
getFrom
{ "repo_name": "jeozey/XmppServerTester", "path": "xmpp-core/src/main/java/rocks/xmpp/extensions/httpbind/model/Body.java", "license": "mit", "size": 29881 }
[ "rocks.xmpp.addr.Jid" ]
import rocks.xmpp.addr.Jid;
import rocks.xmpp.addr.*;
[ "rocks.xmpp.addr" ]
rocks.xmpp.addr;
630,524
public int next() { int nodeHandle; // If at most one key value or at most one string argument to id // resulted in nodes being returned, use the IntegerArray // stored at _nodes directly. This relies on the fact that the // IntegerArray never includ...
int function() { int nodeHandle; if (_nodes != null) { if (_position < _nodes.cardinality()) { nodeHandle = returnNode(_nodes.at(_position)); } else { nodeHandle = DTMAxisIterator.END; } } else { nodeHandle = super.next(); } return nodeHandle; }
/** * Get the next node in the iteration. * * @return The next node handle in the iteration, or END. */
Get the next node in the iteration
next
{ "repo_name": "md-5/jdk10", "path": "src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java", "license": "gpl-2.0", "size": 32219 }
[ "com.sun.org.apache.xml.internal.dtm.DTMAxisIterator" ]
import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
import com.sun.org.apache.xml.internal.dtm.*;
[ "com.sun.org" ]
com.sun.org;
222,514
private void registerWith(NamespaceInfo nsInfo) throws IOException { BackupImage bnImage = (BackupImage)getFSImage(); NNStorage storage = bnImage.getStorage(); // verify namespaceID if (storage.getNamespaceID() == 0) { // new backup storage storage.setStorageInfo(nsInfo); storage.setBlockP...
void function(NamespaceInfo nsInfo) throws IOException { BackupImage bnImage = (BackupImage)getFSImage(); NNStorage storage = bnImage.getStorage(); if (storage.getNamespaceID() == 0) { storage.setStorageInfo(nsInfo); storage.setBlockPoolID(nsInfo.getBlockPoolID()); storage.setClusterID(nsInfo.getClusterID()); } else { ...
/** * Register this backup node with the active name-node. * @param nsInfo namespace information * @throws IOException */
Register this backup node with the active name-node
registerWith
{ "repo_name": "NJUJYB/disYarn", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java", "license": "apache-2.0", "size": 18629 }
[ "java.io.IOException", "java.net.SocketTimeoutException", "org.apache.hadoop.hdfs.server.common.HdfsServerConstants", "org.apache.hadoop.hdfs.server.protocol.NamenodeRegistration", "org.apache.hadoop.hdfs.server.protocol.NamespaceInfo" ]
import java.io.IOException; import java.net.SocketTimeoutException; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.hdfs.server.protocol.NamenodeRegistration; import org.apache.hadoop.hdfs.server.protocol.NamespaceInfo;
import java.io.*; import java.net.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.protocol.*;
[ "java.io", "java.net", "org.apache.hadoop" ]
java.io; java.net; org.apache.hadoop;
439,773
@Override @CheckReturnValue protected MoreObjects.ToStringHelper toStringHelper () { return super.toStringHelper () .add ("usable", this.isUsable ()) .add ("finalgrade", this.getFinalGrade ()) .add ("course", this.getCourse ()) .add ("role", this.getRole ()); }
MoreObjects.ToStringHelper function () { return super.toStringHelper () .add (STR, this.isUsable ()) .add (STR, this.getFinalGrade ()) .add (STR, this.getCourse ()) .add ("role", this.getRole ()); }
/** * Template method to create and initialize a <code>ToStringHelper</code>. * * @return The <code>ToStringHelper</code> */
Template method to create and initialize a <code>ToStringHelper</code>
toStringHelper
{ "repo_name": "jestark/LMSDataHarvester", "path": "src/main/java/ca/uoguelph/socs/icc/edm/domain/Enrolment.java", "license": "gpl-3.0", "size": 33360 }
[ "com.google.common.base.MoreObjects" ]
import com.google.common.base.MoreObjects;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,707,879
protected boolean isIncludeStackTrace(ServerRequest request, MediaType produces) { switch (this.errorProperties.getIncludeStacktrace()) { case ALWAYS: return true; case ON_PARAM: return isTraceEnabled(request); default: return false; } }
boolean function(ServerRequest request, MediaType produces) { switch (this.errorProperties.getIncludeStacktrace()) { case ALWAYS: return true; case ON_PARAM: return isTraceEnabled(request); default: return false; } }
/** * Determine if the stacktrace attribute should be included. * @param request the source request * @param produces the media type produced (or {@code MediaType.ALL}) * @return if the stacktrace attribute should be included */
Determine if the stacktrace attribute should be included
isIncludeStackTrace
{ "repo_name": "mdeinum/spring-boot", "path": "spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java", "license": "apache-2.0", "size": 9379 }
[ "org.springframework.http.MediaType", "org.springframework.web.reactive.function.server.ServerRequest" ]
import org.springframework.http.MediaType; import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.http.*; import org.springframework.web.reactive.function.server.*;
[ "org.springframework.http", "org.springframework.web" ]
org.springframework.http; org.springframework.web;
2,307,657
public synchronized void removeAllPrivateChunks() { chunkType = new ArrayList<String>(); chunkData = new ArrayList<byte[]>(); }
synchronized void function() { chunkType = new ArrayList<String>(); chunkData = new ArrayList<byte[]>(); }
/** * Remove all private chunks associated with this parameter instance. */
Remove all private chunks associated with this parameter instance
removeAllPrivateChunks
{ "repo_name": "md-k-sarker/OWLAx", "path": "src/main/java/com/mxgraph/util/png/mxPngEncodeParam.java", "license": "bsd-2-clause", "size": 42352 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
892,534
public interface VersionParser { Version parse(InputStream inputStream) throws VersionParserException; }
interface VersionParser { Version function(InputStream inputStream) throws VersionParserException; }
/** * <p>Parse version information from input stream</p> * @param inputStream data return from server * @return return a instance of {@link Version}, otherwise return null. */
Parse version information from input stream
parse
{ "repo_name": "whinc/Android-UpdateManager", "path": "UpdateManager/updater/src/main/java/com/whinc/util/updater/AppUpdater.java", "license": "mit", "size": 26146 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,018,314
public static String loadResourceInjectingVariables(String resourceName) { final InputStream resourceAsStream = ModulesHelper.class.getClassLoader().getResourceAsStream( resourceName ); final String readString; try { readString = IOUtils.toString( resourceAsStream ); } catch (IOException e) { throw n...
static String function(String resourceName) { final InputStream resourceAsStream = ModulesHelper.class.getClassLoader().getResourceAsStream( resourceName ); final String readString; try { readString = IOUtils.toString( resourceAsStream ); } catch (IOException e) { throw new RuntimeException( e ); } finally { try { reso...
/** * Loads a resource from classpath, interpret it as a String and replace all properties. */
Loads a resource from classpath, interpret it as a String and replace all properties
loadResourceInjectingVariables
{ "repo_name": "DavideD/hibernate-ogm-contrib", "path": "integrationtest/src/test/java/org/hibernate/ogm/test/integration/testcase/util/ModulesHelper.java", "license": "lgpl-2.1", "size": 4508 }
[ "java.io.IOException", "java.io.InputStream", "org.apache.commons.io.IOUtils" ]
import java.io.IOException; import java.io.InputStream; import org.apache.commons.io.IOUtils;
import java.io.*; import org.apache.commons.io.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,613,797
public static Log get(Class<? extends Object> clazz) { return new Log(clazz); } private final Logger logger; @Deprecated private Log(Class<? extends Object> clazz) { this(Logger.getLogger(clazz.getName())); } public Log(Logger logger) { this.logger = logger; }
static Log function(Class<? extends Object> clazz) { return new Log(clazz); } private final Logger logger; private Log(Class<? extends Object> clazz) { this(Logger.getLogger(clazz.getName())); } public Log(Logger logger) { this.logger = logger; }
/** * Creates or lazily loads a logger. Currently just creates an instance but * allows us to do more clever stuff in the future. */
Creates or lazily loads a logger. Currently just creates an instance but allows us to do more clever stuff in the future
get
{ "repo_name": "scrosby/fedone", "path": "src/org/waveprotocol/wave/examples/fedone/util/Log.java", "license": "apache-2.0", "size": 10495 }
[ "java.util.logging.Logger" ]
import java.util.logging.Logger;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,551,434
public void setLastUpdatedDateFormat(SimpleDateFormat lastUpdatedDateFormat){ this.lastUpdatedDateFormat = lastUpdatedDateFormat; }
void function(SimpleDateFormat lastUpdatedDateFormat){ this.lastUpdatedDateFormat = lastUpdatedDateFormat; }
/** * Default: "dd/MM HH:mm". Set the format in which the last-updated * date/time is shown. Meaningless if 'showLastUpdatedText == false (default)'. * See 'setShowLastUpdatedText'. * * @param lastUpdatedDateFormat */
date/time is shown. Meaningless if 'showLastUpdatedText == false (default)'. See 'setShowLastUpdatedText'
setLastUpdatedDateFormat
{ "repo_name": "xfdingustc/NGA-CLIENT-VER-OPEN-SOURCE", "path": "PinterestLikeAdapterView/src/com/huewu/pla/lib/MultiColumnPullToRefreshListView.java", "license": "gpl-2.0", "size": 17842 }
[ "java.text.SimpleDateFormat" ]
import java.text.SimpleDateFormat;
import java.text.*;
[ "java.text" ]
java.text;
1,842,998