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 LeftTupleSinkNode getPreviousLeftTupleSinkNode() { return this.previousTupleSinkNode; }
LeftTupleSinkNode function() { return this.previousTupleSinkNode; }
/** * Returns the previous node * @return * The previous TupleSinkNode */
Returns the previous node
getPreviousLeftTupleSinkNode
{ "repo_name": "mdproctor/drools", "path": "drools-compiler/src/test/java/org/drools/compiler/reteoo/MockLeftTupleSink.java", "license": "apache-2.0", "size": 7211 }
[ "org.drools.core.reteoo.LeftTupleSinkNode" ]
import org.drools.core.reteoo.LeftTupleSinkNode;
import org.drools.core.reteoo.*;
[ "org.drools.core" ]
org.drools.core;
161,958
public String toString(Envelope e) { return new StringBuffer() .append("[") .append(e.getMinX()) .append(",") .append(e.getMinY()) .append(",") .append(e.getMaxX()) .append(",") .a...
String function(Envelope e) { return new StringBuffer() .append("[") .append(e.getMinX()) .append(",") .append(e.getMinY()) .append(",") .append(e.getMaxX()) .append(",") .append(e.getMaxY()) .append("]") .toString(); }
/** * Writes an Envelope instance as GeoJSON returning the result as a string. * * @param e The envelope * @return The envelope encoded as GeoJSON */
Writes an Envelope instance as GeoJSON returning the result as a string
toString
{ "repo_name": "geotools/geotools", "path": "modules/unsupported/geojson/src/main/java/org/geotools/geojson/geom/GeometryJSON.java", "license": "lgpl-2.1", "size": 24452 }
[ "org.locationtech.jts.geom.Envelope" ]
import org.locationtech.jts.geom.Envelope;
import org.locationtech.jts.geom.*;
[ "org.locationtech.jts" ]
org.locationtech.jts;
1,906,302
public int timesAssigned(TopicPartition partition) { return partitions.computeIfAbsent(partition, PartitionHistory::new).timesAssigned(); }
int function(TopicPartition partition) { return partitions.computeIfAbsent(partition, PartitionHistory::new).timesAssigned(); }
/** * Returns the number of times the partition has been assigned to this (sink) task. * @param partition the partition * @return the number of times it has been assigned; may be 0 if never assigned */
Returns the number of times the partition has been assigned to this (sink) task
timesAssigned
{ "repo_name": "TiVo/kafka", "path": "connect/runtime/src/test/java/org/apache/kafka/connect/integration/TaskHandle.java", "license": "apache-2.0", "size": 13294 }
[ "org.apache.kafka.common.TopicPartition" ]
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.*;
[ "org.apache.kafka" ]
org.apache.kafka;
330,302
@ServiceMethod(returns = ReturnType.SINGLE) String startPacketCapture(String resourceGroupName, String virtualNetworkGatewayName, String filterData);
@ServiceMethod(returns = ReturnType.SINGLE) String startPacketCapture(String resourceGroupName, String virtualNetworkGatewayName, String filterData);
/** * Starts packet capture on virtual network gateway in the specified resource group. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param filterData Start Packet capture parameters. * @throws Il...
Starts packet capture on virtual network gateway in the specified resource group
startPacketCapture
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java", "license": "mit", "size": 135947 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
1,644,786
private static int estimateUnitsBetween(long t0, long t1, int field) { long d = t1-t0; switch (field) { case Calendar.MILLISECOND: return (int)d; // this could be very inaccurate. TODO: use long instead of int? case Calendar.SECOND: return (int)(d / SECO...
static int function(long t0, long t1, int field) { long d = t1-t0; switch (field) { case Calendar.MILLISECOND: return (int)d; case Calendar.SECOND: return (int)(d / SECOND_MILLIS + .5); case Calendar.MINUTE: return (int)(d / MINUTE_MILLIS + .5); case Calendar.HOUR_OF_DAY: case Calendar.HOUR: return (int)(d / HOUR_MILLI...
/** * Based on code posted at * http://forum.java.sun.com/thread.jspa?threadID=488676&messageID=2292012 */
Based on code posted at HREF
estimateUnitsBetween
{ "repo_name": "giacomovagni/Prefuse", "path": "src/prefuse/util/TimeLib.java", "license": "bsd-3-clause", "size": 10673 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,201,565
public QName getName();
QName function();
/** * Get the QName of this external variable engine; this method must always return a valid non-null value. * The name of the external variable engine is used to identify it in the external variable declaration. * @return */
Get the QName of this external variable engine; this method must always return a valid non-null value. The name of the external variable engine is used to identify it in the external variable declaration
getName
{ "repo_name": "mproch/apache-ode", "path": "bpel-api/src/main/java/org/apache/ode/bpel/evar/ExternalVariableModule.java", "license": "apache-2.0", "size": 4748 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
1,336,101
private boolean nextPayload() throws IOException { while (remaining==0) { if (readHeader()) return true; } return false; }
boolean function() throws IOException { while (remaining==0) { if (readHeader()) return true; } return false; }
/** * If we are supposed to read the length of the next chunk, do so. */
If we are supposed to read the length of the next chunk, do so
nextPayload
{ "repo_name": "jenkinsci/remoting", "path": "src/main/java/hudson/remoting/ChunkedInputStream.java", "license": "mit", "size": 2936 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,406,222
public boolean existSensorType(SensorEnum sensorType) { return getAssignedSensorType(sensorType) != null; }
boolean function(SensorEnum sensorType) { return getAssignedSensorType(sensorType) != null; }
/** * Returns true, if the given sensorType exists at the zone, otherwise false. * * @param sensorType can be null * @return true, if sensorType exists, otherwise false */
Returns true, if the given sensorType exists at the zone, otherwise false
existSensorType
{ "repo_name": "paulianttila/openhab2", "path": "bundles/org.openhab.binding.digitalstrom/src/main/java/org/openhab/binding/digitalstrom/internal/lib/climate/jsonresponsecontainer/impl/AssignedSensors.java", "license": "epl-1.0", "size": 5763 }
[ "org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.SensorEnum" ]
import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.SensorEnum;
import org.openhab.binding.digitalstrom.internal.lib.structure.devices.deviceparameters.constants.*;
[ "org.openhab.binding" ]
org.openhab.binding;
2,297,961
Widget asWidget();
Widget asWidget();
/** * As widget. * * @return the widget */
As widget
asWidget
{ "repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_Release", "path": "mat/src/main/java/mat/client/CqlLibraryPresenter.java", "license": "cc0-1.0", "size": 49257 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
1,650,658
if ( configuration.jobPolicies().containsKey( job ) ) { return; } configuration.jobPolicies().put( job, BuildWallJobPolicy.AlwaysShow ); }//End Method
if ( configuration.jobPolicies().containsKey( job ) ) { return; } configuration.jobPolicies().put( job, BuildWallJobPolicy.AlwaysShow ); }
/** * Method to put the initial {@link BuildWallJobPolicy} into the {@link BuildWallConfiguration}. * @param configuration the {@link BuildWallConfiguration} to configure. * @param job the {@link JenkinsJob} to configure. */
Method to put the initial <code>BuildWallJobPolicy</code> into the <code>BuildWallConfiguration</code>
putInitialPolicy
{ "repo_name": "DanGrew/JenkinsTestTracker", "path": "JttDesktop/src/uk/dangrew/jtt/desktop/buildwall/configuration/updating/JobPolicyUpdater.java", "license": "apache-2.0", "size": 2070 }
[ "uk.dangrew.jtt.desktop.buildwall.configuration.properties.BuildWallJobPolicy" ]
import uk.dangrew.jtt.desktop.buildwall.configuration.properties.BuildWallJobPolicy;
import uk.dangrew.jtt.desktop.buildwall.configuration.properties.*;
[ "uk.dangrew.jtt" ]
uk.dangrew.jtt;
1,246,207
public Pair<ReturnResult, TransferData> saveRevision(TransferData transferData, DateTimeUserPair info);
Pair<ReturnResult, TransferData> function(TransferData transferData, DateTimeUserPair info);
/** * Save given TransferData to database and marks any found errors to returned data * @param transferData Data to be saved * @param info DateTimeUserPair for the operation * @return Pair<ReturnResult, TransferData> Left value is a ReturnResult telling about actual operation errors * (lik...
Save given TransferData to database and marks any found errors to returned data
saveRevision
{ "repo_name": "henrisu/metka", "path": "metka/src/main/java/fi/uta/fsd/metka/storage/repository/RevisionSaveRepository.java", "license": "bsd-3-clause", "size": 3331 }
[ "fi.uta.fsd.metka.model.general.DateTimeUserPair", "fi.uta.fsd.metka.model.transfer.TransferData", "fi.uta.fsd.metka.storage.repository.enums.ReturnResult", "org.apache.commons.lang3.tuple.Pair" ]
import fi.uta.fsd.metka.model.general.DateTimeUserPair; import fi.uta.fsd.metka.model.transfer.TransferData; import fi.uta.fsd.metka.storage.repository.enums.ReturnResult; import org.apache.commons.lang3.tuple.Pair;
import fi.uta.fsd.metka.model.general.*; import fi.uta.fsd.metka.model.transfer.*; import fi.uta.fsd.metka.storage.repository.enums.*; import org.apache.commons.lang3.tuple.*;
[ "fi.uta.fsd", "org.apache.commons" ]
fi.uta.fsd; org.apache.commons;
1,056,986
public IgniteServices services(ClusterGroup grp);
IgniteServices function(ClusterGroup grp);
/** * Gets {@code services} facade over nodes within the cluster group. All operations * on the returned {@link IgniteMessaging} instance will only include nodes from * the specified cluster group. * * @param grp Cluster group. * @return {@code Services} functionality over given cluster gr...
Gets services facade over nodes within the cluster group. All operations on the returned <code>IgniteMessaging</code> instance will only include nodes from the specified cluster group
services
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/Ignite.java", "license": "apache-2.0", "size": 33218 }
[ "org.apache.ignite.cluster.ClusterGroup" ]
import org.apache.ignite.cluster.ClusterGroup;
import org.apache.ignite.cluster.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,756,445
public static Date convertToDate(String source) { // the lexical form of the date is '-'? yyyy '-' mm '-' dd zzzzzz? if ((source == null) || source.trim().equals("")) { return null; } source = source.trim(); boolean bc = false; if (source.startsWith("-"))...
static Date function(String source) { if ((source == null) source.trim().equals(STR-STRinvalid date format (STR) with out - s at correct place STRZSTR+STR-STRTSTRinvalid time zone format (STR) without : at correct placeSTR-STRIn valid string sufixSTRIn valid string to parse"); } Calendar calendar = Calendar.getInstance...
/** * Converts a given string into a date. Code from Axis1 DateDeserializer. * * @param source * @return Returns Date. */
Converts a given string into a date. Code from Axis1 DateDeserializer
convertToDate
{ "repo_name": "zzsoszz/axiswebservice_demo", "path": "opensource_axis2.1.6.2/org/apache/axis2/databinding/utils/ConverterUtil.java", "license": "apache-2.0", "size": 61293 }
[ "java.util.Calendar", "java.util.Date", "java.util.GregorianCalendar" ]
import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar;
import java.util.*;
[ "java.util" ]
java.util;
216,861
public void advertisePresence(String presence) { if (!latestAdvertisedPresence.equals(presence)) { latestAdvertisedPresence = presence; Log.d(LOG_TAG, "Advertising presence " + presence); myUser.updatePresence(presence, null, null); } }
void function(String presence) { if (!latestAdvertisedPresence.equals(presence)) { latestAdvertisedPresence = presence; Log.d(LOG_TAG, STR + presence); myUser.updatePresence(presence, null, null); } }
/** * Send the advertise presence message. * @param presence the presence message. */
Send the advertise presence message
advertisePresence
{ "repo_name": "vt0r/vector-android", "path": "vector/src/main/java/im/vector/MyPresenceManager.java", "license": "apache-2.0", "size": 6528 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,352,190
@Retained EntryEventImpl generateEvictDestroyEvent(final Object key) { @Retained EntryEventImpl event = entryEventFactory.create(this, Operation.EVICT_DESTROY, key, null, null, false, getMyId()); if (generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } return ...
EntryEventImpl generateEvictDestroyEvent(final Object key) { EntryEventImpl event = entryEventFactory.create(this, Operation.EVICT_DESTROY, key, null, null, false, getMyId()); if (generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } return event; }
/** * Creates an event for EVICT_DESTROY operations. It is intended that this method be overridden to * allow for special handling of Partitioned Regions. * * @param key - the key that this event is related to * @return an event for EVICT_DESTROY */
Creates an event for EVICT_DESTROY operations. It is intended that this method be overridden to allow for special handling of Partitioned Regions
generateEvictDestroyEvent
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java", "license": "apache-2.0", "size": 394235 }
[ "org.apache.geode.cache.Operation" ]
import org.apache.geode.cache.Operation;
import org.apache.geode.cache.*;
[ "org.apache.geode" ]
org.apache.geode;
1,785,524
EasingCallback getEasingCallback();
EasingCallback getEasingCallback();
/** * Returns the callback to set the animation easing. * * @return the callback instance to use */
Returns the callback to set the animation easing
getEasingCallback
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/defaults/IsDefaultBaseAnimation.java", "license": "apache-2.0", "size": 2386 }
[ "org.pepstock.charba.client.callbacks.EasingCallback" ]
import org.pepstock.charba.client.callbacks.EasingCallback;
import org.pepstock.charba.client.callbacks.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
1,583,589
private void configureDisplayProperties() { //<snip> JXTable display properties // show column control oscarTable.setColumnControlVisible(true); // replace grid lines with striping oscarTable.setShowGrid(false, false); oscarTable.addHighlighter(HighlighterFactory.cre...
void function() { oscarTable.setColumnControlVisible(true); oscarTable.setShowGrid(false, false); oscarTable.addHighlighter(HighlighterFactory.createSimpleStriping()); oscarTable.setVisibleRowCount(10); CustomColumnFactory factory = new CustomColumnFactory(); OscarRendering.configureColumnFactory(factory, getClass()); ...
/** * Customizes display properties of contained components. * This is data-unrelated. */
Customizes display properties of contained components. This is data-unrelated
configureDisplayProperties
{ "repo_name": "syncer/swingx", "path": "swingx-demos/swingx-demos-content/src/main/java/org/jdesktop/swingx/demos/table/XTableDemo.java", "license": "lgpl-2.1", "size": 17979 }
[ "javax.swing.JComponent", "org.jdesktop.swingx.decorator.HighlighterFactory", "org.jdesktop.swingxset.util.DemoUtils" ]
import javax.swing.JComponent; import org.jdesktop.swingx.decorator.HighlighterFactory; import org.jdesktop.swingxset.util.DemoUtils;
import javax.swing.*; import org.jdesktop.swingx.decorator.*; import org.jdesktop.swingxset.util.*;
[ "javax.swing", "org.jdesktop.swingx", "org.jdesktop.swingxset" ]
javax.swing; org.jdesktop.swingx; org.jdesktop.swingxset;
1,735,779
public Float getRating(final String name) throws Exception { Set<CardInstance> cards = getCardInstances(name); float value = (float) 0.0; int count = 0; for (CardInstance card : cards) { if (card.hasRating()) { value += card.getRating(); count++; } } if (count == 0) { return null; } ...
Float function(final String name) throws Exception { Set<CardInstance> cards = getCardInstances(name); float value = (float) 0.0; int count = 0; for (CardInstance card : cards) { if (card.hasRating()) { value += card.getRating(); count++; } } if (count == 0) { return null; } return value / (float) count; }
/** * Returns the mtg community rating, out of five. * @param name * @return * @throws Exception */
Returns the mtg community rating, out of five
getRating
{ "repo_name": "kilroyrlc/kaflib", "path": "src/kaflib/applications/mtg/CardDatabase.java", "license": "mit", "size": 15342 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,217,317
public boolean canFinish( ) { return doSaveEmptyParameter( parameters ); } private class ViewerSelectionListener implements ISelectionChangedListener {
boolean function( ) { return doSaveEmptyParameter( parameters ); } private class ViewerSelectionListener implements ISelectionChangedListener {
/** * whether the page can be finished and closed. */
whether the page can be finished and closed
canFinish
{ "repo_name": "Charling-Huang/birt", "path": "UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/DataSetParametersPage.java", "license": "epl-1.0", "size": 73174 }
[ "org.eclipse.jface.viewers.ISelectionChangedListener" ]
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
401,963
public void testParametersForUnaryMinusAndPlus() throws Exception { PreparedStatement ps = prepareStatement("insert into t1 values(?,+?,-?,?)"); ps.setInt(1,3); ps.setInt(2,3); ps.setDouble(3,-3.1); ps.setString(4,"ghi"); int[] expectedTypes={Types.INTEGER,Types.SMALLINT, Types.DOUBLE,Types.CHAR};...
void function() throws Exception { PreparedStatement ps = prepareStatement(STR); ps.setInt(1,3); ps.setInt(2,3); ps.setDouble(3,-3.1); ps.setString(4,"ghi"); int[] expectedTypes={Types.INTEGER,Types.SMALLINT, Types.DOUBLE,Types.CHAR}; JDBC.assertParameterTypes(ps,expectedTypes); ps.executeUpdate(); ps.setInt(1,-1); ps....
/** * Test using parameters with unary minus and unary plus * @throws Exception */
Test using parameters with unary minus and unary plus
testParametersForUnaryMinusAndPlus
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/UnaryArithmeticParameterTest.java", "license": "agpl-3.0", "size": 15141 }
[ "com.splicemachine.dbTesting.junit.JDBC", "java.sql.PreparedStatement", "java.sql.Types" ]
import com.splicemachine.dbTesting.junit.JDBC; import java.sql.PreparedStatement; import java.sql.Types;
import com.splicemachine.*; import java.sql.*;
[ "com.splicemachine", "java.sql" ]
com.splicemachine; java.sql;
2,165,217
ServiceLocator.instance().getService(TagSuggestionManagement.class) .addTagSuggestionProvider(tagSuggestionProvider); }
ServiceLocator.instance().getService(TagSuggestionManagement.class) .addTagSuggestionProvider(tagSuggestionProvider); }
/** * Adds the given provider. * * @param tagSuggestionProvider * The TagSuggestionProvider to add. */
Adds the given provider
registerTagSuggestionProvider
{ "repo_name": "Communote/communote-server", "path": "communote/plugins/communote-core-plugin/src/main/java/com/communote/plugins/core/registries/TagSuggestionProviderRegistry.java", "license": "apache-2.0", "size": 1706 }
[ "com.communote.server.api.ServiceLocator", "com.communote.server.core.tag.TagSuggestionManagement" ]
import com.communote.server.api.ServiceLocator; import com.communote.server.core.tag.TagSuggestionManagement;
import com.communote.server.api.*; import com.communote.server.core.tag.*;
[ "com.communote.server" ]
com.communote.server;
604,161
static protected int checkAccess(java.io.InputStream cstream) throws IOException { try { ClassReader reader = new ClassReader(cstream); AccessVisitor visitor = new AccessVisitor(); reader.accept(visitor, 0); return visitor.getClassAccess(); ...
static int function(java.io.InputStream cstream) throws IOException { try { ClassReader reader = new ClassReader(cstream); AccessVisitor visitor = new AccessVisitor(); reader.accept(visitor, 0); return visitor.getClassAccess(); } catch (RuntimeException e) { return -1; } }
/** * Check that a given stream is a valid Java .class file. And return its * access permissions as an int. */
Check that a given stream is a valid Java .class file. And return its access permissions as an int
checkAccess
{ "repo_name": "tunneln/CarnotKE", "path": "jyhton/src/org/python/core/packagecache/PackageManager.java", "license": "apache-2.0", "size": 6291 }
[ "java.io.IOException", "java.io.InputStream", "org.objectweb.asm.ClassReader" ]
import java.io.IOException; import java.io.InputStream; import org.objectweb.asm.ClassReader;
import java.io.*; import org.objectweb.asm.*;
[ "java.io", "org.objectweb.asm" ]
java.io; org.objectweb.asm;
2,096,337
void addForcibly(DelayedEntry<Data, Object> delayedEntry);
void addForcibly(DelayedEntry<Data, Object> delayedEntry);
/** * Adds delayed-entry without doing capacity checks. */
Adds delayed-entry without doing capacity checks
addForcibly
{ "repo_name": "mesutcelik/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/MapDataStore.java", "license": "apache-2.0", "size": 4740 }
[ "com.hazelcast.internal.serialization.Data", "com.hazelcast.map.impl.mapstore.writebehind.entry.DelayedEntry" ]
import com.hazelcast.internal.serialization.Data; import com.hazelcast.map.impl.mapstore.writebehind.entry.DelayedEntry;
import com.hazelcast.internal.serialization.*; import com.hazelcast.map.impl.mapstore.writebehind.entry.*;
[ "com.hazelcast.internal", "com.hazelcast.map" ]
com.hazelcast.internal; com.hazelcast.map;
2,328,798
public void updateVo(int voId, ModificationItem[] modificationItems);
void function(int voId, ModificationItem[] modificationItems);
/** * Update existing vo in LDAP. * Use id instead of whole object. * * @param voId vo id * @param modificationItems list of attributes which need to be modified */
Update existing vo in LDAP. Use id instead of whole object
updateVo
{ "repo_name": "ondrejvelisek/perun", "path": "perun-ldapc/src/main/java/cz/metacentrum/perun/ldapc/processor/LdapConnector.java", "license": "bsd-2-clause", "size": 8243 }
[ "javax.naming.directory.ModificationItem" ]
import javax.naming.directory.ModificationItem;
import javax.naming.directory.*;
[ "javax.naming" ]
javax.naming;
2,567,572
public void extract(@NotNull final SequentialReader reader, @NotNull final Metadata metadata, long length, @Nullable Directory parentDirectory) { IptcDirectory directory = new IptcDirectory(); metadata.addDirectory(directory); if (parentDirectory != null) directory.setParent...
void function(@NotNull final SequentialReader reader, @NotNull final Metadata metadata, long length, @Nullable Directory parentDirectory) { IptcDirectory directory = new IptcDirectory(); metadata.addDirectory(directory); if (parentDirectory != null) directory.setParent(parentDirectory); int offset = 0; while (offset < ...
/** * Performs the IPTC data extraction, adding found values to the specified instance of {@link Metadata}. */
Performs the IPTC data extraction, adding found values to the specified instance of <code>Metadata</code>
extract
{ "repo_name": "drewnoakes/metadata-extractor", "path": "Source/com/drew/metadata/iptc/IptcReader.java", "license": "apache-2.0", "size": 9802 }
[ "com.drew.lang.SequentialReader", "com.drew.lang.annotations.NotNull", "com.drew.lang.annotations.Nullable", "com.drew.metadata.Directory", "com.drew.metadata.Metadata", "java.io.IOException" ]
import com.drew.lang.SequentialReader; import com.drew.lang.annotations.NotNull; import com.drew.lang.annotations.Nullable; import com.drew.metadata.Directory; import com.drew.metadata.Metadata; import java.io.IOException;
import com.drew.lang.*; import com.drew.lang.annotations.*; import com.drew.metadata.*; import java.io.*;
[ "com.drew.lang", "com.drew.metadata", "java.io" ]
com.drew.lang; com.drew.metadata; java.io;
970,875
public void displayNotification(String code) { String notification = null; try { JSONObject inputData = new JSONObject(code); if (inputData.get(resources.getString(R.string.intent_extra_notification)).toString() != null && !inputData.get(resources.getString(R.string.intent_extra_notification...
void function(String code) { String notification = null; try { JSONObject inputData = new JSONObject(code); if (inputData.get(resources.getString(R.string.intent_extra_notification)).toString() != null && !inputData.get(resources.getString(R.string.intent_extra_notification)).toString() .isEmpty()) { notification = inp...
/** * Display notification. * @param code - Operation code. */
Display notification
displayNotification
{ "repo_name": "ayyoob/product-iot-server", "path": "modules/tools/mdm-android-agent-archetype/src/main/resources/archetype-resources/src/main/java/org/wso2/mdm/agent/services/Operation.java", "license": "apache-2.0", "size": 31674 }
[ "android.content.Intent", "android.util.Log", "org.wso2.mdm.agent.AlertActivity" ]
import android.content.Intent; import android.util.Log; import org.wso2.mdm.agent.AlertActivity;
import android.content.*; import android.util.*; import org.wso2.mdm.agent.*;
[ "android.content", "android.util", "org.wso2.mdm" ]
android.content; android.util; org.wso2.mdm;
403,457
Map<String, WorkflowDocument> workflowDocMap = getWorkflowDocumentMap(userSession); workflowDocMap.put(workflowDocument.getDocumentId(), workflowDocument); }
Map<String, WorkflowDocument> workflowDocMap = getWorkflowDocumentMap(userSession); workflowDocMap.put(workflowDocument.getDocumentId(), workflowDocument); }
/** * Adds the given {@link org.kuali.rice.kew.api.WorkflowDocument} to the {@link org.kuali.rice.krad.UserSession}. * @param userSession the session to add the workflow document to * @param workflowDocument the workflow doc to add to the session */
Adds the given <code>org.kuali.rice.kew.api.WorkflowDocument</code> to the <code>org.kuali.rice.krad.UserSession</code>
addWorkflowDocument
{ "repo_name": "ricepanda/rice-git3", "path": "rice-framework/krad-app-framework/src/main/java/org/kuali/rice/krad/UserSessionUtils.java", "license": "apache-2.0", "size": 3337 }
[ "java.util.Map", "org.kuali.rice.kew.api.WorkflowDocument" ]
import java.util.Map; import org.kuali.rice.kew.api.WorkflowDocument;
import java.util.*; import org.kuali.rice.kew.api.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
2,902,077
int opus_multistream_surround_encoder_init(PointerByReference st, int Fs, int channels, int mapping_family, IntByReference streams, IntByReference coupled_streams, Pointer mapping, int application);
int opus_multistream_surround_encoder_init(PointerByReference st, int Fs, int channels, int mapping_family, IntByReference streams, IntByReference coupled_streams, Pointer mapping, int application);
/** * Opus multistream surround encoder init. * * @param st the st * @param Fs the fs * @param channels the channels * @param mapping_family the mapping family * @param streams the streams * @param coupled_streams the coupled streams * @param mapping ...
Opus multistream surround encoder init
opus_multistream_surround_encoder_init
{ "repo_name": "lpatino10/android-sdk", "path": "library/src/main/java/com/ibm/watson/developer_cloud/android/library/audio/opus/JNAOpus.java", "license": "apache-2.0", "size": 40064 }
[ "com.sun.jna.Pointer", "com.sun.jna.ptr.IntByReference", "com.sun.jna.ptr.PointerByReference" ]
import com.sun.jna.Pointer; import com.sun.jna.ptr.IntByReference; import com.sun.jna.ptr.PointerByReference;
import com.sun.jna.*; import com.sun.jna.ptr.*;
[ "com.sun.jna" ]
com.sun.jna;
554,736
protected PreparedStatement chattyPrepare( Connection conn, String text ) throws SQLException { println( "Preparing statement:\n\t" + text ); return conn.prepareStatement( text ); }
PreparedStatement function( Connection conn, String text ) throws SQLException { println( STR + text ); return conn.prepareStatement( text ); }
/** * Prepare a statement and report its sql text. */
Prepare a statement and report its sql text
chattyPrepare
{ "repo_name": "trejkaz/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java", "license": "apache-2.0", "size": 187273 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,407,907
void connectToServer(String url, String user, String password) { try { this.connection = DriverManager.getConnection(url, user, password); } catch (SQLException e) { System.out.println("Connection Failed!"); e.printStackTrace(); } }
void connectToServer(String url, String user, String password) { try { this.connection = DriverManager.getConnection(url, user, password); } catch (SQLException e) { System.out.println(STR); e.printStackTrace(); } }
/** * Connect to server. * * @param url url * @param user user * @param password password */
Connect to server
connectToServer
{ "repo_name": "degauhta/dgagarsky", "path": "chapter_008/parser/src/main/java/ru/job4j/ManagerDB.java", "license": "apache-2.0", "size": 5993 }
[ "java.sql.DriverManager", "java.sql.SQLException" ]
import java.sql.DriverManager; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
713,905
public void saveOracle(Oracle oracle, File oracleFolder) { // check folder does not exist if (oracleFolder.exists()) { logger.error("Oracle folder already exists, " + oracle.getName()); // try to create valid path String path = oracleFolder.getAbsolutePath(); int index = 0; // to na...
void function(Oracle oracle, File oracleFolder) { if (oracleFolder.exists()) { logger.error(STR + oracle.getName()); String path = oracleFolder.getAbsolutePath(); int index = 0; while (index < 100) { String tempPath = path + "(" + index + ")"; File tempFile = new File(tempPath); if (!tempFile.exists()) { oracleFolder =...
/** * FOR EVALUATION RUNNERS * @param oracle * @param oracleFolder */
FOR EVALUATION RUNNERS
saveOracle
{ "repo_name": "fergdev/JRUA", "path": "src/com/fergdev/jrua/io/filedatasource/FileDataSource.java", "license": "gpl-2.0", "size": 33816 }
[ "java.io.File", "java.util.List", "nz.ac.massey.buto.domain.Oracle", "nz.ac.massey.buto.domain.TrainingRun", "nz.ac.massey.buto.utils.IOUtils" ]
import java.io.File; import java.util.List; import nz.ac.massey.buto.domain.Oracle; import nz.ac.massey.buto.domain.TrainingRun; import nz.ac.massey.buto.utils.IOUtils;
import java.io.*; import java.util.*; import nz.ac.massey.buto.domain.*; import nz.ac.massey.buto.utils.*;
[ "java.io", "java.util", "nz.ac.massey" ]
java.io; java.util; nz.ac.massey;
270,267
private static boolean checkFilePathIsCodeFile(String filePath) { Preconditions.checkNotNull(filePath); // TODO: should we ignore case? return filePath.endsWith(".js") || filePath.endsWith(".py") || filePath.endsWith(".dart"); }
static boolean function(String filePath) { Preconditions.checkNotNull(filePath); return filePath.endsWith(".js") filePath.endsWith(".py") filePath.endsWith(".dart"); }
/** * Checks if the specified file path is acceptable for Cube. * * @return {@code false} if we shouldn't send request for the specified file */
Checks if the specified file path is acceptable for Cube
checkFilePathIsCodeFile
{ "repo_name": "ericmckean/collide", "path": "java/com/google/collide/client/codeunderstanding/CubeState.java", "license": "apache-2.0", "size": 14538 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,360,507
@Test public void verifyMinistryGovernmentBodyAnnualSummaryTest() { final Map<Integer, List<GovernmentBodyAnnualSummary>> map = esvApi.getDataPerMinistry("Försvarsdepartementet"); final List<String> govBodyNames = esvApi.getGovernmentBodyNames("Försvarsdepartementet"); assertNotNull(govBodyNames); for (fi...
void function() { final Map<Integer, List<GovernmentBodyAnnualSummary>> map = esvApi.getDataPerMinistry(STR); final List<String> govBodyNames = esvApi.getGovernmentBodyNames(STR); assertNotNull(govBodyNames); for (final String govBodyName : govBodyNames) { assertNotNull(govBodyName); for (final Entry<Integer, List<Gove...
/** * Verify ministry government body annual summary test. */
Verify ministry government body annual summary test
verifyMinistryGovernmentBodyAnnualSummaryTest
{ "repo_name": "Hack23/cia", "path": "service.external.esv/src/test/java/com/hack23/cia/service/external/esv/impl/EsvApiITest.java", "license": "apache-2.0", "size": 13308 }
[ "com.hack23.cia.service.external.esv.api.GovernmentBodyAnnualSummary", "java.util.List", "java.util.Map", "java.util.stream.Collectors" ]
import com.hack23.cia.service.external.esv.api.GovernmentBodyAnnualSummary; import java.util.List; import java.util.Map; import java.util.stream.Collectors;
import com.hack23.cia.service.external.esv.api.*; import java.util.*; import java.util.stream.*;
[ "com.hack23.cia", "java.util" ]
com.hack23.cia; java.util;
866,542
private void sendXmitRsp(Address dest, Message msg, long seqno) { Buffer buf; if(msg == null) { if(log.isErrorEnabled()) log.error("message is null, cannot send retransmission"); return; } if(stats) { xmit_rsps_sent++; ...
void function(Address dest, Message msg, long seqno) { Buffer buf; if(msg == null) { if(log.isErrorEnabled()) log.error(STR); return; } if(stats) { xmit_rsps_sent++; updateStats(sent, dest, 0, 1, 0); } if(use_mcast_xmit) dest=null; if(msg.getSrc() == null) msg.setSrc(local_addr); try { buf=Util.messageToByteBuffer(msg)...
/** * Sends a message msg to the requester. We have to wrap the original message into a retransmit message, as we need * to preserve the original message's properties, such as src, headers etc. * @param dest * @param msg * @param seqno */
Sends a message msg to the requester. We have to wrap the original message into a retransmit message, as we need to preserve the original message's properties, such as src, headers etc
sendXmitRsp
{ "repo_name": "ZJU-Shaonian-Biancheng-Tuan/bbossgroups-3.5", "path": "bboss-rpc/src-jgroups/bboss/org/jgroups/protocols/pbcast/NAKACK.java", "license": "apache-2.0", "size": 73343 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
573,061
@Override public CreatureController<? extends Creature> getController() { return (CreatureController<?>) super.getController(); }
CreatureController<? extends Creature> function() { return (CreatureController<?>) super.getController(); }
/** * Return CreatureController of this Creature object. * * @return CreatureController. */
Return CreatureController of this Creature object
getController
{ "repo_name": "GiGatR00n/Aion-Core-v4.7.5", "path": "AC-Game/src/com/aionemu/gameserver/model/gameobjects/Creature.java", "license": "gpl-2.0", "size": 22974 }
[ "com.aionemu.gameserver.controllers.CreatureController" ]
import com.aionemu.gameserver.controllers.CreatureController;
import com.aionemu.gameserver.controllers.*;
[ "com.aionemu.gameserver" ]
com.aionemu.gameserver;
568,164
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Void> removeParticipant(String participantId) { try { return serverCallInternal.removeParticipantAsync(serverCallId, participantId) .onErrorMap(CommunicationErrorResponseException.class, CallingServerErrorConverter::tran...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String participantId) { try { return serverCallInternal.removeParticipantAsync(serverCallId, participantId) .onErrorMap(CommunicationErrorResponseException.class, CallingServerErrorConverter::translateException) .flatMap(result -> Mono.empty()); } catch (R...
/** * Remove a participant from the call. * * @param participantId Participant id. * @throws CallingServerErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return Response for a su...
Remove a participant from the call
removeParticipant
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ServerCallAsync.java", "license": "mit", "size": 28413 }
[ "com.azure.communication.callingserver.implementation.converters.CallingServerErrorConverter", "com.azure.communication.callingserver.implementation.models.CommunicationErrorResponseException", "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.FluxUtil" ...
import com.azure.communication.callingserver.implementation.converters.CallingServerErrorConverter; import com.azure.communication.callingserver.implementation.models.CommunicationErrorResponseException; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.u...
import com.azure.communication.callingserver.implementation.converters.*; import com.azure.communication.callingserver.implementation.models.*; import com.azure.core.annotation.*; import com.azure.core.util.*;
[ "com.azure.communication", "com.azure.core" ]
com.azure.communication; com.azure.core;
2,218,439
static void validate(Node node, String schemaPath) throws SAXException, IOException { Source xmlSource = new DOMSource(node); Schema schema = getSchema(schemaPath); Validator validator = schema.newValidator(); validator.validate(xmlSource); }
static void validate(Node node, String schemaPath) throws SAXException, IOException { Source xmlSource = new DOMSource(node); Schema schema = getSchema(schemaPath); Validator validator = schema.newValidator(); validator.validate(xmlSource); }
/** * Validate a XML file against a schema. * * @param node node to be validated * @param schemaPath path to schema which should be used for validation * @throws SAXException * @throws IOException */
Validate a XML file against a schema
validate
{ "repo_name": "igorcadelima/rambos", "path": "src/main/jacamo/env/rambos/institution/Documents.java", "license": "mit", "size": 5049 }
[ "java.io.IOException", "javax.xml.transform.Source", "javax.xml.transform.dom.DOMSource", "javax.xml.validation.Schema", "javax.xml.validation.Validator", "org.w3c.dom.Node", "org.xml.sax.SAXException" ]
import java.io.IOException; import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import javax.xml.validation.Schema; import javax.xml.validation.Validator; import org.w3c.dom.Node; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.validation.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
java.io; javax.xml; org.w3c.dom; org.xml.sax;
2,063,535
public static @NotNull WebServiceFeature getFeature(String nsUri, boolean enabled, boolean required) { if (nsUri.equals(W3C.policyNsUri)) return new AddressingFeature(enabled, required); else if (nsUri.equals(MEMBER.policyNsUri)) return new MemberSubmissionAddressingFeature(e...
static @NotNull WebServiceFeature function(String nsUri, boolean enabled, boolean required) { if (nsUri.equals(W3C.policyNsUri)) return new AddressingFeature(enabled, required); else if (nsUri.equals(MEMBER.policyNsUri)) return new MemberSubmissionAddressingFeature(enabled, required); else throw new WebServiceException...
/** * Gets the {@link WebServiceFeature} corresponding to the namespace URI of * WS-Addressing policy assertion in the WSDL. <code>enabled</code> and * <code>required</code> are used to initialize the value of the feature. * * @param nsUri namespace URI of the WS-Addressing policy assertion in ...
Gets the <code>WebServiceFeature</code> corresponding to the namespace URI of WS-Addressing policy assertion in the WSDL. <code>enabled</code> and <code>required</code> are used to initialize the value of the feature
getFeature
{ "repo_name": "FauxFaux/jdk9-jaxws", "path": "src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/addressing/AddressingVersion.java", "license": "gpl-2.0", "size": 26811 }
[ "com.sun.istack.internal.NotNull", "com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature", "javax.xml.ws.WebServiceException", "javax.xml.ws.WebServiceFeature", "javax.xml.ws.soap.AddressingFeature" ]
import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature; import javax.xml.ws.soap.AddressingFeature;
import com.sun.istack.internal.*; import com.sun.xml.internal.ws.developer.*; import javax.xml.ws.*; import javax.xml.ws.soap.*;
[ "com.sun.istack", "com.sun.xml", "javax.xml" ]
com.sun.istack; com.sun.xml; javax.xml;
1,156,924
public String getReportUpdate() { A_CmsReportThread thread = OpenCms.getThreadStore().retrieveThread(m_paramThread); if (thread != null) { return thread.getReportUpdate(); } else { return ""; } }
String function() { A_CmsReportThread thread = OpenCms.getThreadStore().retrieveThread(m_paramThread); if (thread != null) { return thread.getReportUpdate(); } else { return ""; } }
/** * Returns the part of the report that is ready for output.<p> * * @return the part of the report that is ready for output */
Returns the part of the report that is ready for output
getReportUpdate
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/workplace/CmsReport.java", "license": "lgpl-2.1", "size": 20335 }
[ "org.opencms.main.OpenCms" ]
import org.opencms.main.OpenCms;
import org.opencms.main.*;
[ "org.opencms.main" ]
org.opencms.main;
47,644
public INDArray batchNorm(INDArray input, INDArray mean, INDArray variance, INDArray gamma, INDArray beta, double epsilon, int... axis) { NDValidation.validateNumerical("batchNorm", "input", input); NDValidation.validateNumerical("batchNorm", "mean", mean); NDValidation.validateNumerical("batchNorm"...
INDArray function(INDArray input, INDArray mean, INDArray variance, INDArray gamma, INDArray beta, double epsilon, int... axis) { NDValidation.validateNumerical(STR, "input", input); NDValidation.validateNumerical(STR, "mean", mean); NDValidation.validateNumerical(STR, STR, variance); NDValidation.validateNumerical(STR...
/** * Neural network batch normalization operation.<br> * For details, see <a href="https://arxiv.org/abs/1502.03167">https://arxiv.org/abs/1502.03167</a><br> * * @param input Input variable. (NUMERIC type) * @param mean Mean value. For 1d axis, this should match input.size(axis) (NUMERIC type) * @par...
Neural network batch normalization operation. For details, see HREF
batchNorm
{ "repo_name": "RobAltena/deeplearning4j", "path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/ops/NDNN.java", "license": "apache-2.0", "size": 24350 }
[ "org.nd4j.base.Preconditions", "org.nd4j.linalg.api.ndarray.INDArray", "org.nd4j.linalg.factory.NDValidation", "org.nd4j.linalg.factory.Nd4j" ]
import org.nd4j.base.Preconditions; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.factory.NDValidation; import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.base.*; import org.nd4j.linalg.api.ndarray.*; import org.nd4j.linalg.factory.*;
[ "org.nd4j.base", "org.nd4j.linalg" ]
org.nd4j.base; org.nd4j.linalg;
1,929,202
public InetSocketAddress getSocketAddr( String name, String defaultAddress, int defaultPort) { final String address = getTrimmed(name, defaultAddress); return NetUtils.createSocketAddr(address, defaultPort, name); }
InetSocketAddress function( String name, String defaultAddress, int defaultPort) { final String address = getTrimmed(name, defaultAddress); return NetUtils.createSocketAddr(address, defaultPort, name); }
/** * Get the socket address for <code>name</code> property as a * <code>InetSocketAddress</code>. * @param name property name. * @param defaultAddress the default value * @param defaultPort the default port * @return InetSocketAddress */
Get the socket address for <code>name</code> property as a <code>InetSocketAddress</code>
getSocketAddr
{ "repo_name": "NJUJYB/disYarn", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java", "license": "apache-2.0", "size": 104133 }
[ "java.net.InetSocketAddress", "org.apache.hadoop.net.NetUtils" ]
import java.net.InetSocketAddress; import org.apache.hadoop.net.NetUtils;
import java.net.*; import org.apache.hadoop.net.*;
[ "java.net", "org.apache.hadoop" ]
java.net; org.apache.hadoop;
1,892,425
public void setScaleRatio(String scaleRatio) { this.getCOSObject().setString(COSName.R, scaleRatio); }
void function(String scaleRatio) { this.getCOSObject().setString(COSName.R, scaleRatio); }
/** * This will set the scale ration. * * @param scaleRatio the scale ratio. */
This will set the scale ration
setScaleRatio
{ "repo_name": "gavanx/pdflearn", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/measurement/PDRectlinearMeasureDictionary.java", "license": "apache-2.0", "size": 7988 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
896,246
void setMinExclusive(String value);
void setMinExclusive(String value);
/** * Sets the value of the '{@link iso20022.AbstractDateTimeConcept#getMinExclusive <em>Min Exclusive</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Min Exclusive</em>' attribute. * @see #getMinExclusive() * @generated */
Sets the value of the '<code>iso20022.AbstractDateTimeConcept#getMinExclusive Min Exclusive</code>' attribute.
setMinExclusive
{ "repo_name": "ISO20022ArchitectForum/sample-code-public", "path": "DLT/Corda/ISO20022Generated/src/iso20022/AbstractDateTimeConcept.java", "license": "apache-2.0", "size": 5989 }
[ "java.lang.String" ]
import java.lang.String;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,753,321
private void addExternalCallActionToSet(final ExternalCallActionImpl externalAction) { try { final CodeSection codeSection = this.codeSectionGenerator.getCodeSectionForID(externalAction.getId()); final ExternalCallParameter exCallParam = new ExternalCallParameter(codeSection, this.zero); if (this.should...
void function(final ExternalCallActionImpl externalAction) { try { final CodeSection codeSection = this.codeSectionGenerator.getCodeSectionForID(externalAction.getId()); final ExternalCallParameter exCallParam = new ExternalCallParameter(codeSection, this.zero); if (this.shouldBeIgnoredDueToSomoxCollision(exCallParam, ...
/** * Adding a new {@link ExternalCallParameter} based on a * {@link ExternalCallActionImpl} to the {@link externalCallParameterSet}. * * @param externalAction SEFF-Action to add. * */
Adding a new <code>ExternalCallParameter</code> based on a <code>ExternalCallActionImpl</code> to the <code>externalCallParameterSet</code>
addExternalCallActionToSet
{ "repo_name": "Beagle-PSE/Beagle", "path": "Core/src/main/java/de/uka/ipd/sdq/beagle/core/pcmconnection/PcmRepositorySeffExtractor.java", "license": "epl-1.0", "size": 19956 }
[ "de.uka.ipd.sdq.beagle.core.CodeSection", "de.uka.ipd.sdq.beagle.core.ExternalCallParameter", "java.io.FileNotFoundException", "org.palladiosimulator.pcm.seff.impl.ExternalCallActionImpl" ]
import de.uka.ipd.sdq.beagle.core.CodeSection; import de.uka.ipd.sdq.beagle.core.ExternalCallParameter; import java.io.FileNotFoundException; import org.palladiosimulator.pcm.seff.impl.ExternalCallActionImpl;
import de.uka.ipd.sdq.beagle.core.*; import java.io.*; import org.palladiosimulator.pcm.seff.impl.*;
[ "de.uka.ipd", "java.io", "org.palladiosimulator.pcm" ]
de.uka.ipd; java.io; org.palladiosimulator.pcm;
1,511,221
@Test public void testComplexFlush() throws IOException { Configuration conf = new HdfsConfiguration(); if (simulatedStorage) { SimulatedFSDataset.setFactory(conf); } fileContents = AppendTestUtil.initBuffer(AppendTestUtil.FILE_SIZE); MiniDFSCluster cluster = new MiniDFSCluster.Builder(con...
void function() throws IOException { Configuration conf = new HdfsConfiguration(); if (simulatedStorage) { SimulatedFSDataset.setFactory(conf); } fileContents = AppendTestUtil.initBuffer(AppendTestUtil.FILE_SIZE); MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); DistributedFileSystem fs = cluster.getF...
/** * Test that file data can be flushed. * @throws IOException an exception might be thrown */
Test that file data can be flushed
testComplexFlush
{ "repo_name": "intel-hadoop/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppend.java", "license": "apache-2.0", "size": 22109 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.datanode.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,539,775
private void emlFileChooserActionPerformed(ActionEvent evt) { // NOSONAR This method is used through lambda tfEmlMessage.setText(emlFileChooser.getSelectedFile().getAbsolutePath()); }
void function(ActionEvent evt) { tfEmlMessage.setText(emlFileChooser.getSelectedFile().getAbsolutePath()); }
/** * ActionPerformed-method for filechoser "emlFileChoser", creates * FileChoser-Object * * @param evt * ActionEvent to be handled */
ActionPerformed-method for filechoser "emlFileChoser", creates FileChoser-Object
emlFileChooserActionPerformed
{ "repo_name": "ra0077/jmeter", "path": "src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpPanel.java", "license": "apache-2.0", "size": 38588 }
[ "java.awt.event.ActionEvent" ]
import java.awt.event.ActionEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
636,705
protected final void enableAllocation(String... indices) { client().admin().indices().prepareUpdateSettings(indices).setSettings(Settings.builder().put( EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE_SETTING.getKey(), "all" )).get(); }
final void function(String... indices) { client().admin().indices().prepareUpdateSettings(indices).setSettings(Settings.builder().put( EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE_SETTING.getKey(), "all" )).get(); }
/** * Syntactic sugar for enabling allocation for <code>indices</code> */
Syntactic sugar for enabling allocation for <code>indices</code>
enableAllocation
{ "repo_name": "masaruh/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java", "license": "apache-2.0", "size": 106559 }
[ "org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider", "org.elasticsearch.common.settings.Settings" ]
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.cluster.routing.allocation.decider.*; import org.elasticsearch.common.settings.*;
[ "org.elasticsearch.cluster", "org.elasticsearch.common" ]
org.elasticsearch.cluster; org.elasticsearch.common;
1,488,206
protected void reloadChoiceStateInView(View frontView, int position) { if (isChecked(position)) { if (swipeDrawableChecked > 0) frontView.setBackgroundResource(swipeDrawableChecked); } else { if (swipeDrawableUnchecked > 0) frontView.setBackgroundResource(swipeDrawableUncheck...
void function(View frontView, int position) { if (isChecked(position)) { if (swipeDrawableChecked > 0) frontView.setBackgroundResource(swipeDrawableChecked); } else { if (swipeDrawableUnchecked > 0) frontView.setBackgroundResource(swipeDrawableUnchecked); } }
/** * Draw cell for display if item is selected or not * * @param frontView view to draw * @param position position in list */
Draw cell for display if item is selected or not
reloadChoiceStateInView
{ "repo_name": "longluo/AndroidDemo", "path": "app/src/main/java/com/longluo/demo/widget/swipelistview/SwipeListViewTouchListener.java", "license": "mit", "size": 39507 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,877,836
public void removeFromUnsent(ChatMessage message) { db.execSQL("DELETE FROM unsent_chat_message WHERE _id=?", new String[]{"" + message.internalID}); }
void function(ChatMessage message) { db.execSQL(STR, new String[]{"" + message.internalID}); }
/** * Removes the message from unsent database */
Removes the message from unsent database
removeFromUnsent
{ "repo_name": "kordianbruck/TumCampusApp", "path": "app/src/main/java/de/tum/in/tumcampusapp/models/managers/ChatMessageManager.java", "license": "gpl-2.0", "size": 10330 }
[ "de.tum.in.tumcampusapp.models.ChatMessage" ]
import de.tum.in.tumcampusapp.models.ChatMessage;
import de.tum.in.tumcampusapp.models.*;
[ "de.tum.in" ]
de.tum.in;
2,523,201
public Adapter createMdfAnnotationAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link com.odcgroup.mdf.metamodel.MdfAnnotation <em>Annotation</em>}'. * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * @return the new adapt...
Creates a new adapter for an object of class '<code>com.odcgroup.mdf.metamodel.MdfAnnotation Annotation</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway
createMdfAnnotationAdapter
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/domain/core/com.odcgroup.mdf.ecore/src/main/java/com/odcgroup/mdf/ecore/util/MdfAdapterFactory.java", "license": "epl-1.0", "size": 13679 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,030,242
@Nonnull default ObjBooleanConsumer<T> paccept(boolean value1) { return (t, value2) -> this.accept(t, value1, value2); }
default ObjBooleanConsumer<T> paccept(boolean value1) { return (t, value2) -> this.accept(t, value1, value2); }
/** * Applies this consumer partially to some arguments of this one, producing a {@link ObjBooleanConsumer} as result. * * @param value1 The second argument to this consumer used to partially apply this function * @return A {@code ObjBooleanConsumer} that represents this consumer partially applied t...
Applies this consumer partially to some arguments of this one, producing a <code>ObjBooleanConsumer</code> as result
paccept
{ "repo_name": "Gridtec/lambda4j", "path": "lambda4j/src-gen/main/java/at/gridtec/lambda4j/consumer/tri/obj/ObjBiBooleanConsumer.java", "license": "apache-2.0", "size": 25485 }
[ "at.gridtec.lambda4j.consumer.bi.obj.ObjBooleanConsumer" ]
import at.gridtec.lambda4j.consumer.bi.obj.ObjBooleanConsumer;
import at.gridtec.lambda4j.consumer.bi.obj.*;
[ "at.gridtec.lambda4j" ]
at.gridtec.lambda4j;
2,404,784
public static List<TypeInfo> generateColumnTypes(Schema schema) throws AvroSerdeException { return generateColumnTypes (schema, null); }
static List<TypeInfo> function(Schema schema) throws AvroSerdeException { return generateColumnTypes (schema, null); }
/** * Generate a list of of TypeInfos from an Avro schema. This method is * currently public due to some weirdness in deserializing unions, but * will be made private once that is resolved. * @param schema Schema to generate field types for * @return List of TypeInfos, each element of which is...
Generate a list of of TypeInfos from an Avro schema. This method is currently public due to some weirdness in deserializing unions, but will be made private once that is resolved
generateColumnTypes
{ "repo_name": "prestodb/presto-hive-apache", "path": "src/main/java/org/apache/hadoop/hive/serde2/avro/SchemaToTypeInfo.java", "license": "apache-2.0", "size": 12247 }
[ "java.util.List", "org.apache.avro.Schema", "org.apache.hadoop.hive.serde2.typeinfo.TypeInfo" ]
import java.util.List; import org.apache.avro.Schema; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
import java.util.*; import org.apache.avro.*; import org.apache.hadoop.hive.serde2.typeinfo.*;
[ "java.util", "org.apache.avro", "org.apache.hadoop" ]
java.util; org.apache.avro; org.apache.hadoop;
1,869,928
@Test public void testMessageLevel() { final Message message = this.construct(""); Assert.assertEquals(25, message.getLevel()); }
void function() { final Message message = this.construct(""); Assert.assertEquals(25, message.getLevel()); }
/** * Ensure the message level for a success message is 25. */
Ensure the message level for a success message is 25
testMessageLevel
{ "repo_name": "TroyHisted/input-field", "path": "src/test/java/com/troyhisted/inputfield/message/SuccessMessageTest.java", "license": "apache-2.0", "size": 1431 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,439,395
public static Property<String> circleColor(@ColorInt int value) { return new PaintProperty<>("circle-color", colorToRgbaString(value)); }
static Property<String> function(@ColorInt int value) { return new PaintProperty<>(STR, colorToRgbaString(value)); }
/** * The fill color of the circle. * * @param value a int color value * @return property wrapper around String color */
The fill color of the circle
circleColor
{ "repo_name": "geminy/aidear", "path": "oss/qt/qt-everywhere-opensource-src-5.9.0/qtlocation/src/3rdparty/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java", "license": "gpl-3.0", "size": 63663 }
[ "android.support.annotation.ColorInt" ]
import android.support.annotation.ColorInt;
import android.support.annotation.*;
[ "android.support" ]
android.support;
592,259
public CopyOnWriteHashMap<K, V> copyAndPutAll(Map<? extends K, ? extends V> other) { return copyAndPutAll(other.entrySet()); }
CopyOnWriteHashMap<K, V> function(Map<? extends K, ? extends V> other) { return copyAndPutAll(other.entrySet()); }
/** * Same as {@link #copyAndPut(Object, Object)} but for an arbitrary number of entries. */
Same as <code>#copyAndPut(Object, Object)</code> but for an arbitrary number of entries
copyAndPutAll
{ "repo_name": "EvilMcJerkface/crate", "path": "server/src/main/java/org/elasticsearch/common/collect/CopyOnWriteHashMap.java", "license": "apache-2.0", "size": 19900 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
158,561
public default Set<VertexComputeKey> getVertexComputeKeys() { return Collections.emptySet(); }
default Set<VertexComputeKey> function() { return Collections.emptySet(); }
/** * The {@link org.apache.tinkerpop.gremlin.structure.Element} properties that will be mutated during the computation. * All properties in the graph are readable, but only the keys specified here are writable. * The default is an empty set. * * @return the set of element keys that will be mut...
The <code>org.apache.tinkerpop.gremlin.structure.Element</code> properties that will be mutated during the computation. All properties in the graph are readable, but only the keys specified here are writable. The default is an empty set
getVertexComputeKeys
{ "repo_name": "samiunn/incubator-tinkerpop", "path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/VertexProgram.java", "license": "apache-2.0", "size": 13228 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,756,635
public void setTimeOfImpact(TimeOfImpact timeOfImpact) { this.timeOfImpact = timeOfImpact; }
void function(TimeOfImpact timeOfImpact) { this.timeOfImpact = timeOfImpact; }
/** * Sets the time of impact information. * @param timeOfImpact the time of impact information */
Sets the time of impact information
setTimeOfImpact
{ "repo_name": "yuripourre/etyllica-physics", "path": "src/main/java/org/dyn4j/dynamics/ConvexCastResult.java", "license": "bsd-3-clause", "size": 3795 }
[ "org.dyn4j.collision.continuous.TimeOfImpact" ]
import org.dyn4j.collision.continuous.TimeOfImpact;
import org.dyn4j.collision.continuous.*;
[ "org.dyn4j.collision" ]
org.dyn4j.collision;
95,679
public void addAttribute(QName name, JspAttribute value) throws JspParseException { if (ESCAPE_XML.equals(name)) _escapeXmlAttr = value; else throw error(L.l("`{0}' is an unknown attribute for <{1}>.", name.getName(), getTagName())); }
void function(QName name, JspAttribute value) throws JspParseException { if (ESCAPE_XML.equals(name)) _escapeXmlAttr = value; else throw error(L.l(STR, name.getName(), getTagName())); }
/** * Adds an attribute. */
Adds an attribute
addAttribute
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/jsp/java/JstlXmlOut.java", "license": "gpl-2.0", "size": 3218 }
[ "com.caucho.jsp.JspParseException", "com.caucho.xml.QName" ]
import com.caucho.jsp.JspParseException; import com.caucho.xml.QName;
import com.caucho.jsp.*; import com.caucho.xml.*;
[ "com.caucho.jsp", "com.caucho.xml" ]
com.caucho.jsp; com.caucho.xml;
430,372
@SuppressWarnings("null") public static void main(String args[]) { // Verify that "catalina.home" was passed. if (catalinaHome == null) { log.error("Must set '" + Globals.CATALINA_HOME_PROP + "' system property"); System.exit(1); } // Process command lin...
@SuppressWarnings("null") static void function(String args[]) { if (catalinaHome == null) { log.error(STR + Globals.CATALINA_HOME_PROP + STR); System.exit(1); } int index = 0; while (true) { if (index == args.length) { usage(); System.exit(1); } if ("-ant".equals(args[index])) ant = true; else if (STR.equals(args[index...
/** * The main program for the bootstrap. * * @param args Command line arguments to be processed */
The main program for the bootstrap
main
{ "repo_name": "WhiteBearSolutions/WBSAirback", "path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/catalina/startup/Tool.java", "license": "apache-2.0", "size": 8606 }
[ "java.io.File", "java.lang.reflect.Method", "java.util.ArrayList", "org.apache.catalina.Globals", "org.apache.tomcat.util.ExceptionUtils" ]
import java.io.File; import java.lang.reflect.Method; import java.util.ArrayList; import org.apache.catalina.Globals; import org.apache.tomcat.util.ExceptionUtils;
import java.io.*; import java.lang.reflect.*; import java.util.*; import org.apache.catalina.*; import org.apache.tomcat.util.*;
[ "java.io", "java.lang", "java.util", "org.apache.catalina", "org.apache.tomcat" ]
java.io; java.lang; java.util; org.apache.catalina; org.apache.tomcat;
1,692,101
private void executeCommand(String command, List parameters) { if (m_echo) { // echo the command to STDOUT System.out.print(command); for (int i = 0; i < parameters.size(); i++) { System.out.print(" " + parameters.get(i)); } ...
void function(String command, List parameters) { if (m_echo) { System.out.print(command); for (int i = 0; i < parameters.size(); i++) { System.out.print(" " + parameters.get(i)); } System.out.println(); } boolean executed = false; Iterator i = m_commandObjects.iterator(); while (!executed && i.hasNext()) { CmsCommandOb...
/** * Executes a shell command with a list of parameters.<p> * * @param command the command to execute * @param parameters the list of parameters for the command */
Executes a shell command with a list of parameters
executeCommand
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/main/CmsShell.java", "license": "lgpl-2.1", "size": 32117 }
[ "java.util.Iterator", "java.util.List" ]
import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,223,537
public okhttp3.Call deleteIdentityLinkAsync(String id, IdentityLinkDto identityLinkDto, final ApiCallback<Void> _callback) throws ApiException { okhttp3.Call localVarCall = deleteIdentityLinkValidateBeforeCall(id, identityLinkDto, _callback); localVarApiClient.executeAsync(localVarCall, _callback);...
okhttp3.Call function(String id, IdentityLinkDto identityLinkDto, final ApiCallback<Void> _callback) throws ApiException { okhttp3.Call localVarCall = deleteIdentityLinkValidateBeforeCall(id, identityLinkDto, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; }
/** * (asynchronously) * Removes an identity link from a task by id * @param id The id of the task to remove a link from. (required) * @param identityLinkDto (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws Api...
(asynchronously) Removes an identity link from a task by id
deleteIdentityLinkAsync
{ "repo_name": "camunda/camunda-consulting", "path": "snippets/camunda-openapi-client/camunda-openapi-client/src/gen/java/main/com/camunda/consulting/openapi/client/handler/TaskIdentityLinkApi.java", "license": "apache-2.0", "size": 21538 }
[ "com.camunda.consulting.openapi.client.handler.ApiCallback", "com.camunda.consulting.openapi.client.handler.ApiException", "com.camunda.consulting.openapi.client.model.IdentityLinkDto" ]
import com.camunda.consulting.openapi.client.handler.ApiCallback; import com.camunda.consulting.openapi.client.handler.ApiException; import com.camunda.consulting.openapi.client.model.IdentityLinkDto;
import com.camunda.consulting.openapi.client.handler.*; import com.camunda.consulting.openapi.client.model.*;
[ "com.camunda.consulting" ]
com.camunda.consulting;
2,455,764
public void add(final int depth, final BaseVertex vertex) { if ( this.rows.size() < (depth + 1) ) { final int addRows = depth - this.rows.size() + 1; for ( int i = 0; i < addRows; ++i ) { this.rows.add( new Row( (depth - addRows) + i ) ); ...
void function(final int depth, final BaseVertex vertex) { if ( this.rows.size() < (depth + 1) ) { final int addRows = depth - this.rows.size() + 1; for ( int i = 0; i < addRows; ++i ) { this.rows.add( new Row( (depth - addRows) + i ) ); } } ((Row) this.rows.get( depth )).add( vertex ); }
/** * Adds new vertex to specified depth * * @param depth depth for vertex * @param vertex vertex */
Adds new vertex to specified depth
add
{ "repo_name": "droolsjbpm/droolsjbpm-tools", "path": "drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/rete/RowList.java", "license": "apache-2.0", "size": 4085 }
[ "org.drools.eclipse.reteoo.BaseVertex" ]
import org.drools.eclipse.reteoo.BaseVertex;
import org.drools.eclipse.reteoo.*;
[ "org.drools.eclipse" ]
org.drools.eclipse;
2,654,927
public TupleQueryResultFormat getTupleQueryResultFormat( final TupleQueryResultFormat fallback) { for (ConnegScore<?> s : scores) { if (s.format instanceof TupleQueryResultFormat) { return (TupleQueryResultFormat) s.format; } } return fallback; }
TupleQueryResultFormat function( final TupleQueryResultFormat fallback) { for (ConnegScore<?> s : scores) { if (s.format instanceof TupleQueryResultFormat) { return (TupleQueryResultFormat) s.format; } } return fallback; }
/** * Return the best {@link TupleQueryResultFormat} from the * <code>Accept</code> header, where "best" is measured by the * <code>q</code> parameter. * * @param fallback * The caller's default, which is returned if no match was * specified. * * @return The best {@lin...
Return the best <code>TupleQueryResultFormat</code> from the <code>Accept</code> header, where "best" is measured by the <code>q</code> parameter
getTupleQueryResultFormat
{ "repo_name": "smalyshev/blazegraph", "path": "bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/ConnegUtil.java", "license": "gpl-2.0", "size": 13237 }
[ "org.openrdf.query.resultio.TupleQueryResultFormat" ]
import org.openrdf.query.resultio.TupleQueryResultFormat;
import org.openrdf.query.resultio.*;
[ "org.openrdf.query" ]
org.openrdf.query;
311,245
public final AuthenticationConfiguration useSslContext(SecurityFactory<SSLContext> sslContextFactory) { return sslContextFactory == null ? without(SSLContextAuthenticationConfiguration.class) : new SSLContextAuthenticationConfiguration(this, sslContextFactory); } // other
final AuthenticationConfiguration function(SecurityFactory<SSLContext> sslContextFactory) { return sslContextFactory == null ? without(SSLContextAuthenticationConfiguration.class) : new SSLContextAuthenticationConfiguration(this, sslContextFactory); }
/** * Create a new configuration which is the same as this configuration, but which uses the given predefined SSL context * for choosing the set of SSL/TLS cipher suites, performing authentication, etc. * * @param sslContextFactory the SSL context factory to use * @return the new configuration ...
Create a new configuration which is the same as this configuration, but which uses the given predefined SSL context for choosing the set of SSL/TLS cipher suites, performing authentication, etc
useSslContext
{ "repo_name": "sguilhen/wildfly-elytron", "path": "src/main/java/org/wildfly/security/auth/client/AuthenticationConfiguration.java", "license": "apache-2.0", "size": 36415 }
[ "javax.net.ssl.SSLContext", "org.wildfly.security.SecurityFactory" ]
import javax.net.ssl.SSLContext; import org.wildfly.security.SecurityFactory;
import javax.net.ssl.*; import org.wildfly.security.*;
[ "javax.net", "org.wildfly.security" ]
javax.net; org.wildfly.security;
14,399
protected boolean evaluateAsBoolean(List contextNodeSet, ContextSupport support) throws JaxenException { return anyMatchingNode( contextNodeSet, support ); }
boolean function(List contextNodeSet, ContextSupport support) throws JaxenException { return anyMatchingNode( contextNodeSet, support ); }
/** * <p>Returns true if any of the supplied nodes satisfy * all the predicates in the set. Returns false if none of the supplied * nodes matches all the predicates in the set. Returns false if the * node-set is empty.</p> * * @param contextNodeSet the nodes to test against these predic...
Returns true if any of the supplied nodes satisfy all the predicates in the set. Returns false if none of the supplied nodes matches all the predicates in the set. Returns false if the node-set is empty
evaluateAsBoolean
{ "repo_name": "srnsw/xena", "path": "xena/src/org/jaxen/expr/PredicateSet.java", "license": "gpl-3.0", "size": 9975 }
[ "java.util.List", "org.jaxen.ContextSupport", "org.jaxen.JaxenException" ]
import java.util.List; import org.jaxen.ContextSupport; import org.jaxen.JaxenException;
import java.util.*; import org.jaxen.*;
[ "java.util", "org.jaxen" ]
java.util; org.jaxen;
1,310,159
public static String getRabbitPassword() { if (rabbitPassword == null) { rabbitPassword = ConfigFactory.load().getString("rabbitmq.password"); } return rabbitPassword; }
static String function() { if (rabbitPassword == null) { rabbitPassword = ConfigFactory.load().getString(STR); } return rabbitPassword; }
/** * Get the rabbitmq password from the configuration file * @return rabbit password */
Get the rabbitmq password from the configuration file
getRabbitPassword
{ "repo_name": "william101/projectdit", "path": "java-api/app/models/RabbitConfig.java", "license": "apache-2.0", "size": 1813 }
[ "com.typesafe.config.ConfigFactory" ]
import com.typesafe.config.ConfigFactory;
import com.typesafe.config.*;
[ "com.typesafe.config" ]
com.typesafe.config;
1,952,300
public static Bound<GenericRecord> withoutValidation() { return new Bound<>(GenericRecord.class).withoutValidation(); } public static class Bound<T> extends PTransform<PInput, PCollection<T>> { private static final long serialVersionUID = 0; @Nullable final String filep...
static Bound<GenericRecord> function() { return new Bound<>(GenericRecord.class).withoutValidation(); } public static class Bound<T> extends PTransform<PInput, PCollection<T>> { private static final long serialVersionUID = 0; final String filepattern; final Class<T> type; final Schema schema; final boolean validate; Bo...
/** * Returns a AvroIO.Read PTransform that has GCS path validation on * pipeline creation disabled. * * <p> This can be useful in the case where the GCS input location does * not exist at the pipeline creation time, but is expected to be available * at execution time. */
Returns a AvroIO.Read PTransform that has GCS path validation on pipeline creation disabled. This can be useful in the case where the GCS input location does not exist at the pipeline creation time, but is expected to be available at execution time
withoutValidation
{ "repo_name": "chamikaramj/MyDataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/io/AvroIO.java", "license": "apache-2.0", "size": 27129 }
[ "com.google.cloud.dataflow.sdk.transforms.PTransform", "com.google.cloud.dataflow.sdk.values.PCollection", "com.google.cloud.dataflow.sdk.values.PInput", "org.apache.avro.Schema", "org.apache.avro.generic.GenericRecord" ]
import com.google.cloud.dataflow.sdk.transforms.PTransform; import com.google.cloud.dataflow.sdk.values.PCollection; import com.google.cloud.dataflow.sdk.values.PInput; import org.apache.avro.Schema; import org.apache.avro.generic.GenericRecord;
import com.google.cloud.dataflow.sdk.transforms.*; import com.google.cloud.dataflow.sdk.values.*; import org.apache.avro.*; import org.apache.avro.generic.*;
[ "com.google.cloud", "org.apache.avro" ]
com.google.cloud; org.apache.avro;
901,253
void setTabIconTintMode(@Nullable PorterDuff.Mode mode);
void setTabIconTintMode(@Nullable PorterDuff.Mode mode);
/** * Sets the mode, which should be used to tint the icon of a tab. * * @param mode * The mode, which should be set, as a value of enum {@link PorterDuff.Mode} or null, if * the default mode should be used */
Sets the mode, which should be used to tint the icon of a tab
setTabIconTintMode
{ "repo_name": "michael-rapp/ChromeLikeTabSwitcher", "path": "library/src/main/java/de/mrapp/android/tabswitcher/model/Model.java", "license": "apache-2.0", "size": 56796 }
[ "android.graphics.PorterDuff", "androidx.annotation.Nullable" ]
import android.graphics.PorterDuff; import androidx.annotation.Nullable;
import android.graphics.*; import androidx.annotation.*;
[ "android.graphics", "androidx.annotation" ]
android.graphics; androidx.annotation;
1,966,201
public TrustedRpkStore getTrustedRpkStore() { return trustedRpkStore; }
TrustedRpkStore function() { return trustedRpkStore; }
/** * Get the TrustedRpkStore to use to determine trust in raw public keys. */
Get the TrustedRpkStore to use to determine trust in raw public keys
getTrustedRpkStore
{ "repo_name": "pax95/camel", "path": "components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java", "license": "apache-2.0", "size": 16550 }
[ "org.eclipse.californium.scandium.dtls.rpkstore.TrustedRpkStore" ]
import org.eclipse.californium.scandium.dtls.rpkstore.TrustedRpkStore;
import org.eclipse.californium.scandium.dtls.rpkstore.*;
[ "org.eclipse.californium" ]
org.eclipse.californium;
1,391,781
public void selectTrack(int type, String trackId) { synchronized (mTrackLock) { if (type == TvTrackInfo.TYPE_AUDIO) { if (trackId != null && !containsTrack(mAudioTracks, trackId)) { Log.w(TAG, "Invalid audio trackId: " + trackId); ...
void function(int type, String trackId) { synchronized (mTrackLock) { if (type == TvTrackInfo.TYPE_AUDIO) { if (trackId != null && !containsTrack(mAudioTracks, trackId)) { Log.w(TAG, STR + trackId); return; } } else if (type == TvTrackInfo.TYPE_VIDEO) { if (trackId != null && !containsTrack(mVideoTracks, trackId)) { Lo...
/** * Selects a track. * * @param type The type of the track to select. The type can be * {@link TvTrackInfo#TYPE_AUDIO}, {@link TvTrackInfo#TYPE_VIDEO} or * {@link TvTrackInfo#TYPE_SUBTITLE}. * @param trackId The ID of the track to select. Whe...
Selects a track
selectTrack
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/base/media/java/android/media/tv/TvInputManager.java", "license": "gpl-3.0", "size": 72558 }
[ "android.os.RemoteException", "android.util.Log" ]
import android.os.RemoteException; import android.util.Log;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
1,604,193
@Override public ApplicationContext getParent() { return this.parent; } /** * {@inheritDoc}
ApplicationContext function() { return this.parent; } /** * {@inheritDoc}
/** * Return the parent context, or {@code null} if there is no parent * (that is, this context is the root of the context hierarchy). */
Return the parent context, or null if there is no parent (that is, this context is the root of the context hierarchy)
getParent
{ "repo_name": "shivpun/spring-framework", "path": "spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java", "license": "apache-2.0", "size": 50409 }
[ "org.springframework.context.ApplicationContext" ]
import org.springframework.context.ApplicationContext;
import org.springframework.context.*;
[ "org.springframework.context" ]
org.springframework.context;
1,583,934
public Builder proxyUser(String proxyUser) { if (proxy == null) { proxy = new ProxyConfig(Proxy.Type.HTTP); } proxy.setProxyUser(proxyUser); return this; }
Builder function(String proxyUser) { if (proxy == null) { proxy = new ProxyConfig(Proxy.Type.HTTP); } proxy.setProxyUser(proxyUser); return this; }
/** * If proxy needs authentication, specify User. * * @param proxyUser Username for authentication. * @return the current {@link Builder} instance */
If proxy needs authentication, specify User
proxyUser
{ "repo_name": "lewis-ing/aerogear-unifiedpush-java-client", "path": "src/main/java/org/jboss/aerogear/unifiedpush/DefaultPushSender.java", "license": "apache-2.0", "size": 12324 }
[ "java.net.Proxy", "org.jboss.aerogear.unifiedpush.model.ProxyConfig" ]
import java.net.Proxy; import org.jboss.aerogear.unifiedpush.model.ProxyConfig;
import java.net.*; import org.jboss.aerogear.unifiedpush.model.*;
[ "java.net", "org.jboss.aerogear" ]
java.net; org.jboss.aerogear;
837,204
@Test public void testWithName() { final UuidElement element = new UuidElement("foo", UuidElement.LEGACY_UUID_SUBTTYPE, UUID.randomUUID()); final UuidElement newElement = element.withName("bar"); assertEquals("bar", newElement.getName()); assertEquals(UuidElement....
void function() { final UuidElement element = new UuidElement("foo", UuidElement.LEGACY_UUID_SUBTTYPE, UUID.randomUUID()); final UuidElement newElement = element.withName("bar"); assertEquals("bar", newElement.getName()); assertEquals(UuidElement.LEGACY_UUID_SUBTTYPE, newElement.getSubType()); assertEquals(element.getU...
/** * Test method for {@link UuidElement#withName(String)}. */
Test method for <code>UuidElement#withName(String)</code>
testWithName
{ "repo_name": "allanbank/mongodb-async-driver", "path": "src/test/java/com/allanbank/mongodb/bson/element/UuidElementTest.java", "license": "apache-2.0", "size": 7875 }
[ "com.allanbank.mongodb.bson.ElementType", "java.util.UUID", "org.junit.Assert" ]
import com.allanbank.mongodb.bson.ElementType; import java.util.UUID; import org.junit.Assert;
import com.allanbank.mongodb.bson.*; import java.util.*; import org.junit.*;
[ "com.allanbank.mongodb", "java.util", "org.junit" ]
com.allanbank.mongodb; java.util; org.junit;
689,985
public Vector<EnvironmentNotification> getNotifications() { if (notifications==null) { notifications = new Vector<EnvironmentNotification>(); } return notifications; }
Vector<EnvironmentNotification> function() { if (notifications==null) { notifications = new Vector<EnvironmentNotification>(); } return notifications; }
/** * Returns the Vector of current EnvironmentNotification's. * @return the notifications */
Returns the Vector of current EnvironmentNotification's
getNotifications
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/simulationService/agents/SimulationManagerAgent.java", "license": "lgpl-2.1", "size": 19411 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,643,677
protected TOutlineCode copyInto(TOutlineCode copyObj, Connection con) throws TorqueException { return copyInto(copyObj, true, con); }
TOutlineCode function(TOutlineCode copyObj, Connection con) throws TorqueException { return copyInto(copyObj, true, con); }
/** * Fills the copyObj with the contents of this object using connection. * The associated objects are also copied and treated as new objects. * * @param copyObj the object to fill. * @param con the database connection to read associated objects. */
Fills the copyObj with the contents of this object using connection. The associated objects are also copied and treated as new objects
copyInto
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTOutlineCode.java", "license": "gpl-3.0", "size": 31613 }
[ "java.sql.Connection", "org.apache.torque.TorqueException" ]
import java.sql.Connection; import org.apache.torque.TorqueException;
import java.sql.*; import org.apache.torque.*;
[ "java.sql", "org.apache.torque" ]
java.sql; org.apache.torque;
1,191,296
public Branch getBranch() { return branch; }
Branch function() { return branch; }
/** * <p>Getter for the field <code>branch</code>.</p> * * @return a {@link org.evosuite.coverage.branch.Branch} object. */
Getter for the field <code>branch</code>
getBranch
{ "repo_name": "sefaakca/EvoSuite-Sefa", "path": "client/src/main/java/org/evosuite/graphs/cfg/ControlDependency.java", "license": "lgpl-3.0", "size": 2923 }
[ "org.evosuite.coverage.branch.Branch" ]
import org.evosuite.coverage.branch.Branch;
import org.evosuite.coverage.branch.*;
[ "org.evosuite.coverage" ]
org.evosuite.coverage;
1,406,576
public MachineLearningServicesDatasetDriftDetectedEventData setStartTime(OffsetDateTime startTime) { this.startTime = startTime; return this; }
MachineLearningServicesDatasetDriftDetectedEventData function(OffsetDateTime startTime) { this.startTime = startTime; return this; }
/** * Set the startTime property: The start time of the target dataset time series that resulted in drift detection. * * @param startTime the startTime value to set. * @return the MachineLearningServicesDatasetDriftDetectedEventData object itself. */
Set the startTime property: The start time of the target dataset time series that resulted in drift detection
setStartTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MachineLearningServicesDatasetDriftDetectedEventData.java", "license": "mit", "size": 7200 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
778,557
try { final ZipFile zip = new ZipFile(jarfile); final ZipArchiveEntry entry = zip.getEntry("app.json"); if (entry != null) { final InputStream is = zip.getInputStream(entry); final JsonReader reader = new JsonReader(new InputStreamReader(is, "UTF-8"));...
try { final ZipFile zip = new ZipFile(jarfile); final ZipArchiveEntry entry = zip.getEntry(STR); if (entry != null) { final InputStream is = zip.getInputStream(entry); final JsonReader reader = new JsonReader(new InputStreamReader(is, "UTF-8")); final AppConfiguration config = new AppConfiguration(); reader.beginObject...
/** * Returns the configuration contained in the jar file or null if no app.json * was found in the file. * * @return The configuration for the jar file or null if none is found. */
Returns the configuration contained in the jar file or null if no app.json was found in the file
getConfig
{ "repo_name": "DudeNamedBen/YoAppServer", "path": "src/main/java/technology/raeder/yoappserver/loader/ConfigurationExtractor.java", "license": "mit", "size": 2312 }
[ "com.google.gson.stream.JsonReader", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.util.logging.Level", "java.util.logging.Logger", "org.apache.commons.compress.archivers.zip.ZipArchiveEntry", "org.apache.commons.compress.archivers.zip.ZipFile" ]
import com.google.gson.stream.JsonReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipFile;
import com.google.gson.stream.*; import java.io.*; import java.util.logging.*; import org.apache.commons.compress.archivers.zip.*;
[ "com.google.gson", "java.io", "java.util", "org.apache.commons" ]
com.google.gson; java.io; java.util; org.apache.commons;
2,093,655
private List<Buffer> getInflightBuffersUnsafe(long checkpointId) { assert Thread.holdsLock(receivedBuffers); checkState(checkpointId == lastBarrierId || lastBarrierId == NONE); final List<Buffer> inflightBuffers = new ArrayList<>(); Iterator<SequenceBuffer> iterator = receivedBuffe...
List<Buffer> function(long checkpointId) { assert Thread.holdsLock(receivedBuffers); checkState(checkpointId == lastBarrierId lastBarrierId == NONE); final List<Buffer> inflightBuffers = new ArrayList<>(); Iterator<SequenceBuffer> iterator = receivedBuffers.iterator(); Iterators.advance(iterator, receivedBuffers.getNum...
/** * Returns a list of buffers, checking the first n non-priority buffers, and skipping all * events. */
Returns a list of buffers, checking the first n non-priority buffers, and skipping all events
getInflightBuffersUnsafe
{ "repo_name": "apache/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java", "license": "apache-2.0", "size": 33150 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.apache.flink.runtime.io.network.buffer.Buffer", "org.apache.flink.shaded.guava30.com.google.common.collect.Iterators", "org.apache.flink.util.Preconditions" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.flink.runtime.io.network.buffer.Buffer; import org.apache.flink.shaded.guava30.com.google.common.collect.Iterators; import org.apache.flink.util.Preconditions;
import java.util.*; import org.apache.flink.runtime.io.network.buffer.*; import org.apache.flink.shaded.guava30.com.google.common.collect.*; import org.apache.flink.util.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
2,100,532
public java.util.List<fr.lip6.move.pnml.symmetricnet.multisets.hlapi.ScalarProductHLAPI> getSubterm_multisets_ScalarProductHLAPI(){ java.util.List<fr.lip6.move.pnml.symmetricnet.multisets.hlapi.ScalarProductHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.multisets.hlapi.ScalarProductHLAPI>(); fo...
java.util.List<fr.lip6.move.pnml.symmetricnet.multisets.hlapi.ScalarProductHLAPI> function(){ java.util.List<fr.lip6.move.pnml.symmetricnet.multisets.hlapi.ScalarProductHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.multisets.hlapi.ScalarProductHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getCla...
/** * This accessor return a list of encapsulated subelement, only of ScalarProductHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of ScalarProductHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_multisets_ScalarProductHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/integers/hlapi/ModuloHLAPI.java", "license": "epl-1.0", "size": 89721 }
[ "fr.lip6.move.pnml.symmetricnet.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.symmetricnet.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.symmetricnet.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
1,424,614
EReference getRegisteredResource_MarketProducts();
EReference getRegisteredResource_MarketProducts();
/** * Returns the meta object for the reference list '{@link CIM.IEC61970.Informative.MarketOperations.RegisteredResource#getMarketProducts <em>Market Products</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Market Products</em>'. * @see CIM.IEC6...
Returns the meta object for the reference list '<code>CIM.IEC61970.Informative.MarketOperations.RegisteredResource#getMarketProducts Market Products</code>'.
getRegisteredResource_MarketProducts
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/MarketOperationsPackage.java", "license": "mit", "size": 688294 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,431,763
public void destroyProxies (BroadPhase broadPhase) { // Destroy proxies in the broad-phase. for (int i = 0; i < m_proxyCount; ++i) { FixtureProxy proxy = m_proxies[i]; broadPhase.destroyProxy(proxy.proxyId); proxy.proxyId = BroadPhase.NULL_PROXY; } m_proxyCount = 0; } private final AABB pool1 = ...
void function (BroadPhase broadPhase) { for (int i = 0; i < m_proxyCount; ++i) { FixtureProxy proxy = m_proxies[i]; broadPhase.destroyProxy(proxy.proxyId); proxy.proxyId = BroadPhase.NULL_PROXY; } m_proxyCount = 0; } private final AABB pool1 = new AABB(); private final AABB pool2 = new AABB(); private final Vec2 displa...
/** Internal method * * @param broadPhase */
Internal method
destroyProxies
{ "repo_name": "domix/libgdx", "path": "backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/Fixture.java", "license": "apache-2.0", "size": 11348 }
[ "org.jbox2d.collision.broadphase.BroadPhase", "org.jbox2d.common.Vec2" ]
import org.jbox2d.collision.broadphase.BroadPhase; import org.jbox2d.common.Vec2;
import org.jbox2d.collision.broadphase.*; import org.jbox2d.common.*;
[ "org.jbox2d.collision", "org.jbox2d.common" ]
org.jbox2d.collision; org.jbox2d.common;
2,000,230
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<AfdOriginGroupInner>> listByProfileSinglePageAsync( String resourceGroupName, String profileName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgum...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<AfdOriginGroupInner>> function( String resourceGroupName, String profileName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentExcept...
/** * Lists all of the existing origin groups within a profile. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique * within the resource group. ...
Lists all of the existing origin groups within a profile
listByProfileSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/AfdOriginGroupsClientImpl.java", "license": "mit", "size": 96553 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.cdn.fluent.models.AfdOriginGroupInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.cdn.fluent.models.AfdOriginGroupInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.cdn.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,601,346
@Test public void testConversionFromXLArrayToObjectArrayMixedObjs() { final XLArray array = XLArray.of(new XLValue[][] { { XLBoolean.TRUE, XLNumber.of(2), XLString.of("test2") } }); final Object converted = CONVERTER.toJavaObject(Object[].class, array); final Object[] results = new Object[] { true, 2., ...
void function() { final XLArray array = XLArray.of(new XLValue[][] { { XLBoolean.TRUE, XLNumber.of(2), XLString.of("test2") } }); final Object converted = CONVERTER.toJavaObject(Object[].class, array); final Object[] results = new Object[] { true, 2., "test2" }; assertEquals(converted, results); }
/** * Tests the conversion from a {@link XLArray}. */
Tests the conversion from a <code>XLArray</code>
testConversionFromXLArrayToObjectArrayMixedObjs
{ "repo_name": "McLeodMoores/xl4j", "path": "xll-core/src/test/java/com/mcleodmoores/xl4j/v1/typeconvert/converters/ObjectArrayXLArrayTypeConverterTest.java", "license": "gpl-3.0", "size": 14179 }
[ "com.mcleodmoores.xl4j.v1.api.values.XLArray", "com.mcleodmoores.xl4j.v1.api.values.XLBoolean", "com.mcleodmoores.xl4j.v1.api.values.XLNumber", "com.mcleodmoores.xl4j.v1.api.values.XLString", "com.mcleodmoores.xl4j.v1.api.values.XLValue", "org.testng.Assert" ]
import com.mcleodmoores.xl4j.v1.api.values.XLArray; import com.mcleodmoores.xl4j.v1.api.values.XLBoolean; import com.mcleodmoores.xl4j.v1.api.values.XLNumber; import com.mcleodmoores.xl4j.v1.api.values.XLString; import com.mcleodmoores.xl4j.v1.api.values.XLValue; import org.testng.Assert;
import com.mcleodmoores.xl4j.v1.api.values.*; import org.testng.*;
[ "com.mcleodmoores.xl4j", "org.testng" ]
com.mcleodmoores.xl4j; org.testng;
345,289
@Test public void getLineStrings() { final List<WkbLineStringZ> strings = Arrays.asList(new WkbLineStringZ(new CoordinateZ(0.0, 0.0, 0.0), new CoordinateZ(0.0, 0.0, 0.0)), ...
void function() { final List<WkbLineStringZ> strings = Arrays.asList(new WkbLineStringZ(new CoordinateZ(0.0, 0.0, 0.0), new CoordinateZ(0.0, 0.0, 0.0)), new WkbLineStringZ(new CoordinateZ(0.0, 0.0, 0.0), new CoordinateZ(0.0, 0.0, 0.0))); assertEquals(STR, strings, new WkbMultiLineStringZ(strings).getLineStrings()); }
/** * Test getLineStrings() */
Test getLineStrings()
getLineStrings
{ "repo_name": "GitHubRGI/swagd", "path": "GeoPackage/src/test/java/com/rgi/geopackage/features/geometry/z/WkbMultiLineStringZTest.java", "license": "mit", "size": 5820 }
[ "java.util.Arrays", "java.util.List", "org.junit.Assert" ]
import java.util.Arrays; import java.util.List; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,162,386
public void setRenderFunction(@Nullable String renderFunction) { this.renderFunction = renderFunction; }
void function(@Nullable String renderFunction) { this.renderFunction = renderFunction; }
/** * Set the render function name (optional). If not specified, the script templates * will be evaluated with {@link ScriptEngine#eval(String, Bindings)}. * <p>This function will be called with the following parameters: * <ol> * <li>{@code String template}: the template content</li> * <li>{@code Map model}...
Set the render function name (optional). If not specified, the script templates will be evaluated with <code>ScriptEngine#eval(String, Bindings)</code>. This function will be called with the following parameters: String template: the template content Map model: the view model RenderingContext context: the rendering con...
setRenderFunction
{ "repo_name": "spring-projects/spring-framework", "path": "spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateConfigurer.java", "license": "apache-2.0", "size": 8608 }
[ "org.springframework.lang.Nullable" ]
import org.springframework.lang.Nullable;
import org.springframework.lang.*;
[ "org.springframework.lang" ]
org.springframework.lang;
2,092,845
public List<String> getFields() { List<String> res = new ArrayList<>(listModel.getSize()); Enumeration<String> elements = listModel.elements(); while (elements.hasMoreElements()) { res.add(elements.nextElement()); } return res; }
List<String> function() { List<String> res = new ArrayList<>(listModel.getSize()); Enumeration<String> elements = listModel.elements(); while (elements.hasMoreElements()) { res.add(elements.nextElement()); } return res; }
/** * Return the current list. */
Return the current list
getFields
{ "repo_name": "bartsch-dev/jabref", "path": "src/main/java/org/jabref/gui/customentrytypes/FieldSetComponent.java", "license": "mit", "size": 11649 }
[ "java.util.ArrayList", "java.util.Enumeration", "java.util.List" ]
import java.util.ArrayList; import java.util.Enumeration; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
658,468
EReference getAttributesTest_Opposite2();
EReference getAttributesTest_Opposite2();
/** * Returns the meta object for the reference '{@link exhaustive.AttributesTest#getOpposite2 <em>Opposite2</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Opposite2</em>'. * @see exhaustive.AttributesTest#getOpposite2() * @see #getAttributesTest()...
Returns the meta object for the reference '<code>exhaustive.AttributesTest#getOpposite2 Opposite2</code>'.
getAttributesTest_Opposite2
{ "repo_name": "diverse-project/melange", "path": "examples/fr.inria.diverse.melange.examples.metamodels.exhaustive/src/main/java/exhaustive/ExhaustivePackage.java", "license": "epl-1.0", "size": 74908 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,042,245
private void processAttribute(CQLAttribute attribute, StringBuilder hql, List<java.lang.Object> parameters, CQLObject queryObject, String queryObjectAlias) { LOG.debug("Processing attribute " + queryObject.getClassName() + "." + attribute.getName()); // construct the attribute path ...
void function(CQLAttribute attribute, StringBuilder hql, List<java.lang.Object> parameters, CQLObject queryObject, String queryObjectAlias) { LOG.debug(STR + queryObject.getClassName() + "." + attribute.getName()); String attributePath = queryObjectAlias + "." + attribute.getName(); hql.append(' '); if (attribute.getUn...
/** * Processes a CQL query attribute into HQL * * @param attribute * The CQL attribute * @param hql * The HQL statement fragment * @param parameters * The positional parameters list * @param associationTrace * The ...
Processes a CQL query attribute into HQL
processAttribute
{ "repo_name": "NCIP/cagrid", "path": "cagrid/Software/core/caGrid/projects/sdk4xCQL2/src/java/processor/org/cagrid/cacore/sdk4x/cql2/processor/CQL2ToParameterizedHQL.java", "license": "bsd-3-clause", "size": 26149 }
[ "java.util.List", "org.cagrid.cql2.AttributeValue", "org.cagrid.cql2.CQLAttribute", "org.cagrid.cql2.CQLObject" ]
import java.util.List; import org.cagrid.cql2.AttributeValue; import org.cagrid.cql2.CQLAttribute; import org.cagrid.cql2.CQLObject;
import java.util.*; import org.cagrid.cql2.*;
[ "java.util", "org.cagrid.cql2" ]
java.util; org.cagrid.cql2;
857,643
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<OrderInner> createOrUpdateAsync(String deviceName, String resourceGroupName, OrderInner order) { return beginCreateOrUpdateAsync(deviceName, resourceGroupName, order) .last() .flatMap(this.client::getLroFinalResultOrError);...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<OrderInner> function(String deviceName, String resourceGroupName, OrderInner order) { return beginCreateOrUpdateAsync(deviceName, resourceGroupName, order) .last() .flatMap(this.client::getLroFinalResultOrError); }
/** * Creates or updates an order. * * @param deviceName The order details of a device. * @param resourceGroupName The resource group name. * @param order The order to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws Managem...
Creates or updates an order
createOrUpdateAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/databoxedge/azure-resourcemanager-databoxedge/src/main/java/com/azure/resourcemanager/databoxedge/implementation/OrdersClientImpl.java", "license": "mit", "size": 47690 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.databoxedge.fluent.models.OrderInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.databoxedge.fluent.models.OrderInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.databoxedge.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,291,530
EAttribute getAttributeRef_Multivalued();
EAttribute getAttributeRef_Multivalued();
/** * Returns the meta object for the attribute '{@link org.eclectic.frontend.mappings.AttributeRef#isMultivalued <em>Multivalued</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Multivalued</em>'. * @see org.eclectic.frontend.mappings.AttributeRef#isM...
Returns the meta object for the attribute '<code>org.eclectic.frontend.mappings.AttributeRef#isMultivalued Multivalued</code>'.
getAttributeRef_Multivalued
{ "repo_name": "jesusc/eclectic", "path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/mappings/MappingsPackage.java", "license": "gpl-3.0", "size": 129327 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
228,077
PluginStatus getStatus(String id);
PluginStatus getStatus(String id);
/** * Return the plugin status for the plugin with the given id. * * @param id * @return */
Return the plugin status for the plugin with the given id
getStatus
{ "repo_name": "gentics/mesh", "path": "mdm/common/src/main/java/com/gentics/mesh/plugin/manager/MeshPluginManager.java", "license": "apache-2.0", "size": 3336 }
[ "com.gentics.mesh.core.rest.plugin.PluginStatus" ]
import com.gentics.mesh.core.rest.plugin.PluginStatus;
import com.gentics.mesh.core.rest.plugin.*;
[ "com.gentics.mesh" ]
com.gentics.mesh;
2,245,372
private boolean detectCycle(LinkedHashSet<String> dependencyAncestors, Set<String> cycles, final String child) { if (dependencyAncestors.contains(child)) { // Find index of the child in the ancestors list int index = -1; for (String s : dependencyAncestors) { index++; if (s.equal...
boolean function(LinkedHashSet<String> dependencyAncestors, Set<String> cycles, final String child) { if (dependencyAncestors.contains(child)) { int index = -1; for (String s : dependencyAncestors) { index++; if (s.equals(child)) { break; } } cycles.add(Joiner.on(STR).join(Iterables.skip(dependencyAncestors, index)) + ...
/** * Returns true if child creates a dependency with any member(s) of dependencyAncestors. * Also adds the stringified cycle to the cycles list */
Returns true if child creates a dependency with any member(s) of dependencyAncestors. Also adds the stringified cycle to the cycles list
detectCycle
{ "repo_name": "streamsets/datacollector", "path": "container/src/main/java/com/streamsets/datacollector/definition/ConfigDefinitionExtractor.java", "license": "apache-2.0", "size": 31341 }
[ "com.google.common.base.Joiner", "com.google.common.collect.Iterables", "java.util.LinkedHashSet", "java.util.Set" ]
import com.google.common.base.Joiner; import com.google.common.collect.Iterables; import java.util.LinkedHashSet; import java.util.Set;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
314,384
public GlobalProperty getGlobalPropertyByUuid(String uuid) throws APIException;
GlobalProperty function(String uuid) throws APIException;
/** * Get a global property by its uuid. There should be only one of these in the database (well, * in the world actually). If multiple are found, an error is thrown. * * @return the global property matching the given uuid * @should find object given valid uuid * @should return null if no object found with...
Get a global property by its uuid. There should be only one of these in the database (well, in the world actually). If multiple are found, an error is thrown
getGlobalPropertyByUuid
{ "repo_name": "Winbobob/openmrs-core", "path": "api/src/main/java/org/openmrs/api/AdministrationService.java", "license": "mpl-2.0", "size": 24849 }
[ "org.openmrs.GlobalProperty" ]
import org.openmrs.GlobalProperty;
import org.openmrs.*;
[ "org.openmrs" ]
org.openmrs;
670,749
public void setUnequipSccpValue(YangUInt32 unequipSccpValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "unequip-sccp", unequipSccpValue, childrenNames()); }
void function(YangUInt32 unequipSccpValue) throws JNCException { setLeafValue(Epc.NAMESPACE, STR, unequipSccpValue, childrenNames()); }
/** * Sets the value for child leaf "unequip-sccp", * using instance of generated typedef class. * @param unequipSccpValue The value to set. * @param unequipSccpValue used during instantiation. */
Sets the value for child leaf "unequip-sccp", using instance of generated typedef class
setUnequipSccpValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/interface_/ss7/RemoteDest.java", "license": "apache-2.0", "size": 57002 }
[ "com.tailf.jnc.YangUInt32" ]
import com.tailf.jnc.YangUInt32;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
2,492,229
@Override public void showDatabases(DataOutputStream outStream, List<String> databases) throws HiveException { try { for (String database : databases) { // create a row per database name outStream.write(database.getBytes("UTF-8")); outStream.write(terminator); } ...
void function(DataOutputStream outStream, List<String> databases) throws HiveException { try { for (String database : databases) { outStream.write(database.getBytes("UTF-8")); outStream.write(terminator); } } catch (IOException e) { throw new HiveException(e); } }
/** * Show the list of databases */
Show the list of databases
showDatabases
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java", "license": "apache-2.0", "size": 17349 }
[ "java.io.DataOutputStream", "java.io.IOException", "java.util.List", "org.apache.hadoop.hive.ql.metadata.HiveException" ]
import java.io.DataOutputStream; import java.io.IOException; import java.util.List; import org.apache.hadoop.hive.ql.metadata.HiveException;
import java.io.*; import java.util.*; import org.apache.hadoop.hive.ql.metadata.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,409,884
SchemaIndexCacheCompoundFuture compoundFut = new SchemaIndexCacheCompoundFuture(); assertFalse(compoundFut.isDone()); GridFutureAdapter<SchemaIndexCacheStat> fut0 = new GridFutureAdapter<>(); GridFutureAdapter<SchemaIndexCacheStat> fut1 = new GridFutureAdapter<>(); GridFutureAdapter<Sch...
SchemaIndexCacheCompoundFuture compoundFut = new SchemaIndexCacheCompoundFuture(); assertFalse(compoundFut.isDone()); GridFutureAdapter<SchemaIndexCacheStat> fut0 = new GridFutureAdapter<>(); GridFutureAdapter<SchemaIndexCacheStat> fut1 = new GridFutureAdapter<>(); GridFutureAdapter<SchemaIndexCacheStat> fut2 = new Gri...
/** * Checks the correctness {@link SchemaIndexCacheCompoundFuture}. */
Checks the correctness <code>SchemaIndexCacheCompoundFuture</code>
testSchemaIndexCacheCompoundFeature
{ "repo_name": "chandresh-pancholi/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/StopRebuildIndexTest.java", "license": "apache-2.0", "size": 9794 }
[ "org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheCompoundFuture", "org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheStat", "org.apache.ignite.internal.util.future.GridFutureAdapter" ]
import org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheCompoundFuture; import org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheStat; import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.processors.query.schema.*; import org.apache.ignite.internal.util.future.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,277,177
public List<Integer> getDays() { return Collections.unmodifiableList(days); }
List<Integer> function() { return Collections.unmodifiableList(days); }
/** * Gets days. * * @return The number of commits for each day of the week. 0 = Sunday, 1 = Monday, etc. */
Gets days
getDays
{ "repo_name": "kohsuke/github-api", "path": "src/main/java/org/kohsuke/github/GHRepositoryStatistics.java", "license": "mit", "size": 14303 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,955,636
public long insertOrReplace(String table, ContentValues cv) { long id; try { id = sDb.insertWithOnConflict(table, null, cv, SQLiteDatabase.CONFLICT_REPLACE); } catch (SQLException e) { Log.e("sql update", Log.getStackTraceString(e)); throw(e); } catch (Exception e) { Log.e("sql update - u...
long function(String table, ContentValues cv) { long id; try { id = sDb.insertWithOnConflict(table, null, cv, SQLiteDatabase.CONFLICT_REPLACE); } catch (SQLException e) { Log.e(STR, Log.getStackTraceString(e)); throw(e); } catch (Exception e) { Log.e(STR, Log.getStackTraceString(e)); throw(new SQLException(e.getMessage...
/** * insert a row or replace on conflict<br/> * * @param table * @param cv * @return */
insert a row or replace on conflict
insertOrReplace
{ "repo_name": "DSolyom/AndroidDSFramework", "path": "FrameworkV4/frameworkv4/src/main/java/ds/framework/v4/db/Db.java", "license": "apache-2.0", "size": 12322 }
[ "android.content.ContentValues", "android.database.SQLException", "android.database.sqlite.SQLiteDatabase", "android.util.Log" ]
import android.content.ContentValues; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.util.Log;
import android.content.*; import android.database.*; import android.database.sqlite.*; import android.util.*;
[ "android.content", "android.database", "android.util" ]
android.content; android.database; android.util;
2,483,479
public void loadTrashContents(InputStream source) throws BlockLoadingException { mTrashCategory = BlocklyXmlHelper.loadToolboxFromXml(source, mBlockFactory, BlocklyEvent.WORKSPACE_ID_TRASH); }
void function(InputStream source) throws BlockLoadingException { mTrashCategory = BlocklyXmlHelper.loadToolboxFromXml(source, mBlockFactory, BlocklyEvent.WORKSPACE_ID_TRASH); }
/** * Loads a list of blocks into the trash from an input stream. The trash is loaded like a * toolbox and can have a name, color, and set of blocks to start with. Unlike a toolbox it may * not have subcategories. * * @param source The source to initialize the trash. * @throws BlockLoading...
Loads a list of blocks into the trash from an input stream. The trash is loaded like a toolbox and can have a name, color, and set of blocks to start with. Unlike a toolbox it may not have subcategories
loadTrashContents
{ "repo_name": "Axe-Ishmael/Blockly", "path": "src/blocklylib-core/src/main/java/com/google/blockly/model/Workspace.java", "license": "apache-2.0", "size": 13689 }
[ "com.google.blockly.utils.BlockLoadingException", "com.google.blockly.utils.BlocklyXmlHelper", "java.io.InputStream" ]
import com.google.blockly.utils.BlockLoadingException; import com.google.blockly.utils.BlocklyXmlHelper; import java.io.InputStream;
import com.google.blockly.utils.*; import java.io.*;
[ "com.google.blockly", "java.io" ]
com.google.blockly; java.io;
913,921