method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void testAxis2705() throws Exception { InputStream in = TestSOAPFault.class.getResourceAsStream("AXIS-2705.xml"); try { MessageFactory msgFactory = MessageFactory.newInstance(); SOAPMessage msg = msgFactory.createMessage(null, in); SOAPBody body = msg.getSO...
void function() throws Exception { InputStream in = TestSOAPFault.class.getResourceAsStream(STR); try { MessageFactory msgFactory = MessageFactory.newInstance(); SOAPMessage msg = msgFactory.createMessage(null, in); SOAPBody body = msg.getSOAPPart().getEnvelope().getBody(); assertTrue(body.hasFault()); SOAPFault fault ...
/** * Regression test for AXIS-2705. The issue occurs when a SOAP fault has a detail element * containing text (and not elements). Note that such a SOAP fault violates the SOAP spec, but * Axis should nevertheless be able to process it. * * @throws Exception */
Regression test for AXIS-2705. The issue occurs when a SOAP fault has a detail element containing text (and not elements). Note that such a SOAP fault violates the SOAP spec, but Axis should nevertheless be able to process it
testAxis2705
{ "repo_name": "apache/axis1-java", "path": "axis-rt-core/src/test/java/test/message/TestSOAPFault.java", "license": "apache-2.0", "size": 3083 }
[ "java.io.InputStream", "javax.xml.soap.MessageFactory", "javax.xml.soap.SOAPBody", "javax.xml.soap.SOAPFault", "javax.xml.soap.SOAPMessage", "org.apache.axis.AxisFault", "org.w3c.dom.Element" ]
import java.io.InputStream; import javax.xml.soap.MessageFactory; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPFault; import javax.xml.soap.SOAPMessage; import org.apache.axis.AxisFault; import org.w3c.dom.Element;
import java.io.*; import javax.xml.soap.*; import org.apache.axis.*; import org.w3c.dom.*;
[ "java.io", "javax.xml", "org.apache.axis", "org.w3c.dom" ]
java.io; javax.xml; org.apache.axis; org.w3c.dom;
1,289,357
void addIncomingMessage(IncomingMessage incomingMessage) { if (incomingMessage != null) { this.incomingMessageQueue.add(incomingMessage); } }
void addIncomingMessage(IncomingMessage incomingMessage) { if (incomingMessage != null) { this.incomingMessageQueue.add(incomingMessage); } }
/** * Callback from the grizzly server filter when a new message has arrived * * @param incomingMessage */
Callback from the grizzly server filter when a new message has arrived
addIncomingMessage
{ "repo_name": "antonwestman/mazela", "path": "mazela-network/mazela-network-server/src/main/java/se/mejsla/camp/mazela/network/server/grizzly/GrizzlyNetworkServer.java", "license": "apache-2.0", "size": 10381 }
[ "se.mejsla.camp.mazela.network.server.IncomingMessage" ]
import se.mejsla.camp.mazela.network.server.IncomingMessage;
import se.mejsla.camp.mazela.network.server.*;
[ "se.mejsla.camp" ]
se.mejsla.camp;
1,861,261
@Nullable public static <T extends MediationSettings> T getGlobalMediationSettings(@NonNull final Class<T> clazz) { if (sInstance == null) { logErrorNotInitialized(); return null; } for (final MediationSettings mediationSettings : sInstance.mGlobalMediationSettin...
static <T extends MediationSettings> T function(@NonNull final Class<T> clazz) { if (sInstance == null) { logErrorNotInitialized(); return null; } for (final MediationSettings mediationSettings : sInstance.mGlobalMediationSettings) { if (clazz.equals(mediationSettings.getClass())) { return clazz.cast(mediationSettings)...
/** * Returns a global {@link MediationSettings} object of the type 'clazz', if one is registered. * This method will only return an object if its type is identical to 'clazz', not if it is a * subtype. * * @param clazz the exact Class of the {@link MediationSettings} instance to retrieve ...
Returns a global <code>MediationSettings</code> object of the type 'clazz', if one is registered. This method will only return an object if its type is identical to 'clazz', not if it is a subtype
getGlobalMediationSettings
{ "repo_name": "ieliwb/Cocos-Helper", "path": "External Cocos Helper Android Frameworks/Libs/MoPub/mopub-sdk/src/main/java/com/mopub/mobileads/MoPubRewardedVideoManager.java", "license": "mit", "size": 21562 }
[ "android.support.annotation.NonNull", "com.mopub.common.MediationSettings" ]
import android.support.annotation.NonNull; import com.mopub.common.MediationSettings;
import android.support.annotation.*; import com.mopub.common.*;
[ "android.support", "com.mopub.common" ]
android.support; com.mopub.common;
235,961
public static <K1, K2> AsyncAtomicCounterMap<K1> newTranscodingAtomicCounterMap(AsyncAtomicCounterMap<K2> map, Function<K1, K2> keyEncoder, Function<K2, K1> keyDecoder) { return new TranscodingAsyncAtomicCounterMap<>(map, keyEncoder, keyDecoder); }
static <K1, K2> AsyncAtomicCounterMap<K1> function(AsyncAtomicCounterMap<K2> map, Function<K1, K2> keyEncoder, Function<K2, K1> keyDecoder) { return new TranscodingAsyncAtomicCounterMap<>(map, keyEncoder, keyDecoder); }
/** * Creates an instance of {@code AsyncAtomicCounterMap} that transforms key types. * * @param map backing map * @param keyEncoder transformer for key type of returned map to key type of input map * @param keyDecoder transformer for key type of input map to key type of returned map * @pa...
Creates an instance of AsyncAtomicCounterMap that transforms key types
newTranscodingAtomicCounterMap
{ "repo_name": "sdnwiselab/onos", "path": "core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/DistributedPrimitives.java", "license": "apache-2.0", "size": 7463 }
[ "java.util.function.Function", "org.onosproject.store.service.AsyncAtomicCounterMap" ]
import java.util.function.Function; import org.onosproject.store.service.AsyncAtomicCounterMap;
import java.util.function.*; import org.onosproject.store.service.*;
[ "java.util", "org.onosproject.store" ]
java.util; org.onosproject.store;
189,002
private int getCostPerItemHint(final int t) { switch (t) { case DataProvider.TYPE_CALL: return R.string.units_cost_per_call; case DataProvider.TYPE_MIXED: return R.string.units_cost_per_unit; case DataProvider.TYPE_MMS: case Dat...
int function(final int t) { switch (t) { case DataProvider.TYPE_CALL: return R.string.units_cost_per_call; case DataProvider.TYPE_MIXED: return R.string.units_cost_per_unit; case DataProvider.TYPE_MMS: case DataProvider.TYPE_SMS: return R.string.units_cost_per_message; default: return -1; } }
/** * Get hint for COST_PER_ITEM preference. * * @param t type * @return res id */
Get hint for COST_PER_ITEM preference
getCostPerItemHint
{ "repo_name": "xerosanyam/callmeter", "path": "CallMeter3G/src/main/java/de/ub0r/android/callmeter/ui/prefs/PlanEdit.java", "license": "gpl-3.0", "size": 24704 }
[ "de.ub0r.android.callmeter.data.DataProvider" ]
import de.ub0r.android.callmeter.data.DataProvider;
import de.ub0r.android.callmeter.data.*;
[ "de.ub0r.android" ]
de.ub0r.android;
1,365,344
default void readHeader(DataInputStream in) throws IOException { }
default void readHeader(DataInputStream in) throws IOException { }
/** * Provides the SerDe the opportunity to read header information before deserializing any records * * @param in the InputStream to read from * @throws IOException if unable to read from the InputStream */
Provides the SerDe the opportunity to read header information before deserializing any records
readHeader
{ "repo_name": "WilliamNouet/nifi", "path": "nifi-commons/nifi-write-ahead-log/src/main/java/org/wali/SerDe.java", "license": "apache-2.0", "size": 5327 }
[ "java.io.DataInputStream", "java.io.IOException" ]
import java.io.DataInputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,863,865
CamelEvent createExchangeSendingEvent(Exchange exchange, Endpoint endpoint);
CamelEvent createExchangeSendingEvent(Exchange exchange, Endpoint endpoint);
/** * Creates an {@link CamelEvent} when an {@link org.apache.camel.Exchange} is about to be sent to the endpoint (eg * before). * * @param exchange the exchange * @param endpoint the destination * @return the created event */
Creates an <code>CamelEvent</code> when an <code>org.apache.camel.Exchange</code> is about to be sent to the endpoint (eg before)
createExchangeSendingEvent
{ "repo_name": "adessaigne/camel", "path": "core/camel-api/src/main/java/org/apache/camel/spi/EventFactory.java", "license": "apache-2.0", "size": 11875 }
[ "org.apache.camel.Endpoint", "org.apache.camel.Exchange" ]
import org.apache.camel.Endpoint; import org.apache.camel.Exchange;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,653,535
public static TraceTokenScope addTraceTokenProperties(String... properties) { TokenState tokenState = token.get(); if (tokenState == null) { return new TraceTokenScope(null); } Map<String, String> map = new LinkedHashMap<>(tokenState.getToken()); checkArgum...
static TraceTokenScope function(String... properties) { TokenState tokenState = token.get(); if (tokenState == null) { return new TraceTokenScope(null); } Map<String, String> map = new LinkedHashMap<>(tokenState.getToken()); checkArgument((properties.length % 2) == 0, STR); for (int i = 0; i < properties.length; i += 2...
/** * Add properties to the current thread's trace token. If there is * currently no trace token, does nothing. * * @param properties Properties to add or replace. * @return a {@link TraceTokenScope} which may be used to restore the thread's * previous set of properties. */
Add properties to the current thread's trace token. If there is currently no trace token, does nothing
addTraceTokenProperties
{ "repo_name": "gwittel/platform", "path": "trace-token/src/main/java/com/proofpoint/tracetoken/TraceTokenManager.java", "license": "apache-2.0", "size": 6347 }
[ "com.google.common.base.Preconditions", "java.util.LinkedHashMap", "java.util.Map", "java.util.Objects" ]
import com.google.common.base.Preconditions; import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,138,375
Map<String, String> getTriggerParameters();
Map<String, String> getTriggerParameters();
/** * Returns the value of the '<em><b>Trigger Parameters</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Trigger Parameters</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<e...
Returns the value of the 'Trigger Parameters' attribute. If the meaning of the 'Trigger Parameters' attribute isn't clear, there really should be more of a description here...
getTriggerParameters
{ "repo_name": "elexis/elexis-3-core", "path": "bundles/ch.elexis.core.tasks/src-gen/ch/elexis/core/tasks/model/ITaskDescriptor.java", "license": "epl-1.0", "size": 15111 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
703,768
@Test public void testDate() throws Exception { long time = System.currentTimeMillis(); checkTwoValues(new Date(time), new Date(time + 100)); }
void function() throws Exception { long time = System.currentTimeMillis(); checkTwoValues(new Date(time), new Date(time + 100)); }
/** * Test date fields. * * @throws Exception If failed. */
Test date fields
testDate
{ "repo_name": "shroman/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java", "license": "apache-2.0", "size": 18267 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,413,618
public Builder addSourceBuilder(final com.arpnetworking.commons.builder.Builder<? extends JsonNodeSource> value) { if (_sourceBuilders == null) { _sourceBuilders = Lists.newArrayList(); } _sourceBuilders.add(value); return self(); }
Builder function(final com.arpnetworking.commons.builder.Builder<? extends JsonNodeSource> value) { if (_sourceBuilders == null) { _sourceBuilders = Lists.newArrayList(); } _sourceBuilders.add(value); return self(); }
/** * Add a {@link JsonNodeSource} {@link Builder} instance. * * @param value The {@link JsonNodeSource} {@link Builder} instance. * @return This {@link Builder} instance. */
Add a <code>JsonNodeSource</code> <code>Builder</code> instance
addSourceBuilder
{ "repo_name": "ArpNetworking/metrics-aggregator-daemon", "path": "src/main/java/com/arpnetworking/configuration/jackson/DynamicConfiguration.java", "license": "apache-2.0", "size": 13705 }
[ "com.google.common.collect.Lists" ]
import com.google.common.collect.Lists;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
967,725
public void destroy() { getServletContext().log("Closing WebApplicationContext of Struts ActionServlet '" + getServletName() + "', module '" + getModulePrefix() + "'"); if (getWebApplicationContext() instanceof ConfigurableApplicationContext) { ((ConfigurableApplicationContext) getWebApplicationContext())...
void function() { getServletContext().log(STR + getServletName() + STR + getModulePrefix() + "'"); if (getWebApplicationContext() instanceof ConfigurableApplicationContext) { ((ConfigurableApplicationContext) getWebApplicationContext()).close(); } }
/** * Close the WebApplicationContext of the ActionServlet. * @see org.springframework.context.ConfigurableApplicationContext#close() */
Close the WebApplicationContext of the ActionServlet
destroy
{ "repo_name": "Gert-Jan1966/spring-struts-forwardport", "path": "spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java", "license": "apache-2.0", "size": 15271 }
[ "org.springframework.context.ConfigurableApplicationContext" ]
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.*;
[ "org.springframework.context" ]
org.springframework.context;
2,492,524
public static java.util.List extractQuestionAnswerTypeList(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.QuestionAnswerTypeVoCollection voCollection) { return extractQuestionAnswerTypeList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.QuestionAnswerTypeVoCollection voCollection) { return extractQuestionAnswerTypeList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.core.clinical.domain.objects.QuestionAnswerType list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.core.clinical.domain.objects.QuestionAnswerType list from the value object collection
extractQuestionAnswerTypeList
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/QuestionAnswerTypeVoAssembler.java", "license": "agpl-3.0", "size": 20389 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
963,614
@Test public void testAppend() throws IOException { long timeStamp = 111111; MutationProto.Builder mutateBuilder = MutationProto.newBuilder(); mutateBuilder.setRow(ByteString.copyFromUtf8("row")); mutateBuilder.setMutateType(MutationType.APPEND); mutateBuilder.setTimestamp(timeStamp); Column...
void function() throws IOException { long timeStamp = 111111; MutationProto.Builder mutateBuilder = MutationProto.newBuilder(); mutateBuilder.setRow(ByteString.copyFromUtf8("row")); mutateBuilder.setMutateType(MutationType.APPEND); mutateBuilder.setTimestamp(timeStamp); ColumnValue.Builder valueBuilder = ColumnValue.ne...
/** * Test Append Mutate conversions. * * @throws IOException */
Test Append Mutate conversions
testAppend
{ "repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/protobuf/TestProtobufUtil.java", "license": "apache-2.0", "size": 12515 }
[ "com.google.protobuf.ByteString", "java.io.IOException", "org.apache.hadoop.hbase.client.Append", "org.apache.hadoop.hbase.protobuf.generated.ClientProtos", "org.junit.Assert" ]
import com.google.protobuf.ByteString; import java.io.IOException; import org.apache.hadoop.hbase.client.Append; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; import org.junit.Assert;
import com.google.protobuf.*; import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.junit.*;
[ "com.google.protobuf", "java.io", "org.apache.hadoop", "org.junit" ]
com.google.protobuf; java.io; org.apache.hadoop; org.junit;
1,970,015
Mono<Response<?>> invoke(final HttpResponseDecoder.HttpDecodedResponse decodedResponse, final Object bodyAsObject) { final HttpResponse httpResponse = decodedResponse.getSourceResponse(); final HttpRequest httpRequest = httpResponse.getRequest(); final int respons...
Mono<Response<?>> invoke(final HttpResponseDecoder.HttpDecodedResponse decodedResponse, final Object bodyAsObject) { final HttpResponse httpResponse = decodedResponse.getSourceResponse(); final HttpRequest httpRequest = httpResponse.getRequest(); final int responseStatusCode = httpResponse.getStatusCode(); final HttpHe...
/** * Invoke the {@link Response} constructor this type represents. * * @param decodedResponse the decoded http response * @param bodyAsObject the http response content * @return an instance of a {@link Response} implementation */
Invoke the <code>Response</code> constructor this type represents
invoke
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/core/azure-core/src/test/java/com/azure/core/http/rest/ResponseConstructorsCacheLambdaMetaFactory.java", "license": "mit", "size": 8241 }
[ "com.azure.core.http.HttpHeaders", "com.azure.core.http.HttpRequest", "com.azure.core.http.HttpResponse", "com.azure.core.implementation.serializer.HttpResponseDecoder" ]
import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpRequest; import com.azure.core.http.HttpResponse; import com.azure.core.implementation.serializer.HttpResponseDecoder;
import com.azure.core.http.*; import com.azure.core.implementation.serializer.*;
[ "com.azure.core" ]
com.azure.core;
210,370
public static void bulkMessagesLog(String msisdn, String message, String productcode, String productname, Connection connection) { PreparedStatement statement = null; String sql = "INSERT INTO " + TableNames.BULK_MESSAGESLOGTABLE + "(`msisdn`,`message`,`productcode`,`productname`,`dateCreated`) VALU...
static void function(String msisdn, String message, String productcode, String productname, Connection connection) { PreparedStatement statement = null; String sql = STR + TableNames.BULK_MESSAGESLOGTABLE + STR; try { if (connection == null connection.isClosed()) connection = DBConnection.getConnection(); statement = c...
/** * * Logs bulk messages sent out * <p> * * @param msisdn * @param message * @param connection */
Logs bulk messages sent out
bulkMessagesLog
{ "repo_name": "pmaingi/auction_manager", "path": "SVN_LOCAL/web/src/com/bryma/auction_manager/service/SubscriptionService.java", "license": "lgpl-3.0", "size": 9663 }
[ "com.bryma.auction_manager.web.utils.DBConnection", "com.bryma.auction_manager.web.utils.TableNames", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import com.bryma.auction_manager.web.utils.DBConnection; import com.bryma.auction_manager.web.utils.TableNames; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException;
import com.bryma.auction_manager.web.utils.*; import java.sql.*;
[ "com.bryma.auction_manager", "java.sql" ]
com.bryma.auction_manager; java.sql;
802,894
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "ggxx/HelloBrazil", "path": "src/edu.thu.ggxx.hellobrazil.edit/src/edu/thu/ggxx/hellobrazil/wc2014/provider/TeamItemProvider.java", "license": "mit", "size": 5909 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,256,204
@Test public void shouldUpdateConceptByAddingName() throws Exception { ConceptService cs = Context.getConceptService(); // make sure the concept already exists Concept concept = cs.getConcept(3); assertNotNull(concept); ConceptFormController conceptFormController = (ConceptFormController) ap...
void function() throws Exception { ConceptService cs = Context.getConceptService(); Concept concept = cs.getConcept(3); assertNotNull(concept); ConceptFormController conceptFormController = (ConceptFormController) applicationContext.getBean(STR); MockHttpServletRequest mockRequest = new MockHttpServletRequest(); MockHt...
/** * Test updating a concept by adding a name * * @throws Exception */
Test updating a concept by adding a name
shouldUpdateConceptByAddingName
{ "repo_name": "Bhamni/openmrs-core", "path": "web/src/test/java/org/openmrs/web/controller/ConceptFormControllerTest.java", "license": "mpl-2.0", "size": 47529 }
[ "org.junit.Assert", "org.openmrs.Concept", "org.openmrs.api.ConceptService", "org.openmrs.api.context.Context", "org.springframework.mock.web.MockHttpServletRequest", "org.springframework.mock.web.MockHttpServletResponse" ]
import org.junit.Assert; import org.openmrs.Concept; import org.openmrs.api.ConceptService; import org.openmrs.api.context.Context; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse;
import org.junit.*; import org.openmrs.*; import org.openmrs.api.*; import org.openmrs.api.context.*; import org.springframework.mock.web.*;
[ "org.junit", "org.openmrs", "org.openmrs.api", "org.springframework.mock" ]
org.junit; org.openmrs; org.openmrs.api; org.springframework.mock;
51,321
public double getPhenotypeScore() { if (this.match == null || this.reference == null) { return 0.0; } else { // Get ancestors for both patients Set<VocabularyTerm> refAncestors = getAncestors(getPresentPatientTerms(this.reference)); Set<VocabularyT...
double function() { if (this.match == null this.reference == null) { return 0.0; } else { Set<VocabularyTerm> refAncestors = getAncestors(getPresentPatientTerms(this.reference)); Set<VocabularyTerm> matchAncestors = getAncestors(getPresentPatientTerms(this.match)); if (refAncestors.isEmpty() matchAncestors.isEmpty()) {...
/** * Get the phenotypic similarity score for this patient match. * * @return the similarity score, between 0 (a poor match) and 1 (a good match) */
Get the phenotypic similarity score for this patient match
getPhenotypeScore
{ "repo_name": "mjshepherd/patient-network", "path": "similarity-data-impl/src/main/java/org/phenotips/data/similarity/internal/DefaultPatientSimilarityView.java", "license": "agpl-3.0", "size": 21144 }
[ "java.util.HashSet", "java.util.Set", "org.phenotips.vocabulary.VocabularyTerm" ]
import java.util.HashSet; import java.util.Set; import org.phenotips.vocabulary.VocabularyTerm;
import java.util.*; import org.phenotips.vocabulary.*;
[ "java.util", "org.phenotips.vocabulary" ]
java.util; org.phenotips.vocabulary;
1,214,003
default CommandMetadata getMetadata() { return CommandMetadata.builder(getClass()).build(); }
default CommandMetadata getMetadata() { return CommandMetadata.builder(getClass()).build(); }
/** * Returns a metadata object for this command. Default implementation generates basic metadata based on class name. * * @return metadata object describing the current command */
Returns a metadata object for this command. Default implementation generates basic metadata based on class name
getMetadata
{ "repo_name": "bootique/bootique", "path": "bootique/src/main/java/io/bootique/command/Command.java", "license": "apache-2.0", "size": 1596 }
[ "io.bootique.meta.application.CommandMetadata" ]
import io.bootique.meta.application.CommandMetadata;
import io.bootique.meta.application.*;
[ "io.bootique.meta" ]
io.bootique.meta;
690,008
public static URI getInfoServer(InetSocketAddress namenodeAddr, Configuration conf, String scheme) throws IOException { String[] suffixes = null; if (namenodeAddr != null) { // if non-default namenode, try reverse look up // the nameServiceID if it is available suffixes = getSuffixIDs...
static URI function(InetSocketAddress namenodeAddr, Configuration conf, String scheme) throws IOException { String[] suffixes = null; if (namenodeAddr != null) { suffixes = getSuffixIDs(conf, namenodeAddr, DFSConfigKeys.DFS_NAMENODE_SERVICE_RPC_ADDRESS_KEY, DFSConfigKeys.DFS_NAMENODE_RPC_ADDRESS_KEY); } String authorit...
/** * return server http or https address from the configuration for a * given namenode rpc address. * @param conf * @param namenodeAddr - namenode RPC address * @param scheme - the scheme (http / https) * @return server http or https address * @throws IOException */
return server http or https address from the configuration for a given namenode rpc address
getInfoServer
{ "repo_name": "songweijia/fffs", "path": "sources/hadoop-2.4.1-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java", "license": "apache-2.0", "size": 65059 }
[ "java.io.IOException", "java.net.InetSocketAddress", "java.net.URI", "org.apache.hadoop.conf.Configuration" ]
import java.io.IOException; import java.net.InetSocketAddress; import java.net.URI; import org.apache.hadoop.conf.Configuration;
import java.io.*; import java.net.*; import org.apache.hadoop.conf.*;
[ "java.io", "java.net", "org.apache.hadoop" ]
java.io; java.net; org.apache.hadoop;
2,458,597
protected boolean createCashDocumentForIncomeDistribution() { List<String> documentTypeNames = new ArrayList<String>(); documentTypeNames.add(EndowConstants.DocumentTypeNames.ENDOWMENT_CASH_INCREASE); documentTypeNames.add(EndowConstants.DocumentTypeNames.ENDOWMENT_CASH_DECREASE...
boolean function() { List<String> documentTypeNames = new ArrayList<String>(); documentTypeNames.add(EndowConstants.DocumentTypeNames.ENDOWMENT_CASH_INCREASE); documentTypeNames.add(EndowConstants.DocumentTypeNames.ENDOWMENT_CASH_DECREASE); List<PooledFundControl> pooledFundControlRecords = (List<PooledFundControl>) po...
/** * Creates an ECI or an ECDD eDoc according to the total amount of income/principle cash for transaction type ECI and ECDD */
Creates an ECI or an ECDD eDoc according to the total amount of income/principle cash for transaction type ECI and ECDD
createCashDocumentForIncomeDistribution
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/endow/batch/service/impl/PooledFundControlTransactionsServiceImpl.java", "license": "agpl-3.0", "size": 39120 }
[ "java.util.ArrayList", "java.util.List", "org.kuali.kfs.module.endow.EndowConstants", "org.kuali.kfs.module.endow.EndowParameterKeyConstants", "org.kuali.kfs.module.endow.businessobject.PooledFundControl", "org.kuali.kfs.module.endow.businessobject.TransactionArchive", "org.kuali.rice.core.api.util.type...
import java.util.ArrayList; import java.util.List; import org.kuali.kfs.module.endow.EndowConstants; import org.kuali.kfs.module.endow.EndowParameterKeyConstants; import org.kuali.kfs.module.endow.businessobject.PooledFundControl; import org.kuali.kfs.module.endow.businessobject.TransactionArchive; import org.kuali.ric...
import java.util.*; import org.kuali.kfs.module.endow.*; import org.kuali.kfs.module.endow.businessobject.*; import org.kuali.rice.core.api.util.type.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
1,356,222
void removeConnectedClient(PccId pccIds);
void removeConnectedClient(PccId pccIds);
/** * Clear all state in controller client maps for a pcc client that has * disconnected from the local controller. Also release control for * that pccIds client from the global repository. Notify client listeners. * * @param pccIds the id of pcc client to remove. */
Clear all state in controller client maps for a pcc client that has disconnected from the local controller. Also release control for that pccIds client from the global repository. Notify client listeners
removeConnectedClient
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/pcep/api/src/main/java/org/onosproject/pcep/controller/driver/PcepAgent.java", "license": "apache-2.0", "size": 2614 }
[ "org.onosproject.pcep.controller.PccId" ]
import org.onosproject.pcep.controller.PccId;
import org.onosproject.pcep.controller.*;
[ "org.onosproject.pcep" ]
org.onosproject.pcep;
1,321,992
public List<String> getPosts() { return this.posts; }
List<String> function() { return this.posts; }
/** * Get the list of posts * * @return the list of posts */
Get the list of posts
getPosts
{ "repo_name": "jonathanmcelroy/DataCommunicationsProgram456", "path": "src/nudat/protocol/NuDatResponse.java", "license": "gpl-2.0", "size": 7323 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,650,281
public Collection<IResourceProvider> getResourceProviders() { return myResourceProviders; } /** * Get the server address strategy, which is used to determine what base URL to provide clients to refer to this server. Defaults to an instance of {@link IncomingRequestAddressStrategy}
Collection<IResourceProvider> function() { return myResourceProviders; } /** * Get the server address strategy, which is used to determine what base URL to provide clients to refer to this server. Defaults to an instance of {@link IncomingRequestAddressStrategy}
/** * Provides the resource providers for this server */
Provides the resource providers for this server
getResourceProviders
{ "repo_name": "steve1medix/hapi-fhir", "path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java", "license": "apache-2.0", "size": 52651 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,448,072
protected InputStream getStreamFromAssets(String imageUri, Object extra) throws IOException { String filePath = Scheme.ASSETS.crop(imageUri); return context.getAssets().open(filePath); }
InputStream function(String imageUri, Object extra) throws IOException { String filePath = Scheme.ASSETS.crop(imageUri); return context.getAssets().open(filePath); }
/** * Retrieves {@link java.io.InputStream} of image by URI (image is located in assets of application). * * @param imageUri Image URI * @param extra Auxiliary object which was passed to {@link DisplayImageOptions.Builder#extraForDownloader(Object) * DisplayImageOptions.extraForDownloader(O...
Retrieves <code>java.io.InputStream</code> of image by URI (image is located in assets of application)
getStreamFromAssets
{ "repo_name": "liftting/XmWeiBo", "path": "XmWei/app/src/main/java/wm/xmwei/core/image/universalimageloader/core/download/BaseImageDownloader.java", "license": "apache-2.0", "size": 12151 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
179,464
public @Nullable MqttBrokerConnection getBrokerConnection() { return brokerConnection; }
@Nullable MqttBrokerConnection function() { return brokerConnection; }
/** * Return the brokerConnection object that this reconnect policy is assigned to. */
Return the brokerConnection object that this reconnect policy is assigned to
getBrokerConnection
{ "repo_name": "Snickermicker/smarthome", "path": "bundles/io/org.eclipse.smarthome.io.transport.mqtt/src/main/java/org/eclipse/smarthome/io/transport/mqtt/reconnect/AbstractReconnectStrategy.java", "license": "epl-1.0", "size": 2521 }
[ "org.eclipse.jdt.annotation.Nullable", "org.eclipse.smarthome.io.transport.mqtt.MqttBrokerConnection" ]
import org.eclipse.jdt.annotation.Nullable; import org.eclipse.smarthome.io.transport.mqtt.MqttBrokerConnection;
import org.eclipse.jdt.annotation.*; import org.eclipse.smarthome.io.transport.mqtt.*;
[ "org.eclipse.jdt", "org.eclipse.smarthome" ]
org.eclipse.jdt; org.eclipse.smarthome;
1,442,120
private void extractUpperCaseParts(ArrayList<String> targets) { HashSet<String> duplicateFreeTargets = new LinkedHashSet<String>(targets); for (Iterator<String> iter = duplicateFreeTargets.iterator(); iter.hasNext(); ) { String target = iter.next(); String[] targetTokens = ta...
void function(ArrayList<String> targets) { HashSet<String> duplicateFreeTargets = new LinkedHashSet<String>(targets); for (Iterator<String> iter = duplicateFreeTargets.iterator(); iter.hasNext(); ) { String target = iter.next(); String[] targetTokens = target.split("\\s"); String upperCasePart = null; int i = 0; while ...
/** * extract non lower case parts from the targets: * "the film 'Star Wars'" --> "'Star Wars'" * "1998 indictment and trial of Susan McDougal" --> "Susan McDougal" * "Miss Universe 2000 crowned" --> "Miss Universe 2000" * "Abraham from the bible" --> "Abraham" * "Gobi desert" --> "Gobi" ...
extract non lower case parts from the targets: "the film 'Star Wars'" --> "'Star Wars'" "1998 indictment and trial of Susan McDougal" --> "Susan McDougal" "Miss Universe 2000 crowned" --> "Miss Universe 2000" "Abraham from the bible" --> "Abraham" "Gobi desert" --> "Gobi"
extractUpperCaseParts
{ "repo_name": "csarron/PriaQA", "path": "src/info/ephyra/answerselection/filters/WebTermImportanceFilter.java", "license": "gpl-3.0", "size": 34357 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.Iterator", "java.util.LinkedHashSet" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashSet;
import java.util.*;
[ "java.util" ]
java.util;
759,001
public boolean isAck() { if (message == null) { return false; } return (((Request) message).getMethod().equals(Request.ACK)); }
boolean function() { if (message == null) { return false; } return (((Request) message).getMethod().equals(Request.ACK)); }
/** * Indicates if the request method is ACK or not. * * @return true if the method is ACK, false otherwise. */
Indicates if the request method is ACK or not
isAck
{ "repo_name": "Mobicents/sipunit", "path": "src/main/java/org/cafesip/sipunit/SipRequest.java", "license": "apache-2.0", "size": 6420 }
[ "javax.sip.message.Request" ]
import javax.sip.message.Request;
import javax.sip.message.*;
[ "javax.sip" ]
javax.sip;
1,863,562
@Override public void execute() throws BuildException { checkParameters(); reportFilesMap = new HashMap<String, String>(); AntClassLoader classLoader = null; if (classpath != null) { jasperReportsContext.setProperty(JRCompiler.COMPILER_CLASSPATH, String.valueOf(classpath)); ClassLoader parent...
void function() throws BuildException { checkParameters(); reportFilesMap = new HashMap<String, String>(); AntClassLoader classLoader = null; if (classpath != null) { jasperReportsContext.setProperty(JRCompiler.COMPILER_CLASSPATH, String.valueOf(classpath)); ClassLoader parentClassLoader = getClass().getClassLoader(); ...
/** * Executes the task. */
Executes the task
execute
{ "repo_name": "MHTaleb/Encologim", "path": "lib/JasperReport/src/net/sf/jasperreports/ant/JRAntApiWriteTask.java", "license": "gpl-3.0", "size": 10947 }
[ "java.util.HashMap", "net.sf.jasperreports.engine.design.JRCompiler", "org.apache.tools.ant.AntClassLoader", "org.apache.tools.ant.BuildException" ]
import java.util.HashMap; import net.sf.jasperreports.engine.design.JRCompiler; import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.BuildException;
import java.util.*; import net.sf.jasperreports.engine.design.*; import org.apache.tools.ant.*;
[ "java.util", "net.sf.jasperreports", "org.apache.tools" ]
java.util; net.sf.jasperreports; org.apache.tools;
2,032,844
protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY) { toggleExpandState(path); }
void function(TreePath path, int mouseX, int mouseY) { toggleExpandState(path); }
/** * Messaged when the user clicks the particular row, this invokes * toggleExpandState. * * @param path the path we are concerned with * @param mouseX is the cursor's x position * @param mouseY is the cursor's y position */
Messaged when the user clicks the particular row, this invokes toggleExpandState
handleExpandControlClick
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/javax/swing/plaf/basic/BasicTreeUI.java", "license": "gpl-2.0", "size": 115323 }
[ "javax.swing.tree.TreePath" ]
import javax.swing.tree.TreePath;
import javax.swing.tree.*;
[ "javax.swing" ]
javax.swing;
573,350
protected void addPropertySources(ConfigurableEnvironment environment, ResourceLoader resourceLoader) { RandomValuePropertySource.addToEnvironment(environment); try { new Loader(environment, resourceLoader).load(); } catch (IOException ex) { throw new IllegalStateException("Unable to load configurat...
void function(ConfigurableEnvironment environment, ResourceLoader resourceLoader) { RandomValuePropertySource.addToEnvironment(environment); try { new Loader(environment, resourceLoader).load(); } catch (IOException ex) { throw new IllegalStateException(STR, ex); } }
/** * Add config file property sources to the specified environment. * @param environment the environment to add source to * @param resourceLoader the resource loader * @see #addPostProcessors(ConfigurableApplicationContext) */
Add config file property sources to the specified environment
addPropertySources
{ "repo_name": "joshthornhill/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java", "license": "apache-2.0", "size": 25769 }
[ "java.io.IOException", "org.springframework.core.env.ConfigurableEnvironment", "org.springframework.core.io.ResourceLoader" ]
import java.io.IOException; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.io.ResourceLoader;
import java.io.*; import org.springframework.core.env.*; import org.springframework.core.io.*;
[ "java.io", "org.springframework.core" ]
java.io; org.springframework.core;
1,070,691
public StringWriter transformSingleStatistic(String BaseElementTag, String GroupName, Statistic stat) throws ScxException { try { StringWriter output = new StringWriter(); TransformerHandler transformer = createXmlDocument(output); transfo...
StringWriter function(String BaseElementTag, String GroupName, Statistic stat) throws ScxException { try { StringWriter output = new StringWriter(); TransformerHandler transformer = createXmlDocument(output); transformer.startDocument(); transformer.startElement(STR", BaseElementTag, CommonXmlTransform.getOuterMostAttr...
/** * <p> * For a given Statistic, transform it into XML. * </p> * * @param GroupName * The name of the statistic group. * @param stat * A Statistic to transform into XML. * * @return XML representation of a single Statistic. * ...
For a given Statistic, transform it into XML.
transformSingleStatistic
{ "repo_name": "Microsoft/BeanSpy", "path": "source/code/JEE/Common/src/com/interopbridges/scx/xml/StatisticXMLTransformer.java", "license": "apache-2.0", "size": 10324 }
[ "com.interopbridges.scx.ScxException", "com.interopbridges.scx.ScxExceptionCode", "com.interopbridges.scx.jeestats.Statistic", "java.io.StringWriter", "javax.xml.transform.sax.TransformerHandler", "org.xml.sax.helpers.AttributesImpl" ]
import com.interopbridges.scx.ScxException; import com.interopbridges.scx.ScxExceptionCode; import com.interopbridges.scx.jeestats.Statistic; import java.io.StringWriter; import javax.xml.transform.sax.TransformerHandler; import org.xml.sax.helpers.AttributesImpl;
import com.interopbridges.scx.*; import com.interopbridges.scx.jeestats.*; import java.io.*; import javax.xml.transform.sax.*; import org.xml.sax.helpers.*;
[ "com.interopbridges.scx", "java.io", "javax.xml", "org.xml.sax" ]
com.interopbridges.scx; java.io; javax.xml; org.xml.sax;
1,338,089
public void getData() { if (jobEntry.getName() != null) wName.setText(jobEntry.getName()); if (jobEntry.getDatabase() != null) wConnection.setText(jobEntry.getDatabase().getName()); if(jobEntry.schemaname!=null) wSchemaname.setText(jobEntry.schemaname); if(...
void function() { if (jobEntry.getName() != null) wName.setText(jobEntry.getName()); if (jobEntry.getDatabase() != null) wConnection.setText(jobEntry.getDatabase().getName()); if(jobEntry.schemaname!=null) wSchemaname.setText(jobEntry.schemaname); if(jobEntry.tablename!=null) wTablename.setText(jobEntry.tablename); wSu...
/** * Copy information from the meta-data input to the dialog fields. */
Copy information from the meta-data input to the dialog fields
getData
{ "repo_name": "juanmjacobs/kettle", "path": "src-ui/org/pentaho/di/ui/job/entries/evaluatetablecontent/JobEntryEvalTableContentDialog.java", "license": "lgpl-2.1", "size": 30807 }
[ "org.pentaho.di.job.entries.evaluatetablecontent.JobEntryEvalTableContent" ]
import org.pentaho.di.job.entries.evaluatetablecontent.JobEntryEvalTableContent;
import org.pentaho.di.job.entries.evaluatetablecontent.*;
[ "org.pentaho.di" ]
org.pentaho.di;
723,380
@Nullable static Map<String, Long> getTypeToTimeMap() { return typeToTimeMap != null ? typeToTimeMap.getMap() : null; }
@Nullable static Map<String, Long> getTypeToTimeMap() { return typeToTimeMap != null ? typeToTimeMap.getMap() : null; }
/** * Used for exporting this data via varz. Accesses to this * map must be synchronized on the map. If enableTypeMaps has not * been called, this will return null. */
Used for exporting this data via varz. Accesses to this map must be synchronized on the map. If enableTypeMaps has not been called, this will return null
getTypeToTimeMap
{ "repo_name": "tiobe/closure-compiler", "path": "src/com/google/javascript/jscomp/Tracer.java", "license": "apache-2.0", "size": 34007 }
[ "java.util.Map", "javax.annotation.Nullable" ]
import java.util.Map; import javax.annotation.Nullable;
import java.util.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
1,227,403
private static IndexRequestBuilder getIndexRequestBuilder(IndexQueryPath indexPath, String id, Index indexable) { return IndexClient.client.prepareIndex(indexPath.index, indexPath.type, id) .setSource(indexable.toIndex()); }
static IndexRequestBuilder function(IndexQueryPath indexPath, String id, Index indexable) { return IndexClient.client.prepareIndex(indexPath.index, indexPath.type, id) .setSource(indexable.toIndex()); }
/** * Create an IndexRequestBuilder * @param indexPath * @param id * @param indexable * @return */
Create an IndexRequestBuilder
getIndexRequestBuilder
{ "repo_name": "cleverage/play2-elasticsearch", "path": "module/app/com/github/cleverage/elasticsearch/IndexService.java", "license": "mit", "size": 29832 }
[ "org.elasticsearch.action.index.IndexRequestBuilder" ]
import org.elasticsearch.action.index.IndexRequestBuilder;
import org.elasticsearch.action.index.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
1,857,109
public void testSerialization() { EmptyBlock b1 = new EmptyBlock(1.0, 2.0); EmptyBlock b2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(b1); out.clos...
void function() { EmptyBlock b1 = new EmptyBlock(1.0, 2.0); EmptyBlock b2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(b1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray()))...
/** * Serialize an instance, restore it, and check for equality. */
Serialize an instance, restore it, and check for equality
testSerialization
{ "repo_name": "integrated/jfreechart", "path": "tests/org/jfree/chart/block/junit/AbstractBlockTests.java", "license": "lgpl-2.1", "size": 5758 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.ObjectInput", "java.io.ObjectInputStream", "java.io.ObjectOutput", "java.io.ObjectOutputStream", "org.jfree.chart.block.EmptyBlock" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import org.jfree.chart.block.EmptyBlock;
import java.io.*; import org.jfree.chart.block.*;
[ "java.io", "org.jfree.chart" ]
java.io; org.jfree.chart;
1,630,312
@Override protected void doCreateFolder() throws Exception { final ChannelSftp channel = getAbstractFileSystem().getChannel(); try { channel.mkdir(relPath); } finally { getAbstractFileSystem().putChannel(channel); } }
void function() throws Exception { final ChannelSftp channel = getAbstractFileSystem().getChannel(); try { channel.mkdir(relPath); } finally { getAbstractFileSystem().putChannel(channel); } }
/** * Creates this file as a folder. */
Creates this file as a folder
doCreateFolder
{ "repo_name": "wso2/wso2-commons-vfs", "path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileObject.java", "license": "apache-2.0", "size": 19232 }
[ "com.jcraft.jsch.ChannelSftp" ]
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.*;
[ "com.jcraft.jsch" ]
com.jcraft.jsch;
1,748,972
public static Message getResultMessage(Exchange exchange) { if (exchange.getPattern().isOutCapable()) { return exchange.getOut(); } else { return exchange.getIn(); } }
static Message function(Exchange exchange) { if (exchange.getPattern().isOutCapable()) { return exchange.getOut(); } else { return exchange.getIn(); } }
/** * Returns the message where to write results in an * exchange-pattern-sensitive way. * * @param exchange message exchange. * @return result message. */
Returns the message where to write results in an exchange-pattern-sensitive way
getResultMessage
{ "repo_name": "cexbrayat/camel", "path": "camel-core/src/main/java/org/apache/camel/util/ExchangeHelper.java", "license": "apache-2.0", "size": 26462 }
[ "org.apache.camel.Exchange", "org.apache.camel.Message" ]
import org.apache.camel.Exchange; import org.apache.camel.Message;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,325,897
protected boolean incomingCometHandshake(Map<String, Object> oortExt, ServerSession session) { String remoteOortURL = (String)oortExt.get(EXT_OORT_URL_FIELD); if (_logger.isDebugEnabled()) _logger.debug("Incoming comet handshake from comet {} with {}", remoteOortURL, session); ...
boolean function(Map<String, Object> oortExt, ServerSession session) { String remoteOortURL = (String)oortExt.get(EXT_OORT_URL_FIELD); if (_logger.isDebugEnabled()) _logger.debug(STR, remoteOortURL, session); String remoteOortId = (String)oortExt.get(EXT_OORT_ID_FIELD); ServerCometInfo serverCometInfo = new ServerComet...
/** * <p>Called to register the details of a successful handshake from another Oort comet.</p> * * @param oortExt the remote Oort information * @param session the server session that represent the connection with the remote Oort comet * @return false if a connection from a remote Oort has alrea...
Called to register the details of a successful handshake from another Oort comet
incomingCometHandshake
{ "repo_name": "ghoullier/cometd", "path": "cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java", "license": "apache-2.0", "size": 42560 }
[ "java.util.Map", "org.cometd.bayeux.server.ServerSession" ]
import java.util.Map; import org.cometd.bayeux.server.ServerSession;
import java.util.*; import org.cometd.bayeux.server.*;
[ "java.util", "org.cometd.bayeux" ]
java.util; org.cometd.bayeux;
2,509,270
public Map<String, List<String>> getHeaders() { return headers; }
Map<String, List<String>> function() { return headers; }
/** * This method returns the map of headers for this connection * * @return map of headers (modifiable) */
This method returns the map of headers for this connection
getHeaders
{ "repo_name": "jonnyzzz/maragogype", "path": "tags/v1.7/java/com/xerox/amazonws/common/AWSQueryConnection.java", "license": "apache-2.0", "size": 26450 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
432,972
InputStream getDecisionModel(String decisionDefinitionId);
InputStream getDecisionModel(String decisionDefinitionId);
/** * Gives access to a deployed decision model, e.g., a DMN 1.0 XML file, * through a stream of bytes. * * @param decisionDefinitionId * id of a {@link DecisionDefinition}, cannot be null. * * @throws NotValidException when the given decision definition id or deployment id or resource nam...
Gives access to a deployed decision model, e.g., a DMN 1.0 XML file, through a stream of bytes
getDecisionModel
{ "repo_name": "holisticon/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/RepositoryService.java", "license": "apache-2.0", "size": 23869 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
339,734
@EventListener public void onRhythmUpdated(RhythmUpdatedEvent event) { Rhythm rhythm = event.getRhythm(); int beatDuration = rhythm.getBeat().getDuration(); int beatPhase = rhythm.getBeat().getPhase(); int barBeats = rhythm.getTimeSignature().getBeats(); int barUnit = rhy...
void function(RhythmUpdatedEvent event) { Rhythm rhythm = event.getRhythm(); int beatDuration = rhythm.getBeat().getDuration(); int beatPhase = rhythm.getBeat().getPhase(); int barBeats = rhythm.getTimeSignature().getBeats(); int barUnit = rhythm.getTimeSignature().getUnit(); int barBeatOffset = rhythm.getBeatOffset();...
/** * Handle a rhythm update event. * * @param event * The rhythm update event */
Handle a rhythm update event
onRhythmUpdated
{ "repo_name": "javidcf/masmusic", "path": "application/src/main/java/uk/ac/bath/masmusic/mas/MasMusicAbstractAgent.java", "license": "mit", "size": 7148 }
[ "uk.ac.bath.masmusic.common.Rhythm", "uk.ac.bath.masmusic.events.RhythmUpdatedEvent" ]
import uk.ac.bath.masmusic.common.Rhythm; import uk.ac.bath.masmusic.events.RhythmUpdatedEvent;
import uk.ac.bath.masmusic.common.*; import uk.ac.bath.masmusic.events.*;
[ "uk.ac.bath" ]
uk.ac.bath;
1,383,281
@Command(shortDescription = "Opens the NUI editor for a ui screen", requiredPermission = PermissionManager.NO_PERMISSION) public String editScreen(@CommandParam(value = "uri", suggester = ScreenSuggester.class) String uri) { if (!nuiEditorSystem.isEditorActive()) { nuiEditorSystem.toggleEdit...
@Command(shortDescription = STR, requiredPermission = PermissionManager.NO_PERMISSION) String function(@CommandParam(value = "uri", suggester = ScreenSuggester.class) String uri) { if (!nuiEditorSystem.isEditorActive()) { nuiEditorSystem.toggleEditor(); } Set<ResourceUrn> urns = assetManager.resolve(uri, UIElement.clas...
/** * Opens the NUI editor for a ui screen * @param uri String containing ui screen name * @return String containing final message */
Opens the NUI editor for a ui screen
editScreen
{ "repo_name": "mertserezli/Terasology", "path": "engine/src/main/java/org/terasology/logic/console/commands/CoreCommands.java", "license": "apache-2.0", "size": 28714 }
[ "java.util.Arrays", "java.util.Set", "org.terasology.assets.ResourceUrn", "org.terasology.logic.console.commandSystem.annotations.Command", "org.terasology.logic.console.commandSystem.annotations.CommandParam", "org.terasology.logic.console.suggesters.ScreenSuggester", "org.terasology.logic.permission.P...
import java.util.Arrays; import java.util.Set; import org.terasology.assets.ResourceUrn; import org.terasology.logic.console.commandSystem.annotations.Command; import org.terasology.logic.console.commandSystem.annotations.CommandParam; import org.terasology.logic.console.suggesters.ScreenSuggester; import org.terasolog...
import java.util.*; import org.terasology.assets.*; import org.terasology.logic.console.*; import org.terasology.logic.console.suggesters.*; import org.terasology.logic.permission.*; import org.terasology.rendering.nui.asset.*; import org.terasology.rendering.nui.editor.layers.*;
[ "java.util", "org.terasology.assets", "org.terasology.logic", "org.terasology.rendering" ]
java.util; org.terasology.assets; org.terasology.logic; org.terasology.rendering;
1,309,532
public void createModel() { URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); Exception exception = null; Resource resource = null; try { // Load the resource through the editing domain. // resource = editingDomain.getResourceSet().getResource(r...
void function() { URI resourceURI = EditUIUtil.getURI(getEditorInput(), editingDomain.getResourceSet().getURIConverter()); Exception exception = null; Resource resource = null; try { } catch (Exception e) { exception = e; resource = editingDomain.getResourceSet().getResource(resourceURI, false); } Diagnostic diagnostic...
/** * This is the method called to load a resource into the editing domain's resource set based on the editor's input. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This is the method called to load a resource into the editing domain's resource set based on the editor's input.
createModel
{ "repo_name": "FraunhoferESK/ernest-eclipse-integration", "path": "de.fraunhofer.esk.ernest.core.analysismodel.editor/src/ernest/architecture/presentation/ArchitectureEditor.java", "license": "epl-1.0", "size": 57648 }
[ "org.eclipse.emf.common.util.Diagnostic", "org.eclipse.emf.ecore.resource.Resource", "org.eclipse.emf.edit.ui.util.EditUIUtil" ]
import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.edit.ui.util.EditUIUtil;
import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.edit.ui.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,419,325
void removeRequiredAttributes(PerunSession perunSession, Service service, List<? extends AttributeDefinition> attributes) throws AttributeNotAssignedException;
void removeRequiredAttributes(PerunSession perunSession, Service service, List<? extends AttributeDefinition> attributes) throws AttributeNotAssignedException;
/** * Batch version of removeRequiredAttribute * @see cz.metacentrum.perun.core.api.ServicesManager#removeRequiredAttribute(PerunSession,Service,AttributeDefinition) */
Batch version of removeRequiredAttribute
removeRequiredAttributes
{ "repo_name": "zlamalp/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/ServicesManagerBl.java", "license": "bsd-2-clause", "size": 31710 }
[ "cz.metacentrum.perun.core.api.AttributeDefinition", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.Service", "cz.metacentrum.perun.core.api.exceptions.AttributeNotAssignedException", "java.util.List" ]
import cz.metacentrum.perun.core.api.AttributeDefinition; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Service; import cz.metacentrum.perun.core.api.exceptions.AttributeNotAssignedException; import java.util.List;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
2,269,773
public static String stripParams(@NonNull String cookieStr) { Map<String, String> cookies = parseCookies(cookieStr); List<String> namesToSet = new ArrayList<>(); for (Map.Entry<String, String> entry : cookies.entrySet()) { if (!COOKIES_STANDARD_ATTRS.contains(entry.getKey().toLow...
static String function(@NonNull String cookieStr) { Map<String, String> cookies = parseCookies(cookieStr); List<String> namesToSet = new ArrayList<>(); for (Map.Entry<String, String> entry : cookies.entrySet()) { if (!COOKIES_STANDARD_ATTRS.contains(entry.getKey().toLowerCase())) namesToSet.add(entry.getKey() + "=" + e...
/** * Strip the given cookie string from the standard parameters * i.e. only return the cookie values * * @param cookieStr The cookie as a string, using the format of the 'Set-Cookie' HTTP response header * @return Cookie string without the standard parameters */
Strip the given cookie string from the standard parameters i.e. only return the cookie values
stripParams
{ "repo_name": "AVnetWS/Hentoid", "path": "app/src/main/java/me/devsaki/hentoid/util/network/HttpHelper.java", "license": "apache-2.0", "size": 28420 }
[ "android.text.TextUtils", "androidx.annotation.NonNull", "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import android.text.TextUtils; import androidx.annotation.NonNull; import java.util.ArrayList; import java.util.List; import java.util.Map;
import android.text.*; import androidx.annotation.*; import java.util.*;
[ "android.text", "androidx.annotation", "java.util" ]
android.text; androidx.annotation; java.util;
678,116
public void setBufferedColor(@ColorInt int bufferedColor) { bufferedPaint.setColor(bufferedColor); invalidate(seekBounds); }
void function(@ColorInt int bufferedColor) { bufferedPaint.setColor(bufferedColor); invalidate(seekBounds); }
/** * Sets the color for the portion of the time bar after the current played position up to the * current buffered position. * * @param bufferedColor The color for the portion of the time bar after the current played * position up to the current buffered position. */
Sets the color for the portion of the time bar after the current played position up to the current buffered position
setBufferedColor
{ "repo_name": "saki4510t/ExoPlayer", "path": "library/ui/src/main/java/com/google/android/exoplayer2/ui/DefaultTimeBar.java", "license": "apache-2.0", "size": 31394 }
[ "androidx.annotation.ColorInt" ]
import androidx.annotation.ColorInt;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
932,998
public AxisLocation getRangeAxisLocation() { return (AxisLocation) this.rangeAxisLocations.get(0); }
AxisLocation function() { return (AxisLocation) this.rangeAxisLocations.get(0); }
/** * Returns the location of the primary range axis. * * @return The location (never <code>null</code>). * * @see #setRangeAxisLocation(AxisLocation) */
Returns the location of the primary range axis
getRangeAxisLocation
{ "repo_name": "Epsilon2/Memetic-Algorithm-for-TSP", "path": "jfreechart-1.0.16/source/org/jfree/chart/plot/XYPlot.java", "license": "mit", "size": 199979 }
[ "org.jfree.chart.axis.AxisLocation" ]
import org.jfree.chart.axis.AxisLocation;
import org.jfree.chart.axis.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,198,039
public List<String> spellCheck(File documentFile) { List<String> wordsToCheck = readFromFile(documentFile); List<String> listOfIncorrectWords = new LinkedList<String>(); // For every string inside, check to see if it is contained in the // dictionary for (String s : wordsToCheck) // If it is the...
List<String> function(File documentFile) { List<String> wordsToCheck = readFromFile(documentFile); List<String> listOfIncorrectWords = new LinkedList<String>(); for (String s : wordsToCheck) if (!dictionary.contains(s)) listOfIncorrectWords.add(s); return listOfIncorrectWords; }
/** * Spell-checks a document against the dictionary. * * @param document_file * - the File that contains Strings to be looked up in the * dictionary * @return a List of misspelled words */
Spell-checks a document against the dictionary
spellCheck
{ "repo_name": "dben41/Hash-Tables", "path": "SpellCheckUtil.java", "license": "mit", "size": 3994 }
[ "java.io.File", "java.util.LinkedList", "java.util.List" ]
import java.io.File; import java.util.LinkedList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
227,394
public List<Identity> getIdentities() { return Collections.unmodifiableList(identities); }
List<Identity> function() { return Collections.unmodifiableList(identities); }
/** * Returns the discovered identities of an XMPP entity. * * @return an unmodifiable list of the discovered identities */
Returns the discovered identities of an XMPP entity
getIdentities
{ "repo_name": "vanitasvitae/smack-omemo", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/disco/packet/DiscoverInfo.java", "license": "apache-2.0", "size": 18017 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,219,695
public boolean getValueAsStringIsTruncated() { final JsonElement elem = json.get("valueAsStringIsTruncated"); return elem != null ? elem.getAsBoolean() : false; }
boolean function() { final JsonElement elem = json.get(STR); return elem != null ? elem.getAsBoolean() : false; }
/** * The valueAsString for String references may be truncated. If so, this property is added with * the value 'true'. * * New code should use 'length' and 'count' instead. * * Can return <code>null</code>. */
The valueAsString for String references may be truncated. If so, this property is added with the value 'true'. New code should use 'length' and 'count' instead. Can return <code>null</code>
getValueAsStringIsTruncated
{ "repo_name": "flutter/flutter-intellij", "path": "flutter-idea/third_party/vmServiceDrivers/org/dartlang/vm/service/element/InstanceRef.java", "license": "bsd-3-clause", "size": 7005 }
[ "com.google.gson.JsonElement" ]
import com.google.gson.JsonElement;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
965,555
T addTemporalReference(InspireTemporalReference temporalReference);
T addTemporalReference(InspireTemporalReference temporalReference);
/** * Add a temporal reference * * @param temporalReference * Temporal reference to add * @return this */
Add a temporal reference
addTemporalReference
{ "repo_name": "ahuarte47/SOS", "path": "extensions/inspire/code/src/main/java/org/n52/sos/inspire/capabilities/InspireCapabilities.java", "license": "gpl-2.0", "size": 17240 }
[ "org.n52.sos.inspire.InspireTemporalReference" ]
import org.n52.sos.inspire.InspireTemporalReference;
import org.n52.sos.inspire.*;
[ "org.n52.sos" ]
org.n52.sos;
1,762,429
private void channelAdminPermCheck(User loggedInUser) { Role channelRole = RoleFactory.lookupByLabel("channel_admin"); Role orgAdminRole = RoleFactory.lookupByLabel("org_admin"); if (!loggedInUser.hasRole(channelRole) && !loggedInUser.hasRole(orgAdminRole)) { throw new Permission...
void function(User loggedInUser) { Role channelRole = RoleFactory.lookupByLabel(STR); Role orgAdminRole = RoleFactory.lookupByLabel(STR); if (!loggedInUser.hasRole(channelRole) && !loggedInUser.hasRole(orgAdminRole)) { throw new PermissionException(STR + STR); } }
/** * Checks whether a user is an org admin or channnel admin (and thus can admin * a channel) * @param loggedInUser the user to check */
Checks whether a user is an org admin or channnel admin (and thus can admin a channel)
channelAdminPermCheck
{ "repo_name": "davidhrbac/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java", "license": "gpl-2.0", "size": 127652 }
[ "com.redhat.rhn.common.security.PermissionException", "com.redhat.rhn.domain.role.Role", "com.redhat.rhn.domain.role.RoleFactory", "com.redhat.rhn.domain.user.User" ]
import com.redhat.rhn.common.security.PermissionException; import com.redhat.rhn.domain.role.Role; import com.redhat.rhn.domain.role.RoleFactory; import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.common.security.*; import com.redhat.rhn.domain.role.*; import com.redhat.rhn.domain.user.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
1,918,380
public void setMaxLocals(boolean isStatic, CtClass[] params, int locals) { if (!isStatic) ++locals; if (params != null) { CtClass doubleType = CtClass.doubleType; CtClass longType = CtClass.longType; int n = params.length;...
void function(boolean isStatic, CtClass[] params, int locals) { if (!isStatic) ++locals; if (params != null) { CtClass doubleType = CtClass.doubleType; CtClass longType = CtClass.longType; int n = params.length; for (int i = 0; i < n; ++i) { CtClass type = params[i]; if (type == doubleType type == longType) locals += 2...
/** * Sets <code>max_locals</code>. * * <p>This computes the number of local variables * used to pass method parameters and sets <code>max_locals</code> * to that number plus <code>locals</code>. * * @param isStatic true if <code>params</code> must be * ...
Sets <code>max_locals</code>. This computes the number of local variables used to pass method parameters and sets <code>max_locals</code> to that number plus <code>locals</code>
setMaxLocals
{ "repo_name": "erkieh/proxyhotswap", "path": "src/main/java/io/github/proxyhotswap/javassist/bytecode/Bytecode.java", "license": "gpl-2.0", "size": 42033 }
[ "io.github.proxyhotswap.javassist.CtClass" ]
import io.github.proxyhotswap.javassist.CtClass;
import io.github.proxyhotswap.javassist.*;
[ "io.github.proxyhotswap" ]
io.github.proxyhotswap;
306,443
public void addPacketInterceptor(PacketInterceptor packetInterceptor, PacketFilter packetFilter) { if (packetInterceptor == null) { throw new NullPointerException("Packet interceptor is null."); } interceptors.put(packetInterceptor, new InterceptorWrapper(packetInterc...
void function(PacketInterceptor packetInterceptor, PacketFilter packetFilter) { if (packetInterceptor == null) { throw new NullPointerException(STR); } interceptors.put(packetInterceptor, new InterceptorWrapper(packetInterceptor, packetFilter)); }
/** * Registers a packet interceptor with this connection. The interceptor will be * invoked every time a packet is about to be sent by this connection. Interceptors * may modify the packet to be sent. A packet filter determines which packets * will be delivered to the interceptor. * * @pa...
Registers a packet interceptor with this connection. The interceptor will be invoked every time a packet is about to be sent by this connection. Interceptors may modify the packet to be sent. A packet filter determines which packets will be delivered to the interceptor
addPacketInterceptor
{ "repo_name": "ErkiDerLoony/xpeter", "path": "lib/smack-3.2.1-source/org/jivesoftware/smack/Connection.java", "license": "gpl-3.0", "size": 34306 }
[ "org.jivesoftware.smack.filter.PacketFilter" ]
import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.filter.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
1,640,581
public static final void removeFolder(File path) { if (path.exists()) { if (path.isFile()) { path.delete(); } else { File[] subFiles = path.listFiles(); for (File subFile : subFiles) { removeFolder(subFile); } path.delete(); } } } private static final String[] okFileExtension...
static final void function(File path) { if (path.exists()) { if (path.isFile()) { path.delete(); } else { File[] subFiles = path.listFiles(); for (File subFile : subFiles) { removeFolder(subFile); } path.delete(); } } } private static final String[] okFileExtensions = new String[] { "jpg", "png", "gif", "jpeg" };
/** * remove folder(including sub-files) * * @param path */
remove folder(including sub-files)
removeFolder
{ "repo_name": "armstrongli/XCamera", "path": "src/com/xxboy/common/XFunction.java", "license": "gpl-2.0", "size": 5626 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,663,240
@Override protected void addParameterDefinitions(List<ParameterDefinition> paramList) { paramList.add(new ParameterDefinitionImpl(PDFToolkitConstants.PARAM_TARGET_NODE, DataTypeDefinition.NODE_REF, true, getParamDisplayLabel(PDFToolkitConstants.PARAM_TARGET_NODE))); paramList.add(new Paramet...
void function(List<ParameterDefinition> paramList) { paramList.add(new ParameterDefinitionImpl(PDFToolkitConstants.PARAM_TARGET_NODE, DataTypeDefinition.NODE_REF, true, getParamDisplayLabel(PDFToolkitConstants.PARAM_TARGET_NODE))); paramList.add(new ParameterDefinitionImpl(PDFToolkitConstants.PARAM_DESTINATION_FOLDER, ...
/** * Add parameter definitions */
Add parameter definitions
addParameterDefinitions
{ "repo_name": "ntmcminn/alfresco-pdf-toolkit", "path": "pdf-toolkit-repo/src/main/java/org/alfresco/extension/pdftoolkit/repo/action/executer/PDFAppendActionExecuter.java", "license": "gpl-2.0", "size": 2899 }
[ "java.util.List", "org.alfresco.extension.pdftoolkit.constants.PDFToolkitConstants", "org.alfresco.repo.action.ParameterDefinitionImpl", "org.alfresco.service.cmr.action.ParameterDefinition", "org.alfresco.service.cmr.dictionary.DataTypeDefinition" ]
import java.util.List; import org.alfresco.extension.pdftoolkit.constants.PDFToolkitConstants; import org.alfresco.repo.action.ParameterDefinitionImpl; import org.alfresco.service.cmr.action.ParameterDefinition; import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import java.util.*; import org.alfresco.extension.pdftoolkit.constants.*; import org.alfresco.repo.action.*; import org.alfresco.service.cmr.action.*; import org.alfresco.service.cmr.dictionary.*;
[ "java.util", "org.alfresco.extension", "org.alfresco.repo", "org.alfresco.service" ]
java.util; org.alfresco.extension; org.alfresco.repo; org.alfresco.service;
849,613
@Test public void testRead() throws IOException, UnknownWordException { File binFile = Common.getResourceAsFile( this.getClass(), "/com/medallia/word2vec/tokensModel.bin"); Word2VecModel binModel = Word2VecModel.fromBinFile(binFile); File txtFile = Common.getResourceAsFile...
void function() throws IOException, UnknownWordException { File binFile = Common.getResourceAsFile( this.getClass(), STR); Word2VecModel binModel = Word2VecModel.fromBinFile(binFile); File txtFile = Common.getResourceAsFile( this.getClass(), STR); Word2VecModel txtModel = Word2VecModel.fromTextFile(txtFile); assertEqua...
/** * Tests that the Word2VecModels created from a binary and text * representations are equivalent */
Tests that the Word2VecModels created from a binary and text representations are equivalent
testRead
{ "repo_name": "thanhnguyen12/Word2Vec", "path": "src/test/java/com/medallia/word2vec/Word2VecBinTest.java", "license": "mit", "size": 3338 }
[ "com.medallia.word2vec.Searcher", "com.medallia.word2vec.util.Common", "java.io.File", "java.io.IOException", "java.nio.file.Path", "org.junit.Assert" ]
import com.medallia.word2vec.Searcher; import com.medallia.word2vec.util.Common; import java.io.File; import java.io.IOException; import java.nio.file.Path; import org.junit.Assert;
import com.medallia.word2vec.*; import com.medallia.word2vec.util.*; import java.io.*; import java.nio.file.*; import org.junit.*;
[ "com.medallia.word2vec", "java.io", "java.nio", "org.junit" ]
com.medallia.word2vec; java.io; java.nio; org.junit;
2,170,712
private static String getScopeString( final String scopes, final String joinBy ) { List<String> array = Arrays.asList(scopes.replaceAll("\\s", "").split("[ ,]+")); Log.d(TAG, "array: " + array + " (" + array.size() + ") from " + scopes); return TextUtils.join(joinBy, array); }
static String function( final String scopes, final String joinBy ) { List<String> array = Arrays.asList(scopes.replaceAll("\\s", STR[ ,]+STRarray: STR (STR) from " + scopes); return TextUtils.join(joinBy, array); }
/** * Convert a list of scopes by space or string into an array */
Convert a list of scopes by space or string into an array
getScopeString
{ "repo_name": "MCaller/react-native-oauth", "path": "android/src/main/java/io/fullstack/oauth/OAuthManagerProviders.java", "license": "mit", "size": 8584 }
[ "android.text.TextUtils", "java.util.Arrays", "java.util.List" ]
import android.text.TextUtils; import java.util.Arrays; import java.util.List;
import android.text.*; import java.util.*;
[ "android.text", "java.util" ]
android.text; java.util;
644,078
public Node getNode() { return node; }
Node function() { return node; }
/** * Gets the node. * * @return node */
Gets the node
getNode
{ "repo_name": "git-moss/Push2Display", "path": "lib/batik-1.8/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java", "license": "lgpl-3.0", "size": 79527 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,607,613
public void flush() throws IOException { try { if(!monitor.isClosed()) { sender.flush(); } } catch(Exception cause) { if(sender != null) { monitor.error(sender); } throw new ProducerException("Error sending response", cause); } ...
void function() throws IOException { try { if(!monitor.isClosed()) { sender.flush(); } } catch(Exception cause) { if(sender != null) { monitor.error(sender); } throw new ProducerException(STR, cause); } }
/** * This method is used to flush the contents of the buffer to * the client. This method will block until such time as all of * the data has been sent to the client. If at any point there * is an error sending the content an exception is thrown. */
This method is used to flush the contents of the buffer to the client. This method will block until such time as all of the data has been sent to the client. If at any point there is an error sending the content an exception is thrown
flush
{ "repo_name": "ael-code/preston", "path": "src/org/simpleframework/http/core/CloseProducer.java", "license": "gpl-2.0", "size": 6379 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
703,028
static void processQueue(ReferenceQueue<Class<?>> queue, ConcurrentMap<? extends WeakReference<Class<?>>, ?> map) { Reference<? extends Class<?>> ref; while((ref = queue.poll()) != null) { map.remove(ref); } } ...
static void processQueue(ReferenceQueue<Class<?>> queue, ConcurrentMap<? extends WeakReference<Class<?>>, ?> map) { Reference<? extends Class<?>> ref; while((ref = queue.poll()) != null) { map.remove(ref); } } static class WeakClassKey extends WeakReference<Class<?>> { private final int hash; WeakClassKey(Class<?> cl, ...
/** * Removes from the specified map any keys that have been enqueued * on the specified reference queue. */
Removes from the specified map any keys that have been enqueued on the specified reference queue
processQueue
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "ojluni/src/main/java/java/lang/Thread.java", "license": "gpl-2.0", "size": 85488 }
[ "java.lang.ref.Reference", "java.lang.ref.ReferenceQueue", "java.lang.ref.WeakReference", "java.util.concurrent.ConcurrentMap" ]
import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.util.concurrent.ConcurrentMap;
import java.lang.ref.*; import java.util.concurrent.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
909,233
public int readFile(byte[] buf, int len, int pos, long fileOff) throws IOException { // Check if the read is within the file data range long fileLen = m_data.length; if (fileOff >= fileLen) return 0; // Calculate the actual read length if ((fileOff + len) > fileLen) len = (int...
int function(byte[] buf, int len, int pos, long fileOff) throws IOException { long fileLen = m_data.length; if (fileOff >= fileLen) return 0; if ((fileOff + len) > fileLen) len = (int) (fileLen - fileOff); System.arraycopy(m_data, (int) fileOff, buf, pos, len); m_filePos = fileOff + len; return len; }
/** * Read from the file. * * @param buf byte[] * @param len int * @param pos int * @param fileOff long * @return Length of data read. * @exception IOException */
Read from the file
readFile
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/server/filesys/pseudo/MemoryNetworkFile.java", "license": "lgpl-3.0", "size": 5872 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,106,107
void setValues(List<DataObject> values) { if (values == null) { field.setText(""); return; } Iterator<DataObject> i = values.iterator(); StringBuffer buffer = new StringBuffer(); int index = 0; int n = values.size()-1; while (i.hasN...
void setValues(List<DataObject> values) { if (values == null) { field.setText(STR, "); index++; } field.setText(buffer.toString()); }
/** * Sets the values. * * @param values The values to set. */
Sets the values
setValues
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/ui/IdentifierParamPane.java", "license": "gpl-2.0", "size": 8188 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
710,865
protected IFigure setupContentPane(IFigure nodeShape) { if (nodeShape.getLayoutManager() == null) { ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); layout.setSpacing(5); nodeShape.setLayoutManager(layout); } return nodeShape; // use nodeShape itself as contentPane }
IFigure function(IFigure nodeShape) { if (nodeShape.getLayoutManager() == null) { ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout(); layout.setSpacing(5); nodeShape.setLayoutManager(layout); } return nodeShape; }
/** * Default implementation treats passed figure as content pane. * Respects layout one may have set for generated figure. * @param nodeShape instance of generated figure class * @generated */
Default implementation treats passed figure as content pane. Respects layout one may have set for generated figure
setupContentPane
{ "repo_name": "snursmumrik/rms", "path": "ac.soton.rms.components.diagram/src/ac/soton/rms/components/diagram/edit/parts/EventBComponentEditPart.java", "license": "epl-1.0", "size": 11278 }
[ "org.eclipse.draw2d.IFigure", "org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout" ]
import org.eclipse.draw2d.IFigure; import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
import org.eclipse.draw2d.*; import org.eclipse.gmf.runtime.draw2d.ui.figures.*;
[ "org.eclipse.draw2d", "org.eclipse.gmf" ]
org.eclipse.draw2d; org.eclipse.gmf;
876,368
public List<String> getSearchableAttributeStringValuesByKey(String documentId, String key); public List<Timestamp> getSearchableAttributeDateTimeValuesByKey(String documentId, String key); public List<BigDecimal> getSearchableAttributeFloatValuesByKey(String documentId, String key); publi...
List<String> getSearchableAttributeStringValuesByKey(String documentId, String key); public List<Timestamp> getSearchableAttributeDateTimeValuesByKey(String documentId, String key); public List<BigDecimal> getSearchableAttributeFloatValuesByKey(String documentId, String key); public List<Long> function(String documentI...
/** * * This method is a more direct way to get the searchable attribute values * * @param documentId * @param key * @return */
This method is a more direct way to get the searchable attribute values
getSearchableAttributeLongValuesByKey
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-middleware/impl/src/main/java/org/kuali/rice/kew/routeheader/service/RouteHeaderService.java", "license": "apache-2.0", "size": 4613 }
[ "java.math.BigDecimal", "java.sql.Timestamp", "java.util.List" ]
import java.math.BigDecimal; import java.sql.Timestamp; import java.util.List;
import java.math.*; import java.sql.*; import java.util.*;
[ "java.math", "java.sql", "java.util" ]
java.math; java.sql; java.util;
1,486,748
@NonNull public Boolean getHandleProfiling() { VariantConfiguration config = this; if (mType.isForTesting()) { config = getTestedConfig(); checkState(config != null); } Boolean handleProfiling = config.mMergedFlavor.getTestHandleProfiling(); return...
Boolean function() { VariantConfiguration config = this; if (mType.isForTesting()) { config = getTestedConfig(); checkState(config != null); } Boolean handleProfiling = config.mMergedFlavor.getTestHandleProfiling(); return handleProfiling != null ? handleProfiling : DEFAULT_HANDLE_PROFILING; }
/** * Returns handleProfiling value to use to test this variant, or if the * variant is a test, the one to use to test the tested variant. * @return the handleProfiling value */
Returns handleProfiling value to use to test this variant, or if the variant is a test, the one to use to test the tested variant
getHandleProfiling
{ "repo_name": "consulo/consulo-android", "path": "tools-base/build-system/builder/src/main/java/com/android/builder/core/VariantConfiguration.java", "license": "apache-2.0", "size": 62290 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,058,992
public void logCloseFile(String path, INodeFile newNode) { CloseOp op = CloseOp.getInstance(cache.get()) .setPath(path) .setReplication(newNode.getFileReplication()) .setModificationTime(newNode.getModificationTime()) .setAccessTime(newNode.getAccessTime()) .setBlockSize(newNode.getP...
void function(String path, INodeFile newNode) { CloseOp op = CloseOp.getInstance(cache.get()) .setPath(path) .setReplication(newNode.getFileReplication()) .setModificationTime(newNode.getModificationTime()) .setAccessTime(newNode.getAccessTime()) .setBlockSize(newNode.getPreferredBlockSize()) .setBlocks(newNode.getBloc...
/** * Add close lease record to edit log. */
Add close lease record to edit log
logCloseFile
{ "repo_name": "cnfire/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java", "license": "apache-2.0", "size": 56758 }
[ "org.apache.hadoop.hdfs.server.namenode.FSEditLogOp" ]
import org.apache.hadoop.hdfs.server.namenode.FSEditLogOp;
import org.apache.hadoop.hdfs.server.namenode.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
635,135
public void drawForm(Canvas c, float x, float y, Paint p, int index) { if (mColors[index] == -2) return; p.setColor(mColors[index]); float half = mFormSize / 2f; switch (getForm()) { case CIRCLE: c.drawCircle(x + half, y + half, half, p); ...
void function(Canvas c, float x, float y, Paint p, int index) { if (mColors[index] == -2) return; p.setColor(mColors[index]); float half = mFormSize / 2f; switch (getForm()) { case CIRCLE: c.drawCircle(x + half, y + half, half, p); break; case SQUARE: c.drawRect(x, y, x + mFormSize, y + mFormSize, p); break; case LINE:...
/** * draws the form at the given position with the color at the given index * * @param c canvas to draw with * @param x * @param y * @param p paint to use for drawing * @param index the index of the color to use (in the colors array) */
draws the form at the given position with the color at the given index
drawForm
{ "repo_name": "PeoceWang/WeatherAPP", "path": "MPChartLib/src/com/github/mikephil/chartLibrary/utils/Legend.java", "license": "apache-2.0", "size": 13749 }
[ "android.graphics.Canvas", "android.graphics.Paint" ]
import android.graphics.Canvas; import android.graphics.Paint;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,885,635
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataByteArrayInputStream dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); BaseCommand info = (BaseCommand)o; info.setCommandId(dataIn.readInt()); info.setResponseRequired(dataIn.readBoolean()); ...
void function(OpenWireFormat wireFormat, Object o, DataByteArrayInputStream dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); BaseCommand info = (BaseCommand)o; info.setCommandId(dataIn.readInt()); info.setResponseRequired(dataIn.readBoolean()); }
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */
Un-marshal an object instance from the data input stream
looseUnmarshal
{ "repo_name": "janstey/fabric8", "path": "gateway/gateway-core/src/main/java/io/fabric8/gateway/handlers/detecting/protocol/openwire/codec/v1/BaseCommandMarshaller.java", "license": "apache-2.0", "size": 3936 }
[ "io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat", "io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BaseCommand", "java.io.IOException", "org.fusesource.hawtbuf.DataByteArrayInputStream" ]
import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat; import io.fabric8.gateway.handlers.detecting.protocol.openwire.command.BaseCommand; import java.io.IOException; import org.fusesource.hawtbuf.DataByteArrayInputStream;
import io.fabric8.gateway.handlers.detecting.protocol.openwire.codec.*; import io.fabric8.gateway.handlers.detecting.protocol.openwire.command.*; import java.io.*; import org.fusesource.hawtbuf.*;
[ "io.fabric8.gateway", "java.io", "org.fusesource.hawtbuf" ]
io.fabric8.gateway; java.io; org.fusesource.hawtbuf;
1,938,929
@SuppressWarnings("unchecked") public Type setProperty(String name, Expression expression) { SetPropertyDefinition answer = new SetPropertyDefinition(name, expression); addOutput(answer); return (Type) this; }
@SuppressWarnings(STR) Type function(String name, Expression expression) { SetPropertyDefinition answer = new SetPropertyDefinition(name, expression); addOutput(answer); return (Type) this; }
/** * Adds a processor which sets the exchange property * * @param name * the property name * @param expression * the expression used to set the property * @return the builder */
Adds a processor which sets the exchange property
setProperty
{ "repo_name": "shuliangtao/apache-camel-2.13.0-src", "path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java", "license": "apache-2.0", "size": 138060 }
[ "org.apache.camel.Expression" ]
import org.apache.camel.Expression;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
264,736
@Deprecated public DocumentWrapper<DocumentModel> getDoc( ServiceContext<IT, OT> ctx, String id) throws DocumentNotFoundException, DocumentException;
DocumentWrapper<DocumentModel> function( ServiceContext<IT, OT> ctx, String id) throws DocumentNotFoundException, DocumentException;
/** * get wrapped documentModel from the Nuxeo repository * @param ctx service context under which this method is invoked * @param id * of the document to retrieve * @throws DocumentException */
get wrapped documentModel from the Nuxeo repository
getDoc
{ "repo_name": "cherryhill/collectionspace-services", "path": "services/common/src/main/java/org/collectionspace/services/common/repository/RepositoryClient.java", "license": "apache-2.0", "size": 6135 }
[ "org.collectionspace.services.common.context.ServiceContext", "org.collectionspace.services.common.document.DocumentException", "org.collectionspace.services.common.document.DocumentNotFoundException", "org.collectionspace.services.common.document.DocumentWrapper", "org.nuxeo.ecm.core.api.DocumentModel" ]
import org.collectionspace.services.common.context.ServiceContext; import org.collectionspace.services.common.document.DocumentException; import org.collectionspace.services.common.document.DocumentNotFoundException; import org.collectionspace.services.common.document.DocumentWrapper; import org.nuxeo.ecm.core.api.Docu...
import org.collectionspace.services.common.context.*; import org.collectionspace.services.common.document.*; import org.nuxeo.ecm.core.api.*;
[ "org.collectionspace.services", "org.nuxeo.ecm" ]
org.collectionspace.services; org.nuxeo.ecm;
2,568,887
public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Obtain other dependent packages CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(Comm...
void function() { if (isInitialized) return; isInitialized = true; setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); ContextEnquiryPackage theContextEnquiryPackage = (ContextEnquiryPackage)EPackage.R...
/** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any invocation but its first.
initializePackageContents
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/edge/core/com.odcgroup.edge.t24ui.model/ecore-gen/com/odcgroup/edge/t24ui/impl/T24UIPackageImpl.java", "license": "epl-1.0", "size": 13311 }
[ "com.odcgroup.edge.t24ui.AvailableCOSPatterns", "com.odcgroup.edge.t24ui.AvailableTranslationLanguages", "com.odcgroup.edge.t24ui.BespokeCompositeScreen", "com.odcgroup.edge.t24ui.CompositeScreen", "com.odcgroup.edge.t24ui.common.CommonPackage", "com.odcgroup.edge.t24ui.contextEnquiry.ContextEnquiryPackag...
import com.odcgroup.edge.t24ui.AvailableCOSPatterns; import com.odcgroup.edge.t24ui.AvailableTranslationLanguages; import com.odcgroup.edge.t24ui.BespokeCompositeScreen; import com.odcgroup.edge.t24ui.CompositeScreen; import com.odcgroup.edge.t24ui.common.CommonPackage; import com.odcgroup.edge.t24ui.contextEnquiry.Con...
import com.odcgroup.edge.t24ui.*; import com.odcgroup.edge.t24ui.common.*; import com.odcgroup.edge.t24ui.cos.bespoke.*; import com.odcgroup.edge.t24ui.cos.pattern.*; import org.eclipse.emf.ecore.*;
[ "com.odcgroup.edge", "org.eclipse.emf" ]
com.odcgroup.edge; org.eclipse.emf;
661,041
public IReportDesign getDesignInstance( ) { ReportDesign design = new ReportDesign( (ReportDesignHandle) designHandle ); return design; }
IReportDesign function( ) { ReportDesign design = new ReportDesign( (ReportDesignHandle) designHandle ); return design; }
/** * Returns the report design * * @return the report design */
Returns the report design
getDesignInstance
{ "repo_name": "sguan-actuate/birt", "path": "engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ReportRunnable.java", "license": "epl-1.0", "size": 3821 }
[ "org.eclipse.birt.report.engine.api.script.element.IReportDesign", "org.eclipse.birt.report.engine.script.internal.element.ReportDesign", "org.eclipse.birt.report.model.api.ReportDesignHandle" ]
import org.eclipse.birt.report.engine.api.script.element.IReportDesign; import org.eclipse.birt.report.engine.script.internal.element.ReportDesign; import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.engine.api.script.element.*; import org.eclipse.birt.report.engine.script.internal.element.*; import org.eclipse.birt.report.model.api.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
1,023,948
public NotifPreferenceRow[] getAllByUserId(int userId) throws SQLException { List<NotifPreferenceRow> rows = getRows(SELECT_ALL_NOTIFPREFERENCE_WITH_GIVEN_USERID, userId); return rows.toArray(new NotifPreferenceRow[rows.size()]); } private static final String SELECT_ALL_NOTIFPREFERENCE_WITH_GIVEN_USERID ...
NotifPreferenceRow[] function(int userId) throws SQLException { List<NotifPreferenceRow> rows = getRows(SELECT_ALL_NOTIFPREFERENCE_WITH_GIVEN_USERID, userId); return rows.toArray(new NotifPreferenceRow[rows.size()]); } private static final String SELECT_ALL_NOTIFPREFERENCE_WITH_GIVEN_USERID = SELECT + NOTIFPREFERENCE_C...
/** * Returns all the NotifPreferenceRow having a given userId */
Returns all the NotifPreferenceRow having a given userId
getAllByUserId
{ "repo_name": "SilverDav/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/notification/user/client/model/NotifPreferenceTable.java", "license": "agpl-3.0", "size": 8289 }
[ "java.sql.SQLException", "java.util.List" ]
import java.sql.SQLException; import java.util.List;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
1,105,515
protected void traverse(Observer observer, Object obj, Path path) { IntrospectionContainer cont; PropertyDescriptor[] props; Object child; int i; int len; Path newPath; if (isLoggingEnabled()) getLogger().info("traverse: " + path.toString()); try { cont = Int...
void function(Observer observer, Object obj, Path path) { IntrospectionContainer cont; PropertyDescriptor[] props; Object child; int i; int len; Path newPath; if (isLoggingEnabled()) getLogger().info(STR + path.toString()); try { cont = IntrospectionHelper.introspect(obj, false); props = cont.properties; } catch (Excep...
/** * Performs the property traversal. * * @param observer the observer to use * @param obj the object to analyze * @param path the path so far */
Performs the property traversal
traverse
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/core/discovery/PropertyTraversal.java", "license": "gpl-3.0", "size": 5163 }
[ "java.beans.PropertyDescriptor", "java.lang.reflect.Array", "java.util.logging.Level" ]
import java.beans.PropertyDescriptor; import java.lang.reflect.Array; import java.util.logging.Level;
import java.beans.*; import java.lang.reflect.*; import java.util.logging.*;
[ "java.beans", "java.lang", "java.util" ]
java.beans; java.lang; java.util;
2,543,233
private String[] createArgumentsUI(Object[] argumentDescriptors, String[] currentValues){ logDebug("createArgumentsUI, currentValues = " + (currentValues == null ? "null" : currentValues.length)); Object[] argumentDescriptor; int argc = argumentDescriptors.length; String[] newArguments = new String[ar...
String[] function(Object[] argumentDescriptors, String[] currentValues){ logDebug(STR + (currentValues == null ? "null" : currentValues.length)); Object[] argumentDescriptor; int argc = argumentDescriptors.length; String[] newArguments = new String[argc]; Control lastControl = removeArgumentFieldsButton; String[] items...
/** * Create UI to enter arguments. * Return a new set of arguments to store in the meta object */
Create UI to enter arguments. Return a new set of arguments to store in the meta object
createArgumentsUI
{ "repo_name": "rpbouman/pentaho-pdi-plugin-jdbc-metadata", "path": "src/main/java/org/pentaho/di/steps/jdbcmetadata/JdbcMetaDataDialog.java", "license": "apache-2.0", "size": 44777 }
[ "org.eclipse.swt.widgets.Control", "org.pentaho.di.ui.core.widget.ComboVar" ]
import org.eclipse.swt.widgets.Control; import org.pentaho.di.ui.core.widget.ComboVar;
import org.eclipse.swt.widgets.*; import org.pentaho.di.ui.core.widget.*;
[ "org.eclipse.swt", "org.pentaho.di" ]
org.eclipse.swt; org.pentaho.di;
632,307
public boolean setReviews(List<Review> newReviews) { boolean newUnreadReviewsSeen = false; for (Review review : newReviews) { if (!review.isMarkedAsRead() && !reviewIdsNotifiedAbout.contains(review.getId())) { newUnreadReviewsSeen = true; notifyAboutNewRev...
boolean function(List<Review> newReviews) { boolean newUnreadReviewsSeen = false; for (Review review : newReviews) { if (!review.isMarkedAsRead() && !reviewIdsNotifiedAbout.contains(review.getId())) { newUnreadReviewsSeen = true; notifyAboutNewReview(review); } } this.reviews.clear(); this.reviews.addAll(newReviews); r...
/** * Updates the review store and fires an event if there is a new unread review. * * @return whether there were any new unread reviews (for which events were fired). */
Updates the review store and fires an event if there is a new unread review
setReviews
{ "repo_name": "testmycode/tmc-netbeans", "path": "tmc-plugin/src/fi/helsinki/cs/tmc/model/ReviewDb.java", "license": "gpl-2.0", "size": 2540 }
[ "fi.helsinki.cs.tmc.core.domain.Review", "java.util.List" ]
import fi.helsinki.cs.tmc.core.domain.Review; import java.util.List;
import fi.helsinki.cs.tmc.core.domain.*; import java.util.*;
[ "fi.helsinki.cs", "java.util" ]
fi.helsinki.cs; java.util;
1,079,482
public String getCurrentFormattedDate(){ java.util.Date Curdate= new java.util.Date(); String strDate = new Timestamp(Curdate.getTime())+""; try { SimpleDateFormat DATESource = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = DATESource.parse(strDate); SimpleDateFormat DATEFinis...
String function(){ java.util.Date Curdate= new java.util.Date(); String strDate = new Timestamp(Curdate.getTime())+STRyyyy-MM-dd HH:mm:ssSTRMMM d,yyyy hh:mm:ss aaSTR*ERROR*"; } return strDate; }
/** * Used to get the current system time and convert it to formatted date * @return */
Used to get the current system time and convert it to formatted date
getCurrentFormattedDate
{ "repo_name": "mannyrivera2010/HtmlWebsiteExtractor", "path": "src/org/shared/Util.java", "license": "gpl-2.0", "size": 7524 }
[ "java.sql.Timestamp", "java.util.Date" ]
import java.sql.Timestamp; import java.util.Date;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,890,300
public void newQuantity() { if (UiManager.confirm("Create a new Quantity '" + this.quantityName.getText() + '?')) { // Create a new type: QuantityType qtyType = QuantityType.create(this.quantityName.getText()); // ================= // Update the current list: this.quantityType.getItems().clear(); ...
void function() { if (UiManager.confirm(STR + this.quantityName.getText() + '?')) { QuantityType qtyType = QuantityType.create(this.quantityName.getText()); this.quantityType.getItems().clear(); this.quantityType.getItems().addAll(QuantityType.listOfNames()); this.quantityType.getSelectionModel().select(qtyType.getName...
/** * Add a new QuantityType. */
Add a new QuantityType
newQuantity
{ "repo_name": "rsanchez-wsu/RaiderPlanner", "path": "src/edu/wright/cs/raiderplanner/controller/RequirementController.java", "license": "gpl-3.0", "size": 11798 }
[ "edu.wright.cs.raiderplanner.model.QuantityType", "edu.wright.cs.raiderplanner.view.UiManager" ]
import edu.wright.cs.raiderplanner.model.QuantityType; import edu.wright.cs.raiderplanner.view.UiManager;
import edu.wright.cs.raiderplanner.model.*; import edu.wright.cs.raiderplanner.view.*;
[ "edu.wright.cs" ]
edu.wright.cs;
2,205,416
public Calendar getBegin() { throw new UnsupportedOperationException(); // return begin; }
Calendar function() { throw new UnsupportedOperationException(); }
/** * DOCUMENTATION PENDING * * @return DOCUMENTATION PENDING */
DOCUMENTATION PENDING
getBegin
{ "repo_name": "harfalm/Sakai-10.1", "path": "samigo/samigo-qti/src/java/org/sakaiproject/tool/assessment/qti/util/Iso8601TimeInterval.java", "license": "apache-2.0", "size": 12782 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
275,884
public XSObjectList getAnnotations() { return (fAnnotations != null) ? fAnnotations : XSObjectListImpl.EMPTY_LIST; }
XSObjectList function() { return (fAnnotations != null) ? fAnnotations : XSObjectListImpl.EMPTY_LIST; }
/** * Optional. Annotations. */
Optional. Annotations
getAnnotations
{ "repo_name": "FauxFaux/jdk9-jaxp", "path": "src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSNotationDecl.java", "license": "gpl-2.0", "size": 3557 }
[ "com.sun.org.apache.xerces.internal.impl.xs.util.XSObjectListImpl", "com.sun.org.apache.xerces.internal.xs.XSObjectList" ]
import com.sun.org.apache.xerces.internal.impl.xs.util.XSObjectListImpl; import com.sun.org.apache.xerces.internal.xs.XSObjectList;
import com.sun.org.apache.xerces.internal.impl.xs.util.*; import com.sun.org.apache.xerces.internal.xs.*;
[ "com.sun.org" ]
com.sun.org;
103,836
public int startVectorizedBatch(int size) throws IOException, HiveException { if (!isEnabled) { return FORWARD; // short-circuit quickly - forward all rows } else if (topN == 0) { return EXCLUDE; // short-circuit quickly - eat all rows } // Flush here if the memory usage is too high. After...
int function(int size) throws IOException, HiveException { if (!isEnabled) { return FORWARD; } else if (topN == 0) { return EXCLUDE; } if (usage > threshold) { int excluded = this.excluded; LOG.info(STR); flushInternal(); if (excluded == 0) { LOG.info(STR); isEnabled = false; return FORWARD; } } batchSize = size; if (b...
/** * Perform basic checks and initialize TopNHash for the new vectorized row batch. * @param size batch size * @return TopNHash.FORWARD if all rows should be forwarded w/o trying to call TopN; * TopNHash.EXCLUDED if all rows should be discarded w/o trying to call TopN; * any other result...
Perform basic checks and initialize TopNHash for the new vectorized row batch
startVectorizedBatch
{ "repo_name": "sankarh/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/TopNHash.java", "license": "apache-2.0", "size": 17186 }
[ "java.io.IOException", "java.util.Arrays", "org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch", "org.apache.hadoop.hive.ql.metadata.HiveException" ]
import java.io.IOException; import java.util.Arrays; import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch; import org.apache.hadoop.hive.ql.metadata.HiveException;
import java.io.*; import java.util.*; import org.apache.hadoop.hive.ql.exec.vector.*; import org.apache.hadoop.hive.ql.metadata.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,809,578
public boolean compare(StreamSource xml1, StreamSource xml2) throws PEFFileCompareException { if (templates==null) { throw new PEFFileCompareException("No template."); } pos = -1; try { File t1 = File.createTempFile("FileCompare", ".tmp"); t1.deleteOnExit(); File t2 = File.createTempFile("FileCo...
boolean function(StreamSource xml1, StreamSource xml2) throws PEFFileCompareException { if (templates==null) { throw new PEFFileCompareException(STR); } pos = -1; try { File t1 = File.createTempFile(STR, ".tmp"); t1.deleteOnExit(); File t2 = File.createTempFile(STR, ".tmp"); t2.deleteOnExit(); try { templates.newTransf...
/** * Compares two stream sources. * @param xml1 the first source * @param xml2 the second source * @return returns true if the files are equal, false otherwise * @throws PEFFileCompareException if comarison fails */
Compares two stream sources
compare
{ "repo_name": "daisy/pipeline-issues", "path": "libs/braille-utils/braille-utils.pef-tools/src/org/daisy/braille/utils/pef/PEFFileCompare.java", "license": "apache-2.0", "size": 4641 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "javax.xml.transform.TransformerConfigurationException", "javax.xml.transform.TransformerException", "javax.xml.transform.stream.StreamResult", "javax.xml.transform.stream.StreamSource" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource;
import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*;
[ "java.io", "javax.xml" ]
java.io; javax.xml;
1,933,432
@Override public boolean equals(Object object) { if (object == this ) { return true; } if (object instanceof StatisticalSummaryValues == false) { return false; } StatisticalSummaryValues stat = (StatisticalSummaryValues) object; return Prec...
boolean function(Object object) { if (object == this ) { return true; } if (object instanceof StatisticalSummaryValues == false) { return false; } StatisticalSummaryValues stat = (StatisticalSummaryValues) object; return Precision.equalsIncludingNaN(stat.getMax(), getMax()) && Precision.equalsIncludingNaN(stat.getMean(...
/** * Returns true iff <code>object</code> is a * <code>StatisticalSummaryValues</code> instance and all statistics have * the same values as this. * * @param object the object to test equality against. * @return true if object equals this */
Returns true iff <code>object</code> is a <code>StatisticalSummaryValues</code> instance and all statistics have the same values as this
equals
{ "repo_name": "virtualdataset/metagen-java", "path": "virtdata-lib-curves4/src/main/java/org/apache/commons/math4/stat/descriptive/StatisticalSummaryValues.java", "license": "apache-2.0", "size": 5718 }
[ "org.apache.commons.numbers.core.Precision" ]
import org.apache.commons.numbers.core.Precision;
import org.apache.commons.numbers.core.*;
[ "org.apache.commons" ]
org.apache.commons;
211,577
//----------------------------------------------------------------------- public MetaProperty<ImmutableTradeBundle> tradeBundle() { return _tradeBundle; }
MetaProperty<ImmutableTradeBundle> function() { return _tradeBundle; }
/** * The meta-property for the {@code tradeBundle} property. * @return the meta-property, not null */
The meta-property for the tradeBundle property
tradeBundle
{ "repo_name": "ChinaQuants/OG-Platform", "path": "sesame/sesame-function/src/main/java/com/opengamma/sesame/trade/ForwardRateAgreementTrade.java", "license": "apache-2.0", "size": 9718 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,591,256
public void setNodes(Node[] nodes);
void function(Node[] nodes);
/** * Sets the nodes of the geometry page. * * @param nodes The nodes to be set. */
Sets the nodes of the geometry page
setNodes
{ "repo_name": "shamanDevel/ProceduralTerrain", "path": "src/se/fojob/paging/interfaces/Page.java", "license": "apache-2.0", "size": 3905 }
[ "com.jme3.scene.Node" ]
import com.jme3.scene.Node;
import com.jme3.scene.*;
[ "com.jme3.scene" ]
com.jme3.scene;
313,475
public void stop() throws IgniteException { if (stopped) throw new IgniteException("Attempted to stop an already stopped JMS Streamer"); try { stopped = true; if (scheduler != null && !scheduler.isShutdown()) { scheduler.shutdown(); ...
void function() throws IgniteException { if (stopped) throw new IgniteException(STR); try { stopped = true; if (scheduler != null && !scheduler.isShutdown()) { scheduler.shutdown(); scheduler = null; } connection.stop(); connection.close(); for (Session s : sessions) { s.close(); } sessions.clear(); consumers.clear(); ...
/** * Stops streamer. */
Stops streamer
stop
{ "repo_name": "SomeFire/ignite", "path": "modules/jms11/src/main/java/org/apache/ignite/stream/jms11/JmsStreamer.java", "license": "apache-2.0", "size": 22602 }
[ "javax.jms.Session", "org.apache.ignite.IgniteException" ]
import javax.jms.Session; import org.apache.ignite.IgniteException;
import javax.jms.*; import org.apache.ignite.*;
[ "javax.jms", "org.apache.ignite" ]
javax.jms; org.apache.ignite;
1,253,295
public void setWarFile(File warFile) { this.warFile = warFile; }
void function(File warFile) { this.warFile = warFile; }
/** * Sets the war file for this container to deploy and use */
Sets the war file for this container to deploy and use
setWarFile
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-assembly/src/test/java/org/apache/geode/session/tests/ServerContainer.java", "license": "apache-2.0", "size": 14811 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,938,195
static private int getMessageData_Int(short[] protoMsg, int startIndex, int dataLength ) { logger.debug("getMessageData_Integer - start:"); ByteBuffer byteBuffer = ByteBuffer.allocate(4); byteBuffer.order(ByteOrder.LITTLE_ENDIAN); for (int byteId = 0;...
static int function(short[] protoMsg, int startIndex, int dataLength ) { logger.debug(STR); ByteBuffer byteBuffer = ByteBuffer.allocate(4); byteBuffer.order(ByteOrder.LITTLE_ENDIAN); for (int byteId = 0; byteId < dataLength; byteId++) { byteBuffer.put((byte)protoMsg[startIndex + byteId]); } Integer data = byteBuffer.ge...
/** * Returns Integer-typed specified part of specified protocol message. * @param protoMsg source message * @param startIndex start index in the message * @param dataLength number of bytes */
Returns Integer-typed specified part of specified protocol message
getMessageData_Int
{ "repo_name": "MICRORISC/iqrfsdk", "path": "libs/simply/simply-iqrf-dpa-v22x/src/main/java/com/microrisc/simply/iqrf/dpa/v22x/protocol/DPA_ProtocolProperties.java", "license": "apache-2.0", "size": 22354 }
[ "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,652,807
private static void runCheckout(@NotNull SVNUpdateClient client, @NotNull WorkingCopyFormat format, @NotNull SvnTarget source, @NotNull File destination, @Nullable SVNRevision revisi...
static void function(@NotNull SVNUpdateClient client, @NotNull WorkingCopyFormat format, @NotNull SvnTarget source, @NotNull File destination, @Nullable SVNRevision revision, @Nullable Depth depth, boolean force) throws SVNException { SvnCheckout checkoutOperation = createCheckoutOperation(client, format); checkoutOper...
/** * This is mostly inlined {@code SVNUpdateClient.doCheckout()} - to allow specifying necessary working copy format. Otherwise, if only * {@link SvnWcGeneration} is used - either svn 1.6 or svn 1.8 working copy will be created. * <p/> * See also http://issues.tmatesoft.com/issue/SVNKIT-495 for more detail...
This is mostly inlined SVNUpdateClient.doCheckout() - to allow specifying necessary working copy format. Otherwise, if only <code>SvnWcGeneration</code> is used - either svn 1.6 or svn 1.8 working copy will be created. See also HREF for more details
runCheckout
{ "repo_name": "apixandru/intellij-community", "path": "plugins/svn4idea/src/org/jetbrains/idea/svn/checkout/SvnKitCheckoutClient.java", "license": "apache-2.0", "size": 4373 }
[ "java.io.File", "org.jetbrains.annotations.NotNull", "org.jetbrains.annotations.Nullable", "org.jetbrains.idea.svn.WorkingCopyFormat", "org.jetbrains.idea.svn.api.Depth", "org.tmatesoft.svn.core.SVNException", "org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec", "org.tmatesoft.svn.core.wc.SVNRevisio...
import java.io.File; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.idea.svn.WorkingCopyFormat; import org.jetbrains.idea.svn.api.Depth; import org.tmatesoft.svn.core.SVNException; import org.tmatesoft.svn.core.internal.wc2.compat.SvnCodec; import org.tmatesoft...
import java.io.*; import org.jetbrains.annotations.*; import org.jetbrains.idea.svn.*; import org.jetbrains.idea.svn.api.*; import org.tmatesoft.svn.core.*; import org.tmatesoft.svn.core.internal.wc2.compat.*; import org.tmatesoft.svn.core.wc.*; import org.tmatesoft.svn.core.wc2.*;
[ "java.io", "org.jetbrains.annotations", "org.jetbrains.idea", "org.tmatesoft.svn" ]
java.io; org.jetbrains.annotations; org.jetbrains.idea; org.tmatesoft.svn;
955,056
public void testExceptionFillIn() { Exception e=new Exception("foo"); AxisFault af=AxisFault.makeFault(e); Element stackTrace; stackTrace = af.lookupFaultDetail(Constants.QNAME_FAULTDETAIL_STACKTRACE); assertNotNull(stackTrace); Element exceptionName; exceptio...
void function() { Exception e=new Exception("foo"); AxisFault af=AxisFault.makeFault(e); Element stackTrace; stackTrace = af.lookupFaultDetail(Constants.QNAME_FAULTDETAIL_STACKTRACE); assertNotNull(stackTrace); Element exceptionName; exceptionName = af.lookupFaultDetail(Constants.QNAME_FAULTDETAIL_EXCEPTIONNAME); asser...
/** * test that exceptions are filled in */
test that exceptions are filled in
testExceptionFillIn
{ "repo_name": "hugosato/apache-axis", "path": "test/faults/TestAxisFault.java", "license": "apache-2.0", "size": 5021 }
[ "javax.xml.namespace.QName", "org.apache.axis.AxisFault", "org.apache.axis.Constants", "org.w3c.dom.Element" ]
import javax.xml.namespace.QName; import org.apache.axis.AxisFault; import org.apache.axis.Constants; import org.w3c.dom.Element;
import javax.xml.namespace.*; import org.apache.axis.*; import org.w3c.dom.*;
[ "javax.xml", "org.apache.axis", "org.w3c.dom" ]
javax.xml; org.apache.axis; org.w3c.dom;
567,869
public DescribeRecordResponseType getRecordDescription(DescribeRecordType request) throws ServiceExceptionReport;
DescribeRecordResponseType function(DescribeRecordType request) throws ServiceExceptionReport;
/** * Invokes the CSW RecordDescription service operation. * * @param request * @return * @throws be.kzen.ergorr.interfaces.soap.ServiceExceptionReport */
Invokes the CSW RecordDescription service operation
getRecordDescription
{ "repo_name": "IntecsSPA/buddata-ebxml-registry", "path": "ErgoRR/ErgoRR-jaxb/src/main/java/be/kzen/ergorr/interfaces/soap/csw/CswClient.java", "license": "gpl-3.0", "size": 3609 }
[ "be.kzen.ergorr.model.csw.DescribeRecordResponseType", "be.kzen.ergorr.model.csw.DescribeRecordType" ]
import be.kzen.ergorr.model.csw.DescribeRecordResponseType; import be.kzen.ergorr.model.csw.DescribeRecordType;
import be.kzen.ergorr.model.csw.*;
[ "be.kzen.ergorr" ]
be.kzen.ergorr;
1,153,246
@Override public boolean equals(final Object object) { if(object == this) { return true; } else if(!(object instanceof ClassFile)) { return false; } else if(getMinorVersion() != ClassFile.class.cast(object).getMinorVersion()) { return false; } else if(getMajorVersion() != ClassFile.class.cast(objec...
boolean function(final Object object) { if(object == this) { return true; } else if(!(object instanceof ClassFile)) { return false; } else if(getMinorVersion() != ClassFile.class.cast(object).getMinorVersion()) { return false; } else if(getMajorVersion() != ClassFile.class.cast(object).getMajorVersion()) { return false...
/** * Compares {@code object} to this {@code ClassFile} instance for equality. * <p> * Returns {@code true} if, and only if, {@code object} is an instance of {@code ClassFile}, and their respective values are equal, {@code false} otherwise. * * @param object the {@code Object} to compare to this {@code Class...
Compares object to this ClassFile instance for equality. Returns true if, and only if, object is an instance of ClassFile, and their respective values are equal, false otherwise
equals
{ "repo_name": "macroing/CEL4J", "path": "src/main/java/org/macroing/cel4j/java/binary/classfile/ClassFile.java", "license": "gpl-3.0", "size": 70607 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
587,865
public String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations);
String function(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations);
/** * Get the where clause part of any joins * (optional operation) */
Get the where clause part of any joins (optional operation)
whereJoinFragment
{ "repo_name": "kevin-chen-hw/LDAE", "path": "com.huawei.soa.ldae/src/main/java/org/hibernate/persister/entity/Joinable.java", "license": "lgpl-2.1", "size": 3651 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,500,328
public Double getHVMShadowMultiplier(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "VM.get_HVM_shadow_multiplier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshal...
Double function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = ...
/** * Get the HVM/shadow_multiplier field of the given VM. * * @return value of the field */
Get the HVM/shadow_multiplier field of the given VM
getHVMShadowMultiplier
{ "repo_name": "cinderella/incubator-cloudstack", "path": "deps/XenServerJava/com/xensource/xenapi/VM.java", "license": "apache-2.0", "size": 169722 }
[ "com.xensource.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.xensource.xenapi", "java.util", "org.apache.xmlrpc" ]
com.xensource.xenapi; java.util; org.apache.xmlrpc;
1,830,712
public void setAll(int index, Collection<? extends Integer> items) { rangeCheck(index, index + items.size()); for (int e : items) { elements[index++] = e; } }
void function(int index, Collection<? extends Integer> items) { rangeCheck(index, index + items.size()); for (int e : items) { elements[index++] = e; } }
/** * Sets a range of elements of this array. * * @param index * The index of the first element to set. * @param items * The values to set. * @throws IndexOutOfBoundsException * if * <code>index &lt; 0 || index + items.size() &gt; size()</code>. ...
Sets a range of elements of this array
setAll
{ "repo_name": "bwkimmel/java-util", "path": "src/main/java/ca/eandb/util/IntegerArray.java", "license": "mit", "size": 15081 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,649,312
private void setTangoListeners() { // Lock configuration and connect to Tango // Select coordinate frame pair final ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>(); framePairs.add(new TangoCoordinateFramePair( TangoPoseData.C...
void function() { final ArrayList<TangoCoordinateFramePair> framePairs = new ArrayList<TangoCoordinateFramePair>(); framePairs.add(new TangoCoordinateFramePair( TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE, TangoPoseData.COORDINATE_FRAME_DEVICE)); mTango.connectListener(framePairs, new OnTangoUpdateListener() {
/** * Set up the callback listeners for the Tango service, then begin using the Motion * Tracking API. This is called in response to the user clicking the 'Start' Button. */
Set up the callback listeners for the Tango service, then begin using the Motion Tracking API. This is called in response to the user clicking the 'Start' Button
setTangoListeners
{ "repo_name": "Kupoko/Tiresias", "path": "MotionTrackingJava/app/src/main/java/com/projecttango/experiments/javamotiontracking/MotionTrackingActivity.java", "license": "apache-2.0", "size": 14716 }
[ "com.google.atap.tangoservice.Tango", "com.google.atap.tangoservice.TangoCoordinateFramePair", "com.google.atap.tangoservice.TangoPoseData", "java.util.ArrayList" ]
import com.google.atap.tangoservice.Tango; import com.google.atap.tangoservice.TangoCoordinateFramePair; import com.google.atap.tangoservice.TangoPoseData; import java.util.ArrayList;
import com.google.atap.tangoservice.*; import java.util.*;
[ "com.google.atap", "java.util" ]
com.google.atap; java.util;
2,338,442
public ArrayList<String> getFields() { ArrayList<String> fields = new ArrayList<String>(); fields.add("id"); fields.add("name"); fields.add("combatType"); fields.add("offense"); fields.add("defense"); fields.add("baseHealth"); fields.add("foodCost"); fields.add("woodCost"); fields.add("...
ArrayList<String> function() { ArrayList<String> fields = new ArrayList<String>(); fields.add("id"); fields.add("name"); fields.add(STR); fields.add(STR); fields.add(STR); fields.add(STR); fields.add(STR); fields.add(STR); fields.add(STR); fields.add(STR); fields.add(STR); fields.add(STR); fields.add(STR); fields.add(S...
/** * Method which returns this Data Type's fields. * @return ArrayList of Strings containing the names of this Data Type's fields. */
Method which returns this Data Type's fields
getFields
{ "repo_name": "josephdelong/asc_java", "path": "asc_java/src/dataTypes/UnitType.java", "license": "gpl-2.0", "size": 12938 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
112,051