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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override public void exitVoidRule(@NotNull PJParser.VoidRuleContext ctx) { } | @Override public void exitVoidRule(@NotNull PJParser.VoidRuleContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterVoidRule | {
"repo_name": "Diolor/PJ",
"path": "src/main/java/com/lorentzos/pj/PJBaseListener.java",
"license": "mit",
"size": 73292
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 782,633 |
QuestCoModel selectByPrimaryKey(Integer id); | QuestCoModel selectByPrimaryKey(Integer id); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_quest
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table collection_quest | selectByPrimaryKey | {
"repo_name": "wanghongfei/taolijie",
"path": "src/main/java/com/fh/taolijie/dao/mapper/QuestCoModelMapper.java",
"license": "gpl-3.0",
"size": 1858
} | [
"com.fh.taolijie.domain.quest.QuestCoModel"
] | import com.fh.taolijie.domain.quest.QuestCoModel; | import com.fh.taolijie.domain.quest.*; | [
"com.fh.taolijie"
] | com.fh.taolijie; | 2,683,950 |
public static long[] getBinaryMatrixCharacteristics( Expression left, Expression right )
{
long[] ret = new long[]{ -1, -1, -1, -1 };
Identifier idleft = left.getOutput();
Identifier idright = right.getOutput();
if( idleft.getDataType()==DataType.SCALAR && idright.getDataType()==DataType.SCALAR ) {
... | static long[] function( Expression left, Expression right ) { long[] ret = new long[]{ -1, -1, -1, -1 }; Identifier idleft = left.getOutput(); Identifier idright = right.getOutput(); if( idleft.getDataType()==DataType.SCALAR && idright.getDataType()==DataType.SCALAR ) { ret[0] = 0; ret[1] = 0; ret[2] = 0; ret[3] = 0; }... | /**
* Returns the matrix characteristics for scalar-scalar, scalar-matrix, matrix-scalar, matrix-matrix
* operations. This method is aware of potentially unknowns and matrix-vector (col/row) operations.
*
* Format: rlen, clen, brlen, bclen.
*
* @param left
* @param right
* @return
*/ | Returns the matrix characteristics for scalar-scalar, scalar-matrix, matrix-scalar, matrix-matrix operations. This method is aware of potentially unknowns and matrix-vector (col/row) operations. Format: rlen, clen, brlen, bclen | getBinaryMatrixCharacteristics | {
"repo_name": "aloknsingh/systemml",
"path": "system-ml/src/main/java/com/ibm/bi/dml/parser/Expression.java",
"license": "apache-2.0",
"size": 13594
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,236,710 |
public Observable<ServiceResponse<PartnerTopicInner>> updateWithServiceResponseAsync(String resourceGroupName, String partnerTopicName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
... | Observable<ServiceResponse<PartnerTopicInner>> function(String resourceGroupName, String partnerTopicName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (partnerTopicName == null) { throw new Illega... | /**
* Update a partner topic.
* Asynchronously updates a partner topic with the specified parameters.
*
* @param resourceGroupName The name of the resource group within the user's subscription.
* @param partnerTopicName Name of the partner topic.
* @throws IllegalArgumentException thrown i... | Update a partner topic. Asynchronously updates a partner topic with the specified parameters | updateWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/eventgrid/mgmt-v2020_04_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_04_01_preview/implementation/PartnerTopicsInner.java",
"license": "mit",
"size": 87850
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,382,677 |
@Override public void visitErrorNode(ErrorNode node) { } | @Override public void visitErrorNode(ErrorNode node) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | visitTerminal | {
"repo_name": "tgvaughan/feast",
"path": "src/feast/expressions/parser/ExpressionBaseListener.java",
"license": "gpl-3.0",
"size": 6048
} | [
"org.antlr.v4.runtime.tree.ErrorNode"
] | import org.antlr.v4.runtime.tree.ErrorNode; | import org.antlr.v4.runtime.tree.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 784,056 |
@Deprecated
void createTunnel(IpAddress srcIp, IpAddress dstIp); | void createTunnel(IpAddress srcIp, IpAddress dstIp); | /**
* Creates the configuration for tunnel.
*
* @param srcIp source IP address
* @param dstIp destination IP address
* @deprecated 1.4.0 Emu release
*/ | Creates the configuration for tunnel | createTunnel | {
"repo_name": "sonu283304/onos",
"path": "protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java",
"license": "apache-2.0",
"size": 8327
} | [
"org.onlab.packet.IpAddress"
] | import org.onlab.packet.IpAddress; | import org.onlab.packet.*; | [
"org.onlab.packet"
] | org.onlab.packet; | 2,008,159 |
private static ListMultimap<String, Bundle> getRelationships(Map<?, ?> data)
throws DeserializationError {
ListMultimap<String, Bundle> relationbundles = LinkedListMultimap
.create();
// It's okay to pass in a null value for relationships.
Object relations = data... | static ListMultimap<String, Bundle> function(Map<?, ?> data) throws DeserializationError { ListMultimap<String, Bundle> relationbundles = LinkedListMultimap .create(); Object relations = data.get(Bundle.REL_KEY); if (relations == null) return relationbundles; if (relations instanceof Map) { for (Entry<?, ?> entry : ((M... | /**
* Extract relationships from the bundle data.
*
* TODO: Should we throw an error if something
*
* @param data
* @return
* @throws DeserializationError
*/ | Extract relationships from the bundle data | getRelationships | {
"repo_name": "lindareijnhoudt/neo4j-ehri-plugin",
"path": "ehri-frames/src/main/java/eu/ehri/project/persistance/DataConverter.java",
"license": "gpl-3.0",
"size": 13027
} | [
"com.google.common.collect.LinkedListMultimap",
"com.google.common.collect.ListMultimap",
"eu.ehri.project.exceptions.DeserializationError",
"java.util.List",
"java.util.Map"
] | import com.google.common.collect.LinkedListMultimap; import com.google.common.collect.ListMultimap; import eu.ehri.project.exceptions.DeserializationError; import java.util.List; import java.util.Map; | import com.google.common.collect.*; import eu.ehri.project.exceptions.*; import java.util.*; | [
"com.google.common",
"eu.ehri.project",
"java.util"
] | com.google.common; eu.ehri.project; java.util; | 2,677,450 |
ServiceCall<Void> postPathGlobalValidAsync(final ServiceCallback<Void> serviceCallback); | ServiceCall<Void> postPathGlobalValidAsync(final ServiceCallback<Void> serviceCallback); | /**
* POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceCall} object
*/ | POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed | postPathGlobalValidAsync | {
"repo_name": "matthchr/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/azurespecials/SubscriptionInCredentials.java",
"license": "mit",
"size": 6754
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 904,718 |
public static void doAsPrivilege(final String methodName,
final Servlet targetObject,
final Class<?>[] targetParameterTypes,
final Object[] targetArguments,
Principal p... | static void function(final String methodName, final Servlet targetObject, final Class<?>[] targetParameterTypes, final Object[] targetArguments, Principal principal) throws java.lang.Exception{ Method method = null; Method[] methodsCache = classCache.get(Servlet.class); if(methodsCache == null) { method = createMethodA... | /**
* Perform work as a particular </code>Subject</code>. Here the work
* will be granted to a <code>null</code> subject.
*
* @param methodName the method to apply the security restriction
* @param targetObject the <code>Servlet</code> on which the method will
* be called.
* @param ta... | Perform work as a particular </code>Subject</code>. Here the work will be granted to a <code>null</code> subject | doAsPrivilege | {
"repo_name": "plumer/codana",
"path": "tomcat_files/7.0.61/SecurityUtil.java",
"license": "mit",
"size": 16427
} | [
"java.lang.reflect.Method",
"java.security.Principal",
"javax.servlet.Servlet"
] | import java.lang.reflect.Method; import java.security.Principal; import javax.servlet.Servlet; | import java.lang.reflect.*; import java.security.*; import javax.servlet.*; | [
"java.lang",
"java.security",
"javax.servlet"
] | java.lang; java.security; javax.servlet; | 194,184 |
public void createAlarmFactory(String desc) {
AlarmFactory alarmFactory = new TestServerAlarmFactory();
try {
if (desc == null) {
TimeServiceServer.getInstance().createAlarmFactory(alarmFactory);
} else {
TimeServiceServer.getInst... | void function(String desc) { AlarmFactory alarmFactory = new TestServerAlarmFactory(); try { if (desc == null) { TimeServiceServer.getInstance().createAlarmFactory(alarmFactory); } else { TimeServiceServer.getInstance().createAlarmFactory(alarmFactory, desc, "en", null); } Log.d(TAG, STR + alarmFactory.getObjectPath() ... | /**
* Create Alarm Factory
*/ | Create Alarm Factory | createAlarmFactory | {
"repo_name": "octoblu/alljoyn",
"path": "alljoyn/services/time/java/TimeService/src/org/allseen/timeservice/test/TestServer.java",
"license": "isc",
"size": 14022
} | [
"android.util.Log",
"org.allseen.timeservice.TimeServiceException",
"org.allseen.timeservice.server.AlarmFactory",
"org.allseen.timeservice.server.TimeServiceServer"
] | import android.util.Log; import org.allseen.timeservice.TimeServiceException; import org.allseen.timeservice.server.AlarmFactory; import org.allseen.timeservice.server.TimeServiceServer; | import android.util.*; import org.allseen.timeservice.*; import org.allseen.timeservice.server.*; | [
"android.util",
"org.allseen.timeservice"
] | android.util; org.allseen.timeservice; | 593,132 |
public static String getVersion() {
URL versionFile = NativeCodeLoader.class
.getResource("/META-INF/maven/com.intel.cryptostream/cryptostream/pom.properties");
if (versionFile == null)
versionFile = NativeCodeLoader.class
.getResource("/com/intel/cryptostream/VERSION");
String ve... | static String function() { URL versionFile = NativeCodeLoader.class .getResource(STR); if (versionFile == null) versionFile = NativeCodeLoader.class .getResource(STR); String version = STR; try { if (versionFile != null) { Properties versionData = new Properties(); versionData.load(versionFile.openStream()); version = ... | /**
* Get the cryptostream version by reading pom.properties embedded in jar.
* This version data is used as a suffix of a dll file extracted from the
* jar.
*
* @return the version string
*/ | Get the cryptostream version by reading pom.properties embedded in jar. This version data is used as a suffix of a dll file extracted from the jar | getVersion | {
"repo_name": "dianfu/CryptoLib",
"path": "src/main/java/com/intel/cryptostream/utils/NativeCodeLoader.java",
"license": "apache-2.0",
"size": 9150
} | [
"java.io.IOException",
"java.util.Properties"
] | import java.io.IOException; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 90,804 |
public void setLikeDrawableRes(@DrawableRes int resId) {
likeDrawable = ContextCompat.getDrawable(getContext(), resId);
if (iconSize != 0) {
likeDrawable = Utils.resizeDrawable(getContext(), likeDrawable, iconSize, iconSize);
}
} | void function(@DrawableRes int resId) { likeDrawable = ContextCompat.getDrawable(getContext(), resId); if (iconSize != 0) { likeDrawable = Utils.resizeDrawable(getContext(), likeDrawable, iconSize, iconSize); } } | /**
* This drawable is shown when the button is a liked state.
*
* @param resId
*/ | This drawable is shown when the button is a liked state | setLikeDrawableRes | {
"repo_name": "longluo/AndroidDemo",
"path": "app/src/main/java/com/longluo/demo/likebutton/LikeButton.java",
"license": "mit",
"size": 16659
} | [
"android.support.annotation.DrawableRes",
"android.support.v4.content.ContextCompat"
] | import android.support.annotation.DrawableRes; import android.support.v4.content.ContextCompat; | import android.support.annotation.*; import android.support.v4.content.*; | [
"android.support"
] | android.support; | 863,636 |
public Object decode(ProtocolState state, IoBuffer in) throws ProtocolException {
int start = in.position();
log.trace("Start: {}", start);
try {
final RTMP rtmp = (RTMP) state;
byte rtmpState = rtmp.getState();
switch (rtmpState) {
case RTMP.STATE_CONNECTED:
return decodePacket(rtmp,... | Object function(ProtocolState state, IoBuffer in) throws ProtocolException { int start = in.position(); log.trace(STR, start); try { final RTMP rtmp = (RTMP) state; byte rtmpState = rtmp.getState(); switch (rtmpState) { case RTMP.STATE_CONNECTED: return decodePacket(rtmp, in); case RTMP.STATE_CONNECT: case RTMP.STATE_H... | /**
* Decodes the buffer data
*
* @param state Stores state for the protocol, ProtocolState is just a marker interface
* @param in IoBuffer of data to be decoded
* @return one of three possible values. null : the object could not be
* decoded, or some data was skipped, just continue. Protocol... | Decodes the buffer data | decode | {
"repo_name": "cwpenhale/red5-mobileconsole",
"path": "red5_server/src/main/java/org/red5/server/net/rtmp/codec/RTMPProtocolDecoder.java",
"license": "apache-2.0",
"size": 37801
} | [
"org.apache.mina.core.buffer.IoBuffer",
"org.red5.server.net.protocol.ProtocolException",
"org.red5.server.net.protocol.ProtocolState"
] | import org.apache.mina.core.buffer.IoBuffer; import org.red5.server.net.protocol.ProtocolException; import org.red5.server.net.protocol.ProtocolState; | import org.apache.mina.core.buffer.*; import org.red5.server.net.protocol.*; | [
"org.apache.mina",
"org.red5.server"
] | org.apache.mina; org.red5.server; | 2,097,202 |
public static void Set4ByteInt(int val, OutputStream os)
throws java.io.IOException
{
os.write((byte)((val & 0xFF000000) >> 24));
os.write((byte)((val & 0x00FF0000) >> 16));
os.write((byte)((val & 0x0000FF00) >> 8));
os.write((byte)((val & 0x000000FF)));
}
static final class AtomicBigInt... | static void function(int val, OutputStream os) throws java.io.IOException { os.write((byte)((val & 0xFF000000) >> 24)); os.write((byte)((val & 0x00FF0000) >> 16)); os.write((byte)((val & 0x0000FF00) >> 8)); os.write((byte)((val & 0x000000FF))); } static final class AtomicBigInteger { private final AtomicReference<BigIn... | /**
* Writes an integer to the output stream out to 4 bytes big endian encoding
* @param val integer value to write out
* @param os output stream to write to
* @throws java.io.IOException
*/ | Writes an integer to the output stream out to 4 bytes big endian encoding | Set4ByteInt | {
"repo_name": "jacksonic/vjlofvhjfgm",
"path": "src/foam/util/SecurityUtil.java",
"license": "apache-2.0",
"size": 12716
} | [
"java.io.OutputStream",
"java.math.BigInteger",
"java.util.Objects",
"java.util.concurrent.atomic.AtomicReference"
] | import java.io.OutputStream; import java.math.BigInteger; import java.util.Objects; import java.util.concurrent.atomic.AtomicReference; | import java.io.*; import java.math.*; import java.util.*; import java.util.concurrent.atomic.*; | [
"java.io",
"java.math",
"java.util"
] | java.io; java.math; java.util; | 832,597 |
protected IView<E> createWorkspaceNavigator(final String workspaceName,
IViewDescriptor workspaceNavigatorViewDescriptor) {
IView<E> workspaceNavigatorView = viewFactory.createView(workspaceNavigatorViewDescriptor, this, getLocale());
IItemSelectable workspaceNavi... | IView<E> function(final String workspaceName, IViewDescriptor workspaceNavigatorViewDescriptor) { IView<E> workspaceNavigatorView = viewFactory.createView(workspaceNavigatorViewDescriptor, this, getLocale()); IItemSelectable workspaceNavigator; if (workspaceNavigatorView.getConnector() instanceof IItemSelectable) { wor... | /**
* Creates a workspace navigator based on the workspace definition.
*
* @param workspaceName
* the workspace to create the navigator for.
* @param workspaceNavigatorViewDescriptor
* the view descriptor of the navigator.
* @return the workspace navigator view.
*/ | Creates a workspace navigator based on the workspace definition | createWorkspaceNavigator | {
"repo_name": "maximehamm/jspresso-ce",
"path": "application/src/main/java/org/jspresso/framework/application/frontend/controller/AbstractFrontendController.java",
"license": "lgpl-3.0",
"size": 82212
} | [
"org.jspresso.framework.binding.ICompositeValueConnector",
"org.jspresso.framework.binding.model.ModelRefPropertyConnector",
"org.jspresso.framework.util.event.IItemSelectable",
"org.jspresso.framework.util.event.IItemSelectionListener",
"org.jspresso.framework.view.IView",
"org.jspresso.framework.view.de... | import org.jspresso.framework.binding.ICompositeValueConnector; import org.jspresso.framework.binding.model.ModelRefPropertyConnector; import org.jspresso.framework.util.event.IItemSelectable; import org.jspresso.framework.util.event.IItemSelectionListener; import org.jspresso.framework.view.IView; import org.jspresso.... | import org.jspresso.framework.binding.*; import org.jspresso.framework.binding.model.*; import org.jspresso.framework.util.event.*; import org.jspresso.framework.view.*; import org.jspresso.framework.view.descriptor.*; | [
"org.jspresso.framework"
] | org.jspresso.framework; | 1,374,762 |
public Builder dialogNode(String dialogNode) {
this.dialogNode = dialogNode;
return this;
}
}
private CreateDialogNodeOptions(Builder builder) {
Validator.notEmpty(builder.workspaceId, "workspaceId cannot be empty");
Validator.notNull(builder.dialogNode, "dialogNode cannot be null");
... | Builder function(String dialogNode) { this.dialogNode = dialogNode; return this; } } CreateDialogNodeOptions(Builder builder) { Validator.notEmpty(builder.workspaceId, STR); Validator.notNull(builder.dialogNode, STR); workspaceId = builder.workspaceId; parent = builder.parent; metadata = builder.metadata; description =... | /**
* Set the dialogNode.
*
* @param dialogNode the dialogNode
* @return the CreateDialogNodeOptions builder
*/ | Set the dialogNode | dialogNode | {
"repo_name": "supunucsc/java-sdk",
"path": "conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/model/CreateDialogNodeOptions.java",
"license": "apache-2.0",
"size": 11948
} | [
"com.ibm.watson.developer_cloud.util.Validator"
] | import com.ibm.watson.developer_cloud.util.Validator; | import com.ibm.watson.developer_cloud.util.*; | [
"com.ibm.watson"
] | com.ibm.watson; | 2,497,580 |
public String getParameterName(Map<String, ? extends Object> context) {
String baseName;
if (UtilValidate.isNotEmpty(this.parameterName)) baseName = this.parameterName;
else baseName = this.name;
Integer itemIndex = (Integer) context.get("itemIndex");
if (itemIndex != null &... | String function(Map<String, ? extends Object> context) { String baseName; if (UtilValidate.isNotEmpty(this.parameterName)) baseName = this.parameterName; else baseName = this.name; Integer itemIndex = (Integer) context.get(STR); if (itemIndex != null && "multi".equals(this.modelForm.getType())) { return baseName + this... | /**
* Get the name to use for the parameter for this field in the form interpreter.
* For HTML forms this is the request parameter name.
*
* @return returns the name to use for the parameter for this field in the form interpreter
*/ | Get the name to use for the parameter for this field in the form interpreter. For HTML forms this is the request parameter name | getParameterName | {
"repo_name": "gildaslemoal/elpi",
"path": "framework/widget/src/org/ofbiz/widget/form/ModelFormField.java",
"license": "gpl-2.0",
"size": 159114
} | [
"java.util.Map",
"org.ofbiz.base.util.UtilValidate"
] | import java.util.Map; import org.ofbiz.base.util.UtilValidate; | import java.util.*; import org.ofbiz.base.util.*; | [
"java.util",
"org.ofbiz.base"
] | java.util; org.ofbiz.base; | 2,263,541 |
protected void preRenderCallback(EntityBat entitylivingbaseIn, float partialTickTime)
{
GlStateManager.scale(0.35F, 0.35F, 0.35F);
} | void function(EntityBat entitylivingbaseIn, float partialTickTime) { GlStateManager.scale(0.35F, 0.35F, 0.35F); } | /**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
*/ | Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: entityLiving, partialTickTime | preRenderCallback | {
"repo_name": "seblund/Dissolvable",
"path": "build/tmp/recompileMc/sources/net/minecraft/client/renderer/entity/RenderBat.java",
"license": "gpl-3.0",
"size": 1667
} | [
"net.minecraft.client.renderer.GlStateManager",
"net.minecraft.entity.passive.EntityBat"
] | import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.passive.EntityBat; | import net.minecraft.client.renderer.*; import net.minecraft.entity.passive.*; | [
"net.minecraft.client",
"net.minecraft.entity"
] | net.minecraft.client; net.minecraft.entity; | 1,484,835 |
public static int read(InputStream input, byte[] buffer, int offset, int length) throws IOException {
if (length < 0) {
throw new IllegalArgumentException("Length must not be negative: " + length);
}
int remaining = length;
while (remaining > 0) {
int location... | static int function(InputStream input, byte[] buffer, int offset, int length) throws IOException { if (length < 0) { throw new IllegalArgumentException(STR + length); } int remaining = length; while (remaining > 0) { int location = length - remaining; int count = input.read(buffer, offset + location, remaining); if (EO... | /**
* Read bytes from an input stream.
* This implementation guarantees that it will read as many bytes
* as possible before giving up; this may not always be the case for
* subclasses of {@link InputStream}.
*
* @param input where to read input from
* @param buffer destination
... | Read bytes from an input stream. This implementation guarantees that it will read as many bytes as possible before giving up; this may not always be the case for subclasses of <code>InputStream</code> | read | {
"repo_name": "trivium-io/trivium-core",
"path": "src/io/trivium/dep/org/apache/commons/io/IOUtils.java",
"license": "apache-2.0",
"size": 97969
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,665,251 |
public int getSize() {
Map<PlotDimension, double[]> mainData = getDataForUsageType(SeriesUsageType.MAIN_SERIES);
if (mainData == null) {
return 0;
}
double[] domainData = mainData.get(PlotDimension.DOMAIN);
if (domainData == null) {
return 0;
}
return domainData.length;
}
| int function() { Map<PlotDimension, double[]> mainData = getDataForUsageType(SeriesUsageType.MAIN_SERIES); if (mainData == null) { return 0; } double[] domainData = mainData.get(PlotDimension.DOMAIN); if (domainData == null) { return 0; } return domainData.length; } | /**
* Returns the number of data points in the DOMAIN dimension of the MAIN_SERIES series of this
* GroupCellData. All other usage types should have the same number of values.
*/ | Returns the number of data points in the DOMAIN dimension of the MAIN_SERIES series of this GroupCellData. All other usage types should have the same number of values | getSize | {
"repo_name": "aborg0/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/new_plotter/data/GroupCellData.java",
"license": "agpl-3.0",
"size": 3024
} | [
"com.rapidminer.gui.new_plotter.configuration.DimensionConfig",
"com.rapidminer.gui.new_plotter.configuration.ValueSource",
"java.util.Map"
] | import com.rapidminer.gui.new_plotter.configuration.DimensionConfig; import com.rapidminer.gui.new_plotter.configuration.ValueSource; import java.util.Map; | import com.rapidminer.gui.new_plotter.configuration.*; import java.util.*; | [
"com.rapidminer.gui",
"java.util"
] | com.rapidminer.gui; java.util; | 2,450,946 |
public void setFieldError(final FieldError fieldError) {
this.fieldError = fieldError;
} | void function(final FieldError fieldError) { this.fieldError = fieldError; } | /**
* set fieldError of type FieldError.
* @param fieldError to be set
*/ | set fieldError of type FieldError | setFieldError | {
"repo_name": "yalewkidane/Oliot-FC",
"path": "fc-server/src/main/java/kr/ac/kaist/resl/ltk/generated/parameters/ParameterError.java",
"license": "lgpl-2.1",
"size": 14501
} | [
"kr.ac.kaist.resl.ltk.generated.parameters.FieldError"
] | import kr.ac.kaist.resl.ltk.generated.parameters.FieldError; | import kr.ac.kaist.resl.ltk.generated.parameters.*; | [
"kr.ac.kaist"
] | kr.ac.kaist; | 975,885 |
public boolean isProjectCoWorker() {
return (getFlags() & I_CmsPrincipal.FLAG_GROUP_PROJECT_USER) == I_CmsPrincipal.FLAG_GROUP_PROJECT_USER;
}
| boolean function() { return (getFlags() & I_CmsPrincipal.FLAG_GROUP_PROJECT_USER) == I_CmsPrincipal.FLAG_GROUP_PROJECT_USER; } | /**
* Returns <code>true</code> if this group is enabled as a project user group.<p>
*
* @return <code>true</code> if this group is enabled as a project user group
*/ | Returns <code>true</code> if this group is enabled as a project user group | isProjectCoWorker | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/file/CmsGroup.java",
"license": "lgpl-2.1",
"size": 7590
} | [
"org.opencms.security.CmsPrincipal"
] | import org.opencms.security.CmsPrincipal; | import org.opencms.security.*; | [
"org.opencms.security"
] | org.opencms.security; | 2,434,882 |
@Test
public void testCompareCheckpointsWithSameCheckpointId() {
JobID jobID1 = new JobID();
JobID jobID2 = new JobID();
CompletedCheckpoint checkpoint1 = new CompletedCheckpoint(
jobID1, 0, 0, 1,
new HashMap<>(),
Collections.emptyList(),
CheckpointProperties.forCheckpoint(CheckpointRetentionPoli... | void function() { JobID jobID1 = new JobID(); JobID jobID2 = new JobID(); CompletedCheckpoint checkpoint1 = new CompletedCheckpoint( jobID1, 0, 0, 1, new HashMap<>(), Collections.emptyList(), CheckpointProperties.forCheckpoint(CheckpointRetentionPolicy.RETAIN_ON_FAILURE), new TestCompletedCheckpointStorageLocation() );... | /**
* Verify that both JobID and checkpoint id are taken into account when comparing.
*/ | Verify that both JobID and checkpoint id are taken into account when comparing | testCompareCheckpointsWithSameCheckpointId | {
"repo_name": "greghogan/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointTest.java",
"license": "apache-2.0",
"size": 12252
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.HashMap",
"java.util.List",
"org.apache.flink.api.common.JobID",
"org.apache.flink.runtime.state.testutils.TestCompletedCheckpointStorageLocation",
"org.junit.Assert"
] | import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.state.testutils.TestCompletedCheckpointStorageLocation; import org.junit.Assert; | import java.util.*; import org.apache.flink.api.common.*; import org.apache.flink.runtime.state.testutils.*; import org.junit.*; | [
"java.util",
"org.apache.flink",
"org.junit"
] | java.util; org.apache.flink; org.junit; | 1,402,816 |
@Transactional(propagation = Propagation.SUPPORTS)
public Map<Long, List<SegSample>> loadSamplesByFileIds(Collection<Long> fileIds) {
if (fileIds == null || fileIds.isEmpty()) {
return Collections.emptyMap();
}
Map<Long, List<SegSample>> map = new HashMap<>();
RowMa... | @Transactional(propagation = Propagation.SUPPORTS) Map<Long, List<SegSample>> function(Collection<Long> fileIds) { if (fileIds == null fileIds.isEmpty()) { return Collections.emptyMap(); } Map<Long, List<SegSample>> map = new HashMap<>(); RowMapper<SegSample> sampleMapper = SegSampleParameters.getSegSampleMapper(); Str... | /**
* Load sample metadata for multiple file IDs
*
* @param fileIds {@code List<Long>} of file IDs to load samples for
* @return a map of {@code SegFile} IDs to lists of their samples
*/ | Load sample metadata for multiple file IDs | loadSamplesByFileIds | {
"repo_name": "epam/NGB",
"path": "server/catgenome/src/main/java/com/epam/catgenome/dao/seg/SegFileDao.java",
"license": "mit",
"size": 10904
} | [
"com.epam.catgenome.dao.DaoHelper",
"com.epam.catgenome.entity.seg.SegSample",
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.springframework.jdbc.core.RowMapper",
"org.springframework.transaction.annotation.Prop... | import com.epam.catgenome.dao.DaoHelper; import com.epam.catgenome.entity.seg.SegSample; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.jdbc.core.RowMapper; import org.springframewor... | import com.epam.catgenome.dao.*; import com.epam.catgenome.entity.seg.*; import java.util.*; import org.springframework.jdbc.core.*; import org.springframework.transaction.annotation.*; | [
"com.epam.catgenome",
"java.util",
"org.springframework.jdbc",
"org.springframework.transaction"
] | com.epam.catgenome; java.util; org.springframework.jdbc; org.springframework.transaction; | 1,559,042 |
private void waitOnAllRegionsToClose(final boolean abort) {
// Wait till all regions are closed before going out.
int lastCount = -1;
long previousLogTime = 0;
Set<String> closedRegions = new HashSet<String>();
while (!isOnlineRegionsEmpty()) {
int count = getNumberOfOnlineRegions();
/... | void function(final boolean abort) { int lastCount = -1; long previousLogTime = 0; Set<String> closedRegions = new HashSet<String>(); while (!isOnlineRegionsEmpty()) { int count = getNumberOfOnlineRegions(); if (count != lastCount) { if (System.currentTimeMillis() > (previousLogTime + 1000)) { previousLogTime = System.... | /**
* Wait on regions close.
*/ | Wait on regions close | waitOnAllRegionsToClose | {
"repo_name": "ay65535/hbase-0.94.0",
"path": "src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java",
"license": "apache-2.0",
"size": 130077
} | [
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.util.Threads"
] | import java.util.HashSet; import java.util.Map; import java.util.Set; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.util.Threads; | import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,464,368 |
public static boolean hasRootDrives() {
return IS_WINDOWS
|| OsFamily.OS_2.isCurrent()
|| "\\".equals(SEPARATOR);
}
| static boolean function() { return IS_WINDOWS OsFamily.OS_2.isCurrent() "\\".equals(SEPARATOR); } | /**
* Returns <code>true</code> if the underlying local filesystem uses drives assigned to letters (e.g. A:\, C:\, ...)
* instead of having a single root folder '/' under which mount points are attached.
* This is <code>true</code> for the following platforms:
* <ul>
* <li>Windows</li>
... | instead of having a single root folder '/' under which mount points are attached. This is <code>true</code> for the following platforms: Windows OS/2 Any other platform that has '\' for a path separator | hasRootDrives | {
"repo_name": "raisercostin/mucommander",
"path": "src/main/com/mucommander/commons/file/impl/local/LocalFile.java",
"license": "gpl-3.0",
"size": 59451
} | [
"com.mucommander.commons.runtime.OsFamily"
] | import com.mucommander.commons.runtime.OsFamily; | import com.mucommander.commons.runtime.*; | [
"com.mucommander.commons"
] | com.mucommander.commons; | 1,249,629 |
private IgniteBiTuple<String, Integer> hostPort(String connStr, String hostPortStr) throws IgniteCheckedException {
String[] tokens = hostPortStr.split(":", -1);
String host = tokens[0];
if (F.isEmpty(host))
host = LOCALHOST;
int port;
if (tokens.length == 1)
... | IgniteBiTuple<String, Integer> function(String connStr, String hostPortStr) throws IgniteCheckedException { String[] tokens = hostPortStr.split(":", -1); String host = tokens[0]; if (F.isEmpty(host)) host = LOCALHOST; int port; if (tokens.length == 1) port = IgfsIpcEndpointConfiguration.DFLT_PORT; else if (tokens.lengt... | /**
* Parse host and port.
*
* @param connStr Full connection string.
* @param hostPortStr Host/port connection string part.
* @return Tuple with host and port.
* @throws IgniteCheckedException If failed to parse connection string.
*/ | Parse host and port | hostPort | {
"repo_name": "afinka77/ignite",
"path": "modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsEndpoint.java",
"license": "apache-2.0",
"size": 6183
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.igfs.IgfsIpcEndpointConfiguration",
"org.apache.ignite.internal.util.typedef.F",
"org.apache.ignite.lang.IgniteBiTuple"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.igfs.IgfsIpcEndpointConfiguration; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.lang.IgniteBiTuple; | import org.apache.ignite.*; import org.apache.ignite.igfs.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.lang.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,656,751 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String accountName, Context context) {
return beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller();
} | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> function( String resourceGroupName, String accountName, Context context) { return beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller(); } | /**
* Delete the specified NetApp account.
*
* @param resourceGroupName The name of the resource group.
* @param accountName The name of the NetApp account.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the valid... | Delete the specified NetApp account | beginDelete | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/implementation/AccountsClientImpl.java",
"license": "mit",
"size": 75086
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 1,807,804 |
@Override
public JavaExecSpec args(Iterable<?> args) {
throw argsUnsupportOperationException();
} | JavaExecSpec function(Iterable<?> args) { throw argsUnsupportOperationException(); } | /**
* Cannot set args directly on RhinoShellExec, use {@link #setRhinoOptions(List)}, {@link #setScriptArgs(List)} and/or {@link #setScript(File)} instead.
*
* @throws UnsupportedOperationException always
*/ | Cannot set args directly on RhinoShellExec, use <code>#setRhinoOptions(List)</code>, <code>#setScriptArgs(List)</code> and/or <code>#setScript(File)</code> instead | args | {
"repo_name": "gstevey/gradle",
"path": "subprojects/javascript/src/main/java/org/gradle/plugins/javascript/rhino/RhinoShellExec.java",
"license": "apache-2.0",
"size": 5360
} | [
"org.gradle.process.JavaExecSpec"
] | import org.gradle.process.JavaExecSpec; | import org.gradle.process.*; | [
"org.gradle.process"
] | org.gradle.process; | 2,067,096 |
public Text getPrevEndRow() {
return textPrevEndRow;
} | Text function() { return textPrevEndRow; } | /**
* Return the previous extent's end row
*
*/ | Return the previous extent's end row | getPrevEndRow | {
"repo_name": "wjsl/jaredcumulo",
"path": "core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java",
"license": "apache-2.0",
"size": 22300
} | [
"org.apache.hadoop.io.Text"
] | import org.apache.hadoop.io.Text; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,648,248 |
Builder toBuilder();
interface Builder extends ResettableBuilder<Selector, Builder> { | Builder toBuilder(); interface Builder extends ResettableBuilder<Selector, Builder> { | /**
* Returns a new {@link SelectorBuilder} with the content of this selector.
* This can be used to edit an immutable {@link Selector} instance.
*
* @return A new selector builder with the content of this selector
*/ | Returns a new <code>SelectorBuilder</code> with the content of this selector. This can be used to edit an immutable <code>Selector</code> instance | toBuilder | {
"repo_name": "kashike/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/text/selector/Selector.java",
"license": "mit",
"size": 10396
} | [
"org.spongepowered.api.util.ResettableBuilder"
] | import org.spongepowered.api.util.ResettableBuilder; | import org.spongepowered.api.util.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 2,318,100 |
this.searcher = searcher;
List<Node> rootNodes = newArrayList();
for (Project project : appContext.getProjects()) {
rootNodes.add(nodeFactory.newContainerNode(project, settingsProvider.getSettings()));
}
view.setStructure(rootNodes);
view.show();
} | this.searcher = searcher; List<Node> rootNodes = newArrayList(); for (Project project : appContext.getProjects()) { rootNodes.add(nodeFactory.newContainerNode(project, settingsProvider.getSettings())); } view.setStructure(rootNodes); view.show(); } | /**
* Show tree view with all root nodes of the workspace.
*
* @param searcher
* delegate from the root widget of the full-text-search mechanism
*/ | Show tree view with all root nodes of the workspace | show | {
"repo_name": "kaloyan-raev/che",
"path": "ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/search/selectpath/SelectPathPresenter.java",
"license": "epl-1.0",
"size": 2690
} | [
"com.google.common.collect.Lists",
"java.util.List",
"org.eclipse.che.ide.api.data.tree.Node",
"org.eclipse.che.ide.api.resources.Project"
] | import com.google.common.collect.Lists; import java.util.List; import org.eclipse.che.ide.api.data.tree.Node; import org.eclipse.che.ide.api.resources.Project; | import com.google.common.collect.*; import java.util.*; import org.eclipse.che.ide.api.data.tree.*; import org.eclipse.che.ide.api.resources.*; | [
"com.google.common",
"java.util",
"org.eclipse.che"
] | com.google.common; java.util; org.eclipse.che; | 973,466 |
public Hashtable<?, ?> getEnvironment() throws NamingException {
return (Hashtable<?, ?>) environment.clone();
} | Hashtable<?, ?> function() throws NamingException { return (Hashtable<?, ?>) environment.clone(); } | /**
* Returns a clone of the environment associated with this context.
*
* @return a hash table with the context's environment
* @see Context#getEnvironment()
*/ | Returns a clone of the environment associated with this context | getEnvironment | {
"repo_name": "nextopio/nextop-client",
"path": "org.apache-jarjar/src/main/java/org/apache/harmony/jndi/provider/dns/DNSContext.java",
"license": "apache-2.0",
"size": 80073
} | [
"java.util.Hashtable",
"javax.naming.NamingException"
] | import java.util.Hashtable; import javax.naming.NamingException; | import java.util.*; import javax.naming.*; | [
"java.util",
"javax.naming"
] | java.util; javax.naming; | 1,986,119 |
private MemConglomerateController openConglomerateController(
MemConglomerate conglomerate, int openMode, int lockLevel,
LockingPolicy locking) throws StandardException {
MemConglomerateController cc;
final int conglomType = conglomerate.getType();
for (int index = 0; index < this.conglomerate... | MemConglomerateController function( MemConglomerate conglomerate, int openMode, int lockLevel, LockingPolicy locking) throws StandardException { MemConglomerateController cc; final int conglomType = conglomerate.getType(); for (int index = 0; index < this.conglomerateControllers.size(); ++index) { cc = this.conglomerat... | /**
* Check if we already have a closed controller of the same type then
* reinitialize with new parameters, else open a new controller. Note that
* this can potentially be against a new Conglomerate.
*/ | Check if we already have a closed controller of the same type then reinitialize with new parameters, else open a new controller. Note that this can potentially be against a new Conglomerate | openConglomerateController | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/engine/access/GemFireTransaction.java",
"license": "apache-2.0",
"size": 148971
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException",
"com.pivotal.gemfirexd.internal.iapi.store.raw.LockingPolicy"
] | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.store.raw.LockingPolicy; | import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.store.raw.*; | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 472,009 |
@SuppressWarnings("unchecked")
@Override
public final Collection<V> getAll(final PaginationData pagination) {
final Query builtQuery; // Query created from the query data
checkNotNull(pagination,
"Received a null pointer as the pagination data");
// Builds the query... | @SuppressWarnings(STR) final Collection<V> function(final PaginationData pagination) { final Query builtQuery; checkNotNull(pagination, STR); builtQuery = getEntityManager().createQuery(getAllValuesQuery()); applyPagination(builtQuery, pagination); return builtQuery.getResultList(); } | /**
* Returns all the entities contained in the repository paginated.
* <p>
* The query used for this operation is the one received by the constructor.
*
* @return all the entities contained in the repository paginated
*/ | Returns all the entities contained in the repository paginated. The query used for this operation is the one received by the constructor | getAll | {
"repo_name": "Bernardo-MG/repository-pattern-java",
"path": "src/main/java/com/wandrell/pattern/repository/jpa/JpaRepository.java",
"license": "mit",
"size": 12093
} | [
"com.google.common.base.Preconditions",
"com.wandrell.pattern.repository.pagination.PaginationData",
"java.util.Collection",
"javax.persistence.Query"
] | import com.google.common.base.Preconditions; import com.wandrell.pattern.repository.pagination.PaginationData; import java.util.Collection; import javax.persistence.Query; | import com.google.common.base.*; import com.wandrell.pattern.repository.pagination.*; import java.util.*; import javax.persistence.*; | [
"com.google.common",
"com.wandrell.pattern",
"java.util",
"javax.persistence"
] | com.google.common; com.wandrell.pattern; java.util; javax.persistence; | 535,911 |
@Override
public boolean enterDeclaration(CssDeclarationNode declarationNode) {
// TODO(bolinfest): Associate CSS version with a Property so that this check
// can also verify the "compliance level." For example, it may want to
// enforce that all properties are CSS 2.1 or earlier.
CssPropertyNode p... | boolean function(CssDeclarationNode declarationNode) { CssPropertyNode propertyNode = declarationNode.getPropertyName(); Property property = propertyNode.getProperty(); String propertyName = property.getName(); if (propertyName.startsWith("*") propertyName.startsWith("_")) { propertyName = propertyName.substring(1); pr... | /**
* Checks whether the {@code Property} of {@code declarationNode} is a
* recognized property. If not, an error is reported.
*/ | Checks whether the Property of declarationNode is a recognized property. If not, an error is reported | enterDeclaration | {
"repo_name": "varshluck/closure-stylesheets",
"path": "src/com/google/common/css/compiler/passes/VerifyRecognizedProperties.java",
"license": "apache-2.0",
"size": 3991
} | [
"com.google.common.css.compiler.ast.CssDeclarationNode",
"com.google.common.css.compiler.ast.CssPropertyNode",
"com.google.common.css.compiler.ast.GssError",
"com.google.common.css.compiler.ast.Property"
] | import com.google.common.css.compiler.ast.CssDeclarationNode; import com.google.common.css.compiler.ast.CssPropertyNode; import com.google.common.css.compiler.ast.GssError; import com.google.common.css.compiler.ast.Property; | import com.google.common.css.compiler.ast.*; | [
"com.google.common"
] | com.google.common; | 2,533,347 |
public CustomColumn getColumn(String columnId) {
return idToColumn.get(columnId);
} | CustomColumn function(String columnId) { return idToColumn.get(columnId); } | /**
* Gets the column corresponding to the given string identifier.
*
* @param columnId
* the id of the column to get
* @return the column with the given id
*/ | Gets the column corresponding to the given string identifier | getColumn | {
"repo_name": "Darsstar/framework",
"path": "client/src/main/java/com/vaadin/client/connectors/grid/GridConnector.java",
"license": "apache-2.0",
"size": 23583
} | [
"com.vaadin.client.connectors.grid.ColumnConnector"
] | import com.vaadin.client.connectors.grid.ColumnConnector; | import com.vaadin.client.connectors.grid.*; | [
"com.vaadin.client"
] | com.vaadin.client; | 568,106 |
public boolean setSelection(@NonNull IDrawerItem drawerItem, boolean fireOnClick) {
return setSelectionAtPosition(getPosition(drawerItem), fireOnClick);
} | boolean function(@NonNull IDrawerItem drawerItem, boolean fireOnClick) { return setSelectionAtPosition(getPosition(drawerItem), fireOnClick); } | /**
* set the current selection in the drawer
* NOTE: This will trigger onDrawerItemSelected without a view if you pass fireOnClick = true;
*
* @param drawerItem
* @param fireOnClick
*/ | set the current selection in the drawer | setSelection | {
"repo_name": "FreedomZZQ/YouJoin-Android",
"path": "material-drawer-library/src/main/java/com/mikepenz/materialdrawer/Drawer.java",
"license": "mit",
"size": 33812
} | [
"android.support.annotation.NonNull",
"com.mikepenz.materialdrawer.model.interfaces.IDrawerItem"
] | import android.support.annotation.NonNull; import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem; | import android.support.annotation.*; import com.mikepenz.materialdrawer.model.interfaces.*; | [
"android.support",
"com.mikepenz.materialdrawer"
] | android.support; com.mikepenz.materialdrawer; | 1,028,819 |
@ServiceMethod(returns = ReturnType.SINGLE)
public CloudServiceInstanceViewInner getInstanceView(String resourceGroupName, String cloudServiceName) {
return getInstanceViewAsync(resourceGroupName, cloudServiceName).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) CloudServiceInstanceViewInner function(String resourceGroupName, String cloudServiceName) { return getInstanceViewAsync(resourceGroupName, cloudServiceName).block(); } | /**
* Gets the status of a cloud service.
*
* @param resourceGroupName Name of the resource group.
* @param cloudServiceName Name of the cloud service.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ApiErrorException thrown if the request is rejected... | Gets the status of a cloud service | getInstanceView | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CloudServicesClientImpl.java",
"license": "mit",
"size": 179410
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.compute.fluent.models.CloudServiceInstanceViewInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.fluent.models.CloudServiceInstanceViewInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 30,212 |
public static void setC2DMReceiverId(String registrationId) {
Log.i(LOG_TAG, "setC2DMReceiverId() received GCM ID " + registrationId);
boolean setNewC2DMID = false;
if (registrationId != null) {
if (c2dmRegistrationId == null) {
setNewC2DMID = true;
} else {
if (!registrationId.equals(c2dmRegistr... | static void function(String registrationId) { Log.i(LOG_TAG, STR + registrationId); boolean setNewC2DMID = false; if (registrationId != null) { if (c2dmRegistrationId == null) { setNewC2DMID = true; } else { if (!registrationId.equals(c2dmRegistrationId)) { setNewC2DMID = true; } } } else { Log.w(STR, STR); } if (setNe... | /**
* Sets the RegistrationID to the given ID
* @param registrationId The ID to set to
*/ | Sets the RegistrationID to the given ID | setC2DMReceiverId | {
"repo_name": "ischweizer/MoSeS--Client-",
"path": "moses/src/de/da_sense/moses/client/service/helpers/C2DMManager.java",
"license": "apache-2.0",
"size": 5839
} | [
"android.preference.PreferenceManager",
"de.da_sense.moses.client.preferences.MosesPreferences",
"de.da_sense.moses.client.service.MosesService",
"de.da_sense.moses.client.util.Log"
] | import android.preference.PreferenceManager; import de.da_sense.moses.client.preferences.MosesPreferences; import de.da_sense.moses.client.service.MosesService; import de.da_sense.moses.client.util.Log; | import android.preference.*; import de.da_sense.moses.client.preferences.*; import de.da_sense.moses.client.service.*; import de.da_sense.moses.client.util.*; | [
"android.preference",
"de.da_sense.moses"
] | android.preference; de.da_sense.moses; | 2,869,883 |
public synchronized void addNewSettlement(Settlement settlement, HashMap trackers)
{
//D.ebugPrintln("%$% settlement owner ="+settlement.getPlayer().getPlayerNumber());
//D.ebugPrintln("%$% tracker owner ="+player.getPlayerNumber());
if (settlement.getPlayer().getPlayerNumber() == pl... | synchronized void function(Settlement settlement, HashMap trackers) { if (settlement.getPlayer().getPlayerNumber() == player.getPlayerNumber()) { addOurNewSettlement(settlement, trackers); } else { addTheirNewSettlement(settlement, false); } } | /**
* add a settlement that has just been built
*
* @param settlement the settlement
* @param trackers player trackers for the players
*/ | add a settlement that has just been built | addNewSettlement | {
"repo_name": "nsp/OpenSettlers",
"path": "src/java/soc/robot/PlayerTracker.java",
"license": "gpl-3.0",
"size": 162138
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 849,656 |
private void restoreKVStateData() throws IOException, RocksDBException {
//for all key-groups in the current state handle...
for (Tuple2<Integer, Long> keyGroupOffset : currentKeyGroupsStateHandle.getGroupRangeOffsets()) {
int keyGroup = keyGroupOffset.f0;
// Check that restored key groups all belon... | void function() throws IOException, RocksDBException { for (Tuple2<Integer, Long> keyGroupOffset : currentKeyGroupsStateHandle.getGroupRangeOffsets()) { int keyGroup = keyGroupOffset.f0; Preconditions.checkState(rocksDBKeyedStateBackend.getKeyGroupRange().contains(keyGroup), STR); long offset = keyGroupOffset.f1; if (0... | /**
* Restore the KV-state / ColumnFamily data for all key-groups referenced by the current state handle
*
* @throws IOException
* @throws RocksDBException
*/ | Restore the KV-state / ColumnFamily data for all key-groups referenced by the current state handle | restoreKVStateData | {
"repo_name": "oscarceballos/flink-1.3.2",
"path": "flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBKeyedStateBackend.java",
"license": "apache-2.0",
"size": 72534
} | [
"java.io.IOException",
"org.apache.flink.api.common.typeutils.base.array.BytePrimitiveArraySerializer",
"org.apache.flink.api.java.tuple.Tuple2",
"org.apache.flink.util.Preconditions",
"org.rocksdb.ColumnFamilyHandle",
"org.rocksdb.RocksDBException"
] | import java.io.IOException; import org.apache.flink.api.common.typeutils.base.array.BytePrimitiveArraySerializer; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.util.Preconditions; import org.rocksdb.ColumnFamilyHandle; import org.rocksdb.RocksDBException; | import java.io.*; import org.apache.flink.api.common.typeutils.base.array.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.util.*; import org.rocksdb.*; | [
"java.io",
"org.apache.flink",
"org.rocksdb"
] | java.io; org.apache.flink; org.rocksdb; | 461,721 |
@Override
public boolean isFatalEnabled() {
return getLogger().isEnabledFor(Level.FATAL);
} | boolean function() { return getLogger().isEnabledFor(Level.FATAL); } | /**
* Check whether the Log4j Logger used is enabled for {@code FATAL} priority.
*/ | Check whether the Log4j Logger used is enabled for FATAL priority | isFatalEnabled | {
"repo_name": "apache/commons-logging",
"path": "src/main/java/org/apache/commons/logging/impl/Log4JLogger.java",
"license": "apache-2.0",
"size": 10418
} | [
"org.apache.log4j.Level"
] | import org.apache.log4j.Level; | import org.apache.log4j.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 321,031 |
public Pair<Boolean, String> createAccount(String userID, String password) {
// Check if the user is already in the friendslist
// Check if account exists
if (p2p.getBlocking(userID) != null) {
return new Pair<>(false, "Could not create user account. UserID already taken.");
... | Pair<Boolean, String> function(String userID, String password) { if (p2p.getBlocking(userID) != null) { return new Pair<>(false, STR); } userProfile = new PrivateUserProfile(userID, password); if (savePrivateUserProfile() == false) { return new Pair<>(false, STR); } PublicUserProfile publicUserProfile; publicUserProfil... | /**
* User Account Management *
*/ | User Account Management | createAccount | {
"repo_name": "sebastian-stephan/p2p-messenger",
"path": "src/main/java/org/challengetask/MainApp.java",
"license": "apache-2.0",
"size": 26122
} | [
"org.challengetask.usermanagement.PrivateUserProfile",
"org.challengetask.usermanagement.PublicUserProfile"
] | import org.challengetask.usermanagement.PrivateUserProfile; import org.challengetask.usermanagement.PublicUserProfile; | import org.challengetask.usermanagement.*; | [
"org.challengetask.usermanagement"
] | org.challengetask.usermanagement; | 234,913 |
public List<Tuple3<FieldsPublication, FieldsConcerns, FieldsProteinSequence>> getRelationshipConcerns(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException {
List<Object> args = new ArrayList<Object>();
args.add(ids);
... | List<Tuple3<FieldsPublication, FieldsConcerns, FieldsProteinSequence>> function(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); args.add(fromFields); args.add(relFields); args.... | /**
* <p>Original spec-file function name: get_relationship_Concerns</p>
* <pre>
* This relationship connects a publication to the protein
* sequences it describes.
* It has the following fields:
* =over 4
* =back
* </pre>
* @param ids instance of list of String
* @... | Original spec-file function name: get_relationship_Concerns <code> This relationship connects a publication to the protein sequences it describes. It has the following fields: =over 4 =back </code> | getRelationshipConcerns | {
"repo_name": "kbase/trees",
"path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java",
"license": "mit",
"size": 869221
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"us.kbase.common.service.JsonClientException",
"us.kbase.common.service.Tuple3"
] | import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3; | import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util",
"us.kbase.common"
] | com.fasterxml.jackson; java.io; java.util; us.kbase.common; | 1,967,537 |
public boolean unloadQueuedChunks()
{
if (!this.worldObj.disableLevelSaving)
{
if (!this.droppedChunksSet.isEmpty())
{
Iterator<Long> iterator = this.droppedChunksSet.iterator();
for (int i = 0; i < 100 && iterator.hasNext(); iterator.remo... | boolean function() { if (!this.worldObj.disableLevelSaving) { if (!this.droppedChunksSet.isEmpty()) { Iterator<Long> iterator = this.droppedChunksSet.iterator(); for (int i = 0; i < 100 && iterator.hasNext(); iterator.remove()) { Long olong = (Long)iterator.next(); Chunk chunk = (Chunk)this.id2ChunkMap.get(olong); if (... | /**
* Unloads chunks that are marked to be unloaded. This is not guaranteed to unload every such chunk.
*/ | Unloads chunks that are marked to be unloaded. This is not guaranteed to unload every such chunk | unloadQueuedChunks | {
"repo_name": "scribblemaniac/AwakenDreamsClient",
"path": "mcp/src/minecraft/net/minecraft/world/gen/ChunkProviderServer.java",
"license": "gpl-3.0",
"size": 8881
} | [
"java.util.Iterator",
"net.minecraft.world.chunk.Chunk"
] | import java.util.Iterator; import net.minecraft.world.chunk.Chunk; | import java.util.*; import net.minecraft.world.chunk.*; | [
"java.util",
"net.minecraft.world"
] | java.util; net.minecraft.world; | 815,401 |
JsonArray<Pair<Document, Editor>> getOpenDocuments() {
JsonArray<Pair<Document, Editor>> result = JsonCollections.createArray();
if (editor == null || editor.getDocument() == null) {
return result;
}
result.add(Pair.of(editor.getDocument(), editor));
return result;
} | JsonArray<Pair<Document, Editor>> getOpenDocuments() { JsonArray<Pair<Document, Editor>> result = JsonCollections.createArray(); if (editor == null editor.getDocument() == null) { return result; } result.add(Pair.of(editor.getDocument(), editor)); return result; } | /**
* Returns a potentially empty list of pairs of a document and an editor.
*/ | Returns a potentially empty list of pairs of a document and an editor | getOpenDocuments | {
"repo_name": "PP888/collide",
"path": "java/com/google/collide/client/document/DocumentManager.java",
"license": "apache-2.0",
"size": 12090
} | [
"com.google.collide.client.editor.Editor",
"com.google.collide.json.shared.JsonArray",
"com.google.collide.shared.Pair",
"com.google.collide.shared.document.Document",
"com.google.collide.shared.util.JsonCollections"
] | import com.google.collide.client.editor.Editor; import com.google.collide.json.shared.JsonArray; import com.google.collide.shared.Pair; import com.google.collide.shared.document.Document; import com.google.collide.shared.util.JsonCollections; | import com.google.collide.client.editor.*; import com.google.collide.json.shared.*; import com.google.collide.shared.*; import com.google.collide.shared.document.*; import com.google.collide.shared.util.*; | [
"com.google.collide"
] | com.google.collide; | 303,260 |
public void setValue(Set<? extends Integer> value) {
setValueInternal(decode(value));
} | void function(Set<? extends Integer> value) { setValueInternal(decode(value)); } | /**
* Mutator for this setting.
*
* @param value the value to store
*/ | Mutator for this setting | setValue | {
"repo_name": "alejandroarturom/frostwire-desktop",
"path": "src/org/limewire/setting/IntSetSetting.java",
"license": "gpl-3.0",
"size": 3329
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,368,959 |
public void read(final Trip trip, final long index) throws IOException {
ensureBuffer();
Trip.seek(buffer, index, offset);
trip.read(buffer, index);
}
} // TripBlock
private final long size;
private RandomAccessFile raf;
private final List<TripBlock> blocks;
protected f... | void function(final Trip trip, final long index) throws IOException { ensureBuffer(); Trip.seek(buffer, index, offset); trip.read(buffer, index); } } private final long size; private RandomAccessFile raf; private final List<TripBlock> blocks; protected final FileChannel fc; public BinaryTripManager(final Resource r) th... | /**
* Reads the trip at the given index.
*
* @param trip The trip to store the info.
* @param index The absolute index of the trip.
* @throws IOException I/O Exception.
*/ | Reads the trip at the given index | read | {
"repo_name": "JosuaKrause/Trails",
"path": "src/main/java/trails/io/BinaryTripManager.java",
"license": "mit",
"size": 9791
} | [
"java.io.IOException",
"java.io.RandomAccessFile",
"java.nio.channels.FileChannel",
"java.util.ArrayList",
"java.util.List"
] | import java.io.IOException; import java.io.RandomAccessFile; import java.nio.channels.FileChannel; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.nio.channels.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 283,603 |
protected void sequence_CaseAlternative(EObject context, CaseAlternative semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(EObject context, CaseAlternative semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Constraint:
* (choice=Choices statement+=SequentialStatement*)
*/ | Constraint: (choice=Choices statement+=SequentialStatement*) | sequence_CaseAlternative | {
"repo_name": "mlanoe/x-vhdl",
"path": "plugins/net.mlanoe.language.vhdl.xtext/src-gen/net/mlanoe/language/vhdl/xtext/serializer/AbstractVhdlSemanticSequencer.java",
"license": "gpl-3.0",
"size": 147569
} | [
"net.mlanoe.language.vhdl.statement.CaseAlternative",
"org.eclipse.emf.ecore.EObject"
] | import net.mlanoe.language.vhdl.statement.CaseAlternative; import org.eclipse.emf.ecore.EObject; | import net.mlanoe.language.vhdl.statement.*; import org.eclipse.emf.ecore.*; | [
"net.mlanoe.language",
"org.eclipse.emf"
] | net.mlanoe.language; org.eclipse.emf; | 496,158 |
public final Cut selectModel( MyDataset data )
{
double minResult, averageInfoGain = 0, sumOfWeights;
Cut [] current;
Cut best = null, noCut = null;
int models = 0, i;
boolean multiVal = true;
Classification checkClassification;
MyAttribute attribute;
try
{
// ... | final Cut function( MyDataset data ) { double minResult, averageInfoGain = 0, sumOfWeights; Cut [] current; Cut best = null, noCut = null; int models = 0, i; boolean multiVal = true; Classification checkClassification; MyAttribute attribute; try { checkClassification = new Classification( data ); noCut = new Cut( check... | /** Function to select the cut point.
*
* @param data The dataset used to compute the cut point.
*
* @return The cut point computed.
*/ | Function to select the cut point | selectModel | {
"repo_name": "TheMurderer/keel",
"path": "src/keel/Algorithms/Genetic_Rule_Learning/PART/SelectCut.java",
"license": "gpl-3.0",
"size": 5965
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,981,830 |
public RectangleInsets getLabelPadding() {
return this.labelPadding;
} | RectangleInsets function() { return this.labelPadding; } | /**
* Returns the label padding.
*
* @return The label padding (never <code>null</code>).
*
* @since 1.0.7
*
* @see #setLabelPadding(RectangleInsets)
*/ | Returns the label padding | getLabelPadding | {
"repo_name": "ceabie/jfreechart",
"path": "source/org/jfree/chart/plot/PiePlot.java",
"license": "lgpl-2.1",
"size": 130851
} | [
"org.jfree.ui.RectangleInsets"
] | import org.jfree.ui.RectangleInsets; | import org.jfree.ui.*; | [
"org.jfree.ui"
] | org.jfree.ui; | 2,667,742 |
@Test
public final void testDeleteMethod() {
String id = "doctorwho", uri = "/deleterequest/" + id;
stubFor(delete(urlMatching(uri))
.willReturn(aResponse()
.withStatus(200)));
httpMethodEndpoint.deleteRequest(id);
verify(deleteRequestedFor(urlEqualTo(uri)));
}
| final void function() { String id = STR, uri = STR + id; stubFor(delete(urlMatching(uri)) .willReturn(aResponse() .withStatus(200))); httpMethodEndpoint.deleteRequest(id); verify(deleteRequestedFor(urlEqualTo(uri))); } | /**
* <p>Test for the request method DELETE.</p>
*
* @since 1.3.0
*/ | Test for the request method DELETE | testDeleteMethod | {
"repo_name": "sahan/ZombieLink",
"path": "zombielink/src/test/java/com/lonepulse/zombielink/processor/HttpMethodEndpointTest.java",
"license": "apache-2.0",
"size": 8110
} | [
"com.github.tomakehurst.wiremock.client.WireMock"
] | import com.github.tomakehurst.wiremock.client.WireMock; | import com.github.tomakehurst.wiremock.client.*; | [
"com.github.tomakehurst"
] | com.github.tomakehurst; | 336,707 |
public List<OrgDto> listOrgs(User loggedInUser) {
ensureUserRole(loggedInUser, RoleFactory.SAT_ADMIN);
return OrgManager.activeOrgs(loggedInUser);
} | List<OrgDto> function(User loggedInUser) { ensureUserRole(loggedInUser, RoleFactory.SAT_ADMIN); return OrgManager.activeOrgs(loggedInUser); } | /**
* Returns the list of organizations.
* @param loggedInUser The current user
* @return list of orgs.
* @xmlrpc.doc Returns the list of organizations.
* @xmlrpc.param #param("string", "sessionKey")
* @xmlrpc.returntype
* #array()
* $OrgDtoSerializer
* #array_end()
... | Returns the list of organizations | listOrgs | {
"repo_name": "mcalmer/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/org/OrgHandler.java",
"license": "gpl-2.0",
"size": 34554
} | [
"com.redhat.rhn.domain.role.RoleFactory",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.frontend.dto.OrgDto",
"com.redhat.rhn.manager.org.OrgManager",
"java.util.List"
] | import com.redhat.rhn.domain.role.RoleFactory; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.dto.OrgDto; import com.redhat.rhn.manager.org.OrgManager; import java.util.List; | import com.redhat.rhn.domain.role.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.dto.*; import com.redhat.rhn.manager.org.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 76,064 |
InputStream getFileContent(); | InputStream getFileContent(); | /***
* Executes a file content request against the partner service.
* @return: The file content stream.
*/ | Executes a file content request against the partner service | getFileContent | {
"repo_name": "iogav/Partner-Center-Java-SDK",
"path": "PartnerSdk/src/main/java/com/microsoft/store/partnercenter/network/IPartnerServiceProxy.java",
"license": "mit",
"size": 3563
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,249,202 |
public void actionPerformed(ActionEvent evt) {
// lazy initialization
if ( chooser == null )
init();
// open image save dialog
File f = null;
scaler.setImage(display.getOffscreenBuffer());
int returnVal = chooser.showSaveDialog(display);
... | void function(ActionEvent evt) { if ( chooser == null ) init(); File f = null; scaler.setImage(display.getOffscreenBuffer()); int returnVal = chooser.showSaveDialog(display); if (returnVal == JFileChooser.APPROVE_OPTION) { f = chooser.getSelectedFile(); } else { return; } String format = ((SimpleFileFilter)chooser.getF... | /**
* Shows the image export dialog and processes the results.
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/ | Shows the image export dialog and processes the results | actionPerformed | {
"repo_name": "giacomovagni/Prefuse",
"path": "src/prefuse/util/display/ExportDisplayAction.java",
"license": "bsd-3-clause",
"size": 3665
} | [
"java.awt.event.ActionEvent",
"java.io.BufferedOutputStream",
"java.io.File",
"java.io.FileOutputStream",
"java.io.OutputStream",
"javax.swing.JFileChooser",
"javax.swing.JOptionPane"
] | import java.awt.event.ActionEvent; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStream; import javax.swing.JFileChooser; import javax.swing.JOptionPane; | import java.awt.event.*; import java.io.*; import javax.swing.*; | [
"java.awt",
"java.io",
"javax.swing"
] | java.awt; java.io; javax.swing; | 529,481 |
public boolean setReplication(Path src, short replication)
throws IOException {
return true;
} | boolean function(Path src, short replication) throws IOException { return true; } | /**
* Set replication for an existing file.
*
* @param src file name
* @param replication new replication
* @throws IOException
* @return true if successful;
* false if file does not exist or is a directory
*/ | Set replication for an existing file | setReplication | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java",
"license": "apache-2.0",
"size": 86505
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,727,666 |
public CompletableFuture<Map<R, Object>> fetchFieldValues(R[] rowKeys, String fieldName) {
return fetchFieldValues(rowKeys, fieldName, 1)
.thenApply(multiVersionedMap -> toSingleVersioned(multiVersionedMap, rowKeys.length));
} | CompletableFuture<Map<R, Object>> function(R[] rowKeys, String fieldName) { return fetchFieldValues(rowKeys, fieldName, 1) .thenApply(multiVersionedMap -> toSingleVersioned(multiVersionedMap, rowKeys.length)); } | /**
* Fetch column values for a given array of row keys (bulk variant of method {@link #fetchFieldValue(Serializable, String) fetchFieldValue(R, String)})
*
* @param rowKeys Array of row keys to fetch
* @param fieldName Name of the private variable of your bean-like object (of a class that impleme... | Fetch column values for a given array of row keys (bulk variant of method <code>#fetchFieldValue(Serializable, String) fetchFieldValue(R, String)</code>) | fetchFieldValues | {
"repo_name": "flipkart-incubator/hbase-object-mapper",
"path": "src/main/java/com/flipkart/hbaseobjectmapper/ReactiveHBDAO.java",
"license": "apache-2.0",
"size": 34635
} | [
"java.util.Map",
"java.util.concurrent.CompletableFuture"
] | import java.util.Map; import java.util.concurrent.CompletableFuture; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,264,570 |
EReference getLocalVariableDefinition_Variable(); | EReference getLocalVariableDefinition_Variable(); | /**
* Returns the meta object for the containment reference '{@link org.yakindu.sct.model.sexec.LocalVariableDefinition#getVariable <em>Variable</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Variable</em>'.
* @see org.yakindu.sct.model.s... | Returns the meta object for the containment reference '<code>org.yakindu.sct.model.sexec.LocalVariableDefinition#getVariable Variable</code>'. | getLocalVariableDefinition_Variable | {
"repo_name": "Yakindu/statecharts",
"path": "plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecPackage.java",
"license": "epl-1.0",
"size": 168724
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 456,228 |
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": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/I_AD_Desktop.java",
"license": "gpl-2.0",
"size": 5269
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,877,235 |
public boolean markSupported() {
return stream.markSupported();
}
private class TargetDataLineInputStream extends InputStream {
TargetDataLine line;
TargetDataLineInputStream(TargetDataLine line) {
super();
this.line = line;
} | boolean function() { return stream.markSupported(); } private class TargetDataLineInputStream extends InputStream { TargetDataLine line; TargetDataLineInputStream(TargetDataLine line) { super(); this.line = line; } | /**
* Tests whether this audio input stream supports the <code>mark</code> and
* <code>reset</code> methods.
* @return <code>true</code> if this stream supports the <code>mark</code>
* and <code>reset</code> methods; <code>false</code> otherwise
* @see #mark
* @see #reset
*/ | Tests whether this audio input stream supports the <code>mark</code> and <code>reset</code> methods | markSupported | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/javax/sound/sampled/AudioInputStream.java",
"license": "gpl-2.0",
"size": 16659
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,866,269 |
@SuppressWarnings("static-access")
private void checkFreeSpace() {
long freeMB = dataDir.getFreeSpace() / 1024 / 1024;
if (freeMB < config.getMinFreeSpaceMB()) {
DefaultMessageListenerContainer listenerContainer = (DefaultMessageListenerContainer)
applicationContext.getBean("listenerContain... | @SuppressWarnings(STR) void function() { long freeMB = dataDir.getFreeSpace() / 1024 / 1024; if (freeMB < config.getMinFreeSpaceMB()) { DefaultMessageListenerContainer listenerContainer = (DefaultMessageListenerContainer) applicationContext.getBean(STR); logger.info(STR + config.getDataDir() + STR + freeMB + STR + conf... | /**
* check for free space - shutdownshutdown listener and gracefully exit if full
*/ | check for free space - shutdownshutdown listener and gracefully exit if full | checkFreeSpace | {
"repo_name": "oneops/OneOps",
"path": "inductor/src/main/java/com/oneops/inductor/Listener.java",
"license": "apache-2.0",
"size": 13973
} | [
"org.springframework.jms.listener.DefaultMessageListenerContainer"
] | import org.springframework.jms.listener.DefaultMessageListenerContainer; | import org.springframework.jms.listener.*; | [
"org.springframework.jms"
] | org.springframework.jms; | 2,164,111 |
private synchronized void initBlockCache() {
CacheConfig cacheConfig = this.regionServer.cacheConfig;
if (cacheConfig != null && this.blockCache == null) {
this.blockCache = cacheConfig.getBlockCache();
}
if (this.blockCache != null && this.cacheStats == null) {
this.cacheStats = blockCa... | synchronized void function() { CacheConfig cacheConfig = this.regionServer.cacheConfig; if (cacheConfig != null && this.blockCache == null) { this.blockCache = cacheConfig.getBlockCache(); } if (this.blockCache != null && this.cacheStats == null) { this.cacheStats = blockCache.getStats(); } } | /**
* It's possible that due to threading the block cache could not be initialized
* yet (testing multiple region servers in one jvm). So we need to try and initialize
* the blockCache and cacheStats reference multiple times until we succeed.
*/ | It's possible that due to threading the block cache could not be initialized yet (testing multiple region servers in one jvm). So we need to try and initialize the blockCache and cacheStats reference multiple times until we succeed | initBlockCache | {
"repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java",
"license": "apache-2.0",
"size": 21523
} | [
"org.apache.hadoop.hbase.io.hfile.CacheConfig"
] | import org.apache.hadoop.hbase.io.hfile.CacheConfig; | import org.apache.hadoop.hbase.io.hfile.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,774,125 |
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
} | Builder function(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } | /**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* SubscriptionScheduleUpdateParams.Phase.AddInvoiceItem.PriceData#extraParams}... | Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>SubscriptionScheduleUpdateParams.Phase.AddInvoiceItem.PriceData#extraParams</code> for the field documentation | putAllExtraParam | {
"repo_name": "stripe/stripe-java",
"path": "src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java",
"license": "mit",
"size": 111931
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,310,586 |
static String decodeDomainName(ByteBuf buf) {
buf.markReaderIndex();
try {
int position = -1;
int checked = 0;
final int end = buf.writerIndex();
final StringBuilder name = new StringBuilder(buf.readableBytes() << 1);
for (int len = buf.rea... | static String decodeDomainName(ByteBuf buf) { buf.markReaderIndex(); try { int position = -1; int checked = 0; final int end = buf.writerIndex(); final StringBuilder name = new StringBuilder(buf.readableBytes() << 1); for (int len = buf.readUnsignedByte(); buf.isReadable() && len != 0; len = buf.readUnsignedByte()) { b... | /**
* Adapted from {@link DefaultDnsRecordDecoder#decodeName(ByteBuf)}.
*/ | Adapted from <code>DefaultDnsRecordDecoder#decodeName(ByteBuf)</code> | decodeDomainName | {
"repo_name": "eincs/netty",
"path": "resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolverContext.java",
"license": "apache-2.0",
"size": 18679
} | [
"io.netty.buffer.ByteBuf",
"io.netty.util.CharsetUtil"
] | import io.netty.buffer.ByteBuf; import io.netty.util.CharsetUtil; | import io.netty.buffer.*; import io.netty.util.*; | [
"io.netty.buffer",
"io.netty.util"
] | io.netty.buffer; io.netty.util; | 674,888 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<WorkloadNetworkVirtualMachineInner>> listVirtualMachinesNextSinglePageAsync(
String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be ... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<WorkloadNetworkVirtualMachineInner>> function( String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final Strin... | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked excepti... | Get the next page of items | listVirtualMachinesNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java",
"license": "mit",
"size": 538828
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.avs.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,416,625 |
public List<InterpreterSetting> get() {
synchronized (interpreterSettings) {
List<InterpreterSetting> orderedSettings = new LinkedList<>();
Map<String, List<InterpreterSetting>> nameInterpreterSettingMap = new HashMap<>();
for (InterpreterSetting interpreterSetting : interpreterSettings.values(... | List<InterpreterSetting> function() { synchronized (interpreterSettings) { List<InterpreterSetting> orderedSettings = new LinkedList<>(); Map<String, List<InterpreterSetting>> nameInterpreterSettingMap = new HashMap<>(); for (InterpreterSetting interpreterSetting : interpreterSettings.values()) { String group = interpr... | /**
* Get interpreter settings
*/ | Get interpreter settings | get | {
"repo_name": "IceKhan13/zeppelin",
"path": "zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java",
"license": "apache-2.0",
"size": 42136
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.LinkedList",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,000,332 |
public WorkflowDTO getAPIWorkflowStatus(String uuid, String workflowType)
throws APIManagementException {
return APIUtil.getAPIWorkflowStatus(uuid, workflowType);
} | WorkflowDTO function(String uuid, String workflowType) throws APIManagementException { return APIUtil.getAPIWorkflowStatus(uuid, workflowType); } | /**
* Get the workflow status information for the given api for the given workflow type
*
* @param uuid Api uuid
* @param workflowType workflow type
* @return WorkflowDTO
* @throws APIManagementException
*/ | Get the workflow status information for the given api for the given workflow type | getAPIWorkflowStatus | {
"repo_name": "wso2/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java",
"license": "apache-2.0",
"size": 501725
} | [
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.impl.dto.WorkflowDTO",
"org.wso2.carbon.apimgt.impl.utils.APIUtil"
] | import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.dto.WorkflowDTO; import org.wso2.carbon.apimgt.impl.utils.APIUtil; | import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.dto.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 1,106,762 |
public void deleteDelegatedCredential(DelegationIdentifier id)
throws RemoteException, CDSInternalFault, PermissionDeniedFault {
client.deleteDelegatedCredential(id);
}
| void function(DelegationIdentifier id) throws RemoteException, CDSInternalFault, PermissionDeniedFault { client.deleteDelegatedCredential(id); } | /**
* This method allow and administrator to delete a delegated credential.
*
* @param id The Id of the delegated credential to delete.
*
* @throws RemoteException
* @throws CDSInternalFault
* @throws PermissionDeniedFault
*/ | This method allow and administrator to delete a delegated credential | deleteDelegatedCredential | {
"repo_name": "NCIP/cagrid-grid-incubation",
"path": "grid-incubation/test/projects/workflowHelper/resources/CredentialDelegationService/src/org/cagrid/gaards/cds/client/DelegationAdminClient.java",
"license": "bsd-3-clause",
"size": 5513
} | [
"java.rmi.RemoteException",
"org.cagrid.gaards.cds.common.DelegationIdentifier",
"org.cagrid.gaards.cds.stubs.types.CDSInternalFault",
"org.cagrid.gaards.cds.stubs.types.PermissionDeniedFault"
] | import java.rmi.RemoteException; import org.cagrid.gaards.cds.common.DelegationIdentifier; import org.cagrid.gaards.cds.stubs.types.CDSInternalFault; import org.cagrid.gaards.cds.stubs.types.PermissionDeniedFault; | import java.rmi.*; import org.cagrid.gaards.cds.common.*; import org.cagrid.gaards.cds.stubs.types.*; | [
"java.rmi",
"org.cagrid.gaards"
] | java.rmi; org.cagrid.gaards; | 1,639,088 |
return ServiceProvider.getSingleton(UserProvider.class);
} | return ServiceProvider.getSingleton(UserProvider.class); } | /**
* Gets the instance of the implementation of the interface.
* @return an implementation of {@link UserProvider}.
*/ | Gets the instance of the implementation of the interface | get | {
"repo_name": "SilverDav/Silverpeas-Core",
"path": "core-api/src/main/java/org/silverpeas/core/admin/user/service/UserProvider.java",
"license": "agpl-3.0",
"size": 3165
} | [
"org.silverpeas.core.util.ServiceProvider"
] | import org.silverpeas.core.util.ServiceProvider; | import org.silverpeas.core.util.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 2,579,995 |
protected File executePartialPut(HttpServletRequest req, Range range,
String path)
throws IOException {
// Append data specified in ranges to existing content for this
// resource - create a temp. file on the local filesystem to
// perform ... | File function(HttpServletRequest req, Range range, String path) throws IOException { File tempDir = (File) getServletContext().getAttribute (ServletContext.TEMPDIR); String convertedResourcePath = path.replace('/', '.'); File contentFile = new File(tempDir, convertedResourcePath); if (contentFile.createNewFile()) { con... | /**
* Handle a partial PUT. New content specified in request is appended to
* existing content in oldRevisionContent (if present). This code does
* not support simultaneous partial updates to the same resource.
* @param req The Servlet request
* @param range The range that will be written... | Handle a partial PUT. New content specified in request is appended to existing content in oldRevisionContent (if present). This code does not support simultaneous partial updates to the same resource | executePartialPut | {
"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.BufferedInputStream",
"java.io.File",
"java.io.IOException",
"java.io.RandomAccessFile",
"javax.servlet.ServletContext",
"javax.servlet.http.HttpServletRequest",
"org.apache.catalina.WebResource"
] | import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import org.apache.catalina.WebResource; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.catalina.*; | [
"java.io",
"javax.servlet",
"org.apache.catalina"
] | java.io; javax.servlet; org.apache.catalina; | 2,104,158 |
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
nativePasswordSelected(mNativePasswordGenerationPopupViewAndroid);
} | void function(AdapterView<?> parent, View view, int position, long id) { nativePasswordSelected(mNativePasswordGenerationPopupViewAndroid); } | /**
* Handles clicks on popup list elements. Only suggestion element is enabled. Clicking on the
* suggestion element notifies the native counterpart that the suggested password was selected.
* @param parent The parent view where the click happened.
* @param view The view that was provided by the ad... | Handles clicks on popup list elements. Only suggestion element is enabled. Clicking on the suggestion element notifies the native counterpart that the suggested password was selected | onItemClick | {
"repo_name": "danakj/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/autofill/PasswordGenerationPopupBridge.java",
"license": "bsd-3-clause",
"size": 6055
} | [
"android.view.View",
"android.widget.AdapterView"
] | import android.view.View; import android.widget.AdapterView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 1,537,230 |
public int hashCode(XMLGrammarDescription desc) {
return desc.hashCode();
}
protected static final class Entry {
public int hash;
public XMLGrammarDescription desc;
public Grammar grammar;
public Entry next;
protected Entry(int hash, XMLGrammarDescripti... | int function(XMLGrammarDescription desc) { return desc.hashCode(); } protected static final class Entry { public int hash; public XMLGrammarDescription desc; public Grammar grammar; public Entry next; protected Entry(int hash, XMLGrammarDescription desc, Grammar grammar, Entry next) { this.hash = hash; this.desc = desc... | /**
* Returns the hash code value for the given grammar description.
*
* @param desc The grammar description
* @return The hash code value
*/ | Returns the hash code value for the given grammar description | hashCode | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xerces-2_9_1/src/org/apache/xerces/util/XMLGrammarPoolImpl.java",
"license": "gpl-3.0",
"size": 13417
} | [
"org.apache.xerces.xni.grammars.Grammar",
"org.apache.xerces.xni.grammars.XMLGrammarDescription"
] | import org.apache.xerces.xni.grammars.Grammar; import org.apache.xerces.xni.grammars.XMLGrammarDescription; | import org.apache.xerces.xni.grammars.*; | [
"org.apache.xerces"
] | org.apache.xerces; | 1,698,126 |
protected void nodeNameValueChanged(DatabaseDriver driver) {
parent.nodeNameValueChanged(driver);
} | void function(DatabaseDriver driver) { parent.nodeNameValueChanged(driver); } | /**
* Indicates that a node name has changed and fires a call
* to repaint the tree display.
*/ | Indicates that a node name has changed and fires a call to repaint the tree display | nodeNameValueChanged | {
"repo_name": "toxeh/ExecuteQuery",
"path": "java/src/org/executequery/gui/drivers/DriverViewPanel.java",
"license": "gpl-3.0",
"size": 4310
} | [
"org.executequery.databasemediators.DatabaseDriver"
] | import org.executequery.databasemediators.DatabaseDriver; | import org.executequery.databasemediators.*; | [
"org.executequery.databasemediators"
] | org.executequery.databasemediators; | 1,148,052 |
public CIValidationResult validateRfcCiAttrs(CmsRfcCI rfcCi) {
CIValidationResult result = new CIValidationResult();
result.setValidated(true);
CmsClazz clazz = getClazz(rfcCi.getCiClassName());
Map<String, CmsClazzAttribute> clazzAttrsMap = new HashMap<String, CmsClazzAttribute>();
for (CmsClazz... | CIValidationResult function(CmsRfcCI rfcCi) { CIValidationResult result = new CIValidationResult(); result.setValidated(true); CmsClazz clazz = getClazz(rfcCi.getCiClassName()); Map<String, CmsClazzAttribute> clazzAttrsMap = new HashMap<String, CmsClazzAttribute>(); for (CmsClazzAttribute clazzAttr : clazz.getMdAttribu... | /**
* Validate rfc ci attrs.
*
* @param rfcCi the rfc ci
* @return the cI validation result
*/ | Validate rfc ci attrs | validateRfcCiAttrs | {
"repo_name": "oneops/OneOps",
"path": "cmsdal/src/main/java/com/oneops/cms/util/CmsDJValidator.java",
"license": "apache-2.0",
"size": 12555
} | [
"com.oneops.cms.dj.domain.CmsRfcAttribute",
"com.oneops.cms.dj.domain.CmsRfcCI",
"com.oneops.cms.md.domain.CmsClazz",
"com.oneops.cms.md.domain.CmsClazzAttribute",
"java.util.HashMap",
"java.util.Map"
] | import com.oneops.cms.dj.domain.CmsRfcAttribute; import com.oneops.cms.dj.domain.CmsRfcCI; import com.oneops.cms.md.domain.CmsClazz; import com.oneops.cms.md.domain.CmsClazzAttribute; import java.util.HashMap; import java.util.Map; | import com.oneops.cms.dj.domain.*; import com.oneops.cms.md.domain.*; import java.util.*; | [
"com.oneops.cms",
"java.util"
] | com.oneops.cms; java.util; | 1,095,071 |
private void createHead() {
final Composite head = new Composite(this, SWT.NONE);
head.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
head.setLayout(new GridLayout());
final Label label = new Label(head, SWT.NONE);
label.setFont(FontService.getHeaderFont());
label.setText(Messages.Verifia... | void function() { final Composite head = new Composite(this, SWT.NONE); head.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); head.setLayout(new GridLayout()); final Label label = new Label(head, SWT.NONE); label.setFont(FontService.getHeaderFont()); label.setText(Messages.VerifiableSecretSharingComposite_... | /**
* Generates the head of the tab. The head has a title and a description.
*/ | Generates the head of the tab. The head has a title and a description | createHead | {
"repo_name": "jcryptool/crypto",
"path": "org.jcryptool.visual.verifiablesecretsharing/src/org/jcryptool/visual/verifiablesecretsharing/views/ReconstructionChartComposite.java",
"license": "epl-1.0",
"size": 7423
} | [
"org.eclipse.swt.custom.StyledText",
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.layout.GridLayout",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Label",
"org.jcryptool.core.util.fonts.FontService",
"org.jfree.experimental.chart.swt.ChartComposite"
] | import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.jcryptool.core.util.fonts.FontService; import org.jfree.experimental.chart.swt.ChartComposite; | import org.eclipse.swt.custom.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.jcryptool.core.util.fonts.*; import org.jfree.experimental.chart.swt.*; | [
"org.eclipse.swt",
"org.jcryptool.core",
"org.jfree.experimental"
] | org.eclipse.swt; org.jcryptool.core; org.jfree.experimental; | 1,161,076 |
public void add(List<Key> keys) {
if (keys == null) {
throw new IllegalArgumentException("ArrayList<Key> may not be null");
}
for (Key key : keys) {
add(key);
}
}// end add() | void function(List<Key> keys) { if (keys == null) { throw new IllegalArgumentException(STR); } for (Key key : keys) { add(key); } } | /**
* Adds a list of keys to <i>this</i> filter.
*
* @param keys
* The list of keys.
*/ | Adds a list of keys to this filter | add | {
"repo_name": "shot/hadoop-source-reading",
"path": "src/core/org/apache/hadoop/util/bloom/Filter.java",
"license": "apache-2.0",
"size": 7336
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 221,325 |
@NonNull
public IconDrawable alpha(@ColorInt int alpha) {
setAlpha(alpha);
return this;
}
/**
* Start a spinning animation on this drawable. Call {@link #stop()} | IconDrawable function(@ColorInt int alpha) { setAlpha(alpha); return this; } /** * Start a spinning animation on this drawable. Call {@link #stop()} | /**
* Set the alpha of this drawable.
* @param alpha The alpha, between 0 (transparent) and 255 (opaque).
* @return The current IconDrawable for chaining.
*/ | Set the alpha of this drawable | alpha | {
"repo_name": "FDoubleman/wd-edx-android",
"path": "android-iconify/src/main/java/com/joanzapata/iconify/IconDrawable.java",
"license": "apache-2.0",
"size": 23082
} | [
"android.support.annotation.ColorInt"
] | import android.support.annotation.ColorInt; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 1,576,495 |
public int layoutAndReturnStartIndexOfMoreSuggestions(final SuggestedWords suggestedWords,
final ViewGroup stripView, final ViewGroup placerView) {
if (suggestedWords.isPunctuationSuggestions()) {
return layoutPunctuationsAndReturnStartIndexOfMoreSuggestions(
(Pun... | int function(final SuggestedWords suggestedWords, final ViewGroup stripView, final ViewGroup placerView) { if (suggestedWords.isPunctuationSuggestions()) { return layoutPunctuationsAndReturnStartIndexOfMoreSuggestions( (PunctuationSuggestions)suggestedWords, stripView); } final int startIndexOfMoreSuggestions = setupWo... | /**
* Layout suggestions to the suggestions strip. And returns the start index of more
* suggestions.
*
* @param suggestedWords suggestions to be shown in the suggestions strip.
* @param stripView the suggestions strip view.
* @param placerView the view where the debug info will be placed.... | Layout suggestions to the suggestions strip. And returns the start index of more suggestions | layoutAndReturnStartIndexOfMoreSuggestions | {
"repo_name": "vorgoron/LatinIME-extended-with-Russian-languages",
"path": "app/src/main/java/com/udmurtlyk/extrainputmethod/latin/suggestions/SuggestionStripLayoutHelper.java",
"license": "apache-2.0",
"size": 35622
} | [
"android.view.View",
"android.view.ViewGroup",
"android.widget.TextView",
"com.udmurtlyk.extrainputmethod.latin.PunctuationSuggestions",
"com.udmurtlyk.extrainputmethod.latin.SuggestedWords"
] | import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.udmurtlyk.extrainputmethod.latin.PunctuationSuggestions; import com.udmurtlyk.extrainputmethod.latin.SuggestedWords; | import android.view.*; import android.widget.*; import com.udmurtlyk.extrainputmethod.latin.*; | [
"android.view",
"android.widget",
"com.udmurtlyk.extrainputmethod"
] | android.view; android.widget; com.udmurtlyk.extrainputmethod; | 455,382 |
String example = "FRONT";
DefrostZone enumFront = DefrostZone.valueForString(example);
example = "REAR";
DefrostZone enumRear = DefrostZone.valueForString(example);
example = "ALL";
DefrostZone enumAll = DefrostZone.valueForString(example);
example = "NONE";
Defro... | String example = "FRONT"; DefrostZone enumFront = DefrostZone.valueForString(example); example = "REAR"; DefrostZone enumRear = DefrostZone.valueForString(example); example = "ALL"; DefrostZone enumAll = DefrostZone.valueForString(example); example = "NONE"; DefrostZone enumNone = DefrostZone.valueForString(example); a... | /**
* Verifies that the enum values are not null upon valid assignment.
*/ | Verifies that the enum values are not null upon valid assignment | testValidEnums | {
"repo_name": "smartdevicelink/sdl_android",
"path": "android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/DefrostZoneTests.java",
"license": "bsd-3-clause",
"size": 2603
} | [
"com.smartdevicelink.proxy.rpc.enums.DefrostZone"
] | import com.smartdevicelink.proxy.rpc.enums.DefrostZone; | import com.smartdevicelink.proxy.rpc.enums.*; | [
"com.smartdevicelink.proxy"
] | com.smartdevicelink.proxy; | 1,943,259 |
@Override
@SuppressWarnings("unchecked")
@NotNull
public J removeJavaScriptReference(JavascriptReference jsReference)
{
getJavascriptReferences().remove(jsReference);
return (J) this;
} | @SuppressWarnings(STR) J function(JavascriptReference jsReference) { getJavascriptReferences().remove(jsReference); return (J) this; } | /**
* Removes the CSS Reference from the Component
*
* @param jsReference
*
* @return This Class
*/ | Removes the CSS Reference from the Component | removeJavaScriptReference | {
"repo_name": "GedMarc/JWebSwing",
"path": "src/main/java/com/jwebmp/core/base/ComponentDependencyBase.java",
"license": "gpl-3.0",
"size": 6980
} | [
"com.jwebmp.core.base.references.JavascriptReference"
] | import com.jwebmp.core.base.references.JavascriptReference; | import com.jwebmp.core.base.references.*; | [
"com.jwebmp.core"
] | com.jwebmp.core; | 2,394,465 |
public static Test suite() {
return new TestSuite(RemoveByDataTypeTest.class);
} | static Test function() { return new TestSuite(RemoveByDataTypeTest.class); } | /**
* Returns the test suite.
*
* @return the suite
*/ | Returns the test suite | suite | {
"repo_name": "automenta/adams-core",
"path": "src/test/java/adams/data/report/RemoveByDataTypeTest.java",
"license": "gpl-3.0",
"size": 2250
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 900,336 |
@ObjectiveCName("changeGroupAvatarWithGid:withDescriptor:")
public void changeGroupAvatar(int gid, String descriptor) {
modules.getGroupsModule().changeAvatar(gid, descriptor);
} | @ObjectiveCName(STR) void function(int gid, String descriptor) { modules.getGroupsModule().changeAvatar(gid, descriptor); } | /**
* Change group avatar
*
* @param gid group's id
* @param descriptor descriptor of avatar file
*/ | Change group avatar | changeGroupAvatar | {
"repo_name": "EaglesoftZJ/actor-platform",
"path": "actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java",
"license": "agpl-3.0",
"size": 86315
} | [
"com.google.j2objc.annotations.ObjectiveCName"
] | import com.google.j2objc.annotations.ObjectiveCName; | import com.google.j2objc.annotations.*; | [
"com.google.j2objc"
] | com.google.j2objc; | 1,247,329 |
List<T> list = new ArrayList<T>();
for(int i = 0; i < json.length(); i++) {
list.add((T) json.opt(i));
}
return list;
}
| List<T> list = new ArrayList<T>(); for(int i = 0; i < json.length(); i++) { list.add((T) json.opt(i)); } return list; } | /**
* Convert a JSONArray to a List
*
* @param json The JSONArray to convert
* @return A List with the generic types specified
*/ | Convert a JSONArray to a List | jsonArrayToList | {
"repo_name": "johanbrook/watchme",
"path": "src/se/chalmers/watchme/utils/MovieHelper.java",
"license": "mit",
"size": 3962
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,662,995 |
public static void runExample(
AdManagerServices adManagerServices, AdManagerSession session, long savedQueryId)
throws IOException, InterruptedException {
// Get the ReportService.
ReportServiceInterface reportService =
adManagerServices.get(session, ReportServiceInterface.class);
//... | static void function( AdManagerServices adManagerServices, AdManagerSession session, long savedQueryId) throws IOException, InterruptedException { ReportServiceInterface reportService = adManagerServices.get(session, ReportServiceInterface.class); StatementBuilder statementBuilder = new StatementBuilder() .where(STR) .... | /**
* Runs the example.
*
* @param adManagerServices the services factory.
* @param session the session.
* @param savedQueryId the ID of the saved query to run. This ID is part of the URL in the Ad
* Manager UI.
* @throws ApiException if the API request failed with one or more service errors.
... | Runs the example | runExample | {
"repo_name": "googleads/googleads-java-lib",
"path": "examples/admanager_axis/src/main/java/admanager/axis/v202202/reportservice/RunSavedQuery.java",
"license": "apache-2.0",
"size": 8489
} | [
"com.google.api.ads.admanager.axis.factory.AdManagerServices",
"com.google.api.ads.admanager.axis.utils.v202202.ReportDownloader",
"com.google.api.ads.admanager.axis.utils.v202202.StatementBuilder",
"com.google.api.ads.admanager.axis.v202202.ExportFormat",
"com.google.api.ads.admanager.axis.v202202.ReportDo... | import com.google.api.ads.admanager.axis.factory.AdManagerServices; import com.google.api.ads.admanager.axis.utils.v202202.ReportDownloader; import com.google.api.ads.admanager.axis.utils.v202202.StatementBuilder; import com.google.api.ads.admanager.axis.v202202.ExportFormat; import com.google.api.ads.admanager.axis.v2... | import com.google.api.ads.admanager.axis.factory.*; import com.google.api.ads.admanager.axis.utils.v202202.*; import com.google.api.ads.admanager.axis.v202202.*; import com.google.api.ads.admanager.lib.client.*; import com.google.common.collect.*; import com.google.common.io.*; import java.io.*; import java.util.*; | [
"com.google.api",
"com.google.common",
"java.io",
"java.util"
] | com.google.api; com.google.common; java.io; java.util; | 1,165,292 |
public static Test suite()
{
if (JDBC.vmSupportsJSR169())
{
return new TestSuite(
"DriverTest tests java.sql.Driver, not supported with JSR169");
}
Test test = TestConfiguration.embeddedSuite(Driver40UnbootedTest.class);
return Securi... | static Test function() { if (JDBC.vmSupportsJSR169()) { return new TestSuite( STR); } Test test = TestConfiguration.embeddedSuite(Driver40UnbootedTest.class); return SecurityManagerSetup.noSecurityManager( test ); } | /**
* Return suite with all tests of the class.
*/ | Return suite with all tests of the class | suite | {
"repo_name": "splicemachine/spliceengine",
"path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/jdbc4/Driver40UnbootedTest.java",
"license": "agpl-3.0",
"size": 5863
} | [
"com.splicemachine.dbTesting.junit.JDBC",
"com.splicemachine.dbTesting.junit.SecurityManagerSetup",
"com.splicemachine.dbTesting.junit.TestConfiguration",
"junit.framework.Test",
"junit.framework.TestSuite"
] | import com.splicemachine.dbTesting.junit.JDBC; import com.splicemachine.dbTesting.junit.SecurityManagerSetup; import com.splicemachine.dbTesting.junit.TestConfiguration; import junit.framework.Test; import junit.framework.TestSuite; | import com.splicemachine.*; import junit.framework.*; | [
"com.splicemachine",
"junit.framework"
] | com.splicemachine; junit.framework; | 661,352 |
public boolean isDrugBetween(int begin, int end, int[] span) {
Pattern p = Pattern.compile("(<DRUG>)");
Matcher m = p.matcher(input.substring(begin, end));
while(m.find()) {
span[0] = m.start()+begin;
span[1] = m.end()+begin;
return true;
}
return false;
} | boolean function(int begin, int end, int[] span) { Pattern p = Pattern.compile(STR); Matcher m = p.matcher(input.substring(begin, end)); while(m.find()) { span[0] = m.start()+begin; span[1] = m.end()+begin; return true; } return false; } | /**
* Return true if finds "DRUG" in input.substring(begin, end)
* and assign offsets of DRUG to span
*
* @param begin
* @param end
* @param span offset of the first DRUG in "input"
* @return
*/ | Return true if finds "DRUG" in input.substring(begin, end) and assign offsets of DRUG to span | isDrugBetween | {
"repo_name": "TCU-MI/ctakes",
"path": "ctakes-side-effect/src/main/java/org/apache/ctakes/sideeffect/util/PatternMatch.java",
"license": "apache-2.0",
"size": 4170
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 560,018 |
protected Composite createQuestionComposite(final Composite parent) {
final Composite composite = UIUtils.createGridedComposite(parent, 4);
Label questionIcon = new Label(composite, SWT.NONE);
ImageDescriptor questionIconImageDescriptor = Activator
.imageDescriptorFromPlugin(Activator.PLUGIN_ID, getIconPa... | Composite function(final Composite parent) { final Composite composite = UIUtils.createGridedComposite(parent, 4); Label questionIcon = new Label(composite, SWT.NONE); ImageDescriptor questionIconImageDescriptor = Activator .imageDescriptorFromPlugin(Activator.PLUGIN_ID, getIconPath()); Image questionIconImage = questi... | /**
* Creates and returns the question whether WatchDog Id is already known.
*/ | Creates and returns the question whether WatchDog Id is already known | createQuestionComposite | {
"repo_name": "gabrielsimas/watchdog",
"path": "WatchDogEclipsePlugin/WatchDog/src/nl/tudelft/watchdog/eclipse/ui/wizards/WelcomePageBase.java",
"license": "mit",
"size": 7152
} | [
"nl.tudelft.watchdog.eclipse.Activator",
"nl.tudelft.watchdog.eclipse.ui.util.UIUtils",
"org.eclipse.jface.resource.ImageDescriptor",
"org.eclipse.swt.events.SelectionListener",
"org.eclipse.swt.graphics.Image",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Label"
] | import nl.tudelft.watchdog.eclipse.Activator; import nl.tudelft.watchdog.eclipse.ui.util.UIUtils; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; | import nl.tudelft.watchdog.eclipse.*; import nl.tudelft.watchdog.eclipse.ui.util.*; import org.eclipse.jface.resource.*; import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; | [
"nl.tudelft.watchdog",
"org.eclipse.jface",
"org.eclipse.swt"
] | nl.tudelft.watchdog; org.eclipse.jface; org.eclipse.swt; | 939,842 |
public TupleListFuture queryVersionTime(final String table, final long timestamp) throws BBoxDBException; | TupleListFuture function(final String table, final long timestamp) throws BBoxDBException; | /**
* Query the given table for all tuples that have a newer version timestamp
* @param table
* @param key
* @return
*/ | Query the given table for all tuples that have a newer version timestamp | queryVersionTime | {
"repo_name": "jnidzwetzki/bboxdb",
"path": "bboxdb-server/src/main/java/org/bboxdb/network/client/BBoxDB.java",
"license": "apache-2.0",
"size": 6793
} | [
"org.bboxdb.misc.BBoxDBException",
"org.bboxdb.network.client.future.client.TupleListFuture"
] | import org.bboxdb.misc.BBoxDBException; import org.bboxdb.network.client.future.client.TupleListFuture; | import org.bboxdb.misc.*; import org.bboxdb.network.client.future.client.*; | [
"org.bboxdb.misc",
"org.bboxdb.network"
] | org.bboxdb.misc; org.bboxdb.network; | 2,586,780 |
public Collection<String> counterNames() {
return counters.keySet();
} | Collection<String> function() { return counters.keySet(); } | /**
* Returns names of currently tracked counters.
*/ | Returns names of currently tracked counters | counterNames | {
"repo_name": "openaire/iis",
"path": "iis-common/src/main/java/eu/dnetlib/iis/common/counter/NamedCounters.java",
"license": "apache-2.0",
"size": 3456
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 157,885 |
public void padCurrentBlock() throws IOException {
int padBytes = bytesLeftInBlock();
if (padBytes == 0) {
return;
}
write(ZERO_BLOCK, padBytes);
// REMOVE THIS DEV-ASSERTION:
assertAtBlockBoundary();
} | void function() throws IOException { int padBytes = bytesLeftInBlock(); if (padBytes == 0) { return; } write(ZERO_BLOCK, padBytes); assertAtBlockBoundary(); } | /**
* Rounds out the current block to the next block bondary.
* If we are currently at a block boundary, nothing is done.
*/ | Rounds out the current block to the next block bondary. If we are currently at a block boundary, nothing is done | padCurrentBlock | {
"repo_name": "Julien35/dev-courses",
"path": "tutoriel-spring-mvc/lib/hsqldb/src/org/hsqldb/lib/tar/TarFileOutputStream.java",
"license": "mit",
"size": 12538
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,513,305 |
LinkResourceAllocations getAllocations(IntentId intentId); | LinkResourceAllocations getAllocations(IntentId intentId); | /**
* Returns resources allocated for an Intent.
*
* @param intentId the target Intent's ID
* @return allocated resources or null if no resource is allocated
*/ | Returns resources allocated for an Intent | getAllocations | {
"repo_name": "ravikumaran2015/ravikumaran201504",
"path": "core/api/src/main/java/org/onosproject/net/resource/LinkResourceStore.java",
"license": "apache-2.0",
"size": 2030
} | [
"org.onosproject.net.intent.IntentId"
] | import org.onosproject.net.intent.IntentId; | import org.onosproject.net.intent.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 1,099,897 |
public void validate() throws IllegalArgumentException {
checkArgument(this.url != null, "missing URL");
checkArgument(this.username != null, "missing username");
checkArgument(this.password != null, "missing password");
} | void function() throws IllegalArgumentException { checkArgument(this.url != null, STR); checkArgument(this.username != null, STR); checkArgument(this.password != null, STR); } | /**
* Do basic validation of the VsphereApiSettings and throw an exception if
* validation fails.
*
* @throws IllegalArgumentException
*/ | Do basic validation of the VsphereApiSettings and throw an exception if validation fails | validate | {
"repo_name": "Eeemil/scale.cloudpool",
"path": "vsphere/src/main/java/com/elastisys/scale/cloudpool/vsphere/driver/config/VsphereApiSettings.java",
"license": "apache-2.0",
"size": 1895
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,559,709 |
private void initComponents(String directory)
{
setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
if (directory != null && directory.length() > 0)
chooser.setCurrentDirectory(new File(directory));
chooser.setAppro... | void function(String directory) { setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); chooser = new JFileChooser(); chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); if (directory != null && directory.length() > 0) chooser.setCurrentDirectory(new File(directory)); chooser.setApproveButtonText("Open"); chooser.s... | /**
* Initializes the components.
*
* @param directory The default directory.
*/ | Initializes the components | initComponents | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/util/OpenWithDialog.java",
"license": "gpl-2.0",
"size": 4585
} | [
"java.io.File",
"javax.swing.JDialog",
"javax.swing.JFileChooser"
] | import java.io.File; import javax.swing.JDialog; import javax.swing.JFileChooser; | import java.io.*; import javax.swing.*; | [
"java.io",
"javax.swing"
] | java.io; javax.swing; | 1,504,415 |
EOperation getTClassifier__GetSuperClassifiers(); | EOperation getTClassifier__GetSuperClassifiers(); | /**
* Returns the meta object for the '{@link org.eclipse.n4js.ts.types.TClassifier#getSuperClassifiers() <em>Get Super Classifiers</em>}' operation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the '<em>Get Super Classifiers</em>' operation.
* @see org.eclipse.n4js.ts.types... | Returns the meta object for the '<code>org.eclipse.n4js.ts.types.TClassifier#getSuperClassifiers() Get Super Classifiers</code>' operation. | getTClassifier__GetSuperClassifiers | {
"repo_name": "lbeurerkellner/n4js",
"path": "plugins/org.eclipse.n4js.ts.model/emf-gen/org/eclipse/n4js/ts/types/TypesPackage.java",
"license": "epl-1.0",
"size": 538237
} | [
"org.eclipse.emf.ecore.EOperation"
] | import org.eclipse.emf.ecore.EOperation; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,864,312 |
public void addEntries(List<BibEntry> newEntries, BasePanel panel) {
for (BibEntry entry : newEntries) {
addEntry(entry, panel);
}
} | void function(List<BibEntry> newEntries, BasePanel panel) { for (BibEntry entry : newEntries) { addEntry(entry, panel); } } | /**
* Add a list of entries to the table.
* @param newEntries The list of entries.
* @param panel A reference to the BasePanel where the entries belong.
*/ | Add a list of entries to the table | addEntries | {
"repo_name": "ambro2/jabref",
"path": "src/main/java/net/sf/jabref/gui/search/SearchResultsDialog.java",
"license": "gpl-2.0",
"size": 19979
} | [
"java.util.List",
"net.sf.jabref.gui.BasePanel",
"net.sf.jabref.model.entry.BibEntry"
] | import java.util.List; import net.sf.jabref.gui.BasePanel; import net.sf.jabref.model.entry.BibEntry; | import java.util.*; import net.sf.jabref.gui.*; import net.sf.jabref.model.entry.*; | [
"java.util",
"net.sf.jabref"
] | java.util; net.sf.jabref; | 1,105,269 |
protected void process() {
if (dataProvider != null) {
if (pattern != null) {
if (!setAttribute(attribute, Kuix.processI18nPattern(processBindPropertyVariables(pattern)))) {
throw new IllegalArgumentException(attribute);
}
} else if (bindedProperties != null && bindedProperties.len... | void function() { if (dataProvider != null) { if (pattern != null) { if (!setAttribute(attribute, Kuix.processI18nPattern(processBindPropertyVariables(pattern)))) { throw new IllegalArgumentException(attribute); } } else if (bindedProperties != null && bindedProperties.length == 1) { if (!setObjectAttribute(attribute, ... | /**
* Process the bindInstruction
*/ | Process the bindInstruction | process | {
"repo_name": "Omar913/kuix",
"path": "src/org/kalmeo/kuix/widget/Widget.java",
"license": "gpl-3.0",
"size": 76501
} | [
"org.kalmeo.kuix.core.Kuix"
] | import org.kalmeo.kuix.core.Kuix; | import org.kalmeo.kuix.core.*; | [
"org.kalmeo.kuix"
] | org.kalmeo.kuix; | 2,303,213 |
public void addFriendlybakedModel(BlockRenderLayer pass, IBakedModel model, @Nullable IBlockState state, long rand) {
if (model != null) {
BlockRenderLayer oldRenderLayer = MinecraftForgeClient.getRenderLayer();
ForgeHooksClient.setRenderLayer(pass);
List<BakedQuad> generalQuads = model.getQuads... | void function(BlockRenderLayer pass, IBakedModel model, @Nullable IBlockState state, long rand) { if (model != null) { BlockRenderLayer oldRenderLayer = MinecraftForgeClient.getRenderLayer(); ForgeHooksClient.setRenderLayer(pass); List<BakedQuad> generalQuads = model.getQuads(state, null, rand); if (generalQuads != nul... | /**
* Adds a baked model that is expected to behave to the quad lists for the given block layer. The block layer will be set when the model is asked for its
* quads.
*/ | Adds a baked model that is expected to behave to the quad lists for the given block layer. The block layer will be set when the model is asked for its quads | addFriendlybakedModel | {
"repo_name": "D-Inc/EnderIO",
"path": "src/main/java/crazypants/enderio/render/util/QuadCollector.java",
"license": "unlicense",
"size": 7454
} | [
"java.util.Arrays",
"java.util.Iterator",
"java.util.List",
"javax.annotation.Nullable",
"net.minecraft.block.state.IBlockState",
"net.minecraft.client.renderer.block.model.BakedQuad",
"net.minecraft.client.renderer.block.model.IBakedModel",
"net.minecraft.util.BlockRenderLayer",
"net.minecraft.util... | import java.util.Arrays; import java.util.Iterator; import java.util.List; import javax.annotation.Nullable; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.util.BlockRenderLayer;... | import java.util.*; import javax.annotation.*; import net.minecraft.block.state.*; import net.minecraft.client.renderer.block.model.*; import net.minecraft.util.*; import net.minecraftforge.client.*; | [
"java.util",
"javax.annotation",
"net.minecraft.block",
"net.minecraft.client",
"net.minecraft.util",
"net.minecraftforge.client"
] | java.util; javax.annotation; net.minecraft.block; net.minecraft.client; net.minecraft.util; net.minecraftforge.client; | 859,328 |
public static boolean verify(DSAPublicKey kp,
DSASignature sig,
BigInteger m) {
try {
BigInteger w=sig.getS().modInverse(kp.getQ());
BigInteger u1=m.multiply(w).mod(kp.getQ());
BigInteger u2=sig.getR().multiply(w).mod(kp.getQ());
BigInteger v1=kp.getG().modPow(u1, kp.getP());
Big... | static boolean function(DSAPublicKey kp, DSASignature sig, BigInteger m) { try { BigInteger w=sig.getS().modInverse(kp.getQ()); BigInteger u1=m.multiply(w).mod(kp.getQ()); BigInteger u2=sig.getR().multiply(w).mod(kp.getQ()); BigInteger v1=kp.getG().modPow(u1, kp.getP()); BigInteger v2=kp.getY().modPow(u2, kp.getP()); B... | /**
* Verifies the message authenticity given a group, the public key
* (y), a signature, and the hash of the message (m).
*/ | Verifies the message authenticity given a group, the public key (y), a signature, and the hash of the message (m) | verify | {
"repo_name": "freenet/legacy",
"path": "src/freenet/crypt/DSA.java",
"license": "gpl-2.0",
"size": 3074
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 62,051 |
public synchronized void start() {
assertNotRunning();
m_status = STARTING;
try {
InetAddress address = "*".equals(m_ipAddress) ? null : InetAddressUtils.addr(m_ipAddress);
m_server = new TcpServer(this, m_eventHandlers, m_tcpPort, address);
if (m_logPref... | synchronized void function() { assertNotRunning(); m_status = STARTING; try { InetAddress address = "*".equals(m_ipAddress) ? null : InetAddressUtils.addr(m_ipAddress); m_server = new TcpServer(this, m_eventHandlers, m_tcpPort, address); if (m_logPrefix != null) { m_server.setLogPrefix(m_logPrefix); } if (m_recsPerConn... | /**
* Allocates the server socket and starts up the server socket processor
* thread. If an error occurs allocating the server socket or the Fiber is
* in an erronous state then a
* {@link java.lang.RuntimeException runtime exception}is thrown.
*
* @throws java.lang.reflect.UndeclaredThrow... | Allocates the server socket and starts up the server socket processor thread. If an error occurs allocating the server socket or the Fiber is in an erronous state then a <code>java.lang.RuntimeException runtime exception</code>is thrown | start | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "opennms-services/src/main/java/org/opennms/netmgt/eventd/adaptors/tcp/TcpEventReceiver.java",
"license": "gpl-2.0",
"size": 11223
} | [
"java.io.IOException",
"java.lang.reflect.UndeclaredThrowableException",
"java.net.InetAddress",
"org.opennms.core.utils.InetAddressUtils"
] | import java.io.IOException; import java.lang.reflect.UndeclaredThrowableException; import java.net.InetAddress; import org.opennms.core.utils.InetAddressUtils; | import java.io.*; import java.lang.reflect.*; import java.net.*; import org.opennms.core.utils.*; | [
"java.io",
"java.lang",
"java.net",
"org.opennms.core"
] | java.io; java.lang; java.net; org.opennms.core; | 353,057 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.