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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private int addLinksNoCount(String dbid, List<Link> links)
throws SQLException {
if (links.size() == 0)
return 0;
// query to insert a link;
StringBuilder sb = new StringBuilder();
sb.append("INSERT INTO " + dbid + "." + linktable +
"(id1, id2, link_type, " +
... | int function(String dbid, List<Link> links) throws SQLException { if (links.size() == 0) return 0; StringBuilder sb = new StringBuilder(); sb.append(STR + dbid + "." + linktable + STR + STR); boolean first = true; for (Link l : links) { if (first) { first = false; } else { sb.append(','); } sb.append("(" + l.id1 + STR ... | /**
* Internal method: add links without updating the count
* @param dbid
* @param links
* @return
* @throws SQLException
*/ | Internal method: add links without updating the count | addLinksNoCount | {
"repo_name": "blendlabs/linkbench",
"path": "src/main/java/com/facebook/LinkBench/LinkStoreMysql.java",
"license": "apache-2.0",
"size": 33592
} | [
"java.sql.SQLException",
"java.util.List",
"org.apache.log4j.Level"
] | import java.sql.SQLException; import java.util.List; import org.apache.log4j.Level; | import java.sql.*; import java.util.*; import org.apache.log4j.*; | [
"java.sql",
"java.util",
"org.apache.log4j"
] | java.sql; java.util; org.apache.log4j; | 129,973 |
public long getLength(int idx) throws IOException, InterruptedException {
return wrappedSplits[idx].getLength();
} | long function(int idx) throws IOException, InterruptedException { return wrappedSplits[idx].getLength(); } | /**
* Return the length of a wrapped split
* @param idx the index into the wrapped splits
* @return number of wrapped splits
*/ | Return the length of a wrapped split | getLength | {
"repo_name": "kexianda/pig",
"path": "src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java",
"license": "apache-2.0",
"size": 19992
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,984,842 |
private static Method findPublicAccessibleMethod(Method method) {
if (method == null || !Modifier.isPublic(method.getModifiers())) {
return null;
}
if (method.isAccessible() || Modifier.isPublic(method.getDeclaringClass().getModifiers())) {
return method;
}
for (Class<?> cls : method.getDeclaringClas... | static Method function(Method method) { if (method == null !Modifier.isPublic(method.getModifiers())) { return null; } if (method.isAccessible() Modifier.isPublic(method.getDeclaringClass().getModifiers())) { return method; } for (Class<?> cls : method.getDeclaringClass().getInterfaces()) { Method mth = null; try { mth... | /**
* Find accessible method. Searches the inheritance tree of the class declaring
* the method until it finds a method that can be invoked.
* @param method method
* @return accessible method or <code>null</code>
*/ | Find accessible method. Searches the inheritance tree of the class declaring the method until it finds a method that can be invoked | findPublicAccessibleMethod | {
"repo_name": "robsoncardosoti/flowable-engine",
"path": "modules/flowable-engine-common/src/main/java/org/flowable/engine/common/impl/de/odysseus/el/tree/impl/ast/AstNode.java",
"license": "apache-2.0",
"size": 3130
} | [
"java.lang.reflect.Method",
"java.lang.reflect.Modifier"
] | import java.lang.reflect.Method; import java.lang.reflect.Modifier; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,374,890 |
private Criterion createFeatureOfInterestFilter(SpatialFilter filter) {
filter.setValueReference(QueryUtils.createAssociation(FeatureEntity.PROPERTY_GEOMETRY_ENTITY,
GeometryEntity.PROPERTY_GEOMETRY));
return createDatasetCriterion(Datase... | Criterion function(SpatialFilter filter) { filter.setValueReference(QueryUtils.createAssociation(FeatureEntity.PROPERTY_GEOMETRY_ENTITY, GeometryEntity.PROPERTY_GEOMETRY)); return createDatasetCriterion(DatasetEntity.PROPERTY_FEATURE, filter); } | /**
* Creates a spatial filter criterion for the geometry of the feature.
*
* @param filter the filter
*
* @return the criterion
*/ | Creates a spatial filter criterion for the geometry of the feature | createFeatureOfInterestFilter | {
"repo_name": "SpeckiJ/dao-series-api",
"path": "dao/src/main/java/org/n52/series/db/dao/FESCriterionGenerator.java",
"license": "gpl-3.0",
"size": 49796
} | [
"org.hibernate.criterion.Criterion",
"org.n52.series.db.beans.DatasetEntity",
"org.n52.series.db.beans.FeatureEntity",
"org.n52.series.db.beans.GeometryEntity",
"org.n52.shetland.ogc.filter.SpatialFilter"
] | import org.hibernate.criterion.Criterion; import org.n52.series.db.beans.DatasetEntity; import org.n52.series.db.beans.FeatureEntity; import org.n52.series.db.beans.GeometryEntity; import org.n52.shetland.ogc.filter.SpatialFilter; | import org.hibernate.criterion.*; import org.n52.series.db.beans.*; import org.n52.shetland.ogc.filter.*; | [
"org.hibernate.criterion",
"org.n52.series",
"org.n52.shetland"
] | org.hibernate.criterion; org.n52.series; org.n52.shetland; | 1,332,343 |
public Link withTuning(Tuning... values) {
if (values != null) {
getTuning().addAll(Arrays.asList(values));
}
return this;
} | Link function(Tuning... values) { if (values != null) { getTuning().addAll(Arrays.asList(values)); } return this; } | /**
* Set the Tuning
* <p>
* Complex element Tuning indicates the specific frequency or range of
* frequencies, tuning increment, and number of frequencies, required for an
* assignment.
* <p>
* @param values One or more instances of type {@link Tuning}.
* @return The current Link object instanc... | Set the Tuning Complex element Tuning indicates the specific frequency or range of frequencies, tuning increment, and number of frequencies, required for an assignment. | withTuning | {
"repo_name": "KeyBridge/lib-openssrf",
"path": "src/main/java/us/gov/dod/standard/ssrf/_3_1/assignment/Link.java",
"license": "apache-2.0",
"size": 24643
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,049,316 |
public void doCancel(RunData data, Context context)
{
SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid());
// get the alias
AliasEdit alias = (AliasEdit) state.getAttribute("alias");
if (alias != null)
{
// if this was a new, delete the alias
... | void function(RunData data, Context context) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); AliasEdit alias = (AliasEdit) state.getAttribute("alias"); if (alias != null) { if ("true".equals(state.getAttribute("new"))) { try { aliasService.remove(alias); } ... | /**
* doCancel called when "eventSubmit_doCancel" is in the request parameters to cancel alias edits
*/ | doCancel called when "eventSubmit_doCancel" is in the request parameters to cancel alias edits | doCancel | {
"repo_name": "hackbuteer59/sakai",
"path": "alias/alias-tool/tool/src/java/org/sakaiproject/alias/tool/AliasesAction.java",
"license": "apache-2.0",
"size": 16189
} | [
"org.sakaiproject.alias.api.AliasEdit",
"org.sakaiproject.cheftool.Context",
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.courier.api.ObservingCourier",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.exception.PermissionException"
] | import org.sakaiproject.alias.api.AliasEdit; import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.courier.api.ObservingCourier; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.exception.Permi... | import org.sakaiproject.alias.api.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.courier.api.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*; | [
"org.sakaiproject.alias",
"org.sakaiproject.cheftool",
"org.sakaiproject.courier",
"org.sakaiproject.event",
"org.sakaiproject.exception"
] | org.sakaiproject.alias; org.sakaiproject.cheftool; org.sakaiproject.courier; org.sakaiproject.event; org.sakaiproject.exception; | 1,959,984 |
@Test(groups = "wso2.das4mb.stats", description = "Test topic subscriber hour data publishing")
public void testTopicSubscriberHourData() throws XPathExpressionException, MalformedObjectNameException, IOException,
AnalyticsException, InterruptedException {
testCounts(TestConstants.ORG_WSO2_M... | @Test(groups = STR, description = STR) void function() throws XPathExpressionException, MalformedObjectNameException, IOException, AnalyticsException, InterruptedException { testCounts(TestConstants.ORG_WSO2_MB_ANALYTICS_STREAM_GAUGE_STATS_HOUR, STR); } | /**
* Check topic subscriber data exist in ORG_WSO2_MB_ANALYTICS_STREAM_TIMER_STATS_HOUR
*
* @throws XPathExpressionException
* @throws MalformedObjectNameException
* @throws IOException
* @throws AnalyticsException
* @throws InterruptedException
*/ | Check topic subscriber data exist in ORG_WSO2_MB_ANALYTICS_STREAM_TIMER_STATS_HOUR | testTopicSubscriberHourData | {
"repo_name": "indikasampath2000/analytics-mb",
"path": "product/integration/tests-integration/src/test/java/org/wso2/das/integration/tests/mb/MBAnalyticsStatisticsAggregationTestCase.java",
"license": "apache-2.0",
"size": 35960
} | [
"java.io.IOException",
"javax.management.MalformedObjectNameException",
"javax.xml.xpath.XPathExpressionException",
"org.testng.annotations.Test",
"org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException",
"org.wso2.das.integration.common.utils.TestConstants"
] | import java.io.IOException; import javax.management.MalformedObjectNameException; import javax.xml.xpath.XPathExpressionException; import org.testng.annotations.Test; import org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException; import org.wso2.das.integration.common.utils.TestConstants; | import java.io.*; import javax.management.*; import javax.xml.xpath.*; import org.testng.annotations.*; import org.wso2.carbon.analytics.datasource.commons.exception.*; import org.wso2.das.integration.common.utils.*; | [
"java.io",
"javax.management",
"javax.xml",
"org.testng.annotations",
"org.wso2.carbon",
"org.wso2.das"
] | java.io; javax.management; javax.xml; org.testng.annotations; org.wso2.carbon; org.wso2.das; | 2,168,145 |
public static void addExtCSSResource(String resource) {
Map<String, Object> viewMap = FacesContext.getCurrentInstance().getViewRoot().getViewMap();
@SuppressWarnings("unchecked")
List<String> resourceList = (List<String>) viewMap.get(EXT_RESOURCE_KEY);
if (null == resourceList) {
resourceList = new ArrayL... | static void function(String resource) { Map<String, Object> viewMap = FacesContext.getCurrentInstance().getViewRoot().getViewMap(); @SuppressWarnings(STR) List<String> resourceList = (List<String>) viewMap.get(EXT_RESOURCE_KEY); if (null == resourceList) { resourceList = new ArrayList<String>(); viewMap.put(EXT_RESOURC... | /**
* Registers a Extension CSS file that needs to be included in the header of the
* HTML file.
*
* @param resource The name of the resource file within the library folder.
*/ | Registers a Extension CSS file that needs to be included in the header of the HTML file | addExtCSSResource | {
"repo_name": "mtvweb/BootsFaces-OSP",
"path": "src/main/java/net/bootsfaces/listeners/AddResourcesListener.java",
"license": "apache-2.0",
"size": 35662
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"javax.faces.context.FacesContext"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.faces.context.FacesContext; | import java.util.*; import javax.faces.context.*; | [
"java.util",
"javax.faces"
] | java.util; javax.faces; | 1,344,475 |
public List<TryCatchBlockNode> getHandlers(final int insn) {
return handlers[insn];
} | List<TryCatchBlockNode> function(final int insn) { return handlers[insn]; } | /**
* Returns the exception handlers for the given instruction.
*
* @param insn
* the index of an instruction of the last recently analyzed
* method.
* @return a list of {@link TryCatchBlockNode} objects.
*/ | Returns the exception handlers for the given instruction | getHandlers | {
"repo_name": "rikf/Holophonor",
"path": "src/main/java/holophonor/org/objectweb/asm/tree/analysis/Analyzer.java",
"license": "apache-2.0",
"size": 22795
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,885,918 |
private boolean getOvsdbConnectionState(OpenstackNode node) {
checkNotNull(node, "Node cannot be null");
OvsdbClientService ovsdbClient = getOvsdbClient(node);
return deviceService.isAvailable(node.ovsdbId()) &&
ovsdbClient != null && ovsdbClient.isConnected();
} | boolean function(OpenstackNode node) { checkNotNull(node, STR); OvsdbClientService ovsdbClient = getOvsdbClient(node); return deviceService.isAvailable(node.ovsdbId()) && ovsdbClient != null && ovsdbClient.isConnected(); } | /**
* Returns connection state of OVSDB server for a given node.
*
* @param node openstack node
* @return true if it is connected, false otherwise
*/ | Returns connection state of OVSDB server for a given node | getOvsdbConnectionState | {
"repo_name": "maheshraju-Huawei/actn",
"path": "apps/openstacknode/src/main/java/org/onosproject/openstacknode/OpenstackNodeManager.java",
"license": "apache-2.0",
"size": 23464
} | [
"com.google.common.base.Preconditions",
"org.onosproject.ovsdb.controller.OvsdbClientService"
] | import com.google.common.base.Preconditions; import org.onosproject.ovsdb.controller.OvsdbClientService; | import com.google.common.base.*; import org.onosproject.ovsdb.controller.*; | [
"com.google.common",
"org.onosproject.ovsdb"
] | com.google.common; org.onosproject.ovsdb; | 76,044 |
void corruptMeta() throws IOException; | void corruptMeta() throws IOException; | /**
* Corrupt the metadata file of the replica.
* @throws FileNotFoundException if the block file does not exist.
* @throws IOException if I/O error.
*/ | Corrupt the metadata file of the replica | corruptMeta | {
"repo_name": "leechoongyon/HadoopSourceAnalyze",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/FsDatasetTestUtils.java",
"license": "apache-2.0",
"size": 8308
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,693,518 |
public static ValueBuilder regexReplaceAll(Expression content, String regex, Expression replacement) {
Expression newExp = ExpressionBuilder.regexReplaceAll(content, regex, replacement);
return new ValueBuilder(newExp);
} | static ValueBuilder function(Expression content, String regex, Expression replacement) { Expression newExp = ExpressionBuilder.regexReplaceAll(content, regex, replacement); return new ValueBuilder(newExp); } | /**
* Returns an expression that replaces all occurrences of the regular
* expression with the given replacement
*/ | Returns an expression that replaces all occurrences of the regular expression with the given replacement | regexReplaceAll | {
"repo_name": "engagepoint/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/Builder.java",
"license": "apache-2.0",
"size": 8331
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,905,239 |
//FIXME make me public
protected Object getDecodedObject(BerInputStream in) throws IOException {
return in.content;
}
//
//
// Encode
//
// | Object function(BerInputStream in) throws IOException { return in.content; } | /**
* Creates decoded object.
*
* Derived classes should override this method to provide creation for a
* selected class of objects during decoding.
*
* The default implementation returns an object created by decoding stream.
*
* @param -
* input stream
* ... | Creates decoded object. Derived classes should override this method to provide creation for a selected class of objects during decoding. The default implementation returns an object created by decoding stream | getDecodedObject | {
"repo_name": "nextopio/nextop-client",
"path": "org.apache-jarjar/src/main/java/org/apache/harmony/security/asn1/ASN1Type.java",
"license": "apache-2.0",
"size": 6057
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,144,929 |
Optional<T> findByEndpointId(String endpointId); | Optional<T> findByEndpointId(String endpointId); | /**
* Returns the endpooint registration by endpoint ID.
*
* @param endpointId The endpoint ID
* @return The endpoint registration found
*/ | Returns the endpooint registration by endpoint ID | findByEndpointId | {
"repo_name": "sashadidukh/kaa",
"path": "server/common/dao/src/main/java/org/kaaproject/kaa/server/common/dao/impl/EndpointRegistrationDao.java",
"license": "apache-2.0",
"size": 1830
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 2,702,826 |
void create(final Events event, final String userId)
throws MessageQException; | void create(final Events event, final String userId) throws MessageQException; | /**
* Create a message for the provided user ID (i.e. for the principal)
*
* @param event The event to create a message for
* @param userId The user ID (globally unique) to create a message for
* @throws MessageQException when the message creation operation fails.
*/ | Create a message for the provided user ID (i.e. for the principal) | create | {
"repo_name": "mbeiter/jaas",
"path": "common/src/main/java/org/beiter/michael/authn/jaas/common/messageq/MessageQ.java",
"license": "bsd-3-clause",
"size": 4027
} | [
"org.beiter.michael.authn.jaas.common.Events"
] | import org.beiter.michael.authn.jaas.common.Events; | import org.beiter.michael.authn.jaas.common.*; | [
"org.beiter.michael"
] | org.beiter.michael; | 54,136 |
public ServiceResponse<Void> beginDelete204Succeeded() throws CloudException, IOException {
return beginDelete204SucceededAsync().toBlocking().single();
} | ServiceResponse<Void> function() throws CloudException, IOException { return beginDelete204SucceededAsync().toBlocking().single(); } | /**
* Long running delete succeeds and returns right away.
*
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the {@link ServiceResponse} object if successful.
*/ | Long running delete succeeds and returns right away | beginDelete204Succeeded | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROsInner.java",
"license": "mit",
"size": 313853
} | [
"com.microsoft.azure.CloudException",
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"java.io"
] | com.microsoft.azure; com.microsoft.rest; java.io; | 2,482,524 |
Stack<TypeInformation<?>> stack = new Stack<>();
stack.push(keyType);
List<TypeInformation<?>> unsupportedTypes = new ArrayList<>();
while (!stack.isEmpty()) {
TypeInformation<?> typeInfo = stack.pop();
if (!validateKeyTypeIsHashable(typeInfo)) {
unsupportedTypes.add(typeInfo);
}
if (typeInf... | Stack<TypeInformation<?>> stack = new Stack<>(); stack.push(keyType); List<TypeInformation<?>> unsupportedTypes = new ArrayList<>(); while (!stack.isEmpty()) { TypeInformation<?> typeInfo = stack.pop(); if (!validateKeyTypeIsHashable(typeInfo)) { unsupportedTypes.add(typeInfo); } if (typeInfo instanceof TupleTypeInfoBa... | /**
* Validates that a given type of element (as encoded by the provided {@link TypeInformation}) can be
* used as a key in the {@code DataStream.keyBy()} operation. This is done by searching depth-first the
* key type and checking if each of the composite types satisfies the required conditions
* (see {@link #... | Validates that a given type of element (as encoded by the provided <code>TypeInformation</code>) can be used as a key in the DataStream.keyBy() operation. This is done by searching depth-first the key type and checking if each of the composite types satisfies the required conditions (see <code>#validateKeyTypeIsHashabl... | validateKeyType | {
"repo_name": "ueshin/apache-flink",
"path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java",
"license": "apache-2.0",
"size": 44205
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Stack",
"org.apache.commons.lang3.StringUtils",
"org.apache.flink.api.common.InvalidProgramException",
"org.apache.flink.api.common.typeinfo.TypeInformation",
"org.apache.flink.api.java.typeutils.TupleTypeInfoBase"
] | import java.util.ArrayList; import java.util.List; import java.util.Stack; import org.apache.commons.lang3.StringUtils; import org.apache.flink.api.common.InvalidProgramException; import org.apache.flink.api.common.typeinfo.TypeInformation; import org.apache.flink.api.java.typeutils.TupleTypeInfoBase; | import java.util.*; import org.apache.commons.lang3.*; import org.apache.flink.api.common.*; import org.apache.flink.api.common.typeinfo.*; import org.apache.flink.api.java.typeutils.*; | [
"java.util",
"org.apache.commons",
"org.apache.flink"
] | java.util; org.apache.commons; org.apache.flink; | 276,852 |
PagedIterable<StreamingJob> list(String expand, Context context); | PagedIterable<StreamingJob> list(String expand, Context context); | /**
* Lists all of the streaming jobs in the given subscription.
*
* @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job
* properties to include in the response, beyond the default set returned when this parameter is absent. The
* ... | Lists all of the streaming jobs in the given subscription | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/streamanalytics/azure-resourcemanager-streamanalytics/src/main/java/com/azure/resourcemanager/streamanalytics/models/StreamingJobs.java",
"license": "mit",
"size": 15074
} | [
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,513,400 |
public static ExtensibilityElement getBindingExtension(Binding binding) {
Collection bindings = new ArrayList();
CollectionsX.filter(bindings, binding.getExtensibilityElements(), HTTPBinding.class);
CollectionsX.filter(bindings, binding.getExtensibilityElements(), SOAPBinding.class);
... | static ExtensibilityElement function(Binding binding) { Collection bindings = new ArrayList(); CollectionsX.filter(bindings, binding.getExtensibilityElements(), HTTPBinding.class); CollectionsX.filter(bindings, binding.getExtensibilityElements(), SOAPBinding.class); if (bindings.size() == 0) { return null; } else if (b... | /**
* Look up the ExtensibilityElement defining the binding for the given Port or
* throw an {@link IllegalArgumentException} if multiple bindings found.
*
* @param binding
* @return an instance of {@link SOAPBinding} or {@link HTTPBinding} or null
* @throws IllegalArgumentException if mul... | Look up the ExtensibilityElement defining the binding for the given Port or throw an <code>IllegalArgumentException</code> if multiple bindings found | getBindingExtension | {
"repo_name": "dinkelaker/hbs4ode",
"path": "utils/src/main/java/org/apache/ode/utils/wsdl/WsdlUtils.java",
"license": "apache-2.0",
"size": 16646
} | [
"java.util.ArrayList",
"java.util.Collection",
"javax.wsdl.Binding",
"javax.wsdl.extensions.ExtensibilityElement",
"javax.wsdl.extensions.http.HTTPBinding",
"javax.wsdl.extensions.soap.SOAPBinding",
"org.apache.ode.utils.stl.CollectionsX"
] | import java.util.ArrayList; import java.util.Collection; import javax.wsdl.Binding; import javax.wsdl.extensions.ExtensibilityElement; import javax.wsdl.extensions.http.HTTPBinding; import javax.wsdl.extensions.soap.SOAPBinding; import org.apache.ode.utils.stl.CollectionsX; | import java.util.*; import javax.wsdl.*; import javax.wsdl.extensions.*; import javax.wsdl.extensions.http.*; import javax.wsdl.extensions.soap.*; import org.apache.ode.utils.stl.*; | [
"java.util",
"javax.wsdl",
"org.apache.ode"
] | java.util; javax.wsdl; org.apache.ode; | 918,529 |
@Test()
public void testFormatLDAPResult()
throws Exception
{
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
final LDAPSearch ldapSearch =
new LDAPSearch(outputStream, outputStream);
final List<String> requestedAttributes =
Arrays.asList("uid", "giv... | @Test() void function() throws Exception { final ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); final LDAPSearch ldapSearch = new LDAPSearch(outputStream, outputStream); final List<String> requestedAttributes = Arrays.asList("uid", STR, "sn", STR, "mail"); final ColumnFormatterLDAPSearchOutputHandler... | /**
* Tests the behavior of the {@code formatResult} method for an
* {@code LDAPResult} that is not a {@code SearchResult}.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the behavior of the formatResult method for an LDAPResult that is not a SearchResult | testFormatLDAPResult | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/tools/MultiValuedCSVLDAPSearchOutputHandlerTestCase.java",
"license": "gpl-2.0",
"size": 18132
} | [
"com.unboundid.asn1.ASN1OctetString",
"com.unboundid.ldap.sdk.Control",
"com.unboundid.ldap.sdk.LDAPResult",
"com.unboundid.ldap.sdk.ResultCode",
"com.unboundid.util.OutputFormat",
"java.io.ByteArrayOutputStream",
"java.util.Arrays",
"java.util.List",
"org.testng.annotations.Test"
] | import com.unboundid.asn1.ASN1OctetString; import com.unboundid.ldap.sdk.Control; import com.unboundid.ldap.sdk.LDAPResult; import com.unboundid.ldap.sdk.ResultCode; import com.unboundid.util.OutputFormat; import java.io.ByteArrayOutputStream; import java.util.Arrays; import java.util.List; import org.testng.annotation... | import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import com.unboundid.util.*; import java.io.*; import java.util.*; import org.testng.annotations.*; | [
"com.unboundid.asn1",
"com.unboundid.ldap",
"com.unboundid.util",
"java.io",
"java.util",
"org.testng.annotations"
] | com.unboundid.asn1; com.unboundid.ldap; com.unboundid.util; java.io; java.util; org.testng.annotations; | 2,712,566 |
public final TopOfBookEventBuilder withAsk(AskEvent inAsk)
{
ask = inAsk;
return this;
} | final TopOfBookEventBuilder function(AskEvent inAsk) { ask = inAsk; return this; } | /**
* Sets the ask value.
*
* @param inAsk an <code>AskEvent</code> value or <code>null</code>
* @return a <code>TopOfBookEventBuilder</code> value
*/ | Sets the ask value | withAsk | {
"repo_name": "nagyist/marketcetera",
"path": "trunk/core/src/main/java/org/marketcetera/event/impl/TopOfBookEventBuilder.java",
"license": "apache-2.0",
"size": 4574
} | [
"org.marketcetera.event.AskEvent"
] | import org.marketcetera.event.AskEvent; | import org.marketcetera.event.*; | [
"org.marketcetera.event"
] | org.marketcetera.event; | 2,601,113 |
public static LoaderDelegator newLoader(Configuration conf, FSNamesystem fsn) {
return new LoaderDelegator(conf, fsn);
}
public static class Loader implements AbstractLoader {
private final Configuration conf;
private final FSNamesystem namesystem;
private boolean loaded = false;
... | static LoaderDelegator function(Configuration conf, FSNamesystem fsn) { return new LoaderDelegator(conf, fsn); } public static class Loader implements AbstractLoader { private final Configuration conf; private final FSNamesystem namesystem; private boolean loaded = false; private long imgTxId; private MD5Hash imgDigest... | /**
* Construct a loader class to load the image. It chooses the loader based on
* the layout version.
*/ | Construct a loader class to load the image. It chooses the loader based on the layout version | newLoader | {
"repo_name": "jonathangizmo/HadoopDistJ",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java",
"license": "mit",
"size": 53694
} | [
"java.util.Map",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot",
"org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotFSImageFormat",
"org.apache.hadoop.io.MD5Hash"
] | import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot; import org.apache.hadoop.hdfs.server.namenode.snapshot.SnapshotFSImageFormat; import org.apache.hadoop.io.MD5Hash; | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.server.namenode.snapshot.*; import org.apache.hadoop.io.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 690,464 |
@Test
public void whenAddNewItemAndEditThisItemThenTrackerHasSameItem() {
Tracker tracker = new Tracker();
Item item = new Item("test1", "testDescription", 123L);
tracker.add(item);
Item item2 = new Item(item.getId(), "test2", "testDesc2", 456L);
tracker.replace(item2);
... | void function() { Tracker tracker = new Tracker(); Item item = new Item("test1", STR, 123L); tracker.add(item); Item item2 = new Item(item.getId(), "test2", STR, 456L); tracker.replace(item2); assertThat(tracker.findAll().get(0), is(item2)); } | /**
* Checks if the tracker has the Item that is edited.
*/ | Checks if the tracker has the Item that is edited | whenAddNewItemAndEditThisItemThenTrackerHasSameItem | {
"repo_name": "Ravmouse/vvasilyev",
"path": "chapter_003/src/test/java/ru/job4j/tracker/TrackerTest.java",
"license": "apache-2.0",
"size": 3434
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 852,759 |
public void project_serviceName_serviceInfos_PUT(String serviceName, OvhService body) throws IOException {
String qPath = "/cloud/project/{serviceName}/serviceInfos";
StringBuilder sb = path(qPath, serviceName);
exec(qPath, "PUT", sb.toString(), body);
} | void function(String serviceName, OvhService body) throws IOException { String qPath = STR; StringBuilder sb = path(qPath, serviceName); exec(qPath, "PUT", sb.toString(), body); } | /**
* Alter this object properties
*
* REST: PUT /cloud/project/{serviceName}/serviceInfos
* @param body [required] New object properties
* @param serviceName [required] The project id
*/ | Alter this object properties | project_serviceName_serviceInfos_PUT | {
"repo_name": "UrielCh/ovh-java-sdk",
"path": "ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java",
"license": "bsd-3-clause",
"size": 111796
} | [
"java.io.IOException",
"net.minidev.ovh.api.services.OvhService"
] | import java.io.IOException; import net.minidev.ovh.api.services.OvhService; | import java.io.*; import net.minidev.ovh.api.services.*; | [
"java.io",
"net.minidev.ovh"
] | java.io; net.minidev.ovh; | 1,370,450 |
private static Set<String> getExternalResourceLocationsOfChecks(Set<AbstractCheck> checks) {
final Set<String> externalConfigurationResources = new HashSet<>();
checks.stream().filter(check -> check instanceof ExternalResourceHolder).forEach(check -> {
final Set<String> checkExternalReso... | static Set<String> function(Set<AbstractCheck> checks) { final Set<String> externalConfigurationResources = new HashSet<>(); checks.stream().filter(check -> check instanceof ExternalResourceHolder).forEach(check -> { final Set<String> checkExternalResources = ((ExternalResourceHolder) check).getExternalResourceLocation... | /**
* Returns a set of external configuration resource locations which are used by the checks set.
* @param checks a set of checks.
* @return a set of external configuration resource locations which are used by the checks set.
*/ | Returns a set of external configuration resource locations which are used by the checks set | getExternalResourceLocationsOfChecks | {
"repo_name": "jochenvdv/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java",
"license": "lgpl-2.1",
"size": 27138
} | [
"com.puppycrawl.tools.checkstyle.api.AbstractCheck",
"com.puppycrawl.tools.checkstyle.api.ExternalResourceHolder",
"java.util.HashSet",
"java.util.Set"
] | import com.puppycrawl.tools.checkstyle.api.AbstractCheck; import com.puppycrawl.tools.checkstyle.api.ExternalResourceHolder; import java.util.HashSet; import java.util.Set; | import com.puppycrawl.tools.checkstyle.api.*; import java.util.*; | [
"com.puppycrawl.tools",
"java.util"
] | com.puppycrawl.tools; java.util; | 1,028,530 |
public Builder addAllTargetPools(List<String> targetPools) {
if (this.targetPools == null) {
this.targetPools = new LinkedList<>();
}
this.targetPools.addAll(targetPools);
return this;
} | Builder function(List<String> targetPools) { if (this.targetPools == null) { this.targetPools = new LinkedList<>(); } this.targetPools.addAll(targetPools); return this; } | /**
* The list of target pool URLs that instances in this managed instance group belong to. The
* managed instance group applies these target pools to all of the instances in the group.
* Existing instances and new instances in the group all receive these target pool settings.
*/ | The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings | addAllTargetPools | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersSetTargetPoolsRequest.java",
"license": "apache-2.0",
"size": 7929
} | [
"java.util.LinkedList",
"java.util.List"
] | import java.util.LinkedList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,976,762 |
@Path("/{beerId}")
@DELETE
void deleteBeer(@PathParam("beerId") int beerId); | @Path(STR) void deleteBeer(@PathParam(STR) int beerId); | /**
* Removes a single beer from the data set.
*/ | Removes a single beer from the data set | deleteBeer | {
"repo_name": "apiman/apiman-studio",
"path": "back-end/hub-codegen/src/test/resources/OpenApi2ThorntailTest/_expected-full/generated-api/src/main/java/org/example/api/BeersResource.java",
"license": "apache-2.0",
"size": 1179
} | [
"javax.ws.rs.Path",
"javax.ws.rs.PathParam"
] | import javax.ws.rs.Path; import javax.ws.rs.PathParam; | import javax.ws.rs.*; | [
"javax.ws"
] | javax.ws; | 226,759 |
protected String createSessionId(HttpResponse response) {
StringBuilder sessionIdBuilder = new StringBuilder();
byte[] bytes = new byte[16];
secureRandom.nextBytes(bytes);
for (byte b : bytes) {
sessionIdBuilder.append(Integer.toHexString(b & 0xff));
}
Str... | String function(HttpResponse response) { StringBuilder sessionIdBuilder = new StringBuilder(); byte[] bytes = new byte[16]; secureRandom.nextBytes(bytes); for (byte b : bytes) { sessionIdBuilder.append(Integer.toHexString(b & 0xff)); } String sessionId = sessionIdBuilder.toString(); HttpCookie sessionCookie = new HttpC... | /**
* Creates a session id and adds the corresponding cookie to the
* response.
*
* @param response the response
* @return the session id
*/ | Creates a session id and adds the corresponding cookie to the response | createSessionId | {
"repo_name": "mnlipp/jgrapes",
"path": "org.jgrapes.http/src/org/jgrapes/http/SessionManager.java",
"license": "agpl-3.0",
"size": 18939
} | [
"java.net.HttpCookie",
"org.jdrupes.httpcodec.protocols.http.HttpField",
"org.jdrupes.httpcodec.protocols.http.HttpResponse",
"org.jdrupes.httpcodec.types.CacheControlDirectives",
"org.jdrupes.httpcodec.types.CookieList",
"org.jdrupes.httpcodec.types.Directive"
] | import java.net.HttpCookie; import org.jdrupes.httpcodec.protocols.http.HttpField; import org.jdrupes.httpcodec.protocols.http.HttpResponse; import org.jdrupes.httpcodec.types.CacheControlDirectives; import org.jdrupes.httpcodec.types.CookieList; import org.jdrupes.httpcodec.types.Directive; | import java.net.*; import org.jdrupes.httpcodec.protocols.http.*; import org.jdrupes.httpcodec.types.*; | [
"java.net",
"org.jdrupes.httpcodec"
] | java.net; org.jdrupes.httpcodec; | 2,402,055 |
EClass getInsertAttribute();
| EClass getInsertAttribute(); | /**
* Returns the meta object for class '{@link eu.mondo.collaboration.operationtracemodel.InsertAttribute <em>Insert Attribute</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Insert Attribute</em>'.
* @see eu.mondo.collaboration.operationtracemodel.Inse... | Returns the meta object for class '<code>eu.mondo.collaboration.operationtracemodel.InsertAttribute Insert Attribute</code>'. | getInsertAttribute | {
"repo_name": "FTSRG/mondo-collab-framework",
"path": "archive/workspaceTracker/VA/traceModel/src/eu/mondo/collaboration/operationtracemodel/OperationtracemodelPackage.java",
"license": "epl-1.0",
"size": 59018
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,712,441 |
public static Chain getCAOnly(Chain chain){
Chain newChain = new ChainImpl();
newChain.setChainID(chain.getChainID());
newChain.setHeader(chain.getHeader());
newChain.setSwissprotId(chain.getSwissprotId());
List<Group> groups = chain.getAtomGroups();
... | static Chain function(Chain chain){ Chain newChain = new ChainImpl(); newChain.setChainID(chain.getChainID()); newChain.setHeader(chain.getHeader()); newChain.setSwissprotId(chain.getSwissprotId()); List<Group> groups = chain.getAtomGroups(); grouploop: for (Group g: groups){ List<Atom> atoms = g.getAtoms(); if ( ! (g ... | /** Convert a Chain to a new Chain containing C-alpha atoms only.
*
* @param chain to convert
* @return a new chain containing Amino acids with C-alpha only.
*/ | Convert a Chain to a new Chain containing C-alpha atoms only | getCAOnly | {
"repo_name": "JolantaWojcik/biojavaOwn",
"path": "biojava3-structure/src/main/java/org/biojava/bio/structure/io/CAConverter.java",
"license": "lgpl-2.1",
"size": 3035
} | [
"java.util.List",
"org.biojava.bio.structure.AminoAcid",
"org.biojava.bio.structure.AminoAcidImpl",
"org.biojava.bio.structure.Atom",
"org.biojava.bio.structure.Chain",
"org.biojava.bio.structure.ChainImpl",
"org.biojava.bio.structure.Element",
"org.biojava.bio.structure.Group",
"org.biojava.bio.str... | import java.util.List; import org.biojava.bio.structure.AminoAcid; import org.biojava.bio.structure.AminoAcidImpl; import org.biojava.bio.structure.Atom; import org.biojava.bio.structure.Chain; import org.biojava.bio.structure.ChainImpl; import org.biojava.bio.structure.Element; import org.biojava.bio.structure.Group; ... | import java.util.*; import org.biojava.bio.structure.*; | [
"java.util",
"org.biojava.bio"
] | java.util; org.biojava.bio; | 150,438 |
@Override
protected EPackage getEPackage() {
return CorePackage.eINSTANCE;
}
| EPackage function() { return CorePackage.eINSTANCE; } | /**
* Returns the package of this validator switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Returns the package of this validator switch. | getEPackage | {
"repo_name": "uppaal-emf/uppaal",
"path": "metamodel/org.muml.uppaal/src/org/muml/uppaal/core/util/CoreValidator.java",
"license": "epl-1.0",
"size": 6962
} | [
"org.eclipse.emf.ecore.EPackage",
"org.muml.uppaal.core.CorePackage"
] | import org.eclipse.emf.ecore.EPackage; import org.muml.uppaal.core.CorePackage; | import org.eclipse.emf.ecore.*; import org.muml.uppaal.core.*; | [
"org.eclipse.emf",
"org.muml.uppaal"
] | org.eclipse.emf; org.muml.uppaal; | 2,423,114 |
@Test
public void testResourceManagerLeaderRetrieval() throws Exception {
final String address = "foobar";
LeaderRetrievalListener leaderRetrievalListener = mock(LeaderRetrievalListener.class);
LeaderContender leaderContender = mock(LeaderContender.class);
when(leaderContender.getAddress()).thenReturn(addre... | void function() throws Exception { final String address = STR; LeaderRetrievalListener leaderRetrievalListener = mock(LeaderRetrievalListener.class); LeaderContender leaderContender = mock(LeaderContender.class); when(leaderContender.getAddress()).thenReturn(address); LeaderElectionService leaderElectionService = embed... | /**
* Tests the ResourceManager leader retrieval for a given job.
*/ | Tests the ResourceManager leader retrieval for a given job | testResourceManagerLeaderRetrieval | {
"repo_name": "ueshin/apache-flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedHaServicesTest.java",
"license": "apache-2.0",
"size": 9498
} | [
"org.apache.flink.runtime.leaderelection.LeaderContender",
"org.apache.flink.runtime.leaderelection.LeaderElectionService",
"org.apache.flink.runtime.leaderretrieval.LeaderRetrievalListener",
"org.apache.flink.runtime.leaderretrieval.LeaderRetrievalService",
"org.mockito.ArgumentCaptor",
"org.mockito.Matc... | import org.apache.flink.runtime.leaderelection.LeaderContender; import org.apache.flink.runtime.leaderelection.LeaderElectionService; import org.apache.flink.runtime.leaderretrieval.LeaderRetrievalListener; import org.apache.flink.runtime.leaderretrieval.LeaderRetrievalService; import org.mockito.ArgumentCaptor; import... | import org.apache.flink.runtime.leaderelection.*; import org.apache.flink.runtime.leaderretrieval.*; import org.mockito.*; | [
"org.apache.flink",
"org.mockito"
] | org.apache.flink; org.mockito; | 2,076,911 |
@Override
public void map(LongWritable key, Text val, Context context)
throws IOException, InterruptedException {
writeRecord(val.toString(), this.recordEndStr);
// We don't emit anything to the OutputCollector because we wrote
// straight to InfiniDB. Send a progress indicator to prevent a time... | void function(LongWritable key, Text val, Context context) throws IOException, InterruptedException { writeRecord(val.toString(), this.recordEndStr); context.progress(); } | /**
* Export the table to InfiniDB by using cpimporty to write the data to the
* database.
*
* Expects one delimited text record as the 'val'; ignores the key.
*/ | Export the table to InfiniDB by using cpimporty to write the data to the database. Expects one delimited text record as the 'val'; ignores the key | map | {
"repo_name": "infinidb/sqoop",
"path": "src/java/org/apache/sqoop/mapreduce/InfiniDBTextExportMapper.java",
"license": "apache-2.0",
"size": 1274
} | [
"java.io.IOException",
"org.apache.hadoop.io.LongWritable",
"org.apache.hadoop.io.Text"
] | import java.io.IOException; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; | import java.io.*; import org.apache.hadoop.io.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 841,441 |
public ImmutableBag<Entity> getEntities(String group) {
Bag<Entity> entities = entitiesByGroup.get(group);
if(entities == null) {
entities = new Bag<Entity>();
entitiesByGroup.put(group, entities);
}
return entities;
}
| ImmutableBag<Entity> function(String group) { Bag<Entity> entities = entitiesByGroup.get(group); if(entities == null) { entities = new Bag<Entity>(); entitiesByGroup.put(group, entities); } return entities; } | /**
* Get all entities that belong to the provided group.
* @param group name of the group.
* @return read-only bag of entities belonging to the group.
*/ | Get all entities that belong to the provided group | getEntities | {
"repo_name": "pbanwait/Artemis-Framework",
"path": "artemis/src/com/artemis/managers/GroupManager.java",
"license": "bsd-3-clause",
"size": 3374
} | [
"com.artemis.Entity",
"com.artemis.utils.Bag",
"com.artemis.utils.ImmutableBag"
] | import com.artemis.Entity; import com.artemis.utils.Bag; import com.artemis.utils.ImmutableBag; | import com.artemis.*; import com.artemis.utils.*; | [
"com.artemis",
"com.artemis.utils"
] | com.artemis; com.artemis.utils; | 2,483,596 |
@Test
@SmallTest
public void testInvalidMhtmlMainResourceMimeType() {
HistogramDelta histogramDelta = new HistogramDelta(
MHTML_LOAD_RESULT_UMA_NAME_UNTRUSTED, MhtmlLoadResult.MISSING_MAIN_RESOURCE);
String testUrl = UrlUtils.getTestFileUrl("offline_pages/invalid_main_resourc... | void function() { HistogramDelta histogramDelta = new HistogramDelta( MHTML_LOAD_RESULT_UMA_NAME_UNTRUSTED, MhtmlLoadResult.MISSING_MAIN_RESOURCE); String testUrl = UrlUtils.getTestFileUrl(STR); sActivityTestRule.loadUrl(testUrl); final AtomicReference<OfflinePageItem> offlinePageItem = new AtomicReference<>(); TestThr... | /**
* This gets a file:// URL for an MHTML file without a valid main resource
* (i.e. no resource in the archive may be used as a main resource because
* no resource's MIME type is suitable). The MHTML should not render in the
* tab.
*/ | This gets a file:// URL for an MHTML file without a valid main resource (i.e. no resource in the archive may be used as a main resource because no resource's MIME type is suitable). The MHTML should not render in the tab | testInvalidMhtmlMainResourceMimeType | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtilsTest.java",
"license": "bsd-3-clause",
"size": 23248
} | [
"java.util.concurrent.atomic.AtomicReference",
"org.chromium.base.test.util.MetricsUtils",
"org.chromium.base.test.util.UrlUtils",
"org.chromium.blink.mojom.MhtmlLoadResult",
"org.chromium.content_public.browser.test.util.TestThreadUtils",
"org.junit.Assert"
] | import java.util.concurrent.atomic.AtomicReference; import org.chromium.base.test.util.MetricsUtils; import org.chromium.base.test.util.UrlUtils; import org.chromium.blink.mojom.MhtmlLoadResult; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.junit.Assert; | import java.util.concurrent.atomic.*; import org.chromium.base.test.util.*; import org.chromium.blink.mojom.*; import org.chromium.content_public.browser.test.util.*; import org.junit.*; | [
"java.util",
"org.chromium.base",
"org.chromium.blink",
"org.chromium.content_public",
"org.junit"
] | java.util; org.chromium.base; org.chromium.blink; org.chromium.content_public; org.junit; | 2,463,490 |
@Override
public ITabDescriptor[] getTabDescriptors(IWorkbenchPart part,
ISelection selection) {
// Make sure the selection is valid
if (selection != null && selection instanceof IStructuredSelection) {
Object[] selectedObjects = ((IStructuredSelection) selection)
.toArray();
// If ther... | ITabDescriptor[] function(IWorkbenchPart part, ISelection selection) { if (selection != null && selection instanceof IStructuredSelection) { Object[] selectedObjects = ((IStructuredSelection) selection) .toArray(); if (selectedObjects.length >= 4) { Object first = selectedObjects[0]; if (first instanceof DataComponent)... | /**
* Gets the tab descriptors for the three tabs. Creates them if they haven't
* been created and fills them with the appropriate tab section.
*
* @see org.eclipse.ui.views.properties.tabbed.ITabDescriptorProvider#
* getTabDescriptors(org.eclipse.ui.IWorkbenchPart,
* org.eclipse.jface.viewe... | Gets the tab descriptors for the three tabs. Creates them if they haven't been created and fills them with the appropriate tab section | getTabDescriptors | {
"repo_name": "nickstanish/ice",
"path": "org.eclipse.ice.reflectivity.ui/src/org/eclipse/ice/reflectivity/ui/ReflectivityTabDescriptorProvider.java",
"license": "epl-1.0",
"size": 9606
} | [
"org.eclipse.ice.datastructures.ICEObject",
"org.eclipse.ice.datastructures.form.DataComponent",
"org.eclipse.ice.reflectivity.MaterialSelection",
"org.eclipse.jface.viewers.ISelection",
"org.eclipse.jface.viewers.IStructuredSelection",
"org.eclipse.ui.IWorkbenchPart",
"org.eclipse.ui.views.properties.t... | import org.eclipse.ice.datastructures.ICEObject; import org.eclipse.ice.datastructures.form.DataComponent; import org.eclipse.ice.reflectivity.MaterialSelection; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.u... | import org.eclipse.ice.datastructures.*; import org.eclipse.ice.datastructures.form.*; import org.eclipse.ice.reflectivity.*; import org.eclipse.jface.viewers.*; import org.eclipse.ui.*; import org.eclipse.ui.views.properties.tabbed.*; | [
"org.eclipse.ice",
"org.eclipse.jface",
"org.eclipse.ui"
] | org.eclipse.ice; org.eclipse.jface; org.eclipse.ui; | 562,824 |
public static CallerInfo getCallerInfo(Context context, Uri contactRef) {
return getCallerInfo(context, contactRef,
context.getContentResolver().query(contactRef, null, null, null, null));
}
| static CallerInfo function(Context context, Uri contactRef) { return getCallerInfo(context, contactRef, context.getContentResolver().query(contactRef, null, null, null, null)); } | /**
* getCallerInfo given a URI, look up in the call-log database
* for the uri unique key.
* @param context the context used to get the ContentResolver
* @param contactRef the URI used to lookup caller id
* @return the CallerInfo which contains the caller id for the given
* number. ... | getCallerInfo given a URI, look up in the call-log database for the uri unique key | getCallerInfo | {
"repo_name": "codevise/extended-sipdroid",
"path": "src/org/sipdroid/sipua/phone/CallerInfo.java",
"license": "gpl-3.0",
"size": 8442
} | [
"android.content.Context",
"android.net.Uri"
] | import android.content.Context; import android.net.Uri; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 1,327,489 |
public final void writeObjectOverride(Object obj)
throws IOException
{
writeObjectState.writeData(this);
Util.writeAbstractObject((OutputStream)orbStream, obj);
} | final void function(Object obj) throws IOException { writeObjectState.writeData(this); Util.writeAbstractObject((OutputStream)orbStream, obj); } | /**
* Override the actions of the final method "writeObject()"
* in ObjectOutputStream.
* @since JDK1.1.6
*/ | Override the actions of the final method "writeObject()" in ObjectOutputStream | writeObjectOverride | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/corba/se/impl/io/IIOPOutputStream.java",
"license": "apache-2.0",
"size": 25791
} | [
"java.io.IOException",
"javax.rmi.CORBA",
"org.omg.CORBA"
] | import java.io.IOException; import javax.rmi.CORBA; import org.omg.CORBA; | import java.io.*; import javax.rmi.*; import org.omg.*; | [
"java.io",
"javax.rmi",
"org.omg"
] | java.io; javax.rmi; org.omg; | 2,150,976 |
Map<String, List<String>> getHeaders(); | Map<String, List<String>> getHeaders(); | /**
* Get all the headers from the request
*
* @return The headers
*/ | Get all the headers from the request | getHeaders | {
"repo_name": "raphaelbauer/ninja",
"path": "ninja-core/src/main/java/ninja/Context.java",
"license": "apache-2.0",
"size": 23785
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,011,325 |
public AxisSpace getFixedDomainAxisSpace() {
return this.fixedDomainAxisSpace;
} | AxisSpace function() { return this.fixedDomainAxisSpace; } | /**
* Returns the fixed domain axis space.
*
* @return The fixed domain axis space (possibly <code>null</code>).
*
* @see #setFixedDomainAxisSpace(AxisSpace)
*/ | Returns the fixed domain axis space | getFixedDomainAxisSpace | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/chart/plot/CategoryPlot.java",
"license": "lgpl-2.1",
"size": 170549
} | [
"org.jfree.chart.axis.AxisSpace"
] | import org.jfree.chart.axis.AxisSpace; | import org.jfree.chart.axis.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,686,918 |
public static org.ralasafe.db.sql.xml.SimpleValueType unmarshal(
final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.ralasafe.db.sql.xml.SimpleValueType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.SimpleValue... | static org.ralasafe.db.sql.xml.SimpleValueType function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.ralasafe.db.sql.xml.SimpleValueType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.SimpleValueType.class, reader); } | /**
* Method unmarshal.
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*... | Method unmarshal | unmarshal | {
"repo_name": "colddew/ralasafe",
"path": "ralasafe-engine/src/main/java/org/ralasafe/db/sql/xml/SimpleValueType.java",
"license": "mit",
"size": 5404
} | [
"org.exolab.castor.xml.Unmarshaller"
] | import org.exolab.castor.xml.Unmarshaller; | import org.exolab.castor.xml.*; | [
"org.exolab.castor"
] | org.exolab.castor; | 2,723,920 |
public void setSegmentSize(int newSegmentSize)
{
int oldSegmentSize = segmentSize;
segmentSize = newSegmentSize;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RadioPackage.RADIO_MEMORY_SEGMENT__SEGMENT_SIZE, oldSegmentSize, segmentSize));
} | void function(int newSegmentSize) { int oldSegmentSize = segmentSize; segmentSize = newSegmentSize; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, RadioPackage.RADIO_MEMORY_SEGMENT__SEGMENT_SIZE, oldSegmentSize, segmentSize)); } | /**
* Sets the value of the '{@link net.springfieldusa.ham.radio.RadioMemorySegment#getSegmentSize <em>Segment Size</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Segment Size</em>' attribute.
* @see #getSegmentSize()
* @generated
*/ | Sets the value of the '<code>net.springfieldusa.ham.radio.RadioMemorySegment#getSegmentSize Segment Size</code>' attribute. | setSegmentSize | {
"repo_name": "BryanHunt/ham-radio",
"path": "bundles/net.springfieldusa.ham.radio/src-gen/net/springfieldusa/ham/radio/RadioMemorySegment.java",
"license": "epl-1.0",
"size": 9200
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.ecore.impl.ENotificationImpl"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.impl.ENotificationImpl; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.ecore.impl.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 802,464 |
private static SmsMessage createMessageFromParcel(Parcel p, byte[] bearerData) {
p.writeInt(bearerData.length);
for (byte b : bearerData) {
p.writeByte(b);
}
p.setDataPosition(0); // reset position for reading
SmsMessage message = SmsMessage.newFromParcel(p);
... | static SmsMessage function(Parcel p, byte[] bearerData) { p.writeInt(bearerData.length); for (byte b : bearerData) { p.writeByte(b); } p.setDataPosition(0); SmsMessage message = SmsMessage.newFromParcel(p); p.recycle(); return message; } | /**
* Write the bearer data array to the parcel, then return a new SmsMessage from the parcel.
* @param p the parcel containing the CDMA SMS headers
* @param bearerData the bearer data byte array to append to the parcel
* @return the new SmsMessage created from the parcel
*/ | Write the bearer data array to the parcel, then return a new SmsMessage from the parcel | createMessageFromParcel | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/cdma/CdmaSmsCbTest.java",
"license": "gpl-2.0",
"size": 36425
} | [
"android.os.Parcel"
] | import android.os.Parcel; | import android.os.*; | [
"android.os"
] | android.os; | 907,886 |
public boolean accepts(ExpandedArtifactSummaryBean bean) {
String nameCriteria = getName();
if (nameCriteria != null && nameCriteria.trim().length() > 0) {
String beanName = bean.getName().toLowerCase();
if (nameCriteria.startsWith("*") && nameCriteria.endsWith("*")) { //$NON... | boolean function(ExpandedArtifactSummaryBean bean) { String nameCriteria = getName(); if (nameCriteria != null && nameCriteria.trim().length() > 0) { String beanName = bean.getName().toLowerCase(); if (nameCriteria.startsWith("*") && nameCriteria.endsWith("*")) { String criteria = nameCriteria.substring(1, nameCriteria... | /**
* Returns true iff the given event matches the criteria in the filter.
* @param item
*/ | Returns true iff the given event matches the criteria in the filter | accepts | {
"repo_name": "Governance/dtgov",
"path": "dtgov-ui-war/src/main/java/org/overlord/dtgov/ui/client/local/beans/DeploymentContentsFilterBean.java",
"license": "apache-2.0",
"size": 4139
} | [
"org.overlord.dtgov.ui.client.shared.beans.ExpandedArtifactSummaryBean"
] | import org.overlord.dtgov.ui.client.shared.beans.ExpandedArtifactSummaryBean; | import org.overlord.dtgov.ui.client.shared.beans.*; | [
"org.overlord.dtgov"
] | org.overlord.dtgov; | 1,262,500 |
public void setClassname(String className) throws BuildException {
Object proc = null;
try {
Class implClass = ProcessorDef.class.getClassLoader().loadClass(
className);
try {
Method getInstance = implClass.getMethod("getInstance",
... | void function(String className) throws BuildException { Object proc = null; try { Class implClass = ProcessorDef.class.getClassLoader().loadClass( className); try { Method getInstance = implClass.getMethod(STR, new Class[0]); proc = getInstance.invoke(null, new Object[0]); } catch (Exception ex) { proc = implClass.newI... | /**
* Sets the class name for the adapter. Use the "name" attribute when the
* tool is supported.
*
* @param className
* full class name
*
*/ | Sets the class name for the adapter. Use the "name" attribute when the tool is supported | setClassname | {
"repo_name": "flax3lbs/cpptasks-parallel",
"path": "src/main/java/net/sf/antcontrib/cpptasks/ProcessorDef.java",
"license": "apache-2.0",
"size": 23153
} | [
"java.lang.reflect.Method",
"net.sf.antcontrib.cpptasks.compiler.Processor",
"org.apache.tools.ant.BuildException"
] | import java.lang.reflect.Method; import net.sf.antcontrib.cpptasks.compiler.Processor; import org.apache.tools.ant.BuildException; | import java.lang.reflect.*; import net.sf.antcontrib.cpptasks.compiler.*; import org.apache.tools.ant.*; | [
"java.lang",
"net.sf.antcontrib",
"org.apache.tools"
] | java.lang; net.sf.antcontrib; org.apache.tools; | 2,536,591 |
public List<Long> getCacheReport(String bpid); | List<Long> function(String bpid); | /**
* Returns the cache report - the full list of cached block IDs of a
* block pool.
* @param bpid Block Pool Id
* @return the cache report - the full list of cached block IDs.
*/ | Returns the cache report - the full list of cached block IDs of a block pool | getCacheReport | {
"repo_name": "fyqls/hadoop-2.4.0",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java",
"license": "apache-2.0",
"size": 15065
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 151,681 |
EClass getWithContextExpression(); | EClass getWithContextExpression(); | /**
* Returns the meta object for class '{@link org.eclipse.xtext.testlanguages.backtracking.beeLangTestLanguage.WithContextExpression <em>With Context Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>With Context Expression</em>'.
* @see org.e... | Returns the meta object for class '<code>org.eclipse.xtext.testlanguages.backtracking.beeLangTestLanguage.WithContextExpression With Context Expression</code>'. | getWithContextExpression | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.testlanguages/src-gen/org/eclipse/xtext/testlanguages/backtracking/beeLangTestLanguage/BeeLangTestLanguagePackage.java",
"license": "epl-1.0",
"size": 161651
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 682,251 |
public Range getRangeBounds(List visibleSeriesKeys,
boolean includeInterval); | Range function(List visibleSeriesKeys, boolean includeInterval); | /**
* Returns the range of the values in this dataset's range.
*
* @param visibleSeriesKeys the keys of the visible series.
* @param includeInterval a flag that determines whether or not the
* y-interval is taken into account.
*
* @return The range (or <code>... | Returns the range of the values in this dataset's range | getRangeBounds | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/data/category/CategoryRangeInfo.java",
"license": "lgpl-2.1",
"size": 2280
} | [
"java.util.List",
"org.jfree.data.Range"
] | import java.util.List; import org.jfree.data.Range; | import java.util.*; import org.jfree.data.*; | [
"java.util",
"org.jfree.data"
] | java.util; org.jfree.data; | 229,415 |
public static float getTabCardPaddingDimension(Context context) {
return context.getResources().getDimension(themeRefactorEnabled()
? R.dimen.tab_grid_card_between_card_padding
: R.dimen.tab_list_card_padding);
} | static float function(Context context) { return context.getResources().getDimension(themeRefactorEnabled() ? R.dimen.tab_grid_card_between_card_padding : R.dimen.tab_list_card_padding); } | /**
* Return the size represented by dimension for padding between tab cards.
* @param context {@link Context} to retrieve dimension.
* @return The padding between tab cards in float number.
*/ | Return the size represented by dimension for padding between tab cards | getTabCardPaddingDimension | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java",
"license": "bsd-3-clause",
"size": 30938
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 865,001 |
@Parameterized.Parameters(name = "Test degree type {0} with vertex time: {1}")
public static Iterable<Object[]> parameters() {
return Arrays.asList(
new Object[] {VertexDegree.IN, true, EXPECTED_IN_DEGREES},
new Object[] {VertexDegree.OUT, true, EXPECTED_OUT_DEGREES},
new Object[] {VertexDegre... | @Parameterized.Parameters(name = STR) static Iterable<Object[]> function() { return Arrays.asList( new Object[] {VertexDegree.IN, true, EXPECTED_IN_DEGREES}, new Object[] {VertexDegree.OUT, true, EXPECTED_OUT_DEGREES}, new Object[] {VertexDegree.BOTH, true, EXPECTED_BOTH_DEGREES}, new Object[] {VertexDegree.IN, false, ... | /**
* The parameters to test the operator.
*
* @return three different vertex degree types with its corresponding expected degree evolution.
*/ | The parameters to test the operator | parameters | {
"repo_name": "dbs-leipzig/gradoop",
"path": "gradoop-temporal/src/test/java/org/gradoop/temporal/model/impl/operators/metric/TemporalVertexDegreeTest.java",
"license": "apache-2.0",
"size": 10565
} | [
"java.util.Arrays",
"org.gradoop.flink.model.impl.operators.sampling.functions.VertexDegree",
"org.junit.runners.Parameterized"
] | import java.util.Arrays; import org.gradoop.flink.model.impl.operators.sampling.functions.VertexDegree; import org.junit.runners.Parameterized; | import java.util.*; import org.gradoop.flink.model.impl.operators.sampling.functions.*; import org.junit.runners.*; | [
"java.util",
"org.gradoop.flink",
"org.junit.runners"
] | java.util; org.gradoop.flink; org.junit.runners; | 752,113 |
public void analyseTask(RCSTask task) {
this.currentTask = task;
MarkAllSimplePaths masp = new MarkAllSimplePaths();
masp.init(this, this.start, this.getNode(Integer.toString(currentTask.getTarget().getID())));
masp.compute();
ArrayList<RCSPath> paths = task.getPaths();
for (RCSPath path : paths) {
... | void function(RCSTask task) { this.currentTask = task; MarkAllSimplePaths masp = new MarkAllSimplePaths(); masp.init(this, this.start, this.getNode(Integer.toString(currentTask.getTarget().getID()))); masp.compute(); ArrayList<RCSPath> paths = task.getPaths(); for (RCSPath path : paths) { Node endNode = this.getNode(In... | /**
* Import data from a {@link RCSTask}. This method imports all the data for the
* pie-values and sizes for the elements.
*
* @param task
* the task
*/ | Import data from a <code>RCSTask</code>. This method imports all the data for the pie-values and sizes for the elements | analyseTask | {
"repo_name": "r-kober/ReCaLys",
"path": "ReCaLys/src/de/upb/recalys/visualization/PieGraph.java",
"license": "mit",
"size": 12121
} | [
"de.upb.recalys.model.RCSNode",
"de.upb.recalys.model.RCSPath",
"de.upb.recalys.model.RCSTask",
"de.upb.recalys.visualization.algorithms.MarkAllSimplePaths",
"java.util.ArrayList",
"org.graphstream.graph.Edge",
"org.graphstream.graph.Node"
] | import de.upb.recalys.model.RCSNode; import de.upb.recalys.model.RCSPath; import de.upb.recalys.model.RCSTask; import de.upb.recalys.visualization.algorithms.MarkAllSimplePaths; import java.util.ArrayList; import org.graphstream.graph.Edge; import org.graphstream.graph.Node; | import de.upb.recalys.model.*; import de.upb.recalys.visualization.algorithms.*; import java.util.*; import org.graphstream.graph.*; | [
"de.upb.recalys",
"java.util",
"org.graphstream.graph"
] | de.upb.recalys; java.util; org.graphstream.graph; | 199,229 |
void setLiteral(RichStringLiteral value); | void setLiteral(RichStringLiteral value); | /**
* Sets the value of the '{@link org.lunifera.doc.dsl.doccompiler.Literal#getLiteral <em>Literal</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Literal</em>' reference.
* @see #getLiteral()
* @generated
*/ | Sets the value of the '<code>org.lunifera.doc.dsl.doccompiler.Literal#getLiteral Literal</code>' reference. | setLiteral | {
"repo_name": "lunifera/lunifera-doc",
"path": "org.lunifera.doc.dsl.semantic/src/org/lunifera/doc/dsl/doccompiler/Literal.java",
"license": "epl-1.0",
"size": 3174
} | [
"org.lunifera.doc.dsl.luniferadoc.richstring.RichStringLiteral"
] | import org.lunifera.doc.dsl.luniferadoc.richstring.RichStringLiteral; | import org.lunifera.doc.dsl.luniferadoc.richstring.*; | [
"org.lunifera.doc"
] | org.lunifera.doc; | 2,411,546 |
protected Verifier getVerifierWithoutPrepare(final String strTestDir)
throws IOException, VerificationException {
final File testDir = this.getTestDir(strTestDir);
final File localReposFile = this.getLocalReposDir();
final Verifier verifier = new Verifier(testDir.getAbsolutePath(), t... | Verifier function(final String strTestDir) throws IOException, VerificationException { final File testDir = this.getTestDir(strTestDir); final File localReposFile = this.getLocalReposDir(); final Verifier verifier = new Verifier(testDir.getAbsolutePath(), true); verifier.setLocalRepo(localReposFile.getAbsolutePath()); ... | /**
* Prepares a verifier and installs php maven to a local repository.
* @param strTestDir strTestDir The local test directory for the project to be tested
* @return The verifier to be used for testing
* @throws VerificationException
* @throws IOException
*/ | Prepares a verifier and installs php maven to a local repository | getVerifierWithoutPrepare | {
"repo_name": "teosoft123/maven-php-plugin",
"path": "maven-plugins/it/src/test/java/org/phpmaven/test/it/AbstractTestCase.java",
"license": "apache-2.0",
"size": 24956
} | [
"java.io.File",
"java.io.IOException",
"org.apache.maven.it.VerificationException",
"org.apache.maven.it.Verifier"
] | import java.io.File; import java.io.IOException; import org.apache.maven.it.VerificationException; import org.apache.maven.it.Verifier; | import java.io.*; import org.apache.maven.it.*; | [
"java.io",
"org.apache.maven"
] | java.io; org.apache.maven; | 1,909,660 |
public static boolean isSymLink(@NotNull String path) {
if (SystemInfo.areSymLinksSupported) {
final FileAttributes attributes = getAttributes(path);
return attributes != null && attributes.isSymLink();
}
return false;
} | static boolean function(@NotNull String path) { if (SystemInfo.areSymLinksSupported) { final FileAttributes attributes = getAttributes(path); return attributes != null && attributes.isSymLink(); } return false; } | /**
* Checks if a last element in the path is a symlink.
*/ | Checks if a last element in the path is a symlink | isSymLink | {
"repo_name": "Soya93/Extract-Refactoring",
"path": "platform/util/src/com/intellij/openapi/util/io/FileSystemUtil.java",
"license": "apache-2.0",
"size": 22807
} | [
"com.intellij.openapi.util.SystemInfo",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.util.SystemInfo; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.util.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"org.jetbrains.annotations"
] | com.intellij.openapi; org.jetbrains.annotations; | 2,773,862 |
public Setter reqSetRadiantHeaterLockSetting(byte[] edt) {
reqSetProperty(EPC_RADIANT_HEATER_LOCK_SETTING, edt);
return this;
}
}
public static class Getter extends DeviceObject.Getter {
public Getter(short dstEchoClassCode, byte dstEchoInstanceCode
, String dstEchoAddress) {
super(dstEchoClas... | Setter function(byte[] edt) { reqSetProperty(EPC_RADIANT_HEATER_LOCK_SETTING, edt); return this; } } public static class Getter extends DeviceObject.Getter { public Getter(short dstEchoClassCode, byte dstEchoInstanceCode , String dstEchoAddress) { super(dstEchoClassCode, dstEchoInstanceCode , dstEchoAddress); } | /**
* Property name : Radiant heater lock setting<br>
* <br>
* EPC : 0xA2<br>
* <br>
* Contents of property :<br>
* Radiant heater lock ON/OFF<br>
* <br>
* Value range (decimal notation) :<br>
* Radiant heater lock OFF: 0x40 Radiant heater lock ON: 0x41<br>
* <br>
* Data type : unsigned... | Property name : Radiant heater lock setting EPC : 0xA2 Contents of property : Radiant heater lock ON/OFF Value range (decimal notation) : Data type : unsigned char Data size : 1 byte Unit : - Access rule : Announce - undefined Set - optional Get - optional | reqSetRadiantHeaterLockSetting | {
"repo_name": "SonyCSL/OpenECHO",
"path": "src/com/sonycsl/echo/eoj/device/cookinghousehold/CookingHeater.java",
"license": "gpl-3.0",
"size": 70580
} | [
"com.sonycsl.echo.eoj.device.DeviceObject"
] | import com.sonycsl.echo.eoj.device.DeviceObject; | import com.sonycsl.echo.eoj.device.*; | [
"com.sonycsl.echo"
] | com.sonycsl.echo; | 1,102,958 |
@Override
protected Void doInBackground(Uri...params) {
final Uri uri = params[0];
final String oauth_verifier = uri.getQueryParameter(OAuth.OAUTH_VERIFIER);
try {
provider.retrieveAccessToken(consumer, oauth_verifier);
final Editor edit = prefs.edit();
edit.putString(OAuth.OAUTH_TOKEN, co... | Void function(Uri...params) { final Uri uri = params[0]; final String oauth_verifier = uri.getQueryParameter(OAuth.OAUTH_VERIFIER); try { provider.retrieveAccessToken(consumer, oauth_verifier); final Editor edit = prefs.edit(); edit.putString(OAuth.OAUTH_TOKEN, consumer.getToken()); edit.putString(OAuth.OAUTH_TOKEN_SEC... | /**
* Retrieve the oauth_verifier, and store the oauth and oauth_token_secret
* for future API calls.
*/ | Retrieve the oauth_verifier, and store the oauth and oauth_token_secret for future API calls | doInBackground | {
"repo_name": "nmldiegues/park-alert",
"path": "ParkAlertAndroid/src/pt/codebits/park/alert/TwitterPrepareRequestActivity.java",
"license": "apache-2.0",
"size": 5348
} | [
"android.content.SharedPreferences",
"android.net.Uri",
"oauth.signpost.OAuth"
] | import android.content.SharedPreferences; import android.net.Uri; import oauth.signpost.OAuth; | import android.content.*; import android.net.*; import oauth.signpost.*; | [
"android.content",
"android.net",
"oauth.signpost"
] | android.content; android.net; oauth.signpost; | 1,146,401 |
public boolean retryRequest(
final IOException exception,
int executionCount,
final HttpContext context) {
if (exception == null) {
throw new IllegalArgumentException("Exception parameter may not be null");
}
if (context == null) {
... | boolean function( final IOException exception, int executionCount, final HttpContext context) { if (exception == null) { throw new IllegalArgumentException(STR); } if (context == null) { throw new IllegalArgumentException(STR); } if (executionCount > this.retryCount) { return false; } if (exception instanceof NoHttpRes... | /**
* Used <code>retryCount</code> and <code>requestSentRetryEnabled</code> to determine
* if the given method should be retried.
*/ | Used <code>retryCount</code> and <code>requestSentRetryEnabled</code> to determine if the given method should be retried | retryRequest | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.java",
"license": "apache-2.0",
"size": 4774
} | [
"java.io.IOException",
"java.io.InterruptedIOException",
"java.net.UnknownHostException",
"javax.net.ssl.SSLHandshakeException",
"org.apache.http.NoHttpResponseException",
"org.apache.http.protocol.ExecutionContext",
"org.apache.http.protocol.HttpContext"
] | import java.io.IOException; import java.io.InterruptedIOException; import java.net.UnknownHostException; import javax.net.ssl.SSLHandshakeException; import org.apache.http.NoHttpResponseException; import org.apache.http.protocol.ExecutionContext; import org.apache.http.protocol.HttpContext; | import java.io.*; import java.net.*; import javax.net.ssl.*; import org.apache.http.*; import org.apache.http.protocol.*; | [
"java.io",
"java.net",
"javax.net",
"org.apache.http"
] | java.io; java.net; javax.net; org.apache.http; | 1,948,942 |
public static String filterQueueName(final String queueName) {
if ( queueName.equals(MainQueueConfiguration.MAIN_QUEUE_NAME) ) {
return queueName;
} else {
return ResourceHelper.filterName(queueName);
}
} | static String function(final String queueName) { if ( queueName.equals(MainQueueConfiguration.MAIN_QUEUE_NAME) ) { return queueName; } else { return ResourceHelper.filterName(queueName); } } | /**
* Filter the queue name for not allowed characters and replace them
* - with the exception of the main queue, which will not be filtered
* @param queueName the suggested queue name
* @return the filtered queue name
*/ | Filter the queue name for not allowed characters and replace them - with the exception of the main queue, which will not be filtered | filterQueueName | {
"repo_name": "Nimco/sling",
"path": "bundles/extensions/event/src/main/java/org/apache/sling/event/impl/support/ResourceHelper.java",
"license": "apache-2.0",
"size": 18509
} | [
"org.apache.sling.event.impl.jobs.config.MainQueueConfiguration"
] | import org.apache.sling.event.impl.jobs.config.MainQueueConfiguration; | import org.apache.sling.event.impl.jobs.config.*; | [
"org.apache.sling"
] | org.apache.sling; | 2,474,899 |
@Test
public void testExplicitEnlistment2() throws Exception {
IPhynixxXAConnection<ITestConnection> xaCon = factory1.getXAConnection();
// ... the real core connection is hidden by the proxy
this.getTransactionManager().begin();
this.getTransactionManager().getTransaction().en... | void function() throws Exception { IPhynixxXAConnection<ITestConnection> xaCon = factory1.getXAConnection(); this.getTransactionManager().begin(); this.getTransactionManager().getTransaction().enlistResource(xaCon.getXAResource()); ITestConnection con = xaCon.getConnection(); Object conId = con.getConnectionId(); con.a... | /**
* there 's just one XAResource enlisted in a resource but the nothing has
* to be committed. As the Transaction managers performs a 1 phase commit
* the resource is committed correctly
*
* @throws Exception
*/ | there 's just one XAResource enlisted in a resource but the nothing has to be committed. As the Transaction managers performs a 1 phase commit the resource is committed correctly | testExplicitEnlistment2 | {
"repo_name": "csc19601128/Phynixx",
"path": "phynixx/phynixx-xa/src/test/java/org/csc/phynixx/xa/XAResourceIntegrationTest.java",
"license": "apache-2.0",
"size": 45393
} | [
"junit.framework.TestCase",
"org.csc.phynixx.phynixx.testconnection.ITestConnection",
"org.csc.phynixx.phynixx.testconnection.TestConnectionStatusManager",
"org.csc.phynixx.phynixx.testconnection.TestStatusStack"
] | import junit.framework.TestCase; import org.csc.phynixx.phynixx.testconnection.ITestConnection; import org.csc.phynixx.phynixx.testconnection.TestConnectionStatusManager; import org.csc.phynixx.phynixx.testconnection.TestStatusStack; | import junit.framework.*; import org.csc.phynixx.phynixx.testconnection.*; | [
"junit.framework",
"org.csc.phynixx"
] | junit.framework; org.csc.phynixx; | 2,099,762 |
public @JavaType(Throwable.class) static StaticObject initExceptionWithMessage(@JavaType(Throwable.class) ObjectKlass exceptionKlass, String message) {
return initExceptionWithMessage(exceptionKlass, exceptionKlass.getMeta().toGuestString(message));
} | @JavaType(Throwable.class) static StaticObject function(@JavaType(Throwable.class) ObjectKlass exceptionKlass, String message) { return initExceptionWithMessage(exceptionKlass, exceptionKlass.getMeta().toGuestString(message)); } | /**
* Allocate and initializes an exception of the given guest klass.
*
* <p>
* A guest instance is allocated and initialized by calling the
* {@link Throwable#Throwable(String) constructor with message}. The given guest class must have
* such constructor declared.
*
* @param exc... | Allocate and initializes an exception of the given guest klass. A guest instance is allocated and initialized by calling the <code>Throwable#Throwable(String) constructor with message</code>. The given guest class must have such constructor declared | initExceptionWithMessage | {
"repo_name": "smarr/Truffle",
"path": "espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/meta/Meta.java",
"license": "gpl-2.0",
"size": 133002
} | [
"com.oracle.truffle.espresso.impl.ObjectKlass",
"com.oracle.truffle.espresso.runtime.StaticObject",
"com.oracle.truffle.espresso.substitutions.JavaType"
] | import com.oracle.truffle.espresso.impl.ObjectKlass; import com.oracle.truffle.espresso.runtime.StaticObject; import com.oracle.truffle.espresso.substitutions.JavaType; | import com.oracle.truffle.espresso.impl.*; import com.oracle.truffle.espresso.runtime.*; import com.oracle.truffle.espresso.substitutions.*; | [
"com.oracle.truffle"
] | com.oracle.truffle; | 1,500,108 |
protected static int extractByteValue(ByteArrayInputStream pduDataStream) {
assert(null != pduDataStream);
int temp = pduDataStream.read();
assert(-1 != temp);
return temp & 0xFF;
} | static int function(ByteArrayInputStream pduDataStream) { assert(null != pduDataStream); int temp = pduDataStream.read(); assert(-1 != temp); return temp & 0xFF; } | /**
* Extract a byte value from the input stream.
*
* @param pduDataStream pdu data input stream
* @return the byte
*/ | Extract a byte value from the input stream | extractByteValue | {
"repo_name": "mateor/pdroid",
"path": "android-4.0.3_r1/trunk/frameworks/base/core/java/com/google/android/mms/pdu/PduParser.java",
"license": "gpl-3.0",
"size": 75489
} | [
"java.io.ByteArrayInputStream"
] | import java.io.ByteArrayInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,554,378 |
public void rebind(Name arg0, Object arg1, Attributes arg2)
throws NamingException {
ContextNamePair pair;
try {
pair = getTargetNamespaceContextNamePair(arg0);
} catch (IllegalArgumentException e) {
throw new OperationNotSupportedException();
... | void function(Name arg0, Object arg1, Attributes arg2) throws NamingException { ContextNamePair pair; try { pair = getTargetNamespaceContextNamePair(arg0); } catch (IllegalArgumentException e) { throw new OperationNotSupportedException(); } if (pair.context instanceof DirContext) { ((DirContext) pair.context).rebind(pa... | /**
* This method is not supported.
*
* @see javax.naming.directory.DirContext#rebind(javax.naming.Name,
* java.lang.Object, javax.naming.directory.Attributes)
*/ | This method is not supported | rebind | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/DNSContext.java",
"license": "gpl-2.0",
"size": 84425
} | [
"javax.naming.Name",
"javax.naming.NamingException",
"javax.naming.NotContextException",
"javax.naming.OperationNotSupportedException",
"javax.naming.directory.Attributes",
"javax.naming.directory.DirContext",
"org.apache.harmony.jndi.internal.nls.Messages"
] | import javax.naming.Name; import javax.naming.NamingException; import javax.naming.NotContextException; import javax.naming.OperationNotSupportedException; import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; import org.apache.harmony.jndi.internal.nls.Messages; | import javax.naming.*; import javax.naming.directory.*; import org.apache.harmony.jndi.internal.nls.*; | [
"javax.naming",
"org.apache.harmony"
] | javax.naming; org.apache.harmony; | 2,908,387 |
@Test
public void readTest2() throws Exception {
for (int k = MIN_LEN; k <= MAX_LEN; k += DELTA) {
for (CreateFilePOptions op : getOptionSet()) {
AlluxioURI uri = new AlluxioURI(sTestPath + "/file_" + k + "_" + op.hashCode());
FileInStream is = sFileSystem.openFile(uri, sReadNoCache);
... | void function() throws Exception { for (int k = MIN_LEN; k <= MAX_LEN; k += DELTA) { for (CreateFilePOptions op : getOptionSet()) { AlluxioURI uri = new AlluxioURI(sTestPath + STR + k + "_" + op.hashCode()); FileInStream is = sFileSystem.openFile(uri, sReadNoCache); byte[] ret = new byte[k]; Assert.assertEquals(k, is.r... | /**
* Tests {@link alluxio.client.block.LocalBlockInStream#read(byte[])}.
*/ | Tests <code>alluxio.client.block.LocalBlockInStream#read(byte[])</code> | readTest2 | {
"repo_name": "EvilMcJerkface/alluxio",
"path": "tests/src/test/java/alluxio/client/fs/LocalBlockInStreamIntegrationTest.java",
"license": "apache-2.0",
"size": 9427
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,281,369 |
public void cleanup()
{
// Close all open server sockets.
// We can only close these after all processing has been confirmed to be finished.
//
if (steps==null) return;
for (StepMetaDataCombi combi : steps) {
combi.step.cleanup();
}
}
| void function() { if (steps==null) return; for (StepMetaDataCombi combi : steps) { combi.step.cleanup(); } } | /**
* Call this method after the transformation has finished.
* Typically, after ALL the slave transformations in a clustered run have finished.
*/ | Call this method after the transformation has finished. Typically, after ALL the slave transformations in a clustered run have finished | cleanup | {
"repo_name": "dianhu/Kettle-Research",
"path": "src/org/pentaho/di/trans/Trans.java",
"license": "lgpl-2.1",
"size": 128383
} | [
"org.pentaho.di.trans.step.StepMetaDataCombi"
] | import org.pentaho.di.trans.step.StepMetaDataCombi; | import org.pentaho.di.trans.step.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 811,998 |
public void testNullContext()
{
Mock mock = mock(UIComponent.class);
UIComponent component = (UIComponent) mock.proxy();
MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
NumberConverter converter = getNumberConverter();
doTestNullContext(wrapper, converter);
} | void function() { Mock mock = mock(UIComponent.class); UIComponent component = (UIComponent) mock.proxy(); MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component); NumberConverter converter = getNumberConverter(); doTestNullContext(wrapper, converter); } | /**
* Test when context is set to null
*/ | Test when context is set to null | testNullContext | {
"repo_name": "adamrduffy/trinidad-1.0.x",
"path": "trinidad-api/src/test/java/org/apache/myfaces/trinidad/convert/NumberConverterTestCase.java",
"license": "apache-2.0",
"size": 18560
} | [
"javax.faces.component.UIComponent",
"javax.faces.convert.NumberConverter",
"org.apache.myfaces.trinidadbuild.test.MockUIComponentWrapper",
"org.jmock.Mock"
] | import javax.faces.component.UIComponent; import javax.faces.convert.NumberConverter; import org.apache.myfaces.trinidadbuild.test.MockUIComponentWrapper; import org.jmock.Mock; | import javax.faces.component.*; import javax.faces.convert.*; import org.apache.myfaces.trinidadbuild.test.*; import org.jmock.*; | [
"javax.faces",
"org.apache.myfaces",
"org.jmock"
] | javax.faces; org.apache.myfaces; org.jmock; | 1,997,311 |
public FritzahaContentExchange asyncPost(String path, String args, FritzAhaCallback callback) {
if (!isAuthenticated()) {
authenticate();
}
FritzahaContentExchange postExchange = new FritzahaContentExchange(callback);
asyncclient.newRequest(getURL(path)).timeout(config.ge... | FritzahaContentExchange function(String path, String args, FritzAhaCallback callback) { if (!isAuthenticated()) { authenticate(); } FritzahaContentExchange postExchange = new FritzahaContentExchange(callback); asyncclient.newRequest(getURL(path)).timeout(config.getAsyncTimeout(), TimeUnit.SECONDS).method(HttpMethod.POS... | /**
* Sends an HTTP POST request using the asynchronous client
*
* @param Path Path of the requested resource
* @param Args Arguments for the request
* @param Callback Callback to handle the response with
*/ | Sends an HTTP POST request using the asynchronous client | asyncPost | {
"repo_name": "mvolaart/openhab2-addons",
"path": "addons/binding/org.openhab.binding.avmfritz/src/main/java/org/openhab/binding/avmfritz/internal/hardware/FritzahaWebInterface.java",
"license": "epl-1.0",
"size": 12514
} | [
"java.util.concurrent.TimeUnit",
"org.eclipse.jetty.client.util.StringContentProvider",
"org.eclipse.jetty.http.HttpMethod",
"org.openhab.binding.avmfritz.internal.hardware.callbacks.FritzAhaCallback"
] | import java.util.concurrent.TimeUnit; import org.eclipse.jetty.client.util.StringContentProvider; import org.eclipse.jetty.http.HttpMethod; import org.openhab.binding.avmfritz.internal.hardware.callbacks.FritzAhaCallback; | import java.util.concurrent.*; import org.eclipse.jetty.client.util.*; import org.eclipse.jetty.http.*; import org.openhab.binding.avmfritz.internal.hardware.callbacks.*; | [
"java.util",
"org.eclipse.jetty",
"org.openhab.binding"
] | java.util; org.eclipse.jetty; org.openhab.binding; | 127,947 |
public static BigDecimal arcsin(BigDecimal value, MathContext mc) {
// Sin can give maximum value of 1. Thus arcsin cannot calculate values
// greater than 1.
if (value.abs().compareTo(BigDecimal.ONE) > 0) {
throw new IllegalArgumentException("Arcsin requires values lesser than equal to 1");
}
... | static BigDecimal function(BigDecimal value, MathContext mc) { if (value.abs().compareTo(BigDecimal.ONE) > 0) { throw new IllegalArgumentException(STR); } if (value.compareTo(BigDecimal.ZERO) < 0) { return arcsin(value.negate(), mc).negate(); } MathContext newMc = new MathContext(mc.getPrecision() + 3); if (value.compa... | /**
* Calculates the <code>arcsine</code> of the given value. The result is
* rounded according to the passed context <code>mc</code>.
*
* @param value
* the number whose arcsine is to be found.
* @param mc
* rounding mode and precision for the result of this operation.
* ... | Calculates the <code>arcsine</code> of the given value. The result is rounded according to the passed context <code>mc</code> | arcsin | {
"repo_name": "SayakMukhopadhyay/BigDecimalFunctions",
"path": "src/main/java/com/kodeblox/BigDecimalFunctions.java",
"license": "apache-2.0",
"size": 21549
} | [
"com.kodeblox.NumericalMethodsFunctions",
"java.math.BigDecimal",
"java.math.MathContext"
] | import com.kodeblox.NumericalMethodsFunctions; import java.math.BigDecimal; import java.math.MathContext; | import com.kodeblox.*; import java.math.*; | [
"com.kodeblox",
"java.math"
] | com.kodeblox; java.math; | 199,906 |
protected void paintColumnBasedSelection(final RenderContext rc) {
final GC gc = rc.getGC();
final Rectangle viewportArea = viewport.getViewportArea(gc);
final Row<T> lastRow = grid.getRows().isEmpty() ? null : grid.getRows().get(grid.getRows().size()-1);
boolean paintLeftEdge = false;
boolean paintRightEd... | void function(final RenderContext rc) { final GC gc = rc.getGC(); final Rectangle viewportArea = viewport.getViewportArea(gc); final Row<T> lastRow = grid.getRows().isEmpty() ? null : grid.getRows().get(grid.getRows().size()-1); boolean paintLeftEdge = false; boolean paintRightEdge = false; final boolean paintTopEdge =... | /**
* Paint a selection region in the column containing the anchor.
*/ | Paint a selection region in the column containing the anchor | paintColumnBasedSelection | {
"repo_name": "GrandmasterTash/jGrid",
"path": "com.notlob.jgrid/src/main/java/com/notlob/jgrid/renderer/SelectionRenderer.java",
"license": "apache-2.0",
"size": 10741
} | [
"com.notlob.jgrid.model.Column",
"com.notlob.jgrid.model.Row",
"org.eclipse.swt.graphics.Rectangle"
] | import com.notlob.jgrid.model.Column; import com.notlob.jgrid.model.Row; import org.eclipse.swt.graphics.Rectangle; | import com.notlob.jgrid.model.*; import org.eclipse.swt.graphics.*; | [
"com.notlob.jgrid",
"org.eclipse.swt"
] | com.notlob.jgrid; org.eclipse.swt; | 2,152,210 |
public void remove(String username) throws IOException {
directory.users().delete(getEmail(username)).execute();
} | void function(String username) throws IOException { directory.users().delete(getEmail(username)).execute(); } | /**
* Deletes a user.
*
* @param username Username without domain.
* @throws IOException
*/ | Deletes a user | remove | {
"repo_name": "google/account-provisioning-for-google-apps",
"path": "src/main/java/apps/provisioning/server/apis/GoogleDirectory.java",
"license": "apache-2.0",
"size": 6604
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 285,149 |
public String transmitIccLogicalChannel(int cla, int command, int channel,
int p1, int p2, int p3, String data) throws android.os.RemoteException {
if (EncapsulationConstant.USE_MTK_PLATFORM) {
return sTelephony.transmitIccLogicalChannel(cla, command, channel, p1, p2, p3, data);... | String function(int cla, int command, int channel, int p1, int p2, int p3, String data) throws android.os.RemoteException { if (EncapsulationConstant.USE_MTK_PLATFORM) { return sTelephony.transmitIccLogicalChannel(cla, command, channel, p1, p2, p3, data); } else { return null; } } | /**
* Returns the response APDU for a command APDU sent to a logical channel
*/ | Returns the response APDU for a command APDU sent to a logical channel | transmitIccLogicalChannel | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Mms/src/com/mediatek/encapsulation/com/android/internal/telephony/EncapsulatedTelephonyService.java",
"license": "gpl-2.0",
"size": 46897
} | [
"com.mediatek.encapsulation.EncapsulationConstant"
] | import com.mediatek.encapsulation.EncapsulationConstant; | import com.mediatek.encapsulation.*; | [
"com.mediatek.encapsulation"
] | com.mediatek.encapsulation; | 1,383,660 |
public void handleUpdate ( EstelaServer server, StatsMessage message ) {
debug.logApi("EstelaApiHandler, handleUpdate from " + server);
for ( EstelaProtocol.Broadcast b : message.getBroadcastList() ) {
Stats.getInstance().updateBroadcast(server, b);
debug.logApi("EstelaApiHandler, handleUpdate(), ... | void function ( EstelaServer server, StatsMessage message ) { debug.logApi(STR + server); for ( EstelaProtocol.Broadcast b : message.getBroadcastList() ) { Stats.getInstance().updateBroadcast(server, b); debug.logApi(STR + b.getUsername()); } } | /**
* updates a broadcast status (such as listeners)
* @param server the server firing the event
* @param message the message
*/ | updates a broadcast status (such as listeners) | handleUpdate | {
"repo_name": "dariorapisardi/estelaStats",
"path": "src/com/flipzu/stats/EstelaApiHandler.java",
"license": "apache-2.0",
"size": 7193
} | [
"com.flipzu.stats.EstelaProtocol"
] | import com.flipzu.stats.EstelaProtocol; | import com.flipzu.stats.*; | [
"com.flipzu.stats"
] | com.flipzu.stats; | 327,429 |
public static byte[] getHandshakeMessage(DataInputStream input){
Handshaker handshaker = new Handshaker();
//handshakeMsg[0] is the length of ptr
byte[] handshakeMsg = new byte[handshaker.HANDSHAKE_LENGTH];
try {
input.read(handshakeMsg);
RUBTClient.debugPrint("P... | static byte[] function(DataInputStream input){ Handshaker handshaker = new Handshaker(); byte[] handshakeMsg = new byte[handshaker.HANDSHAKE_LENGTH]; try { input.read(handshakeMsg); RUBTClient.debugPrint(STR+ Arrays.toString(handshakeMsg)); } catch(IOException e){ System.err.println(e); e.printStackTrace(); } return ha... | /**
* Gets a peer's handshake message from the input stream.
* @param input DataInputStream used to manage incoming information from the peer
* @return peer's handshake message
*/ | Gets a peer's handshake message from the input stream | getHandshakeMessage | {
"repo_name": "nsheim/RUBTClient",
"path": "Handshaker.java",
"license": "gpl-2.0",
"size": 6176
} | [
"java.io.DataInputStream",
"java.io.IOException",
"java.util.Arrays"
] | import java.io.DataInputStream; import java.io.IOException; import java.util.Arrays; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 449,073 |
public static final ParquetMetadata readFooter(Configuration configuration, Path file) throws IOException {
FileSystem fileSystem = file.getFileSystem(configuration);
return readFooter(configuration, fileSystem.getFileStatus(file));
} | static final ParquetMetadata function(Configuration configuration, Path file) throws IOException { FileSystem fileSystem = file.getFileSystem(configuration); return readFooter(configuration, fileSystem.getFileStatus(file)); } | /**
* Reads the meta data block in the footer of the file
* @param configuration
* @param file the parquet File
* @return the metadata blocks in the footer
* @throws IOException if an error occurs while reading the file
*/ | Reads the meta data block in the footer of the file | readFooter | {
"repo_name": "tomwhite/incubator-parquet-mr",
"path": "parquet-hadoop/src/main/java/parquet/hadoop/ParquetFileReader.java",
"license": "apache-2.0",
"size": 23919
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,362,724 |
private ImageIcon getImageIcon(int artifactTypeId) {
Color color = MapWaypoint.getColor(artifactTypeId);
BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
Graphics g = img.createGraphics();
g.setColor(color);
g.fillRect(0, 0,... | ImageIcon function(int artifactTypeId) { Color color = MapWaypoint.getColor(artifactTypeId); BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB); Graphics g = img.createGraphics(); g.setColor(color); g.fillRect(0, 0, 16, 16); g.dispose(); return new ImageIcon(img); } | /**
* Returns a new ImageIcon for the given artifact type ID representing
* the type's waypoint color
*
* @param artifactTypeId The artifact type id
*
* @return the ImageIcon
*/ | Returns a new ImageIcon for the given artifact type ID representing the type's waypoint color | getImageIcon | {
"repo_name": "sleuthkit/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/geolocation/GeoFilterPanel.java",
"license": "apache-2.0",
"size": 25825
} | [
"java.awt.Color",
"java.awt.Graphics",
"java.awt.image.BufferedImage",
"javax.swing.ImageIcon"
] | import java.awt.Color; import java.awt.Graphics; import java.awt.image.BufferedImage; import javax.swing.ImageIcon; | import java.awt.*; import java.awt.image.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 739,587 |
public void setTempporalOperators(Map<TimeOperator, ? extends Collection<QName>> temporalOperators) {
this.temporalOperators.clear();
if (temporalOperators != null) {
for (TimeOperator timeOperator : temporalOperators.keySet()) {
final TreeSet<QName> set = new TreeSet<QNa... | void function(Map<TimeOperator, ? extends Collection<QName>> temporalOperators) { this.temporalOperators.clear(); if (temporalOperators != null) { for (TimeOperator timeOperator : temporalOperators.keySet()) { final TreeSet<QName> set = new TreeSet<QName>(QNameComparator.INSTANCE); if (temporalOperators.get(timeOperato... | /**
* Set temporal operators
*
* @param temporalOperators
* temporal operators
*/ | Set temporal operators | setTempporalOperators | {
"repo_name": "ahuarte47/SOS",
"path": "core/api/src/main/java/org/n52/sos/ogc/filter/FilterCapabilities.java",
"license": "gpl-2.0",
"size": 7162
} | [
"java.util.Collection",
"java.util.Map",
"java.util.TreeSet",
"javax.xml.namespace.QName",
"org.n52.sos.ogc.filter.FilterConstants",
"org.n52.sos.util.QNameComparator"
] | import java.util.Collection; import java.util.Map; import java.util.TreeSet; import javax.xml.namespace.QName; import org.n52.sos.ogc.filter.FilterConstants; import org.n52.sos.util.QNameComparator; | import java.util.*; import javax.xml.namespace.*; import org.n52.sos.ogc.filter.*; import org.n52.sos.util.*; | [
"java.util",
"javax.xml",
"org.n52.sos"
] | java.util; javax.xml; org.n52.sos; | 2,131,808 |
public void unsetEntityProperties() {
GUIParentNode modelPropertiesListBoxInnerNode = (GUIParentNode)(entityPropertiesList.getScreenNode().getNodeById(entityPropertiesList.getId() + "_inner"));
modelPropertiesListBoxInnerNode.clearSubNodes();
entityPropertiesPresets.getController().setValue(value.set("none"));... | void function() { GUIParentNode modelPropertiesListBoxInnerNode = (GUIParentNode)(entityPropertiesList.getScreenNode().getNodeById(entityPropertiesList.getId() + STR)); modelPropertiesListBoxInnerNode.clearSubNodes(); entityPropertiesPresets.getController().setValue(value.set("none")); entityPropertiesPresets.getContro... | /**
* Unset entity properties
*/ | Unset entity properties | unsetEntityProperties | {
"repo_name": "andreasdr/tdme",
"path": "src/net/drewke/tdme/tools/shared/controller/EntityBaseSubScreenController.java",
"license": "mit",
"size": 12581
} | [
"net.drewke.tdme.gui.nodes.GUIParentNode"
] | import net.drewke.tdme.gui.nodes.GUIParentNode; | import net.drewke.tdme.gui.nodes.*; | [
"net.drewke.tdme"
] | net.drewke.tdme; | 675,019 |
@RequestMapping(value = "/transactionmetadata", method = RequestMethod.POST)
@ResponseBody
public TransactionMetaDataViewModel transactionmetadata(@RequestParam Map<String, String> requestParam) {
TransactionMetaDataViewModel viewModel = new TransactionMetaDataViewModel();
TransactionMetadat... | @RequestMapping(value = STR, method = RequestMethod.POST) TransactionMetaDataViewModel function(@RequestParam Map<String, String> requestParam) { TransactionMetaDataViewModel viewModel = new TransactionMetaDataViewModel(); TransactionMetadataQuery query = parseSelectTransaction(requestParam); if (query.size() > 0) { Li... | /**
* selected points from scatter chart data query
*
* @param requestParam
* @return
*/ | selected points from scatter chart data query | transactionmetadata | {
"repo_name": "jiaqifeng/pinpoint",
"path": "web/src/main/java/com/navercorp/pinpoint/web/controller/ScatterChartController.java",
"license": "apache-2.0",
"size": 10512
} | [
"com.navercorp.pinpoint.common.server.bo.SpanBo",
"com.navercorp.pinpoint.web.view.TransactionMetaDataViewModel",
"com.navercorp.pinpoint.web.vo.TransactionMetadataQuery",
"java.util.List",
"java.util.Map",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotatio... | import com.navercorp.pinpoint.common.server.bo.SpanBo; import com.navercorp.pinpoint.web.view.TransactionMetaDataViewModel; import com.navercorp.pinpoint.web.vo.TransactionMetadataQuery; import java.util.List; import java.util.Map; import org.springframework.web.bind.annotation.RequestMapping; import org.springframewor... | import com.navercorp.pinpoint.common.server.bo.*; import com.navercorp.pinpoint.web.view.*; import com.navercorp.pinpoint.web.vo.*; import java.util.*; import org.springframework.web.bind.annotation.*; | [
"com.navercorp.pinpoint",
"java.util",
"org.springframework.web"
] | com.navercorp.pinpoint; java.util; org.springframework.web; | 2,846,430 |
public void changedUpdate (DocumentEvent e, Shape a, ViewFactory f)
{
// Update children efficiently.
updateChildren(e, a);
} | void function (DocumentEvent e, Shape a, ViewFactory f) { updateChildren(e, a); } | /**
* Called when the portion of the Document that this View is responsible
* for changes. Overridden so that the view factory creates
* WrappedLine views.
*/ | Called when the portion of the Document that this View is responsible for changes. Overridden so that the view factory creates WrappedLine views | changedUpdate | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/swing/text/WrappedPlainView.java",
"license": "gpl-2.0",
"size": 25581
} | [
"java.awt.Shape",
"javax.swing.event.DocumentEvent"
] | import java.awt.Shape; import javax.swing.event.DocumentEvent; | import java.awt.*; import javax.swing.event.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 746,376 |
public void addName(org.ontoware.rdf2go.model.node.Node value) {
Base.add(this.model, this.getResource(), _NAME, value);
} | void function(org.ontoware.rdf2go.model.node.Node value) { Base.add(this.model, this.getResource(), _NAME, value); } | /**
* Adds a value to property Name as an RDF2Go node
*
* @param value
* the value to be added
*
* [Generated from RDFReactor template rule #add1dynamic]
*/ | Adds a value to property Name as an RDF2Go node | addName | {
"repo_name": "m0ep/master-thesis",
"path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java",
"license": "mit",
"size": 317844
} | [
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdfreactor"
] | org.ontoware.rdfreactor; | 1,083,815 |
private void initJtreeHelper() {
this.helper = new JTreeHelper((JTree)this.components.get(MainHelper.JTREE_COMPONENT), this.frame);
LoadingTreeObserver observer = new LoadingTreeObserver();
observer.setLoader((JProgressBar)this.components.get(MainHelper.JTREE_PROGRESS_COMPONENT));
th... | void function() { this.helper = new JTreeHelper((JTree)this.components.get(MainHelper.JTREE_COMPONENT), this.frame); LoadingTreeObserver observer = new LoadingTreeObserver(); observer.setLoader((JProgressBar)this.components.get(MainHelper.JTREE_PROGRESS_COMPONENT)); this.helper.addObserver(observer); this.helper.apply(... | /**
* Instantiate JTreeHelper and set dependencies
*/ | Instantiate JTreeHelper and set dependencies | initJtreeHelper | {
"repo_name": "adrian-tilita/ezDuplicateFileFinder",
"path": "src/layout/helper/MainHelper.java",
"license": "mit",
"size": 15551
} | [
"javax.swing.JProgressBar",
"javax.swing.JTree"
] | import javax.swing.JProgressBar; import javax.swing.JTree; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 390,226 |
public void deleteReportReviewComment(Report report, Integer commentId);
| void function(Report report, Integer commentId); | /**
* Will delete a review comment with commentId passed to the method.
*
* @param report the report
* @param commentId the comment id
*/ | Will delete a review comment with commentId passed to the method | deleteReportReviewComment | {
"repo_name": "NCIP/caaers",
"path": "caAERS/software/core/src/main/java/gov/nih/nci/cabig/caaers/domain/repository/AdverseEventRoutingAndReviewRepository.java",
"license": "bsd-3-clause",
"size": 8634
} | [
"gov.nih.nci.cabig.caaers.domain.report.Report"
] | import gov.nih.nci.cabig.caaers.domain.report.Report; | import gov.nih.nci.cabig.caaers.domain.report.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 1,071,313 |
protected void removeLedgerPendingEntries() {
LaborLedgerPendingEntryService laborLedgerPendingEntryService = SpringContext.getBean(LaborLedgerPendingEntryService.class);
laborLedgerPendingEntryService.delete(getDocumentHeader().getDocumentNumber());
} | void function() { LaborLedgerPendingEntryService laborLedgerPendingEntryService = SpringContext.getBean(LaborLedgerPendingEntryService.class); laborLedgerPendingEntryService.delete(getDocumentHeader().getDocumentNumber()); } | /**
* This method calls the service to remove all of the pending entries associated with this document
*/ | This method calls the service to remove all of the pending entries associated with this document | removeLedgerPendingEntries | {
"repo_name": "ua-eas/kfs-devops-automation-fork",
"path": "kfs-ld/src/main/java/org/kuali/kfs/module/ld/document/LaborJournalVoucherDocument.java",
"license": "agpl-3.0",
"size": 12355
} | [
"org.kuali.kfs.module.ld.service.LaborLedgerPendingEntryService",
"org.kuali.kfs.sys.context.SpringContext"
] | import org.kuali.kfs.module.ld.service.LaborLedgerPendingEntryService; import org.kuali.kfs.sys.context.SpringContext; | import org.kuali.kfs.module.ld.service.*; import org.kuali.kfs.sys.context.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,649,165 |
public Class<? extends OpenStegoConfig> getConfigClass()
{
return OpenStegoConfig.class;
}
| Class<? extends OpenStegoConfig> function() { return OpenStegoConfig.class; } | /**
* Method to get the configuration class specific to this plugin
*
* @return Configuration class specific to this plugin
*/ | Method to get the configuration class specific to this plugin | getConfigClass | {
"repo_name": "seglo/openstego",
"path": "src/net/sourceforge/openstego/plugin/template/image/WMImagePluginTemplate.java",
"license": "gpl-2.0",
"size": 5309
} | [
"net.sourceforge.openstego.OpenStegoConfig"
] | import net.sourceforge.openstego.OpenStegoConfig; | import net.sourceforge.openstego.*; | [
"net.sourceforge.openstego"
] | net.sourceforge.openstego; | 2,837,212 |
@JsonProperty("headers")
public Map<String,String> getHeaders() {
return headers;
} | @JsonProperty(STR) Map<String,String> function() { return headers; } | /**
* Get the email's headers. Headers added to the returned list
* will be included when sent.
* @return the email's headers.
*/ | Get the email's headers. Headers added to the returned list will be included when sent | getHeaders | {
"repo_name": "pushkyn/sendgrid-java",
"path": "src/main/java/com/sendgrid/helpers/mail/Mail.java",
"license": "mit",
"size": 15678
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"java.util.Map"
] | import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; | import com.fasterxml.jackson.annotation.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.util"
] | com.fasterxml.jackson; java.util; | 169,922 |
void insertElementWithText ( QName name, String text ); | void insertElementWithText ( QName name, String text ); | /**
* Inserts a new element immediately before this cursor's location, giving the
* element the specified qualified name and content.
*
* @param name The qualified name for the new element.
* @param text The content for the new element.
* @throws java.lang.IllegalArgumentException If... | Inserts a new element immediately before this cursor's location, giving the element the specified qualified name and content | insertElementWithText | {
"repo_name": "crow-misia/xmlbeans",
"path": "src/xmlpublic/org/apache/xmlbeans/XmlCursor.java",
"license": "apache-2.0",
"size": 69754
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 1,291,121 |
int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate); | int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate); | /**
* Add energy to an IEnergyReceiver, internal distribution is left entirely to the IEnergyReceiver.
*
* @param from
* Orientation the energy is received from.
* @param maxReceive
* Maximum amount of energy to receive.
* @param simulate
* If TRUE, the charge will only ... | Add energy to an IEnergyReceiver, internal distribution is left entirely to the IEnergyReceiver | receiveEnergy | {
"repo_name": "Ratismal/PowerConverter",
"path": "src/main/java/cofh/api/energy/IEnergyReceiver.java",
"license": "mit",
"size": 1126
} | [
"net.minecraftforge.common.util.ForgeDirection"
] | import net.minecraftforge.common.util.ForgeDirection; | import net.minecraftforge.common.util.*; | [
"net.minecraftforge.common"
] | net.minecraftforge.common; | 308,691 |
@Override
public HFileBlock readBlockData(long offset, long onDiskSizeWithHeaderL,
int uncompressedSize, boolean pread)
throws IOException {
// get a copy of the current state of whether to validate
// hbase checksums or not for this read call. This is not
// thread-safe but the o... | HFileBlock function(long offset, long onDiskSizeWithHeaderL, int uncompressedSize, boolean pread) throws IOException { boolean doVerificationThruHBaseChecksum = streamWrapper.shouldUseHBaseChecksum(); FSDataInputStream is = streamWrapper.getStream(doVerificationThruHBaseChecksum); HFileBlock blk = readBlockDataInternal... | /**
* Reads a version 2 block (version 1 blocks not supported and not expected). Tries to do as
* little memory allocation as possible, using the provided on-disk size.
*
* @param offset the offset in the stream to read at
* @param onDiskSizeWithHeaderL the on-disk size of the block, including
... | Reads a version 2 block (version 1 blocks not supported and not expected). Tries to do as little memory allocation as possible, using the provided on-disk size | readBlockData | {
"repo_name": "ibmsoe/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java",
"license": "apache-2.0",
"size": 75175
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FSDataInputStream"
] | import java.io.IOException; import org.apache.hadoop.fs.FSDataInputStream; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,550,613 |
public boolean hasAccessToKey(String aclName, UserGroupInformation ugi,
KeyOpType opType); | boolean function(String aclName, UserGroupInformation ugi, KeyOpType opType); | /**
* This is called by the KeyProvider to check if the given user is
* authorized to perform the specified operation on the given acl name.
* @param aclName name of the key ACL
* @param ugi User's UserGroupInformation
* @param opType Operation Type
* @return true if user has access to th... | This is called by the KeyProvider to check if the given user is authorized to perform the specified operation on the given acl name | hasAccessToKey | {
"repo_name": "Reidddddd/mo-hadoop2.6.0",
"path": "hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KeyAuthorizationKeyProvider.java",
"license": "apache-2.0",
"size": 9962
} | [
"org.apache.hadoop.security.UserGroupInformation"
] | import org.apache.hadoop.security.UserGroupInformation; | import org.apache.hadoop.security.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,743,392 |
@Test(timeout=1000)
public void testPeerDiscoveryWithModuleModifications() {
new PeerDiscoveryWithModuleModificationsTest().start();
}
static class PeerDiscoveryWithModuleModificationsTest {
LocalPeer localPeer1;
LocalPeer localPeer2;
| @Test(timeout=1000) void function() { new PeerDiscoveryWithModuleModificationsTest().start(); } static class PeerDiscoveryWithModuleModificationsTest { LocalPeer localPeer1; LocalPeer localPeer2; | /**
* Tests whether adding/removing modules affects peer discovery correctly
* */ | Tests whether adding/removing modules affects peer discovery correctly | testPeerDiscoveryWithModuleModifications | {
"repo_name": "ls1intum/jReto",
"path": "Source/test/jReto/integration/DiscoveryTest.java",
"license": "mit",
"size": 7703
} | [
"de.tum.in.www1.jReto.LocalPeer",
"org.junit.Test"
] | import de.tum.in.www1.jReto.LocalPeer; import org.junit.Test; | import de.tum.in.www1.*; import org.junit.*; | [
"de.tum.in",
"org.junit"
] | de.tum.in; org.junit; | 2,805,198 |
public Future<List<generated.classic.reactive.dataobject.tables.pojos.Something>> findManyBySomedecimal(Collection<BigDecimal> values, int limit) {
return findManyByCondition(Something.SOMETHING.SOMEDECIMAL.in(values),limit);
} | Future<List<generated.classic.reactive.dataobject.tables.pojos.Something>> function(Collection<BigDecimal> values, int limit) { return findManyByCondition(Something.SOMETHING.SOMEDECIMAL.in(values),limit); } | /**
* Find records that have <code>someDecimal IN (values)</code>
* asynchronously limited by the given limit
*/ | Find records that have <code>someDecimal IN (values)</code> asynchronously limited by the given limit | findManyBySomedecimal | {
"repo_name": "jklingsporn/vertx-jooq",
"path": "vertx-jooq-generate/src/test/java/generated/classic/reactive/dataobject/tables/daos/SomethingDao.java",
"license": "mit",
"size": 15579
} | [
"io.vertx.core.Future",
"java.math.BigDecimal",
"java.util.Collection",
"java.util.List"
] | import io.vertx.core.Future; import java.math.BigDecimal; import java.util.Collection; import java.util.List; | import io.vertx.core.*; import java.math.*; import java.util.*; | [
"io.vertx.core",
"java.math",
"java.util"
] | io.vertx.core; java.math; java.util; | 1,164,557 |
public void validate() throws ValidationException {
super.validate();
HashMap<String, ImageModule> imagemap = buildImageNameImageMap();
validateThatAllParametersExist(imagemap);
validateAllInputsHaveMappingOutputs(imagemap);
for (Node n : getNodes().values()) {
n.validate();
}
} | void function() throws ValidationException { super.validate(); HashMap<String, ImageModule> imagemap = buildImageNameImageMap(); validateThatAllParametersExist(imagemap); validateAllInputsHaveMappingOutputs(imagemap); for (Node n : getNodes().values()) { n.validate(); } } | /**
* Validates the integrity of the object. For example, checks that the
* mapping for deployment instances is complete and no input parameter is
* left unresolved.
*
* @throws ValidationException
*/ | Validates the integrity of the object. For example, checks that the mapping for deployment instances is complete and no input parameter is left unresolved | validate | {
"repo_name": "slipstream/SlipStreamServer",
"path": "jar-persistence/src/main/java/com/sixsq/slipstream/persistence/DeploymentModule.java",
"license": "apache-2.0",
"size": 8566
} | [
"com.sixsq.slipstream.exceptions.ValidationException",
"java.util.HashMap"
] | import com.sixsq.slipstream.exceptions.ValidationException; import java.util.HashMap; | import com.sixsq.slipstream.exceptions.*; import java.util.*; | [
"com.sixsq.slipstream",
"java.util"
] | com.sixsq.slipstream; java.util; | 1,701,648 |
private boolean hasUnfilteredResources(Viewer viewer, IPackageFragment pkg) throws JavaModelException {
Object[] resources= pkg.getNonJavaResources();
int length= resources.length;
if (length == 0)
return false;
if (!(viewer instanceof StructuredViewer))
return true;
ViewerFilter[] filters= ((Struc... | boolean function(Viewer viewer, IPackageFragment pkg) throws JavaModelException { Object[] resources= pkg.getNonJavaResources(); int length= resources.length; if (length == 0) return false; if (!(viewer instanceof StructuredViewer)) return true; ViewerFilter[] filters= ((StructuredViewer)viewer).getFilters(); resourceL... | /**
* Tells whether the given package has unfiltered resources.
*
* @param viewer the viewer
* @param pkg the package
* @return <code>true</code> if the package has unfiltered resources
* @throws JavaModelException if this element does not exist or if an exception occurs while
* accessing its ... | Tells whether the given package has unfiltered resources | hasUnfilteredResources | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/ui/filters/EmptyPackageFilter.java",
"license": "mit",
"size": 2349
} | [
"org.eclipse.jdt.core.IPackageFragment",
"org.eclipse.jdt.core.JavaModelException",
"org.eclipse.jface.viewers.StructuredViewer",
"org.eclipse.jface.viewers.Viewer",
"org.eclipse.jface.viewers.ViewerFilter"
] | import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; | import org.eclipse.jdt.core.*; import org.eclipse.jface.viewers.*; | [
"org.eclipse.jdt",
"org.eclipse.jface"
] | org.eclipse.jdt; org.eclipse.jface; | 137,679 |
private void updateFileInfo(final String fileName, final long fileSize, final int fileType) {
mFileNameView.setText(fileName);
switch (fileType) {
case DfuService.TYPE_AUTO:
mFileTypeView.setText(getResources().getStringArray(R.array.dfu_file_type)[0]);
break;
case DfuService.TYPE_SOFT_DEVICE:
... | void function(final String fileName, final long fileSize, final int fileType) { mFileNameView.setText(fileName); switch (fileType) { case DfuService.TYPE_AUTO: mFileTypeView.setText(getResources().getStringArray(R.array.dfu_file_type)[0]); break; case DfuService.TYPE_SOFT_DEVICE: mFileTypeView.setText(getResources().ge... | /**
* Updates the file information on UI
*
* @param fileName
* file name
* @param fileSize
* file length
*/ | Updates the file information on UI | updateFileInfo | {
"repo_name": "NordicSemiconductor/Android-nRF-Beacon",
"path": "app/src/main/java/no/nordicsemi/android/nrfbeacon/dfu/DfuFragment.java",
"license": "bsd-3-clause",
"size": 31737
} | [
"android.webkit.MimeTypeMap",
"no.nordicsemi.android.nrfbeacon.dfu.service.DfuService"
] | import android.webkit.MimeTypeMap; import no.nordicsemi.android.nrfbeacon.dfu.service.DfuService; | import android.webkit.*; import no.nordicsemi.android.nrfbeacon.dfu.service.*; | [
"android.webkit",
"no.nordicsemi.android"
] | android.webkit; no.nordicsemi.android; | 2,029,628 |
public static Collection collect(Object self) {
return collect(self, Closure.IDENTITY);
} | static Collection function(Object self) { return collect(self, Closure.IDENTITY); } | /**
* Iterates through this aggregate Object transforming each item into a new value using Closure.IDENTITY
* as a transformer, basically returning a list of items copied from the original object.
* <pre class="groovyTestCase">assert [1,2,3] == [1,2,3].iterator().collect()</pre>
*
* @param self... | Iterates through this aggregate Object transforming each item into a new value using Closure.IDENTITY as a transformer, basically returning a list of items copied from the original object. assert [1,2,3] == [1,2,3].iterator().collect()</code> | collect | {
"repo_name": "mv2a/yajsw",
"path": "src/groovy-patch/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "apache-2.0",
"size": 704164
} | [
"groovy.lang.Closure",
"java.util.Collection"
] | import groovy.lang.Closure; import java.util.Collection; | import groovy.lang.*; import java.util.*; | [
"groovy.lang",
"java.util"
] | groovy.lang; java.util; | 1,565,407 |
protected void close(Connection connection, Statement statement, ResultSet resultSet)
{
// Close the result set if it exists.
try
{
if (resultSet != null)
{
resultSet.close();
}
}
... | void function(Connection connection, Statement statement, ResultSet resultSet) { try { if (resultSet != null) { resultSet.close(); } } catch (SQLException ex) { LOGGER.error(STR, ex); } try { if (statement != null) { statement.close(); } } catch (SQLException ex) { LOGGER.error(STR, ex); } try { if (connection != null)... | /**
* Close the specified database objects. Avoid closing if null and hide any SQLExceptions that occur.
*
* @param connection The database connection to close
* @param statement The statement to close
* @param resultSet the result set to close
*/ | Close the specified database objects. Avoid closing if null and hide any SQLExceptions that occur | close | {
"repo_name": "FINRAOS/herd",
"path": "herd-code/herd-dao/src/main/java/org/finra/herd/dao/Log4jOverridableConfigurer.java",
"license": "apache-2.0",
"size": 35194
} | [
"java.nio.file.Path",
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement"
] | import java.nio.file.Path; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; | import java.nio.file.*; import java.sql.*; | [
"java.nio",
"java.sql"
] | java.nio; java.sql; | 1,911,006 |
public IJavaScriptModelStatus verify() {
IJavaScriptModelStatus status = super.verify();
if (!status.isOK()) {
return status;
}
IJavaScriptProject project = getParentElement().getJavaScriptProject();
if (JavaScriptConventions.validateImportDeclaration(this.importName, project.getOption(JavaScriptCore.COMPILER_SO... | IJavaScriptModelStatus function() { IJavaScriptModelStatus status = super.verify(); if (!status.isOK()) { return status; } IJavaScriptProject project = getParentElement().getJavaScriptProject(); if (JavaScriptConventions.validateImportDeclaration(this.importName, project.getOption(JavaScriptCore.COMPILER_SOURCE, true),... | /**
* Possible failures: <ul>
* <li>NO_ELEMENTS_TO_PROCESS - the compilation unit supplied to the operation is
* <code>null</code>.
* <li>INVALID_NAME - not a valid import declaration name.
* </ul>
* @see IJavaScriptModelStatus
* @see JavaScriptConventions
*/ | Possible failures: NO_ELEMENTS_TO_PROCESS - the compilation unit supplied to the operation is <code>null</code>. INVALID_NAME - not a valid import declaration name. | verify | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/core/CreateImportOperation.java",
"license": "epl-1.0",
"size": 6657
} | [
"org.eclipse.core.runtime.IStatus",
"org.eclipse.wst.jsdt.core.IJavaScriptModelStatus",
"org.eclipse.wst.jsdt.core.IJavaScriptModelStatusConstants",
"org.eclipse.wst.jsdt.core.IJavaScriptProject",
"org.eclipse.wst.jsdt.core.JavaScriptConventions",
"org.eclipse.wst.jsdt.core.JavaScriptCore"
] | import org.eclipse.core.runtime.IStatus; import org.eclipse.wst.jsdt.core.IJavaScriptModelStatus; import org.eclipse.wst.jsdt.core.IJavaScriptModelStatusConstants; import org.eclipse.wst.jsdt.core.IJavaScriptProject; import org.eclipse.wst.jsdt.core.JavaScriptConventions; import org.eclipse.wst.jsdt.core.JavaScriptCore... | import org.eclipse.core.runtime.*; import org.eclipse.wst.jsdt.core.*; | [
"org.eclipse.core",
"org.eclipse.wst"
] | org.eclipse.core; org.eclipse.wst; | 882,656 |
@SideOnly(Side.CLIENT)
public static boolean jsonObjectFieldTypeIsString(JsonObject p_151205_0_, String p_151205_1_)
{
return !jsonObjectFieldTypeIsPrimitive(p_151205_0_, p_151205_1_) ? false : p_151205_0_.getAsJsonPrimitive(p_151205_1_).isString();
} | @SideOnly(Side.CLIENT) static boolean function(JsonObject p_151205_0_, String p_151205_1_) { return !jsonObjectFieldTypeIsPrimitive(p_151205_0_, p_151205_1_) ? false : p_151205_0_.getAsJsonPrimitive(p_151205_1_).isString(); } | /**
* Does the given JsonObject contain a string field with the given name?
*/ | Does the given JsonObject contain a string field with the given name | jsonObjectFieldTypeIsString | {
"repo_name": "CheeseL0ver/Ore-TTM",
"path": "build/tmp/recompSrc/net/minecraft/util/JsonUtils.java",
"license": "lgpl-2.1",
"size": 13817
} | [
"com.google.gson.JsonObject"
] | import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 1,665,771 |
EReference getDefineVariable_Expression(); | EReference getDefineVariable_Expression(); | /**
* Returns the meta object for the containment reference '{@link org.eclectic.frontend.core.DefineVariable#getExpression <em>Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Expression</em>'.
* @see org.eclectic.frontend.core.... | Returns the meta object for the containment reference '<code>org.eclectic.frontend.core.DefineVariable#getExpression Expression</code>'. | getDefineVariable_Expression | {
"repo_name": "jesusc/eclectic",
"path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/core/CorePackage.java",
"license": "gpl-3.0",
"size": 187193
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,635,881 |
@Test
public void testTargetRequired() throws Exception {
VerbDefinition definition = mapper.readValue(VerbDefinitionFilterTest.class.getResourceAsStream("/targetrequired.json"), VerbDefinition.class);
VerbDefinitionKeepFilter filter = new VerbDefinitionKeepFilter(Stream.of(definition).collect(C... | void function() throws Exception { VerbDefinition definition = mapper.readValue(VerbDefinitionFilterTest.class.getResourceAsStream(STR), VerbDefinition.class); VerbDefinitionKeepFilter filter = new VerbDefinitionKeepFilter(Stream.of(definition).collect(Collectors.toSet())); filter.prepare(null); StreamsDatum datum1 = n... | /**
* Test targetRequired
*/ | Test targetRequired | testTargetRequired | {
"repo_name": "apache/streams",
"path": "streams-components/streams-filters/src/test/java/org/apache/streams/filters/test/VerbDefinitionFilterTest.java",
"license": "apache-2.0",
"size": 16229
} | [
"java.util.List",
"java.util.stream.Collectors",
"java.util.stream.Stream",
"org.apache.streams.core.StreamsDatum",
"org.apache.streams.filters.VerbDefinitionKeepFilter",
"org.apache.streams.pojo.json.Activity",
"org.apache.streams.verbs.VerbDefinition"
] | import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.streams.core.StreamsDatum; import org.apache.streams.filters.VerbDefinitionKeepFilter; import org.apache.streams.pojo.json.Activity; import org.apache.streams.verbs.VerbDefinition; | import java.util.*; import java.util.stream.*; import org.apache.streams.core.*; import org.apache.streams.filters.*; import org.apache.streams.pojo.json.*; import org.apache.streams.verbs.*; | [
"java.util",
"org.apache.streams"
] | java.util; org.apache.streams; | 1,546,247 |
public ServiceFuture<List<WorkspaceCollectionInner>> listBySubscriptionAsync(final ServiceCallback<List<WorkspaceCollectionInner>> serviceCallback) {
return ServiceFuture.fromResponse(listBySubscriptionWithServiceResponseAsync(), serviceCallback);
} | ServiceFuture<List<WorkspaceCollectionInner>> function(final ServiceCallback<List<WorkspaceCollectionInner>> serviceCallback) { return ServiceFuture.fromResponse(listBySubscriptionWithServiceResponseAsync(), serviceCallback); } | /**
* Retrieves all existing Power BI workspace collections in the specified subscription.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFutu... | Retrieves all existing Power BI workspace collections in the specified subscription | listBySubscriptionAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-powerbi/src/main/java/com/microsoft/azure/management/powerbi/implementation/WorkspaceCollectionsInner.java",
"license": "mit",
"size": 74152
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.List"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,389,249 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.