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 static void verify(ClassReader cr, boolean dump, PrintWriter pw) { ClassNode cn = new ClassNode(); cr.accept(new CheckClassAdapter(cn), true); List methods = cn.methods; for (int i = 0; i < methods.size(); ++i) { MethodNode method = (MethodNode) methods.get(i); ...
static void function(ClassReader cr, boolean dump, PrintWriter pw) { ClassNode cn = new ClassNode(); cr.accept(new CheckClassAdapter(cn), true); List methods = cn.methods; for (int i = 0; i < methods.size(); ++i) { MethodNode method = (MethodNode) methods.get(i); if (method.instructions.size() > 0) { Analyzer a = new A...
/** * Checks a given class * * @param cr a <code>ClassReader</code> that contains bytecode for the analysis. * @param dump true if bytecode should be printed out not only when errors are found. * @param pw write where results going to be printed */
Checks a given class
verify
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/tools/external/asm/org/objectweb/asm/util/CheckClassAdapter.java", "license": "gpl-2.0", "size": 15719 }
[ "java.io.PrintWriter", "java.util.List", "org.objectweb.asm.ClassReader", "org.objectweb.asm.Opcodes", "org.objectweb.asm.Type", "org.objectweb.asm.tree.AbstractInsnNode", "org.objectweb.asm.tree.ClassNode", "org.objectweb.asm.tree.MethodNode", "org.objectweb.asm.tree.TryCatchBlockNode", "org.obje...
import java.io.PrintWriter; import java.util.List; import org.objectweb.asm.ClassReader; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.MethodNode; import org.objectweb.asm.tree.TryCa...
import java.io.*; import java.util.*; import org.objectweb.asm.*; import org.objectweb.asm.tree.*; import org.objectweb.asm.tree.analysis.*;
[ "java.io", "java.util", "org.objectweb.asm" ]
java.io; java.util; org.objectweb.asm;
648,894
private void linkOperationsToOutputs() { for (DataBean dataBean : dataBeans.values()) { String operationId = dataTypes.get(dataBean).getResultOf(); OperationRecord operationRecord = null; if (operationId != null) { operationRecord = operationRecords.get(operationId); } // if operation record...
void function() { for (DataBean dataBean : dataBeans.values()) { String operationId = dataTypes.get(dataBean).getResultOf(); OperationRecord operationRecord = null; if (operationId != null) { operationRecord = operationRecords.get(operationId); } if (operationRecord == null) { operationRecord = OperationRecord.getUnkow...
/** * Add links form DataBeans to the OperationRecord which created the DataBean. * * If OperationRecord is not found, use unknown OperationRecord. * */
Add links form DataBeans to the OperationRecord which created the DataBean. If OperationRecord is not found, use unknown OperationRecord
linkOperationsToOutputs
{ "repo_name": "ilarischeinin/chipster", "path": "src/main/java/fi/csc/microarray/client/session/SessionLoaderImpl2.java", "license": "gpl-3.0", "size": 18152 }
[ "fi.csc.microarray.client.operation.OperationRecord", "fi.csc.microarray.databeans.DataBean" ]
import fi.csc.microarray.client.operation.OperationRecord; import fi.csc.microarray.databeans.DataBean;
import fi.csc.microarray.client.operation.*; import fi.csc.microarray.databeans.*;
[ "fi.csc.microarray" ]
fi.csc.microarray;
2,555,203
public static PublicKey generatePublicKey(String encodedPublicKey) { try { byte[] decodedKey = Base64.decode(encodedPublicKey); KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); ...
static PublicKey function(String encodedPublicKey) { try { byte[] decodedKey = Base64.decode(encodedPublicKey); KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM); return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey)); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e...
/** * Generates a PublicKey instance from a string containing the * Base64-encoded public key. * * @param encodedPublicKey Base64-encoded public key * @throws IllegalArgumentException if encodedPublicKey is invalid */
Generates a PublicKey instance from a string containing the Base64-encoded public key
generatePublicKey
{ "repo_name": "zyjiang08/servestream", "path": "src/net/sourceforge/servestream/billing/Security.java", "license": "apache-2.0", "size": 5025 }
[ "android.util.Log", "java.security.KeyFactory", "java.security.NoSuchAlgorithmException", "java.security.PublicKey", "java.security.spec.InvalidKeySpecException", "java.security.spec.X509EncodedKeySpec" ]
import android.util.Log; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.security.spec.X509EncodedKeySpec;
import android.util.*; import java.security.*; import java.security.spec.*;
[ "android.util", "java.security" ]
android.util; java.security;
2,222,837
Set<TransportConfiguration> getAcceptorConfigurations();
Set<TransportConfiguration> getAcceptorConfigurations();
/** * Returns the acceptors configured for this server. */
Returns the acceptors configured for this server
getAcceptorConfigurations
{ "repo_name": "gtully/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java", "license": "apache-2.0", "size": 38585 }
[ "java.util.Set", "org.apache.activemq.artemis.api.core.TransportConfiguration" ]
import java.util.Set; import org.apache.activemq.artemis.api.core.TransportConfiguration;
import java.util.*; import org.apache.activemq.artemis.api.core.*;
[ "java.util", "org.apache.activemq" ]
java.util; org.apache.activemq;
2,559,731
@Override public void removeVetoableChangeListener(String name, VetoableChangeListener vcl) { m_bcSupport.removeVetoableChangeListener(name, vcl); }
void function(String name, VetoableChangeListener vcl) { m_bcSupport.removeVetoableChangeListener(name, vcl); }
/** * Remove a vetoable change listener from this bean * * @param name the name of the property of interest * @param vcl a <code>VetoableChangeListener</code> value */
Remove a vetoable change listener from this bean
removeVetoableChangeListener
{ "repo_name": "ModelWriter/Deliverables", "path": "WP2/D2.5.2_Generation/Jeni/lib/weka-src/src/main/java/weka/gui/beans/DataVisualizer.java", "license": "epl-1.0", "size": 26969 }
[ "java.beans.VetoableChangeListener" ]
import java.beans.VetoableChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
3,153
PatchingHistory getHistory() { return history; }
PatchingHistory getHistory() { return history; }
/** * Get the patch history. * * @return the history */
Get the patch history
getHistory
{ "repo_name": "aloubyansky/wildfly-core", "path": "patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java", "license": "lgpl-2.1", "size": 41800 }
[ "org.jboss.as.patching.tool.PatchingHistory" ]
import org.jboss.as.patching.tool.PatchingHistory;
import org.jboss.as.patching.tool.*;
[ "org.jboss.as" ]
org.jboss.as;
982,475
@SuppressWarnings("deprecation") @SuppressLint("NewApi") private void showNotification (Builder notification) { NotificationManager mgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); int id = 0; try { id = Integer.parseIn...
@SuppressWarnings(STR) @SuppressLint(STR) void function (Builder notification) { NotificationManager mgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); int id = 0; try { id = Integer.parseInt(options.getId()); } catch (Exception e) {} if (Build.VERSION.SDK_INT<16) { mgr.notify(id, notif...
/** * Shows the notification */
Shows the notification
showNotification
{ "repo_name": "viniciusgandrade/cordova-plugin-local-notifications07", "path": "src/android/Receiver.java", "license": "apache-2.0", "size": 6294 }
[ "android.annotation.SuppressLint", "android.app.Notification", "android.app.NotificationManager", "android.content.Context", "android.os.Build" ]
import android.annotation.SuppressLint; import android.app.Notification; import android.app.NotificationManager; import android.content.Context; import android.os.Build;
import android.annotation.*; import android.app.*; import android.content.*; import android.os.*;
[ "android.annotation", "android.app", "android.content", "android.os" ]
android.annotation; android.app; android.content; android.os;
2,296,102
@SuppressWarnings("javadoc") protected void firePacketSendingListeners(final Stanza packet) { final List<StanzaListener> listenersToNotify = new LinkedList<StanzaListener>(); synchronized (sendListeners) { for (ListenerWrapper listenerWrapper : sendListeners.values()) { ...
@SuppressWarnings(STR) void function(final Stanza packet) { final List<StanzaListener> listenersToNotify = new LinkedList<StanzaListener>(); synchronized (sendListeners) { for (ListenerWrapper listenerWrapper : sendListeners.values()) { if (listenerWrapper.filterMatches(packet)) { listenersToNotify.add(listenerWrapper....
/** * Process all stanza(/packet) listeners for sending packets. * <p> * Compared to {@link #firePacketInterceptors(Stanza)}, the listeners will be invoked in a new thread. * </p> * * @param packet the stanza(/packet) to process. */
Process all stanza(/packet) listeners for sending packets. Compared to <code>#firePacketInterceptors(Stanza)</code>, the listeners will be invoked in a new thread.
firePacketSendingListeners
{ "repo_name": "Tibo-lg/Smack", "path": "smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java", "license": "apache-2.0", "size": 64856 }
[ "java.util.LinkedList", "java.util.List", "org.jivesoftware.smack.packet.Stanza" ]
import java.util.LinkedList; import java.util.List; import org.jivesoftware.smack.packet.Stanza;
import java.util.*; import org.jivesoftware.smack.packet.*;
[ "java.util", "org.jivesoftware.smack" ]
java.util; org.jivesoftware.smack;
1,916,326
public static void removeAllServiceEndpoint(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { Base.removeAll(model, instanceResource, SERVICEENDPOINT); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { Base.removeAll(model, instanceResource, SERVICEENDPOINT); }
/** * Removes all values of property ServiceEndpoint * @param model an RDF2Go * model * * @param resource * an RDF2Go resource * * [Generated from RDFReactor template rule #removeall1static] */
Removes all values of property ServiceEndpoint model
removeAllServiceEndpoint
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-sioc-services/src/main/java/org/rdfs/sioc/services/Service.java", "license": "mit", "size": 80965 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
2,349,280
private boolean isGatewayIp(IpAddress targetIp) { return osNetworkService.subnets().stream() .filter(Objects::nonNull) .filter(subnet -> subnet.getGateway() != null) .anyMatch(subnet -> subnet.getGateway().equals(targetIp.toString())); }
boolean function(IpAddress targetIp) { return osNetworkService.subnets().stream() .filter(Objects::nonNull) .filter(subnet -> subnet.getGateway() != null) .anyMatch(subnet -> subnet.getGateway().equals(targetIp.toString())); }
/** * Denotes whether the given target IP is gateway IP. * * @param targetIp target IP address * @return true if the given targetIP is gateway IP, false otherwise. */
Denotes whether the given target IP is gateway IP
isGatewayIp
{ "repo_name": "opennetworkinglab/onos", "path": "apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java", "license": "apache-2.0", "size": 46900 }
[ "java.util.Objects", "org.onlab.packet.IpAddress" ]
import java.util.Objects; import org.onlab.packet.IpAddress;
import java.util.*; import org.onlab.packet.*;
[ "java.util", "org.onlab.packet" ]
java.util; org.onlab.packet;
103,309
public void realClose(boolean calledExplicitly, boolean issueRollback, boolean skipLocalTeardown, Throwable reason) throws SQLException { SQLException sqlEx = null; if (this.isClosed()) { return; } this.forceClosedReason = reason; try { if (!skipLocalTeardown) { if (!getAutoCommit() && ...
void function(boolean calledExplicitly, boolean issueRollback, boolean skipLocalTeardown, Throwable reason) throws SQLException { SQLException sqlEx = null; if (this.isClosed()) { return; } this.forceClosedReason = reason; try { if (!skipLocalTeardown) { if (!getAutoCommit() && issueRollback) { try { rollback(); } catc...
/** * Closes connection and frees resources. * * @param calledExplicitly * is this being called from close() * @param issueRollback * should a rollback() be issued? * @throws SQLException * if an error occurs */
Closes connection and frees resources
realClose
{ "repo_name": "cppexpert/mysql-connector-java-with-uuid-support", "path": "src/com/mysql/jdbc/ConnectionImpl.java", "license": "gpl-2.0", "size": 181221 }
[ "com.mysql.jdbc.profiler.ProfilerEvent", "java.sql.SQLException" ]
import com.mysql.jdbc.profiler.ProfilerEvent; import java.sql.SQLException;
import com.mysql.jdbc.profiler.*; import java.sql.*;
[ "com.mysql.jdbc", "java.sql" ]
com.mysql.jdbc; java.sql;
1,510,732
public void unpack(final ObjectDataMap map) { zorder.setByText(map.getInteger("zorder", zorder.value()).getAsText()); gridMajor.setByText(map.getDouble("major", gridMajor.value()).getAsText()); gridMinor.setByText(map.getDouble("minor", gridMinor.value()).getAsText()); snapMajor.setB...
void function(final ObjectDataMap map) { zorder.setByText(map.getInteger(STR, zorder.value()).getAsText()); gridMajor.setByText(map.getDouble("major", gridMajor.value()).getAsText()); gridMinor.setByText(map.getDouble("minor", gridMinor.value()).getAsText()); snapMajor.setByText(map.getBoolean(STR, snapMajor.value()).g...
/** * unpack the map and build the layer * * @param map * where the data is stored */
unpack the map and build the layer
unpack
{ "repo_name": "jeffrey-io/zer", "path": "src/main/java/io/jeffrey/zer/meta/LayerProperties.java", "license": "apache-2.0", "size": 4158 }
[ "io.jeffrey.zer.edits.ObjectDataMap" ]
import io.jeffrey.zer.edits.ObjectDataMap;
import io.jeffrey.zer.edits.*;
[ "io.jeffrey.zer" ]
io.jeffrey.zer;
2,494,578
public void setUniverse(Universe universe) { this.universe.set(universe); }
void function(Universe universe) { this.universe.set(universe); }
/** * Sets the universe. * * @param universe * the universe. */
Sets the universe
setUniverse
{ "repo_name": "VT-Visionarium/osnap", "path": "src/main/java/edu/vt/arc/vis/osnap/gui/LayoutDetailsVBox.java", "license": "apache-2.0", "size": 18712 }
[ "edu.vt.arc.vis.osnap.graph.Universe" ]
import edu.vt.arc.vis.osnap.graph.Universe;
import edu.vt.arc.vis.osnap.graph.*;
[ "edu.vt.arc" ]
edu.vt.arc;
1,422,898
public void update(DSCallFeedbackEvent fe) { Object o = fe.getPartialResult(); if (o != null) { if (Boolean.valueOf(false).equals(o)) { onException(MESSAGE_RUN, null); } else if (o instanceof ProcessCallback) { callBack = (ProcessCallback) ...
void function(DSCallFeedbackEvent fe) { Object o = fe.getPartialResult(); if (o != null) { if (Boolean.valueOf(false).equals(o)) { onException(MESSAGE_RUN, null); } else if (o instanceof ProcessCallback) { callBack = (ProcessCallback) o; callBack.setAdapter(this); activity.onCallBackSet(); if (cancelled) cancel(); } } ...
/** * Stores the call-back. * @see UserNotifierLoader#update(DSCallFeedbackEvent) */
Stores the call-back
update
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/ui/ScriptRunner.java", "license": "gpl-2.0", "size": 4767 }
[ "org.openmicroscopy.shoola.env.data.events.DSCallFeedbackEvent", "org.openmicroscopy.shoola.env.data.views.ProcessCallback" ]
import org.openmicroscopy.shoola.env.data.events.DSCallFeedbackEvent; import org.openmicroscopy.shoola.env.data.views.ProcessCallback;
import org.openmicroscopy.shoola.env.data.events.*; import org.openmicroscopy.shoola.env.data.views.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
2,590,582
private void putReleaseGradeNotificationOptionIntoContext(SessionState state, Context context) { if (state.getAttribute(Assignment.ASSIGNMENT_RELEASEGRADE_NOTIFICATION_VALUE) == null) { // set the notification value using site default to be none: no email will be sent to student when the grade is released ...
void function(SessionState state, Context context) { if (state.getAttribute(Assignment.ASSIGNMENT_RELEASEGRADE_NOTIFICATION_VALUE) == null) { state.setAttribute(Assignment.ASSIGNMENT_RELEASEGRADE_NOTIFICATION_VALUE, Assignment.ASSIGNMENT_RELEASEGRADE_NOTIFICATION_NONE); } context.put(STR, ASSIGNMENT_RELEASEGRADE_NOTIFI...
/** * put the release grade notification options into context * @param state * @param context */
put the release grade notification options into context
putReleaseGradeNotificationOptionIntoContext
{ "repo_name": "udayg/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 672322 }
[ "org.sakaiproject.assignment.api.Assignment", "org.sakaiproject.cheftool.Context", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.assignment.api.Assignment; import org.sakaiproject.cheftool.Context; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.assignment.api.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.assignment", "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
org.sakaiproject.assignment; org.sakaiproject.cheftool; org.sakaiproject.event;
1,838,584
//----------------------------------------------------------------------- public final MetaProperty<String> classifier() { return _classifier; }
final MetaProperty<String> function() { return _classifier; }
/** * The meta-property for the {@code classifier} property. * @return the meta-property, not null */
The meta-property for the classifier property
classifier
{ "repo_name": "McLeodMoores/starling", "path": "projects/component/src/main/java/com/opengamma/component/factory/master/AbstractDbMasterComponentFactory.java", "license": "apache-2.0", "size": 26707 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
2,673,506
public static CharBuffer createCharBuffer(int size) { return createByteBuffer(size << 1).asCharBuffer(); }
static CharBuffer function(int size) { return createByteBuffer(size << 1).asCharBuffer(); }
/** * Construct a direct native-order charbuffer with the specified number * of elements. * @param size The size, in chars * @return an CharBuffer */
Construct a direct native-order charbuffer with the specified number of elements
createCharBuffer
{ "repo_name": "SenshiSentou/SourceFight", "path": "slick_dev/trunk/Slick-AE/src/org/lwjgl/BufferUtils.java", "license": "bsd-2-clause", "size": 6261 }
[ "java.nio.CharBuffer" ]
import java.nio.CharBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,447,035
public void openMenu(int direction) { setScaleDirection(direction); isOpened = true; AnimatorSet scaleDown_activity = buildScaleDownAnimation(viewActivity, mScaleValue, mScaleValue); AnimatorSet scaleDown_shadow = buildScaleDownAnimation(imageViewShadow, mScaleValue + shadowAdjustScaleX, mScaleVal...
void function(int direction) { setScaleDirection(direction); isOpened = true; AnimatorSet scaleDown_activity = buildScaleDownAnimation(viewActivity, mScaleValue, mScaleValue); AnimatorSet scaleDown_shadow = buildScaleDownAnimation(imageViewShadow, mScaleValue + shadowAdjustScaleX, mScaleValue + shadowAdjustScaleY); Ani...
/** * show the reside menu; */
show the reside menu
openMenu
{ "repo_name": "wyyyy/library", "path": "src/com/special/ResideMenu/ResideMenu.java", "license": "apache-2.0", "size": 16266 }
[ "com.nineoldandroids.animation.AnimatorSet" ]
import com.nineoldandroids.animation.AnimatorSet;
import com.nineoldandroids.animation.*;
[ "com.nineoldandroids.animation" ]
com.nineoldandroids.animation;
2,266,577
protected Message getResponseMessage(Exchange exchange, ChannelHandlerContext ctx, Object message) throws Exception { Object body = message; if (LOG.isDebugEnabled()) { LOG.debug("Channel: {} received body: {}", new Object[]{ctx.channel(), body}); } // if textline enabl...
Message function(Exchange exchange, ChannelHandlerContext ctx, Object message) throws Exception { Object body = message; if (LOG.isDebugEnabled()) { LOG.debug(STR, new Object[]{ctx.channel(), body}); } if (producer.getConfiguration().isTextline()) { body = producer.getContext().getTypeConverter().mandatoryConvertTo(Str...
/** * Gets the Camel {@link Message} to use as the message to be set on the current {@link Exchange} when * we have received a reply message. * <p/> * * @param exchange the current exchange * @param ctx the channel handler context * @param message the incoming event which ...
Gets the Camel <code>Message</code> to use as the message to be set on the current <code>Exchange</code> when we have received a reply message.
getResponseMessage
{ "repo_name": "jonmcewen/camel", "path": "components/camel-netty4/src/main/java/org/apache/camel/component/netty4/handlers/ClientChannelHandler.java", "license": "apache-2.0", "size": 10563 }
[ "io.netty.channel.ChannelHandlerContext", "org.apache.camel.Exchange", "org.apache.camel.Message", "org.apache.camel.component.netty4.NettyPayloadHelper", "org.apache.camel.util.ExchangeHelper" ]
import io.netty.channel.ChannelHandlerContext; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.component.netty4.NettyPayloadHelper; import org.apache.camel.util.ExchangeHelper;
import io.netty.channel.*; import org.apache.camel.*; import org.apache.camel.component.netty4.*; import org.apache.camel.util.*;
[ "io.netty.channel", "org.apache.camel" ]
io.netty.channel; org.apache.camel;
918,287
private static <T> void setAccumuloProperty(Class<?> implementingClass, Configuration conf, Property property, T value) { if (isSupportedAccumuloProperty(property)) { String val = String.valueOf(value); if (property.getType().isValidFormat(val)) conf.set(enumToConfKey(implementingClass, Opts.A...
static <T> void function(Class<?> implementingClass, Configuration conf, Property property, T value) { if (isSupportedAccumuloProperty(property)) { String val = String.valueOf(value); if (property.getType().isValidFormat(val)) conf.set(enumToConfKey(implementingClass, Opts.ACCUMULO_PROPERTIES) + "." + property.getKey()...
/** * Helper for transforming Accumulo configuration properties into something that can be stored safely inside the Hadoop Job configuration. * * @param implementingClass * the class whose name will be used as a prefix for the property configuration key * @param conf * the Hadoop con...
Helper for transforming Accumulo configuration properties into something that can be stored safely inside the Hadoop Job configuration
setAccumuloProperty
{ "repo_name": "adamjshook/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/FileOutputConfigurator.java", "license": "apache-2.0", "size": 7943 }
[ "org.apache.accumulo.core.conf.Property", "org.apache.hadoop.conf.Configuration" ]
import org.apache.accumulo.core.conf.Property; import org.apache.hadoop.conf.Configuration;
import org.apache.accumulo.core.conf.*; import org.apache.hadoop.conf.*;
[ "org.apache.accumulo", "org.apache.hadoop" ]
org.apache.accumulo; org.apache.hadoop;
1,942,677
return new TestSuite(MonthDateFormatTests.class); } public MonthDateFormatTests(String name) { super(name); }
return new TestSuite(MonthDateFormatTests.class); } public MonthDateFormatTests(String name) { super(name); }
/** * Returns the tests as a test suite. * * @return The test suite. */
Returns the tests as a test suite
suite
{ "repo_name": "linuxuser586/jfreechart", "path": "tests/org/jfree/chart/axis/junit/MonthDateFormatTests.java", "license": "lgpl-2.1", "size": 6219 }
[ "junit.framework.TestSuite" ]
import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
934,854
public Timestamp getUpdated(); public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR;
/** Get Updated. * Date this record was updated */
Get Updated. Date this record was updated
getUpdated
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_AD_Workflow.java", "license": "gpl-2.0", "size": 16817 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,426,786
public FeatureResultSet queryFeaturesForChunk(BoundingBox boundingBox, Projection projection, Map<String, Object> fieldValues, String orderBy, int limit, long offset) { return queryFeaturesForChunk(false, boundingBox, projection, fieldValues, orderBy, limit, offset); }
FeatureResultSet function(BoundingBox boundingBox, Projection projection, Map<String, Object> fieldValues, String orderBy, int limit, long offset) { return queryFeaturesForChunk(false, boundingBox, projection, fieldValues, orderBy, limit, offset); }
/** * Query for features within the bounding box in the provided projection, * starting at the offset and returning no more than the limit * * @param boundingBox * bounding box * @param projection * projection * @param fieldValues * field values * @param orderBy *...
Query for features within the bounding box in the provided projection, starting at the offset and returning no more than the limit
queryFeaturesForChunk
{ "repo_name": "ngageoint/geopackage-java", "path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java", "license": "mit", "size": 349361 }
[ "java.util.Map", "mil.nga.geopackage.BoundingBox", "mil.nga.geopackage.features.user.FeatureResultSet", "mil.nga.proj.Projection" ]
import java.util.Map; import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureResultSet; import mil.nga.proj.Projection;
import java.util.*; import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*; import mil.nga.proj.*;
[ "java.util", "mil.nga.geopackage", "mil.nga.proj" ]
java.util; mil.nga.geopackage; mil.nga.proj;
1,962,587
public ACData[] selectQCQfromDE(ACData de_[]);
ACData[] function(ACData de_[]);
/** * Select the Forms/Templates affected by the Data Elements provided. * * @param de_ * The data element list. * @return The array of related forms/templates. */
Select the Forms/Templates affected by the Data Elements provided
selectQCQfromDE
{ "repo_name": "NCIP/cadsr-sentinel", "path": "software/src/java/gov/nih/nci/cadsr/sentinel/database/DBAlert.java", "license": "bsd-3-clause", "size": 73851 }
[ "gov.nih.nci.cadsr.sentinel.tool.ACData" ]
import gov.nih.nci.cadsr.sentinel.tool.ACData;
import gov.nih.nci.cadsr.sentinel.tool.*;
[ "gov.nih.nci" ]
gov.nih.nci;
572,831
private void queueEvent(final Event event) { ArrayList<EventHandler> eventHandlers = mEventTypeMap.get(event.getClass()); if (eventHandlers == null) { return; } // Prepare this event boolean hasPostedEvent = false; event.onPreDispatch();
void function(final Event event) { ArrayList<EventHandler> eventHandlers = mEventTypeMap.get(event.getClass()); if (eventHandlers == null) { return; } boolean hasPostedEvent = false; event.onPreDispatch();
/** * Adds a new message. */
Adds a new message
queueEvent
{ "repo_name": "xorware/android_frameworks_base", "path": "packages/SystemUI/src/com/android/systemui/recents/events/EventBus.java", "license": "apache-2.0", "size": 39441 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,357,729
private int getCategory() { EditText categoryField = (EditText) findViewById(R.id.category_id); return Integer.parseInt(categoryField.getText().toString()); }
int function() { EditText categoryField = (EditText) findViewById(R.id.category_id); return Integer.parseInt(categoryField.getText().toString()); }
/** * Return the value of the category field. * @return the current value of the category text field */
Return the value of the category field
getCategory
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/CellBroadcastReceiver/tests/src/com/android/cellbroadcastreceiver/tests/SendTestBroadcastActivity.java", "license": "gpl-3.0", "size": 19929 }
[ "android.widget.EditText" ]
import android.widget.EditText;
import android.widget.*;
[ "android.widget" ]
android.widget;
569,055
public static void main(String[] args) { JFreeChart chart = createChart(createDataset()); Display display = new Display(); Shell shell = new Shell(display); shell.setSize(600, 400); shell.setLayout(new FillLayout()); shell.setText("Test for jfreechart running wit...
static void function(String[] args) { JFreeChart chart = createChart(createDataset()); Display display = new Display(); Shell shell = new Shell(display); shell.setSize(600, 400); shell.setLayout(new FillLayout()); shell.setText(STR); final ChartComposite frame = new ChartComposite(shell, SWT.NONE, chart, true); frame.p...
/** * Starting point for the demonstration application. * * @param args ignored. */
Starting point for the demonstration application
main
{ "repo_name": "raincs13/phd", "path": "swt/org/jfree/experimental/chart/swt/demo/SWTPieChartDemo1.java", "license": "lgpl-2.1", "size": 4174 }
[ "org.eclipse.swt.layout.FillLayout", "org.eclipse.swt.widgets.Display", "org.eclipse.swt.widgets.Shell", "org.jfree.chart.JFreeChart", "org.jfree.experimental.chart.swt.ChartComposite" ]
import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.jfree.chart.JFreeChart; import org.jfree.experimental.chart.swt.ChartComposite;
import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.jfree.chart.*; import org.jfree.experimental.chart.swt.*;
[ "org.eclipse.swt", "org.jfree.chart", "org.jfree.experimental" ]
org.eclipse.swt; org.jfree.chart; org.jfree.experimental;
923,305
@SuppressWarnings("unchecked") @Test @Deprecated public void testCallback() { final List<Document> docs = Arrays.asList(BuilderFactory.start() .add("score", 1).build()); final Callback<MongoIterator<com.allanbank.mongodb.builder.TextResult>> mockCallback = EasyMock ...
@SuppressWarnings(STR) void function() { final List<Document> docs = Arrays.asList(BuilderFactory.start() .add("score", 1).build()); final Callback<MongoIterator<com.allanbank.mongodb.builder.TextResult>> mockCallback = EasyMock .createMock(Callback.class); final Capture<MongoIterator<com.allanbank.mongodb.builder.Text...
/** * Test method for {@link TextCallback#callback}. */
Test method for <code>TextCallback#callback</code>
testCallback
{ "repo_name": "allanbank/mongodb-async-driver", "path": "src/test/java/com/allanbank/mongodb/client/callback/TextCallbackTest.java", "license": "apache-2.0", "size": 3776 }
[ "com.allanbank.mongodb.Callback", "com.allanbank.mongodb.MongoIterator", "com.allanbank.mongodb.bson.Document", "com.allanbank.mongodb.bson.builder.BuilderFactory", "com.allanbank.mongodb.client.SimpleMongoIteratorImpl", "java.util.Arrays", "java.util.Collections", "java.util.List", "org.easymock.Ca...
import com.allanbank.mongodb.Callback; import com.allanbank.mongodb.MongoIterator; import com.allanbank.mongodb.bson.Document; import com.allanbank.mongodb.bson.builder.BuilderFactory; import com.allanbank.mongodb.client.SimpleMongoIteratorImpl; import java.util.Arrays; import java.util.Collections; import java.util.Li...
import com.allanbank.mongodb.*; import com.allanbank.mongodb.bson.*; import com.allanbank.mongodb.bson.builder.*; import com.allanbank.mongodb.client.*; import java.util.*; import org.easymock.*; import org.hamcrest.*; import org.junit.*;
[ "com.allanbank.mongodb", "java.util", "org.easymock", "org.hamcrest", "org.junit" ]
com.allanbank.mongodb; java.util; org.easymock; org.hamcrest; org.junit;
2,351,892
LoggingEvent decode(String event);
LoggingEvent decode(String event);
/** * Decode event from string. * @param event string representation of event * @return event */
Decode event from string
decode
{ "repo_name": "apache/log4j-extras", "path": "src/main/java/org/apache/log4j/receivers/spi/Decoder.java", "license": "apache-2.0", "size": 1929 }
[ "org.apache.log4j.spi.LoggingEvent" ]
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.spi.*;
[ "org.apache.log4j" ]
org.apache.log4j;
1,745,424
private static Configuration getConfigurationWithoutSharedEdits( Configuration conf) throws IOException { List<URI> editsDirs = FSNamesystem.getNamespaceEditsDirs(conf, false); String editsDirsString = Joiner.on(",").join(editsDirs); Configuration confWithoutShared = new Configuration(conf); ...
static Configuration function( Configuration conf) throws IOException { List<URI> editsDirs = FSNamesystem.getNamespaceEditsDirs(conf, false); String editsDirsString = Joiner.on(",").join(editsDirs); Configuration confWithoutShared = new Configuration(conf); confWithoutShared.unset(DFSConfigKeys.DFS_NAMENODE_SHARED_EDI...
/** * Clone the supplied configuration but remove the shared edits dirs. * * @param conf Supplies the original configuration. * @return Cloned configuration without the shared edit dirs. * @throws IOException on failure to generate the configuration. */
Clone the supplied configuration but remove the shared edits dirs
getConfigurationWithoutSharedEdits
{ "repo_name": "an3m0na/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java", "license": "apache-2.0", "size": 67290 }
[ "com.google.common.base.Joiner", "java.io.IOException", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hdfs.DFSConfigKeys" ]
import com.google.common.base.Joiner; import java.io.IOException; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.DFSConfigKeys;
import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*;
[ "com.google.common", "java.io", "java.util", "org.apache.hadoop" ]
com.google.common; java.io; java.util; org.apache.hadoop;
1,480,942
public static void compile(SoyFileSet sfs, ByteSink jarTarget, Optional<ByteSink> srcJarTarget) throws IOException { // compileToJar disallows external calls so we don't need to enforce the external call // requirement here. sfs.compileToJar(jarTarget, srcJarTarget); }
static void function(SoyFileSet sfs, ByteSink jarTarget, Optional<ByteSink> srcJarTarget) throws IOException { sfs.compileToJar(jarTarget, srcJarTarget); }
/** * Compile a set of Soy files into corresponding Java class files in a jar. * * @param sfs the files to compile. It must not include files that perform external because JbcSrc * needs callee information to generate correct escaping code. * @param jarTarget Receives a JAR file containing the classe...
Compile a set of Soy files into corresponding Java class files in a jar
compile
{ "repo_name": "rpatil26/closure-templates", "path": "java/src/com/google/template/soy/SoyToJbcSrcCompiler.java", "license": "apache-2.0", "size": 2898 }
[ "com.google.common.base.Optional", "com.google.common.io.ByteSink", "java.io.IOException" ]
import com.google.common.base.Optional; import com.google.common.io.ByteSink; import java.io.IOException;
import com.google.common.base.*; import com.google.common.io.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
2,587,408
public SecretKey engineResolveSecretKey( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException{ throw new UnsupportedOperationException(); }
SecretKey function( Element element, String baseURI, StorageResolver storage ) throws KeyResolverException{ throw new UnsupportedOperationException(); }
/** * Method engineResolveSecretKey * * @param element * @param baseURI * @param storage * @return resolved SecretKey key from the registered from the elements * * @throws KeyResolverException */
Method engineResolveSecretKey
engineResolveSecretKey
{ "repo_name": "Legostaev/xmlsec-gost", "path": "src/main/java/org/apache/xml/security/keys/keyresolver/KeyResolverSpi.java", "license": "apache-2.0", "size": 9058 }
[ "javax.crypto.SecretKey", "org.apache.xml.security.keys.storage.StorageResolver", "org.w3c.dom.Element" ]
import javax.crypto.SecretKey; import org.apache.xml.security.keys.storage.StorageResolver; import org.w3c.dom.Element;
import javax.crypto.*; import org.apache.xml.security.keys.storage.*; import org.w3c.dom.*;
[ "javax.crypto", "org.apache.xml", "org.w3c.dom" ]
javax.crypto; org.apache.xml; org.w3c.dom;
1,879,302
public void setParticipacaoLocalService( ParticipacaoLocalService participacaoLocalService) { this.participacaoLocalService = participacaoLocalService; }
void function( ParticipacaoLocalService participacaoLocalService) { this.participacaoLocalService = participacaoLocalService; }
/** * Sets the participacao local service. * * @param participacaoLocalService the participacao local service */
Sets the participacao local service
setParticipacaoLocalService
{ "repo_name": "camaradosdeputadosoficial/edemocracia", "path": "cd-graficos-portlet/src/main/java/br/gov/camara/edemocracia/portlets/graficos/service/base/GraficosLocalServiceBaseImpl.java", "license": "lgpl-2.1", "size": 10622 }
[ "br.gov.camara.edemocracia.portlets.graficos.service.ParticipacaoLocalService" ]
import br.gov.camara.edemocracia.portlets.graficos.service.ParticipacaoLocalService;
import br.gov.camara.edemocracia.portlets.graficos.service.*;
[ "br.gov.camara" ]
br.gov.camara;
1,495,557
public static MozuUrl updateDiscountUrl(Integer discountId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/discounts/{discountId}?responseFields={responseFields}"); formatter.formatUrl("discountId", discountId); formatter.formatUrl("responseFields", respons...
static MozuUrl function(Integer discountId, String responseFields) { UrlFormatter formatter = new UrlFormatter(STR); formatter.formatUrl(STR, discountId); formatter.formatUrl(STR, responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
/** * Get Resource Url for UpdateDiscount * @param discountId discountId parameter description DOCUMENT_HERE * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attemptin...
Get Resource Url for UpdateDiscount
updateDiscountUrl
{ "repo_name": "Mozu/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/DiscountUrl.java", "license": "mit", "size": 7718 }
[ "com.mozu.api.MozuUrl", "com.mozu.api.utils.UrlFormatter" ]
import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter;
import com.mozu.api.*; import com.mozu.api.utils.*;
[ "com.mozu.api" ]
com.mozu.api;
2,013,421
public void createTables(String database, Map<String, String> replacer) { m_errorLogging = true; executeSql(database, "create_tables.sql", replacer, true); }
void function(String database, Map<String, String> replacer) { m_errorLogging = true; executeSql(database, STR, replacer, true); }
/** * Calls the create tables script for the given database.<p> * * @param database the name of the database * @param replacer the replacements to perform in the drop script */
Calls the create tables script for the given database
createTables
{ "repo_name": "it-tavis/opencms-core", "path": "src-setup/org/opencms/setup/CmsSetupDb.java", "license": "lgpl-2.1", "size": 26182 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
171,922
@Override public Range findRangeBounds(XYDataset dataset) { return findRangeBounds(dataset, true); }
Range function(XYDataset dataset) { return findRangeBounds(dataset, true); }
/** * Returns the range of values the renderer requires to display all the * items from the specified dataset. * * @param dataset the dataset ({@code null} permitted). * * @return The range ({@code null} if the dataset is {@code null} or empty). */
Returns the range of values the renderer requires to display all the items from the specified dataset
findRangeBounds
{ "repo_name": "jfree/jfreechart-fse", "path": "src/main/java/org/jfree/chart/renderer/xy/YIntervalRenderer.java", "license": "lgpl-2.1", "size": 12013 }
[ "org.jfree.data.Range", "org.jfree.data.xy.XYDataset" ]
import org.jfree.data.Range; import org.jfree.data.xy.XYDataset;
import org.jfree.data.*; import org.jfree.data.xy.*;
[ "org.jfree.data" ]
org.jfree.data;
578,545
public SecurityRulesClient getSecurityRules() { return this.securityRules; } private final DefaultSecurityRulesClient defaultSecurityRules;
SecurityRulesClient function() { return this.securityRules; } private final DefaultSecurityRulesClient defaultSecurityRules;
/** * Gets the SecurityRulesClient object to access its operations. * * @return the SecurityRulesClient object. */
Gets the SecurityRulesClient object to access its operations
getSecurityRules
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagementClientImpl.java", "license": "mit", "size": 60665 }
[ "com.azure.resourcemanager.network.fluent.DefaultSecurityRulesClient", "com.azure.resourcemanager.network.fluent.SecurityRulesClient" ]
import com.azure.resourcemanager.network.fluent.DefaultSecurityRulesClient; import com.azure.resourcemanager.network.fluent.SecurityRulesClient;
import com.azure.resourcemanager.network.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,107,364
@Override protected void actionPerformed(GuiButton parButton) { if (parButton.id == 30) { //If airship has small inv module installed if(this.airship.getModuleInventorySmall()) { NetworkHandler.sendToServer(new MessageGuiModuleInventorySmall()); } //If a...
void function(GuiButton parButton) { if (parButton.id == 30) { if(this.airship.getModuleInventorySmall()) { NetworkHandler.sendToServer(new MessageGuiModuleInventorySmall()); } else if(this.airship.getModuleInventoryLarge()) { NetworkHandler.sendToServer(new MessageGuiModuleInventoryLarge()); } else if(this.airship.get...
/** * Called by the controls from the buttonList when activated. (Mouse pressed for buttons) */
Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
actionPerformed
{ "repo_name": "Weisses/Ebonheart-Mods", "path": "ViesCraft/Archived/zzzsrc/main/java/com/viesis/viescraft/client/gui/airship/frames/GuiAirshipAppearancePg1.java", "license": "mit", "size": 7665 }
[ "com.viesis.viescraft.network.NetworkHandler", "com.viesis.viescraft.network.server.airship.MessageGuiDefault", "com.viesis.viescraft.network.server.airship.MessageGuiModuleInventoryLarge", "com.viesis.viescraft.network.server.airship.MessageGuiModuleInventorySmall", "com.viesis.viescraft.network.server.air...
import com.viesis.viescraft.network.NetworkHandler; import com.viesis.viescraft.network.server.airship.MessageGuiDefault; import com.viesis.viescraft.network.server.airship.MessageGuiModuleInventoryLarge; import com.viesis.viescraft.network.server.airship.MessageGuiModuleInventorySmall; import com.viesis.viescraft.netw...
import com.viesis.viescraft.network.*; import com.viesis.viescraft.network.server.airship.*; import com.viesis.viescraft.network.server.appearance.*; import net.minecraft.client.gui.*;
[ "com.viesis.viescraft", "net.minecraft.client" ]
com.viesis.viescraft; net.minecraft.client;
2,237,276
public void start( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; thi...
void function( Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister) throws SAXException{ try { if(!hasStarted()) { this.bean = (BeanT)context.getCurrentState().getTarget(); this.acc = acc; this.lister = lister; this.pack = lister.startPacking(bean,acc); } } catch (AccessorException e) { Loader.handleGener...
/** * Starts the packing scope, without adding any item. * * This allows us to return an empty pack, thereby allowing the user * to distinguish empty array vs null array. */
Starts the packing scope, without adding any item. This allows us to return an empty pack, thereby allowing the user to distinguish empty array vs null array
start
{ "repo_name": "JetBrains/jdk8u_jaxws", "path": "src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Scope.java", "license": "gpl-2.0", "size": 4460 }
[ "com.sun.xml.internal.bind.api.AccessorException", "com.sun.xml.internal.bind.v2.runtime.reflect.Accessor", "com.sun.xml.internal.bind.v2.runtime.reflect.Lister", "org.xml.sax.SAXException" ]
import com.sun.xml.internal.bind.api.AccessorException; import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor; import com.sun.xml.internal.bind.v2.runtime.reflect.Lister; import org.xml.sax.SAXException;
import com.sun.xml.internal.bind.api.*; import com.sun.xml.internal.bind.v2.runtime.reflect.*; import org.xml.sax.*;
[ "com.sun.xml", "org.xml.sax" ]
com.sun.xml; org.xml.sax;
261,182
public void setCms(CmsObject cms) { m_cms = cms; }
void function(CmsObject cms) { m_cms = cms; }
/** * Sets the cms.<p> * * @param cms the cms to set */
Sets the cms
setCms
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/jsp/decorator/CmsDecoratorConfiguration.java", "license": "lgpl-2.1", "size": 16013 }
[ "org.opencms.file.CmsObject" ]
import org.opencms.file.CmsObject;
import org.opencms.file.*;
[ "org.opencms.file" ]
org.opencms.file;
2,352,634
Location getLocation();
Location getLocation();
/** * Return the location of the statement in the sitemap. */
Return the location of the statement in the sitemap
getLocation
{ "repo_name": "apache/cocoon", "path": "core/cocoon-sitemap/cocoon-sitemap-api/src/main/java/org/apache/cocoon/sitemap/ExecutionContext.java", "license": "apache-2.0", "size": 1395 }
[ "org.apache.cocoon.util.location.Location" ]
import org.apache.cocoon.util.location.Location;
import org.apache.cocoon.util.location.*;
[ "org.apache.cocoon" ]
org.apache.cocoon;
1,049,700
// ------ non-public methods ------- protected static void print(PrintWriter out, String str) { if (str == null) return; out.print(filterTags(str)); }
static void function(PrintWriter out, String str) { if (str == null) return; out.print(filterTags(str)); }
/** * Prints the supplied text to the writer, after filtering and replacing * characters which need to be "escaped" in HTML. */
Prints the supplied text to the writer, after filtering and replacing characters which need to be "escaped" in HTML
print
{ "repo_name": "Distrotech/icedtea6-1.12", "path": "src/jtreg/com/sun/javatest/httpd/JThttpProvider.java", "license": "gpl-2.0", "size": 4863 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,923,020
//TODO: read some actual mets file from test index @Test public void testGetSource() { try (Response response = target(urls.path(RECORDS_RECORD, RECORDS_METADATA_SOURCE).params(PI).build()) .request() .accept(MediaType.TEXT_XML) .get()) { a...
void function() { try (Response response = target(urls.path(RECORDS_RECORD, RECORDS_METADATA_SOURCE).params(PI).build()) .request() .accept(MediaType.TEXT_XML) .get()) { assertEquals(STR, 404, response.getStatus()); assertNotNull(STR, response.getEntity()); String entity = response.readEntity(String.class); assertNotNu...
/** * Test method for {@link io.goobi.viewer.api.rest.v1.records.RecordResource#getSource(java.lang.String)}. */
Test method for <code>io.goobi.viewer.api.rest.v1.records.RecordResource#getSource(java.lang.String)</code>
testGetSource
{ "repo_name": "intranda/goobi-viewer-core", "path": "goobi-viewer-core/src/test/java/io/goobi/viewer/api/rest/v1/records/RecordResourceTest.java", "license": "gpl-2.0", "size": 11345 }
[ "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.json.JSONObject", "org.junit.Assert" ]
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.json.JSONObject; import org.junit.Assert;
import javax.ws.rs.core.*; import org.json.*; import org.junit.*;
[ "javax.ws", "org.json", "org.junit" ]
javax.ws; org.json; org.junit;
2,425,526
private static Matcher readStoredMd5(File md5File) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader( Files.newInputStream(md5File.toPath()), Charsets.UTF_8)); String md5Line; try { md5Line = reader.readLine(); if (md5Line == null) { md5L...
static Matcher function(File md5File) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader( Files.newInputStream(md5File.toPath()), Charsets.UTF_8)); String md5Line; try { md5Line = reader.readLine(); if (md5Line == null) { md5Line = STRError reading md5 file at STRInvalid MD5 file STR:...
/** * Read the md5 file stored alongside the given data file * and match the md5 file content. * @param dataFile the file containing data * @return a matcher with two matched groups * where group(1) is the md5 string and group(2) is the data file path. */
Read the md5 file stored alongside the given data file and match the md5 file content
readStoredMd5
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/MD5FileUtils.java", "license": "apache-2.0", "size": 6509 }
[ "com.google.common.base.Charsets", "java.io.BufferedReader", "java.io.File", "java.io.IOException", "java.io.InputStreamReader", "java.nio.file.Files", "java.util.regex.Matcher" ]
import com.google.common.base.Charsets; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.nio.file.Files; import java.util.regex.Matcher;
import com.google.common.base.*; import java.io.*; import java.nio.file.*; import java.util.regex.*;
[ "com.google.common", "java.io", "java.nio", "java.util" ]
com.google.common; java.io; java.nio; java.util;
2,772,764
protected void loadData2(final LoadStats totals, final String resource, final String baseURL, final RDFFormat rdfFormat, final boolean endOfBatch) throws IOException { if (log.isInfoEnabled()) log.info("loading: " + resource); // The stringValue() of the URI of ...
void function(final LoadStats totals, final String resource, final String baseURL, final RDFFormat rdfFormat, final boolean endOfBatch) throws IOException { if (log.isInfoEnabled()) log.info(STR + resource); String defaultGraph = null; InputStream rdfStream = getClass().getResourceAsStream(resource); if (rdfStream != n...
/** * Load an RDF resource into the database. * * @param resource * Either the name of a resource which can be resolved using the * CLASSPATH, or the name of a resource in the local file system, * or a URL. * @param baseURL * @param rdfFormat ...
Load an RDF resource into the database
loadData2
{ "repo_name": "smalyshev/blazegraph", "path": "bigdata-rdf/src/java/com/bigdata/rdf/store/DataLoader.java", "license": "gpl-2.0", "size": 50536 }
[ "com.bigdata.rdf.rio.LoadStats", "java.io.BufferedReader", "java.io.File", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.io.Reader", "org.openrdf.rio.RDFFormat" ]
import com.bigdata.rdf.rio.LoadStats; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import org.openrdf.rio.RDFFormat;
import com.bigdata.rdf.rio.*; import java.io.*; import org.openrdf.rio.*;
[ "com.bigdata.rdf", "java.io", "org.openrdf.rio" ]
com.bigdata.rdf; java.io; org.openrdf.rio;
2,879,966
FileInStream openFile(AlluxioURI path) throws FileDoesNotExistException, IOException, AlluxioException;
FileInStream openFile(AlluxioURI path) throws FileDoesNotExistException, IOException, AlluxioException;
/** * Convenience method for {@link #openFile(AlluxioURI, OpenFileOptions)} with default options. * * @param path the file to read from * @return a {@link FileInStream} for the given path * @throws IOException if a non-Alluxio exception occurs * @throws FileDoesNotExistException if the given file does...
Convenience method for <code>#openFile(AlluxioURI, OpenFileOptions)</code> with default options
openFile
{ "repo_name": "bit-zyl/Alluxio-Nvdimm", "path": "core/client/src/main/java/alluxio/client/file/FileSystem.java", "license": "apache-2.0", "size": 17942 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,077,840
public Serializable[] generate(Dialect dialect, ICommonDao dao, Object[] pojos, FieldMapping idFieldInfo, boolean writevalue) throws SQLException;
Serializable[] function(Dialect dialect, ICommonDao dao, Object[] pojos, FieldMapping idFieldInfo, boolean writevalue) throws SQLException;
/** * Generate new identifiers. for batch * @param dialect * @param dao * @param pojos * @param idFieldInfo * @param writevalue * @return * @throws SQLException */
Generate new identifiers. for batch
generate
{ "repo_name": "xunchangguo/u-orm", "path": "src/org/uorm/dao/id/IdentifierGenerator.java", "license": "apache-2.0", "size": 3080 }
[ "java.io.Serializable", "java.sql.SQLException", "org.uorm.dao.common.ICommonDao", "org.uorm.dao.dialect.Dialect", "org.uorm.orm.annotation.FieldMapping" ]
import java.io.Serializable; import java.sql.SQLException; import org.uorm.dao.common.ICommonDao; import org.uorm.dao.dialect.Dialect; import org.uorm.orm.annotation.FieldMapping;
import java.io.*; import java.sql.*; import org.uorm.dao.common.*; import org.uorm.dao.dialect.*; import org.uorm.orm.annotation.*;
[ "java.io", "java.sql", "org.uorm.dao", "org.uorm.orm" ]
java.io; java.sql; org.uorm.dao; org.uorm.orm;
664,036
public File toPackage() throws IOException { return toPackage(DFLT_FMT); }
File function() throws IOException { return toPackage(DFLT_FMT); }
/** * Returns bag serialized as an archive file using default packaging (zip * archive). * * @return file the bag archive package * @throws IOException */
Returns bag serialized as an archive file using default packaging (zip archive)
toPackage
{ "repo_name": "pericles-project/PeriCAT", "path": "ExternalTools/bagit-master/src/main/java/edu/mit/lib/bagit/Filler.java", "license": "apache-2.0", "size": 18449 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,645,669
public Message audioCommand() { sendCommand(cd_CMD_INCOMING_AUDIO_EQUIP); try { return readMessages(CD_REPLY_OUTGOING_AUDIO_EQUIP); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; }
Message function() { sendCommand(cd_CMD_INCOMING_AUDIO_EQUIP); try { return readMessages(CD_REPLY_OUTGOING_AUDIO_EQUIP); } catch (IOException e) { e.printStackTrace(); } return null; }
/** * <quote> * * 4.8.1 Incoming Audio Command (cd) * * 4.8.3 Outgoing Audio Command (CD) * * </quote> * * @return message of type OutgoingAudioCommand */
4.8.1 Incoming Audio Command (cd) 4.8.3 Outgoing Audio Command (CD)
audioCommand
{ "repo_name": "cdhesse/ElkM1API", "path": "src/com/elkm1api/ElkM1Controller.java", "license": "apache-2.0", "size": 32257 }
[ "com.elkm1api.messages.Message", "java.io.IOException" ]
import com.elkm1api.messages.Message; import java.io.IOException;
import com.elkm1api.messages.*; import java.io.*;
[ "com.elkm1api.messages", "java.io" ]
com.elkm1api.messages; java.io;
2,786,240
public ISVNRemoteResource getRemoteResource() { return this.currentRemoteResource; }
ISVNRemoteResource function() { return this.currentRemoteResource; }
/** * get the remote resource from which we want the history * * @return */
get the remote resource from which we want the history
getRemoteResource
{ "repo_name": "subclipse/subclipse", "path": "bundles/subclipse.ui/src/org/tigris/subversion/subclipse/ui/history/HistoryTableProvider.java", "license": "epl-1.0", "size": 20501 }
[ "org.tigris.subversion.subclipse.core.ISVNRemoteResource" ]
import org.tigris.subversion.subclipse.core.ISVNRemoteResource;
import org.tigris.subversion.subclipse.core.*;
[ "org.tigris.subversion" ]
org.tigris.subversion;
2,135,785
public Status sendTap(UiController uiController, float[] coordinates, float[] precision);
Status function(UiController uiController, float[] coordinates, float[] precision);
/** * Sends a MotionEvent to the given UiController. * * @param uiController a UiController to use to send MotionEvents to the screen. * @param coordinates a float[] with x and y values of center of the tap. * @param precision a float[] with x and y values of precision of the tap. * @return The statu...
Sends a MotionEvent to the given UiController
sendTap
{ "repo_name": "djodjoni/tarator-deprecated", "path": "tarator/src/main/java/org/djodjo/tarator/action/Tapper.java", "license": "apache-2.0", "size": 1052 }
[ "org.djodjo.tarator.UiController" ]
import org.djodjo.tarator.UiController;
import org.djodjo.tarator.*;
[ "org.djodjo.tarator" ]
org.djodjo.tarator;
757,950
public Vector2f localiseVector(Vector2f vec) { vec.setX(vec.x - TABLE_LOCATION_X); vec.setY(vec.y - TABLE_LOCATION_Y); vec.setX(SynergyNetPositioning.getPixelValue(vec.x)); vec.setY(SynergyNetPositioning.getPixelValue(vec.y)); vec.setX(vec.x - (displayWidth / 2)); vec.setY(vec.y - (displayHeight / 2)...
Vector2f function(Vector2f vec) { vec.setX(vec.x - TABLE_LOCATION_X); vec.setY(vec.y - TABLE_LOCATION_Y); vec.setX(SynergyNetPositioning.getPixelValue(vec.x)); vec.setY(SynergyNetPositioning.getPixelValue(vec.y)); vec.setX(vec.x - (displayWidth / 2)); vec.setY(vec.y - (displayHeight / 2)); vec.rotateAroundOrigin(-TABLE...
/** * Localise vector. * * @param vec * the vec * @return the vector2f */
Localise vector
localiseVector
{ "repo_name": "synergynet/synergynet3.1", "path": "synergynet3-tracking/synergynet3-tracking-table/src/main/java/synergynet3/tracking/applications/TrackedApp.java", "license": "bsd-3-clause", "size": 17069 }
[ "com.jme3.math.Vector2f" ]
import com.jme3.math.Vector2f;
import com.jme3.math.*;
[ "com.jme3.math" ]
com.jme3.math;
1,333,267
public void setRepository( Repository repository ) { this.repository = repository; if ( transMeta != null ) { transMeta.setRepository( repository ); } }
void function( Repository repository ) { this.repository = repository; if ( transMeta != null ) { transMeta.setRepository( repository ); } }
/** * Sets the repository object for the transformation. * * @param repository * the repository object to set */
Sets the repository object for the transformation
setRepository
{ "repo_name": "ma459006574/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 191984 }
[ "org.pentaho.di.repository.Repository" ]
import org.pentaho.di.repository.Repository;
import org.pentaho.di.repository.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,772,059
@Nullable private static BinaryContext pushContext(BinaryContext ctx) { BinaryContext old = BINARY_CTX.get(); BINARY_CTX.set(ctx); return old; }
@Nullable static BinaryContext function(BinaryContext ctx) { BinaryContext old = BINARY_CTX.get(); BINARY_CTX.set(ctx); return old; }
/** * Push binary context and return the old one. * * @param ctx Binary context. * @return Old binary context. */
Push binary context and return the old one
pushContext
{ "repo_name": "tkpanther/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/binary/GridBinaryMarshaller.java", "license": "apache-2.0", "size": 10181 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,700,890
public void writeArray(double[] source) throws IOException;
void function(double[] source) throws IOException;
/** * Writes an array of doubles. * @param source the array to write * @exception IOException on an IO error */
Writes an array of doubles
writeArray
{ "repo_name": "jmaassen/AetherIO", "path": "src/nl/esciencecenter/aether/io/DataOutput.java", "license": "apache-2.0", "size": 6740 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,840,332
static void targetAddExports(String pn, Module who) throws Exception { Class<?> helper = Class.forName("p.Helper"); Method m = helper.getMethod("exportPackage", String.class, Module.class); m.invoke(null, pn, who); }
static void targetAddExports(String pn, Module who) throws Exception { Class<?> helper = Class.forName(STR); Method m = helper.getMethod(STR, String.class, Module.class); m.invoke(null, pn, who); }
/** * Update target module to export a package to the given module. */
Update target module to export a package to the given module
targetAddExports
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "test/java/lang/reflect/Module/access/src/test/test/Main.java", "license": "gpl-2.0", "size": 5743 }
[ "java.lang.reflect.Method", "java.lang.reflect.Module" ]
import java.lang.reflect.Method; import java.lang.reflect.Module;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,388,308
protected void record(Actor added, Actor parent, Actor before, Actor after, TreeOperations.InsertPosition position) { StringBuilder line; String filename; filename = Environment.getInstance().getHome() + File.separator + FILENAME_ADDHISTORY; // header? if (!new File(filename).exists()) ...
void function(Actor added, Actor parent, Actor before, Actor after, TreeOperations.InsertPosition position) { StringBuilder line; String filename; filename = Environment.getInstance().getHome() + File.separator + FILENAME_ADDHISTORY; if (!new File(filename).exists()) { line = new StringBuilder(); line.append(STR); line...
/** * Records the actor that was added. * * @param added the actor that was added * @param parent the parent of the added actor * @param before the immediate actor before the added actor, can be null * @param after the immediate actor after the added actor, can be null * @param position how the ac...
Records the actor that was added
record
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/flow/tree/ActorSuggestion.java", "license": "gpl-3.0", "size": 9973 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,525,369
public GitClient fetch(FetchData data) { CommandLineProcess<?> process = invokeGenerically(GIT_FETCH_PROCESS_NAME, false, "fetch", data.getRepository()); String errOut = getErrOut(process, true); if (!errOut.startsWith("From ")) { throw new AutomationException("Unexpected error o...
GitClient function(FetchData data) { CommandLineProcess<?> process = invokeGenerically(GIT_FETCH_PROCESS_NAME, false, "fetch", data.getRepository()); String errOut = getErrOut(process, true); if (!errOut.startsWith(STR)) { throw new AutomationException(STR + errOut); } return this; }
/** Downloads objects and refs from another repository. * @param data a {@link FetchData} object for specifying which data to fetch * @return a reference to <code>this</code> */
Downloads objects and refs from another repository
fetch
{ "repo_name": "AludraTest/aludratest", "path": "src/main/java/org/aludratest/service/gitclient/GitClient.java", "license": "apache-2.0", "size": 28327 }
[ "org.aludratest.exception.AutomationException", "org.aludratest.service.cmdline.CommandLineProcess", "org.aludratest.service.gitclient.data.FetchData" ]
import org.aludratest.exception.AutomationException; import org.aludratest.service.cmdline.CommandLineProcess; import org.aludratest.service.gitclient.data.FetchData;
import org.aludratest.exception.*; import org.aludratest.service.cmdline.*; import org.aludratest.service.gitclient.data.*;
[ "org.aludratest.exception", "org.aludratest.service" ]
org.aludratest.exception; org.aludratest.service;
1,188,020
@Test public void testSingle() throws Exception { Float[] expected = new Float[] { 1.1f, 2.2f, 3.3f }; String name = "arr"; File outFile = temp.newFile( "singletmp.mat" ); //create MLSingle type MLSingle single = new MLSingle( nam...
void function() throws Exception { Float[] expected = new Float[] { 1.1f, 2.2f, 3.3f }; String name = "arr"; File outFile = temp.newFile( STR ); MLSingle single = new MLSingle( name, expected, 1); assertEquals(expected[0], single.get(0) ); assertEquals(expected[1], single.get(1) ); assertEquals(expected[2], single.get(...
/** * Tests the mxSINGLE * @throws Exception */
Tests the mxSINGLE
testSingle
{ "repo_name": "gradusnikov/jmatio", "path": "src/test/java/com/jmatio/test/MatIOTest.java", "license": "bsd-3-clause", "size": 40596 }
[ "com.jmatio.io.MatFileReader", "com.jmatio.io.MatFileWriter", "com.jmatio.types.MLArray", "com.jmatio.types.MLSingle", "java.io.File", "java.util.Arrays", "org.junit.Assert" ]
import com.jmatio.io.MatFileReader; import com.jmatio.io.MatFileWriter; import com.jmatio.types.MLArray; import com.jmatio.types.MLSingle; import java.io.File; import java.util.Arrays; import org.junit.Assert;
import com.jmatio.io.*; import com.jmatio.types.*; import java.io.*; import java.util.*; import org.junit.*;
[ "com.jmatio.io", "com.jmatio.types", "java.io", "java.util", "org.junit" ]
com.jmatio.io; com.jmatio.types; java.io; java.util; org.junit;
680,872
public static Builder builder(RestClient restClient) { return new Builder(restClient); } public enum Scheme { HTTP("http"), HTTPS("https"); private final String name; Scheme(String name) { this.name = name; }
static Builder function(RestClient restClient) { return new Builder(restClient); } public enum Scheme { HTTP("http"), HTTPS("https"); private final String name; Scheme(String name) { this.name = name; }
/** * Returns a new {@link Builder} to help with {@link HostsSniffer} creation. */
Returns a new <code>Builder</code> to help with <code>HostsSniffer</code> creation
builder
{ "repo_name": "danielmitterdorfer/elasticsearch", "path": "client/sniffer/src/main/java/org/elasticsearch/client/sniff/HostsSniffer.java", "license": "apache-2.0", "size": 7775 }
[ "org.elasticsearch.client.RestClient" ]
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.*;
[ "org.elasticsearch.client" ]
org.elasticsearch.client;
1,256,062
private void writeEsc (char ch[], int start, int length, boolean isAttVal) throws IOException { escapeHandler.escape(ch, start, length, isAttVal, output); } //////////////////////////////////////////////////////////////////// // Constants. ////////...
void function (char ch[], int start, int length, boolean isAttVal) throws IOException { escapeHandler.escape(ch, start, length, isAttVal, output); } private final Attributes EMPTY_ATTS = new AttributesImpl(); private int elementLevel = 0; private Writer output; private String encoding; private boolean writeXmlDecl = tr...
/** * Write an array of data characters with escaping. * * @param ch The array of characters. * @param start The starting position. * @param length The number of characters to use. * @param isAttVal true if this is an attribute value literal. */
Write an array of data characters with escaping
writeEsc
{ "repo_name": "samskivert/ikvm-openjdk", "path": "build/linux-amd64/impsrc/com/sun/xml/internal/bind/marshaller/XMLWriter.java", "license": "gpl-2.0", "size": 31867 }
[ "java.io.IOException", "java.io.Writer", "org.xml.sax.Attributes", "org.xml.sax.helpers.AttributesImpl" ]
import java.io.IOException; import java.io.Writer; import org.xml.sax.Attributes; import org.xml.sax.helpers.AttributesImpl;
import java.io.*; import org.xml.sax.*; import org.xml.sax.helpers.*;
[ "java.io", "org.xml.sax" ]
java.io; org.xml.sax;
4,328
PackageManager packageManager = mContext.getPackageManager(); List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); assertNotNull(resolveInfoList); // one or more activity can handle this intent. assertTrue(resolveInfoList.size() > 0); }
PackageManager packageManager = mContext.getPackageManager(); List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0); assertNotNull(resolveInfoList); assertTrue(resolveInfoList.size() > 0); }
/** * Assert target intent can be handled by at least one Activity. * @param intent - the Intent will be handled. */
Assert target intent can be handled by at least one Activity
assertCanBeHandled
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "cts/tests/tests/content/src/android/content/cts/AvailableIntentsTest.java", "license": "gpl-3.0", "size": 8644 }
[ "android.content.pm.PackageManager", "android.content.pm.ResolveInfo", "java.util.List" ]
import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import java.util.List;
import android.content.pm.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
2,279,224
protected void register(String ssoId, Principal principal, String authType, String username, String password) { if (containerLog.isDebugEnabled()) { containerLog.debug(sm.getString("singleSignOn.debug.register", ssoId, principal != null ? principal.getName(...
void function(String ssoId, Principal principal, String authType, String username, String password) { if (containerLog.isDebugEnabled()) { containerLog.debug(sm.getString(STR, ssoId, principal != null ? principal.getName() : "", authType)); } cache.put(ssoId, new SingleSignOnEntry(principal, authType, username, passwor...
/** * Register the specified Principal as being associated with the specified * value for the single sign on identifier. * * @param ssoId Single sign on identifier to register * @param principal Associated user principal that is identified * @param authType Authentication type used to auth...
Register the specified Principal as being associated with the specified value for the single sign on identifier
register
{ "repo_name": "mayonghui2112/helloWorld", "path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/catalina/authenticator/SingleSignOn.java", "license": "apache-2.0", "size": 25343 }
[ "java.security.Principal" ]
import java.security.Principal;
import java.security.*;
[ "java.security" ]
java.security;
1,861,503
public Range getDomainBounds(List visibleSeriesKeys, boolean includeInterval) { Range result = null; Iterator iterator = visibleSeriesKeys.iterator(); while (iterator.hasNext()) { Comparable seriesKey = (Comparable) iterator.next(); TimeSeries series...
Range function(List visibleSeriesKeys, boolean includeInterval) { Range result = null; Iterator iterator = visibleSeriesKeys.iterator(); while (iterator.hasNext()) { Comparable seriesKey = (Comparable) iterator.next(); TimeSeries series = getSeries(seriesKey); int count = series.getItemCount(); if (count > 0) { Regular...
/** * Returns the bounds of the domain values for the specified series. * * @param visibleSeriesKeys a list of keys for the visible series. * @param includeInterval include the x-interval? * * @return A range. * * @since 1.0.13 */
Returns the bounds of the domain values for the specified series
getDomainBounds
{ "repo_name": "fluidware/Eastwood-Charts", "path": "source/org/jfree/data/time/TimeSeriesCollection.java", "license": "lgpl-2.1", "size": 26097 }
[ "java.util.Iterator", "java.util.List", "org.jfree.data.Range" ]
import java.util.Iterator; import java.util.List; import org.jfree.data.Range;
import java.util.*; import org.jfree.data.*;
[ "java.util", "org.jfree.data" ]
java.util; org.jfree.data;
587,101
public OneResponse suspend() { return action("suspend"); }
OneResponse function() { return action(STR); }
/** * Suspends the virtual machine. The virtual machine state is left in the * cluster node for resuming. * @return If an error occurs the error message contains the reason. */
Suspends the virtual machine. The virtual machine state is left in the cluster node for resuming
suspend
{ "repo_name": "Terradue/one", "path": "src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java", "license": "apache-2.0", "size": 38638 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
2,424,498
public final String toString() { return name; } } public static final class UnicodeBlock extends Subset { private static Map map = new HashMap(); private UnicodeBlock(String idName) { super(idName); map.put(idName.toUpperCase(L...
final String function() { return name; } } public static final class UnicodeBlock extends Subset { private static Map map = new HashMap(); private UnicodeBlock(String idName) { super(idName); map.put(idName.toUpperCase(Locale.US), this); } private UnicodeBlock(String idName, String alias) { this(idName); map.put(alias....
/** * Returns the name of this subset. */
Returns the name of this subset
toString
{ "repo_name": "ThomasWrobel/Gwtish", "path": "core/src/com/lostagain/nl/GWTish/CharacterUtils.java", "license": "apache-2.0", "size": 60504 }
[ "java.util.HashMap", "java.util.Locale", "java.util.Map" ]
import java.util.HashMap; import java.util.Locale; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,136,855
public String toString(boolean pretty) { try { StringWriter writer = new StringWriter(); JsonGenerator gen = FACTORY.createJsonGenerator(writer); if (pretty) gen.useDefaultPrettyPrinter(); toJson(new Names(), gen); gen.flush(); return writer.toString(); } catch (IOException...
String function(boolean pretty) { try { StringWriter writer = new StringWriter(); JsonGenerator gen = FACTORY.createJsonGenerator(writer); if (pretty) gen.useDefaultPrettyPrinter(); toJson(new Names(), gen); gen.flush(); return writer.toString(); } catch (IOException e) { throw new AvroRuntimeException(e); } }
/** Render this as <a href="http://json.org/">JSON</a>. * @param pretty if true, pretty-print JSON. */
Render this as JSON
toString
{ "repo_name": "ntent-ad/avro", "path": "lang/java/avro/src/main/java/org/apache/avro/Schema.java", "license": "apache-2.0", "size": 54394 }
[ "java.io.IOException", "java.io.StringWriter", "org.codehaus.jackson.JsonGenerator" ]
import java.io.IOException; import java.io.StringWriter; import org.codehaus.jackson.JsonGenerator;
import java.io.*; import org.codehaus.jackson.*;
[ "java.io", "org.codehaus.jackson" ]
java.io; org.codehaus.jackson;
2,106,377
public void write(Buffer buffer) throws Exception;
void function(Buffer buffer) throws Exception;
/** * Write to the stream without blocking * * @param buffer Input buffer * @throws Exception */
Write to the stream without blocking
write
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/packages/apps/RCSe/core/src/com/orangelabs/rcs/core/ims/protocol/rtp/stream/ProcessorOutputStream.java", "license": "gpl-2.0", "size": 1375 }
[ "com.orangelabs.rcs.core.ims.protocol.rtp.util.Buffer" ]
import com.orangelabs.rcs.core.ims.protocol.rtp.util.Buffer;
import com.orangelabs.rcs.core.ims.protocol.rtp.util.*;
[ "com.orangelabs.rcs" ]
com.orangelabs.rcs;
2,401,887
public static File newFile(File baseDir, String... segments) { File f = baseDir; for (String segment : segments) { f = new File(f, segment); } return f; }
static File function(File baseDir, String... segments) { File f = baseDir; for (String segment : segments) { f = new File(f, segment); } return f; }
/** * Return a new File object based on the baseDir and the segments. * * This method does not perform any operation on the file system. */
Return a new File object based on the baseDir and the segments. This method does not perform any operation on the file system
newFile
{ "repo_name": "luck3y/wildfly-core", "path": "patching/src/main/java/org/jboss/as/patching/IoUtils.java", "license": "lgpl-2.1", "size": 7153 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,716,838
ScreenCaptureReply captureScreen();
ScreenCaptureReply captureScreen();
/** * Takes a screen capture of the whole screen, including the areas outside of the viewport and the * browser window. * * @return a screen capture reply */
Takes a screen capture of the whole screen, including the areas outside of the viewport and the browser window
captureScreen
{ "repo_name": "operasoftware/operaprestodriver", "path": "src/com/opera/core/systems/CapturesScreen.java", "license": "apache-2.0", "size": 1873 }
[ "com.opera.core.systems.model.ScreenCaptureReply" ]
import com.opera.core.systems.model.ScreenCaptureReply;
import com.opera.core.systems.model.*;
[ "com.opera.core" ]
com.opera.core;
958,873
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<ScriptInner> createOrUpdateAsync( String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters, Context context) { return beginCreateOrUpdateAsync(reso...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<ScriptInner> function( String resourceGroupName, String clusterName, String databaseName, String scriptName, ScriptInner parameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, scriptName, parameters, context) .last() ...
/** * Creates a Kusto database script. * * @param resourceGroupName The name of the resource group containing the Kusto cluster. * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param scriptName The name of the Kust...
Creates a Kusto database script
createOrUpdateAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsClientImpl.java", "license": "mit", "size": 84671 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.kusto.fluent.models.ScriptInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.kusto.fluent.models.ScriptInner;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.kusto.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
887,587
private ImageIcon createIcon(final String resourceName, final boolean scale, final boolean large) { final URL in = ObjectUtilities.getResource(resourceName, ResourceBundleSupport.class); ; if (in == null) { Log.warn("Unable to find file in the class path: ...
ImageIcon function(final String resourceName, final boolean scale, final boolean large) { final URL in = ObjectUtilities.getResource(resourceName, ResourceBundleSupport.class); ; if (in == null) { Log.warn(STR + resourceName); return new ImageIcon(createTransparentImage(1, 1)); } final Image img = Toolkit.getDefaultToo...
/** * Attempts to load an image from classpath. If this fails, an empty image * icon is returned. * * @param resourceName the name of the image. The name should be a global * resource name. * @param scale true, if the image should be scaled, false otherwise * @para...
Attempts to load an image from classpath. If this fails, an empty image icon is returned
createIcon
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/jcommon-1.0.10/source/org/jfree/util/ResourceBundleSupport.java", "license": "gpl-2.0", "size": 19500 }
[ "java.awt.Image", "java.awt.Toolkit", "javax.swing.ImageIcon" ]
import java.awt.Image; import java.awt.Toolkit; import javax.swing.ImageIcon;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,668,135
public byte[] hash(String text) throws AmazonClientException { return AbstractAWSSigner.doHash(text); }
byte[] function(String text) throws AmazonClientException { return AbstractAWSSigner.doHash(text); }
/** * Hashes the string contents (assumed to be UTF-8) using the SHA-256 * algorithm. * * @param text * The string to hash. * * @return The hashed bytes from the specified string. * * @throws AmazonClientException * If the hash cannot be computed....
Hashes the string contents (assumed to be UTF-8) using the SHA-256 algorithm
hash
{ "repo_name": "sheofir/aws-sdk-java", "path": "aws-java-sdk-core/src/main/java/com/amazonaws/auth/AbstractAWSSigner.java", "license": "apache-2.0", "size": 17102 }
[ "com.amazonaws.AmazonClientException" ]
import com.amazonaws.AmazonClientException;
import com.amazonaws.*;
[ "com.amazonaws" ]
com.amazonaws;
897,282
void loadProfiles( final List<File> fs) { synchronized (files) { for (File f : fs) { files.offerLast(f); } } }
void loadProfiles( final List<File> fs) { synchronized (files) { for (File f : fs) { files.offerLast(f); } } }
/** * Load the specified profile files. * This method must run on the EDT. * * @param files * profile files to be loaded */
Load the specified profile files. This method must run on the EDT
loadProfiles
{ "repo_name": "liyue80/GmailAssistant20", "path": "src/org/freeshell/zs/gmailassistant/ProfileLoader.java", "license": "gpl-2.0", "size": 25425 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,485,468
IdentityHashMap<LogicalExpression, Object> map = new IdentityHashMap<>(); ConstantExpressionIdentifier visitor = new ConstantExpressionIdentifier(); if (e.accept(visitor, map) && map.isEmpty()) { // if we receive a constant value here but the map is empty, this means the entire tree is a constant. ...
IdentityHashMap<LogicalExpression, Object> map = new IdentityHashMap<>(); ConstantExpressionIdentifier visitor = new ConstantExpressionIdentifier(); if (e.accept(visitor, map) && map.isEmpty()) { map.put(e, true); return map.keySet(); } else if (map.isEmpty()) { return Collections.emptySet(); } else { return map.keySet...
/** * Get a list of expressions that mark boundaries into a constant space. * * @param e expression to check for constants * @return list of expressions that mark boundaries into a constant space */
Get a list of expressions that mark boundaries into a constant space
getConstantExpressionSet
{ "repo_name": "apache/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/compile/sig/ConstantExpressionIdentifier.java", "license": "apache-2.0", "size": 9996 }
[ "java.util.Collections", "java.util.IdentityHashMap", "org.apache.drill.common.expression.LogicalExpression" ]
import java.util.Collections; import java.util.IdentityHashMap; import org.apache.drill.common.expression.LogicalExpression;
import java.util.*; import org.apache.drill.common.expression.*;
[ "java.util", "org.apache.drill" ]
java.util; org.apache.drill;
1,424,311
public static void putLong(byte[] dest, int destIndex, long value) { check(destIndex, LONG_NUM_BYTES, dest.length); PlatformDependent.putLong(dest, destIndex, value); }
static void function(byte[] dest, int destIndex, long value) { check(destIndex, LONG_NUM_BYTES, dest.length); PlatformDependent.putLong(dest, destIndex, value); }
/** * Copy a long value to the dest+destIndex * * @param dest destination byte array * @param destIndex destination index * @param value a long value */
Copy a long value to the dest+destIndex
putLong
{ "repo_name": "Agirish/drill", "path": "exec/memory/base/src/main/java/io/netty/buffer/DrillBuf.java", "license": "apache-2.0", "size": 28767 }
[ "io.netty.util.internal.PlatformDependent" ]
import io.netty.util.internal.PlatformDependent;
import io.netty.util.internal.*;
[ "io.netty.util" ]
io.netty.util;
2,891,770
public static MethodHandle unboxCast(Wrapper type) { return unbox(type, 3); } private static final Integer ZERO_INT = 0, ONE_INT = 1; /// Primitive conversions /** * Produce a Number which represents the given value {@code x}
static MethodHandle function(Wrapper type) { return unbox(type, 3); } private static final Integer ZERO_INT = 0, ONE_INT = 1; /** * Produce a Number which represents the given value {@code x}
/** Return a casting unboxer for the given primitive type. * Widen or narrow primitive values to the given type, or convert null to zero, as needed. * The type of the unboxer is of a form like (Object)int. */
Return a casting unboxer for the given primitive type. Widen or narrow primitive values to the given type, or convert null to zero, as needed. The type of the unboxer is of a form like (Object)int
unboxCast
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.base/share/classes/sun/invoke/util/ValueConversions.java", "license": "gpl-2.0", "size": 22157 }
[ "java.lang.invoke.MethodHandle" ]
import java.lang.invoke.MethodHandle;
import java.lang.invoke.*;
[ "java.lang" ]
java.lang;
163,166
Map<String, Asset> getRegisteredAssets() { return CollectionUtil.newConcurrentHashMap(this.assets); }
Map<String, Asset> getRegisteredAssets() { return CollectionUtil.newConcurrentHashMap(this.assets); }
/** * Returns the list of found assets in the service registry * * @return the map of assets */
Returns the list of found assets in the service registry
getRegisteredAssets
{ "repo_name": "ctron/kura", "path": "kura/org.eclipse.kura.asset.cloudlet.provider/src/main/java/org/eclipse/kura/internal/asset/cloudlet/AssetTrackerCustomizer.java", "license": "epl-1.0", "size": 4123 }
[ "java.util.Map", "org.eclipse.kura.asset.Asset", "org.eclipse.kura.util.collection.CollectionUtil" ]
import java.util.Map; import org.eclipse.kura.asset.Asset; import org.eclipse.kura.util.collection.CollectionUtil;
import java.util.*; import org.eclipse.kura.asset.*; import org.eclipse.kura.util.collection.*;
[ "java.util", "org.eclipse.kura" ]
java.util; org.eclipse.kura;
2,663,193
@Test public void evictImplicit() throws Exception { LOG.info("Started evictImplicit"); for (int i = 0; i < 15; i++) { File f = createFile(i, loader, cache, folder); assertCache(i, cache, f); } File f = createFile(30, loader, cache, folder); asse...
void function() throws Exception { LOG.info(STR); for (int i = 0; i < 15; i++) { File f = createFile(i, loader, cache, folder); assertCache(i, cache, f); } File f = createFile(30, loader, cache, folder); assertCache(30, cache, f); assertTrue(cache.getStats().getElementCount() == 15); assertCacheStats(cache, 15, 60 * 10...
/** * evict implicitly. * @throws Exception */
evict implicitly
evictImplicit
{ "repo_name": "mduerig/jackrabbit-oak", "path": "oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/FileCacheTest.java", "license": "apache-2.0", "size": 17902 }
[ "java.io.File", "org.junit.Assert" ]
import java.io.File; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
224,437
public String getReadableTypeName(Node n) { return getReadableJSTypeName(n, true); }
String function(Node n) { return getReadableJSTypeName(n, true); }
/** * First dereferences the JSType to remove null/undefined then returns a human-readable type name */
First dereferences the JSType to remove null/undefined then returns a human-readable type name
getReadableTypeName
{ "repo_name": "vobruba-martin/closure-compiler", "path": "src/com/google/javascript/rhino/jstype/JSTypeRegistry.java", "license": "apache-2.0", "size": 98599 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,736,652
protected List<Integer>[] convert(List<DirectedEdge> edges){ if(edges == null){ return null; } List<Integer>[] result = new List[]{new ArrayList<Integer>(), new ArrayList<Integer>(),new ArrayList<Integer>(),new ArrayList<Integer>()}; for(DirectedEdge edge: edges){ DEdgeWithInput2Output tempEdge =...
List<Integer>[] function(List<DirectedEdge> edges){ if(edges == null){ return null; } List<Integer>[] result = new List[]{new ArrayList<Integer>(), new ArrayList<Integer>(),new ArrayList<Integer>(),new ArrayList<Integer>()}; for(DirectedEdge edge: edges){ DEdgeWithInput2Output tempEdge = (DEdgeWithInput2Output) edge; r...
/** * Convert from edges to labels * @param edges * @return */
Convert from edges to labels
convert
{ "repo_name": "ericpony/safety-prover", "path": "SafetyProver/src/main/java/verification/FunctionalConsistencyChecking.java", "license": "gpl-3.0", "size": 6431 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
161,650
protected ArrayList<Range> parseRange(HttpServletRequest request, HttpServletResponse response, WebResource resource) throws IOException { // Checking If-Range String headerValue = request.getHeader("If-Range"); if (headerValue != null) { long ...
ArrayList<Range> function(HttpServletRequest request, HttpServletResponse response, WebResource resource) throws IOException { String headerValue = request.getHeader(STR); if (headerValue != null) { long headerValueTime = (-1L); try { headerValueTime = request.getDateHeader(STR); } catch (IllegalArgumentException e) { ...
/** * Parse the range header. * * @param request The servlet request we are processing * @param response The servlet response we are creating * @param resource The resource * @return a list of ranges * @throws IOException an IO error occurred */
Parse the range header
parseRange
{ "repo_name": "IAMTJW/Tomcat-8.5.20", "path": "tomcat-8.5.20/java/org/apache/catalina/servlets/DefaultServlet.java", "license": "apache-2.0", "size": 92808 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.StringTokenizer", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.catalina.WebResource" ]
import java.io.IOException; import java.util.ArrayList; import java.util.StringTokenizer; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.WebResource;
import java.io.*; import java.util.*; import javax.servlet.http.*; import org.apache.catalina.*;
[ "java.io", "java.util", "javax.servlet", "org.apache.catalina" ]
java.io; java.util; javax.servlet; org.apache.catalina;
2,104,165
public long totalCharacters() { Cursor all = getDB().query(NotesDb.TABLE_NAME, new String[] {NotesDb.COLUMN_SUBJECT, NotesDb.COLUMN_CONTENT}, null,null, null, null, null); String results = ""; if(all.moveToFirst()) do { results += all.getString(all.getColumnIndex(NotesDb.COLUMN_SUBJECT)) ...
long function() { Cursor all = getDB().query(NotesDb.TABLE_NAME, new String[] {NotesDb.COLUMN_SUBJECT, NotesDb.COLUMN_CONTENT}, null,null, null, null, null); String results = ""; if(all.moveToFirst()) do { results += all.getString(all.getColumnIndex(NotesDb.COLUMN_SUBJECT)) + all.getString(all.getColumnIndex(NotesDb.CO...
/** * Total characters. * * @return the long */
Total characters
totalCharacters
{ "repo_name": "afontaine/Notes", "path": "src/com/amfontai/cmput301asn1/NotesDb.java", "license": "gpl-2.0", "size": 10435 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
1,928,869
public static <T> T getData(String identifier, IBlockAccess world, BlockPos pos) { ChunkData<T> chunkData = instance.<T> chunkData(identifier, instance.world(world), pos); return chunkData != null ? chunkData.getData(pos) : null; }
static <T> T function(String identifier, IBlockAccess world, BlockPos pos) { ChunkData<T> chunkData = instance.<T> chunkData(identifier, instance.world(world), pos); return chunkData != null ? chunkData.getData(pos) : null; }
/** * Gets the custom data stored at the {@link BlockPos} for the specified identifier. * * @param <T> the generic type * @param identifier the identifier * @param world the world * @param pos the pos * @return the data */
Gets the custom data stored at the <code>BlockPos</code> for the specified identifier
getData
{ "repo_name": "Ordinastie/MalisisCore", "path": "src/main/java/net/malisis/core/util/blockdata/BlockDataHandler.java", "license": "mit", "size": 14483 }
[ "net.minecraft.util.math.BlockPos", "net.minecraft.world.IBlockAccess" ]
import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess;
import net.minecraft.util.math.*; import net.minecraft.world.*;
[ "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.util; net.minecraft.world;
1,215,622
public static void release(Session ses, org.hibernate.Session db) { if (commsProxies == null) return; for (RigCommunicationProxy proxy : commsProxies) { proxy.release(ses, db); } }
static void function(Session ses, org.hibernate.Session db) { if (commsProxies == null) return; for (RigCommunicationProxy proxy : commsProxies) { proxy.release(ses, db); } }
/** * Calls release operation on all communication proxies. * * @param ses session information * @param db database session */
Calls release operation on all communication proxies
release
{ "repo_name": "sahara-labs/scheduling-server", "path": "RigManagement/src/au/edu/uts/eng/remotelabs/schedserver/rigmanagement/RigManagementActivator.java", "license": "bsd-3-clause", "size": 9897 }
[ "au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.Session", "au.edu.uts.eng.remotelabs.schedserver.dataaccess.listener.RigCommunicationProxy" ]
import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.Session; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.listener.RigCommunicationProxy;
import au.edu.uts.eng.remotelabs.schedserver.dataaccess.entities.*; import au.edu.uts.eng.remotelabs.schedserver.dataaccess.listener.*;
[ "au.edu.uts" ]
au.edu.uts;
36,141
checkNotNull(consumer); checkNotNull(resource); List<ResourceAllocation> allocations = allocate(consumer, ImmutableList.of(resource)); if (allocations.isEmpty()) { return Optional.empty(); } assert allocations.size() == 1; ResourceAllocation allocation = al...
checkNotNull(consumer); checkNotNull(resource); List<ResourceAllocation> allocations = allocate(consumer, ImmutableList.of(resource)); if (allocations.isEmpty()) { return Optional.empty(); } assert allocations.size() == 1; ResourceAllocation allocation = allocations.get(0); assert allocation.resource().equals(resource)...
/** * Allocates the specified resource to the specified user. * * @param consumer resource user which the resource is allocated to * @param resource resource to be allocated * @return allocation information enclosed by Optional. If the allocation fails, the return value is empty */
Allocates the specified resource to the specified user
allocate
{ "repo_name": "planoAccess/clonedONOS", "path": "core/api/src/main/java/org/onosproject/net/newresource/ResourceService.java", "license": "apache-2.0", "size": 6708 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.ImmutableList", "java.util.List", "java.util.Optional" ]
import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import java.util.List; import java.util.Optional;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,280,845
void compactRegion(byte[] regionName) throws IOException;
void compactRegion(byte[] regionName) throws IOException;
/** * Compact an individual region. Asynchronous operation in that this method requests that a * Compaction run and then it returns. It does not wait on the completion of Compaction * (it can take a while). * * @param regionName region to compact * @throws IOException if a remote or network exception ...
Compact an individual region. Asynchronous operation in that this method requests that a Compaction run and then it returns. It does not wait on the completion of Compaction (it can take a while)
compactRegion
{ "repo_name": "ChinmaySKulkarni/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 101053 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,553,296
public static void write(OutputStream output, DynAnyFactory value) { throw new MARSHAL(not_applicable(id())); }
static void function(OutputStream output, DynAnyFactory value) { throw new MARSHAL(not_applicable(id())); }
/** * This should read DynAnyFactory from the CDR input stream, but (following * the JDK 1.5 API) it does not. * * @param output a org.omg.CORBA.portable stream to write into. * * @specenote Sun throws the same exception. * * @throws MARSHAL always. */
This should read DynAnyFactory from the CDR input stream, but (following the JDK 1.5 API) it does not
write
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/org/omg/DynamicAny/DynAnyFactoryHelper.java", "license": "gpl-2.0", "size": 5802 }
[ "org.omg.CORBA" ]
import org.omg.CORBA;
import org.omg.*;
[ "org.omg" ]
org.omg;
2,288,874
public boolean performAccessibilityAction(int action, Bundle arguments) { return false; }
boolean function(int action, Bundle arguments) { return false; }
/** * Performs the specified accessibility action. * * @param action The identifier of the action to perform. * @param arguments The action arguments, or {@code null} if no arguments. * @return {@code true} if the action was successful. * @see View#performAccessibilityAction(int, Bundle) ...
Performs the specified accessibility action
performAccessibilityAction
{ "repo_name": "Crystalnix/BitPop", "path": "content/public/android/java/src/org/chromium/content/browser/accessibility/AccessibilityInjector.java", "license": "bsd-3-clause", "size": 14114 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
2,490,411
public PersistTestModuleBuilder setDriver(String driver) { return setProperty(PersistenceUnitProperties.JDBC_DRIVER, driver); }
PersistTestModuleBuilder function(String driver) { return setProperty(PersistenceUnitProperties.JDBC_DRIVER, driver); }
/** * Sets the value of {@value PersistenceUnitProperties#JDBC_DRIVER} property. */
Sets the value of PersistenceUnitProperties#JDBC_DRIVER property
setDriver
{ "repo_name": "snjeza/che", "path": "core/commons/che-core-commons-test/src/main/java/org/eclipse/che/commons/test/db/PersistTestModuleBuilder.java", "license": "epl-1.0", "size": 8450 }
[ "org.eclipse.persistence.config.PersistenceUnitProperties" ]
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.eclipse.persistence.config.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
975,954
public void connectContainerToNetwork(String netId, String containerId) throws IOException { connectContainerToNetwork(ConnectContainerToNetworkParams.create(netId, new ConnectContainer().withContainer(containerId))); }
void function(String netId, String containerId) throws IOException { connectContainerToNetwork(ConnectContainerToNetworkParams.create(netId, new ConnectContainer().withContainer(containerId))); }
/** * Connects container to docker network * * @throws IOException * when problems occurs with docker api calls */
Connects container to docker network
connectContainerToNetwork
{ "repo_name": "gazarenkov/che-sketch", "path": "plugins/plugin-docker/che-plugin-docker-client/src/main/java/org/eclipse/che/plugin/docker/client/DockerConnector.java", "license": "epl-1.0", "size": 68338 }
[ "java.io.IOException", "org.eclipse.che.plugin.docker.client.json.network.ConnectContainer", "org.eclipse.che.plugin.docker.client.params.network.ConnectContainerToNetworkParams" ]
import java.io.IOException; import org.eclipse.che.plugin.docker.client.json.network.ConnectContainer; import org.eclipse.che.plugin.docker.client.params.network.ConnectContainerToNetworkParams;
import java.io.*; import org.eclipse.che.plugin.docker.client.json.network.*; import org.eclipse.che.plugin.docker.client.params.network.*;
[ "java.io", "org.eclipse.che" ]
java.io; org.eclipse.che;
2,864,794
private long parseLong() throws IOException { long b64 = read(); long b56 = read(); long b48 = read(); long b40 = read(); long b32 = read(); long b24 = read(); long b16 = read(); long b8 = read(); return ((b64 << 56) + (b56 << 48) + (b48 << 40) + (b40 << 32) ...
long function() throws IOException { long b64 = read(); long b56 = read(); long b48 = read(); long b40 = read(); long b32 = read(); long b24 = read(); long b16 = read(); long b8 = read(); return ((b64 << 56) + (b56 << 48) + (b48 << 40) + (b40 << 32) + (b32 << 24) + (b24 << 16) + (b16 << 8) + b8); }
/** * Parses a 64-bit long value from the stream. * * <pre> * b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */
Parses a 64-bit long value from the stream. <code> b64 b56 b48 b40 b32 b24 b16 b8 </code>
parseLong
{ "repo_name": "roidelapluie/yajsw", "path": "src/hessian/src/main/java/com/caucho/hessian4/io/Hessian2Input.java", "license": "lgpl-2.1", "size": 66457 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
760,481
@Override protected void onSuccess(Boolean isCurrentMailboxRefreshable) { if (isCurrentMailboxRefreshable == null) { return; } if (isCurrentMailboxRefreshable) { mRefreshManager.refreshMessageList(mAccountId, mMailboxId, true); ...
void function(Boolean isCurrentMailboxRefreshable) { if (isCurrentMailboxRefreshable == null) { return; } if (isCurrentMailboxRefreshable) { mRefreshManager.refreshMessageList(mAccountId, mMailboxId, true); } if (mAccountId != Account.NO_ACCOUNT) { if (shouldRefreshMailboxList()) { mRefreshManager.refreshMailboxList(mA...
/** * Do the actual refresh. */
Do the actual refresh
onSuccess
{ "repo_name": "craigacgomez/flaming_monkey_packages_apps_Email", "path": "src/com/android/email/activity/UIControllerTwoPane.java", "license": "apache-2.0", "size": 28108 }
[ "com.android.emailcommon.provider.Account" ]
import com.android.emailcommon.provider.Account;
import com.android.emailcommon.provider.*;
[ "com.android.emailcommon" ]
com.android.emailcommon;
1,463,361
private Map<String, Set<String>> resolveSearchRoutingAllIndices(Metadata metadata, Set<String> routing) { if (!routing.isEmpty()) { Map<String, Set<String>> routings = new HashMap<>(); String[] concreteIndices = metadata.getConcreteAllIndices(); for (String index : concre...
Map<String, Set<String>> function(Metadata metadata, Set<String> routing) { if (!routing.isEmpty()) { Map<String, Set<String>> routings = new HashMap<>(); String[] concreteIndices = metadata.getConcreteAllIndices(); for (String index : concreteIndices) { routings.put(index, routing); } return routings; } return null; }
/** * Sets the same routing for all indices */
Sets the same routing for all indices
resolveSearchRoutingAllIndices
{ "repo_name": "EvilMcJerkface/crate", "path": "server/src/main/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolver.java", "license": "apache-2.0", "size": 34473 }
[ "java.util.HashMap", "java.util.Map", "java.util.Set" ]
import java.util.HashMap; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,231,954
public static ITypeBinding mapType(ITypeBinding binding) { if (binding == null) { // happens when mapping a primitive type return null; } if (binding.isArray()) { return resolveArrayType(binding.getComponentType()); } ITypeBinding newBinding = instance.typeMap.get(binding); if (ne...
static ITypeBinding function(ITypeBinding binding) { if (binding == null) { return null; } if (binding.isArray()) { return resolveArrayType(binding.getComponentType()); } ITypeBinding newBinding = instance.typeMap.get(binding); if (newBinding == null && binding.isAssignmentCompatible(instance.javaClassType)) { newBindi...
/** * Given a JDT type binding created by the parser, either replace it with an iOS * equivalent, or return the given type. */
Given a JDT type binding created by the parser, either replace it with an iOS equivalent, or return the given type
mapType
{ "repo_name": "weipoint/j2objc", "path": "src/main/java/com/google/devtools/j2objc/types/Types.java", "license": "apache-2.0", "size": 36442 }
[ "org.eclipse.jdt.core.dom.ITypeBinding" ]
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
857,580
public OneToOne<EmbeddableAttributes<T>> getOrCreateOneToOne() { List<Node> nodeList = childNode.get("one-to-one"); if (nodeList != null && nodeList.size() > 0) { return new OneToOneImpl<EmbeddableAttributes<T>>(this, "one-to-one", childNode, nodeList.get(0)); } return crea...
OneToOne<EmbeddableAttributes<T>> function() { List<Node> nodeList = childNode.get(STR); if (nodeList != null && nodeList.size() > 0) { return new OneToOneImpl<EmbeddableAttributes<T>>(this, STR, childNode, nodeList.get(0)); } return createOneToOne(); }
/** * If not already created, a new <code>one-to-one</code> element will be created and returned. * Otherwise, the first existing <code>one-to-one</code> element will be returned. * @return the instance defined for the element <code>one-to-one</code> */
If not already created, a new <code>one-to-one</code> element will be created and returned. Otherwise, the first existing <code>one-to-one</code> element will be returned
getOrCreateOneToOne
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/orm21/EmbeddableAttributesImpl.java", "license": "epl-1.0", "size": 19750 }
[ "java.util.List", "org.jboss.shrinkwrap.descriptor.api.orm21.EmbeddableAttributes", "org.jboss.shrinkwrap.descriptor.api.orm21.OneToOne", "org.jboss.shrinkwrap.descriptor.spi.node.Node" ]
import java.util.List; import org.jboss.shrinkwrap.descriptor.api.orm21.EmbeddableAttributes; import org.jboss.shrinkwrap.descriptor.api.orm21.OneToOne; import org.jboss.shrinkwrap.descriptor.spi.node.Node;
import java.util.*; import org.jboss.shrinkwrap.descriptor.api.orm21.*; import org.jboss.shrinkwrap.descriptor.spi.node.*;
[ "java.util", "org.jboss.shrinkwrap" ]
java.util; org.jboss.shrinkwrap;
883,220
public void test_sixteen_external_dsa() throws Exception { String filename = merlinsDir16 + "/signature.xml"; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver,...
void function() throws Exception { String filename = merlinsDir16 + STR; ResourceResolverSpi resolver = new OfflineResolver(); boolean followManifests = false; boolean verify = false; try { verify = this.verify(filename, resolver, followManifests); } catch (RuntimeException ex) { log.error(STR + filename); throw ex; } ...
/** * Method test_sixteen_external_dsa * * @throws Exception */
Method test_sixteen_external_dsa
test_sixteen_external_dsa
{ "repo_name": "test2v/DanDelXAdES", "path": "proj/xml-security-src-1_3_0/xml-security-1_3_0/src_unitTests/org/apache/xml/security/test/interop/BaltimoreTest.java", "license": "lgpl-3.0", "size": 14986 }
[ "org.apache.xml.security.test.utils.resolver.OfflineResolver", "org.apache.xml.security.utils.resolver.ResourceResolverSpi" ]
import org.apache.xml.security.test.utils.resolver.OfflineResolver; import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
import org.apache.xml.security.test.utils.resolver.*; import org.apache.xml.security.utils.resolver.*;
[ "org.apache.xml" ]
org.apache.xml;
2,432,733
private JavaRDD<Rating> aggregateScores(JavaRDD<Rating> original) { JavaPairRDD<Tuple2<Integer,Integer>,Double> tuples = original.mapToPair(rating -> new Tuple2<>(new Tuple2<>(rating.user(), rating.product()), rating.rating())); JavaPairRDD<Tuple2<Integer,Integer>,Double> aggregated; if (implicit...
JavaRDD<Rating> function(JavaRDD<Rating> original) { JavaPairRDD<Tuple2<Integer,Integer>,Double> tuples = original.mapToPair(rating -> new Tuple2<>(new Tuple2<>(rating.user(), rating.product()), rating.rating())); JavaPairRDD<Tuple2<Integer,Integer>,Double> aggregated; if (implicit) { aggregated = tuples.groupByKey().m...
/** * Combines {@link Rating}s with the same user/item into one, with score as the sum of * all of the scores. */
Combines <code>Rating</code>s with the same user/item into one, with score as the sum of all of the scores
aggregateScores
{ "repo_name": "dsdinter/oryx", "path": "app/oryx-app-mllib/src/main/java/com/cloudera/oryx/app/batch/mllib/als/ALSUpdate.java", "license": "apache-2.0", "size": 20672 }
[ "com.cloudera.oryx.app.common.fn.MLFunctions", "org.apache.spark.api.java.JavaPairRDD", "org.apache.spark.api.java.JavaRDD", "org.apache.spark.mllib.recommendation.Rating" ]
import com.cloudera.oryx.app.common.fn.MLFunctions; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.mllib.recommendation.Rating;
import com.cloudera.oryx.app.common.fn.*; import org.apache.spark.api.java.*; import org.apache.spark.mllib.recommendation.*;
[ "com.cloudera.oryx", "org.apache.spark" ]
com.cloudera.oryx; org.apache.spark;
480,931
public NNTPReply getReply() throws MessagingException { lastServerResponse = new NNTPReply(receiveLine()); return lastServerResponse; }
NNTPReply function() throws MessagingException { lastServerResponse = new NNTPReply(receiveLine()); return lastServerResponse; }
/** * Get a reply line for an NNTP command. * * @return An NNTP reply object from the stream. */
Get a reply line for an NNTP command
getReply
{ "repo_name": "apache/geronimo-javamail", "path": "geronimo-javamail_1.6/geronimo-javamail_1.6_provider/src/main/java/org/apache/geronimo/javamail/transport/nntp/NNTPConnection.java", "license": "apache-2.0", "size": 25570 }
[ "javax.mail.MessagingException" ]
import javax.mail.MessagingException;
import javax.mail.*;
[ "javax.mail" ]
javax.mail;
799,775
public void resetNotCachedStatusRequests() { for (RequestStatus s : this.requestStatusOutputs) { s.reset(); } this.requestStatusRelays.reset(); this.requestStatusBinSensors.reset(); for (RequestStatus s : this.requestStatusVars.values()) { s.reset(); ...
void function() { for (RequestStatus s : this.requestStatusOutputs) { s.reset(); } this.requestStatusRelays.reset(); this.requestStatusBinSensors.reset(); for (RequestStatus s : this.requestStatusVars.values()) { s.reset(); } this.requestStatusLedsAndLogicOps.reset(); this.requestStatusLockedKeys.reset(); this.lastRequ...
/** * Resets all status requests. * Helpful to re-request initial data in case a new {@link LcnBindingConfig} has been loaded. */
Resets all status requests. Helpful to re-request initial data in case a new <code>LcnBindingConfig</code> has been loaded
resetNotCachedStatusRequests
{ "repo_name": "idserda/openhab", "path": "bundles/binding/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/connection/ModInfo.java", "license": "epl-1.0", "size": 12723 }
[ "org.openhab.binding.lcn.common.LcnDefs" ]
import org.openhab.binding.lcn.common.LcnDefs;
import org.openhab.binding.lcn.common.*;
[ "org.openhab.binding" ]
org.openhab.binding;
1,213,253