method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static int cardinalityInBitmapRange(LongBuffer bitmap, int start, int end) { if (isBackedBySimpleArray(bitmap)) { return Util.cardinalityInBitmapRange(bitmap.array(), start, end); } if (start >= end) { return 0; } int firstword = start / 64; int endword = (end - 1) / 64; ...
static int function(LongBuffer bitmap, int start, int end) { if (isBackedBySimpleArray(bitmap)) { return Util.cardinalityInBitmapRange(bitmap.array(), start, end); } if (start >= end) { return 0; } int firstword = start / 64; int endword = (end - 1) / 64; if (firstword == endword) { return Long.bitCount(bitmap.get(firs...
/** * Hamming weight of the bitset in the range * start, start+1,..., end-1 * * @param bitmap array of words representing a bitset * @param start first index (inclusive) * @param end last index (exclusive) * @return the hamming weight of the corresponding range */
Hamming weight of the bitset in the range start, start+1,..., end-1
cardinalityInBitmapRange
{ "repo_name": "lemire/RoaringBitmap", "path": "RoaringBitmap/src/main/java/org/roaringbitmap/buffer/BufferUtil.java", "license": "apache-2.0", "size": 32181 }
[ "java.nio.LongBuffer", "org.roaringbitmap.Util" ]
import java.nio.LongBuffer; import org.roaringbitmap.Util;
import java.nio.*; import org.roaringbitmap.*;
[ "java.nio", "org.roaringbitmap" ]
java.nio; org.roaringbitmap;
464,299
@Override public Request<ReplaceNetworkAclEntryRequest> getDryRunRequest() { Request<ReplaceNetworkAclEntryRequest> request = new ReplaceNetworkAclEntryRequestMarshaller() .marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; }
Request<ReplaceNetworkAclEntryRequest> function() { Request<ReplaceNetworkAclEntryRequest> request = new ReplaceNetworkAclEntryRequestMarshaller() .marshall(this); request.addParameter(STR, Boolean.toString(true)); return request; }
/** * This method is intended for internal use only. Returns the marshaled * request configured with additional parameters to enable operation * dry-run. */
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run
getDryRunRequest
{ "repo_name": "mhurne/aws-sdk-java", "path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/ReplaceNetworkAclEntryRequest.java", "license": "apache-2.0", "size": 18496 }
[ "com.amazonaws.Request", "com.amazonaws.services.ec2.model.transform.ReplaceNetworkAclEntryRequestMarshaller" ]
import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.ReplaceNetworkAclEntryRequestMarshaller;
import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*;
[ "com.amazonaws", "com.amazonaws.services" ]
com.amazonaws; com.amazonaws.services;
2,894,939
@Bean public ProjectApiErrors getProjectApiErrors() { return new DefaultApiErrorsImpl(); }
ProjectApiErrors function() { return new DefaultApiErrorsImpl(); }
/** * TODO un enum-ify this so errors can be created in individuals modules and gathered dynamically * here */
TODO un enum-ify this so errors can be created in individuals modules and gathered dynamically here
getProjectApiErrors
{ "repo_name": "Nike-Inc/cerberus-management-service", "path": "cerberus-web/src/main/java/com/nike/cerberus/config/ApplicationConfiguration.java", "license": "apache-2.0", "size": 13298 }
[ "com.nike.backstopper.apierror.projectspecificinfo.ProjectApiErrors", "com.nike.cerberus.error.DefaultApiErrorsImpl" ]
import com.nike.backstopper.apierror.projectspecificinfo.ProjectApiErrors; import com.nike.cerberus.error.DefaultApiErrorsImpl;
import com.nike.backstopper.apierror.projectspecificinfo.*; import com.nike.cerberus.error.*;
[ "com.nike.backstopper", "com.nike.cerberus" ]
com.nike.backstopper; com.nike.cerberus;
462,617
@Override public void PasteDone() { // As soon as one paste operation is done // we know that the next copy should not keep the old selection addingToSelection = false; // Deselect cutted objects still in clipboard for (ClipboardSelection clipObject : objectsInClipboard) { if (clipObject.i...
void function() { addingToSelection = false; for (ClipboardSelection clipObject : objectsInClipboard) { if (clipObject.isCutted()) { clipObject.setSelected(false); } } }
/** * When paste is done. */
When paste is done
PasteDone
{ "repo_name": "auroreallibe/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/clipboard/service/MainClipboardService.java", "license": "agpl-3.0", "size": 10562 }
[ "org.silverpeas.core.clipboard.ClipboardSelection" ]
import org.silverpeas.core.clipboard.ClipboardSelection;
import org.silverpeas.core.clipboard.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
1,437,402
private ColumnReverseDictionaryInfo getColumnReverseDictionaryInfo( DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier, String columnIdentifier) { ColumnReverseDictionaryInfo columnReverseDictionaryInfo = (ColumnReverseDictionaryInfo) carbonLRUCache .get(getLruCacheKey(col...
ColumnReverseDictionaryInfo function( DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier, String columnIdentifier) { ColumnReverseDictionaryInfo columnReverseDictionaryInfo = (ColumnReverseDictionaryInfo) carbonLRUCache .get(getLruCacheKey(columnIdentifier, CacheType.REVERSE_DICTIONARY)); if (null == col...
/** * This method will check and create columnReverseDictionaryInfo object for the given column * * @param dictionaryColumnUniqueIdentifier * @param columnIdentifier * @return */
This method will check and create columnReverseDictionaryInfo object for the given column
getColumnReverseDictionaryInfo
{ "repo_name": "manishgupta88/carbondata", "path": "core/src/main/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCache.java", "license": "apache-2.0", "size": 11378 }
[ "org.apache.carbondata.core.cache.CacheType" ]
import org.apache.carbondata.core.cache.CacheType;
import org.apache.carbondata.core.cache.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
815,272
@Override public void close() throws IOException { Preconditions.checkArgument(namesystem.hasWriteLock()); lock.lock(); try { if (shutdown) return; // Since we hold both the FSN write lock and the CRM lock here, // we know that the CRM thread cannot be currently modifying // the ...
void function() throws IOException { Preconditions.checkArgument(namesystem.hasWriteLock()); lock.lock(); try { if (shutdown) return; shutdown = true; doRescan.signalAll(); scanFinished.signalAll(); } finally { lock.unlock(); } }
/** * Shut down the monitor thread. */
Shut down the monitor thread
close
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/CacheReplicationMonitor.java", "license": "apache-2.0", "size": 30352 }
[ "com.google.common.base.Preconditions", "java.io.IOException" ]
import com.google.common.base.Preconditions; import java.io.IOException;
import com.google.common.base.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
249,524
@Test public void testFindExecutionsResponseSerialization() throws IOException { DXJSON.safeTreeToValue( DXJSON.parseJson("{\"results\":[{\"id\": \"job-000000000000000000000000\"}]}"), DXSearch.FindExecutionsResponse.class); // Extra fields in the response should...
void function() throws IOException { DXJSON.safeTreeToValue( DXJSON.parseJson("{\"results\":[{\"id\STRjob-000000000000000000000000\"}]}"), DXSearch.FindExecutionsResponse.class); DXJSON.safeTreeToValue( DXJSON.parseJson("{\"notAField\STRresults\":[{\"id\STRjob-000000000000000000000000\STRnotAField\STR), DXSearch.FindEx...
/** * Tests deserialization of findExecutions results without making real API calls. */
Tests deserialization of findExecutions results without making real API calls
testFindExecutionsResponseSerialization
{ "repo_name": "dnanexus/dx-toolkit", "path": "src/java/src/test/java/com/dnanexus/DXSearchTest.java", "license": "apache-2.0", "size": 51968 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
188,806
public JSONObject registerUser(String firstname,String lastname, String username, String email, String password, String gender, String blood_type, String rhesus){ // Building Parameters List<NameValuePair> params = new ArrayList<>(); params.add(new BasicNameValuePair("tag", register_tag)); ...
JSONObject function(String firstname,String lastname, String username, String email, String password, String gender, String blood_type, String rhesus){ List<NameValuePair> params = new ArrayList<>(); params.add(new BasicNameValuePair("tag", register_tag)); params.add(new BasicNameValuePair(STR, firstname)); params.add(...
/** * Function to Register **/
Function to Register
registerUser
{ "repo_name": "yudiandreanp/SocioBlood", "path": "app/src/main/java/com/example/yudiandrean/socioblood/databases/UserFunctions.java", "license": "apache-2.0", "size": 5203 }
[ "java.util.ArrayList", "java.util.List", "org.apache.http.NameValuePair", "org.apache.http.message.BasicNameValuePair", "org.json.JSONObject" ]
import java.util.ArrayList; import java.util.List; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.json.JSONObject;
import java.util.*; import org.apache.http.*; import org.apache.http.message.*; import org.json.*;
[ "java.util", "org.apache.http", "org.json" ]
java.util; org.apache.http; org.json;
2,070,001
@BeforeClass public static void setup() throws Exception { DashboardConfiguration config = new DashboardConfiguration(); Repository repo = new Repository(); String repoId = null; String checkoutDir = new File( "./target/test-classes/unit" ).getCanonicalPath(); String ...
static void function() throws Exception { DashboardConfiguration config = new DashboardConfiguration(); Repository repo = new Repository(); String repoId = null; String checkoutDir = new File( STR ).getCanonicalPath(); String localBasePath = checkoutDir + STR; ResourceBundle.COUNTER.set( -1 ); bundle = new ResourceBund...
/** * Setup a resource bundle for testing. * @throws Exception any error */
Setup a resource bundle for testing
setup
{ "repo_name": "adangel/yal10n", "path": "src/test/java/net/sf/yal10n/analyzer/ResourceBundleTest.java", "license": "apache-2.0", "size": 6768 }
[ "java.io.File", "net.sf.yal10n.settings.DashboardConfiguration", "net.sf.yal10n.settings.Repository", "net.sf.yal10n.svn.SVNUtilMock" ]
import java.io.File; import net.sf.yal10n.settings.DashboardConfiguration; import net.sf.yal10n.settings.Repository; import net.sf.yal10n.svn.SVNUtilMock;
import java.io.*; import net.sf.yal10n.settings.*; import net.sf.yal10n.svn.*;
[ "java.io", "net.sf.yal10n" ]
java.io; net.sf.yal10n;
936,080
public interface Executable extends Runnable { @Nonnull SubTask getParent();
interface Executable extends Runnable { @Nonnull SubTask function();
/** * Task from which this executable was created. * * <p> * Since this method went through a signature change in 1.377, the invocation may results in * {@link AbstractMethodError}. * Use {@link Executables#getParentOf(Queue.Executable)} that avoids this. *...
Task from which this executable was created. Since this method went through a signature change in 1.377, the invocation may results in <code>AbstractMethodError</code>. Use <code>Executables#getParentOf(Queue.Executable)</code> that avoids this
getParent
{ "repo_name": "dariver/jenkins", "path": "core/src/main/java/hudson/model/Queue.java", "license": "mit", "size": 112142 }
[ "hudson.model.queue.SubTask", "javax.annotation.Nonnull" ]
import hudson.model.queue.SubTask; import javax.annotation.Nonnull;
import hudson.model.queue.*; import javax.annotation.*;
[ "hudson.model.queue", "javax.annotation" ]
hudson.model.queue; javax.annotation;
2,501,475
Optional<PluginId> findPluginForClass(Class<?> clazz);
Optional<PluginId> findPluginForClass(Class<?> clazz);
/** * Finds the plugin id which corresponds to the supplied class name. * @param clazz the class to look for * @return the plugin id for this class. */
Finds the plugin id which corresponds to the supplied class name
findPluginForClass
{ "repo_name": "gradle/gradle", "path": "subprojects/core/src/main/java/org/gradle/api/internal/plugins/PluginRegistry.java", "license": "apache-2.0", "size": 1653 }
[ "java.util.Optional", "org.gradle.plugin.use.PluginId" ]
import java.util.Optional; import org.gradle.plugin.use.PluginId;
import java.util.*; import org.gradle.plugin.use.*;
[ "java.util", "org.gradle.plugin" ]
java.util; org.gradle.plugin;
1,317,063
public static HttpResponse fromEvent(ResponseHeaders headers, ServerSentEvent sse, HttpHeaders trailers) { requireNonNull(headers, "headers"); requireNonNull(sse, "sse"); requireNonNull(trailers, "trailers"); return HttpResponse.of(sanitizeHeaders(headers), toHttpData(sse), trailers)...
static HttpResponse function(ResponseHeaders headers, ServerSentEvent sse, HttpHeaders trailers) { requireNonNull(headers, STR); requireNonNull(sse, "sse"); requireNonNull(trailers, STR); return HttpResponse.of(sanitizeHeaders(headers), toHttpData(sse), trailers); }
/** * Creates a new Server-Sent Events stream of the specified {@code content}. * * @param headers the HTTP headers supposed to send * @param sse the {@link ServerSentEvent} object supposed to send as contents * @param trailers the HTTP trailers */
Creates a new Server-Sent Events stream of the specified content
fromEvent
{ "repo_name": "line/armeria", "path": "core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java", "license": "apache-2.0", "size": 18326 }
[ "com.linecorp.armeria.common.HttpHeaders", "com.linecorp.armeria.common.HttpResponse", "com.linecorp.armeria.common.ResponseHeaders", "com.linecorp.armeria.common.sse.ServerSentEvent", "java.util.Objects" ]
import com.linecorp.armeria.common.HttpHeaders; import com.linecorp.armeria.common.HttpResponse; import com.linecorp.armeria.common.ResponseHeaders; import com.linecorp.armeria.common.sse.ServerSentEvent; import java.util.Objects;
import com.linecorp.armeria.common.*; import com.linecorp.armeria.common.sse.*; import java.util.*;
[ "com.linecorp.armeria", "java.util" ]
com.linecorp.armeria; java.util;
1,969,901
@Nonnull public java.util.concurrent.CompletableFuture<DetectedApp> putAsync(@Nonnull final DetectedApp newDetectedApp) { return sendAsync(HttpMethod.PUT, newDetectedApp); }
java.util.concurrent.CompletableFuture<DetectedApp> function(@Nonnull final DetectedApp newDetectedApp) { return sendAsync(HttpMethod.PUT, newDetectedApp); }
/** * Creates a DetectedApp with a new object * * @param newDetectedApp the object to create/update * @return a future with the result */
Creates a DetectedApp with a new object
putAsync
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/DetectedAppRequest.java", "license": "mit", "size": 5884 }
[ "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.DetectedApp", "javax.annotation.Nonnull" ]
import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.DetectedApp; import javax.annotation.Nonnull;
import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
2,005,601
private void setupFragments(Bundle savedInstanceState) { int type = 0; int position = 0; threadId = 0; if (savedInstanceState != null) { type = savedInstanceState.getInt(KEY_TYPE, 0); position = savedInstanceState.getInt(KEY_POSITION, 0); threadId...
void function(Bundle savedInstanceState) { int type = 0; int position = 0; threadId = 0; if (savedInstanceState != null) { type = savedInstanceState.getInt(KEY_TYPE, 0); position = savedInstanceState.getInt(KEY_POSITION, 0); threadId = savedInstanceState.getLong(KEY_THREADID, 0); } menuFragment = new ConversationListFr...
/** * Sets up menu and content fragments * If the fragments are stored in the bundle, use those. Otherwise, instantiate new ones */
Sets up menu and content fragments If the fragments are stored in the bundle, use those. Otherwise, instantiate new ones
setupFragments
{ "repo_name": "mortonfox/qksms", "path": "QKSMS/src/main/java/com/moez/QKSMS/ui/MainActivity.java", "license": "gpl-3.0", "size": 29052 }
[ "android.os.Bundle", "com.moez.QKSMS" ]
import android.os.Bundle; import com.moez.QKSMS;
import android.os.*; import com.moez.*;
[ "android.os", "com.moez" ]
android.os; com.moez;
212,127
private String getStateTime(int[] heatpumpValues) { String returnValue = ""; //$NON-NLS-1$ // for a long time create a date if (heatpumpValues[118] == 2) { long value = heatpumpValues[95]; if (value < 0) value = 0; Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(value * 1000L); re...
String function(int[] heatpumpValues) { String returnValue = ""; if (heatpumpValues[118] == 2) { long value = heatpumpValues[95]; if (value < 0) value = 0; Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(value * 1000L); returnValue += sdateformat.format(cal.getTime()); } else { int value = heatpumpValues[120...
/** * generate a readable string containing the time since the heatpump is in * the state. * * @param heatpumpValues * the internal state array of the heatpump * @return a human readable time string */
generate a readable string containing the time since the heatpump is in the state
getStateTime
{ "repo_name": "MCherifiOSS/openhab", "path": "bundles/binding/org.openhab.binding.novelanheatpump/src/main/java/org/openhab/binding/novelanheatpump/internal/HeatPumpBinding.java", "license": "epl-1.0", "size": 17358 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,651,421
@Test public void whenDeletePositionThenArrayWithoutThisPosition() { SimpleArray<String> simple = new SimpleArray<>(); for (int i = 0; i < 25; i++) { simple.add(String.valueOf(i)); } simple.delete(22); simple.delete(23); assertThat(simple.get(19), is("...
void function() { SimpleArray<String> simple = new SimpleArray<>(); for (int i = 0; i < 25; i++) { simple.add(String.valueOf(i)); } simple.delete(22); simple.delete(23); assertThat(simple.get(19), is("19")); assertThat(simple.get(20), is("20")); assertThat(simple.get(21), is("21")); assertThat(simple.get(22), is("23"))...
/** * Test method. */
Test method
whenDeletePositionThenArrayWithoutThisPosition
{ "repo_name": "AnastasiaGladun/agladun", "path": "chapter_005/src/test/java/ru.job4j/collections/pro/generic/SimpleArrayTest.java", "license": "apache-2.0", "size": 2575 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
1,853,693
private final void playLive() throws IOException { // change state subscriberStream.setState(StreamState.PLAYING); streamOffset = 0; streamStartTS.set(-1); IMessageInput in = msgInReference.get(); IMessageOutput out = msgOutReference.get(); if (in != null && o...
final void function() throws IOException { subscriberStream.setState(StreamState.PLAYING); streamOffset = 0; streamStartTS.set(-1); IMessageInput in = msgInReference.get(); IMessageOutput out = msgOutReference.get(); if (in != null && out != null) { IBroadcastStream stream = (IBroadcastStream) ((IBroadcastScope) in).ge...
/** * Performs the processes needed for live streams. The following items are sent if they exist: * <ul> * <li>Metadata</li> * <li>Decoder configurations (ie. AVC codec)</li> * <li>Most recent keyframe</li> * </ul> * * @throws IOException */
Performs the processes needed for live streams. The following items are sent if they exist: Metadata Decoder configurations (ie. AVC codec) Most recent keyframe
playLive
{ "repo_name": "maritelle/red5-server-common", "path": "src/main/java/org/red5/server/stream/PlayEngine.java", "license": "apache-2.0", "size": 82267 }
[ "java.io.IOException", "org.apache.mina.core.buffer.IoBuffer", "org.red5.codec.IAudioStreamCodec", "org.red5.codec.IStreamCodecInfo", "org.red5.codec.IVideoStreamCodec", "org.red5.codec.StreamCodecInfo", "org.red5.server.api.scope.IBroadcastScope", "org.red5.server.api.stream.IBroadcastStream", "org...
import java.io.IOException; import org.apache.mina.core.buffer.IoBuffer; import org.red5.codec.IAudioStreamCodec; import org.red5.codec.IStreamCodecInfo; import org.red5.codec.IVideoStreamCodec; import org.red5.codec.StreamCodecInfo; import org.red5.server.api.scope.IBroadcastScope; import org.red5.server.api.stream.IB...
import java.io.*; import org.apache.mina.core.buffer.*; import org.red5.codec.*; import org.red5.server.api.scope.*; import org.red5.server.api.stream.*; import org.red5.server.messaging.*; import org.red5.server.net.rtmp.event.*; import org.red5.server.stream.message.*;
[ "java.io", "org.apache.mina", "org.red5.codec", "org.red5.server" ]
java.io; org.apache.mina; org.red5.codec; org.red5.server;
594,936
@Test public void registerTransformWithUnregisteredChildren() throws IOException { Create.Values<Long> create = Create.of(1L, 2L, 3L); GenerateSequence createChild = GenerateSequence.from(0); PCollection<Long> pt = pipeline.apply(create); String userName = "my_transform"; String childUserName =...
void function() throws IOException { Create.Values<Long> create = Create.of(1L, 2L, 3L); GenerateSequence createChild = GenerateSequence.from(0); PCollection<Long> pt = pipeline.apply(create); String userName = STR; String childUserName = STR; AppliedPTransform<?, ?, ?> transform = AppliedPTransform.<PBegin, PCollectio...
/** * Tests that trying to register a transform which has unregistered children throws. */
Tests that trying to register a transform which has unregistered children throws
registerTransformWithUnregisteredChildren
{ "repo_name": "jbonofre/beam", "path": "runners/core-construction-java/src/test/java/org/apache/beam/runners/core/construction/SdkComponentsTest.java", "license": "apache-2.0", "size": 9899 }
[ "java.io.IOException", "java.util.Collections", "org.apache.beam.sdk.io.GenerateSequence", "org.apache.beam.sdk.runners.AppliedPTransform", "org.apache.beam.sdk.transforms.Create", "org.apache.beam.sdk.values.PBegin", "org.apache.beam.sdk.values.PCollection" ]
import java.io.IOException; import java.util.Collections; import org.apache.beam.sdk.io.GenerateSequence; import org.apache.beam.sdk.runners.AppliedPTransform; import org.apache.beam.sdk.transforms.Create; import org.apache.beam.sdk.values.PBegin; import org.apache.beam.sdk.values.PCollection;
import java.io.*; import java.util.*; import org.apache.beam.sdk.io.*; import org.apache.beam.sdk.runners.*; import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.values.*;
[ "java.io", "java.util", "org.apache.beam" ]
java.io; java.util; org.apache.beam;
147,558
@Test public void testReadyForEventsNotCalledImplicitlyWithCacheXML() throws InterruptedException { try { setPeriodicACKObserver(durableClientVM); final String cqName = "cqTest"; // Start a server server1Port = this.server1VM.invoke(() -> CacheServerTestUtil.createCacheServerFr...
void function() throws InterruptedException { try { setPeriodicACKObserver(durableClientVM); final String cqName = STR; server1Port = this.server1VM.invoke(() -> CacheServerTestUtil.createCacheServerFromXml( DurableClientTestBase.class.getResource(STR))); final String durableClientId = getName() + STR; this.durableClie...
/** * This test method is disabled because it is failing periodically and causing cruise control * failures See bug #47060 (test seems to be enabled now!) */
This test method is disabled because it is failing periodically and causing cruise control failures See bug #47060 (test seems to be enabled now!)
testReadyForEventsNotCalledImplicitlyWithCacheXML
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DurableClientCQDUnitTest.java", "license": "apache-2.0", "size": 41524 }
[ "org.apache.geode.test.dunit.VM" ]
import org.apache.geode.test.dunit.VM;
import org.apache.geode.test.dunit.*;
[ "org.apache.geode" ]
org.apache.geode;
250,742
public void updateActions(List actionIds) { for (Iterator ids = actionIds.iterator(); ids.hasNext();) { IAction action = getActionRegistry().getAction(ids.next()); if (null != action && action instanceof UpdateAction) ((UpdateAction) action).update(); } }
void function(List actionIds) { for (Iterator ids = actionIds.iterator(); ids.hasNext();) { IAction action = getActionRegistry().getAction(ids.next()); if (null != action && action instanceof UpdateAction) ((UpdateAction) action).update(); } }
/** * Updates the specified actions, if they are UpdateActions * * @param actionIds * the list of ids of actions to update */
Updates the specified actions, if they are UpdateActions
updateActions
{ "repo_name": "gmussbacher/seg.jUCMNav", "path": "src/seg/jUCMNav/editors/actionContributors/ActionRegistryManager.java", "license": "epl-1.0", "size": 42148 }
[ "java.util.Iterator", "java.util.List", "org.eclipse.gef.ui.actions.UpdateAction", "org.eclipse.jface.action.IAction" ]
import java.util.Iterator; import java.util.List; import org.eclipse.gef.ui.actions.UpdateAction; import org.eclipse.jface.action.IAction;
import java.util.*; import org.eclipse.gef.ui.actions.*; import org.eclipse.jface.action.*;
[ "java.util", "org.eclipse.gef", "org.eclipse.jface" ]
java.util; org.eclipse.gef; org.eclipse.jface;
603,480
public void expectOnConfigurationChange(long timeout) throws InterruptedException { if (Thread.currentThread() == getMainLooper().getThread()) { throw new IllegalStateException("Method cannot be called on the Activity's UI thread"); } mOnConfigurationChangeSemaphore.tryAcquire(t...
void function(long timeout) throws InterruptedException { if (Thread.currentThread() == getMainLooper().getThread()) { throw new IllegalStateException(STR); } mOnConfigurationChangeSemaphore.tryAcquire(timeout, TimeUnit.MILLISECONDS); }
/** * Blocks until a single configuration change has been received. * <p> * Configuration changes are sticky; if any configuration changes were received prior to * calling this method and {@link #resetOnConfigurationChange()} has not been called, this * method will return immediately. * ...
Blocks until a single configuration change has been received. Configuration changes are sticky; if any configuration changes were received prior to calling this method and <code>#resetOnConfigurationChange()</code> has not been called, this method will return immediately
expectOnConfigurationChange
{ "repo_name": "AndroidX/androidx", "path": "appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/NightModeActivity.java", "license": "apache-2.0", "size": 6613 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
708,187
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> getEffectiveRouteTableWithResponseAsync( String resourceGroupName, String networkInterfaceName);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> getEffectiveRouteTableWithResponseAsync( String resourceGroupName, String networkInterfaceName);
/** * Gets all route tables applied to a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.ma...
Gets all route tables applied to a network interface
getEffectiveRouteTableWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java", "license": "mit", "size": 60151 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
355,149
private void addCallbackBuffer(byte[] b) { try { mAcb.invoke(mCamera, b); } catch (Exception e) { Log.e("NativePreviewer", "invoking addCallbackBuffer failed: " + e.toString()); } }
void function(byte[] b) { try { mAcb.invoke(mCamera, b); } catch (Exception e) { Log.e(STR, STR + e.toString()); } }
/** * This method allows you to add a byte buffer to the queue of buffers to be * used by preview. See: * http://android.git.kernel.org/?p=platform/frameworks * /base.git;a=blob;f=core/java/android/hardware/Camera.java;hb=9d * b3d07b9620b4269ab33f78604a36327e536ce1 * * @param b * The buffer ...
This method allows you to add a byte buffer to the queue of buffers to be used by preview. See: HREF base.git;a=blob;f=core/java/android/hardware/Camera.java;hb=9d b3d07b9620b4269ab33f78604a36327e536ce1
addCallbackBuffer
{ "repo_name": "eirTony/INDI1", "path": "to/lang/OpenCV-2.2.0/android/android-jni/src/com/opencv/camera/NativePreviewer.java", "license": "mit", "size": 11658 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,352,372
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync( String resourceGroupName, String serviceName, String appName, AppResourceInner appResource, Context context) { if (this.client.getEndpoint() == null) { return Mono ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String serviceName, String appName, AppResourceInner appResource, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSub...
/** * Operation to update an exiting App. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serviceName The name of the Service resource. * @param appName The n...
Operation to update an exiting App
updateWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/AppsClientImpl.java", "license": "mit", "size": 93809 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.appplatform.fluent.models.AppResourceInner", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.appplatform.fluent.models.AppResourceInner; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appplatform.fluent.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
1,149,966
private void buildUI() { // Create the widgets for the GUI createWidgets(); // Create the panel for the puzzle JPanel mainPanel = new JPanel(new GridLayout(9, 9)); for (int i = 0; i < 81; ++i) { mainPanel.add(atfPuzzle[i]); } // Add the main panel to the c...
void function() { createWidgets(); JPanel mainPanel = new JPanel(new GridLayout(9, 9)); for (int i = 0; i < 81; ++i) { mainPanel.add(atfPuzzle[i]); } m_appFrame.getContentPane().add(mainPanel, BorderLayout.CENTER); JPanel buttonPanel = new JPanel(new GridLayout(2, 4, 5, 5)); buttonPanel.add(btnClear); buttonPanel.add(b...
/** * Construct the user interface. */
Construct the user interface
buildUI
{ "repo_name": "argonium/sudoku-struggler", "path": "src/io/miti/sudoku/App.java", "license": "mit", "size": 25835 }
[ "java.awt.BorderLayout", "java.awt.GridLayout", "javax.swing.JPanel" ]
import java.awt.BorderLayout; import java.awt.GridLayout; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,600,157
public void addNodes(final Collection<INodeEntry> nodes) ;
void function(final Collection<INodeEntry> nodes) ;
/** * Add all Node objects * * @param nodes the nodes */
Add all Node objects
addNodes
{ "repo_name": "tjordanchat/rundeck", "path": "core/src/main/java/com/dtolabs/rundeck/core/common/NodesFileGenerator.java", "license": "apache-2.0", "size": 1593 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,857,774
public Result assertJson(Class clazz, String expectedJsonFilename) throws Exception { String path = clazz.getSimpleName() + "/" + expectedJsonFilename; URL url = clazz.getResource(path); if (url == null) { throw new IllegalStateException("Cannot find " + path); } String json = ...
Result function(Class clazz, String expectedJsonFilename) throws Exception { String path = clazz.getSimpleName() + "/" + expectedJsonFilename; URL url = clazz.getResource(path); if (url == null) { throw new IllegalStateException(STR + path); } String json = outputAsString(); JsonAssert.assertJson(json).isSimilarTo(url)...
/** * Compares JSON response with JSON file available in classpath. For example if class * is org.foo.BarTest and filename is index.json, then file must be located * at src/test/resources/org/foo/BarTest/index.json. * * @param clazz the test class * @param expectedJsonFilena...
Compares JSON response with JSON file available in classpath. For example if class is org.foo.BarTest and filename is index.json, then file must be located at src/test/resources/org/foo/BarTest/index.json
assertJson
{ "repo_name": "vamsirajendra/sonarqube", "path": "server/sonar-server/src/test/java/org/sonar/server/ws/WsTester.java", "license": "lgpl-3.0", "size": 8543 }
[ "org.sonar.test.JsonAssert" ]
import org.sonar.test.JsonAssert;
import org.sonar.test.*;
[ "org.sonar.test" ]
org.sonar.test;
1,592,929
public boolean saveAs( String thePropertiesPath , String ... theSets ) { thePropertiesPath = controlP5.checkPropertiesPath( thePropertiesPath ); HashSet< ControllerProperty > sets = new HashSet< ControllerProperty >( ); Iterator< ControllerProperty > iter = allProperties.keySet( ).iterator( ); while ( iter.h...
boolean function( String thePropertiesPath , String ... theSets ) { thePropertiesPath = controlP5.checkPropertiesPath( thePropertiesPath ); HashSet< ControllerProperty > sets = new HashSet< ControllerProperty >( ); Iterator< ControllerProperty > iter = allProperties.keySet( ).iterator( ); while ( iter.hasNext( ) ) { Co...
/** * saves a list of properties sets into a file specified by parameter thePropertiesPath. */
saves a list of properties sets into a file specified by parameter thePropertiesPath
saveAs
{ "repo_name": "chcbaram/Processing_RokitDrone", "path": "libraries/controlP5/src/controlP5/ControllerProperties.java", "license": "mit", "size": 30015 }
[ "java.util.HashSet", "java.util.Iterator" ]
import java.util.HashSet; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,939,276
public void swapScanResult(RxBleDeviceServices services) { data.clear(); for (BluetoothGattService service : services.getBluetoothGattServices()) { // Add service data.add(new AdapterItem(AdapterItem.SERVICE, getServiceType(service), service.getUuid())); final Lis...
void function(RxBleDeviceServices services) { data.clear(); for (BluetoothGattService service : services.getBluetoothGattServices()) { data.add(new AdapterItem(AdapterItem.SERVICE, getServiceType(service), service.getUuid())); final List<BluetoothGattCharacteristic> characteristics = service.getCharacteristics(); for (...
/** * swap Scan Result * * @param services s */
swap Scan Result
swapScanResult
{ "repo_name": "BingoGG/RxAndroidBle", "path": "myapp/src/main/java/cn/bingo/myapp/adapter/DiscoveryResultsAdapter.java", "license": "lgpl-3.0", "size": 5962 }
[ "android.bluetooth.BluetoothGattCharacteristic", "android.bluetooth.BluetoothGattService", "com.polidea.rxandroidble.RxBleDeviceServices", "java.util.List" ]
import android.bluetooth.BluetoothGattCharacteristic; import android.bluetooth.BluetoothGattService; import com.polidea.rxandroidble.RxBleDeviceServices; import java.util.List;
import android.bluetooth.*; import com.polidea.rxandroidble.*; import java.util.*;
[ "android.bluetooth", "com.polidea.rxandroidble", "java.util" ]
android.bluetooth; com.polidea.rxandroidble; java.util;
831,396
@SuppressWarnings("unchecked") public <T extends Map<?, ?>> T getMapOrDefault(final JsonKey key){ Object returnable; if(this.containsKey(key.getKey())){ returnable = this.get(key.getKey()); }else{ returnable = key.getValue(); } return (T)returnable; }
@SuppressWarnings(STR) <T extends Map<?, ?>> T function(final JsonKey key){ Object returnable; if(this.containsKey(key.getKey())){ returnable = this.get(key.getKey()); }else{ returnable = key.getValue(); } return (T)returnable; }
/** A convenience method that assumes there is a Map at the given key. * @param <T> the kind of map to expect at the key. Note unless manually added, Map values will be a JsonObject. * @param key representing where the value ought to be paired with. * @return a Map representing the value paired with the key or Js...
A convenience method that assumes there is a Map at the given key
getMapOrDefault
{ "repo_name": "cliftonlabs/json-simple", "path": "src/main/java/com/github/cliftonlabs/json_simple/JsonObject.java", "license": "apache-2.0", "size": 27894 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
99,428
private static List<Entry<String, JsonElement>> getParams(Method method) { List<Entry<String, JsonElement>> params = new ArrayList<Entry<String, JsonElement>>(); if (method.parameters == null) { return params; } // Convert the entry set into a map, and extract the keys not listed in ...
static List<Entry<String, JsonElement>> function(Method method) { List<Entry<String, JsonElement>> params = new ArrayList<Entry<String, JsonElement>>(); if (method.parameters == null) { return params; } HashMap<String, Entry<String, JsonElement>> map = new HashMap<String, Entry<String, JsonElement>>(); List<String> rem...
/** * Assemble a list of parameters, with the first entries matching the ones * listed in parameterOrder * * @param method The method containing parameters and parameterOrder * @return Ordered parameters */
Assemble a list of parameters, with the first entries matching the ones listed in parameterOrder
getParams
{ "repo_name": "MaTriXy/gce2retrofit", "path": "gce2retrofit/src/main/java/com/sqisland/gce2retrofit/Generator.java", "license": "apache-2.0", "size": 13413 }
[ "com.google.gson.JsonElement", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import com.google.gson.JsonElement; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
import com.google.gson.*; import java.util.*;
[ "com.google.gson", "java.util" ]
com.google.gson; java.util;
1,285,615
private void setupEventBusStatePublisher(String topic) { if (StringUtils.isBlank(topic)) { logger.trace("No topic defined for Event Bus State Publisher"); return; } try { logger.debug("Setting up Event Bus State Publisher for topic {}", topic); ...
void function(String topic) { if (StringUtils.isBlank(topic)) { logger.trace(STR); return; } try { logger.debug(STR, topic); statePublisher = new MqttMessagePublisher(brokerName + ":" + topic + STR); mqttService.registerMessageProducer(brokerName, statePublisher); } catch (Exception e) { logger.warn(STR, e.getMessage()...
/** * Initialize publisher which publishes all openHAB commands to the given * MQTT topic. * * @param topic * to subscribe to. */
Initialize publisher which publishes all openHAB commands to the given MQTT topic
setupEventBusStatePublisher
{ "repo_name": "openhab/openhab", "path": "bundles/binding/org.openhab.binding.mqtt/src/main/java/org/openhab/binding/mqtt/internal/MqttEventBusBinding.java", "license": "epl-1.0", "size": 12902 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
1,772,619
private void defaultMessageResourcesConfig(ModuleConfig config) { String value = null; MessageResourcesConfig mrc = config.findMessageResourcesConfig(Globals.MESSAGES_KEY); if (mrc == null) { mrc = new MessageResourcesConfig(); mrc.setKey(Globals.MESSAGE...
void function(ModuleConfig config) { String value = null; MessageResourcesConfig mrc = config.findMessageResourcesConfig(Globals.MESSAGES_KEY); if (mrc == null) { mrc = new MessageResourcesConfig(); mrc.setKey(Globals.MESSAGES_KEY); config.addMessageResourcesConfig(mrc); } value = getServletConfig().getInitParameter(ST...
/** * Perform backwards-compatible configuration of the default module's * message resources configuration from servlet initialization parameters * (as were used in Struts 1.0). * * @param config The ModuleConfig object for the default module * * @since Struts 1.1 * @deprecated W...
Perform backwards-compatible configuration of the default module's message resources configuration from servlet initialization parameters (as were used in Struts 1.0)
defaultMessageResourcesConfig
{ "repo_name": "moparisthebest/beehive", "path": "beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java", "license": "apache-2.0", "size": 37185 }
[ "org.apache.struts.Globals", "org.apache.struts.config.MessageResourcesConfig", "org.apache.struts.config.ModuleConfig" ]
import org.apache.struts.Globals; import org.apache.struts.config.MessageResourcesConfig; import org.apache.struts.config.ModuleConfig;
import org.apache.struts.*; import org.apache.struts.config.*;
[ "org.apache.struts" ]
org.apache.struts;
2,262,267
@GET @Path("class/null") public String nullControllerClass() { return null; }
@Path(STR) String function() { return null; }
/** * Method that returns a null value. View 'hello.jsp' from class should be rendered. * * @return View to render. */
Method that returns a null value. View 'hello.jsp' from class should be rendered
nullControllerClass
{ "repo_name": "dmaidaniuk/ozark", "path": "test/view-annotation/src/main/java/org/mvcspec/ozark/test/view/HelloController.java", "license": "apache-2.0", "size": 3710 }
[ "javax.ws.rs.Path" ]
import javax.ws.rs.Path;
import javax.ws.rs.*;
[ "javax.ws" ]
javax.ws;
1,777,758
public void handleContentOutlineSelection(ISelection selection) { if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { Iterator<?> selectedElements = ((IStructuredSelection) selection).iterator(); if (selectedElements.hasNext()) { // Get the first selected...
void function(ISelection selection) { if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { Iterator<?> selectedElements = ((IStructuredSelection) selection).iterator(); if (selectedElements.hasNext()) { ArrayList<Object> selectionList = new ArrayList<Object>(); selection...
/** * This deals with how we want selection in the outliner to affect the other views. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */
This deals with how we want selection in the outliner to affect the other views.
handleContentOutlineSelection
{ "repo_name": "drbgfc/mdht", "path": "cts2/plugins/org.openhealthtools.mdht.cts2.core.editor/src/org/openhealthtools/mdht/cts2/association/presentation/AssociationEditor.java", "license": "epl-1.0", "size": 55349 }
[ "java.util.ArrayList", "java.util.Iterator", "org.eclipse.jface.viewers.ISelection", "org.eclipse.jface.viewers.IStructuredSelection" ]
import java.util.ArrayList; import java.util.Iterator; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection;
import java.util.*; import org.eclipse.jface.viewers.*;
[ "java.util", "org.eclipse.jface" ]
java.util; org.eclipse.jface;
2,387,617
//----------------// // assignSections // //----------------// public Glyph assignSections (Collection<Section> sections, Shape shape, double grade) { // Build & insert one glyph out of the sections SystemInfo...
Glyph function (Collection<Section> sections, Shape shape, double grade) { SystemInfo system = sections.iterator().next().getSystem(); Glyph glyph = system.buildGlyph(sections); return assignGlyph(glyph, shape, grade); }
/** * Assign a shape to the selected collection of sections. * * @param sections the collection of sections to be aggregated as a glyph * @param shape the shape to be assigned * @param grade the grade we have wrt the assigned shape * @return the newly built glyph */
Assign a shape to the selected collection of sections
assignSections
{ "repo_name": "jlpoolen/libreveris", "path": "src/main/omr/glyph/GlyphsModel.java", "license": "lgpl-3.0", "size": 10884 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
833,670
Date getTime();
Date getTime();
/** * A java.util.Date the first event should be generated. * If using the URI, the pattern expected is: yyyy-MM-dd HH:mm:ss * or yyyy-MM-dd'T'HH:mm:ss. * @return the first event date */
A java.util.Date the first event should be generated
getTime
{ "repo_name": "tadayosi/switchyard", "path": "components/camel/camel-core/src/main/java/org/switchyard/component/camel/core/model/CamelTimerBindingModel.java", "license": "apache-2.0", "size": 4324 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
142,573
public static void copy( final int[][] srcArray, final long srcPos, final int[][] destArray, final long destPos, long length ) { if ( destPos <= srcPos ) { int srcSegment = segment( srcPos ); int destSegment = segment( destPos ); int srcDispl = displacement( srcPos ); int destDispl = displacement( destPo...
static void function( final int[][] srcArray, final long srcPos, final int[][] destArray, final long destPos, long length ) { if ( destPos <= srcPos ) { int srcSegment = segment( srcPos ); int destSegment = segment( destPos ); int srcDispl = displacement( srcPos ); int destDispl = displacement( destPos ); int l; while(...
/** Copies a big array from the specified source big array, beginning at the specified position, to the specified position of the destination big array. * Handles correctly overlapping regions of the same big array. * * @param srcArray the source big array. * @param srcPos the starting position in the source ...
Copies a big array from the specified source big array, beginning at the specified position, to the specified position of the destination big array. Handles correctly overlapping regions of the same big array
copy
{ "repo_name": "karussell/fastutil", "path": "src/it/unimi/dsi/fastutil/ints/IntBigArrays.java", "license": "apache-2.0", "size": 50804 }
[ "it.unimi.dsi.fastutil.BigArrays" ]
import it.unimi.dsi.fastutil.BigArrays;
import it.unimi.dsi.fastutil.*;
[ "it.unimi.dsi" ]
it.unimi.dsi;
2,261,711
public java.awt.Graphics2D createPrinterGraphics(float width, float height, FontMapper fontMapper, PrinterJob printerJob) { return new PdfPrinterGraphics2D(this, width, height, fontMapper, false, false, 0, printerJob); }
java.awt.Graphics2D function(float width, float height, FontMapper fontMapper, PrinterJob printerJob) { return new PdfPrinterGraphics2D(this, width, height, fontMapper, false, false, 0, printerJob); }
/** Gets a <CODE>Graphics2D</CODE> to print on. The graphics * are translated to PDF commands. * @param width the width of the panel * @param height the height of the panel * @param fontMapper the mapping from awt fonts to <CODE>BaseFont</CODE> * @param printerJob a printer job * @return a...
Gets a <code>Graphics2D</code> to print on. The graphics are translated to PDF commands
createPrinterGraphics
{ "repo_name": "MesquiteProject/MesquiteArchive", "path": "releases/Mesquite1.12/Mesquite Project/LibrarySource/com/lowagie/text/pdf/PdfContentByte.java", "license": "lgpl-3.0", "size": 100124 }
[ "java.awt.print.PrinterJob" ]
import java.awt.print.PrinterJob;
import java.awt.print.*;
[ "java.awt" ]
java.awt;
318,789
@Test public void testObject() { final HistoricalTimeSeriesGetFilter filter = HistoricalTimeSeriesGetFilter.ofRange(START, END, MAX_POINTS); assertEquals(filter, filter); assertEquals(filter.toString(), "HistoricalTimeSeriesGetFilter{earliestDate=2016-01-01, latestDate=2019-01-01, maxPoints=1000}"); ...
void function() { final HistoricalTimeSeriesGetFilter filter = HistoricalTimeSeriesGetFilter.ofRange(START, END, MAX_POINTS); assertEquals(filter, filter); assertEquals(filter.toString(), STR); final HistoricalTimeSeriesGetFilter other = HistoricalTimeSeriesGetFilter.ofRange(START, END, MAX_POINTS); assertEquals(filter...
/** * Test the object. */
Test the object
testObject
{ "repo_name": "McLeodMoores/starling", "path": "projects/master/src/test/java/com/opengamma/master/historicaltimeseries/HistoricalTimeSeriesGetFilterTest.java", "license": "apache-2.0", "size": 5148 }
[ "org.testng.Assert" ]
import org.testng.Assert;
import org.testng.*;
[ "org.testng" ]
org.testng;
2,252,600
@Test public void testIODirectoryNotWritable() throws Exception { File nonWritable = tempFolder.newFolder(); Assume.assumeTrue("Cannot create non-writable temporary file directory. Skipping test.", nonWritable.setWritable(false, false)); try { Configuration cfg = createFlinkConfiguration(); cfg.setS...
void function() throws Exception { File nonWritable = tempFolder.newFolder(); Assume.assumeTrue(STR, nonWritable.setWritable(false, false)); try { Configuration cfg = createFlinkConfiguration(); cfg.setString(CoreOptions.TMP_DIRS, nonWritable.getAbsolutePath()); try { startTaskManager( cfg, rpcService, highAvailability...
/** * Tests that the TaskManagerRunner startup fails synchronously when the I/O * directories are not writable. */
Tests that the TaskManagerRunner startup fails synchronously when the I/O directories are not writable
testIODirectoryNotWritable
{ "repo_name": "gyfora/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerStartupTest.java", "license": "apache-2.0", "size": 5893 }
[ "java.io.File", "java.io.IOException", "org.apache.commons.io.FileUtils", "org.apache.flink.configuration.Configuration", "org.apache.flink.configuration.CoreOptions", "org.junit.Assert", "org.junit.Assume" ]
import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.CoreOptions; import org.junit.Assert; import org.junit.Assume;
import java.io.*; import org.apache.commons.io.*; import org.apache.flink.configuration.*; import org.junit.*;
[ "java.io", "org.apache.commons", "org.apache.flink", "org.junit" ]
java.io; org.apache.commons; org.apache.flink; org.junit;
1,681,036
void createTemporaryQueue(String address, RoutingType routingType, String queueName, String filter) throws ActiveMQException;
void createTemporaryQueue(String address, RoutingType routingType, String queueName, String filter) throws ActiveMQException;
/** * Creates a <em>temporary</em> queue with a filter. * * @param address the queue will be bound to this address * @param routingType the routing type for this queue, MULTICAST or ANYCAST * @param queueName the name of the queue * @param filter only messages which match this filter will b...
Creates a temporary queue with a filter
createTemporaryQueue
{ "repo_name": "iweiss/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java", "license": "apache-2.0", "size": 50872 }
[ "org.apache.activemq.artemis.api.core.ActiveMQException", "org.apache.activemq.artemis.api.core.RoutingType" ]
import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.*;
[ "org.apache.activemq" ]
org.apache.activemq;
585,939
private CopyFileFromContainerCmd executeCopyFileContainerRequest(DockerClient client, Message message) throws DockerException { LOGGER.debug("Executing Docker Copy File/Folder Container Request"); String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, co...
CopyFileFromContainerCmd function(DockerClient client, Message message) throws DockerException { LOGGER.debug(STR); String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class); String resource = DockerHelper.getProperty(DockerConstants.DOCKER_RESOURCE, config...
/** * Produces a copy file/folder from container request * * @param client * @param message * @return * @throws DockerException */
Produces a copy file/folder from container request
executeCopyFileContainerRequest
{ "repo_name": "logzio/camel", "path": "components/camel-docker/src/main/java/org/apache/camel/component/docker/producer/DockerProducer.java", "license": "apache-2.0", "size": 48810 }
[ "com.github.dockerjava.api.DockerClient", "com.github.dockerjava.api.command.CopyFileFromContainerCmd", "org.apache.camel.Message", "org.apache.camel.component.docker.DockerConstants", "org.apache.camel.component.docker.DockerHelper", "org.apache.camel.component.docker.exception.DockerException" ]
import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.CopyFileFromContainerCmd; import org.apache.camel.Message; import org.apache.camel.component.docker.DockerConstants; import org.apache.camel.component.docker.DockerHelper; import org.apache.camel.component.docker.exception.DockerExc...
import com.github.dockerjava.api.*; import com.github.dockerjava.api.command.*; import org.apache.camel.*; import org.apache.camel.component.docker.*; import org.apache.camel.component.docker.exception.*;
[ "com.github.dockerjava", "org.apache.camel" ]
com.github.dockerjava; org.apache.camel;
2,584,787
public JobInner withToolType(ToolType toolType) { this.toolType = toolType; return this; }
JobInner function(ToolType toolType) { this.toolType = toolType; return this; }
/** * Set possible values are: cntk, tensorflow, caffe, caffe2, chainer, pytorch, custom, custommpi, horovod. Possible values include: 'cntk', 'tensorflow', 'caffe', 'caffe2', 'chainer', 'horovod', 'custommpi', 'custom'. * * @param toolType the toolType value to set * @return the JobInner object its...
Set possible values are: cntk, tensorflow, caffe, caffe2, chainer, pytorch, custom, custommpi, horovod. Possible values include: 'cntk', 'tensorflow', 'caffe', 'caffe2', 'chainer', 'horovod', 'custommpi', 'custom'
withToolType
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/batchai/mgmt-v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/JobInner.java", "license": "mit", "size": 26614 }
[ "com.microsoft.azure.management.batchai.v2018_05_01.ToolType" ]
import com.microsoft.azure.management.batchai.v2018_05_01.ToolType;
import com.microsoft.azure.management.batchai.v2018_05_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,852,900
public String getPropertyName() { return CSSConstants.CSS_CLIP_PROPERTY; }
String function() { return CSSConstants.CSS_CLIP_PROPERTY; }
/** * Implements {@link ValueManager#getPropertyName()}. */
Implements <code>ValueManager#getPropertyName()</code>
getPropertyName
{ "repo_name": "adufilie/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/value/css2/ClipManager.java", "license": "apache-2.0", "size": 3759 }
[ "org.apache.flex.forks.batik.util.CSSConstants" ]
import org.apache.flex.forks.batik.util.CSSConstants;
import org.apache.flex.forks.batik.util.*;
[ "org.apache.flex" ]
org.apache.flex;
1,154,906
public Set<Slop> getAllSlops(Iterable<ByteArray> slopKeys) { Set<Slop> registeredSlops = Sets.newHashSet(); for(Store<ByteArray, Slop, byte[]> slopStore: slopStores.values()) { Map<ByteArray, List<Versioned<Slop>>> res = slopStore.getAll(slopKeys, null); for(Map.Entry<ByteArr...
Set<Slop> function(Iterable<ByteArray> slopKeys) { Set<Slop> registeredSlops = Sets.newHashSet(); for(Store<ByteArray, Slop, byte[]> slopStore: slopStores.values()) { Map<ByteArray, List<Versioned<Slop>>> res = slopStore.getAll(slopKeys, null); for(Map.Entry<ByteArray, List<Versioned<Slop>>> entry: res.entrySet()) { Sl...
/** * A function to fetch all the registered slops * * @param slopKeys Keys for the registered slops in the slop store * @return Set of all the registered Slops */
A function to fetch all the registered slops
getAllSlops
{ "repo_name": "null-exception/voldemort", "path": "test/unit/voldemort/store/routed/HintedHandoffFailureTest.java", "license": "apache-2.0", "size": 35740 }
[ "com.google.common.collect.Sets", "java.util.List", "java.util.Map", "java.util.Set" ]
import com.google.common.collect.Sets; import java.util.List; import java.util.Map; import java.util.Set;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
686,468
private int heightOf(final TextView textView) { return textView.getLineCount() > 0 ? textView.getLineHeight() * textView.getLineCount() : 0; } }
int function(final TextView textView) { return textView.getLineCount() > 0 ? textView.getLineHeight() * textView.getLineCount() : 0; } }
/** * Returns the standard height (i.e. without text effects such as shadow) of all the text of * the given {@link TextView}. * @param textView The {@link TextView} to determine the height of all its text content. * @return The standard height of all the text content of the given {@l...
Returns the standard height (i.e. without text effects such as shadow) of all the text of the given <code>TextView</code>
heightOf
{ "repo_name": "taimur97/Android-Lib-VerticalMarqueeTextView", "path": "VerticalMarqueeTextView/src/main/java/android/lib/widget/verticalmarqueetextview/VerticalMarqueeTextView.java", "license": "apache-2.0", "size": 21085 }
[ "android.widget.TextView" ]
import android.widget.TextView;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,418,490
String correlationId = message.getCorrelationId(); Collector collector = collectorsByCorrelationId.get(correlationId); if (collector != null) { return Optional.of(collector); } else { LOG.warn("Message with correlationId {} is not expected to be processed by any Collector...
String correlationId = message.getCorrelationId(); Collector collector = collectorsByCorrelationId.get(correlationId); if (collector != null) { return Optional.of(collector); } else { LOG.warn(STR, correlationId); return Optional.empty(); } }
/** * Determines correlationId from the incoming message and resolves the relevant {@link Collector} instance. */
Determines correlationId from the incoming message and resolves the relevant <code>Collector</code> instance
resolveMessageHandler
{ "repo_name": "tcdl/msb-java", "path": "core/src/main/java/io/github/tcdl/msb/collector/CollectorManager.java", "license": "mit", "size": 2672 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
2,559,042
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String serviceName, NotificationName notificationName, String email, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email), serv...
ServiceFuture<Void> function(String resourceGroupName, String serviceName, NotificationName notificationName, String email, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, serviceName, notificationName, email), serviceCallback); }
/** * Removes the email from the list of Notification. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param notificationName Notification Name Identifier. Possible values include: 'RequestPublisherNotificationMessage'...
Removes the email from the list of Notification
deleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/apimanagement/mgmt-v2019_01_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_01_01/implementation/NotificationRecipientEmailsInner.java", "license": "mit", "size": 32717 }
[ "com.microsoft.azure.management.apimanagement.v2019_01_01.NotificationName", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.apimanagement.v2019_01_01.NotificationName; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.apimanagement.v2019_01_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,359,877
public FeatureResultSet queryFeaturesForChunk(boolean distinct, Map<String, Object> fieldValues, String orderBy, int limit, long offset) { validateRTree(); return featureDao.queryInForChunk(distinct, queryIdsSQL(), fieldValues, orderBy, limit, offset); }
FeatureResultSet function(boolean distinct, Map<String, Object> fieldValues, String orderBy, int limit, long offset) { validateRTree(); return featureDao.queryInForChunk(distinct, queryIdsSQL(), fieldValues, orderBy, limit, offset); }
/** * Query for features, starting at the offset and returning no more than the * limit * * @param distinct * distinct rows * @param fieldValues * field values * @param orderBy * order by * @param limit * chunk limit * @param offset * chu...
Query for features, starting at the offset and returning no more than the limit
queryFeaturesForChunk
{ "repo_name": "ngageoint/geopackage-java", "path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java", "license": "mit", "size": 349361 }
[ "java.util.Map", "mil.nga.geopackage.features.user.FeatureResultSet" ]
import java.util.Map; import mil.nga.geopackage.features.user.FeatureResultSet;
import java.util.*; import mil.nga.geopackage.features.user.*;
[ "java.util", "mil.nga.geopackage" ]
java.util; mil.nga.geopackage;
1,962,431
public interface DetailFragmentCallback { public void onGameSelected(Event gameEvent, ScheduleAdapter.ViewHolder vh); }
interface DetailFragmentCallback { public void function(Event gameEvent, ScheduleAdapter.ViewHolder vh); }
/** * DetailFragmentCallback for when an item has been selected. */
DetailFragmentCallback for when an item has been selected
onGameSelected
{ "repo_name": "simonov-p/Capstone-Project", "path": "app/src/main/java/com/simonov/teamfan/fragments/ScheduleFragment.java", "license": "apache-2.0", "size": 11052 }
[ "com.simonov.teamfan.objects.Event" ]
import com.simonov.teamfan.objects.Event;
import com.simonov.teamfan.objects.*;
[ "com.simonov.teamfan" ]
com.simonov.teamfan;
786,983
public String insertSelective(Journal record) { SQL sql = new SQL(); sql.INSERT_INTO("journal"); if (record.getId() != null) { sql.VALUES("id", "#{id,jdbcType=INTEGER}"); } if (record.getTitle() != null) { sql.VALUES("title", "#{title...
String function(Journal record) { SQL sql = new SQL(); sql.INSERT_INTO(STR); if (record.getId() != null) { sql.VALUES("id", STR); } if (record.getTitle() != null) { sql.VALUES("title", STR); } if (record.getJournalId() != null) { sql.VALUES(STR, STR); } if (record.getKeyWords() != null) { sql.VALUES(STR, STR); } if (re...
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table journal * * @mbg.generated */
This method was generated by MyBatis Generator. This method corresponds to the database table journal
insertSelective
{ "repo_name": "Tneciv/Poseidon", "path": "luoo/src/main/java/com/tneciv/poseidon/dao/JournalSqlProvider.java", "license": "mit", "size": 15224 }
[ "com.tneciv.poseidon.entity.Journal" ]
import com.tneciv.poseidon.entity.Journal;
import com.tneciv.poseidon.entity.*;
[ "com.tneciv.poseidon" ]
com.tneciv.poseidon;
2,039,631
public void setWebApplicationType(WebApplicationType webApplicationType) { Assert.notNull(webApplicationType, "WebApplicationType must not be null"); this.webApplicationType = webApplicationType; }
void function(WebApplicationType webApplicationType) { Assert.notNull(webApplicationType, STR); this.webApplicationType = webApplicationType; }
/** * Sets the type of web application to be run. If not explicitly set the type of web * application will be deduced based on the classpath. * @param webApplicationType the web application type * @since 2.0.0 */
Sets the type of web application to be run. If not explicitly set the type of web application will be deduced based on the classpath
setWebApplicationType
{ "repo_name": "eddumelendez/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java", "license": "apache-2.0", "size": 48523 }
[ "org.springframework.util.Assert" ]
import org.springframework.util.Assert;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
7,068
List<BaseClassInitializer> inits = new LinkedList<>(); getBaseInitializers().stream() .filter(init -> baseNames.contains(init.getBaseName())) .forEach(init -> inits.add(init)); remove(inits); return inits; }
List<BaseClassInitializer> inits = new LinkedList<>(); getBaseInitializers().stream() .filter(init -> baseNames.contains(init.getBaseName())) .forEach(init -> inits.add(init)); remove(inits); return inits; }
/** * Get base class initializer which match actual base names. * * @param baseNames list of base class names. * @return base class initializers. The initializers are removed from here * upon return. */
Get base class initializer which match actual base names
getBaseInitializers
{ "repo_name": "gburdell/laol", "path": "src/laol/ast/ClassBody.java", "license": "mit", "size": 3401 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,305,979
public void init() { PropertyCheck.mandatory(this, "nodeService", getNodeService()); PropertyCheck.mandatory(this, "dictionaryService", getDictionaryService()); PropertyCheck.mandatory(this, "fileFolderService", getFileFolderService()); PropertyCheck.mandatory(this, "rootNod...
void function() { PropertyCheck.mandatory(this, STR, getNodeService()); PropertyCheck.mandatory(this, STR, getDictionaryService()); PropertyCheck.mandatory(this, STR, getFileFolderService()); PropertyCheck.mandatory(this, STR, getRootNode()); }
/** * Spring bean init method */
Spring bean init method
init
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/repo/webdav/WebDavServiceImpl.java", "license": "lgpl-3.0", "size": 6280 }
[ "org.alfresco.util.PropertyCheck" ]
import org.alfresco.util.PropertyCheck;
import org.alfresco.util.*;
[ "org.alfresco.util" ]
org.alfresco.util;
519,827
public static ArrayList<MXSession> getMXSessions(Context context) { if ((null != context) && (null != instance)) { return instance.getSessions(); } else { return null; } }
static ArrayList<MXSession> function(Context context) { if ((null != context) && (null != instance)) { return instance.getSessions(); } else { return null; } }
/** * Static method top the MXSession list * @param context the application content * @return the sessions list */
Static method top the MXSession list
getMXSessions
{ "repo_name": "noepitome/neon-android", "path": "neon/src/main/java/im/neon/Matrix.java", "license": "apache-2.0", "size": 27086 }
[ "android.content.Context", "java.util.ArrayList", "org.matrix.androidsdk.MXSession" ]
import android.content.Context; import java.util.ArrayList; import org.matrix.androidsdk.MXSession;
import android.content.*; import java.util.*; import org.matrix.androidsdk.*;
[ "android.content", "java.util", "org.matrix.androidsdk" ]
android.content; java.util; org.matrix.androidsdk;
1,763,274
return new File(System.getProperty("user.dir")); }
return new File(System.getProperty(STR)); }
/** * Get the directory where the jar is executed * * @return Directory file */
Get the directory where the jar is executed
getMainDirectory
{ "repo_name": "HyCraftHD/ModLibary", "path": "src/main/java/net/hycrafthd/corelib/util/FileUtil.java", "license": "apache-2.0", "size": 362 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,709,003
@SuppressWarnings("unchecked") public void testAllAsList_logging_same_exception() throws Exception { try { MyException sameInstance = new MyException(); Futures.allAsList(immediateFailedFuture(sameInstance), immediateFailedFuture(sameInstance)).get(); fail(); } catch (ExecutionEx...
@SuppressWarnings(STR) void function() throws Exception { try { MyException sameInstance = new MyException(); Futures.allAsList(immediateFailedFuture(sameInstance), immediateFailedFuture(sameInstance)).get(); fail(); } catch (ExecutionException e) { assertTrue(e.getCause() instanceof MyException); assertEquals(STR, 0, ...
/** * The same exception happening on multiple futures should not be logged. */
The same exception happening on multiple futures should not be logged
testAllAsList_logging_same_exception
{ "repo_name": "sunbeansoft/guava", "path": "guava-gwt/test-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/FuturesTest.java", "license": "apache-2.0", "size": 56315 }
[ "com.google.common.util.concurrent.Futures", "java.util.concurrent.ExecutionException" ]
import com.google.common.util.concurrent.Futures; import java.util.concurrent.ExecutionException;
import com.google.common.util.concurrent.*; import java.util.concurrent.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
911,613
private void cmd_pageSetup() { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); m_reportEngine.pageSetupDialog(); revalidate(); cmd_drill(); // setCursor } // cmd_pageSetup
void function() { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); m_reportEngine.pageSetupDialog(); revalidate(); cmd_drill(); }
/** * Print Setup Dialog */
Print Setup Dialog
cmd_pageSetup
{ "repo_name": "armenrz/adempiere", "path": "client/src/org/compiere/print/Viewer.java", "license": "gpl-2.0", "size": 45716 }
[ "java.awt.Cursor" ]
import java.awt.Cursor;
import java.awt.*;
[ "java.awt" ]
java.awt;
199,010
@Override public void appendDependencies(Set<DefDescriptor<?>> dependencies) { super.appendDependencies(dependencies); if (intfDescriptor != null) { dependencies.add(intfDescriptor); } else { dependencies.add(descriptor); } for (AttributeDefRef att...
void function(Set<DefDescriptor<?>> dependencies) { super.appendDependencies(dependencies); if (intfDescriptor != null) { dependencies.add(intfDescriptor); } else { dependencies.add(descriptor); } for (AttributeDefRef attributeDefRef : attributeValues.values()) { attributeDefRef.appendDependencies(dependencies); } }
/** * Recursively adds the ComponentDescriptors of all components in this ComponentDef's children to the provided set. * The set may then be used to analyze freshness of all of those types to see if any of them should be recompiled * from source. * * @param dependencies A Set that this method w...
Recursively adds the ComponentDescriptors of all components in this ComponentDef's children to the provided set. The set may then be used to analyze freshness of all of those types to see if any of them should be recompiled from source
appendDependencies
{ "repo_name": "DebalinaDey/AuraDevelopDeb", "path": "aura-impl/src/main/java/org/auraframework/impl/root/component/ComponentDefRefImpl.java", "license": "apache-2.0", "size": 15653 }
[ "java.util.Set", "org.auraframework.def.AttributeDefRef", "org.auraframework.def.DefDescriptor" ]
import java.util.Set; import org.auraframework.def.AttributeDefRef; import org.auraframework.def.DefDescriptor;
import java.util.*; import org.auraframework.def.*;
[ "java.util", "org.auraframework.def" ]
java.util; org.auraframework.def;
376,499
private boolean isHostingTask(TaskInstanceData task, HostData host) { VmPoolManager vmPool = manager.getCapability(VmPoolManager.class); for (VmStatus vm : host.getSandboxStatus().getVms()) { VmData vmData = vmPool.getVm(vm.getId()); if (vmData.getHost() != host) // VM is actually located in ano...
boolean function(TaskInstanceData task, HostData host) { VmPoolManager vmPool = manager.getCapability(VmPoolManager.class); for (VmStatus vm : host.getSandboxStatus().getVms()) { VmData vmData = vmPool.getVm(vm.getId()); if (vmData.getHost() != host) continue; TaskInstanceData vmTask = vmData.getTask(); if (vmTask.getT...
/** * Determines whether the given Host is hosting an instance of the given Task. */
Determines whether the given Host is hosting an instance of the given Task
isHostingTask
{ "repo_name": "digs-uwo/dcsim-projects", "path": "src/edu/uwo/csd/dcsim/projects/hierarchical/policies/AppRelocationPolicyLevel1.java", "license": "gpl-3.0", "size": 39764 }
[ "edu.uwo.csd.dcsim.management.HostData", "edu.uwo.csd.dcsim.management.VmStatus", "edu.uwo.csd.dcsim.projects.hierarchical.TaskInstanceData", "edu.uwo.csd.dcsim.projects.hierarchical.VmData", "edu.uwo.csd.dcsim.projects.hierarchical.capabilities.VmPoolManager" ]
import edu.uwo.csd.dcsim.management.HostData; import edu.uwo.csd.dcsim.management.VmStatus; import edu.uwo.csd.dcsim.projects.hierarchical.TaskInstanceData; import edu.uwo.csd.dcsim.projects.hierarchical.VmData; import edu.uwo.csd.dcsim.projects.hierarchical.capabilities.VmPoolManager;
import edu.uwo.csd.dcsim.management.*; import edu.uwo.csd.dcsim.projects.hierarchical.*; import edu.uwo.csd.dcsim.projects.hierarchical.capabilities.*;
[ "edu.uwo.csd" ]
edu.uwo.csd;
2,282,598
public static void assertClaims(Map<String, Object> claims, String[] mandatoryClaims) { JwtUtil.assertClaims(claims); Stream.of(mandatoryClaims) .forEach(claim -> Assert.isTrue(claims.containsKey(claim), String.format(CLAIM_NOT_FOUND_MSG, claim))); }
static void function(Map<String, Object> claims, String[] mandatoryClaims) { JwtUtil.assertClaims(claims); Stream.of(mandatoryClaims) .forEach(claim -> Assert.isTrue(claims.containsKey(claim), String.format(CLAIM_NOT_FOUND_MSG, claim))); }
/** * Validates the claim information passed. * * @param claims Caller supplied JWT claims map * @param mandatoryClaims obligatory claims that should be present in claims map. * @since 1.1.0.Final */
Validates the claim information passed
assertClaims
{ "repo_name": "AdeptJ/adeptj-modules", "path": "websecurity/jwt/src/main/java/com/adeptj/modules/security/jwt/JwtUtil.java", "license": "apache-2.0", "size": 2905 }
[ "io.jsonwebtoken.lang.Assert", "java.util.Map", "java.util.stream.Stream" ]
import io.jsonwebtoken.lang.Assert; import java.util.Map; import java.util.stream.Stream;
import io.jsonwebtoken.lang.*; import java.util.*; import java.util.stream.*;
[ "io.jsonwebtoken.lang", "java.util" ]
io.jsonwebtoken.lang; java.util;
396,501
public final boolean angularTolerance(final Vector3d vector, final double error) { return this.normal.angle(vector) * Edge.CONVERSION_PI_DEGREES < error; }
final boolean function(final Vector3d vector, final double error) { return this.normal.angle(vector) * Edge.CONVERSION_PI_DEGREES < error; }
/** * Checks if this triangle is oriented as the vector with an error on the * angle. The error is in degree. * @param vector * the vector to compare with * @param error * the orientation error * @return true if its normal and the vector have the same orie...
Checks if this triangle is oriented as the vector with an error on the angle. The error is in degree
angularTolerance
{ "repo_name": "Nantes1900/Nantes-1900-PGROU-IHM", "path": "src/fr/nantes1900/models/basis/Triangle.java", "license": "gpl-3.0", "size": 17055 }
[ "javax.vecmath.Vector3d" ]
import javax.vecmath.Vector3d;
import javax.vecmath.*;
[ "javax.vecmath" ]
javax.vecmath;
2,187,498
public Resources getResources() { return mResources; }
Resources function() { return mResources; }
/** * Gets resources. * * @return resources */
Gets resources
getResources
{ "repo_name": "HKMOpen/fresco", "path": "drawee/src/main/java/com/facebook/drawee/generic/GenericDraweeHierarchyBuilder.java", "license": "bsd-3-clause", "size": 20292 }
[ "android.content.res.Resources" ]
import android.content.res.Resources;
import android.content.res.*;
[ "android.content" ]
android.content;
1,893,525
@Override public Object clone() throws CloneNotSupportedException { XIntervalSeriesCollection clone = (XIntervalSeriesCollection) super.clone(); clone.data = (List) ObjectUtilities.deepClone(this.data); return clone; }
Object function() throws CloneNotSupportedException { XIntervalSeriesCollection clone = (XIntervalSeriesCollection) super.clone(); clone.data = (List) ObjectUtilities.deepClone(this.data); return clone; }
/** * Returns a clone of this instance. * * @return A clone. * * @throws CloneNotSupportedException if there is a problem. */
Returns a clone of this instance
clone
{ "repo_name": "sebkur/JFreeChart", "path": "src/main/java/org/jfree/data/xy/XIntervalSeriesCollection.java", "license": "lgpl-3.0", "size": 11459 }
[ "java.util.List", "org.jfree.util.ObjectUtilities" ]
import java.util.List; import org.jfree.util.ObjectUtilities;
import java.util.*; import org.jfree.util.*;
[ "java.util", "org.jfree.util" ]
java.util; org.jfree.util;
1,204,149
protected final <Req extends Validatable, Resp> Optional<Resp> performRequestAndParseOptionalEntity(Req request, CheckedFunction<Req, Request, IOException> requestConverter, RequestOpt...
final <Req extends Validatable, Resp> Optional<Resp> function(Req request, CheckedFunction<Req, Request, IOException> requestConverter, RequestOptions options, CheckedFunction<XContentParser, Resp, IOException> entityParser ) throws IOException { Optional<ValidationException> validationException = request.validate(); i...
/** * Defines a helper method for requests that can 404 and in which case will return an empty Optional * otherwise tries to parse the response body */
Defines a helper method for requests that can 404 and in which case will return an empty Optional otherwise tries to parse the response body
performRequestAndParseOptionalEntity
{ "repo_name": "uschindler/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java", "license": "apache-2.0", "size": 113795 }
[ "java.io.IOException", "java.util.Optional", "org.elasticsearch.common.CheckedFunction", "org.elasticsearch.common.xcontent.XContentParser", "org.elasticsearch.rest.RestStatus" ]
import java.io.IOException; import java.util.Optional; import org.elasticsearch.common.CheckedFunction; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.rest.RestStatus;
import java.io.*; import java.util.*; import org.elasticsearch.common.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.rest.*;
[ "java.io", "java.util", "org.elasticsearch.common", "org.elasticsearch.rest" ]
java.io; java.util; org.elasticsearch.common; org.elasticsearch.rest;
1,585,993
void registerForDisplayInfo(Handler h, int what, Object obj);
void registerForDisplayInfo(Handler h, int what, Object obj);
/** * Register for display information notifications from the network. * Message.obj will contain an AsyncResult. * AsyncResult.result will be a SuppServiceNotification instance. * * @param h Handler that receives the notification message. * @param what User-defined message code. * @p...
Register for display information notifications from the network. Message.obj will contain an AsyncResult. AsyncResult.result will be a SuppServiceNotification instance
registerForDisplayInfo
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/opt/telephony/src/java/com/android/internal/telephony/Phone.java", "license": "gpl-2.0", "size": 87022 }
[ "android.os.Handler" ]
import android.os.Handler;
import android.os.*;
[ "android.os" ]
android.os;
1,805,968
@Test public void testEnabledComparison() { mPref1.setEnabled(true); mPref2.setEnabled(true); assertTrue("Compare enabled", mComparisonCallback.arePreferenceContentsTheSame(mPref1, mPref2)); mPref2.setEnabled(false); assertFalse("Compare enabled/disable...
void function() { mPref1.setEnabled(true); mPref2.setEnabled(true); assertTrue(STR, mComparisonCallback.arePreferenceContentsTheSame(mPref1, mPref2)); mPref2.setEnabled(false); assertFalse(STR, mComparisonCallback.arePreferenceContentsTheSame(mPref1, mPref2)); assertFalse(STR, mComparisonCallback.arePreferenceContentsT...
/** * Enabled differences should be detected */
Enabled differences should be detected
testEnabledComparison
{ "repo_name": "AndroidX/androidx", "path": "preference/preference/src/androidTest/java/androidx/preference/tests/PreferenceComparisonCallbackTest.java", "license": "apache-2.0", "size": 9806 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
657,865
public static Date parseDate(String value, Calendar cal) throws ParseException { DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); dateFormat.setCalendar(cal); return new Date(dateFormat.parse(value).getTime()); }
static Date function(String value, Calendar cal) throws ParseException { DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); dateFormat.setCalendar(cal); return new Date(dateFormat.parse(value).getTime()); }
/** * Parse a MySQL DATE format into a {@link Date} with the given {@link Calendar}. */
Parse a MySQL DATE format into a <code>Date</code> with the given <code>Calendar</code>
parseDate
{ "repo_name": "HubSpot/vitess", "path": "java/client/src/main/java/io/vitess/mysql/DateTime.java", "license": "apache-2.0", "size": 10628 }
[ "java.sql.Date", "java.text.DateFormat", "java.text.ParseException", "java.text.SimpleDateFormat", "java.util.Calendar" ]
import java.sql.Date; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar;
import java.sql.*; import java.text.*; import java.util.*;
[ "java.sql", "java.text", "java.util" ]
java.sql; java.text; java.util;
2,841,883
public int countByG_Name(long groupId, String name) throws SystemException { Object[] finderArgs = new Object[] { groupId, name }; Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_G_NAME, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3); query.a...
int function(long groupId, String name) throws SystemException { Object[] finderArgs = new Object[] { groupId, name }; Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_G_NAME, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3); query.append(_SQL_COUNT_WORKER_WHERE); quer...
/** * Returns the number of workers where groupId = &#63; and name = &#63;. * * @param groupId the group ID * @param name the name * @return the number of matching workers * @throws SystemException if a system exception occurred */
Returns the number of workers where groupId = &#63; and name = &#63;
countByG_Name
{ "repo_name": "rsicart/mpwc", "path": "docroot/WEB-INF/src/com/mpwc/service/persistence/WorkerPersistenceImpl.java", "license": "bsd-3-clause", "size": 189688 }
[ "com.liferay.portal.kernel.dao.orm.FinderCacheUtil", "com.liferay.portal.kernel.dao.orm.Query", "com.liferay.portal.kernel.dao.orm.QueryPos", "com.liferay.portal.kernel.dao.orm.Session", "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.util.StringBundler", "com.liferay.p...
import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; import com.liferay.portal.kernel.dao.orm.Query; import com.liferay.portal.kernel.dao.orm.QueryPos; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.StringBundler; ...
import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*;
[ "com.liferay.portal" ]
com.liferay.portal;
404,027
List getZ();
List getZ();
/** * Returns the value of the '<em><b>Z</b></em>' attribute list. * The list contents are of type {@link java.lang.Integer}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Z</em>' attribute list isn't clear, * there really should be more of a description here... * </p> * <!-- end-...
Returns the value of the 'Z' attribute list. The list contents are of type <code>java.lang.Integer</code>. If the meaning of the 'Z' attribute list isn't clear, there really should be more of a description here...
getZ
{ "repo_name": "apache/tuscany-sdo", "path": "tools/src/test/java/com/example/sequences/TwoRCs.java", "license": "apache-2.0", "size": 5712 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
58,614
return verificationTime; } /** * Legt den Wert der verificationTime-Eigenschaft fest. * * @param value * allowed object is {@link XMLGregorianCalendar }
return verificationTime; } /** * Legt den Wert der verificationTime-Eigenschaft fest. * * @param value * allowed object is {@link XMLGregorianCalendar }
/** * Ruft den Wert der verificationTime-Eigenschaft ab. * * @return possible object is {@link XMLGregorianCalendar } * */
Ruft den Wert der verificationTime-Eigenschaft ab
getVerificationTime
{ "repo_name": "RUB-NDS/Single-Sign-On-Libraries", "path": "ssolibs/ValidationService/ft_sso_api/src/main/java/oasis/names/tc/dss/_1_0/core/schema/VerificationTimeInfoType.java", "license": "apache-2.0", "size": 3346 }
[ "javax.xml.datatype.XMLGregorianCalendar" ]
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.datatype.*;
[ "javax.xml" ]
javax.xml;
615,861
private int readFill(InputStream stream, byte[] buffer) throws IOException { int r = buffer.length; while (r > 0) { int p = buffer.length - r; int c = stream.read(buffer, p, r); if (c == -1) { break; } r -= c; ...
int function(InputStream stream, byte[] buffer) throws IOException { int r = buffer.length; while (r > 0) { int p = buffer.length - r; int c = stream.read(buffer, p, r); if (c == -1) { break; } r -= c; } return buffer.length - r; }
/** * Fill a buffer with raw bytes read off a stream. * * @param stream the input stream * @param buffer to fill with bytes to read off the stream * @return bytes read (might be smaller than buffer length at EOF) * @throws IOException if unable to read the stream */
Fill a buffer with raw bytes read off a stream
readFill
{ "repo_name": "vincent314/legstar-core2", "path": "legstar-jaxb-generator/src/test/java/legstar/samples/custdat/CustdatSample.java", "license": "agpl-3.0", "size": 3852 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
478,339
public void collectLocks(HashMap threadList);
void function(HashMap threadList);
/** * Add all locked CacheKeys to the map grouped by thread. * Used to print all the locks in the identity map. */
Add all locked CacheKeys to the map grouped by thread. Used to print all the locks in the identity map
collectLocks
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/identitymaps/IdentityMap.java", "license": "epl-1.0", "size": 9724 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,347,455
public DdPacket lastSentDdPacket() { return lastSentDdPacket; }
DdPacket function() { return lastSentDdPacket; }
/** * Gets the last sent DD Packet. * * @return last sent DD Packet */
Gets the last sent DD Packet
lastSentDdPacket
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/OspfNbrImpl.java", "license": "apache-2.0", "size": 75644 }
[ "org.onosproject.ospf.protocol.ospfpacket.types.DdPacket" ]
import org.onosproject.ospf.protocol.ospfpacket.types.DdPacket;
import org.onosproject.ospf.protocol.ospfpacket.types.*;
[ "org.onosproject.ospf" ]
org.onosproject.ospf;
2,302,921
public Drawable getForeground() { return mForeground; }
Drawable function() { return mForeground; }
/** * Returns the drawable used as the foreground of this FrameLayout. The * foreground drawable, if non-null, is always drawn on top of the children. * * @return A Drawable or null if no foreground was set. */
Returns the drawable used as the foreground of this FrameLayout. The foreground drawable, if non-null, is always drawn on top of the children
getForeground
{ "repo_name": "mcginty/TextSecure", "path": "src/org/thoughtcrime/securesms/components/ForegroundImageView.java", "license": "gpl-3.0", "size": 7978 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
2,484,272
public void initialiseLog() { StackTraceElement[] stackTraceElements = this.exception.getStackTrace(); this.report.add("Time: " + (new SimpleDateFormat()).format(new Date())); this.report.add("Java version: " + System.getProperty("java.version")); this.report.add("OS: " + System.getProperty("os.name") + " (...
void function() { StackTraceElement[] stackTraceElements = this.exception.getStackTrace(); this.report.add(STR + (new SimpleDateFormat()).format(new Date())); this.report.add(STR + System.getProperty(STR)); this.report.add(STR + System.getProperty(STR) + STR + System.getProperty(STR) + STR + System.getProperty(STR)); t...
/** * Initialises the log. */
Initialises the log
initialiseLog
{ "repo_name": "Niadel/NiadelCommons", "path": "src/co/uk/niadel/commons/crash/CrashReport.java", "license": "gpl-2.0", "size": 3090 }
[ "java.lang.management.ManagementFactory", "java.lang.management.RuntimeMXBean", "java.text.SimpleDateFormat", "java.util.Date", "java.util.List" ]
import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List;
import java.lang.management.*; import java.text.*; import java.util.*;
[ "java.lang", "java.text", "java.util" ]
java.lang; java.text; java.util;
398,044
public boolean renameFile(final long fileNum, final String newSuffix) throws IOException, DatabaseException { String generation = ""; int repeatNum = 0; while (true) { final String newName = getFullFileName(getFileName(fileNum, newSuffix) + generation); ...
boolean function(final long fileNum, final String newSuffix) throws IOException, DatabaseException { String generation = STR." + repeatNum; } }
/** * Rename this file to NNNNNNNN.suffix. If that file already exists, try * NNNNNNNN.suffix.1, etc. Used for deleting files or moving corrupt files * aside. * * @param fileNum the file we want to move * * @param newSuffix the new file suffix * * @return true if successful,...
Rename this file to NNNNNNNN.suffix. If that file already exists, try NNNNNNNN.suffix.1, etc. Used for deleting files or moving corrupt files aside
renameFile
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/src/com/sleepycat/je/log/FileManager.java", "license": "apache-2.0", "size": 100137 }
[ "com.sleepycat.je.DatabaseException", "java.io.IOException" ]
import com.sleepycat.je.DatabaseException; import java.io.IOException;
import com.sleepycat.je.*; import java.io.*;
[ "com.sleepycat.je", "java.io" ]
com.sleepycat.je; java.io;
616,021
public void addListener(final String topic, final MqttCallback callback) { logger.info("Adding listener {} to topic '{}'", callback.getClass().getSimpleName(), topic); final String fullTopic = this.topicPrefix + topic; Collection<MqttCallback> callbacksForTopic = this.listeners.get(fullTopic...
void function(final String topic, final MqttCallback callback) { logger.info(STR, callback.getClass().getSimpleName(), topic); final String fullTopic = this.topicPrefix + topic; Collection<MqttCallback> callbacksForTopic = this.listeners.get(fullTopic); if (callbacksForTopic == null) { callbacksForTopic = new ArrayList...
/** * Registers a callback for receiving MQTT messages. * * @param topic * topic to listen for messages. * @param callback * listener to register. */
Registers a callback for receiving MQTT messages
addListener
{ "repo_name": "zambrovski/mqtt-camunda-bpm", "path": "mqtt-camunda-bridge/src/main/java/de/techjava/mqtt/camunda/comm/MqttReceiver.java", "license": "bsd-3-clause", "size": 4854 }
[ "java.util.ArrayList", "java.util.Collection", "org.eclipse.paho.client.mqttv3.MqttCallback", "org.eclipse.paho.client.mqttv3.MqttException" ]
import java.util.ArrayList; import java.util.Collection; import org.eclipse.paho.client.mqttv3.MqttCallback; import org.eclipse.paho.client.mqttv3.MqttException;
import java.util.*; import org.eclipse.paho.client.mqttv3.*;
[ "java.util", "org.eclipse.paho" ]
java.util; org.eclipse.paho;
408,505
String path = jarClass.getProtectionDomain().getCodeSource().getLocation().getPath(); try (JarFile jar = new JarFile(URLDecoder.decode(path, "UTF-8"))) { Manifest manifest = jar.getManifest(); return manifest.getMainAttributes().getValue("version"); } catch (IOException e) { } return "(versi...
String path = jarClass.getProtectionDomain().getCodeSource().getLocation().getPath(); try (JarFile jar = new JarFile(URLDecoder.decode(path, "UTF-8"))) { Manifest manifest = jar.getManifest(); return manifest.getMainAttributes().getValue(STR); } catch (IOException e) { } return STR; } private Version() {}
/** * Returns the "version" entry from a jar file's manifest, if available. * If the class isn't in a jar file, or that jar file doesn't define a * "version" entry, then a "not available" string is returned. * * @param jarClass any class from the target jar */
Returns the "version" entry from a jar file's manifest, if available. If the class isn't in a jar file, or that jar file doesn't define a "version" entry, then a "not available" string is returned
jarVersion
{ "repo_name": "bandcampdotcom/j2objc", "path": "translator/src/main/java/com/google/devtools/j2objc/util/Version.java", "license": "apache-2.0", "size": 1481 }
[ "java.io.IOException", "java.net.URLDecoder", "java.util.jar.JarFile", "java.util.jar.Manifest" ]
import java.io.IOException; import java.net.URLDecoder; import java.util.jar.JarFile; import java.util.jar.Manifest;
import java.io.*; import java.net.*; import java.util.jar.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
2,687,557
@Override protected void run() throws Exception { ApplicationContext appContext = ApplicationContextFactory.createStartupApplicationContext(); populateMeta(); MetaDataLoader metaLoader = appContext.getBean(MetaDataLoader.class); metaLoader.writeMetaData(meta, out); }
void function() throws Exception { ApplicationContext appContext = ApplicationContextFactory.createStartupApplicationContext(); populateMeta(); MetaDataLoader metaLoader = appContext.getBean(MetaDataLoader.class); metaLoader.writeMetaData(meta, out); }
/** * Retrieves run details from the LIMS and creates a sample sheet. * * @throws Exception */
Retrieves run details from the LIMS and creates a sample sheet
run
{ "repo_name": "crukci-bioinformatics/MGA", "path": "src/main/java/org/cruk/mga/workflow/CreateMetadataFromSampleSheet.java", "license": "mit", "size": 20109 }
[ "org.cruk.workflow.assembly.MetaDataLoader", "org.cruk.workflow.util.ApplicationContextFactory", "org.springframework.context.ApplicationContext" ]
import org.cruk.workflow.assembly.MetaDataLoader; import org.cruk.workflow.util.ApplicationContextFactory; import org.springframework.context.ApplicationContext;
import org.cruk.workflow.assembly.*; import org.cruk.workflow.util.*; import org.springframework.context.*;
[ "org.cruk.workflow", "org.springframework.context" ]
org.cruk.workflow; org.springframework.context;
2,643,196
public String getColumnTypeName(int column) throws SQLException { checkColumn(column); Type type = resultMetaData.columnTypes[--column]; return type.getNameString(); }
String function(int column) throws SQLException { checkColumn(column); Type type = resultMetaData.columnTypes[--column]; return type.getNameString(); }
/** * <!-- start generic documentation --> * Retrieves the designated column's database-specific type name. * <!-- end generic documentation --> * * @param column the first column is 1, the second is 2, ... * @return type name used by the database. If the column type is * a user-defin...
Retrieves the designated column's database-specific type name.
getColumnTypeName
{ "repo_name": "kumarrus/voltdb", "path": "src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCResultSetMetaData.java", "license": "agpl-3.0", "size": 39101 }
[ "java.sql.SQLException", "org.hsqldb_voltpatches.types.Type" ]
import java.sql.SQLException; import org.hsqldb_voltpatches.types.Type;
import java.sql.*; import org.hsqldb_voltpatches.types.*;
[ "java.sql", "org.hsqldb_voltpatches.types" ]
java.sql; org.hsqldb_voltpatches.types;
1,112,528
@Override public List<DeveloperDatabase> getDatabaseList(DeveloperObjectFactory developerObjectFactory) { try { ExtraUserActorDeveloperDatabaseFactory dbFactory = new ExtraUserActorDeveloperDatabaseFactory(pluginDatabaseSystem, pluginId); return dbFactory.getDatabaseList(develope...
List<DeveloperDatabase> function(DeveloperObjectFactory developerObjectFactory) { try { ExtraUserActorDeveloperDatabaseFactory dbFactory = new ExtraUserActorDeveloperDatabaseFactory(pluginDatabaseSystem, pluginId); return dbFactory.getDatabaseList(developerObjectFactory); } catch (Exception exception) { exception.print...
/** * DatabaseManagerForDevelopers interface implementation * Returns the list of databases implemented on this plug in. */
DatabaseManagerForDevelopers interface implementation Returns the list of databases implemented on this plug in
getDatabaseList
{ "repo_name": "fvasquezjatar/fermat-unused", "path": "DMP/plugin/actor/fermat-dmp-plugin-actor-extra-user-bitdubai/src/main/java/com/bitdubai/fermat_dmp_plugin/layer/actor/extra_user/developer/bitdubai/version_1/ExtraUserActorPluginRoot.java", "license": "mit", "size": 26598 }
[ "com.bitdubai.fermat_api.FermatException", "com.bitdubai.fermat_api.layer.all_definition.developer.DeveloperDatabase", "com.bitdubai.fermat_api.layer.all_definition.developer.DeveloperObjectFactory", "com.bitdubai.fermat_api.layer.all_definition.enums.Plugins", "com.bitdubai.fermat_dmp_plugin.layer.actor.ex...
import com.bitdubai.fermat_api.FermatException; import com.bitdubai.fermat_api.layer.all_definition.developer.DeveloperDatabase; import com.bitdubai.fermat_api.layer.all_definition.developer.DeveloperObjectFactory; import com.bitdubai.fermat_api.layer.all_definition.enums.Plugins; import com.bitdubai.fermat_dmp_plugin....
import com.bitdubai.fermat_api.*; import com.bitdubai.fermat_api.layer.all_definition.developer.*; import com.bitdubai.fermat_api.layer.all_definition.enums.*; import com.bitdubai.fermat_dmp_plugin.layer.actor.extra_user.developer.bitdubai.version_1.database.*; import com.bitdubai.fermat_pip_api.layer.pip_actor.excepti...
[ "com.bitdubai.fermat_api", "com.bitdubai.fermat_dmp_plugin", "com.bitdubai.fermat_pip_api", "java.util" ]
com.bitdubai.fermat_api; com.bitdubai.fermat_dmp_plugin; com.bitdubai.fermat_pip_api; java.util;
2,204,932
public static Set<URI> listInputDocuments(Options options) throws URISyntaxException, IOException { URI baseUri = new URI(options.getInput()); // List all documents in the directory or GCS prefix. URI absoluteUri; if (baseUri.getScheme() != null) { absoluteUri = baseUri; } else { ...
static Set<URI> function(Options options) throws URISyntaxException, IOException { URI baseUri = new URI(options.getInput()); URI absoluteUri; if (baseUri.getScheme() != null) { absoluteUri = baseUri; } else { absoluteUri = new URI( "file", baseUri.getAuthority(), baseUri.getPath(), baseUri.getQuery(), baseUri.getFragm...
/** * Lists documents contained beneath the {@code options.input} prefix/directory. */
Lists documents contained beneath the options.input prefix/directory
listInputDocuments
{ "repo_name": "haonaturel/DataflowJavaSDK", "path": "examples/src/main/java/com/google/cloud/dataflow/examples/TfIdf.java", "license": "apache-2.0", "size": 18220 }
[ "com.google.cloud.dataflow.sdk.options.GcsOptions", "com.google.cloud.dataflow.sdk.transforms.PTransform", "com.google.cloud.dataflow.sdk.util.GcsUtil", "com.google.cloud.dataflow.sdk.util.gcsfs.GcsPath", "com.google.cloud.dataflow.sdk.values.PCollection", "com.google.cloud.dataflow.sdk.values.PInput", ...
import com.google.cloud.dataflow.sdk.options.GcsOptions; import com.google.cloud.dataflow.sdk.transforms.PTransform; import com.google.cloud.dataflow.sdk.util.GcsUtil; import com.google.cloud.dataflow.sdk.util.gcsfs.GcsPath; import com.google.cloud.dataflow.sdk.values.PCollection; import com.google.cloud.dataflow.sdk.v...
import com.google.cloud.dataflow.sdk.options.*; import com.google.cloud.dataflow.sdk.transforms.*; import com.google.cloud.dataflow.sdk.util.*; import com.google.cloud.dataflow.sdk.util.gcsfs.*; import com.google.cloud.dataflow.sdk.values.*; import java.io.*; import java.net.*; import java.util.*;
[ "com.google.cloud", "java.io", "java.net", "java.util" ]
com.google.cloud; java.io; java.net; java.util;
865,565
public SalesforceObjectType loadObjectType(String objectTypeName, CachePolicy cachePolicy, long refreshCacheIfOlderThan) { if (objectTypeName == null || Constants.EMPTY_STRING.equals(objectTypeName)) { Log.e(TAG, "Cannot load recently accessed objects for invalid object type"); ...
SalesforceObjectType function(String objectTypeName, CachePolicy cachePolicy, long refreshCacheIfOlderThan) { if (objectTypeName == null Constants.EMPTY_STRING.equals(objectTypeName)) { Log.e(TAG, STR); return null; } if (cachePolicy == CachePolicy.INVALIDATE_CACHE_DONT_RELOAD) { cacheManager.removeCache(METADATA_CACHE...
/** * Returns metadata for a specific object type. * * @param objectTypeName Object type name. * @param cachePolicy Cache policy. * @param refreshCacheIfOlderThan Time interval to refresh cache. * @return Metadata for a specific object type. */
Returns metadata for a specific object type
loadObjectType
{ "repo_name": "solomonronald/SalesforceMobileSDK-Android", "path": "libs/SmartSync/src/com/salesforce/androidsdk/smartsync/manager/MetadataManager.java", "license": "apache-2.0", "size": 51495 }
[ "android.util.Log", "com.salesforce.androidsdk.rest.RestRequest", "com.salesforce.androidsdk.rest.RestResponse", "com.salesforce.androidsdk.smartsync.manager.CacheManager", "com.salesforce.androidsdk.smartsync.model.SalesforceObjectType", "com.salesforce.androidsdk.smartsync.util.Constants", "java.io.IO...
import android.util.Log; import com.salesforce.androidsdk.rest.RestRequest; import com.salesforce.androidsdk.rest.RestResponse; import com.salesforce.androidsdk.smartsync.manager.CacheManager; import com.salesforce.androidsdk.smartsync.model.SalesforceObjectType; import com.salesforce.androidsdk.smartsync.util.Constant...
import android.util.*; import com.salesforce.androidsdk.rest.*; import com.salesforce.androidsdk.smartsync.manager.*; import com.salesforce.androidsdk.smartsync.model.*; import com.salesforce.androidsdk.smartsync.util.*; import java.io.*; import java.util.*; import org.json.*;
[ "android.util", "com.salesforce.androidsdk", "java.io", "java.util", "org.json" ]
android.util; com.salesforce.androidsdk; java.io; java.util; org.json;
73,201
public final boolean isModified() { long now = Alarm.getCurrentTime(); if (now <= _lastCheckTime + _checkInterval) return _isModified; synchronized (this) { now = Alarm.getCurrentTime(); if (now <= _lastCheckTime + _checkInterval) return _isModified; _lastCheckTi...
final boolean function() { long now = Alarm.getCurrentTime(); if (now <= _lastCheckTime + _checkInterval) return _isModified; synchronized (this) { now = Alarm.getCurrentTime(); if (now <= _lastCheckTime + _checkInterval) return _isModified; _lastCheckTime = now; } _isModified = isModifiedImpl(); return _isModified; }
/** * Returns true if the underlying resource has changed. */
Returns true if the underlying resource has changed
isModified
{ "repo_name": "dlitz/resin", "path": "modules/kernel/src/com/caucho/make/CachedDependency.java", "license": "gpl-2.0", "size": 2338 }
[ "com.caucho.util.Alarm" ]
import com.caucho.util.Alarm;
import com.caucho.util.*;
[ "com.caucho.util" ]
com.caucho.util;
1,771,654
File getFileForUri(Uri uri); } static class SimplePathStrategy implements PathStrategy { private final String mAuthority; private final HashMap<String, File> mRoots = new HashMap<String, File>(); SimplePathStrategy(String authority) { mAuthority = authority; ...
File getFileForUri(Uri uri); } static class SimplePathStrategy implements PathStrategy { private final String mAuthority; private final HashMap<String, File> mRoots = new HashMap<String, File>(); SimplePathStrategy(String authority) { mAuthority = authority; }
/** * Return a {@link File} that represents the given {@link Uri}. */
Return a <code>File</code> that represents the given <code>Uri</code>
getFileForUri
{ "repo_name": "roshakorost/Phial", "path": "phial-overlay/src/main/java/com/mindcoders/phial/internal/util/support/FileProvider.java", "license": "apache-2.0", "size": 36369 }
[ "android.net.Uri", "java.io.File", "java.util.HashMap" ]
import android.net.Uri; import java.io.File; import java.util.HashMap;
import android.net.*; import java.io.*; import java.util.*;
[ "android.net", "java.io", "java.util" ]
android.net; java.io; java.util;
2,603,167
private boolean checkExceedsMaxGenders(MsgSelectNode selectNode, int depth) { for (int caseNum = 0; caseNum < selectNode.numChildren(); caseNum++) { if (selectNode.getChild(caseNum).numChildren() > 0) { StandaloneNode caseNodeChild = selectNode.getChild(caseNum).getChild(0); // Plural cannot...
boolean function(MsgSelectNode selectNode, int depth) { for (int caseNum = 0; caseNum < selectNode.numChildren(); caseNum++) { if (selectNode.getChild(caseNum).numChildren() > 0) { StandaloneNode caseNodeChild = selectNode.getChild(caseNum).getChild(0); if (caseNodeChild instanceof MsgPluralNode && depth >= 3) { errorR...
/** * Helper to verify that a rewritten soy msg tree does not exceed the restriction on number of * total genders allowed (2 if includes plural, 3 otherwise). * * @param selectNode The select node to start searching from. * @param depth The current depth of the select node. * @return Whether the tree ...
Helper to verify that a rewritten soy msg tree does not exceed the restriction on number of total genders allowed (2 if includes plural, 3 otherwise)
checkExceedsMaxGenders
{ "repo_name": "Medium/closure-templates", "path": "java/src/com/google/template/soy/passes/RewriteGenderMsgsVisitor.java", "license": "apache-2.0", "size": 8356 }
[ "com.google.template.soy.soytree.MsgPluralNode", "com.google.template.soy.soytree.MsgSelectNode", "com.google.template.soy.soytree.SoyNode" ]
import com.google.template.soy.soytree.MsgPluralNode; import com.google.template.soy.soytree.MsgSelectNode; import com.google.template.soy.soytree.SoyNode;
import com.google.template.soy.soytree.*;
[ "com.google.template" ]
com.google.template;
1,897,160
public String getAsText() { Date value = (Date) getValue(); return value != null ? new LocalDateTime(value).toString(formatter) : ""; }
String function() { Date value = (Date) getValue(); return value != null ? new LocalDateTime(value).toString(formatter) : ""; }
/** * Format the YearMonthDay as String, using the specified format. * * @return DateTime formatted string */
Format the YearMonthDay as String, using the specified format
getAsText
{ "repo_name": "iskar909/Mapgen", "path": "src/main/java/io/corylee/mapgen/web/propertyeditors/LocaleDateTimeEditor.java", "license": "mit", "size": 1995 }
[ "java.util.Date", "org.joda.time.LocalDateTime" ]
import java.util.Date; import org.joda.time.LocalDateTime;
import java.util.*; import org.joda.time.*;
[ "java.util", "org.joda.time" ]
java.util; org.joda.time;
2,286,814
public static L2ModificationInstruction modVlanPcp(Byte vlanPcp) { checkNotNull(vlanPcp, "VLAN Pcp cannot be null"); return new ModVlanPcpInstruction(vlanPcp); }
static L2ModificationInstruction function(Byte vlanPcp) { checkNotNull(vlanPcp, STR); return new ModVlanPcpInstruction(vlanPcp); }
/** * Creates a VLAN PCP modification. * * @param vlanPcp the PCP to modify to * @return a L2 modification */
Creates a VLAN PCP modification
modVlanPcp
{ "repo_name": "kuangrewawa/onos", "path": "core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java", "license": "apache-2.0", "size": 15029 }
[ "com.google.common.base.Preconditions", "org.onosproject.net.flow.instructions.L2ModificationInstruction" ]
import com.google.common.base.Preconditions; import org.onosproject.net.flow.instructions.L2ModificationInstruction;
import com.google.common.base.*; import org.onosproject.net.flow.instructions.*;
[ "com.google.common", "org.onosproject.net" ]
com.google.common; org.onosproject.net;
906,322
public List<Item> getDirtyItemsToUpdate() { List<Item> dirtyItems = new ArrayList<Item>(); IStorage cubeStorage = getStorage(StorageType.CUBE.getId()); if (cubeStorage.getPersistentState() == PersistentState.UPDATE_REQUIRED) { dirtyItems.addAll(cubeStorage.getItemsWithKinah()); ...
List<Item> function() { List<Item> dirtyItems = new ArrayList<Item>(); IStorage cubeStorage = getStorage(StorageType.CUBE.getId()); if (cubeStorage.getPersistentState() == PersistentState.UPDATE_REQUIRED) { dirtyItems.addAll(cubeStorage.getItemsWithKinah()); dirtyItems.addAll(cubeStorage.getDeletedItems()); cubeStorage...
/** * Items from UPDATE_REQUIRED storages and equipment * * @return */
Items from UPDATE_REQUIRED storages and equipment
getDirtyItemsToUpdate
{ "repo_name": "f14shm4n/aion-event-engine", "path": "EventEngine/src/com/aionemu/gameserver/model/gameobjects/player/Player.java", "license": "gpl-2.0", "size": 68792 }
[ "com.aionemu.gameserver.model.gameobjects.Item", "com.aionemu.gameserver.model.gameobjects.PersistentState", "com.aionemu.gameserver.model.items.storage.IStorage", "com.aionemu.gameserver.model.items.storage.StorageType", "java.util.ArrayList", "java.util.List" ]
import com.aionemu.gameserver.model.gameobjects.Item; import com.aionemu.gameserver.model.gameobjects.PersistentState; import com.aionemu.gameserver.model.items.storage.IStorage; import com.aionemu.gameserver.model.items.storage.StorageType; import java.util.ArrayList; import java.util.List;
import com.aionemu.gameserver.model.gameobjects.*; import com.aionemu.gameserver.model.items.storage.*; import java.util.*;
[ "com.aionemu.gameserver", "java.util" ]
com.aionemu.gameserver; java.util;
147,987
public void testPassiveReserveAvailabilityChange() throws Throwable { createServers(3); CopycatServer passive = createServer(nextMember(Member.Type.PASSIVE)); passive.join(members.stream().map(Member::serverAddress).collect(Collectors.toList())).thenRun(this::resume); await(10000); Member reser...
void function() throws Throwable { createServers(3); CopycatServer passive = createServer(nextMember(Member.Type.PASSIVE)); passive.join(members.stream().map(Member::serverAddress).collect(Collectors.toList())).thenRun(this::resume); await(10000); Member reserveMember = nextMember(Member.Type.RESERVE); passive.cluster(...
/** * Tests detecting an availability change of a reserve member on a passive member. */
Tests detecting an availability change of a reserve member on a passive member
testPassiveReserveAvailabilityChange
{ "repo_name": "atomix/copycat", "path": "test/src/test/java/io/atomix/copycat/test/ClusterTest.java", "license": "apache-2.0", "size": 39445 }
[ "io.atomix.copycat.server.CopycatServer", "io.atomix.copycat.server.cluster.Member", "java.util.stream.Collectors" ]
import io.atomix.copycat.server.CopycatServer; import io.atomix.copycat.server.cluster.Member; import java.util.stream.Collectors;
import io.atomix.copycat.server.*; import io.atomix.copycat.server.cluster.*; import java.util.stream.*;
[ "io.atomix.copycat", "java.util" ]
io.atomix.copycat; java.util;
611,409
public static void createAndFailSilent(ZooKeeperWatcher zkw, String znode) throws KeeperException { createAndFailSilent(zkw, znode, new byte[0]); }
static void function(ZooKeeperWatcher zkw, String znode) throws KeeperException { createAndFailSilent(zkw, znode, new byte[0]); }
/** * Creates the specified node, iff the node does not exist. Does not set a * watch and fails silently if the node already exists. * * The node created is persistent and open access. * * @param zkw zk reference * @param znode path of node * @throws KeeperException if unexpected zookeeper exce...
Creates the specified node, iff the node does not exist. Does not set a watch and fails silently if the node already exists. The node created is persistent and open access
createAndFailSilent
{ "repo_name": "lilonglai/hbase-0.96.2", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java", "license": "apache-2.0", "size": 72004 }
[ "org.apache.zookeeper.KeeperException" ]
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.*;
[ "org.apache.zookeeper" ]
org.apache.zookeeper;
875,108
protected int findBytes(ByteChunk bc, byte[] b) { byte first = b[0]; byte[] buff = bc.getBuffer(); int start = bc.getStart(); int end = bc.getEnd(); // Look for first char int srcEnd = b.length; for (int i = start; i <= (end - srcEnd); i++) { if...
int function(ByteChunk bc, byte[] b) { byte first = b[0]; byte[] buff = bc.getBuffer(); int start = bc.getStart(); int end = bc.getEnd(); int srcEnd = b.length; for (int i = start; i <= (end - srcEnd); i++) { if (Ascii.toLower(buff[i]) != first) continue; int myPos = i+1; for (int srcPos = 1; srcPos < srcEnd; ) { if (A...
/** * Specialized utility method: find a sequence of lower case bytes inside * a ByteChunk. */
Specialized utility method: find a sequence of lower case bytes inside a ByteChunk
findBytes
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.0/AbstractHttp11Processor.java", "license": "mit", "size": 18790 }
[ "org.apache.tomcat.util.buf.Ascii", "org.apache.tomcat.util.buf.ByteChunk" ]
import org.apache.tomcat.util.buf.Ascii; import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.*;
[ "org.apache.tomcat" ]
org.apache.tomcat;
1,720,798
public static <T> String toString(Class<T> cls, T obj, String name, @Nullable Object val) { return toString(cls, obj, name, val, false); }
static <T> String function(Class<T> cls, T obj, String name, @Nullable Object val) { return toString(cls, obj, name, val, false); }
/** * Produces auto-generated output of string presentation for given object and its declaration class. * * @param <T> Type of the object. * @param cls Declaration class of the object. Note that this should not be a runtime class. * @param obj Object to get a string presentation for. * @pa...
Produces auto-generated output of string presentation for given object and its declaration class
toString
{ "repo_name": "nizhikov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/tostring/GridToStringBuilder.java", "license": "apache-2.0", "size": 66364 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
43,083
private Switchboard createNewSwitchboard(SwitchboardDto switchboardDto, BindingResult bindingResult) { // Set user switchboardDto.setCompany(getCurrentCompany()); // try to register return switchboardService.registerNewSwitchboard(switchboardDto); }
Switchboard function(SwitchboardDto switchboardDto, BindingResult bindingResult) { switchboardDto.setCompany(getCurrentCompany()); return switchboardService.registerNewSwitchboard(switchboardDto); }
/** * Creates a new switchboard. * * @param switchboardDto * @param bindingResult * @return */
Creates a new switchboard
createNewSwitchboard
{ "repo_name": "Monpoke/scotipweb", "path": "src/main/java/scotip/app/pages/logged/SwitchboardCreateController.java", "license": "mit", "size": 5655 }
[ "org.springframework.validation.BindingResult" ]
import org.springframework.validation.BindingResult;
import org.springframework.validation.*;
[ "org.springframework.validation" ]
org.springframework.validation;
1,055,452
public ItemScope scope() { return this.scope; }
ItemScope function() { return this.scope; }
/** * Get the scope property: Enum indicating if this item definition is owned by a specific user or is shared between * all users with access to the Application Insights component. * * @return the scope value. */
Get the scope property: Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the Application Insights component
scope
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java", "license": "mit", "size": 7415 }
[ "com.azure.resourcemanager.applicationinsights.models.ItemScope" ]
import com.azure.resourcemanager.applicationinsights.models.ItemScope;
import com.azure.resourcemanager.applicationinsights.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,538,334
private void myGenerateDbRead(Map<String, Integer> columnTypes, String[] colNames, StringBuilder sb, int methodNumber, int size, boolean wrapInMethod) { if (wrapInMethod) { sb.append(" public void readFields" +...
void function(Map<String, Integer> columnTypes, String[] colNames, StringBuilder sb, int methodNumber, int size, boolean wrapInMethod) { if (wrapInMethod) { sb.append(STR + methodNumber + STR); sb.append(STR); } for (int i = methodNumber * size; i < topBoundary(colNames, methodNumber, size); ++i) { String col = colName...
/** * Generate the readFields() method used by the database. * @param columnTypes - mapping from column names to sql types * @param colNames - ordered list of column names for table. * @param sb - StringBuilder to append code to * @param methodNumber - method number * @param size - number of columns p...
Generate the readFields() method used by the database
myGenerateDbRead
{ "repo_name": "icoding/sqoop", "path": "src/java/org/apache/sqoop/orm/ClassWriter.java", "license": "apache-2.0", "size": 72861 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,535,688
return coinbase.getCurrencyExchangeRates(Coinbase.CB_VERSION_VALUE).getData().getRates(); }
return coinbase.getCurrencyExchangeRates(Coinbase.CB_VERSION_VALUE).getData().getRates(); }
/** * Unauthenticated resource that returns BTC to fiat (and vice versus) exchange rates in various * currencies. * * @return Map of lower case directional currency pairs, i.e. btc_to_xxx and xxx_to_btc, to * exchange rates. * @throws IOException * @see <a * href="https://developers.coin...
Unauthenticated resource that returns BTC to fiat (and vice versus) exchange rates in various currencies
getCoinbaseExchangeRates
{ "repo_name": "stachon/XChange", "path": "xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/v2/service/CoinbaseMarketDataServiceRaw.java", "license": "mit", "size": 3725 }
[ "org.knowm.xchange.coinbase.v2.Coinbase" ]
import org.knowm.xchange.coinbase.v2.Coinbase;
import org.knowm.xchange.coinbase.v2.*;
[ "org.knowm.xchange" ]
org.knowm.xchange;
519,933
public int xhdr(String header, String selectedArticles) throws IOException { StringBuffer command = new StringBuffer(header); command.append(" "); command.append(selectedArticles); return sendCommand(NNTPCommand.XHDR, command.toString()); }
int function(String header, String selectedArticles) throws IOException { StringBuffer command = new StringBuffer(header); command.append(" "); command.append(selectedArticles); return sendCommand(NNTPCommand.XHDR, command.toString()); }
/*** * A convenience method to send the NNTP XHDR command to the server, receive * the reply, and return the reply code. * <p> * * @param header * a String naming a header line (e.g., "subject"). See RFC-1036 * for a list of valid header lines. * @param selectedArticles * ...
A convenience method to send the NNTP XHDR command to the server, receive the reply, and return the reply code.
xhdr
{ "repo_name": "jreadstone/zsyproject", "path": "src/org/g4studio/core/net/nntp/NNTP.java", "license": "gpl-2.0", "size": 42276 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,355,304