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 void testPublishMulticastV4() throws Exception { NetworkService service = new NetworkService(Collections.emptyList()); try { service.resolvePublishHostAddresses(new String[] { "239.1.1.1" }); fail("should have hit exception"); } catch (IllegalArgumentException ...
void function() throws Exception { NetworkService service = new NetworkService(Collections.emptyList()); try { service.resolvePublishHostAddresses(new String[] { STR }); fail(STR); } catch (IllegalArgumentException e) { assertTrue(e.getMessage().contains(STR)); } }
/** * ensure exception if we publish to multicast ipv4 address */
ensure exception if we publish to multicast ipv4 address
testPublishMulticastV4
{ "repo_name": "robin13/elasticsearch", "path": "server/src/test/java/org/elasticsearch/common/network/NetworkServiceTests.java", "license": "apache-2.0", "size": 5095 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
1,946,525
protected boolean areAnyAccessoriesConnected() { Cursor cursor = null; try { cursor = getContentResolver().query(Device.URI, null, DeviceColumns.ACCESSORY_CONNECTED + " = 1", null, null); if (cursor != null) { return (cursor.getCount() > 0)...
boolean function() { Cursor cursor = null; try { cursor = getContentResolver().query(Device.URI, null, DeviceColumns.ACCESSORY_CONNECTED + STR, null, null); if (cursor != null) { return (cursor.getCount() > 0); } } catch (SQLException exception) { if (Dbg.DEBUG) { Dbg.e(STR, exception); } } catch (SecurityException exc...
/** * Check in the database if there are any accessories connected. * * @return True if at least one accessories is connected. */
Check in the database if there are any accessories connected
areAnyAccessoriesConnected
{ "repo_name": "einvalentin/buildwatch", "path": "3rdParty/SmartExtensionUtils/src/com/sonyericsson/extras/liveware/extension/util/ExtensionService.java", "license": "apache-2.0", "size": 31198 }
[ "android.database.Cursor", "android.database.SQLException", "com.sonyericsson.extras.liveware.aef.registration.Registration" ]
import android.database.Cursor; import android.database.SQLException; import com.sonyericsson.extras.liveware.aef.registration.Registration;
import android.database.*; import com.sonyericsson.extras.liveware.aef.registration.*;
[ "android.database", "com.sonyericsson.extras" ]
android.database; com.sonyericsson.extras;
2,208,564
private Map<TournamentTeam, Map<SubjectiveScoreCategory, Map<String, Data>>> gatherRanks(final Connection connection, final Tournament tournament, ...
Map<TournamentTeam, Map<SubjectiveScoreCategory, Map<String, Data>>> function(final Connection connection, final Tournament tournament, final Map<Integer, TournamentTeam> teams, final Map<SubjectiveScoreCategory, List<String>> judgesPerCategory) throws SQLException { final Map<TournamentTeam, Map<SubjectiveScoreCategor...
/** * Gather ranks for teams based on a set of judges for each subjective category */
Gather ranks for teams based on a set of judges for each subjective category
gatherRanks
{ "repo_name": "jpschewe/fll-sw", "path": "src/main/java/fll/web/report/SubjectiveByJudge.java", "license": "gpl-2.0", "size": 16467 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashMap; import java.util.List; import java.util.Map;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
359,704
public static RuleSet withRules(Rule... rules) { return new BasicRuleSet(rules); }
static RuleSet function(Rule... rules) { return new BasicRuleSet(rules); }
/** * Creates and returns a {@link de.codescape.bitvunit.ruleset.RuleSet} containing all provided rules. * * @param rules provided rule(s) * @return {@link de.codescape.bitvunit.ruleset.RuleSet} containing all provided rules */
Creates and returns a <code>de.codescape.bitvunit.ruleset.RuleSet</code> containing all provided rules
withRules
{ "repo_name": "codescape/bitvunit", "path": "bitvunit-core/src/main/java/de/codescape/bitvunit/BitvUnit.java", "license": "apache-2.0", "size": 4668 }
[ "de.codescape.bitvunit.rule.Rule", "de.codescape.bitvunit.ruleset.BasicRuleSet", "de.codescape.bitvunit.ruleset.RuleSet" ]
import de.codescape.bitvunit.rule.Rule; import de.codescape.bitvunit.ruleset.BasicRuleSet; import de.codescape.bitvunit.ruleset.RuleSet;
import de.codescape.bitvunit.rule.*; import de.codescape.bitvunit.ruleset.*;
[ "de.codescape.bitvunit" ]
de.codescape.bitvunit;
2,130,440
public IgniteConfiguration setSslContextFactory(Factory<SSLContext> sslCtxFactory) { this.sslCtxFactory = sslCtxFactory; return this; }
IgniteConfiguration function(Factory<SSLContext> sslCtxFactory) { this.sslCtxFactory = sslCtxFactory; return this; }
/** * Sets SSL context factory that will be used for creating a secure socket layer. * * @param sslCtxFactory Ssl context factory. * @see SslContextFactory */
Sets SSL context factory that will be used for creating a secure socket layer
setSslContextFactory
{ "repo_name": "mcherkasov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java", "license": "apache-2.0", "size": 91428 }
[ "javax.cache.configuration.Factory", "javax.net.ssl.SSLContext" ]
import javax.cache.configuration.Factory; import javax.net.ssl.SSLContext;
import javax.cache.configuration.*; import javax.net.ssl.*;
[ "javax.cache", "javax.net" ]
javax.cache; javax.net;
1,940,354
public SynDiaSystem getSynDiaSystem() { return this.synDiaSystem; }
SynDiaSystem function() { return this.synDiaSystem; }
/** * A method just to get the syntax diagram system * * @return A SynDiaSystem */
A method just to get the syntax diagram system
getSynDiaSystem
{ "repo_name": "jurkov/j-algo-mod", "path": "src/org/jalgo/module/ebnf/controller/trans/TransController.java", "license": "gpl-2.0", "size": 8834 }
[ "org.jalgo.module.ebnf.model.syndia.SynDiaSystem" ]
import org.jalgo.module.ebnf.model.syndia.SynDiaSystem;
import org.jalgo.module.ebnf.model.syndia.*;
[ "org.jalgo.module" ]
org.jalgo.module;
1,479,100
public void setPosition(BigInteger position) { this.position = position; }
void function(BigInteger position) { this.position = position; }
/** * The transaction index position withing a block. */
The transaction index position withing a block
setPosition
{ "repo_name": "objectiser/camel", "path": "components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java", "license": "apache-2.0", "size": 14166 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
774,577
public void filterCmpValue(QueryExecutionContext context, ScanOperation op) { try { ScanFilter filter = op.getScanFilter(context); filter.begin(); filterCmpValue(context, op, filter); filter.end(); } catch (ClusterJException ex) { ...
void function(QueryExecutionContext context, ScanOperation op) { try { ScanFilter filter = op.getScanFilter(context); filter.begin(); filterCmpValue(context, op, filter); filter.end(); } catch (ClusterJException ex) { throw ex; } catch (Exception ex) { throw new ClusterJException( local.message(STR), ex); } }
/** Create a filter for the operation. Set the condition into the * new filter. * @param context the query execution context with the parameter values * @param op the operation */
Create a filter for the operation. Set the condition into the new filter
filterCmpValue
{ "repo_name": "greenlion/mysql-server", "path": "storage/ndb/clusterj/clusterj-core/src/main/java/com/mysql/clusterj/core/query/PredicateImpl.java", "license": "gpl-2.0", "size": 14897 }
[ "com.mysql.clusterj.ClusterJException", "com.mysql.clusterj.core.spi.QueryExecutionContext", "com.mysql.clusterj.core.store.ScanFilter", "com.mysql.clusterj.core.store.ScanOperation" ]
import com.mysql.clusterj.ClusterJException; import com.mysql.clusterj.core.spi.QueryExecutionContext; import com.mysql.clusterj.core.store.ScanFilter; import com.mysql.clusterj.core.store.ScanOperation;
import com.mysql.clusterj.*; import com.mysql.clusterj.core.spi.*; import com.mysql.clusterj.core.store.*;
[ "com.mysql.clusterj" ]
com.mysql.clusterj;
1,369,031
EOperation getEnergyConsumerLinkServiceDeliveryPoint__CheckDEC_FWD__MeterAsset_MeterAssetPhysicalDevicePair_EnergyConsumer_ServiceDeliveryPoint();
EOperation getEnergyConsumerLinkServiceDeliveryPoint__CheckDEC_FWD__MeterAsset_MeterAssetPhysicalDevicePair_EnergyConsumer_ServiceDeliveryPoint();
/** * Returns the meta object for the '{@link rgse.ttc17.emoflon.tgg.task2.Rules.EnergyConsumerLinkServiceDeliveryPoint#checkDEC_FWD(gluemodel.CIM.IEC61968.Metering.MeterAsset, gluemodel.MeterAssetPhysicalDevicePair, gluemodel.CIM.IEC61970.Wires.EnergyConsumer, gluemodel.CIM.IEC61968.Metering.ServiceDeliveryPoint) <e...
Returns the meta object for the '<code>rgse.ttc17.emoflon.tgg.task2.Rules.EnergyConsumerLinkServiceDeliveryPoint#checkDEC_FWD(gluemodel.CIM.IEC61968.Metering.MeterAsset, gluemodel.MeterAssetPhysicalDevicePair, gluemodel.CIM.IEC61970.Wires.EnergyConsumer, gluemodel.CIM.IEC61968.Metering.ServiceDeliveryPoint) Check DEC F...
getEnergyConsumerLinkServiceDeliveryPoint__CheckDEC_FWD__MeterAsset_MeterAssetPhysicalDevicePair_EnergyConsumer_ServiceDeliveryPoint
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.emoflon.tgg.task2/gen/rgse/ttc17/emoflon/tgg/task2/Rules/RulesPackage.java", "license": "mit", "size": 437406 }
[ "org.eclipse.emf.ecore.EOperation" ]
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,727,807
private static void assertBufferMatchesResponseBody(byte[] buffer, int count) { assertArrayEquals(Arrays.copyOf(TEST_RESPONSE_BODY, count), buffer); }
static void function(byte[] buffer, int count) { assertArrayEquals(Arrays.copyOf(TEST_RESPONSE_BODY, count), buffer); }
/** * Asserts that buffer's length equal to count and matches the first count bytes of the * test response body. */
Asserts that buffer's length equal to count and matches the first count bytes of the test response body
assertBufferMatchesResponseBody
{ "repo_name": "facebook/stetho", "path": "stetho/src/test/java/com/facebook/stetho/inspector/network/ResponseHandlingInputStreamTest.java", "license": "mit", "size": 6802 }
[ "java.util.Arrays", "org.junit.Assert" ]
import java.util.Arrays; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
1,982,968
int gtk_application_window_get_id(GtkApplicationWindow window);
int gtk_application_window_get_id(GtkApplicationWindow window);
/** * Returns the unique ID of the window. * If the window has not yet been added to a GtkApplication, returns 0. * * @param window a GtkApplicationWindow * @return the unique ID for window , or 0 if the window has not yet been added to a GtkApplication */
Returns the unique ID of the window. If the window has not yet been added to a GtkApplication, returns 0
gtk_application_window_get_id
{ "repo_name": "Ccook/gtk-java-bindings", "path": "src/main/java/com/github/ccook/gtk/library/object/widget/container/bin/window/GtkApplicationWindowLibrary.java", "license": "apache-2.0", "size": 2675 }
[ "com.github.ccook.gtk.model.object.widget.container.bin.window.GtkApplicationWindow" ]
import com.github.ccook.gtk.model.object.widget.container.bin.window.GtkApplicationWindow;
import com.github.ccook.gtk.model.object.widget.container.bin.window.*;
[ "com.github.ccook" ]
com.github.ccook;
1,935,421
public native int recvZeroCopy(ByteBuffer buffer, int len, int flags);
native int function(ByteBuffer buffer, int len, int flags);
/** * Zero copy recv * * @param buffer * @param len * @param flags * @return bytes read, -1 on error */
Zero copy recv
recvZeroCopy
{ "repo_name": "Shopify/jzmq", "path": "src/org/zeromq/ZMQ.java", "license": "gpl-3.0", "size": 63328 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,207,737
private void bindListeners(Collection<Class<?>> listeners) { // Bind each listener within extension for (Class<?> listener : listeners) bindListener(listener); }
void function(Collection<Class<?>> listeners) { for (Class<?> listener : listeners) bindListener(listener); }
/** * Binds each of the the given Listener classes such that any * service requiring access to the Listener can obtain it via * injection. * * @param listeners * The Listener classes to bind. */
Binds each of the the given Listener classes such that any service requiring access to the Listener can obtain it via injection
bindListeners
{ "repo_name": "lato333/guacamole-client", "path": "guacamole/src/main/java/org/apache/guacamole/extension/ExtensionModule.java", "license": "apache-2.0", "size": 17240 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,849,462
private static void checkFastApproach() throws IOException { InputStream in = new FileInputStream(bigFile); PacketDecoder pd = new PacketDecoder(in); Packet p = pd.packet(); byte[] buffer = new byte[PcapBatchReader.BUFFER_SIZE + pd.getMaxLength()]; int validBytes = in.read(buffer); int offse...
static void function() throws IOException { InputStream in = new FileInputStream(bigFile); PacketDecoder pd = new PacketDecoder(in); Packet p = pd.packet(); byte[] buffer = new byte[PcapBatchReader.BUFFER_SIZE + pd.getMaxLength()]; int validBytes = in.read(buffer); int offset = 0; long total = 0; int tcpCount = 0; int ...
/** * Tests speed for in-place decoding. This is enormously faster than creating objects, largely * because we rarely have to move any data. Instead, we can examine as it lies in the buffer. * * @throws IOException If file can't be read. */
Tests speed for in-place decoding. This is enormously faster than creating objects, largely because we rarely have to move any data. Instead, we can examine as it lies in the buffer
checkFastApproach
{ "repo_name": "apache/drill", "path": "contrib/format-pcapng/src/test/java/org/apache/drill/exec/store/pcap/TestPcapDecoder.java", "license": "apache-2.0", "size": 10707 }
[ "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "org.apache.drill.exec.store.pcap.decoder.Packet", "org.apache.drill.exec.store.pcap.decoder.PacketDecoder" ]
import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import org.apache.drill.exec.store.pcap.decoder.Packet; import org.apache.drill.exec.store.pcap.decoder.PacketDecoder;
import java.io.*; import org.apache.drill.exec.store.pcap.decoder.*;
[ "java.io", "org.apache.drill" ]
java.io; org.apache.drill;
1,440,022
public IniProperties load(final Reader in) throws IOException { final BufferedReader lines = new BufferedReader(in); String line; Map<String,String> sec = map.get(""); if(sec == null) { sec = new HashMap<>(); map.put("", sec); } while((line = lines.readLine()) != null) { line = line.tri...
IniProperties function(final Reader in) throws IOException { final BufferedReader lines = new BufferedReader(in); String line; Map<String,String> sec = map.get(STRSTR[STR]STR#STR=", 2); final String key = (justKV.length > 0) ? justKV[0].trim() : null; final String val = (justKV.length > 1) ? justKV[1].trim() : null; se...
/** Read an INI file into this instance. @param in The INI file to read. @throws IOException if there is a problem reading the file. @return The instance of INI Properties, */
Read an INI file into this instance
load
{ "repo_name": "emily-e/webframework", "path": "src/main/java/net/metanotion/util/IniProperties.java", "license": "apache-2.0", "size": 3735 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.Reader", "java.util.Map" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
99,731
public Version _getIndexVersion() { if (indexVersion != null) { return indexVersion; } else { throw new IllegalArgumentException("index version can not be looked up!"); } }
Version function() { if (indexVersion != null) { return indexVersion; } else { throw new IllegalArgumentException(STR); } }
/** * Starting a name with underscore, so that the user cannot access this function directly through a script * It is only used within predefined painless functions. * @return index version or throws an exception if the index version is not set up for this script instance */
Starting a name with underscore, so that the user cannot access this function directly through a script It is only used within predefined painless functions
_getIndexVersion
{ "repo_name": "gingerwizard/elasticsearch", "path": "server/src/main/java/org/elasticsearch/script/ScoreScript.java", "license": "apache-2.0", "size": 9083 }
[ "org.elasticsearch.Version" ]
import org.elasticsearch.Version;
import org.elasticsearch.*;
[ "org.elasticsearch" ]
org.elasticsearch;
2,396,749
public int getItemCount() { int result = 0; if (this.source != null) { if (this.extract == TableOrder.BY_ROW) { result = this.source.getColumnCount(); } else if (this.extract == TableOrder.BY_COLUMN) { result = this.source.getRowCou...
int function() { int result = 0; if (this.source != null) { if (this.extract == TableOrder.BY_ROW) { result = this.source.getColumnCount(); } else if (this.extract == TableOrder.BY_COLUMN) { result = this.source.getRowCount(); } } return result; }
/** * Returns the number of items (values) in the collection. If the * underlying dataset is <code>null</code>, this method returns zero. * * @return The item count. */
Returns the number of items (values) in the collection. If the underlying dataset is <code>null</code>, this method returns zero
getItemCount
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/data/category/CategoryToPieDataset.java", "license": "mit", "size": 10695 }
[ "org.jfree.util.TableOrder" ]
import org.jfree.util.TableOrder;
import org.jfree.util.*;
[ "org.jfree.util" ]
org.jfree.util;
1,182,378
public void bindEnvEntries () throws NamingException { Log.debug("Binding env entries from the jvm scope"); Object scope = null; List list = NamingEntryUtil.lookupNamingEntries(scope, EnvEntry.class); Iterator itor = list.iterator(); while (itor.hasNext()) { ...
void function () throws NamingException { Log.debug(STR); Object scope = null; List list = NamingEntryUtil.lookupNamingEntries(scope, EnvEntry.class); Iterator itor = list.iterator(); while (itor.hasNext()) { EnvEntry ee = (EnvEntry)itor.next(); ee.bindToENC(ee.getJndiName()); Name namingEntryName = NamingEntryUtil.mak...
/** * Bind all EnvEntries that have been declared, so that the processing of the * web.xml file can potentially override them. * * We first bind EnvEntries declared in Server scope, then WebAppContext scope. * @throws NamingException */
Bind all EnvEntries that have been declared, so that the processing of the web.xml file can potentially override them. We first bind EnvEntries declared in Server scope, then WebAppContext scope
bindEnvEntries
{ "repo_name": "napcs/qedserver", "path": "jetty/modules/plus/src/main/java/org/mortbay/jetty/plus/webapp/EnvConfiguration.java", "license": "mit", "size": 7502 }
[ "java.util.Iterator", "java.util.List", "javax.naming.Name", "javax.naming.NamingException", "org.mortbay.jetty.plus.naming.EnvEntry", "org.mortbay.jetty.plus.naming.NamingEntryUtil", "org.mortbay.log.Log", "org.mortbay.naming.NamingUtil" ]
import java.util.Iterator; import java.util.List; import javax.naming.Name; import javax.naming.NamingException; import org.mortbay.jetty.plus.naming.EnvEntry; import org.mortbay.jetty.plus.naming.NamingEntryUtil; import org.mortbay.log.Log; import org.mortbay.naming.NamingUtil;
import java.util.*; import javax.naming.*; import org.mortbay.jetty.plus.naming.*; import org.mortbay.log.*; import org.mortbay.naming.*;
[ "java.util", "javax.naming", "org.mortbay.jetty", "org.mortbay.log", "org.mortbay.naming" ]
java.util; javax.naming; org.mortbay.jetty; org.mortbay.log; org.mortbay.naming;
1,270,134
public static File getTempDirectory() { return new File(getTempDirectoryPath()); }
static File function() { return new File(getTempDirectoryPath()); }
/** * Returns a {@link File} representing the system temporary directory. * * @return the system temporary directory. * @since 2.0 */
Returns a <code>File</code> representing the system temporary directory
getTempDirectory
{ "repo_name": "lujianzhao/MVPArmsCopy", "path": "arms/src/main/java/com/jess/arms/common/io/FileUtils.java", "license": "apache-2.0", "size": 104372 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,386,073
protected void startConnection() { transport = TransportFactory.getTransport(host.getProtocol()); transport.setBridge(this); transport.setManager(manager); transport.setHost(host); // TODO make this more abstract so we don't litter on AbsTransport transport.setCompression(host.getCompression()); trans...
void function() { transport = TransportFactory.getTransport(host.getProtocol()); transport.setBridge(this); transport.setManager(manager); transport.setHost(host); transport.setCompression(host.getCompression()); transport.setUseAuthAgent(host.getUseAuthAgent()); transport.setEmulation(emulation); if (transport.canForw...
/** * Spawn thread to open connection and start login process. */
Spawn thread to open connection and start login process
startConnection
{ "repo_name": "ddrown/irssiconnectbot", "path": "src/org/woltage/irssiconnectbot/service/TerminalBridge.java", "license": "apache-2.0", "size": 29271 }
[ "org.woltage.irssiconnectbot.bean.PortForwardBean", "org.woltage.irssiconnectbot.transport.TransportFactory" ]
import org.woltage.irssiconnectbot.bean.PortForwardBean; import org.woltage.irssiconnectbot.transport.TransportFactory;
import org.woltage.irssiconnectbot.bean.*; import org.woltage.irssiconnectbot.transport.*;
[ "org.woltage.irssiconnectbot" ]
org.woltage.irssiconnectbot;
1,281,528
public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) { PlotOrientation orientation = plot.getOrientation(); AxisLocation domainAxi...
void function(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) { PlotOrientation orientation = plot.getOrientation(); AxisLocation domainAxisLocation = plot.getDomainAxisLocation(); AxisLocation rangeAxisLocation = plot.getRangeAxisL...
/** * Draws the annotation. This method is called by the drawing code in the * {@link XYPlot} class, you don't normally need to call this method * directly. * * @param g2 the graphics device. * @param plot the plot. * @param dataArea the data area. * @param domainAxis...
Draws the annotation. This method is called by the drawing code in the <code>XYPlot</code> class, you don't normally need to call this method directly
draw
{ "repo_name": "linuxuser586/jfreechart", "path": "source/org/jfree/chart/annotations/XYImageAnnotation.java", "license": "lgpl-2.1", "size": 10317 }
[ "java.awt.Graphics2D", "java.awt.geom.Point2D", "java.awt.geom.Rectangle2D", "org.jfree.chart.axis.AxisLocation", "org.jfree.chart.axis.ValueAxis", "org.jfree.chart.plot.Plot", "org.jfree.chart.plot.PlotOrientation", "org.jfree.chart.plot.PlotRenderingInfo", "org.jfree.chart.plot.XYPlot", "org.jfr...
import java.awt.Graphics2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.AxisLocation; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.Plot; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.PlotRenderingInfo; import org.jfree.char...
import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,955,470
public void setBuiltArtifacts(Set<Artifact> builtArtifacts) { this.builtArtifacts = builtArtifacts; }
void function(Set<Artifact> builtArtifacts) { this.builtArtifacts = builtArtifacts; }
/** * Sets the built artifacts. * * @param builtArtifacts the new built artifacts */
Sets the built artifacts
setBuiltArtifacts
{ "repo_name": "ruhan1/pnc", "path": "model/src/main/java/org/jboss/pnc/model/BuildRecord.java", "license": "apache-2.0", "size": 29047 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,135,746
public Converter getWorkflowConverter() { return new WorkflowConverter(workflowFacade); }
Converter function() { return new WorkflowConverter(workflowFacade); }
/** * Gets a {@link Converter} for {@link Workflow} objects. * * @return {@link Converter} for {@link Workflow} objects */
Gets a <code>Converter</code> for <code>Workflow</code> objects
getWorkflowConverter
{ "repo_name": "getconverge/converge-1.x", "path": "modules/converge-war/src/main/java/dk/i2m/converge/jsf/beans/Converters.java", "license": "gpl-3.0", "size": 9492 }
[ "dk.i2m.converge.jsf.converters.WorkflowConverter", "javax.faces.convert.Converter" ]
import dk.i2m.converge.jsf.converters.WorkflowConverter; import javax.faces.convert.Converter;
import dk.i2m.converge.jsf.converters.*; import javax.faces.convert.*;
[ "dk.i2m.converge", "javax.faces" ]
dk.i2m.converge; javax.faces;
2,797,699
//#ifdef JAVA6 public void setRowId(int parameterIndex, RowId x) throws SQLException { throw Util.notSupported(); } //#endif JAVA6
void function(int parameterIndex, RowId x) throws SQLException { throw Util.notSupported(); }
/** * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The * driver converts this to a SQL <code>ROWID</code> value when it sends it * to the database * * @param parameterIndex the first parameter is 1, the second is 2, ... * @param x the parameter value ...
Sets the designated parameter to the given <code>java.sql.RowId</code> object. The driver converts this to a SQL <code>ROWID</code> value when it sends it to the database
setRowId
{ "repo_name": "ifcharming/original2.0", "path": "src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCPreparedStatement.java", "license": "gpl-3.0", "size": 175518 }
[ "java.sql.RowId", "java.sql.SQLException" ]
import java.sql.RowId; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,961,751
private void addCabspottingPeopleAndRandomSocialNetwork() { List<String> locationTraceFilenames; try { locationTraceFilenames = getLocationTraceFilenames(traceIndexFilename); // System.out.println(locationTraceFilenames); } catch (FileNotFoundException e) { System.err.println(e); ...
void function() { List<String> locationTraceFilenames; try { locationTraceFilenames = getLocationTraceFilenames(traceIndexFilename); } catch (FileNotFoundException e) { System.err.println(e); locationTraceFilenames = new ArrayList<String>(); } Iterator<String> traceIterator = locationTraceFilenames.iterator(); for (int...
/** * Add the people and social network for the Cabspotting dataset. */
Add the people and social network for the Cabspotting dataset
addCabspottingPeopleAndRandomSocialNetwork
{ "repo_name": "casific/murmur", "path": "simulations/java/org/denovogroup/rangzen/simulation/ProximitySimulation.java", "license": "apache-2.0", "size": 33411 }
[ "java.io.FileNotFoundException", "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,080,379
@Test public void testSkyframeAnalyzeRuleThenItsOutputFile() throws Exception { scratch.file("pkg/BUILD", "testing_dummy_rule(name='foo', ", " srcs=['a.src'],", " outs=['a.out'])"); scratch.file("pkg2/BUILD", "testing_dummy_rule(name='foo'...
void function() throws Exception { scratch.file(STR, STR, STR, STR); scratch.file(STR, STR, STR, STR); String aoutLabel = STR update(" scratch.overwriteFile(STR, STR, STR, STR, "# CommentSTR ConfiguredTarget target = Iterables.getOnlyElement(getAnalysisResult().getTargetsToBuild()); assertEquals(aoutLabel, target.getLa...
/** * Regression test: * "skyframe: ArtifactFactory and ConfiguredTargets out of sync". */
Regression test: "skyframe: ArtifactFactory and ConfiguredTargets out of sync"
testSkyframeAnalyzeRuleThenItsOutputFile
{ "repo_name": "hhclam/bazel", "path": "src/test/java/com/google/devtools/build/lib/analysis/BuildViewTest.java", "license": "apache-2.0", "size": 35399 }
[ "com.google.common.collect.Iterables", "com.google.devtools.build.lib.actions.Action", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.actions.FailAction", "org.junit.Assert" ]
import com.google.common.collect.Iterables; import com.google.devtools.build.lib.actions.Action; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.FailAction; import org.junit.Assert;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import org.junit.*;
[ "com.google.common", "com.google.devtools", "org.junit" ]
com.google.common; com.google.devtools; org.junit;
1,718,156
public static FormatRenderer getDateTimeRenderer(){ return new FormatRenderer(DateFormat.getDateTimeInstance()); }
static FormatRenderer function(){ return new FormatRenderer(DateFormat.getDateTimeInstance()); }
/** * Use the default date/time formatter for the default locale. */
Use the default date/time formatter for the default locale
getDateTimeRenderer
{ "repo_name": "stef78ano/winebrewdb", "path": "src/main/java/uk/co/pbellchambers/winebrewdb/legacy/util/FormatRenderer.java", "license": "apache-2.0", "size": 1237 }
[ "java.text.DateFormat" ]
import java.text.DateFormat;
import java.text.*;
[ "java.text" ]
java.text;
593,355
public void getWorldManifold(WorldManifold worldManifold) { final Body bodyA = m_fixtureA.getBody(); final Body bodyB = m_fixtureB.getBody(); final Shape shapeA = m_fixtureA.getShape(); final Shape shapeB = m_fixtureB.getShape(); worldManifold.initialize(m_manifold, bodyA.getTransform(), shapeA.m...
void function(WorldManifold worldManifold) { final Body bodyA = m_fixtureA.getBody(); final Body bodyB = m_fixtureB.getBody(); final Shape shapeA = m_fixtureA.getShape(); final Shape shapeB = m_fixtureB.getShape(); worldManifold.initialize(m_manifold, bodyA.getTransform(), shapeA.m_radius, bodyB.getTransform(), shapeB....
/** * Get the world manifold. */
Get the world manifold
getWorldManifold
{ "repo_name": "neilpanchal/PBox2D", "path": "src/com/jbox2d/dynamics/contacts/Contact.java", "license": "mit", "size": 9987 }
[ "com.jbox2d.collision.WorldManifold", "com.jbox2d.collision.shapes.Shape", "com.jbox2d.dynamics.Body" ]
import com.jbox2d.collision.WorldManifold; import com.jbox2d.collision.shapes.Shape; import com.jbox2d.dynamics.Body;
import com.jbox2d.collision.*; import com.jbox2d.collision.shapes.*; import com.jbox2d.dynamics.*;
[ "com.jbox2d.collision", "com.jbox2d.dynamics" ]
com.jbox2d.collision; com.jbox2d.dynamics;
453,787
public static void error(String message, Throwable thrown) { CONSOLE_LOGGER.log(Level.SEVERE, message, thrown); }
static void function(String message, Throwable thrown) { CONSOLE_LOGGER.log(Level.SEVERE, message, thrown); }
/** * Writes the error message to the console. * * @param message the message. * @param thrown the exception. */
Writes the error message to the console
error
{ "repo_name": "lorislab/mechanic", "path": "mechanic/src/main/java/org/lorislab/mechanic/logger/Console.java", "license": "apache-2.0", "size": 4789 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
852,392
public Color getHighlightColor() { return highlight; } /** * Returns the shadow color of the etched border * when rendered on the specified component. If no shadow * color was specified at instantiation, the shadow color * is derived from the specified component's background ...
Color function() { return highlight; } /** * Returns the shadow color of the etched border * when rendered on the specified component. If no shadow * color was specified at instantiation, the shadow color * is derived from the specified component's background color. * * @param c the component for which the shadow may b...
/** * Returns the highlight color of the etched border. * Will return null if no highlight color was specified * at instantiation. * * @return the highlight {@code Color} of this {@code EtchedBorder} or null * if none was specified * @since 1.3 */
Returns the highlight color of the etched border. Will return null if no highlight color was specified at instantiation
getHighlightColor
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java", "license": "gpl-2.0", "size": 7941 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,152,558
EDataType getHrefType();
EDataType getHrefType();
/** * Returns the meta object for data type '{@link java.lang.String <em>Href Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for data type '<em>Href Type</em>'. * @see java.lang.String * @model instanceClass="java.lang.String" * @generated */
Returns the meta object for data type '<code>java.lang.String Href Type</code>'.
getHrefType
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.ows/src/net/opengis/ows20/Ows20Package.java", "license": "lgpl-2.1", "size": 356067 }
[ "org.eclipse.emf.ecore.EDataType" ]
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,706,482
void setAnchor (DVector3C a);
void setAnchor (DVector3C a);
/** * Set the joint anchor point. * <p> * The joint will try to keep this point on each body * together. The input is specified in world coordinates. */
Set the joint anchor point. The joint will try to keep this point on each body together. The input is specified in world coordinates
setAnchor
{ "repo_name": "billhj/Etoile-java", "path": "Ode4j/src/org/ode4j/ode/DBallJoint.java", "license": "mit", "size": 3545 }
[ "org.ode4j.math.DVector3C" ]
import org.ode4j.math.DVector3C;
import org.ode4j.math.*;
[ "org.ode4j.math" ]
org.ode4j.math;
220,144
if (!isValidName(name)) { throw new IllegalArgumentException("name not allowed"); } this.value = getValue(name); }
if (!isValidName(name)) { throw new IllegalArgumentException(STR); } this.value = getValue(name); }
/** * set the current value of this enumeration to the * value identified by given string. * * @throws IllegalArgumentException * if the value found for given String is not allowed * for this enumeration. * @param name set this enumeration to hold one of the allowed values */
set the current value of this enumeration to the value identified by given string
set
{ "repo_name": "yalewkidane/Oliot-FC", "path": "fc-server/src/main/java/kr/ac/kaist/resl/ltk/generated/enumerations/AccessSpecStopTriggerType.java", "license": "lgpl-2.1", "size": 6984 }
[ "java.lang.IllegalArgumentException" ]
import java.lang.IllegalArgumentException;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,098,141
public void verifyReplication(String src, short replication, String clientName) throws IOException { if (replication >= minReplication && replication <= maxReplication) { //common case. avoid building 'text' return; } String text = "fi...
void function(String src, short replication, String clientName) throws IOException { if (replication >= minReplication && replication <= maxReplication) { return; } String text = STR + src + ((clientName != null) ? STR + clientName : STR.\nSTRRequested replication STR exceeds maximum STR is less than the required minim...
/** * Check whether the replication parameter is within the range * determined by system configuration. */
Check whether the replication parameter is within the range determined by system configuration
verifyReplication
{ "repo_name": "Nextzero/hadoop-2.6.0-cdh5.4.3", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java", "license": "apache-2.0", "size": 148458 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,495,738
public static SlidingWindows<Count, Duration> of(Count windowLength, Duration slidingInterval) { return new SlidingWindows<>(windowLength, slidingInterval); }
static SlidingWindows<Count, Duration> function(Count windowLength, Duration slidingInterval) { return new SlidingWindows<>(windowLength, slidingInterval); }
/** * Tuple count and time duration based sliding window configuration. * * @param windowLength the number of tuples in the window * @param slidingInterval the time duration after which the window slides */
Tuple count and time duration based sliding window configuration
of
{ "repo_name": "kishorvpatil/incubator-storm", "path": "storm-client/src/jvm/org/apache/storm/streams/windowing/SlidingWindows.java", "license": "apache-2.0", "size": 5783 }
[ "org.apache.storm.topology.base.BaseWindowedBolt" ]
import org.apache.storm.topology.base.BaseWindowedBolt;
import org.apache.storm.topology.base.*;
[ "org.apache.storm" ]
org.apache.storm;
580,030
protected void writeStructureToNBT(NBTTagCompound tagCompound) { super.writeStructureToNBT(tagCompound); tagCompound.setInteger("Length", this.length); }
void function(NBTTagCompound tagCompound) { super.writeStructureToNBT(tagCompound); tagCompound.setInteger(STR, this.length); }
/** * (abstract) Helper method to write subclass data to NBT */
(abstract) Helper method to write subclass data to NBT
writeStructureToNBT
{ "repo_name": "Im-Jrotica/forge_latest", "path": "build/tmp/recompileMc/sources/net/minecraft/world/gen/structure/StructureVillagePieces.java", "license": "lgpl-2.1", "size": 136617 }
[ "net.minecraft.nbt.NBTTagCompound" ]
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.*;
[ "net.minecraft.nbt" ]
net.minecraft.nbt;
141,055
resp.setContentType("text/json"); List<Task> tasks = TaskDAO.getInstance().getAll(Boolean.valueOf(req.getParameter("done"))); JSONArray jsonArray = new JSONArray(); for (Task task : tasks) { JSONObject jsonObject = new JSONObject(); jsonObject.put("id", task.getId()); ...
resp.setContentType(STR); List<Task> tasks = TaskDAO.getInstance().getAll(Boolean.valueOf(req.getParameter("done"))); JSONArray jsonArray = new JSONArray(); for (Task task : tasks) { JSONObject jsonObject = new JSONObject(); jsonObject.put("id", task.getId()); jsonObject.put(STR, task.getDescription()); jsonObject.put(...
/** * Prepare JSON array for index page and send it * * @param req * @param resp * @throws ServletException * @throws IOException */
Prepare JSON array for index page and send it
doPost
{ "repo_name": "EgorTrevelyan/junior", "path": "chapter_010/todolist/src/main/java/erepnikov/servlets/ItemsServlet.java", "license": "apache-2.0", "size": 1416 }
[ "java.util.List", "org.json.JSONArray", "org.json.JSONObject" ]
import java.util.List; import org.json.JSONArray; import org.json.JSONObject;
import java.util.*; import org.json.*;
[ "java.util", "org.json" ]
java.util; org.json;
836,603
@WebMethod(operationName = "createTaxiTravel") public void createTaxiTravel( @WebParam(name = "email") String email, @WebParam(name = "origin") String origin, @WebParam(name = "destination") String destination, @WebParam(name = "freeSeats") int freeSeats, ...
@WebMethod(operationName = STR) void function( @WebParam(name = "email") String email, @WebParam(name = STR) String origin, @WebParam(name = STR) String destination, @WebParam(name = STR) int freeSeats, @WebParam(name = "when") String when, @WebParam(name = STR) String coordStart, @WebParam(name = STR) String coordEnd)...
/** * Web service operation * crea un viaggio in taxi * @param email String l'email dell'utente creatore * @param origin String la destinazione di partenza * @param destination String la località di arrivo * @param freeSeats int il numero di posti liber * @param when String la ...
Web service operation crea un viaggio in taxi
createTaxiTravel
{ "repo_name": "grzegorzbrze/Conpartir0.2", "path": "Conpartir-war/src/java/SOAPServer/SOAPServiceClient.java", "license": "gpl-3.0", "size": 33561 }
[ "java.util.Date", "javax.jws.WebMethod", "javax.jws.WebParam", "org.conpartir.entity.Client" ]
import java.util.Date; import javax.jws.WebMethod; import javax.jws.WebParam; import org.conpartir.entity.Client;
import java.util.*; import javax.jws.*; import org.conpartir.entity.*;
[ "java.util", "javax.jws", "org.conpartir.entity" ]
java.util; javax.jws; org.conpartir.entity;
1,343,915
private static TypeObject getTypeObject(Object aValue) throws com.sun.star.lang.IllegalArgumentException { TypeObject aTypeObject = new TypeObject(); if (aValue == null || AnyConverter.isVoid(aValue)) { throw new com.sun.star.lang.IllegalArgumentException("Cannot ...
static TypeObject function(Object aValue) throws com.sun.star.lang.IllegalArgumentException { TypeObject aTypeObject = new TypeObject(); if (aValue == null AnyConverter.isVoid(aValue)) { throw new com.sun.star.lang.IllegalArgumentException(STR); } int type = AnyConverter.getType(aValue).getTypeClass().getValue(); switc...
/** * get the type object from the given object * @param aValue an object representing a (numerical) value; can also be an 'any' * @return a type object: the object together with the its type information * @throws com.sun.star.lang.IllegalArgumentException if the object is unknown */
get the type object from the given object
getTypeObject
{ "repo_name": "qt-haiku/LibreOffice", "path": "wizards/com/sun/star/wizards/common/NumericalHelper.java", "license": "gpl-3.0", "size": 49372 }
[ "com.sun.star.uno.AnyConverter", "com.sun.star.uno.TypeClass" ]
import com.sun.star.uno.AnyConverter; import com.sun.star.uno.TypeClass;
import com.sun.star.uno.*;
[ "com.sun.star" ]
com.sun.star;
2,543,388
public void setPriceLastPO (BigDecimal PriceLastPO);
void function (BigDecimal PriceLastPO);
/** Set Last PO Price. * Price of the last purchase order for the product */
Set Last PO Price. Price of the last purchase order for the product
setPriceLastPO
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_M_Product_Costing.java", "license": "gpl-2.0", "size": 9567 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
66,731
//////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// @Override public boolean isBroadcastDomainPort(DatapathId sw, OFPort port) { return isBroadcastDomainPort(sw, port, true); }
boolean function(DatapathId sw, OFPort port) { return isBroadcastDomainPort(sw, port, true); }
/** * Checks if the switchport is a broadcast domain port or not. */
Checks if the switchport is a broadcast domain port or not
isBroadcastDomainPort
{ "repo_name": "duanjp8617/floodlight", "path": "src/main/java/net/floodlightcontroller/topology/TopologyManager.java", "license": "apache-2.0", "size": 48115 }
[ "org.projectfloodlight.openflow.types.DatapathId", "org.projectfloodlight.openflow.types.OFPort" ]
import org.projectfloodlight.openflow.types.DatapathId; import org.projectfloodlight.openflow.types.OFPort;
import org.projectfloodlight.openflow.types.*;
[ "org.projectfloodlight.openflow" ]
org.projectfloodlight.openflow;
1,299,137
public java.util.List<fr.lip6.move.pnml.hlpn.multisets.hlapi.AllHLAPI> getSubterm_multisets_AllHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.multisets.hlapi.AllHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.multisets.hlapi.AllHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals...
java.util.List<fr.lip6.move.pnml.hlpn.multisets.hlapi.AllHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.multisets.hlapi.AllHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.multisets.hlapi.AllHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.multisets.impl.AllI...
/** * This accessor return a list of encapsulated subelement, only of AllHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of AllHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_multisets_AllHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/multisets/hlapi/EmptyHLAPI.java", "license": "epl-1.0", "size": 113920 }
[ "fr.lip6.move.pnml.hlpn.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
1,442,480
public void replenishSteppers(int index) { CrossRegion box; box = (CrossRegion) myBoxes.get(); for (int i = index; i < mySpace.axisCount(); i++) { mySimples.store(i, (box.projection(i)).simpleRegions()); } }
void function(int index) { CrossRegion box; box = (CrossRegion) myBoxes.get(); for (int i = index; i < mySpace.axisCount(); i++) { mySimples.store(i, (box.projection(i)).simpleRegions()); } }
/** * Replenish all steppers starting at index */
Replenish all steppers starting at index
replenishSteppers
{ "repo_name": "jonesd/abora-white", "path": "src/main/java/info/dgjones/abora/white/cross/GenericCrossSimpleRegionStepper.java", "license": "mit", "size": 7195 }
[ "info.dgjones.abora.white.spaces.cross.CrossRegion" ]
import info.dgjones.abora.white.spaces.cross.CrossRegion;
import info.dgjones.abora.white.spaces.cross.*;
[ "info.dgjones.abora" ]
info.dgjones.abora;
1,467,413
public void reset() throws TimeoutException, NotConnectedException { ByteBuffer bb = ipcon.createRequestPacket((byte)8, FUNCTION_RESET, this); sendRequest(bb.array()); }
void function() throws TimeoutException, NotConnectedException { ByteBuffer bb = ipcon.createRequestPacket((byte)8, FUNCTION_RESET, this); sendRequest(bb.array()); }
/** * Calling this function will reset the Brick. Calling this function * on a Brick inside of a stack will reset the whole stack. * * After a reset you have to create new device objects, * calling functions on the existing ones will result in * undefined behavior! * * .. versionadded:: 1.2.1~(Firmwar...
Calling this function will reset the Brick. Calling this function on a Brick inside of a stack will reset the whole stack. After a reset you have to create new device objects, calling functions on the existing ones will result in undefined behavior! .. versionadded:: 1.2.1~(Firmware)
reset
{ "repo_name": "jaggr2/ch.bfh.fbi.mobiComp.17herz", "path": "com.tinkerforge/src/com/tinkerforge/BrickMaster.java", "license": "apache-2.0", "size": 85810 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,709,363
@WorkerThread public Optional<JobTracker.JobState> runSynchronously(@NonNull Job job, long timeout) { CountDownLatch latch = new CountDownLatch(1); AtomicReference<JobTracker.JobState> resultState = new AtomicReference<>();
Optional<JobTracker.JobState> function(@NonNull Job job, long timeout) { CountDownLatch latch = new CountDownLatch(1); AtomicReference<JobTracker.JobState> resultState = new AtomicReference<>();
/** * Runs the specified job synchronously. Beware: All normal dependencies are respected, meaning * you must take great care where you call this. It could take a very long time to complete! * * @return If the job completed, this will contain its completion state. If it timed out or * otherwise d...
Runs the specified job synchronously. Beware: All normal dependencies are respected, meaning you must take great care where you call this. It could take a very long time to complete
runSynchronously
{ "repo_name": "WhisperSystems/TextSecure", "path": "app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobManager.java", "license": "gpl-3.0", "size": 19887 }
[ "androidx.annotation.NonNull", "java.util.concurrent.CountDownLatch", "java.util.concurrent.atomic.AtomicReference", "org.whispersystems.libsignal.util.guava.Optional" ]
import androidx.annotation.NonNull; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; import org.whispersystems.libsignal.util.guava.Optional;
import androidx.annotation.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.whispersystems.libsignal.util.guava.*;
[ "androidx.annotation", "java.util", "org.whispersystems.libsignal" ]
androidx.annotation; java.util; org.whispersystems.libsignal;
1,409,384
public BusinessOwners getSearchOwner() { return searchOwner; }
BusinessOwners function() { return searchOwner; }
/** * Gets the search owner. * * @return the search owner */
Gets the search owner
getSearchOwner
{ "repo_name": "valmas/ideal-house-dbms", "path": "src/main/java/com/ntua/db/beans/BusinessOwnersBean.java", "license": "apache-2.0", "size": 11270 }
[ "com.ntua.db.jpa.BusinessOwners" ]
import com.ntua.db.jpa.BusinessOwners;
import com.ntua.db.jpa.*;
[ "com.ntua.db" ]
com.ntua.db;
757,525
@Generated @Selector("uniqueIdentifier") public native NSUUID uniqueIdentifier();
@Selector(STR) native NSUUID function();
/** * A unique identifier for the action. */
A unique identifier for the action
uniqueIdentifier
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/homekit/HMAction.java", "license": "apache-2.0", "size": 4978 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
74,966
public static void showHtml(Vector vec, boolean useAsciiFallback) throws IOException { showHtml(vec, mkVectorColorMapper(vec), useAsciiFallback); }
static void function(Vector vec, boolean useAsciiFallback) throws IOException { showHtml(vec, mkVectorColorMapper(vec), useAsciiFallback); }
/** * Shows given vector in the browser with D3-based visualization. * * @param vec Vector to show. * @param useAsciiFallback Use ascii fallback is desktop or browser is unavailable. * @throws IOException Thrown in case of any errors. */
Shows given vector in the browser with D3-based visualization
showHtml
{ "repo_name": "NSAmelchev/ignite", "path": "modules/ml/src/main/java/org/apache/ignite/ml/math/Tracer.java", "license": "apache-2.0", "size": 23518 }
[ "java.io.IOException", "org.apache.ignite.ml.math.primitives.vector.Vector" ]
import java.io.IOException; import org.apache.ignite.ml.math.primitives.vector.Vector;
import java.io.*; import org.apache.ignite.ml.math.primitives.vector.*;
[ "java.io", "org.apache.ignite" ]
java.io; org.apache.ignite;
71,257
public void instantiateViews() { // thisQuestion = (TextView) findViewById(R.id.question_title); answerListView = (ListView) findViewById(R.id.answerListView); favIcon = (ImageButton) findViewById(R.id.question_fav_icon); upvoteButton = (ImageButton) findViewById(R.id.question_upvote_button); commentButto...
void function() { answerListView = (ListView) findViewById(R.id.answerListView); favIcon = (ImageButton) findViewById(R.id.question_fav_icon); upvoteButton = (ImageButton) findViewById(R.id.question_upvote_button); commentButton = (ImageButton) findViewById(R.id.question_comment_icon); upvote_score = (TextView) findVie...
/** * Instantiates the view objects. */
Instantiates the view objects
instantiateViews
{ "repo_name": "CMPUT301F14T03/lotsofcodingkitty", "path": "cmput301t03app/src/ca/ualberta/cs/cmput301t03app/views/ViewQuestion.java", "license": "apache-2.0", "size": 23088 }
[ "android.widget.Button", "android.widget.ImageButton", "android.widget.ImageView", "android.widget.ListView", "android.widget.TextView" ]
import android.widget.Button; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,498,269
@SuppressWarnings("deprecation") public PageFormat pageDialog(final PrintRequestAttributeSet attributes) throws HeadlessException { if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } DialogTypeSelection dlg = (DialogTypeSelection)att...
@SuppressWarnings(STR) PageFormat function(final PrintRequestAttributeSet attributes) throws HeadlessException { if (GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } DialogTypeSelection dlg = (DialogTypeSelection)attributes.get(DialogTypeSelection.class); if (dlg == DialogTypeSelection.NATIVE) { Pri...
/** * return a PageFormat corresponding to the updated attributes, * or null if the user cancelled the dialog. */
return a PageFormat corresponding to the updated attributes, or null if the user cancelled the dialog
pageDialog
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java", "license": "gpl-2.0", "size": 96688 }
[ "java.awt.GraphicsConfiguration", "java.awt.GraphicsEnvironment", "java.awt.HeadlessException", "java.awt.KeyboardFocusManager", "java.awt.Window", "java.awt.print.PageFormat", "javax.print.PrintService", "javax.print.attribute.PrintRequestAttributeSet", "javax.print.attribute.standard.DialogTypeSel...
import java.awt.GraphicsConfiguration; import java.awt.GraphicsEnvironment; import java.awt.HeadlessException; import java.awt.KeyboardFocusManager; import java.awt.Window; import java.awt.print.PageFormat; import javax.print.PrintService; import javax.print.attribute.PrintRequestAttributeSet; import javax.print.attrib...
import java.awt.*; import java.awt.print.*; import javax.print.*; import javax.print.attribute.*; import javax.print.attribute.standard.*;
[ "java.awt", "javax.print" ]
java.awt; javax.print;
50,537
public MergeResult merge(Event otherEvent) { MergeResult eventMergeResult = new MergeResult("Event"); if (otherEvent == null) { throw new IllegalStateException("The given Event must be not null"); } super.mergeCalendarContent(eventMergeResult, otherEvent); Mer...
MergeResult function(Event otherEvent) { MergeResult eventMergeResult = new MergeResult("Event"); if (otherEvent == null) { throw new IllegalStateException(STR); } super.mergeCalendarContent(eventMergeResult, otherEvent); MergeResult result = null; result = PDIMergeUtils.comparePropertiesWithTZ(this.dtEnd , otherEvent....
/** * Merges this event with another event. * * @param otherEvent the event to merge with * @return the result of the merging as a MergeResult object */
Merges this event with another event
merge
{ "repo_name": "accesstest3/cfunambol", "path": "common/pim-framework/src/main/java/com/funambol/common/pim/calendar/Event.java", "license": "agpl-3.0", "size": 8845 }
[ "com.funambol.common.pim.utility.PDIMergeUtils", "com.funambol.framework.tools.merge.MergeResult" ]
import com.funambol.common.pim.utility.PDIMergeUtils; import com.funambol.framework.tools.merge.MergeResult;
import com.funambol.common.pim.utility.*; import com.funambol.framework.tools.merge.*;
[ "com.funambol.common", "com.funambol.framework" ]
com.funambol.common; com.funambol.framework;
945,549
public void setLocalizedValues(long key, LocalizedObjectTypes type, List<VOLocalizedText> values) throws ConcurrentModificationException;
void function(long key, LocalizedObjectTypes type, List<VOLocalizedText> values) throws ConcurrentModificationException;
/** * Sets the localized values for a certain field of an object. * * @param key * the object key * @param type * the {@link LocalizedObjectTypes} identifying the field to * localize * @param values * a list of localized values ...
Sets the localized values for a certain field of an object
setLocalizedValues
{ "repo_name": "opetrovski/development", "path": "oscm-i18n-intsvc/javasrc/org/oscm/i18nservice/local/LocalizerServiceLocal.java", "license": "apache-2.0", "size": 10550 }
[ "java.util.List", "org.oscm.domobjects.enums.LocalizedObjectTypes", "org.oscm.internal.types.exception.ConcurrentModificationException", "org.oscm.internal.vo.VOLocalizedText" ]
import java.util.List; import org.oscm.domobjects.enums.LocalizedObjectTypes; import org.oscm.internal.types.exception.ConcurrentModificationException; import org.oscm.internal.vo.VOLocalizedText;
import java.util.*; import org.oscm.domobjects.enums.*; import org.oscm.internal.types.exception.*; import org.oscm.internal.vo.*;
[ "java.util", "org.oscm.domobjects", "org.oscm.internal" ]
java.util; org.oscm.domobjects; org.oscm.internal;
1,645,693
public void setTurn(int turn) { turnPanel.removeAll(); turnLabel = new JLabel("Turn: " + turn); turnPanel.add(turnLabel); turnLabel.revalidate(); turnLabel.repaint(); }
void function(int turn) { turnPanel.removeAll(); turnLabel = new JLabel(STR + turn); turnPanel.add(turnLabel); turnLabel.revalidate(); turnLabel.repaint(); }
/** Displays the current turn * @param turn */
Displays the current turn
setTurn
{ "repo_name": "Qwe1rty/ChineseCheckersClient", "path": "src/BoardDisplay.java", "license": "apache-2.0", "size": 5624 }
[ "javax.swing.JLabel" ]
import javax.swing.JLabel;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
33,816
public void setMoviesData(List<Movie> moviesData) { mMovieData = moviesData; notifyDataSetChanged(); }
void function(List<Movie> moviesData) { mMovieData = moviesData; notifyDataSetChanged(); }
/** * This method is used to set the weather settings on a MovieAdapter if we've already * created one. This is handy when we get new data from the web but don't want to create a * new MovieAdapter to display it. * * @param moviesData The new weather data to be displayed. */
This method is used to set the weather settings on a MovieAdapter if we've already created one. This is handy when we get new data from the web but don't want to create a new MovieAdapter to display it
setMoviesData
{ "repo_name": "PavlosIsaris/Udacity-Popular-movies-Android-App", "path": "app/src/main/java/com/example/android/movies/adapters/MovieAdapter.java", "license": "apache-2.0", "size": 5964 }
[ "com.example.android.movies.models.Movie", "java.util.List" ]
import com.example.android.movies.models.Movie; import java.util.List;
import com.example.android.movies.models.*; import java.util.*;
[ "com.example.android", "java.util" ]
com.example.android; java.util;
718,109
protected Parser<?> getParser(String typeName) { Preconditions.checkArgument(typeName != null, "null typeName"); if (typeName.equals("type")) return new ObjTypeParser(); if (typeName.equals("objid")) return new ObjIdParser(); if (typeName.equals("expr")) ...
Parser<?> function(String typeName) { Preconditions.checkArgument(typeName != null, STR); if (typeName.equals("type")) return new ObjTypeParser(); if (typeName.equals("objid")) return new ObjIdParser(); if (typeName.equals("expr")) return new ExprParser(); return FieldTypeParser.getFieldTypeParser(typeName); }
/** * Convert parameter spec type name into a {@link Parser}. Used for custom type names not supported by {@link ParamParser}. * * <p> * The implementation in {@link ParamParser} supports all {@link org.jsimpledb.core.FieldType}s registered with the database, * {@code type} for an object type n...
Convert parameter spec type name into a <code>Parser</code>. Used for custom type names not supported by <code>ParamParser</code>. The implementation in <code>ParamParser</code> supports all <code>org.jsimpledb.core.FieldType</code>s registered with the database, type for an object type name (returns <code>Integer</cod...
getParser
{ "repo_name": "tempbottle/jsimpledb", "path": "src/java/org/jsimpledb/cli/cmd/AbstractCommand.java", "license": "apache-2.0", "size": 5522 }
[ "com.google.common.base.Preconditions", "org.jsimpledb.parse.FieldTypeParser", "org.jsimpledb.parse.ObjIdParser", "org.jsimpledb.parse.ObjTypeParser", "org.jsimpledb.parse.Parser", "org.jsimpledb.parse.expr.ExprParser" ]
import com.google.common.base.Preconditions; import org.jsimpledb.parse.FieldTypeParser; import org.jsimpledb.parse.ObjIdParser; import org.jsimpledb.parse.ObjTypeParser; import org.jsimpledb.parse.Parser; import org.jsimpledb.parse.expr.ExprParser;
import com.google.common.base.*; import org.jsimpledb.parse.*; import org.jsimpledb.parse.expr.*;
[ "com.google.common", "org.jsimpledb.parse" ]
com.google.common; org.jsimpledb.parse;
1,028,077
@Override public EList<EObject> getContents() { if (contents == null) { contents = new ContentsEList<EObject>() { private static final long serialVersionUID = 1L;
EList<EObject> function() { if (contents == null) { contents = new ContentsEList<EObject>() { private static final long serialVersionUID = 1L;
/** * We use a version of {@link ContentsEList} that handles inverses differently, because * the resource does not need to be set on the user objects. They know that * they belong to a {@link FragmentedModel} differently. */
We use a version of <code>ContentsEList</code> that handles inverses differently, because the resource does not need to be set on the user objects. They know that they belong to a <code>FragmentedModel</code> differently
getContents
{ "repo_name": "srirammails/emf-fragments", "path": "de.hub.emffrag/src/de/hub/emffrag/fragmentation/FragmentedModel.java", "license": "apache-2.0", "size": 14721 }
[ "org.eclipse.emf.common.util.EList", "org.eclipse.emf.ecore.EObject" ]
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
198,156
@Test public void testT1RV8D3_T1LV9D3() { test_id = getTestId("T1RV8D3", "T1LV9D3", "113"); String src = selectTRVD("T1RV8D3"); String dest = selectTLVD("T1LV9D3"); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace()...
void function() { test_id = getTestId(STR, STR, "113"); String src = selectTRVD(STR); String dest = selectTLVD(STR); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace(); } catch (TokenStreamException e) { e.printStackTrace(); } assertTrue(Success, chec...
/** * Perform the test for the given matrix column (T1RV8D3) and row (T1LV9D3). * */
Perform the test for the given matrix column (T1RV8D3) and row (T1LV9D3)
testT1RV8D3_T1LV9D3
{ "repo_name": "jason-rhodes/bridgepoint", "path": "src/org.xtuml.bp.als.oal.test/src/org/xtuml/bp/als/oal/test/SingleDimensionFixedArrayAssigmentTest_16_Generics.java", "license": "apache-2.0", "size": 186177 }
[ "org.xtuml.bp.ui.graphics.editor.GraphicalEditor" ]
import org.xtuml.bp.ui.graphics.editor.GraphicalEditor;
import org.xtuml.bp.ui.graphics.editor.*;
[ "org.xtuml.bp" ]
org.xtuml.bp;
572,953
private void invalidateCorruptReplicas(BlockInfo blk, Block reported, NumberReplicas numberReplicas) { Collection<DatanodeDescriptor> nodes = corruptReplicas.getNodes(blk); boolean removedFromBlocksMap = true; if (nodes == null) return; // make a copy of the array of nodes in order to avoi...
void function(BlockInfo blk, Block reported, NumberReplicas numberReplicas) { Collection<DatanodeDescriptor> nodes = corruptReplicas.getNodes(blk); boolean removedFromBlocksMap = true; if (nodes == null) return; DatanodeDescriptor[] nodesCopy = nodes.toArray(new DatanodeDescriptor[nodes.size()]); for (DatanodeDescripto...
/** * Invalidate corrupt replicas. * <p> * This will remove the replicas from the block's location list, * add them to {@link #invalidateBlocks} so that they could be further * deleted from the respective data-nodes, * and remove the block from corruptReplicasMap. * <p> * This method should be c...
Invalidate corrupt replicas. This will remove the replicas from the block's location list, add them to <code>#invalidateBlocks</code> so that they could be further deleted from the respective data-nodes, and remove the block from corruptReplicasMap. This method should be called when the block has sufficient number of l...
invalidateCorruptReplicas
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java", "license": "apache-2.0", "size": 191685 }
[ "java.io.IOException", "java.util.Collection", "org.apache.hadoop.hdfs.protocol.Block", "org.apache.hadoop.hdfs.server.blockmanagement.CorruptReplicasMap" ]
import java.io.IOException; import java.util.Collection; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.blockmanagement.CorruptReplicasMap;
import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.blockmanagement.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
847,836
protected IAuthenticationStrategy newAuthenticationStrategy(final IsisConfiguration configuration) { final String cookieKey = configuration.getString(WICKET_REMEMBER_ME_COOKIE_KEY, WICKET_REMEMBER_ME_COOKIE_KEY_DEFAULT); final String encryptionKey = configuration.getString(WICKET_REM...
IAuthenticationStrategy function(final IsisConfiguration configuration) { final String cookieKey = configuration.getString(WICKET_REMEMBER_ME_COOKIE_KEY, WICKET_REMEMBER_ME_COOKIE_KEY_DEFAULT); final String encryptionKey = configuration.getString(WICKET_REMEMBER_ME_ENCRYPTION_KEY, defaultEncryptionKeyIfNotConfigured())...
/** * protected visibility to allow ad-hoc overriding of some other authentication strategy. */
protected visibility to allow ad-hoc overriding of some other authentication strategy
newAuthenticationStrategy
{ "repo_name": "niv0/isis", "path": "core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java", "license": "apache-2.0", "size": 34899 }
[ "org.apache.isis.core.commons.config.IsisConfiguration", "org.apache.wicket.authentication.IAuthenticationStrategy", "org.apache.wicket.authentication.strategy.DefaultAuthenticationStrategy" ]
import org.apache.isis.core.commons.config.IsisConfiguration; import org.apache.wicket.authentication.IAuthenticationStrategy; import org.apache.wicket.authentication.strategy.DefaultAuthenticationStrategy;
import org.apache.isis.core.commons.config.*; import org.apache.wicket.authentication.*; import org.apache.wicket.authentication.strategy.*;
[ "org.apache.isis", "org.apache.wicket" ]
org.apache.isis; org.apache.wicket;
1,823,755
private void findMatchableNodes(Element element) { processMatchableNodes(element); Element enclosing = element.getEnclosingElement(); while (enclosing != null) { if (enclosing.getKind() == ElementKind.CLASS || enclosing.getKind() == ElementKind.INTERFACE) { TypeEl...
void function(Element element) { processMatchableNodes(element); Element enclosing = element.getEnclosingElement(); while (enclosing != null) { if (enclosing.getKind() == ElementKind.CLASS enclosing.getKind() == ElementKind.INTERFACE) { TypeElement current = (TypeElement) enclosing; while (current != null) { processMat...
/** * Search the super types of element for MatchableNode definitions. Any superclass or super * interface can contain definitions of matchable nodes. * * @param element */
Search the super types of element for MatchableNode definitions. Any superclass or super interface can contain definitions of matchable nodes
findMatchableNodes
{ "repo_name": "md-5/jdk10", "path": "src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.match.processor/src/org/graalvm/compiler/core/match/processor/MatchProcessor.java", "license": "gpl-2.0", "size": 42790 }
[ "javax.lang.model.element.Element", "javax.lang.model.element.ElementKind", "javax.lang.model.element.TypeElement", "javax.lang.model.type.TypeMirror" ]
import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; import javax.lang.model.element.TypeElement; import javax.lang.model.type.TypeMirror;
import javax.lang.model.element.*; import javax.lang.model.type.*;
[ "javax.lang" ]
javax.lang;
382,698
@Nullable public WorkbookChartGridlines delete() throws ClientException { return send(HttpMethod.DELETE, null); }
WorkbookChartGridlines function() throws ClientException { return send(HttpMethod.DELETE, null); }
/** * Delete this item from the service * @return the resulting response if the service returns anything on deletion * * @throws ClientException if there was an exception during the delete operation */
Delete this item from the service
delete
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/WorkbookChartGridlinesRequest.java", "license": "mit", "size": 6403 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.WorkbookChartGridlines" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.WorkbookChartGridlines;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*;
[ "com.microsoft.graph" ]
com.microsoft.graph;
1,789,586
public static double multiple(ArrayList<Double> xArrayList){ double cal = 0; for (int i = 0; i < xArrayList.size(); i++){ cal += xArrayList.get(i); } return cal; }
static double function(ArrayList<Double> xArrayList){ double cal = 0; for (int i = 0; i < xArrayList.size(); i++){ cal += xArrayList.get(i); } return cal; }
/** * Metodo multiple * param una lista de valores (xArrayList) * @return */
Metodo multiple param una lista de valores (xArrayList)
multiple
{ "repo_name": "limavi/tallerPSP7", "path": "src/main/java/Estadistica.java", "license": "mit", "size": 8530 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
847,025
public boolean prefaceSent() { return true; } } private final class PrefaceDecoder extends BaseDecoder { private ByteBuf clientPrefaceString; private boolean prefaceSent; public PrefaceDecoder(ChannelHandlerContext ctx) { clientPrefaceString = cl...
boolean function() { return true; } } final class PrefaceDecoder extends BaseDecoder { private ByteBuf clientPrefaceString; private boolean function; public PrefaceDecoder(ChannelHandlerContext ctx) { clientPrefaceString = clientPrefaceString(encoder.connection()); sendPreface(ctx); }
/** * Determine if the HTTP/2 connection preface been sent. */
Determine if the HTTP/2 connection preface been sent
prefaceSent
{ "repo_name": "SinaTadayon/netty", "path": "codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java", "license": "apache-2.0", "size": 32565 }
[ "io.netty.buffer.ByteBuf", "io.netty.channel.ChannelHandlerContext" ]
import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext;
import io.netty.buffer.*; import io.netty.channel.*;
[ "io.netty.buffer", "io.netty.channel" ]
io.netty.buffer; io.netty.channel;
2,638,747
public static UpdateAlertDefinitionMessage create( StatAlertDefinition[] alertDefs, int actionCode) { UpdateAlertDefinitionMessage m = new UpdateAlertDefinitionMessage(); m._alertDefinitions = alertDefs; m._actionCode = actionCode; return m; } public UpdateAlertDefinitionMessage() { }
static UpdateAlertDefinitionMessage function( StatAlertDefinition[] alertDefs, int actionCode) { UpdateAlertDefinitionMessage m = new UpdateAlertDefinitionMessage(); m._alertDefinitions = alertDefs; m._actionCode = actionCode; return m; } public UpdateAlertDefinitionMessage() { }
/** * Returns a <code>FetchHostRequest</code> to be sent to the specified * recipient. * * @param alertDefs * an array of stat alert definitions to set * @param actionCode * either of ADD_ALERT_DEFINITION, UPDATE_ALERT_DEFINITION, * REMOVE_ALERT_DEFI...
Returns a <code>FetchHostRequest</code> to be sent to the specified recipient
create
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/UpdateAlertDefinitionMessage.java", "license": "apache-2.0", "size": 5314 }
[ "com.gemstone.gemfire.internal.admin.StatAlertDefinition" ]
import com.gemstone.gemfire.internal.admin.StatAlertDefinition;
import com.gemstone.gemfire.internal.admin.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
214,420
protected int compare(Number base, Number value) throws NumberFormatException { // most likely not the most beautiful solution // but quite simple and even supports Number // sub-classes which do not inherit from Comparable // BUT: requires proper toString() implementation //...
int function(Number base, Number value) throws NumberFormatException { return new BigDecimal(base.toString()).compareTo(new BigDecimal(value.toString())); }
/** * Compares two arbitrary {@link Number} instances. * * @param base the basis for the comparison. Compared against {@code value}. * @param value to which {@code base} is to be compared. * @return -1, 0, or 1 as {@code base} is numerically * less than, equal to, or greate...
Compares two arbitrary <code>Number</code> instances
compare
{ "repo_name": "pjungermann/config-validator", "path": "src/main/java/com/github/pjungermann/config/specification/constraint/AbstractNumericalConstraint.java", "license": "apache-2.0", "size": 3661 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
462,157
private boolean isMultiValueField(String mediaType, String fieldKey) { boolean result = false; Map<Integer, Map<String, List<String>>> allTenantsUnboundedFields = RxtUnboundedFieldManagerService .getInstance().getTenantsUnboundedFields(); if (allTenantsUnboundedFields.size()...
boolean function(String mediaType, String fieldKey) { boolean result = false; Map<Integer, Map<String, List<String>>> allTenantsUnboundedFields = RxtUnboundedFieldManagerService .getInstance().getTenantsUnboundedFields(); if (allTenantsUnboundedFields.size() > 0) { Map<String, List<String>> rxtDetails = allTenantsUnbou...
/** * This method is used to check whether a filed is a multi value filed or not. * * @param mediaType media type * @param fieldKey field key * @return */
This method is used to check whether a filed is a multi value filed or not
isMultiValueField
{ "repo_name": "daneshk/carbon-registry", "path": "components/registry/org.wso2.carbon.registry.indexing/src/main/java/org/wso2/carbon/registry/indexing/solr/SolrClient.java", "license": "apache-2.0", "size": 69901 }
[ "java.util.List", "java.util.Map", "org.wso2.carbon.context.PrivilegedCarbonContext", "org.wso2.carbon.registry.indexing.service.RxtUnboundedFieldManagerService" ]
import java.util.List; import java.util.Map; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.registry.indexing.service.RxtUnboundedFieldManagerService;
import java.util.*; import org.wso2.carbon.context.*; import org.wso2.carbon.registry.indexing.service.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
1,806,817
private void handleItemOption3(Player player, Packet packet) { int interfaceId = packet.getLEShort() & 0xFFFF; int id = packet.getShortA() & 0xFFFF; int slot = packet.getShortA() & 0xFFFF; switch(interfaceId) { case Bank.PLAYER_INVENTORY_INTERFACE: if(slot >= 0 && slot < Inventory.SIZE) { ...
void function(Player player, Packet packet) { int interfaceId = packet.getLEShort() & 0xFFFF; int id = packet.getShortA() & 0xFFFF; int slot = packet.getShortA() & 0xFFFF; switch(interfaceId) { case Bank.PLAYER_INVENTORY_INTERFACE: if(slot >= 0 && slot < Inventory.SIZE) { Bank.deposit(player, slot, id, 10); } break; ca...
/** * Handles item option 3. * @param player The player. * @param packet The packet. */
Handles item option 3
handleItemOption3
{ "repo_name": "nikkiii/hyperion", "path": "src/org/hyperion/rs2/packet/ItemOptionPacketHandler.java", "license": "mit", "size": 4776 }
[ "org.hyperion.rs2.model.Player", "org.hyperion.rs2.model.container.Bank", "org.hyperion.rs2.model.container.Inventory", "org.hyperion.rs2.net.Packet" ]
import org.hyperion.rs2.model.Player; import org.hyperion.rs2.model.container.Bank; import org.hyperion.rs2.model.container.Inventory; import org.hyperion.rs2.net.Packet;
import org.hyperion.rs2.model.*; import org.hyperion.rs2.model.container.*; import org.hyperion.rs2.net.*;
[ "org.hyperion.rs2" ]
org.hyperion.rs2;
991,530
public static StyledText createXmlViewer( Composite parent, final ColorCacheManager colorManager, boolean forceScrolling ) { // Each widget has its own analyzer final XmlRegionAnalyzer xmlRegionAnalyzer = new XmlRegionAnalyzer(); int style = SWT.BORDER | SWT.MULTI; if( forceScrolling ) ...
static StyledText function( Composite parent, final ColorCacheManager colorManager, boolean forceScrolling ) { final XmlRegionAnalyzer xmlRegionAnalyzer = new XmlRegionAnalyzer(); int style = SWT.BORDER SWT.MULTI; if( forceScrolling ) style = SWT.V_SCROLL SWT.H_SCROLL; else style = PreferencesManager.INSTANCE.wrapInste...
/** * Creates a XML viewer. * @param parent the parent * @param colorManager a color manager * @param forceScrolling true to force scrolling, false to rely on preferences * @return a configured instance of styled text */
Creates a XML viewer
createXmlViewer
{ "repo_name": "vincent-zurczak/petals-se-client", "path": "src/swt/java/org/ow2/petals/engine/client/swt/SwtUtils.java", "license": "lgpl-2.1", "size": 7049 }
[ "org.eclipse.swt.custom.StyledText", "org.eclipse.swt.widgets.Composite", "org.ow2.petals.engine.client.misc.PreferencesManager", "org.ow2.petals.engine.client.swt.syntaxhighlighting.ColorCacheManager", "org.ow2.petals.engine.client.swt.syntaxhighlighting.XmlRegionAnalyzer" ]
import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.widgets.Composite; import org.ow2.petals.engine.client.misc.PreferencesManager; import org.ow2.petals.engine.client.swt.syntaxhighlighting.ColorCacheManager; import org.ow2.petals.engine.client.swt.syntaxhighlighting.XmlRegionAnalyzer;
import org.eclipse.swt.custom.*; import org.eclipse.swt.widgets.*; import org.ow2.petals.engine.client.misc.*; import org.ow2.petals.engine.client.swt.syntaxhighlighting.*;
[ "org.eclipse.swt", "org.ow2.petals" ]
org.eclipse.swt; org.ow2.petals;
2,282,840
@Nullable public Artifact getParent() { return null; }
@Nullable Artifact function() { return null; }
/** * Returns the parent Artifact containing this Artifact. Artifacts without parents shall * return null. */
Returns the parent Artifact containing this Artifact. Artifacts without parents shall return null
getParent
{ "repo_name": "mrdomino/bazel", "path": "src/main/java/com/google/devtools/build/lib/actions/Artifact.java", "license": "apache-2.0", "size": 34303 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,444,918
private JButton getSearch() { if (search == null) { search = new JButton(); search.setText("Search");
JButton function() { if (search == null) { search = new JButton(); search.setText(STR);
/** * This method initializes search * * @return javax.swing.JButton */
This method initializes search
getSearch
{ "repo_name": "NCIP/cagrid", "path": "cagrid/Software/core/caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/dorian/federation/FederationAuditPanel.java", "license": "bsd-3-clause", "size": 28659 }
[ "javax.swing.JButton" ]
import javax.swing.JButton;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,168,457
void configure(EntityBundle bundle, boolean isEditable);
void configure(EntityBundle bundle, boolean isEditable);
/** * Configure the view with the table data. * * @param tableId * @param tableBundel * @param isEditable */
Configure the view with the table data
configure
{ "repo_name": "jay-hodgson/SynapseWebClient", "path": "src/main/java/org/sagebionetworks/web/client/widget/table/v2/TableEntityWidgetView.java", "license": "apache-2.0", "size": 2999 }
[ "org.sagebionetworks.repo.model.entitybundle.v2.EntityBundle" ]
import org.sagebionetworks.repo.model.entitybundle.v2.EntityBundle;
import org.sagebionetworks.repo.model.entitybundle.v2.*;
[ "org.sagebionetworks.repo" ]
org.sagebionetworks.repo;
765,070
IssueStore store = new IssueStore(mContext); Repo repo = InfoUtils.createRepoFromData("owner", "name"); assertNull(store.getIssue(repo, 1)); Issue issue = new Issue(); issue.repository = repo; issue.number = 1; issue.body = "body"; assertSame(issue, store.addIss...
IssueStore store = new IssueStore(mContext); Repo repo = InfoUtils.createRepoFromData("owner", "name"); assertNull(store.getIssue(repo, 1)); Issue issue = new Issue(); issue.repository = repo; issue.number = 1; issue.body = "body"; assertSame(issue, store.addIssue(issue)); assertSame(issue, store.getIssue(repo, 1)); Is...
/** * Verify issue is updated when re-added */
Verify issue is updated when re-added
testReuseIssue
{ "repo_name": "zhangtianqiu/githubandroid", "path": "app/src/androidTest/java/com/github/pockethub/tests/issue/IssueStoreTest.java", "license": "apache-2.0", "size": 1751 }
[ "com.alorma.github.sdk.bean.dto.response.Issue", "com.alorma.github.sdk.bean.dto.response.Repo", "com.github.pockethub.core.issue.IssueStore", "com.github.pockethub.util.InfoUtils" ]
import com.alorma.github.sdk.bean.dto.response.Issue; import com.alorma.github.sdk.bean.dto.response.Repo; import com.github.pockethub.core.issue.IssueStore; import com.github.pockethub.util.InfoUtils;
import com.alorma.github.sdk.bean.dto.response.*; import com.github.pockethub.core.issue.*; import com.github.pockethub.util.*;
[ "com.alorma.github", "com.github.pockethub" ]
com.alorma.github; com.github.pockethub;
587,140
public static String asString(HttpResponse response) throws IOException { if (response.getEntity() == null) { return ""; } final InputStream in = response.getEntity().getContent(); try { ByteArrayOutputStream out = new ByteArrayOutputStream(); byt...
static String function(HttpResponse response) throws IOException { if (response.getEntity() == null) { return STRUTF-8"); } finally { in.close(); } }
/** * Utility method for converting HttpResponse to String * * @param HttpResponse response * @return String representation of response * @throws IOException */
Utility method for converting HttpResponse to String
asString
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.jaxrs.2.0_fat/fat/src/com/ibm/ws/jaxrs20/fat/TestUtils.java", "license": "epl-1.0", "size": 6363 }
[ "java.io.IOException", "org.apache.http.HttpResponse" ]
import java.io.IOException; import org.apache.http.HttpResponse;
import java.io.*; import org.apache.http.*;
[ "java.io", "org.apache.http" ]
java.io; org.apache.http;
2,043,049
public void setUserData(){ // create Bundle Bundle data = new Bundle(); data.putString("name", "Firstname Lastname"); data.putString("username", "nickname"); data.putString("email", "test@test.com"); data.putString("organization", "Tester"); data.putString("ph...
void function(){ Bundle data = new Bundle(); data.putString("name", STR); data.putString(STR, STR); data.putString("email", STR); data.putString(STR, STR); data.putString("phone", STR); data.putString(STR, "M"); data.putInt("byear", 1987); data.putString(STR, STR); data.putString("city", "Paris"); data.putString(STR, "...
/** * Set User Data for Countly */
Set User Data for Countly
setUserData
{ "repo_name": "ffournier/Analytics", "path": "src/main/java/com/android2ee/tutorial/analytics/CountlyActivity.java", "license": "apache-2.0", "size": 3289 }
[ "android.os.Bundle", "ly.count.android.api.Countly" ]
import android.os.Bundle; import ly.count.android.api.Countly;
import android.os.*; import ly.count.android.api.*;
[ "android.os", "ly.count.android" ]
android.os; ly.count.android;
1,219,016
PagedIterable<Volume> list(String resourceGroupName, String accountName, String poolName);
PagedIterable<Volume> list(String resourceGroupName, String accountName, String poolName);
/** * List all volumes within the capacity pool. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account. * @param poolName The name of the capacity pool. * @throws IllegalArgumentException thrown if parameters fail the validation. ...
List all volumes within the capacity pool
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Volumes.java", "license": "mit", "size": 23047 }
[ "com.azure.core.http.rest.PagedIterable" ]
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
2,535,861
protected Map referenceData(PortletRequest request, Object command, Errors errors, int page) throws Exception { return referenceData(request, page); }
Map function(PortletRequest request, Object command, Errors errors, int page) throws Exception { return referenceData(request, page); }
/** * Create a reference data map for the given request, consisting of * bean name/bean instance pairs as expected by ModelAndView. * <p>The default implementation delegates to {@link #referenceData(PortletRequest, int)}. * Subclasses can override this to set reference data used in the view. * @param request ...
Create a reference data map for the given request, consisting of bean name/bean instance pairs as expected by ModelAndView. The default implementation delegates to <code>#referenceData(PortletRequest, int)</code>. Subclasses can override this to set reference data used in the view
referenceData
{ "repo_name": "kingtang/spring-learn", "path": "spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java", "license": "gpl-3.0", "size": 37573 }
[ "java.util.Map", "javax.portlet.PortletRequest", "org.springframework.validation.Errors" ]
import java.util.Map; import javax.portlet.PortletRequest; import org.springframework.validation.Errors;
import java.util.*; import javax.portlet.*; import org.springframework.validation.*;
[ "java.util", "javax.portlet", "org.springframework.validation" ]
java.util; javax.portlet; org.springframework.validation;
2,262,500
protected FlowElement getCurrentFlowElement(final ExecutionEntity execution) { if (execution.getCurrentFlowElement() != null) { return execution.getCurrentFlowElement(); } else if (execution.getCurrentActivityId() != null) { String processDefinitionId = execution.getProcessDefini...
FlowElement function(final ExecutionEntity execution) { if (execution.getCurrentFlowElement() != null) { return execution.getCurrentFlowElement(); } else if (execution.getCurrentActivityId() != null) { String processDefinitionId = execution.getProcessDefinitionId(); org.flowable.bpmn.model.Process process = ProcessDefi...
/** * Helper method to match the activityId of an execution with a FlowElement of the process definition referenced by the execution. */
Helper method to match the activityId of an execution with a FlowElement of the process definition referenced by the execution
getCurrentFlowElement
{ "repo_name": "zwets/flowable-engine", "path": "modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/AbstractOperation.java", "license": "apache-2.0", "size": 5286 }
[ "org.flowable.bpmn.model.FlowElement", "org.flowable.engine.impl.persistence.entity.ExecutionEntity", "org.flowable.engine.impl.util.ProcessDefinitionUtil" ]
import org.flowable.bpmn.model.FlowElement; import org.flowable.engine.impl.persistence.entity.ExecutionEntity; import org.flowable.engine.impl.util.ProcessDefinitionUtil;
import org.flowable.bpmn.model.*; import org.flowable.engine.impl.persistence.entity.*; import org.flowable.engine.impl.util.*;
[ "org.flowable.bpmn", "org.flowable.engine" ]
org.flowable.bpmn; org.flowable.engine;
1,206,057
public TypeDescriptor<V> getTypeDescriptor() { return new TypeDescriptor<V>(getClass()) {}; } ///////////////////////////////////////////////////////////////////////////// // Internal details below here. static final Random RANDOM = new Random(0); private static final Multiset<String> staticInits = Ha...
TypeDescriptor<V> function() { return new TypeDescriptor<V>(getClass()) {}; } static final Random RANDOM = new Random(0); private static final Multiset<String> staticInits = HashMultiset.create(); final String id; final boolean generated;
/** * Returns a {@code TypeDescriptor} capturing what is known statically * about the type of this {@code TupleTag} instance's most-derived * class. * * <p>This is useful for a {@code TupleTag} constructed as an * instance of an anonymous subclass with a trailing {@code {}}, * e.g., {@code new Tupl...
Returns a TypeDescriptor capturing what is known statically about the type of this TupleTag instance's most-derived class. This is useful for a TupleTag constructed as an instance of an anonymous subclass with a trailing {}, e.g., new TupleTag(){}
getTypeDescriptor
{ "repo_name": "tyagihas/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/values/TupleTag.java", "license": "apache-2.0", "size": 6699 }
[ "com.google.common.collect.HashMultiset", "com.google.common.collect.Multiset", "java.util.Random" ]
import com.google.common.collect.HashMultiset; import com.google.common.collect.Multiset; import java.util.Random;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
103,439
public static String generateSecret() { byte[] buffer = new byte[(NUM_SCRATCH_CODES * SCRATCH_CODE_SIZE) + SECRET_SIZE]; new SecureRandom().nextBytes(buffer); byte[] secret = Arrays.copyOf(buffer, SECRET_SIZE); return new String(new Base32().encode(secret)); }
static String function() { byte[] buffer = new byte[(NUM_SCRATCH_CODES * SCRATCH_CODE_SIZE) + SECRET_SIZE]; new SecureRandom().nextBytes(buffer); byte[] secret = Arrays.copyOf(buffer, SECRET_SIZE); return new String(new Base32().encode(secret)); }
/** * generates OPT secret * * @return String shared secret */
generates OPT secret
generateSecret
{ "repo_name": "skavanagh/EC2Box", "path": "src/main/java/io/bastillion/manage/util/OTPUtil.java", "license": "agpl-3.0", "size": 4490 }
[ "java.security.SecureRandom", "java.util.Arrays", "org.apache.commons.codec.binary.Base32" ]
import java.security.SecureRandom; import java.util.Arrays; import org.apache.commons.codec.binary.Base32;
import java.security.*; import java.util.*; import org.apache.commons.codec.binary.*;
[ "java.security", "java.util", "org.apache.commons" ]
java.security; java.util; org.apache.commons;
2,266,048
String statusTextFromResponseCode(int responseCode) { Response.Status status = Response.Status.fromStatusCode(responseCode); return status != null ? status.toString() : responseCategoryFromCode(responseCode); }
String statusTextFromResponseCode(int responseCode) { Response.Status status = Response.Status.fromStatusCode(responseCode); return status != null ? status.toString() : responseCategoryFromCode(responseCode); }
/** * Convert the given HTTP response code to its corresponding status text or * response category. This is useful to avoid creating NPEs if this producer * is presented with an HTTP response code that the JAX-RS API doesn't know. * * @param responseCode the HTTP response code to be converted t...
Convert the given HTTP response code to its corresponding status text or response category. This is useful to avoid creating NPEs if this producer is presented with an HTTP response code that the JAX-RS API doesn't know
statusTextFromResponseCode
{ "repo_name": "jonmcewen/camel", "path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java", "license": "apache-2.0", "size": 38719 }
[ "javax.ws.rs.core.Response" ]
import javax.ws.rs.core.Response;
import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
2,587,963
@ServiceMethod(returns = ReturnType.SINGLE) Mono<VirtualMachineInstanceViewInner> instanceViewAsync(String resourceGroupName, String vmName);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<VirtualMachineInstanceViewInner> instanceViewAsync(String resourceGroupName, String vmName);
/** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.man...
Retrieves information about the run-time state of a virtual machine
instanceViewAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java", "license": "mit", "size": 119505 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.compute.fluent.models.VirtualMachineInstanceViewInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineInstanceViewInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,953,827
public void setProperties(Properties properties) { this.properties.putAll(properties); }
void function(Properties properties) { this.properties.putAll(properties); }
/** * Set the Kafka producer properties. * * @param properties Producer properties */
Set the Kafka producer properties
setProperties
{ "repo_name": "yogidevendra/incubator-apex-malhar", "path": "kafka/src/main/java/org/apache/apex/malhar/kafka/AbstractKafkaOutputOperator.java", "license": "apache-2.0", "size": 2842 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,911,950
public static Animation inFromTopAnimation(long duration, Interpolator interpolator) { Animation infromtop = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f ); infromtop.setDuration(...
static Animation function(long duration, Interpolator interpolator) { Animation infromtop = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f ); infromtop.setDuration(duration); infromtop.setInterpolato...
/** * Slide animations to enter a view from top. * * @param duration the animation duration in milliseconds * @param interpolator the interpolator to use (pass {@code null} to use the {@link AccelerateInterpolator} interpolator) * @return a slide transition animation */
Slide animations to enter a view from top
inFromTopAnimation
{ "repo_name": "javocsoft/JavocsoftToolboxAS", "path": "toolbox/src/main/java/es/javocsoft/android/lib/toolbox/animation/AnimationFactory.java", "license": "gpl-3.0", "size": 28360 }
[ "android.view.animation.AccelerateInterpolator", "android.view.animation.Animation", "android.view.animation.Interpolator", "android.view.animation.TranslateAnimation" ]
import android.view.animation.AccelerateInterpolator; import android.view.animation.Animation; import android.view.animation.Interpolator; import android.view.animation.TranslateAnimation;
import android.view.animation.*;
[ "android.view" ]
android.view;
2,778,216
public void testFromXContent() throws IOException { for (int runs = 0; runs < NUMBER_OF_TESTBUILDERS; runs++) { RescorerBuilder<?> rescoreBuilder = randomRescoreBuilder(); XContentBuilder builder = XContentFactory.contentBuilder(randomFrom(XContentType.values())); if (ran...
void function() throws IOException { for (int runs = 0; runs < NUMBER_OF_TESTBUILDERS; runs++) { RescorerBuilder<?> rescoreBuilder = randomRescoreBuilder(); XContentBuilder builder = XContentFactory.contentBuilder(randomFrom(XContentType.values())); if (randomBoolean()) { builder.prettyPrint(); } rescoreBuilder.toXCont...
/** * creates random rescorer, renders it to xContent and back to new instance that should be equal to original */
creates random rescorer, renders it to xContent and back to new instance that should be equal to original
testFromXContent
{ "repo_name": "masaruh/elasticsearch", "path": "core/src/test/java/org/elasticsearch/search/rescore/QueryRescorerBuilderTests.java", "license": "apache-2.0", "size": 14044 }
[ "java.io.IOException", "org.elasticsearch.common.xcontent.ToXContent", "org.elasticsearch.common.xcontent.XContentBuilder", "org.elasticsearch.common.xcontent.XContentFactory", "org.elasticsearch.common.xcontent.XContentParser", "org.elasticsearch.common.xcontent.XContentType" ]
import java.io.IOException; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType;
import java.io.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
1,006,319
public static String extractBodyForLogging(Message message, String prepend, boolean allowStreams, boolean allowFiles) { // default to 1000 chars int maxChars = 1000; if (message.getExchange() != null) { String globalOption = message.getExchange().getContext().getGlobalOption(Exc...
static String function(Message message, String prepend, boolean allowStreams, boolean allowFiles) { int maxChars = 1000; if (message.getExchange() != null) { String globalOption = message.getExchange().getContext().getGlobalOption(Exchange.LOG_DEBUG_BODY_MAX_CHARS); if (globalOption != null) { maxChars = message.getExc...
/** * Extracts the body for logging purpose. * <p/> * Will clip the body if its too big for logging. * * @see org.apache.camel.Exchange#LOG_DEBUG_BODY_STREAMS * @see org.apache.camel.Exchange#LOG_DEBUG_BODY_MAX_CHARS * @param message the message * @param prepend a message to prep...
Extracts the body for logging purpose. Will clip the body if its too big for logging
extractBodyForLogging
{ "repo_name": "objectiser/camel", "path": "core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java", "license": "apache-2.0", "size": 24151 }
[ "org.apache.camel.Exchange", "org.apache.camel.Message" ]
import org.apache.camel.Exchange; import org.apache.camel.Message;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
659,368
public static int[][] convertMonochromeImageToArray(BufferedImage monochromeImage) { if (monochromeImage == null || monochromeImage.getWidth() == 0 || monochromeImage.getHeight() == 0) return null; // This returns bytes of data starting from the top left of the bitmap // image and g...
static int[][] function(BufferedImage monochromeImage) { if (monochromeImage == null monochromeImage.getWidth() == 0 monochromeImage.getHeight() == 0) return null; final byte[] pixels = ((DataBufferByte) monochromeImage.getRaster() .getDataBuffer()).getData(); final int width = monochromeImage.getWidth(); final int hei...
/** * This returns a true bitmap where each element in the grid is either a 0 * or a 1. A 1 means the pixel is white and a 0 means the pixel is black. * * If the incoming image doesn't have any pixels in it then this method * returns null; * * @param image * @return */
This returns a true bitmap where each element in the grid is either a 0 or a 1. A 1 means the pixel is white and a 0 means the pixel is black. If the incoming image doesn't have any pixels in it then this method returns null
convertMonochromeImageToArray
{ "repo_name": "mars-sim/mars-sim", "path": "mars-sim-mapdata/src/main/java/org/mars_sim/mapdata/PerformanceTest.java", "license": "gpl-3.0", "size": 14750 }
[ "java.awt.image.BufferedImage", "java.awt.image.DataBufferByte" ]
import java.awt.image.BufferedImage; import java.awt.image.DataBufferByte;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
2,110,497
protected void createShell() { mShell = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL); mShell.setMinimumSize(new Point(450, 300)); mShell.setSize(450, 300); if (getText() != null) { mShell.setText(getText()); }
void function() { mShell = new Shell(getParent(), SWT.DIALOG_TRIM SWT.RESIZE SWT.APPLICATION_MODAL); mShell.setMinimumSize(new Point(450, 300)); mShell.setSize(450, 300); if (getText() != null) { mShell.setText(getText()); }
/** * Creates the shell for this dialog. * The default shell has a size of 450x300, which is also its minimum size. * You might want to override these values. * <p/> * Called before {@link #createContents()}. */
Creates the shell for this dialog. The default shell has a size of 450x300, which is also its minimum size. You might want to override these values. Called before <code>#createContents()</code>
createShell
{ "repo_name": "rex-xxx/mt6572_x201", "path": "sdk/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/ui/SwtBaseDialog.java", "license": "gpl-2.0", "size": 7692 }
[ "org.eclipse.swt.graphics.Point", "org.eclipse.swt.widgets.Shell" ]
import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,452,732
public Drawable getTrackDrawable() { return mTrackDrawable; }
Drawable function() { return mTrackDrawable; }
/** * Get the drawable used for the track that the switch slides within. * * @return Track drawable */
Get the drawable used for the track that the switch slides within
getTrackDrawable
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/support/v7/appcompat/src/android/support/v7/widget/SwitchCompat.java", "license": "gpl-3.0", "size": 36347 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
2,108,053
public static String getNiceName(Sone sone) { Profile profile = sone.getProfile(); String firstName = profile.getFirstName(); String middleName = profile.getMiddleName(); String lastName = profile.getLastName(); if (firstName == null) { if (lastName == null) { return String.valueOf(sone.getName()); ...
static String function(Sone sone) { Profile profile = sone.getProfile(); String firstName = profile.getFirstName(); String middleName = profile.getMiddleName(); String lastName = profile.getLastName(); if (firstName == null) { if (lastName == null) { return String.valueOf(sone.getName()); } return lastName; } return fi...
/** * Returns the nice name of the given Sone. * * @param sone * The Sone to get the nice name for * @return The nice name of the Sone */
Returns the nice name of the given Sone
getNiceName
{ "repo_name": "Bombe/Sone", "path": "src/main/java/net/pterodactylus/sone/template/SoneAccessor.java", "license": "gpl-3.0", "size": 5167 }
[ "net.pterodactylus.sone.data.Profile", "net.pterodactylus.sone.data.Sone" ]
import net.pterodactylus.sone.data.Profile; import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.data.*;
[ "net.pterodactylus.sone" ]
net.pterodactylus.sone;
1,629,116
public void setGraph( Forest<SEMOSSVertex, SEMOSSEdge> forest ) { treeRings.setForest( forest ); }
void function( Forest<SEMOSSVertex, SEMOSSEdge> forest ) { treeRings.setForest( forest ); }
/** * Method setGraph. Sets the graph that the listener will access. * * @param forest Forest */
Method setGraph. Sets the graph that the listener will access
setGraph
{ "repo_name": "Ostrich-Emulators/semtool", "path": "gui/src/main/java/com/ostrichemulators/semtool/ui/components/playsheets/graphsupport/RingsButtonListener.java", "license": "gpl-3.0", "size": 4166 }
[ "com.ostrichemulators.semtool.om.SEMOSSEdge", "com.ostrichemulators.semtool.om.SEMOSSVertex", "edu.uci.ics.jung.graph.Forest" ]
import com.ostrichemulators.semtool.om.SEMOSSEdge; import com.ostrichemulators.semtool.om.SEMOSSVertex; import edu.uci.ics.jung.graph.Forest;
import com.ostrichemulators.semtool.om.*; import edu.uci.ics.jung.graph.*;
[ "com.ostrichemulators.semtool", "edu.uci.ics" ]
com.ostrichemulators.semtool; edu.uci.ics;
1,513,743
@Generated @IsOptional @Selector("matchmakerViewController:hostedPlayerDidAccept:") default void matchmakerViewControllerHostedPlayerDidAccept(GKMatchmakerViewController viewController, GKPlayer player) { throw new java.lang.UnsupportedOperationException(); }
@Selector(STR) default void matchmakerViewControllerHostedPlayerDidAccept(GKMatchmakerViewController viewController, GKPlayer player) { throw new java.lang.UnsupportedOperationException(); }
/** * An invited player has accepted a hosted invite. Apps should connect through the hosting server and then update the player's connected state (using setConnected:forHostedPlayer:) */
An invited player has accepted a hosted invite. Apps should connect through the hosting server and then update the player's connected state (using setConnected:forHostedPlayer:)
matchmakerViewControllerHostedPlayerDidAccept
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/gamekit/protocol/GKMatchmakerViewControllerDelegate.java", "license": "apache-2.0", "size": 3752 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
723,121
protected void initialize() throws AspException { super.initialize(); try { if (!request.getMethod().equalsIgnoreCase("POST")) { return; } ...
void function() throws AspException { super.initialize(); try { if (!request.getMethod().equalsIgnoreCase("POST")) { return; } if (!request.getContentType(). equalsIgnoreCase(STR)) { return; } int len = request.getContentLength(); Reader in; Map htValues; try { in = request.getReader(); htValues = ParseQueryString.pars...
/** * This internal function initialized the form contents. */
This internal function initialized the form contents
initialize
{ "repo_name": "ronoaldo/arrowheadasp", "path": "src/com/tripi/asp/Request.java", "license": "gpl-2.0", "size": 28048 }
[ "com.tripi.asp.util.ParseQueryString", "com.tripi.asp.util.Tools", "java.io.IOException", "java.io.Reader", "java.util.Map" ]
import com.tripi.asp.util.ParseQueryString; import com.tripi.asp.util.Tools; import java.io.IOException; import java.io.Reader; import java.util.Map;
import com.tripi.asp.util.*; import java.io.*; import java.util.*;
[ "com.tripi.asp", "java.io", "java.util" ]
com.tripi.asp; java.io; java.util;
1,550,213
public static long copyLarge(InputStream input, OutputStream output) throws IOException { return copyLarge(input, output, new byte[DEFAULT_BUFFER_SIZE]); }
static long function(InputStream input, OutputStream output) throws IOException { return copyLarge(input, output, new byte[DEFAULT_BUFFER_SIZE]); }
/** * Copy bytes from a large (over 2GB) <code>InputStream</code> to an * <code>OutputStream</code>. * <p> * This method buffers the input internally, so there is no need to use a * <code>BufferedInputStream</code>. * <p> * The buffer size is given by {@link #DEFAULT_BUFFER_SIZE}. ...
Copy bytes from a large (over 2GB) <code>InputStream</code> to an <code>OutputStream</code>. This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code>. The buffer size is given by <code>#DEFAULT_BUFFER_SIZE</code>
copyLarge
{ "repo_name": "wspeirs/sop4j-base", "path": "src/main/java/com/sop4j/base/apache/io/IOUtils.java", "license": "apache-2.0", "size": 97933 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
186,639
@JdkConstants.InputEventMask public int getModifiers() { return myModifiers; }
@JdkConstants.InputEventMask int function() { return myModifiers; }
/** * Returns the modifier keys held down during this action event. * @return the modifier keys. */
Returns the modifier keys held down during this action event
getModifiers
{ "repo_name": "jk1/intellij-community", "path": "platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnActionEvent.java", "license": "apache-2.0", "size": 9538 }
[ "org.intellij.lang.annotations.JdkConstants" ]
import org.intellij.lang.annotations.JdkConstants;
import org.intellij.lang.annotations.*;
[ "org.intellij.lang" ]
org.intellij.lang;
731,836
private void testScriptFile(String scriptText, List<String> argList, String expectedRegex, boolean shouldMatch) throws Throwable { testScriptFile(scriptText, argList, OutStream.OUT, Collections.singletonList(new Tuple<>(expectedRegex, shouldMatch)) ); }
void function(String scriptText, List<String> argList, String expectedRegex, boolean shouldMatch) throws Throwable { testScriptFile(scriptText, argList, OutStream.OUT, Collections.singletonList(new Tuple<>(expectedRegex, shouldMatch)) ); }
/** * Attempt to execute a simple script file with the -f and -i option to * BeeLine to test for presence of an expected pattern in the output (stdout * or stderr), fail if not found. Print PASSED or FAILED * * @param expectedRegex * Text to look for in command output (stdout) * @param sho...
Attempt to execute a simple script file with the -f and -i option to BeeLine to test for presence of an expected pattern in the output (stdout or stderr), fail if not found. Print PASSED or FAILED
testScriptFile
{ "repo_name": "vineetgarg02/hive", "path": "itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java", "license": "apache-2.0", "size": 46744 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
982,503
public void enterTime_literal(SQLParser.Time_literalContext ctx) { }
public void enterTime_literal(SQLParser.Time_literalContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitDatetime_literal
{ "repo_name": "HEIG-GAPS/slasher", "path": "slasher.corrector/src/main/java/ch/gaps/slasher/corrector/SQLParserBaseListener.java", "license": "mit", "size": 73849 }
[ "ch.gaps.slasher.corrector.SQLParser" ]
import ch.gaps.slasher.corrector.SQLParser;
import ch.gaps.slasher.corrector.*;
[ "ch.gaps.slasher" ]
ch.gaps.slasher;
761,066
private String decodePercent(String str) throws InterruptedException { try { StringBuffer sb = new StringBuffer(); for (int i = 0; i < str.length(); i++) { char c = str.charAt(i); switch (c) { case '+': sb.append(' '); break; ...
String function(String str) throws InterruptedException { try { StringBuffer sb = new StringBuffer(); for (int i = 0; i < str.length(); i++) { char c = str.charAt(i); switch (c) { case '+': sb.append(' '); break; case '%': sb.append((char) Integer.parseInt( str.substring(i + 1, i + 3), 16)); i += 2; break; default: sb....
/** * Decodes the percent encoding scheme. <br/> * For example: "an+example%20string" -> "an example string" */
Decodes the percent encoding scheme. For example: "an+example%20string" -> "an example string"
decodePercent
{ "repo_name": "Boosted300blk/TextSecure", "path": "src/org/thoughtcrime/securesms/audio/AudioAttachmentServer.java", "license": "gpl-3.0", "size": 12010 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,067,141
// IMPL NOTE based on MLPGroupTrainerTest#testXOR System.out.println(">>> Distributed multilayer perceptron example started."); // Start ignite grid. try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) { System.out.println(">>> Ignite grid started."); ...
System.out.println(STR); try (Ignite ignite = Ignition.start(STR)) { System.out.println(STR); CacheConfiguration<Integer, LabeledVector<double[]>> trainingSetCfg = new CacheConfiguration<>(); trainingSetCfg.setName(STR); trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10)); IgniteCache<Integer, Labeled...
/** * Executes example. * * @param args Command line arguments, none required. */
Executes example
main
{ "repo_name": "samaitra/ignite", "path": "examples/src/main/java/org/apache/ignite/examples/ml/nn/MLPTrainerExample.java", "license": "apache-2.0", "size": 6434 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.IgniteCache", "org.apache.ignite.Ignition", "org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction", "org.apache.ignite.configuration.CacheConfiguration", "org.apache.ignite.ml.dataset.feature.extractor.impl.LabeledDummyVectorizer", "org.ap...
import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.Ignition; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.ml.dataset.feature.extractor.impl.LabeledDummyVecto...
import org.apache.ignite.*; import org.apache.ignite.cache.affinity.rendezvous.*; import org.apache.ignite.configuration.*; import org.apache.ignite.ml.dataset.feature.extractor.impl.*; import org.apache.ignite.ml.math.primitives.matrix.*; import org.apache.ignite.ml.math.primitives.matrix.impl.*; import org.apache.ign...
[ "org.apache.ignite" ]
org.apache.ignite;
217,253
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Map<String, Object>>> createRefOauth2PermissionGrantsWithResponseAsync( String servicePrincipalId, Map<String, Object> body);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Map<String, Object>>> createRefOauth2PermissionGrantsWithResponseAsync( String servicePrincipalId, Map<String, Object> body);
/** * Create new navigation property ref to oauth2PermissionGrants for servicePrincipals. * * @param servicePrincipalId key: id of servicePrincipal. * @param body New navigation property ref value. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.a...
Create new navigation property ref to oauth2PermissionGrants for servicePrincipals
createRefOauth2PermissionGrantsWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java", "license": "mit", "size": 228379 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "java.util.Map" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import java.util.Map;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import java.util.*;
[ "com.azure.core", "java.util" ]
com.azure.core; java.util;
107,252
@WebMethod(action = "newProject") void newProject( @WebParam(name = "poid", partName = "newProject.poid") Long poid) throws UserException, ServerException;
@WebMethod(action = STR) void newProject( @WebParam(name = "poid", partName = STR) Long poid) throws UserException, ServerException;
/** * Called when a new project has been added * * @param poid ProjectID * @throws UserException * @throws ServerException */
Called when a new project has been added
newProject
{ "repo_name": "opensourceBIM/BIMserver", "path": "PluginBase/src/org/bimserver/shared/interfaces/NotificationInterface.java", "license": "agpl-3.0", "size": 6727 }
[ "javax.jws.WebMethod", "javax.jws.WebParam", "org.bimserver.shared.exceptions.ServerException", "org.bimserver.shared.exceptions.UserException" ]
import javax.jws.WebMethod; import javax.jws.WebParam; import org.bimserver.shared.exceptions.ServerException; import org.bimserver.shared.exceptions.UserException;
import javax.jws.*; import org.bimserver.shared.exceptions.*;
[ "javax.jws", "org.bimserver.shared" ]
javax.jws; org.bimserver.shared;
1,601,900