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
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> createOrUpdateWorkerPoolWithResponseAsync( String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope, Context context) { if (this.cl...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (reso...
/** * Create or update a worker pool. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the App Service Environment. * @param workerPoolName Name of the worker pool. * @param workerPoolEnvelope Properties of the worker pool. *...
Create or update a worker pool
createOrUpdateWorkerPoolWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServiceEnvironmentsClientImpl.java", "license": "mit", "size": 563770 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.appservice.fluent.models.WorkerPoolResourceInner", "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.appservice.fluent.models.WorkerPoolResourceInner; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
2,643,022
public void setOnErrorListener(IMediaPlayer.OnErrorListener l) { mOnErrorListener = l; }
void function(IMediaPlayer.OnErrorListener l) { mOnErrorListener = l; }
/** * Register a callback to be invoked when an error occurs * during playback or setup. If no listener is specified, * or if the listener returned false, VideoView will inform * the user of any errors. * * @param l The callback that will be run */
Register a callback to be invoked when an error occurs during playback or setup. If no listener is specified, or if the listener returned false, VideoView will inform the user of any errors
setOnErrorListener
{ "repo_name": "307509256/ijkplayer-plus", "path": "android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/widget/media/IjkVideoView.java", "license": "gpl-2.0", "size": 49140 }
[ "tv.danmaku.ijk.media.player.IMediaPlayer" ]
import tv.danmaku.ijk.media.player.IMediaPlayer;
import tv.danmaku.ijk.media.player.*;
[ "tv.danmaku.ijk" ]
tv.danmaku.ijk;
1,698,522
// TODO(b/138456686): consider controlling this behavior by flag if migration appears risky. public static DetailedExitCode of(ExitCode exitCode, FailureDetail failureDetail) { return new DetailedExitCode(checkNotNull(exitCode), checkNotNull(failureDetail)); }
static DetailedExitCode function(ExitCode exitCode, FailureDetail failureDetail) { return new DetailedExitCode(checkNotNull(exitCode), checkNotNull(failureDetail)); }
/** * Returns a {@link DetailedExitCode} combining the provided {@link FailureDetail} and {@link * ExitCode}. * * <p>This method exists in order to allow for the introduction of new {@link * FailureDetail)-handling code infrastructure without requiring any simultaneous change in exit * code behavior. ...
Returns a <code>DetailedExitCode</code> combining the provided <code>FailureDetail</code> and <code>ExitCode</code>. This method exists in order to allow for the introduction of new <code>FailureDetail)-handling code infrastructure without requiring any simultaneous change in exit code behavior. Callsites should migrat...
of
{ "repo_name": "akira-baruah/bazel", "path": "src/main/java/com/google/devtools/build/lib/util/DetailedExitCode.java", "license": "apache-2.0", "size": 8617 }
[ "com.google.common.base.Preconditions", "com.google.devtools.build.lib.server.FailureDetails" ]
import com.google.common.base.Preconditions; import com.google.devtools.build.lib.server.FailureDetails;
import com.google.common.base.*; import com.google.devtools.build.lib.server.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
2,280,535
@Override public void enterParam_type(@NotNull FunctionParser.Param_typeContext ctx) { }
@Override public void enterParam_type(@NotNull FunctionParser.Param_typeContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitParam_type_list
{ "repo_name": "octopus-platform/joern", "path": "projects/extensions/joern-fuzzyc/src/main/java/antlr/FunctionBaseListener.java", "license": "lgpl-3.0", "size": 42232 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
647,382
@Nullable Position getWordAtOffset(int offset);
Position getWordAtOffset(int offset);
/** * Get word position under offset. * * @param offset the offset for look for a word * @return the word position */
Get word position under offset
getWordAtOffset
{ "repo_name": "TypeFox/che", "path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/texteditor/TextEditor.java", "license": "epl-1.0", "size": 5085 }
[ "org.eclipse.che.ide.api.editor.text.Position" ]
import org.eclipse.che.ide.api.editor.text.Position;
import org.eclipse.che.ide.api.editor.text.*;
[ "org.eclipse.che" ]
org.eclipse.che;
683,582
private float getScrollFactor() { if (mScrollFactor == Float.MIN_VALUE) { TypedValue outValue = new TypedValue(); if (getContext().getTheme().resolveAttribute( android.R.attr.listPreferredItemHeight, outValue, true)) { mScrollFactor = outValue.getD...
float function() { if (mScrollFactor == Float.MIN_VALUE) { TypedValue outValue = new TypedValue(); if (getContext().getTheme().resolveAttribute( android.R.attr.listPreferredItemHeight, outValue, true)) { mScrollFactor = outValue.getDimension( getContext().getResources().getDisplayMetrics()); } else { return 0; } } retu...
/** * Ported from View.getVerticalScrollFactor. */
Ported from View.getVerticalScrollFactor
getScrollFactor
{ "repo_name": "AylaGene/testRepo_Public", "path": "TMessagesProj/src/main/java/org/telegram/messenger/support/widget/RecyclerView.java", "license": "gpl-2.0", "size": 480719 }
[ "android.util.TypedValue" ]
import android.util.TypedValue;
import android.util.*;
[ "android.util" ]
android.util;
180,499
protected CompletableFuture<Optional<Topic>> loadOrCreatePersistentTopic(final String topic, boolean createIfMissing) throws RuntimeException { final CompletableFuture<Optional<Topic>> topicFuture = FutureUtil.createFutureWithTimeout( Duration.ofSeconds(pulsar.getConfiguration()....
CompletableFuture<Optional<Topic>> function(final String topic, boolean createIfMissing) throws RuntimeException { final CompletableFuture<Optional<Topic>> topicFuture = FutureUtil.createFutureWithTimeout( Duration.ofSeconds(pulsar.getConfiguration().getTopicLoadTimeoutSeconds()), executor(), () -> FAILED_TO_LOAD_TOPIC...
/** * It creates a topic async and returns CompletableFuture. It also throttles down configured max-concurrent topic * loading and puts them into queue once in-process topics are created. * * @param topic persistent-topic name * @return CompletableFuture<Topic> * @throws RuntimeException ...
It creates a topic async and returns CompletableFuture. It also throttles down configured max-concurrent topic loading and puts them into queue once in-process topics are created
loadOrCreatePersistentTopic
{ "repo_name": "yahoo/pulsar", "path": "pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java", "license": "apache-2.0", "size": 131206 }
[ "java.time.Duration", "java.util.Optional", "java.util.concurrent.CompletableFuture", "java.util.concurrent.Semaphore", "org.apache.commons.lang3.tuple.ImmutablePair", "org.apache.pulsar.broker.service.BrokerServiceException", "org.apache.pulsar.common.util.FutureUtil" ]
import java.time.Duration; import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Semaphore; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.pulsar.broker.service.BrokerServiceException; import org.apache.pulsar.common.util.FutureUtil;
import java.time.*; import java.util.*; import java.util.concurrent.*; import org.apache.commons.lang3.tuple.*; import org.apache.pulsar.broker.service.*; import org.apache.pulsar.common.util.*;
[ "java.time", "java.util", "org.apache.commons", "org.apache.pulsar" ]
java.time; java.util; org.apache.commons; org.apache.pulsar;
2,026,738
public static void main(String[] args) throws Exception { // create a fsck object Configuration conf = HBaseConfiguration.create(); Path hbasedir = new Path(conf.get(HConstants.HBASE_DIR)); URI defaultFs = hbasedir.getFileSystem(conf).getUri(); conf.set("fs.defaultFS", defaultFs.toString()); ...
static void function(String[] args) throws Exception { Configuration conf = HBaseConfiguration.create(); Path hbasedir = new Path(conf.get(HConstants.HBASE_DIR)); URI defaultFs = hbasedir.getFileSystem(conf).getUri(); conf.set(STR, defaultFs.toString()); conf.set(STR, defaultFs.toString()); int numThreads = conf.getInt...
/** * Main program * * @param args * @throws Exception */
Main program
main
{ "repo_name": "matteobertozzi/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java", "license": "apache-2.0", "size": 130110 }
[ "java.util.concurrent.ExecutorService", "java.util.concurrent.ScheduledThreadPoolExecutor", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.HBaseConfiguration", "org.apache.hadoop.hbase.HConstants" ]
import java.util.concurrent.ExecutorService; import java.util.concurrent.ScheduledThreadPoolExecutor; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HConstants;
import java.util.concurrent.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
738,902
public static void setValidationConnectionContext( ValidationContext validationContext, Properties connProperties, Map<?,?> appContext ) throws DataException { if( validationContext == null ) throw new IllegalArgumentException("ValidationContext"); //$NON-NLS-1$ ...
static void function( ValidationContext validationContext, Properties connProperties, Map<?,?> appContext ) throws DataException { if( validationContext == null ) throw new IllegalArgumentException(STR); Properties effectiveProps = getEffectiveProperties( connProperties, appContext ); if( effectiveProps != null && ! ef...
/** * Updates the specified validation context with the effective connection context * for online validation of a {@link QuerySpecification}. * @param validationContext the validation context to be updated with a connection context * for online validation of a query specification ...
Updates the specified validation context with the effective connection context for online validation of a <code>QuerySpecification</code>
setValidationConnectionContext
{ "repo_name": "sguan-actuate/birt", "path": "data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/odaconsumer/QuerySpecHelper.java", "license": "epl-1.0", "size": 17621 }
[ "java.util.Map", "java.util.Properties", "org.eclipse.birt.data.engine.core.DataException", "org.eclipse.datatools.connectivity.oda.spec.ValidationContext", "org.eclipse.datatools.connectivity.oda.util.manifest.ConnectionProfileProperty" ]
import java.util.Map; import java.util.Properties; import org.eclipse.birt.data.engine.core.DataException; import org.eclipse.datatools.connectivity.oda.spec.ValidationContext; import org.eclipse.datatools.connectivity.oda.util.manifest.ConnectionProfileProperty;
import java.util.*; import org.eclipse.birt.data.engine.core.*; import org.eclipse.datatools.connectivity.oda.spec.*; import org.eclipse.datatools.connectivity.oda.util.manifest.*;
[ "java.util", "org.eclipse.birt", "org.eclipse.datatools" ]
java.util; org.eclipse.birt; org.eclipse.datatools;
2,490,846
private void paintMultiLine(final CanvasType dest, final String theStr, final Font theFont, final Point thePoint) { int _numLines = 0; final Vector<String> _subStrings = new Vector<String>(); // break it up into a Vector of substrings, // one substring for each line. // break it up into a Vector o...
void function(final CanvasType dest, final String theStr, final Font theFont, final Point thePoint) { int _numLines = 0; final Vector<String> _subStrings = new Vector<String>(); final StringTokenizer t = new StringTokenizer(theStr, "\n"); _numLines = t.countTokens(); for (int i = 0; i < _numLines; i++) { _subStrings.ad...
/** * support class which handles plotting a multi-line label * * @param dest * @param theStr * @param theFont */
support class which handles plotting a multi-line label
paintMultiLine
{ "repo_name": "debrief/debrief", "path": "org.mwc.cmap.legacy/src/MWC/GUI/Shapes/TextLabel.java", "license": "epl-1.0", "size": 17815 }
[ "java.awt.Font", "java.awt.Point", "java.util.StringTokenizer", "java.util.Vector", "javax.swing.SwingConstants" ]
import java.awt.Font; import java.awt.Point; import java.util.StringTokenizer; import java.util.Vector; import javax.swing.SwingConstants;
import java.awt.*; import java.util.*; import javax.swing.*;
[ "java.awt", "java.util", "javax.swing" ]
java.awt; java.util; javax.swing;
1,238,079
private void evalFeedState(List<Node> list){ if (list!=null && list.size()==1){ state = STATE_SINGLE_FEED; } else if (list!=null && list.size()>1){ state = STATE_MULTI_FEED; } }
void function(List<Node> list){ if (list!=null && list.size()==1){ state = STATE_SINGLE_FEED; } else if (list!=null && list.size()>1){ state = STATE_MULTI_FEED; } }
/** * Evaluates the hfeed state based on the retrieved hfeed list. * If no hfeed keyword has been found, hfeed is the whole page. * Then we make a difference between pages with a single hfeed and pages with * multiple hfeeds, that require further validations.<br> * * @param list list of ta...
Evaluates the hfeed state based on the retrieved hfeed list. If no hfeed keyword has been found, hfeed is the whole page. Then we make a difference between pages with a single hfeed and pages with multiple hfeeds, that require further validations
evalFeedState
{ "repo_name": "andreacastello/netbeans-hatom-plugin", "path": "src/it/pronetics/madstore/hatom/netbeans/validator/engine/HfeedAnalyzer.java", "license": "apache-2.0", "size": 10096 }
[ "java.util.List", "org.w3c.dom.Node" ]
import java.util.List; import org.w3c.dom.Node;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
1,741,923
@Override public boolean verify(String hostname, javax.net.ssl.SSLSession session) { return (true); } // verify } // FakeHostnameVerifier public static class FakeX509TrustManager implements X509TrustManager { private static final X509Certificate[] _AcceptedIssuers = new X509Certificate[] {};
boolean function(String hostname, javax.net.ssl.SSLSession session) { return (true); } } public static class FakeX509TrustManager implements X509TrustManager { private static final X509Certificate[] _AcceptedIssuers = new X509Certificate[] {};
/** * Always return true, indicating that the host name is an acceptable match with the * server's authentication scheme. * * @param hostname the host name. * @param session the SSL session used on the connection to host. * @return the true boolean value indicating the host name is trusted. */
Always return true, indicating that the host name is an acceptable match with the server's authentication scheme
verify
{ "repo_name": "shippie/sunnybridge", "path": "src/main/java/de/shippie/sunnybridge/SSLUtilities.java", "license": "apache-2.0", "size": 9798 }
[ "java.security.cert.X509Certificate", "javax.net.ssl.X509TrustManager" ]
import java.security.cert.X509Certificate; import javax.net.ssl.X509TrustManager;
import java.security.cert.*; import javax.net.ssl.*;
[ "java.security", "javax.net" ]
java.security; javax.net;
954,141
public static void setListener(@Nullable final PXTrackingListener listener) { setListener(listener, new HashMap<>(), null); }
static void function(@Nullable final PXTrackingListener listener) { setListener(listener, new HashMap<>(), null); }
/** * Set your own tracker listener to be aware of PX - Checkout events. * * @param listener your listener. */
Set your own tracker listener to be aware of PX - Checkout events
setListener
{ "repo_name": "mercadopago/px-android", "path": "px-checkout/src/main/java/com/mercadopago/android/px/tracking/PXTracker.java", "license": "mit", "size": 2923 }
[ "androidx.annotation.Nullable", "java.util.HashMap" ]
import androidx.annotation.Nullable; import java.util.HashMap;
import androidx.annotation.*; import java.util.*;
[ "androidx.annotation", "java.util" ]
androidx.annotation; java.util;
1,235,621
public static Set<String> loadExclusions(InputStream filestream) throws ConfigException { try (Reader termsIO = new InputStreamReader(filestream)) { CsvMapReader termreader = new CsvMapReader(termsIO, CsvPreference.EXCEL_PREFERENCE); String[] columns = termreader.getHeader(t...
static Set<String> function(InputStream filestream) throws ConfigException { try (Reader termsIO = new InputStreamReader(filestream)) { CsvMapReader termreader = new CsvMapReader(termsIO, CsvPreference.EXCEL_PREFERENCE); String[] columns = termreader.getHeader(true); Map<String, String> terms = null; HashSet<String> st...
/** * Exclusions have two columns in a CSV file. 'exclusion', 'category' * "#" in exclusion column implies a comment. Call is responsible for * getting I/O stream. * * @param filestream URL/file with exclusion terms * @return set of filter terms * @throws ConfigException if filter is ...
Exclusions have two columns in a CSV file. 'exclusion', 'category' "#" in exclusion column implies a comment. Call is responsible for getting I/O stream
loadExclusions
{ "repo_name": "OpenSextant/Xponents", "path": "src/main/java/org/opensextant/extractors/geo/TagFilter.java", "license": "apache-2.0", "size": 11870 }
[ "java.io.InputStream", "java.io.InputStreamReader", "java.io.Reader", "java.util.HashSet", "java.util.Map", "java.util.Set", "org.apache.commons.lang3.StringUtils", "org.opensextant.ConfigException", "org.supercsv.io.CsvMapReader", "org.supercsv.prefs.CsvPreference" ]
import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.apache.commons.lang3.StringUtils; import org.opensextant.ConfigException; import org.supercsv.io.CsvMapReader; import org.supercsv.prefs.CsvPreference;
import java.io.*; import java.util.*; import org.apache.commons.lang3.*; import org.opensextant.*; import org.supercsv.io.*; import org.supercsv.prefs.*;
[ "java.io", "java.util", "org.apache.commons", "org.opensextant", "org.supercsv.io", "org.supercsv.prefs" ]
java.io; java.util; org.apache.commons; org.opensextant; org.supercsv.io; org.supercsv.prefs;
567,323
public synchronized void loadSecretManagerState(DataInputStream in) throws IOException { if (running) { // a safety check throw new IOException( "Can't load state from image in a running SecretManager."); } currentId = in.readInt(); loadAllKeys(in); delegationTokenSeque...
synchronized void function(DataInputStream in) throws IOException { if (running) { throw new IOException( STR); } currentId = in.readInt(); loadAllKeys(in); delegationTokenSequenceNumber = in.readInt(); loadCurrentTokens(in); }
/** * Load SecretManager state from fsimage. * * @param in input stream to read fsimage * @throws IOException */
Load SecretManager state from fsimage
loadSecretManagerState
{ "repo_name": "dianping/cosmos-hadoop", "path": "src/hdfs/org/apache/hadoop/hdfs/security/token/delegation/DelegationTokenSecretManager.java", "license": "apache-2.0", "size": 10237 }
[ "java.io.DataInputStream", "java.io.IOException" ]
import java.io.DataInputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,972,937
public void recover(JobExecutionContext jobExecutionContext)throws GFacProviderException,GFacException;
void function(JobExecutionContext jobExecutionContext)throws GFacProviderException,GFacException;
/** * This method can be used to implement recovering part of the stateful handler * If you do not want to recover an already ran handler you can simply implement * GfacAbstract Handler or GFacHandler or leave this recover method empty. * * @param jobExecutionContext */
This method can be used to implement recovering part of the stateful handler If you do not want to recover an already ran handler you can simply implement GfacAbstract Handler or GFacHandler or leave this recover method empty
recover
{ "repo_name": "glahiru/airavata", "path": "modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/provider/GFacRecoverableProvider.java", "license": "apache-2.0", "size": 2053 }
[ "org.apache.airavata.gfac.GFacException", "org.apache.airavata.gfac.core.context.JobExecutionContext" ]
import org.apache.airavata.gfac.GFacException; import org.apache.airavata.gfac.core.context.JobExecutionContext;
import org.apache.airavata.gfac.*; import org.apache.airavata.gfac.core.context.*;
[ "org.apache.airavata" ]
org.apache.airavata;
199,866
void setAndUpdateNodeHeartbeatResponse(NodeHeartbeatResponse response);
void setAndUpdateNodeHeartbeatResponse(NodeHeartbeatResponse response);
/** * Update a {@link NodeHeartbeatResponse} with the list of containers and * applications to clean up for this node, and the containers to be updated. * * @param response the {@link NodeHeartbeatResponse} to update */
Update a <code>NodeHeartbeatResponse</code> with the list of containers and applications to clean up for this node, and the containers to be updated
setAndUpdateNodeHeartbeatResponse
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java", "license": "apache-2.0", "size": 6612 }
[ "org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse" ]
import org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse;
import org.apache.hadoop.yarn.server.api.protocolrecords.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
491,133
public Format getFormatByArgumentName(String argumentName) { if (cachedFormatters == null) { return null; } int argNumber = MessagePattern.validateArgumentName(argumentName); if (argNumber < MessagePattern.ARG_NAME_NOT_NUMBER) { return null; } ...
Format function(String argumentName) { if (cachedFormatters == null) { return null; } int argNumber = MessagePattern.validateArgumentName(argumentName); if (argNumber < MessagePattern.ARG_NAME_NOT_NUMBER) { return null; } for (int partIndex = 0; (partIndex = nextTopLevelArgStart(partIndex)) >= 0;) { if (argNameMatches(...
/** * {@icu} Returns the first top-level format associated with the given argument name. * For more details, see {@link #setFormatByArgumentName(String, Format)}. * @param argumentName The name of the desired argument. * @return the Format associated with the name, or null if there isn't one. *...
Returns the first top-level format associated with the given argument name. For more details, see <code>#setFormatByArgumentName(String, Format)</code>
getFormatByArgumentName
{ "repo_name": "Miracle121/quickdic-dictionary.dictionary", "path": "jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/text/MessageFormat.java", "license": "apache-2.0", "size": 113006 }
[ "java.text.Format" ]
import java.text.Format;
import java.text.*;
[ "java.text" ]
java.text;
2,406,281
Vector2d rayDirection = new Vector2d(ray.U); rayDirection.normalize(); // test if point is on ray Vector2d pointVector = new Vector2d(point); pointVector.sub(ray.A); double dot = rayDirection.dot(pointVector); if (dot < epsilon) { return false; ...
Vector2d rayDirection = new Vector2d(ray.U); rayDirection.normalize(); Vector2d pointVector = new Vector2d(point); pointVector.sub(ray.A); double dot = rayDirection.dot(pointVector); if (dot < epsilon) { return false; } double x = rayDirection.x; rayDirection.x = rayDirection.y; rayDirection.y = -x; dot = rayDirection....
/** * Test if point is on ray with epsilon. * * @param p * point * @param ray * ray * @return is point on ray */
Test if point is on ray with epsilon
isPointOnRay
{ "repo_name": "kendzi/kendzi-math", "path": "kendzi-math-geometry/src/main/java/kendzi/math/geometry/ray/RayUtil.java", "license": "bsd-3-clause", "size": 8690 }
[ "javax.vecmath.Vector2d" ]
import javax.vecmath.Vector2d;
import javax.vecmath.*;
[ "javax.vecmath" ]
javax.vecmath;
2,444,631
@Test public void testReverseBypass() throws Exception { WebkitUtils.checkFeature(WebViewFeature.PROXY_OVERRIDE_REVERSE_BYPASS); final String contentUrl = "http://www.example.com"; final String bypassUrl = "www.example.com"; int proxyServerRequestCount = mProxyServer.getRequestC...
void function() throws Exception { WebkitUtils.checkFeature(WebViewFeature.PROXY_OVERRIDE_REVERSE_BYPASS); final String contentUrl = STRwww.example.comSTR:" + mProxyServer.getPort()) .addBypassRule(bypassUrl) .setReverseBypassEnabled(true) .build()); mWebViewOnUiThread.loadUrl(contentUrl); proxyServerRequestCount++; as...
/** * This test should have an equivalent in CTS when this is implemented in the framework. */
This test should have an equivalent in CTS when this is implemented in the framework
testReverseBypass
{ "repo_name": "AndroidX/androidx", "path": "webkit/webkit/src/androidTest/java/androidx/webkit/ProxyControllerTest.java", "license": "apache-2.0", "size": 12169 }
[ "java.util.concurrent.TimeUnit", "org.junit.Assert" ]
import java.util.concurrent.TimeUnit; import org.junit.Assert;
import java.util.concurrent.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,544,819
private List<String> generateTestTasks() throws Exception { List<String> ids = new ArrayList<String>(); SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss.SSS"); // 6 tasks for kermit ClockUtil.setCurrentTime(sdf.parse("01/01/2001 01:01:01.000")); for (int i = 0; i < 6; i++) { ...
List<String> function() throws Exception { List<String> ids = new ArrayList<String>(); SimpleDateFormat sdf = new SimpleDateFormat(STR); ClockUtil.setCurrentTime(sdf.parse(STR)); for (int i = 0; i < 6; i++) { Task task = taskService.newTask(); task.setName(STR); task.setDescription(STR); task.setPriority(3); taskServic...
/** * Generates some test tasks. - 6 tasks where kermit is a candidate - 1 tasks * where gonzo is assignee - 2 tasks assigned to management group - 2 tasks * assigned to accountancy group - 1 task assigned to both the management and * accountancy group */
Generates some test tasks. - 6 tasks where kermit is a candidate - 1 tasks where gonzo is assignee - 2 tasks assigned to management group - 2 tasks assigned to accountancy group - 1 task assigned to both the management and accountancy group
generateTestTasks
{ "repo_name": "clintmanning/new-empty", "path": "engine/src/test/java/org/camunda/bpm/engine/test/api/task/TaskQueryTest.java", "license": "apache-2.0", "size": 38821 }
[ "java.text.SimpleDateFormat", "java.util.ArrayList", "java.util.List", "org.camunda.bpm.engine.impl.util.ClockUtil", "org.camunda.bpm.engine.task.Task" ]
import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import org.camunda.bpm.engine.impl.util.ClockUtil; import org.camunda.bpm.engine.task.Task;
import java.text.*; import java.util.*; import org.camunda.bpm.engine.impl.util.*; import org.camunda.bpm.engine.task.*;
[ "java.text", "java.util", "org.camunda.bpm" ]
java.text; java.util; org.camunda.bpm;
1,461,023
public static INaviView create(final INaviModule container, final List<ReilInstruction> instructions) { Preconditions.checkNotNull(container, "IE01775: Container argument can not be null"); Preconditions.checkNotNull(instructions, "IE01779: Instructions argument can not be null"); final Collection<...
static INaviView function(final INaviModule container, final List<ReilInstruction> instructions) { Preconditions.checkNotNull(container, STR); Preconditions.checkNotNull(instructions, STR); final Collection<List<ReilInstruction>> instructionList = new ArrayList<List<ReilInstruction>>(); instructionList.add(instructions...
/** * Creates a REIL view object from a list of REIL instructions. * * @param container The container in which the new REIL view is created. * @param instructions The instructions to be shown in the REIL view. * * @return The created REIL code view. */
Creates a REIL view object from a list of REIL instructions
create
{ "repo_name": "mayl8822/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/REIL/CReilViewCreator.java", "license": "apache-2.0", "size": 10165 }
[ "com.google.common.base.Preconditions", "com.google.security.zynamics.binnavi.disassembly.INaviModule", "com.google.security.zynamics.binnavi.disassembly.views.INaviView", "com.google.security.zynamics.reil.ReilInstruction", "com.google.security.zynamics.reil.translators.ReilGraphGenerator", "com.google.s...
import com.google.common.base.Preconditions; import com.google.security.zynamics.binnavi.disassembly.INaviModule; import com.google.security.zynamics.binnavi.disassembly.views.INaviView; import com.google.security.zynamics.reil.ReilInstruction; import com.google.security.zynamics.reil.translators.ReilGraphGenerator; im...
import com.google.common.base.*; import com.google.security.zynamics.binnavi.disassembly.*; import com.google.security.zynamics.binnavi.disassembly.views.*; import com.google.security.zynamics.reil.*; import com.google.security.zynamics.reil.translators.*; import com.google.security.zynamics.zylib.disassembly.*; import...
[ "com.google.common", "com.google.security", "java.util" ]
com.google.common; com.google.security; java.util;
2,266
public static ObservableDocument createDocument(DocumentSchema schema) { return createDocument(schema, "", SilentOperationSink.VOID); }
static ObservableDocument function(DocumentSchema schema) { return createDocument(schema, "", SilentOperationSink.VOID); }
/** * Creates an observable mutable document with some schema. */
Creates an observable mutable document with some schema
createDocument
{ "repo_name": "wisebaldone/incubator-wave", "path": "wave/src/test/java/org/waveprotocol/wave/model/testing/BasicFactories.java", "license": "apache-2.0", "size": 8853 }
[ "org.waveprotocol.wave.model.document.ObservableDocument", "org.waveprotocol.wave.model.document.operation.automaton.DocumentSchema", "org.waveprotocol.wave.model.operation.SilentOperationSink" ]
import org.waveprotocol.wave.model.document.ObservableDocument; import org.waveprotocol.wave.model.document.operation.automaton.DocumentSchema; import org.waveprotocol.wave.model.operation.SilentOperationSink;
import org.waveprotocol.wave.model.document.*; import org.waveprotocol.wave.model.document.operation.automaton.*; import org.waveprotocol.wave.model.operation.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
1,474,226
public void resetResendCount() { this.resendCount = 0; if (this.nodeStageAdvancer.isInitializationComplete() && this.isDead() == false) { nodeStageAdvancer.setCurrentStage(ZWaveNodeInitStage.DONE); } }
void function() { this.resendCount = 0; if (this.nodeStageAdvancer.isInitializationComplete() && this.isDead() == false) { nodeStageAdvancer.setCurrentStage(ZWaveNodeInitStage.DONE); } }
/** * Resets the resend counter and possibly resets the * node stage to DONE when previous initialization was * complete. * Note that if the node is DEAD, then the nodeStage stays DEAD */
Resets the resend counter and possibly resets the node stage to DONE when previous initialization was complete. Note that if the node is DEAD, then the nodeStage stays DEAD
resetResendCount
{ "repo_name": "ShanksSGV/openhab", "path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveNode.java", "license": "epl-1.0", "size": 21755 }
[ "org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStage" ]
import org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStage;
import org.openhab.binding.zwave.internal.protocol.initialization.*;
[ "org.openhab.binding" ]
org.openhab.binding;
240,115
public static List<?> convertArrayOrList(Object target) { if (target instanceof JsonNode) { return convertArrayOrList((JsonNode) target); } return target instanceof Object[] ? Arrays.asList((Object[]) target) : target instanceof Collection ? new ArrayList<Object>(...
static List<?> function(Object target) { if (target instanceof JsonNode) { return convertArrayOrList((JsonNode) target); } return target instanceof Object[] ? Arrays.asList((Object[]) target) : target instanceof Collection ? new ArrayList<Object>((Collection<?>) target) : null; }
/** * Convert a target object to {@link List}. * * @param target * @return */
Convert a target object to <code>List</code>
convertArrayOrList
{ "repo_name": "DDTH/ddth-commons", "path": "ddth-commons-core/src/main/java/com/github/ddth/commons/utils/ValueUtils.java", "license": "mit", "size": 18232 }
[ "com.fasterxml.jackson.databind.JsonNode", "java.util.ArrayList", "java.util.Arrays", "java.util.Collection", "java.util.List" ]
import com.fasterxml.jackson.databind.JsonNode; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List;
import com.fasterxml.jackson.databind.*; import java.util.*;
[ "com.fasterxml.jackson", "java.util" ]
com.fasterxml.jackson; java.util;
1,973,157
public StructImpl create(Map<String, Object> values, String errorMessageFormatForUnknownField) { return StructImpl.createWithCustomMessage(this, values, errorMessageFormatForUnknownField); }
StructImpl function(Map<String, Object> values, String errorMessageFormatForUnknownField) { return StructImpl.createWithCustomMessage(this, values, errorMessageFormatForUnknownField); }
/** * Creates a struct with the given field values and message format for unknown fields. * * <p>The custom message is useful for objects that have fields but aren't exactly used as * providers, such as the {@code native} object, and the struct fields of {@code ctx} like {@code * ctx.attr}. */
Creates a struct with the given field values and message format for unknown fields. The custom message is useful for objects that have fields but aren't exactly used as providers, such as the native object, and the struct fields of ctx like ctx.attr
create
{ "repo_name": "JoelMarcey/buck", "path": "src/com/facebook/buck/skylark/function/packages/StructProvider.java", "license": "apache-2.0", "size": 3949 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
604,572
public static void driveHalfSpeedBackward() { Robi2.drive(-50); System.out.println("Drive backward (50%)"); }
static void function() { Robi2.drive(-50); System.out.println(STR); }
/** * Drive backward with half speed. */
Drive backward with half speed
driveHalfSpeedBackward
{ "repo_name": "AaronLeander/runtime-library", "path": "src/ch/ntb/inf/deep/runtime/mpc555/demo/Robi2MotorDemo.java", "license": "apache-2.0", "size": 3719 }
[ "ch.ntb.inf.deep.runtime.mpc555.driver.Robi2" ]
import ch.ntb.inf.deep.runtime.mpc555.driver.Robi2;
import ch.ntb.inf.deep.runtime.mpc555.driver.*;
[ "ch.ntb.inf" ]
ch.ntb.inf;
2,389,648
protected Document createDOMDocumentForSkeletonInterface() { Document doc = getEmptyDocument(); Element rootElement = doc.createElement("interface"); String serviceName = makeJavaClassName(axisService.getName()); addAttribute(doc, "package", codeGenConfiguration.getPackageName(), ro...
Document function() { Document doc = getEmptyDocument(); Element rootElement = doc.createElement(STR); String serviceName = makeJavaClassName(axisService.getName()); addAttribute(doc, STR, codeGenConfiguration.getPackageName(), rootElement); if (this.codeGenConfiguration.isBackwordCompatibilityMode()) { addAttribute(do...
/** * Creates the XML model for the skeleton interface * * @return DOM Document */
Creates the XML model for the skeleton interface
createDOMDocumentForSkeletonInterface
{ "repo_name": "arunasujith/wso2-axis2", "path": "modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java", "license": "apache-2.0", "size": 144631 }
[ "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,329,211
@FIXVersion(introduced = "5.0SP1") @TagNumRef(tagNum = TagNum.DerivativeNTPositionLimit) public Integer getDerivativeNTPositionLimit() { return derivativeNTPositionLimit; }
@FIXVersion(introduced = STR) @TagNumRef(tagNum = TagNum.DerivativeNTPositionLimit) Integer function() { return derivativeNTPositionLimit; }
/** * Message field getter. * @return field value */
Message field getter
getDerivativeNTPositionLimit
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/comp/DerivativeInstrument.java", "license": "gpl-3.0", "size": 83551 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
2,057,223
@Atomic static public Process run(final Process process, final List<Pair<String, Object>> activities) { final User userView = Authenticate.getUser(); for (final Pair<String, Object> activity : activities) { process.executeActivity(userView, activity.getKey(), activity.getValue()); ...
static Process function(final Process process, final List<Pair<String, Object>> activities) { final User userView = Authenticate.getUser(); for (final Pair<String, Object> activity : activities) { process.executeActivity(userView, activity.getKey(), activity.getValue()); } return process; }
/** * <pre> * Pair&lt;String, Object&gt; * - left: activity id * - right: activity arg * </pre> * * @param process * @param activities * @return */
<code> Pair&lt;String, Object&gt; - left: activity id - right: activity arg </code>
run
{ "repo_name": "FenixEdu/fenixedu-academic", "path": "src/main/java/org/fenixedu/academic/service/services/caseHandling/ExecuteProcessActivity.java", "license": "lgpl-3.0", "size": 2321 }
[ "java.util.List", "org.fenixedu.academic.domain.caseHandling.Process", "org.fenixedu.academic.util.Pair", "org.fenixedu.bennu.core.domain.User", "org.fenixedu.bennu.core.security.Authenticate" ]
import java.util.List; import org.fenixedu.academic.domain.caseHandling.Process; import org.fenixedu.academic.util.Pair; import org.fenixedu.bennu.core.domain.User; import org.fenixedu.bennu.core.security.Authenticate;
import java.util.*; import org.fenixedu.academic.domain.*; import org.fenixedu.academic.util.*; import org.fenixedu.bennu.core.domain.*; import org.fenixedu.bennu.core.security.*;
[ "java.util", "org.fenixedu.academic", "org.fenixedu.bennu" ]
java.util; org.fenixedu.academic; org.fenixedu.bennu;
1,556,110
public static byte[] convertToFourBytes(long numberToConvert) { byte[] numInBytes = new byte[4]; String s1 = Long.toHexString(numberToConvert); if (s1.length() % 2 != 0) { s1 = "0" + s1; } if (s1.length() == 16) { s1 = s1.substring(8, s1.length()); ...
static byte[] function(long numberToConvert) { byte[] numInBytes = new byte[4]; String s1 = Long.toHexString(numberToConvert); if (s1.length() % 2 != 0) { s1 = "0" + s1; } if (s1.length() == 16) { s1 = s1.substring(8, s1.length()); } byte[] hexas = DatatypeConverter.parseHexBinary(s1); if (hexas.length == 1) { numInByt...
/** * Converts a number to four bytes. * * @param numberToConvert number to convert * @return numInBytes given number as bytes */
Converts a number to four bytes
convertToFourBytes
{ "repo_name": "lsinfo3/onos", "path": "protocols/isis/isisio/src/main/java/org/onosproject/isis/io/util/IsisUtil.java", "license": "apache-2.0", "size": 27195 }
[ "javax.xml.bind.DatatypeConverter" ]
import javax.xml.bind.DatatypeConverter;
import javax.xml.bind.*;
[ "javax.xml" ]
javax.xml;
2,894,905
private void destroy() { final boolean bTrace = TraceComponent.isAnyTracingEnabled(); if (bTrace && tc.isEventEnabled()) { Tr.event(tc, "Session being destroyed; " + this); } // List<HttpSessionListener> list = this.myConfig.getSessionListeners(); // if (null != l...
void function() { final boolean bTrace = TraceComponent.isAnyTracingEnabled(); if (bTrace && tc.isEventEnabled()) { Tr.event(tc, STR + this); } for (String key : this.attributes.keySet()) { Object value = this.attributes.get(key); HttpSessionBindingEvent event = new HttpSessionBindingEvent(this, key); if (value instanc...
/** * Once a session has been invalidated, this will perform final cleanup * and notifying any listeners. */
Once a session has been invalidated, this will perform final cleanup and notifying any listeners
destroy
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.httpservice/src/com/ibm/ws/httpsvc/session/internal/SessionImpl.java", "license": "epl-1.0", "size": 13990 }
[ "com.ibm.websphere.ras.Tr", "com.ibm.websphere.ras.TraceComponent", "javax.servlet.http.HttpSessionBindingEvent", "javax.servlet.http.HttpSessionBindingListener" ]
import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import javax.servlet.http.HttpSessionBindingEvent; import javax.servlet.http.HttpSessionBindingListener;
import com.ibm.websphere.ras.*; import javax.servlet.http.*;
[ "com.ibm.websphere", "javax.servlet" ]
com.ibm.websphere; javax.servlet;
127,255
public List<Map<String,Object>> map(String... colNames) throws JdbxException { Check.notNull(colNames, "column names"); return read(r -> ResultUtil.readMap(r.getJdbcResult(), colNames)); }
List<Map<String,Object>> function(String... colNames) throws JdbxException { Check.notNull(colNames, STR); return read(r -> ResultUtil.readMap(r.getJdbcResult(), colNames)); }
/** * Loops through all rows of the ResultSet, creates a Map for every row and * returns a List of these maps. * @param colNames a list of column names * @return the list */
Loops through all rows of the ResultSet, creates a Map for every row and returns a List of these maps
map
{ "repo_name": "jdlib/JDBX", "path": "src/java/org/jdbx/QResultRows.java", "license": "apache-2.0", "size": 12816 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
435,157
public Iterator<String> getRendererTypes(String componentFamily) { Set<String> empty = Collections.emptySet(); return empty.iterator(); }
Iterator<String> function(String componentFamily) { Set<String> empty = Collections.emptySet(); return empty.iterator(); }
/** * <p class="changed_added_2_0">Return an <code>Iterator</code> over * the renderer-type entries for the given component-family.</p> * * <p class="changed_added_2_0">If the specified <code>componentFamily</code> * is not known to this <code>RenderKit</code> implementation, return * an e...
Return an <code>Iterator</code> over the renderer-type entries for the given component-family. If the specified <code>componentFamily</code> is not known to this <code>RenderKit</code> implementation, return an empty <code>Iterator</code> The default implementation of this method returns an empty <code>Iterator</code>
getRendererTypes
{ "repo_name": "jboss/jboss-jsf-api_spec", "path": "src/main/java/javax/faces/render/RenderKit.java", "license": "gpl-2.0", "size": 11436 }
[ "java.util.Collections", "java.util.Iterator", "java.util.Set" ]
import java.util.Collections; import java.util.Iterator; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,710,329
public int getindx(String in) throws SQLException { String sql = "SELECT * FROM recipes WHERE recipe='" + in + "';"; ArrayList<Recipes> myList = SQLCall(sql); return myList.get(0).getRecpk(); }
int function(String in) throws SQLException { String sql = STR + in + "';"; ArrayList<Recipes> myList = SQLCall(sql); return myList.get(0).getRecpk(); }
/** * Gets the index of the recipe name if it is in the database. * @param in * @return * @throws SQLException */
Gets the index of the recipe name if it is in the database
getindx
{ "repo_name": "cmo1992/RecipeMixCalc", "path": "RecConv/src/DbAccessObj/RecipesDAO.java", "license": "gpl-2.0", "size": 3826 }
[ "java.sql.SQLException", "java.util.ArrayList" ]
import java.sql.SQLException; import java.util.ArrayList;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
1,791,947
@Test void createDifferentContext() throws Exception { // We also verify that the VelocityContextInitializers are called. VelocityContextInitializer mockInitializer = mock(VelocityContextInitializer.class); when(this.componentManager.getInstanceList(VelocityContextInitializer.class))...
void createDifferentContext() throws Exception { VelocityContextInitializer mockInitializer = mock(VelocityContextInitializer.class); when(this.componentManager.getInstanceList(VelocityContextInitializer.class)) .thenReturn(Arrays.asList(mockInitializer)); VelocityContext context1 = this.factory.createContext(); contex...
/** * Verify that we get different contexts when we call the createContext method but that they contain the same * references to the Velocity tools. Also tests that objects we put in one context are not shared with other * contexts. Also verifies that Velocity Context Initializers are called. */
Verify that we get different contexts when we call the createContext method but that they contain the same references to the Velocity tools. Also tests that objects we put in one context are not shared with other contexts. Also verifies that Velocity Context Initializers are called
createDifferentContext
{ "repo_name": "xwiki/xwiki-commons", "path": "xwiki-commons-core/xwiki-commons-velocity/src/test/java/org/xwiki/velocity/internal/DefaultVelocityContextFactoryTest.java", "license": "lgpl-2.1", "size": 3829 }
[ "java.util.Arrays", "org.apache.velocity.VelocityContext", "org.junit.jupiter.api.Assertions", "org.mockito.Mockito", "org.xwiki.velocity.VelocityContextInitializer" ]
import java.util.Arrays; import org.apache.velocity.VelocityContext; import org.junit.jupiter.api.Assertions; import org.mockito.Mockito; import org.xwiki.velocity.VelocityContextInitializer;
import java.util.*; import org.apache.velocity.*; import org.junit.jupiter.api.*; import org.mockito.*; import org.xwiki.velocity.*;
[ "java.util", "org.apache.velocity", "org.junit.jupiter", "org.mockito", "org.xwiki.velocity" ]
java.util; org.apache.velocity; org.junit.jupiter; org.mockito; org.xwiki.velocity;
854,585
@Source("com/google/appinventor/images/help.png") ImageResource help();
@Source(STR) ImageResource help();
/** * Designer palette item: question mark for more component information */
Designer palette item: question mark for more component information
help
{ "repo_name": "jisqyv/appinventor-sources", "path": "appinventor/appengine/src/com/google/appinventor/client/Images.java", "license": "apache-2.0", "size": 19490 }
[ "com.google.gwt.resources.client.ImageResource" ]
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.resources.client.*;
[ "com.google.gwt" ]
com.google.gwt;
1,697,572
public void reset() { this.table.setRedraw(false); this.context.getImages().clear(); this.context.reset(); this.gridLayer = new DataTableGridLayerStack(new DataTableHandleDataProvider(context), table, context, parent); this.table.setLayer(gridLayer); this.table....
void function() { this.table.setRedraw(false); this.context.getImages().clear(); this.context.reset(); this.gridLayer = new DataTableGridLayerStack(new DataTableHandleDataProvider(context), table, context, parent); this.table.setLayer(gridLayer); this.table.refresh(); this.gridLayer.getBodyLayer().getViewportLayer().re...
/** * Resets the component. */
Resets the component
reset
{ "repo_name": "jgaupp/arx", "path": "src/gui/org/deidentifier/arx/gui/view/impl/common/ComponentDataTable.java", "license": "apache-2.0", "size": 20468 }
[ "org.deidentifier.arx.gui.view.impl.common.datatable.DataTableGridLayerStack", "org.deidentifier.arx.gui.view.impl.common.datatable.DataTableHandleDataProvider" ]
import org.deidentifier.arx.gui.view.impl.common.datatable.DataTableGridLayerStack; import org.deidentifier.arx.gui.view.impl.common.datatable.DataTableHandleDataProvider;
import org.deidentifier.arx.gui.view.impl.common.datatable.*;
[ "org.deidentifier.arx" ]
org.deidentifier.arx;
1,965,757
@WebMethod(operationName = "RedCardsTotal") @WebResult(name = "RedCardsTotalResult", targetNamespace = "http://footballpool.dataaccess.eu") @RequestWrapper(localName = "RedCardsTotal", targetNamespace = "http://footballpool.dataaccess.eu", className = "support.RedCardsTotal") @ResponseWrapper(localName ...
@WebMethod(operationName = STR) @WebResult(name = STR, targetNamespace = "http: @RequestWrapper(localName = STR, targetNamespace = "http: @ResponseWrapper(localName = "RedCardsTotalResponseSTRhttp: int function();
/** * Returns the total number of red cards given during this tournament (so far) * * @return * returns int */
Returns the total number of red cards given during this tournament (so far)
redCardsTotal
{ "repo_name": "pietrodn/middleware-exe", "path": "webservices/TestFootballService/src/support/InfoSoapType.java", "license": "gpl-3.0", "size": 32295 }
[ "javax.jws.WebMethod", "javax.jws.WebResult", "javax.xml.ws.RequestWrapper", "javax.xml.ws.ResponseWrapper" ]
import javax.jws.WebMethod; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper;
import javax.jws.*; import javax.xml.ws.*;
[ "javax.jws", "javax.xml" ]
javax.jws; javax.xml;
843,105
public static <TItem> Bson in(final String fieldName, final Iterable<TItem> values) { return new SimpleEncodingFilter<Bson>(fieldName , new IterableOperatorFilter<TItem>("$in", values)); }
static <TItem> Bson function(final String fieldName, final Iterable<TItem> values) { return new SimpleEncodingFilter<Bson>(fieldName , new IterableOperatorFilter<TItem>("$in", values)); }
/** * Creates a filter that matches all documents where the value of a field equals any value in the list of specified values. * * @param fieldName the field name * @param values the list of values * @param <TItem> the value type * @return the filter * @mongodb.driver.manual refe...
Creates a filter that matches all documents where the value of a field equals any value in the list of specified values
in
{ "repo_name": "gianpaj/mongo-java-driver", "path": "driver-core/src/main/com/mongodb/client/model/Filters.java", "license": "apache-2.0", "size": 42343 }
[ "org.bson.conversions.Bson" ]
import org.bson.conversions.Bson;
import org.bson.conversions.*;
[ "org.bson.conversions" ]
org.bson.conversions;
1,579,168
EReference getArchitecture_Media();
EReference getArchitecture_Media();
/** * Returns the meta object for the containment reference list '{@link turnus.model.architecture.Architecture#getMedia <em>Media</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Media</em>'. * @see turnus.model.architecture.Architect...
Returns the meta object for the containment reference list '<code>turnus.model.architecture.Architecture#getMedia Media</code>'.
getArchitecture_Media
{ "repo_name": "turnus/turnus", "path": "turnus.model/src/turnus/model/architecture/ArchitecturePackage.java", "license": "gpl-3.0", "size": 44474 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,873,940
public void registerForEvents(Context context) { mBatteryLevelFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); context.registerReceiver(mBatteryReceiver, mBatteryLevelFilter); }
void function(Context context) { mBatteryLevelFilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); context.registerReceiver(mBatteryReceiver, mBatteryLevelFilter); }
/** * Register to receive battery level changes. * @param context */
Register to receive battery level changes
registerForEvents
{ "repo_name": "davandev/AlarmController", "path": "app/src/main/java/com/davan/alarmcontroller/power/PowerConnectionReceiver.java", "license": "mit", "size": 4052 }
[ "android.content.Context", "android.content.Intent", "android.content.IntentFilter" ]
import android.content.Context; import android.content.Intent; import android.content.IntentFilter;
import android.content.*;
[ "android.content" ]
android.content;
2,126,887
@Override public void partion() throws IOException { List<GenomicSub> outputIn = new ArrayList<>(); List<String> myFile = Files.fileToList(input); for (int i = 0; i < myFile.size(); i++) { String[] t = myFile.get(i).split(","); GenomicSub gs = new GenomicSub(...
void function() throws IOException { List<GenomicSub> outputIn = new ArrayList<>(); List<String> myFile = Files.fileToList(input); for (int i = 0; i < myFile.size(); i++) { String[] t = myFile.get(i).split(","); GenomicSub gs = new GenomicSub(t[0], "[" + t[4] + "/" + t[5] + "]"); gs.setStart(new Coordinate(t[1] + "," +...
/** * Partion the data into by chromosome with a fixed size * 1,chr5,70247787,+,A,T,NM_000344.3,SMN1 * * @throws IOException */
Partion the data into by chromosome with a fixed size 1,chr5,70247787,+,A,T,NM_000344.3,SMN1
partion
{ "repo_name": "wmgmm/mutpredsplice", "path": "src/org/mort/mutpredsplice/input/PlainTextAdaptor.java", "license": "apache-2.0", "size": 4623 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.mort.common.Files", "org.mort.compbio.DNATools", "org.mort.compbio.GenomicSub", "org.mort.genome.Chromosome", "org.mort.genome.Coordinate", "org.mort.mutpredsplice.config.ConfigRelease" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.mort.common.Files; import org.mort.compbio.DNATools; import org.mort.compbio.GenomicSub; import org.mort.genome.Chromosome; import org.mort.genome.Coordinate; import org.mort.mutpredsplice.config.Conf...
import java.io.*; import java.util.*; import org.mort.common.*; import org.mort.compbio.*; import org.mort.genome.*; import org.mort.mutpredsplice.config.*;
[ "java.io", "java.util", "org.mort.common", "org.mort.compbio", "org.mort.genome", "org.mort.mutpredsplice" ]
java.io; java.util; org.mort.common; org.mort.compbio; org.mort.genome; org.mort.mutpredsplice;
1,274,039
@ResponseStatus(HttpStatus.OK) @ResponseBody @RequestMapping(value = "/{configName}", produces = "text/xml") public String handle(@PathVariable String configName, @RequestParam Map<String, String> params, @RequestHeader Map<String, String> headers) { LOGGER.debug(String....
@ResponseStatus(HttpStatus.OK) @RequestMapping(value = STR, produces = STR) String function(@PathVariable String configName, @RequestParam Map<String, String> params, @RequestHeader Map<String, String> headers) { LOGGER.debug(String.format(STR, configName, params, headers)); sendAndLogEvent(EventSubjects.CALL_STATUS, c...
/** * Listens to HTTP calls to http://{server}:{port}/module/ivr/status/{config}?key1=val1&key2=val2&... from IVR * providers. Creates a corresponding CDR entity in the database. Sends a MOTECH message with the CDR data in the * payload and the call status as the subject. * * @param configName ...
Listens to HTTP calls to HREF{server}:{port}/module/ivr/status/{config}?key1=val1&key2=val2&... from IVR providers. Creates a corresponding CDR entity in the database. Sends a MOTECH message with the CDR data in the payload and the call status as the subject
handle
{ "repo_name": "wstrzelczyk/modules", "path": "ivr/src/main/java/org/motechproject/ivr/web/StatusController.java", "license": "bsd-3-clause", "size": 3382 }
[ "java.util.Map", "org.motechproject.ivr.event.EventSubjects", "org.motechproject.ivr.web.LogAndEventHelper", "org.springframework.http.HttpStatus", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestHeader", "org.springframework.web.bind.annotation.Re...
import java.util.Map; import org.motechproject.ivr.event.EventSubjects; import org.motechproject.ivr.web.LogAndEventHelper; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.we...
import java.util.*; import org.motechproject.ivr.event.*; import org.motechproject.ivr.web.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "java.util", "org.motechproject.ivr", "org.springframework.http", "org.springframework.web" ]
java.util; org.motechproject.ivr; org.springframework.http; org.springframework.web;
1,371,399
private CmsResource readResource(String resourceName) throws CmsException { CmsResource resource = null; try { resource = getCms().readResource(resourceName, CmsResourceFilter.ALL); } catch (CmsVfsResourceNotFoundException e) { throw new CmsVfsResourceNotFoundExcepti...
CmsResource function(String resourceName) throws CmsException { CmsResource resource = null; try { resource = getCms().readResource(resourceName, CmsResourceFilter.ALL); } catch (CmsVfsResourceNotFoundException e) { throw new CmsVfsResourceNotFoundException( Messages.get().container( Messages.ERR_RESOURCE_DOES_NOT_EXIS...
/** * Reads the resource from the DB.<p> * * @param resourceName the resource name * * @return the resource * * @throws CmsException if the resource can not be read */
Reads the resource from the DB
readResource
{ "repo_name": "ggiudetti/opencms-core", "path": "src-modules/org/opencms/workplace/commons/CmsDisplayResource.java", "license": "lgpl-2.1", "size": 14335 }
[ "org.opencms.file.CmsResource", "org.opencms.file.CmsResourceFilter", "org.opencms.file.CmsVfsResourceNotFoundException", "org.opencms.main.CmsException" ]
import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.file.CmsVfsResourceNotFoundException; import org.opencms.main.CmsException;
import org.opencms.file.*; import org.opencms.main.*;
[ "org.opencms.file", "org.opencms.main" ]
org.opencms.file; org.opencms.main;
1,921,185
String confirm(String token, int attempts, ModelMap model, HttpServletRequest request);
String confirm(String token, int attempts, ModelMap model, HttpServletRequest request);
/** * Activates a new registered user. * * @param token the registration token. * @param attempts the counted confirm attempts. * @param model the view model. * @param request the {@link HttpServletRequest}. * @return the view name. */
Activates a new registered user
confirm
{ "repo_name": "kparoth/my-modules", "path": "my-modules-core/src/main/java/my/modules/web/user/controller/RegistrationController.java", "license": "apache-2.0", "size": 1468 }
[ "javax.servlet.http.HttpServletRequest", "org.springframework.ui.ModelMap" ]
import javax.servlet.http.HttpServletRequest; import org.springframework.ui.ModelMap;
import javax.servlet.http.*; import org.springframework.ui.*;
[ "javax.servlet", "org.springframework.ui" ]
javax.servlet; org.springframework.ui;
586,065
void setRequest(HttpServletRequest request) { super.setRequest(request); // Initialize the attributes for this request dispatcherType = request.getAttribute(Globals.DISPATCHER_TYPE_ATTR); requestDispatcherPath = request.getAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR...
void setRequest(HttpServletRequest request) { super.setRequest(request); dispatcherType = request.getAttribute(Globals.DISPATCHER_TYPE_ATTR); requestDispatcherPath = request.getAttribute(Globals.DISPATCHER_REQUEST_PATH_ATTR); contextPath = request.getContextPath(); pathInfo = request.getPathInfo(); queryString = reques...
/** * Set the request that we are wrapping. * * @param request The new wrapped request */
Set the request that we are wrapping
setRequest
{ "repo_name": "benothman/jboss-web-nio2", "path": "java/org/apache/catalina/core/ApplicationHttpRequest.java", "license": "lgpl-3.0", "size": 26536 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.catalina.Globals" ]
import javax.servlet.http.HttpServletRequest; import org.apache.catalina.Globals;
import javax.servlet.http.*; import org.apache.catalina.*;
[ "javax.servlet", "org.apache.catalina" ]
javax.servlet; org.apache.catalina;
2,516,735
public final void normalizeCP(Matrix2d matrix) { assert matrix != null : AssertMessages.notNullParameter(); double mag = 1.0 / Math.sqrt(matrix.m00 * matrix.m00 + matrix.m10 * matrix.m10); this.m00 = matrix.m00 * mag; this.m10 = matrix.m10 * mag; mag = 1.0 / Math.sqrt(matrix...
final void function(Matrix2d matrix) { assert matrix != null : AssertMessages.notNullParameter(); double mag = 1.0 / Math.sqrt(matrix.m00 * matrix.m00 + matrix.m10 * matrix.m10); this.m00 = matrix.m00 * mag; this.m10 = matrix.m10 * mag; mag = 1.0 / Math.sqrt(matrix.m01 * matrix.m01 + matrix.m11 * matrix.m11); this.m01 ...
/** * Perform cross product normalization of matrix m1 and place the normalized * values into this. * * @param matrix * Provides the matrix values to be normalized */
Perform cross product normalization of matrix m1 and place the normalized values into this
normalizeCP
{ "repo_name": "gallandarakhneorg/afc", "path": "core/maths/mathgeom/src/main/java/org/arakhne/afc/math/matrix/Matrix2d.java", "license": "apache-2.0", "size": 55348 }
[ "org.arakhne.afc.vmutil.asserts.AssertMessages" ]
import org.arakhne.afc.vmutil.asserts.AssertMessages;
import org.arakhne.afc.vmutil.asserts.*;
[ "org.arakhne.afc" ]
org.arakhne.afc;
19,322
@Test (timeout=30000) public void testRPCServerShutdown() throws Exception { final int numClients = 3; final List<Future<Void>> res = new ArrayList<Future<Void>>(); final ExecutorService executorService = Executors.newFixedThreadPool(numClients); final Configuration conf = new Configuration(...
@Test (timeout=30000) void function() throws Exception { final int numClients = 3; final List<Future<Void>> res = new ArrayList<Future<Void>>(); final ExecutorService executorService = Executors.newFixedThreadPool(numClients); final Configuration conf = new Configuration(); conf.setInt(CommonConfigurationKeys.IPC_CLIEN...
/** * Verify the RPC server can shutdown properly when callQueue is full. */
Verify the RPC server can shutdown properly when callQueue is full
testRPCServerShutdown
{ "repo_name": "jth/hadoop", "path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java", "license": "apache-2.0", "size": 38204 }
[ "java.util.ArrayList", "java.util.List", "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors", "java.util.concurrent.Future", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.CommonConfigurationKeys", "org.junit.Test" ]
import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.junit.Test;
import java.util.*; import java.util.concurrent.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
36,572
private String[] extractAndDecodeHeader(String header, HttpServletRequest request) throws IOException { byte[] base64Token = header.substring(6).getBytes("UTF-8"); byte[] decoded; try { decoded = Base64.decode(base64Token); } catch (IllegalArgumentException e) { throw new BadCredentialsException("Fa...
String[] function(String header, HttpServletRequest request) throws IOException { byte[] base64Token = header.substring(6).getBytes("UTF-8"); byte[] decoded; try { decoded = Base64.decode(base64Token); } catch (IllegalArgumentException e) { throw new BadCredentialsException(STR); } String token = new String(decoded, ge...
/** * Decodes the header into a username and password. * * @throws BadCredentialsException if the Basic header is not present or is not valid Base64 */
Decodes the header into a username and password
extractAndDecodeHeader
{ "repo_name": "lotaris/jee-oauth", "path": "src/main/java/com/forbesdigital/jee/oauth/spring/AbstractBasicAuthenticationFilter.java", "license": "mit", "size": 6431 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest", "org.springframework.security.authentication.BadCredentialsException", "org.springframework.security.crypto.codec.Base64" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.crypto.codec.Base64;
import java.io.*; import javax.servlet.http.*; import org.springframework.security.authentication.*; import org.springframework.security.crypto.codec.*;
[ "java.io", "javax.servlet", "org.springframework.security" ]
java.io; javax.servlet; org.springframework.security;
1,162,045
private void addCustomCamelConnectorFromArtifact(NexusArtifactDto dto, URL jarUrl) { try (URLClassLoader classLoader = new URLClassLoader(new URL[] {jarUrl});) { String[] json = loadConnectorJSonSchema(classLoader); if (json != null) { ObjectMapper mapper = new Objec...
void function(NexusArtifactDto dto, URL jarUrl) { try (URLClassLoader classLoader = new URLClassLoader(new URL[] {jarUrl});) { String[] json = loadConnectorJSonSchema(classLoader); if (json != null) { ObjectMapper mapper = new ObjectMapper(); JsonNode tree = mapper.readTree(json[0]); String name = tree.get("name").text...
/** * Adds any discovered third party Camel connectors from the artifact. */
Adds any discovered third party Camel connectors from the artifact
addCustomCamelConnectorFromArtifact
{ "repo_name": "nboukhed/camel", "path": "platforms/camel-catalog-nexus/src/main/java/org/apache/camel/catalog/nexus/ConnectorCatalogNexusRepository.java", "license": "apache-2.0", "size": 6559 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.ObjectMapper", "java.io.IOException", "java.net.URLClassLoader", "java.util.Iterator", "org.apache.camel.catalog.CollectionStringBuffer" ]
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.net.URLClassLoader; import java.util.Iterator; import org.apache.camel.catalog.CollectionStringBuffer;
import com.fasterxml.jackson.databind.*; import java.io.*; import java.net.*; import java.util.*; import org.apache.camel.catalog.*;
[ "com.fasterxml.jackson", "java.io", "java.net", "java.util", "org.apache.camel" ]
com.fasterxml.jackson; java.io; java.net; java.util; org.apache.camel;
310,814
public static void recordThis(final String msg, final String trk, final long dtg, final Object source) { try { if (_fo != null) { _fo.write(";NARRATIVE: " + MWC.Utilities.TextFormatting.DebriefFormatDateTime.toString(dtg) + " " + trk + " " + msg + " (" + source.toString() + ")"); _fo.write(Sy...
static void function(final String msg, final String trk, final long dtg, final Object source) { try { if (_fo != null) { _fo.write(STR + MWC.Utilities.TextFormatting.DebriefFormatDateTime.toString(dtg) + " " + trk + " " + msg + STR + source.toString() + ")"); _fo.write(System.getProperty(STR)); _fo.flush(); } } catch (...
/** * utility testing method to write a line of text to the narrative file (if one * has been setup) * * @param msg the message to store * @param trk the track this message relates to * @param dtg the time of the message * @param source */
utility testing method to write a line of text to the narrative file (if one has been setup)
recordThis
{ "repo_name": "debrief/debrief", "path": "org.mwc.asset.legacy/src/ASSET/Util/SupportTesting.java", "license": "epl-1.0", "size": 13797 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,836,581
public List<DataObject> loadParentsOfAnnotations(SecurityContext ctx, long annotationId, long userId) throws DSOutOfServiceException, DSAccessException { if (annotationId < 0) throw new IllegalArgumentException("Annotation id not valid."); //Check possible links List links = gateway.findLinks(ctx, F...
List<DataObject> function(SecurityContext ctx, long annotationId, long userId) throws DSOutOfServiceException, DSAccessException { if (annotationId < 0) throw new IllegalArgumentException(STR); List links = gateway.findLinks(ctx, FileAnnotation.class, annotationId, userId); List<DataObject> nodes = new ArrayList<DataOb...
/** * Implemented as specified by {@link OmeroImageService}. * @see OmeroMetadataService#loadParentsOfAnnotations(SecurityContext, long, long) */
Implemented as specified by <code>OmeroImageService</code>
loadParentsOfAnnotations
{ "repo_name": "simleo/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OmeroMetadataServiceImpl.java", "license": "gpl-2.0", "size": 88736 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,864,657
public String save() { doBeforeSave(); if (idea.getId() == null) { manager.insertEntity(idea); } else { manager.updateEntity(idea); } // Calls an after save action String result = doAfterSave(NavigationResults.LIST); // Unselect obj...
String function() { doBeforeSave(); if (idea.getId() == null) { manager.insertEntity(idea); } else { manager.updateEntity(idea); } String result = doAfterSave(NavigationResults.LIST); return null; }
/** * Save bean and stay on it * * @return forward to list page */
Save bean and stay on it
save
{ "repo_name": "terrex/tntconcept-materials-testing", "path": "src/main/java/com/autentia/intra/bean/admin/IdeaBean.java", "license": "gpl-2.0", "size": 16650 }
[ "com.autentia.intra.bean.NavigationResults" ]
import com.autentia.intra.bean.NavigationResults;
import com.autentia.intra.bean.*;
[ "com.autentia.intra" ]
com.autentia.intra;
1,125,996
public static void delete(EntityManager em, KapuaId accessInfoId) throws KapuaEntityNotFoundException { ServiceDAO.delete(em, AccessInfoImpl.class, accessInfoId); }
static void function(EntityManager em, KapuaId accessInfoId) throws KapuaEntityNotFoundException { ServiceDAO.delete(em, AccessInfoImpl.class, accessInfoId); }
/** * Delete the {@link AccessInfo) by {@link AccessInfo) identifier * * @param em * @param accessInfoId * @throws KapuaEntityNotFoundException * If {@link AccessInfo} is nott found. * @since 1.0.0 */
Delete the {@link AccessInfo) by {@link AccessInfo) identifier
delete
{ "repo_name": "cbaerikebc/kapua", "path": "service/security/shiro/src/main/java/org/eclipse/kapua/service/authorization/access/shiro/AccessInfoDAO.java", "license": "epl-1.0", "size": 3395 }
[ "org.eclipse.kapua.KapuaEntityNotFoundException", "org.eclipse.kapua.commons.jpa.EntityManager", "org.eclipse.kapua.commons.service.internal.ServiceDAO", "org.eclipse.kapua.model.id.KapuaId" ]
import org.eclipse.kapua.KapuaEntityNotFoundException; import org.eclipse.kapua.commons.jpa.EntityManager; import org.eclipse.kapua.commons.service.internal.ServiceDAO; import org.eclipse.kapua.model.id.KapuaId;
import org.eclipse.kapua.*; import org.eclipse.kapua.commons.jpa.*; import org.eclipse.kapua.commons.service.internal.*; import org.eclipse.kapua.model.id.*;
[ "org.eclipse.kapua" ]
org.eclipse.kapua;
2,593,612
public void processZipContent(String zipFilePath, InputStream zipIn, ViewHandlerConfig viewHandlerConfig, HttpServletRequest req, HttpServletResponse resp) { // not yet supported Logger.getLogger(getClass()).warn( "reading from ZIP archive not supported by ViewHandler " + this.getClass().getName()); }
void function(String zipFilePath, InputStream zipIn, ViewHandlerConfig viewHandlerConfig, HttpServletRequest req, HttpServletResponse resp) { Logger.getLogger(getClass()).warn( STR + this.getClass().getName()); }
/** * Create the HTML response for viewing the given file contained in a ZIP archive.. * * @param zipFilePath * path of the ZIP entry * @param zipIn * the InputStream for the file extracted from a ZIP archive * @param req * the servlet request * @param resp * ...
Create the HTML response for viewing the given file contained in a ZIP archive.
processZipContent
{ "repo_name": "LeoFCardoso/webfilesys", "path": "src/main/java/de/webfilesys/viewhandler/GeoTrackViewHandler.java", "license": "gpl-3.0", "size": 10708 }
[ "de.webfilesys.ViewHandlerConfig", "java.io.InputStream", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.log4j.Logger" ]
import de.webfilesys.ViewHandlerConfig; import java.io.InputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger;
import de.webfilesys.*; import java.io.*; import javax.servlet.http.*; import org.apache.log4j.*;
[ "de.webfilesys", "java.io", "javax.servlet", "org.apache.log4j" ]
de.webfilesys; java.io; javax.servlet; org.apache.log4j;
374,945
public static ArrayList<TimeBlock> autoScheduleAll( SimpleWeightedGraph<Location, Transportation> graph, HashMap<TimeBlock, ActivitySpanningTree> pairs) { ArrayList<TimeBlock> autoSchedules = new ArrayList<TimeBlock>(); for (Map.Entry<TimeBlock, ActivitySpanningTree> pair : pairs.entrySet()) { Tim...
static ArrayList<TimeBlock> function( SimpleWeightedGraph<Location, Transportation> graph, HashMap<TimeBlock, ActivitySpanningTree> pairs) { ArrayList<TimeBlock> autoSchedules = new ArrayList<TimeBlock>(); for (Map.Entry<TimeBlock, ActivitySpanningTree> pair : pairs.entrySet()) { TimeBlock autoSchedule = autoSchedule(g...
/** * Iterate through a list of TB - AST pairs and automatically schedule each. * * @param graph * The graph that contains the transportation details between all * locations. The graph is shared by all TB - AST pairs. * @param pairs * HashMap of TB - AST pairs, meaning to...
Iterate through a list of TB - AST pairs and automatically schedule each
autoScheduleAll
{ "repo_name": "bettytuan0209/travelscheduler", "path": "src/algo/Scheduler.java", "license": "apache-2.0", "size": 2422 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.Map", "org.jgrapht.graph.SimpleWeightedGraph" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import org.jgrapht.graph.SimpleWeightedGraph;
import java.util.*; import org.jgrapht.graph.*;
[ "java.util", "org.jgrapht.graph" ]
java.util; org.jgrapht.graph;
1,647,919
public LSSerializerFilter getNodeFilter();
LSSerializerFilter function();
/** * Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes * during serialization. * * This interface is a public API. * * @return The Level 3 LSSerializerFilter */
Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes during serialization. This interface is a public API
getNodeFilter
{ "repo_name": "bandcampdotcom/j2objc", "path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/DOM3Serializer.java", "license": "apache-2.0", "size": 6607 }
[ "org.w3c.dom.ls.LSSerializerFilter" ]
import org.w3c.dom.ls.LSSerializerFilter;
import org.w3c.dom.ls.*;
[ "org.w3c.dom" ]
org.w3c.dom;
48,043
public void parseInto(MapFieldLite<K, V> map, CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { int length = input.readRawVarint32(); final int oldLimit = input.pushLimit(length); K key = metadata.defaultKey; V value = metadata.defaultV...
void function(MapFieldLite<K, V> map, CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException { int length = input.readRawVarint32(); final int oldLimit = input.pushLimit(length); K key = metadata.defaultKey; V value = metadata.defaultValue; while (true) { int tag = input.readTag(); if (tag ...
/** * Parses an entry off of the input into the map. This helper avoids allocaton of a {@link MapEntryLite} by parsing * directly into the provided {@link MapFieldLite}. * * @param map the map * @param input the input * @param extensionRegistry the extension registry * @throws IOExcep...
Parses an entry off of the input into the map. This helper avoids allocaton of a <code>MapEntryLite</code> by parsing directly into the provided <code>MapFieldLite</code>
parseInto
{ "repo_name": "jhunters/jprotobuf", "path": "src/main/java/com/baidu/bjf/remoting/protobuf/MapEntryLite.java", "license": "apache-2.0", "size": 12146 }
[ "com.baidu.bjf.remoting.protobuf.code.CodedConstant", "com.google.protobuf.CodedInputStream", "com.google.protobuf.ExtensionRegistryLite", "java.io.IOException" ]
import com.baidu.bjf.remoting.protobuf.code.CodedConstant; import com.google.protobuf.CodedInputStream; import com.google.protobuf.ExtensionRegistryLite; import java.io.IOException;
import com.baidu.bjf.remoting.protobuf.code.*; import com.google.protobuf.*; import java.io.*;
[ "com.baidu.bjf", "com.google.protobuf", "java.io" ]
com.baidu.bjf; com.google.protobuf; java.io;
613,958
Server getServer();
Server getServer();
/** * Returns the {@link Server} instance. */
Returns the <code>Server</code> instance
getServer
{ "repo_name": "Whitewolfza/cipango", "path": "cipango-server/src/main/java/org/cipango/server/session/CallSession.java", "license": "apache-2.0", "size": 4314 }
[ "org.cipango.server.Server" ]
import org.cipango.server.Server;
import org.cipango.server.*;
[ "org.cipango.server" ]
org.cipango.server;
432,091
public FluentInitializer withSelectedDates(Collection<Date> selectedDates) { if (selectionMode == SelectionMode.SINGLE && selectedDates.size() > 1) { throw new IllegalArgumentException("SINGLE mode can't be used with multiple selectedDates"); } if (selectionMo...
FluentInitializer function(Collection<Date> selectedDates) { if (selectionMode == SelectionMode.SINGLE && selectedDates.size() > 1) { throw new IllegalArgumentException(STR); } if (selectionMode == SelectionMode.RANGE && selectedDates.size() > 2) { throw new IllegalArgumentException( STR + selectedDates.size()); } if (...
/** * Set multiple selected dates. This will throw an {@link IllegalArgumentException} if you * pass in multiple dates and haven't already called {@link #inMode(SelectionMode)}. */
Set multiple selected dates. This will throw an <code>IllegalArgumentException</code> if you pass in multiple dates and haven't already called <code>#inMode(SelectionMode)</code>
withSelectedDates
{ "repo_name": "fanglajide/timepicker", "path": "library/src/com/squareup/timessquare/CalendarPickerView.java", "license": "apache-2.0", "size": 39037 }
[ "java.util.Collection", "java.util.Date" ]
import java.util.Collection; import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,904,179
public void showNearby(Location origin, int radius); /** * Shows the hologram to all nearby players within the given radius * * @param obeyVisibility whether to obey the assigned {@link com.dsh105.holoapi.api.visibility.Visibility}
void function(Location origin, int radius); /** * Shows the hologram to all nearby players within the given radius * * @param obeyVisibility whether to obey the assigned {@link com.dsh105.holoapi.api.visibility.Visibility}
/** * Shows the hologram to all nearby players within the given radius * * @param origin centre location * @param radius radius to search for nearby players in */
Shows the hologram to all nearby players within the given radius
showNearby
{ "repo_name": "khmMinecraftProjects/HoloAPI", "path": "src/main/java/com/dsh105/holoapi/api/Hologram.java", "license": "gpl-3.0", "size": 16495 }
[ "com.dsh105.holoapi.api.visibility.Visibility", "org.bukkit.Location" ]
import com.dsh105.holoapi.api.visibility.Visibility; import org.bukkit.Location;
import com.dsh105.holoapi.api.visibility.*; import org.bukkit.*;
[ "com.dsh105.holoapi", "org.bukkit" ]
com.dsh105.holoapi; org.bukkit;
2,765,686
public void start(IWorkbenchWindow window) { if (!isStarted && window != null) { isStarted = true; this.window = window; // Update the current handler. // Not invoke the callback during start. setCurrentDocument(getDocument(getActiveEditor())); // Add listeners. window.getPartService().addP...
void function(IWorkbenchWindow window) { if (!isStarted && window != null) { isStarted = true; this.window = window; setCurrentDocument(getDocument(getActiveEditor())); window.getPartService().addPartListener(this); } }
/** * Start to monitor the encoding of the active document, if not started yet. * @param window The IWorkbenchWindow to work on. */
Start to monitor the encoding of the active document, if not started yet
start
{ "repo_name": "cypher256/eclipse-encoding-plugin", "path": "eclipse.encoding.plugin/src/mergedoc/encoding/ActiveDocumentAgent.java", "license": "epl-1.0", "size": 8366 }
[ "org.eclipse.ui.IWorkbenchWindow" ]
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.*;
[ "org.eclipse.ui" ]
org.eclipse.ui;
1,074,066
public VEGLJob safeClone() { VEGLJob newJob = new VEGLJob(null); newJob.setComputeInstanceId(this.getComputeInstanceId()); newJob.setComputeInstanceKey(this.getComputeInstanceKey()); newJob.setComputeInstanceType(this.getComputeInstanceType()); newJob.setComputeServiceId...
VEGLJob function() { VEGLJob newJob = new VEGLJob(null); newJob.setComputeInstanceId(this.getComputeInstanceId()); newJob.setComputeInstanceKey(this.getComputeInstanceKey()); newJob.setComputeInstanceType(this.getComputeInstanceType()); newJob.setComputeServiceId(this.getStorageServiceId()); newJob.setComputeVmId(this....
/** * Similar to clone but ensures compatibility with hibernate. No IDs or references (except for immutable ones) * will be shared by the clone and this object. * @return */
Similar to clone but ensures compatibility with hibernate. No IDs or references (except for immutable ones) will be shared by the clone and this object
safeClone
{ "repo_name": "victortey/VEGL-Portal", "path": "src/main/java/org/auscope/portal/server/vegl/VEGLJob.java", "license": "gpl-3.0", "size": 8578 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
217,061
@SuppressWarnings("rawtypes") protected Path translatePropertyPathIntoJpaPath(TranslationContext criteria, PropertyPath value) { TranslationContext tempCriteria = criteria; if (value.getDataType() != null) { try { tempCriteria = createCriteria(Class.forName(value.getDataType())); } catch (ClassNotFoun...
@SuppressWarnings(STR) Path function(TranslationContext criteria, PropertyPath value) { TranslationContext tempCriteria = criteria; if (value.getDataType() != null) { try { tempCriteria = createCriteria(Class.forName(value.getDataType())); } catch (ClassNotFoundException e) { Logger.getLogger(this.getClass()).error( ST...
/** * Translates the Rice Criteria API {@link PropertyPath} object into a native JPA path which can be used in JPA * predicates. * * @param criteria * The base criteria context for translation of the property if no specific data type is given. * @param value * The {@link PropertyPat...
Translates the Rice Criteria API <code>PropertyPath</code> object into a native JPA path which can be used in JPA predicates
translatePropertyPathIntoJpaPath
{ "repo_name": "ricepanda/rice-git3", "path": "rice-framework/krad-data/src/main/java/org/kuali/rice/krad/data/jpa/NativeJpaQueryTranslator.java", "license": "apache-2.0", "size": 21096 }
[ "javax.persistence.criteria.Path", "org.apache.log4j.Logger", "org.kuali.rice.core.api.criteria.PropertyPath" ]
import javax.persistence.criteria.Path; import org.apache.log4j.Logger; import org.kuali.rice.core.api.criteria.PropertyPath;
import javax.persistence.criteria.*; import org.apache.log4j.*; import org.kuali.rice.core.api.criteria.*;
[ "javax.persistence", "org.apache.log4j", "org.kuali.rice" ]
javax.persistence; org.apache.log4j; org.kuali.rice;
445,291
public String read() throws IOException { if (con == null) { con = sitepath.openConnection(); con.setConnectTimeout(1500); con.setReadTimeout(1800); } if (con.getDoInput() == false) { con.setDoInput(true); } Authenticator.setDefault(null); BufferedReader rd = new BufferedReader(new Input...
String function() throws IOException { if (con == null) { con = sitepath.openConnection(); con.setConnectTimeout(1500); con.setReadTimeout(1800); } if (con.getDoInput() == false) { con.setDoInput(true); } Authenticator.setDefault(null); BufferedReader rd = new BufferedReader(new InputStreamReader(con.getInputStream()))...
/** * Reading incoming data from the target-URL * @return The incoming data * @throws IOException * @throws AusnahmeDatenFehlen */
Reading incoming data from the target-URL
read
{ "repo_name": "GreifIntegra/Teamhimmel", "path": "de/greifintegra/kontor/logik/PhpKontakt.java", "license": "gpl-3.0", "size": 4086 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.net.Authenticator" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.Authenticator;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
964,653
public static Intent sanitizeIntent(final Intent incomingIntent) { if (incomingIntent == null) return null; try { incomingIntent.getBooleanExtra("TriggerUnparcel", false); return incomingIntent; } catch (BadParcelableException e) { return logInvalidIntent(...
static Intent function(final Intent incomingIntent) { if (incomingIntent == null) return null; try { incomingIntent.getBooleanExtra(STR, false); return incomingIntent; } catch (BadParcelableException e) { return logInvalidIntent(incomingIntent, e); } catch (RuntimeException e) { if (e.getCause() instanceof ClassNotFoun...
/** * Sanitizes an intent. In case the intent cannot be unparcelled, all extras will be removed to * make it safe to use. * @return A safe to use version of this intent. */
Sanitizes an intent. In case the intent cannot be unparcelled, all extras will be removed to make it safe to use
sanitizeIntent
{ "repo_name": "endlessm/chromium-browser", "path": "base/android/java/src/org/chromium/base/IntentUtils.java", "license": "bsd-3-clause", "size": 16738 }
[ "android.content.Intent", "android.os.BadParcelableException" ]
import android.content.Intent; import android.os.BadParcelableException;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
2,245,828
public static String validateRequired(final InputComponent<?, ?> input) { String requiredMessage = null; if (input.isRequired() && !InputComponents.hasValue(input)) { requiredMessage = input.getRequiredMessage(); if (Strings.isNullOrEmpty(requiredMessage)) { ...
static String function(final InputComponent<?, ?> input) { String requiredMessage = null; if (input.isRequired() && !InputComponents.hasValue(input)) { requiredMessage = input.getRequiredMessage(); if (Strings.isNullOrEmpty(requiredMessage)) { String labelValue = input.getLabel() == null ? input.getName() : input.getLa...
/** * Validate if the input has a value. If not, return the error message * * @param input * @return */
Validate if the input has a value. If not, return the error message
validateRequired
{ "repo_name": "pplatek/core", "path": "ui/api/src/main/java/org/jboss/forge/addon/ui/util/InputComponents.java", "license": "epl-1.0", "size": 13342 }
[ "org.jboss.forge.addon.ui.input.InputComponent", "org.jboss.forge.furnace.util.Strings" ]
import org.jboss.forge.addon.ui.input.InputComponent; import org.jboss.forge.furnace.util.Strings;
import org.jboss.forge.addon.ui.input.*; import org.jboss.forge.furnace.util.*;
[ "org.jboss.forge" ]
org.jboss.forge;
1,933,862
private void sendCONNECTRequest() throws IOException { int port = url.getPort(); // setRequests == true indicates the std. request headers // have been set in (previous) requests. // so the first one must be the http method (GET, etc.). // we need to set it to CONNECT soon, ...
void function() throws IOException { int port = url.getPort(); if (setRequests) requests.set(0, null, null); requests.prepend(HTTP_CONNECT + " " + connectRequestURI(url) + " " + httpVersion, null); requests.setIfNotSet(STR, userAgent); String host = url.getHost(); if (port != -1 && port != url.getDefaultPort()) { host ...
/** * send a CONNECT request for establishing a tunnel to proxy server */
send a CONNECT request for establishing a tunnel to proxy server
sendCONNECTRequest
{ "repo_name": "sirvaliance/netlib", "path": "src/main/java/org/silvertunnel/netlib/adapter/url/impl/net/http/HttpURLConnection.java", "license": "gpl-2.0", "size": 112217 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,994,455
private void addContext(String context, Document document, boolean ifNotExists) { if (context != null) { if (ifNotExists) { Field[] fields = document.getFields(CONTEXT_FIELD_NAME); for (Field f : fields) { if (context.equals(f.stringValue())) return; } } document.add(new Field(...
void function(String context, Document document, boolean ifNotExists) { if (context != null) { if (ifNotExists) { Field[] fields = document.getFields(CONTEXT_FIELD_NAME); for (Field f : fields) { if (context.equals(f.stringValue())) return; } } document.add(new Field(CONTEXT_FIELD_NAME, context, Field.Store.YES, Field....
/** * Add the "context" value to the doc * @param context the context or null, if null-context * @param document the document * @param ifNotExists check if this context exists */
Add the "context" value to the doc
addContext
{ "repo_name": "kreuzverweis/lucene-sail-3.0", "path": "src/main/java/org/openrdf/sail/lucene/LuceneIndex.java", "license": "bsd-3-clause", "size": 34243 }
[ "org.apache.lucene.document.Document", "org.apache.lucene.document.Field" ]
import org.apache.lucene.document.Document; import org.apache.lucene.document.Field;
import org.apache.lucene.document.*;
[ "org.apache.lucene" ]
org.apache.lucene;
2,662,859
public void deleteMessagesFromQueue(String queueUrl, List<String> handles) { DeleteMessageRequest deleteMessageRequest = new DeleteMessageRequest(); deleteMessageRequest.setQueueUrl(queueUrl); logger.debug("queueUrl: " + queueUrl); for (String handle : handles) { logger.debug("Deleting handle: " +...
void function(String queueUrl, List<String> handles) { DeleteMessageRequest deleteMessageRequest = new DeleteMessageRequest(); deleteMessageRequest.setQueueUrl(queueUrl); logger.debug(STR + queueUrl); for (String handle : handles) { logger.debug(STR + handle); deleteMessageRequest.setReceiptHandle(handle); sqsClient.de...
/** * <p>Deletes messages identified by the given handles from the given * SQS queue.</p> * * @param queueUrl The URL to the SQS queue to delete messages from. * @param handles The unique &apos;handles&apos; of the messages to delete. */
Deletes messages identified by the given handles from the given SQS queue
deleteMessagesFromQueue
{ "repo_name": "jackstraw66/web", "path": "livescribe/lsdatametrics/src/main/java/com/livescribe/aws/heartbeat/DataMetricsTransferServiceImpl.java", "license": "bsd-2-clause", "size": 15555 }
[ "com.amazonaws.services.sqs.model.DeleteMessageRequest", "java.util.List" ]
import com.amazonaws.services.sqs.model.DeleteMessageRequest; import java.util.List;
import com.amazonaws.services.sqs.model.*; import java.util.*;
[ "com.amazonaws.services", "java.util" ]
com.amazonaws.services; java.util;
267,010
@GET @Path("/{id:[0-9][0-9]*}") @Produces(MediaType.APPLICATION_JSON) public Exhibitors lookupExhibitorsById(@PathParam("id") long id) { Exhibitors exhibitors = repository.findById(id); if (exhibitors == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return exhibitors; ...
@Path(STR) @Produces(MediaType.APPLICATION_JSON) Exhibitors function(@PathParam("id") long id) { Exhibitors exhibitors = repository.findById(id); if (exhibitors == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return exhibitors; }
/** * Lookup exhibitors by id. * * @param id the id * @return the exhibitors */
Lookup exhibitors by id
lookupExhibitorsById
{ "repo_name": "uaijug/chronos", "path": "src/main/java/br/com/uaijug/chronos/event/sponsor/resources/ExhibitorsResource.java", "license": "gpl-3.0", "size": 6466 }
[ "br.com.uaijug.chronos.event.sponsor.model.Exhibitors", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.WebApplicationException", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response" ]
import br.com.uaijug.chronos.event.sponsor.model.Exhibitors; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response;
import br.com.uaijug.chronos.event.sponsor.model.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "br.com.uaijug", "javax.ws" ]
br.com.uaijug; javax.ws;
958,077
AbstractPersistedAnalysisJob getPersistedAnalysisJob(Long id);
AbstractPersistedAnalysisJob getPersistedAnalysisJob(Long id);
/** * Get the Analysis Job. * @param id - id to be retrieved. * @return Analysis Job */
Get the Analysis Job
getPersistedAnalysisJob
{ "repo_name": "NCIP/caintegrator", "path": "caintegrator-war/src/gov/nih/nci/caintegrator/application/workspace/WorkspaceService.java", "license": "bsd-3-clause", "size": 5463 }
[ "gov.nih.nci.caintegrator.domain.application.AbstractPersistedAnalysisJob" ]
import gov.nih.nci.caintegrator.domain.application.AbstractPersistedAnalysisJob;
import gov.nih.nci.caintegrator.domain.application.*;
[ "gov.nih.nci" ]
gov.nih.nci;
692,476
public void testOneAssociatedObjectNestedSearch1() throws Exception { Class targetClass = Person.class; Person criteria = new Person(); criteria.setId(new Integer(1)); Object[] results = getQueryObjectResults(targetClass, criteria); assertNotNull(results); assertEquals(1,results.length); ...
void function() throws Exception { Class targetClass = Person.class; Person criteria = new Person(); criteria.setId(new Integer(1)); Object[] results = getQueryObjectResults(targetClass, criteria); assertNotNull(results); assertEquals(1,results.length); Person result = (Person)results[0]; assertNotNull(result); assertN...
/** * Uses Nested Search Criteria for search * Verifies that the results are returned * Verifies size of the result set * Verifies that none of the attribute is null * Verifies that the associated object has required Id * * @throws Exception */
Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null Verifies that the associated object has required Id
testOneAssociatedObjectNestedSearch1
{ "repo_name": "NCIP/cacore-sdk", "path": "sdk-toolkit/example-project/junit/src/test/ws/O2OUnidirectionalWSTest.java", "license": "bsd-3-clause", "size": 6153 }
[ "gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Address", "gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Person" ]
import gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Address; import gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Person;
import gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.*;
[ "gov.nih.nci" ]
gov.nih.nci;
1,484,454
return PreferencesUtils.getString(context, PREF_CUSTOM_SKIN_PATH, DEFALT_SKIN); }
return PreferencesUtils.getString(context, PREF_CUSTOM_SKIN_PATH, DEFALT_SKIN); }
/** * get path of last skin package path * * @param context * @return path of skin package */
get path of last skin package path
getCustomSkinPath
{ "repo_name": "KouChengjian/acg12-android", "path": "library/src/main/java/com/acg12/lib/utils/skin/SkinConfig.java", "license": "apache-2.0", "size": 1311 }
[ "com.acg12.lib.utils.PreferencesUtils" ]
import com.acg12.lib.utils.PreferencesUtils;
import com.acg12.lib.utils.*;
[ "com.acg12.lib" ]
com.acg12.lib;
2,767,270
public static boolean isCorruptionException(Throwable t) { return ExceptionsHelper.unwrapCorruption(t) != null; }
static boolean function(Throwable t) { return ExceptionsHelper.unwrapCorruption(t) != null; }
/** * Returns <tt>true</tt> iff the given exception or * one of it's causes is an instance of {@link CorruptIndexException}, * {@link IndexFormatTooOldException}, or {@link IndexFormatTooNewException} otherwise <tt>false</tt>. */
Returns true iff the given exception or one of it's causes is an instance of <code>CorruptIndexException</code>, <code>IndexFormatTooOldException</code>, or <code>IndexFormatTooNewException</code> otherwise false
isCorruptionException
{ "repo_name": "sarwarbhuiyan/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/lucene/Lucene.java", "license": "apache-2.0", "size": 37676 }
[ "org.elasticsearch.ExceptionsHelper" ]
import org.elasticsearch.ExceptionsHelper;
import org.elasticsearch.*;
[ "org.elasticsearch" ]
org.elasticsearch;
2,764,231
public void addDataContact(Element raw_node,LinkedList<Phone> list){ for(Phone phone : list){ Element data_node = xmlContacts.createElement(data); Element phoneNode = xmlContacts.createElement(phoneTag); Element typeNode = xmlContacts.createElement(typeTag); ...
void function(Element raw_node,LinkedList<Phone> list){ for(Phone phone : list){ Element data_node = xmlContacts.createElement(data); Element phoneNode = xmlContacts.createElement(phoneTag); Element typeNode = xmlContacts.createElement(typeTag); Text phoneTextNode= xmlContacts.createTextNode(phone.getPhoneNumber()); Te...
/******************************************************* * Add a data_node to Element in args, which should be a * raw_node ... * * @param raw_node * @return */
Add a data_node to Element in args, which should be a raw_node ..
addDataContact
{ "repo_name": "ZenSoftGitHub/ZenBackup", "path": "app/src/main/java/com/example/zenon/myapplicationtest/WriteXmlContacts.java", "license": "gpl-3.0", "size": 3545 }
[ "java.util.LinkedList", "org.w3c.dom.Element", "org.w3c.dom.Text" ]
import java.util.LinkedList; import org.w3c.dom.Element; import org.w3c.dom.Text;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
2,242,811
public void testReplacedClass() throws SQLException { // This version checks the e-mail address. CallableStatement cs = prepareCall("CALL EMC.ADDCONTACT(?, ?)"); cs.setInt(1, 4); cs.setString(2, "spammer@ripoff.com"); cs.executeUpdate(); cs.setInt(1, 5); cs.se...
void function() throws SQLException { CallableStatement cs = prepareCall(STR); cs.setInt(1, 4); cs.setString(2, STR); cs.executeUpdate(); cs.setInt(1, 5); cs.setString(2, STR); cs.executeUpdate(); Statement s = createStatement(); JDBC.assertFullResultSet( s.executeQuery(STR), new String[][] { {"0", STR, null}, {"1", ST...
/** * Change of class due to testReplaceJar that * changes the application to run checks on the e-mail * to ensure it is valid (in this case by seeing if * it simply includes 'spam' in the title). * @throws SQLException */
Change of class due to testReplaceJar that changes the application to run checks on the e-mail to ensure it is valid (in this case by seeing if it simply includes 'spam' in the title)
testReplacedClass
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DatabaseClassLoadingTest.java", "license": "apache-2.0", "size": 48889 }
[ "java.sql.CallableStatement", "java.sql.SQLException", "java.sql.Statement", "org.apache.derbyTesting.junit.JDBC" ]
import java.sql.CallableStatement; import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC;
import java.sql.*; import org.apache.*;
[ "java.sql", "org.apache" ]
java.sql; org.apache;
278,247
public final static boolean isInherit(Class<?> test, final Class<?> parent) { if(test.equals(parent) == true) { return true; } if((test.isPrimitive() == true) || (test.isArray() == true)) { return false; } final Stack<Class<?>> stack = new Stack<Class<...
final static boolean function(Class<?> test, final Class<?> parent) { if(test.equals(parent) == true) { return true; } if((test.isPrimitive() == true) (test.isArray() == true)) { return false; } final Stack<Class<?>> stack = new Stack<Class<?>>(); stack.push(test); while(stack.isEmpty() == false) { test = stack.pop(); ...
/** * Indicates if a class extends an other one * * @param test * Class to test * @param parent * Class to extends * @return {@code true} if class extends an other one */
Indicates if a class extends an other one
isInherit
{ "repo_name": "automenta/narchy", "path": "lab/lab_x/main/java/jhelp/util/reflection/Reflector.java", "license": "agpl-3.0", "size": 30434 }
[ "java.util.Stack" ]
import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
463,770
// Windows Vista returns the IPv6 InetAddress using this method, which is not // particularly useful as it has no name or useful address, just "0:0:0:0:0:0:0:1". // That is why windows should be treated differently to linux/unix and use the // default way of getting the localhost. String...
String osName = System.getProperty(STR); if (osName != null && osName.toLowerCase().contains(STR)) { return InetAddress.getLocalHost().getHostAddress(); } InetAddress lch = null; Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); while (e.hasMoreElements()) { NetworkInterface i = e.nextElement()...
/** * Smarter way to get localhost than InetAddress.getLocalHost. See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4665037 */
Smarter way to get localhost than InetAddress.getLocalHost. See HREF
getLocalHostAddress
{ "repo_name": "OculusVR/shanghai-liquibase", "path": "liquibase-core/src/main/java/liquibase/util/NetUtil.java", "license": "apache-2.0", "size": 1642 }
[ "java.net.InetAddress", "java.net.NetworkInterface", "java.util.Enumeration" ]
import java.net.InetAddress; import java.net.NetworkInterface; import java.util.Enumeration;
import java.net.*; import java.util.*;
[ "java.net", "java.util" ]
java.net; java.util;
851,276
private Double computeConjunctionSelectivity(RexCall call) { Double tmpSelectivity; double selectivity = 1; for (RexNode cje : call.getOperands()) { tmpSelectivity = cje.accept(this); if (tmpSelectivity != null) { selectivity *= tmpSelectivity; } } return selectivity; ...
Double function(RexCall call) { Double tmpSelectivity; double selectivity = 1; for (RexNode cje : call.getOperands()) { tmpSelectivity = cje.accept(this); if (tmpSelectivity != null) { selectivity *= tmpSelectivity; } } return selectivity; }
/** * Selectivity of conjunctive predicate -> (selectivity of conjunctive * element1) * (selectivity of conjunctive element2)... * * @param call * @return */
Selectivity of conjunctive predicate -> (selectivity of conjunctive element1) * (selectivity of conjunctive element2)..
computeConjunctionSelectivity
{ "repo_name": "sankarh/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/FilterSelectivityEstimator.java", "license": "apache-2.0", "size": 11070 }
[ "org.apache.calcite.rex.RexCall", "org.apache.calcite.rex.RexNode" ]
import org.apache.calcite.rex.RexCall; import org.apache.calcite.rex.RexNode;
import org.apache.calcite.rex.*;
[ "org.apache.calcite" ]
org.apache.calcite;
684,175
public static Date getNextRunTime(IntervalType type, String schedule, String timezone, Date startDate) { String[] scheduleParts = schedule.split(":"); //MM:HH:DAY final Calendar scheduleTime = Calendar.getInstance(); scheduleTime.setTimeZone(TimeZone.getTimeZone(timezone)); if(startDa...
static Date function(IntervalType type, String schedule, String timezone, Date startDate) { String[] scheduleParts = schedule.split(":"); final Calendar scheduleTime = Calendar.getInstance(); scheduleTime.setTimeZone(TimeZone.getTimeZone(timezone)); if(startDate == null){ startDate = new Date(); } scheduleTime.setTime(...
/** * Return next run time * @param intervalType hourly/daily/weekly/monthly * @param schedule MM[:HH][:DD] format. DD is day of week for weekly and day of month for monthly * @param timezone The timezone in which the schedule string is specified * @param startDate if specified, returns next run time after t...
Return next run time
getNextRunTime
{ "repo_name": "cinderella/incubator-cloudstack", "path": "utils/src/com/cloud/utils/DateUtil.java", "license": "apache-2.0", "size": 9906 }
[ "com.cloud.utils.exception.CloudRuntimeException", "java.util.Calendar", "java.util.Date", "java.util.TimeZone" ]
import com.cloud.utils.exception.CloudRuntimeException; import java.util.Calendar; import java.util.Date; import java.util.TimeZone;
import com.cloud.utils.exception.*; import java.util.*;
[ "com.cloud.utils", "java.util" ]
com.cloud.utils; java.util;
593,447
public ProductSortHLAPI getContainerProductSortHLAPI(){ if(item.getContainerProductSort() == null) return null; return new ProductSortHLAPI(item.getContainerProductSort()); }
ProductSortHLAPI function(){ if(item.getContainerProductSort() == null) return null; return new ProductSortHLAPI(item.getContainerProductSort()); }
/** * This accessor automatically encapsulate an element of the current object. * WARNING : this creates a new object in memory. * @return : null if the element is null */
This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory
getContainerProductSortHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/finiteIntRanges/hlapi/FiniteIntRangeHLAPI.java", "license": "epl-1.0", "size": 21672 }
[ "fr.lip6.move.pnml.hlpn.terms.hlapi.ProductSortHLAPI" ]
import fr.lip6.move.pnml.hlpn.terms.hlapi.ProductSortHLAPI;
import fr.lip6.move.pnml.hlpn.terms.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
2,475,230
public boolean hasGlobalIPv6Address() { for (LinkAddress address : mLinkAddresses) { if (address.getAddress() instanceof Inet6Address && address.isGlobalPreferred()) { return true; } } return false; }
boolean function() { for (LinkAddress address : mLinkAddresses) { if (address.getAddress() instanceof Inet6Address && address.isGlobalPreferred()) { return true; } } return false; }
/** * Returns true if this link has a global preferred IPv6 address. * * @return {@code true} if there is a global preferred IPv6 address, {@code false} otherwise. * @hide */
Returns true if this link has a global preferred IPv6 address
hasGlobalIPv6Address
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/net/LinkProperties.java", "license": "apache-2.0", "size": 42081 }
[ "java.net.Inet6Address" ]
import java.net.Inet6Address;
import java.net.*;
[ "java.net" ]
java.net;
1,413,385
private boolean offerChannel(final Channel channel) { this.ensureInEventLoop(); return this.availableChannels.offer(channel); }
boolean function(final Channel channel) { this.ensureInEventLoop(); return this.availableChannels.offer(channel); }
/** * Offer a {@link Channel} back to the available channel pool. * <p> * Maintainers: Implementations of this method must be thread-safe and this type ensures thread safety by calling * this method serially on a single-threaded EventExecutor. As a result this method need not (and should not) be ...
Offer a <code>Channel</code> back to the available channel pool. Maintainers: Implementations of this method must be thread-safe and this type ensures thread safety by calling this method serially on a single-threaded EventExecutor. As a result this method need not (and should not) be synchronized
offerChannel
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelPool.java", "license": "mit", "size": 69435 }
[ "io.netty.channel.Channel" ]
import io.netty.channel.Channel;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
1,585,186
public final void addActionToPerform(Action action){ if(!isActionPossible(action)) return; // Remove all incompatible actoins for(Iterator<Action> i = actionsToExecute.iterator(); i.hasNext();){ Action a = i.next(); if(!areActionsCompatible(action, a)){ // if(!action.isCompatible(this, i.next())){ //Sy...
final void function(Action action){ if(!isActionPossible(action)) return; for(Iterator<Action> i = actionsToExecute.iterator(); i.hasNext();){ Action a = i.next(); if(!areActionsCompatible(action, a)){ i.remove(); }{ } } actionsToExecute.add(action); }
/** Any actions performed by an agent will cause this function to be called. * It is the responsibility of the GUI to call this function when anything is * done by a human */
Any actions performed by an agent will cause this function to be called. It is the responsibility of the GUI to call this function when anything is
addActionToPerform
{ "repo_name": "Cride5/jablus", "path": "src/uk/co/crider/jablus/agent/Agent.java", "license": "gpl-3.0", "size": 8121 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,610,045
public List<Receiver> getReceiver() { return receiver; }
List<Receiver> function() { return receiver; }
/** * Getter for receiver */
Getter for receiver
getReceiver
{ "repo_name": "DAC-2014-Equipe-3/sujet-2", "path": "sujet2/src/main/java/com/paypal/svcs/types/ap/ReceiverList.java", "license": "mit", "size": 1187 }
[ "com.paypal.svcs.types.ap.Receiver", "java.util.List" ]
import com.paypal.svcs.types.ap.Receiver; import java.util.List;
import com.paypal.svcs.types.ap.*; import java.util.*;
[ "com.paypal.svcs", "java.util" ]
com.paypal.svcs; java.util;
914,664
public Drawable getDrawable (String name) { Drawable drawable = optional(name, Drawable.class); if (drawable != null) return drawable; // Use texture or texture region. If it has splits, use ninepatch. If it has rotation or whitespace stripping, use sprite. try { TextureRegion textureRegion = getRe...
Drawable function (String name) { Drawable drawable = optional(name, Drawable.class); if (drawable != null) return drawable; try { TextureRegion textureRegion = getRegion(name); if (textureRegion instanceof AtlasRegion) { AtlasRegion region = (AtlasRegion)textureRegion; if (region.splits != null) drawable = new NinePat...
/** Returns a registered drawable. If no drawable is found but a region, ninepatch, or sprite exists with the name, then the * appropriate drawable is created and stored in the skin. */
Returns a registered drawable. If no drawable is found but a region, ninepatch, or sprite exists with the name, then the
getDrawable
{ "repo_name": "sarkanyi/libgdx", "path": "gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Skin.java", "license": "apache-2.0", "size": 26039 }
[ "com.badlogic.gdx.graphics.g2d.NinePatch", "com.badlogic.gdx.graphics.g2d.Sprite", "com.badlogic.gdx.graphics.g2d.TextureAtlas", "com.badlogic.gdx.graphics.g2d.TextureRegion", "com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable", "com.badlogic.gdx.scenes.scene2d.utils.Drawable", "com.badlogic.gdx.scenes...
import com.badlogic.gdx.graphics.g2d.NinePatch; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable; import com.badlogic.gdx.scenes.scene2d.utils.Drawable; import com...
import com.badlogic.gdx.graphics.g2d.*; import com.badlogic.gdx.scenes.scene2d.utils.*; import com.badlogic.gdx.utils.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
1,758,787
public Paint getBaseItemLabelPaint(); /** * Sets the base item label paint and sends a {@link RendererChangeEvent}
Paint function(); /** * Sets the base item label paint and sends a {@link RendererChangeEvent}
/** * Returns the base item label paint. * * @return The paint (never <code>null<code>). * * @see #setBaseItemLabelPaint(Paint) */
Returns the base item label paint
getBaseItemLabelPaint
{ "repo_name": "SpoonLabs/astor", "path": "examples/chart_11/source/org/jfree/chart/renderer/category/CategoryItemRenderer.java", "license": "gpl-2.0", "size": 64985 }
[ "java.awt.Paint", "org.jfree.chart.event.RendererChangeEvent" ]
import java.awt.Paint; import org.jfree.chart.event.RendererChangeEvent;
import java.awt.*; import org.jfree.chart.event.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,678,525
@Query("select u.id from User u order by u.id asc") public long[] findUserIds();
@Query(STR) long[] function();
/** * Returns an array of all user ids ordered by id ascending. * @return */
Returns an array of all user ids ordered by id ascending
findUserIds
{ "repo_name": "Vodorohelios/career-levels", "path": "src/main/java/com/inthergroup/internship/repositories/UserRepository.java", "license": "mit", "size": 1004 }
[ "org.springframework.data.jpa.repository.Query" ]
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.*;
[ "org.springframework.data" ]
org.springframework.data;
456,108
@ServiceMethod(returns = ReturnType.SINGLE) public Response<CheckNameAvailabilityResultInner> checkNameAvailabilityWithResponse( StorageAccountCheckNameAvailabilityParameters accountName, Context context) { return checkNameAvailabilityWithResponseAsync(accountName, context).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) Response<CheckNameAvailabilityResultInner> function( StorageAccountCheckNameAvailabilityParameters accountName, Context context) { return checkNameAvailabilityWithResponseAsync(accountName, context).block(); }
/** * Checks that the storage account name is valid and is not already in use. * * @param accountName The name of the storage account within the specified resource group. Storage account names * must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @pa...
Checks that the storage account name is valid and is not already in use
checkNameAvailabilityWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountsClientImpl.java", "license": "mit", "size": 213141 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.storage.fluent.models.CheckNameAvailabilityResultInner", "com.azure.resourcemanager.storage.models.StorageAccountCheckNameAvaila...
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.storage.fluent.models.CheckNameAvailabilityResultInner; import com.azure.resourcemanager.storage.models.StorageAccou...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storage.fluent.models.*; import com.azure.resourcemanager.storage.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,333,664
private String componentName() { String compType = TranslationDesignerPallete.getCorrespondingString(getType()); compType = compType.replace(" ", "_").replace("'", "_"); // Make sure it doesn't have any spaces in it return compType + getNextComponentIndex(); }
String function() { String compType = TranslationDesignerPallete.getCorrespondingString(getType()); compType = compType.replace(" ", "_").replace("'", "_"); return compType + getNextComponentIndex(); }
/** * Returns a unique default component name. */
Returns a unique default component name
componentName
{ "repo_name": "ZachLamb/appinventor-sources", "path": "appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockComponent.java", "license": "apache-2.0", "size": 32115 }
[ "com.google.appinventor.client.TranslationDesignerPallete" ]
import com.google.appinventor.client.TranslationDesignerPallete;
import com.google.appinventor.client.*;
[ "com.google.appinventor" ]
com.google.appinventor;
2,200,230
void attachConfigUpdateListeners(GoConfigService configService) { configService.register(new ConfigRepoReparseListener(this)); }
void attachConfigUpdateListeners(GoConfigService configService) { configService.register(new ConfigRepoReparseListener(this)); }
/** * Registers the EntityChangedListener for various classes to mark config-repos for reparse on config updates. * * @param configService the {@link GoConfigService} to register events */
Registers the EntityChangedListener for various classes to mark config-repos for reparse on config updates
attachConfigUpdateListeners
{ "repo_name": "varshavaradarajan/gocd", "path": "server/src/main/java/com/thoughtworks/go/config/ConfigReposMaterialParseResultManager.java", "license": "apache-2.0", "size": 8250 }
[ "com.thoughtworks.go.server.service.GoConfigService" ]
import com.thoughtworks.go.server.service.GoConfigService;
import com.thoughtworks.go.server.service.*;
[ "com.thoughtworks.go" ]
com.thoughtworks.go;
130,270
private JPanel getJarButtonsPanel() { if (jarButtonsPanel == null) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints1.gridy = 0; GridBagConstraints gridBagConstraints = ...
JPanel function() { if (jarButtonsPanel == null) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.gridx = 1; gridBagConstraints1.insets = new java.awt.Insets(2, 2, 2, 2); gridBagConstraints1.gridy = 0; GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConst...
/** * This method initializes jPanel * * @return javax.swing.JPanel */
This method initializes jPanel
getJarButtonsPanel
{ "repo_name": "NCIP/cagrid", "path": "cagrid/Software/core/caGrid/projects/dataExtensions/src/java/ui/gov/nih/nci/cagrid/data/ui/browser/ClassBrowserPanel.java", "license": "bsd-3-clause", "size": 21071 }
[ "java.awt.GridBagConstraints", "java.awt.GridBagLayout", "javax.swing.JPanel" ]
import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,070,024
public void removeServerGroup(ActivationKey key, ServerGroup group) { key.removeServerGroup(group); }
void function(ActivationKey key, ServerGroup group) { key.removeServerGroup(group); }
/** * Remove a ServerGroup from an activation key. * @param key Activation key to be acted upon * @param group ServerGroup to remove */
Remove a ServerGroup from an activation key
removeServerGroup
{ "repo_name": "xkollar/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/token/ActivationKeyManager.java", "license": "gpl-2.0", "size": 23519 }
[ "com.redhat.rhn.domain.server.ServerGroup", "com.redhat.rhn.domain.token.ActivationKey" ]
import com.redhat.rhn.domain.server.ServerGroup; import com.redhat.rhn.domain.token.ActivationKey;
import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.token.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
878,417
private void updatePartitionFullMap(GridDhtPartitionsFullMessage msg) { cctx.versions().onExchange(msg.lastVersion().order()); for (Map.Entry<Integer, GridDhtPartitionFullMap> entry : msg.partitions().entrySet()) { Integer grpId = entry.getKey(); Map<Integer, T2<Long, Long>...
void function(GridDhtPartitionsFullMessage msg) { cctx.versions().onExchange(msg.lastVersion().order()); for (Map.Entry<Integer, GridDhtPartitionFullMap> entry : msg.partitions().entrySet()) { Integer grpId = entry.getKey(); Map<Integer, T2<Long, Long>> cntrMap = msg.partitionUpdateCounters(grpId); CacheGroupContext gr...
/** * Updates partition map in all caches. * * @param msg Partitions full messages. */
Updates partition map in all caches
updatePartitionFullMap
{ "repo_name": "a1vanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java", "license": "apache-2.0", "size": 74846 }
[ "java.util.Map", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion", "org.apache.ignite.internal.processors.cache.CacheGroupContext" ]
import java.util.Map; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.CacheGroupContext;
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
652,452
public LocatorList getMetatrafficUnicastLocatorList() { return this.m_metatrafficUnicastLocatorList; }
LocatorList function() { return this.m_metatrafficUnicastLocatorList; }
/** * Get metatraffic unicast locator list * * @return metatraffic unicast locator list * @see LocatorList */
Get metatraffic unicast locator list
getMetatrafficUnicastLocatorList
{ "repo_name": "Fiware/i2nd.KIARA", "path": "src/main/java/org/fiware/kiara/ps/rtps/builtin/BuiltinProtocols.java", "license": "lgpl-3.0", "size": 12725 }
[ "org.fiware.kiara.ps.rtps.common.LocatorList" ]
import org.fiware.kiara.ps.rtps.common.LocatorList;
import org.fiware.kiara.ps.rtps.common.*;
[ "org.fiware.kiara" ]
org.fiware.kiara;
481,629
public static ComplexNumber acos(final ComplexNumber z) { Validate.notNull(z, "z"); return ComplexMathUtils.multiply(NEGATIVE_I, ComplexMathUtils.log(ComplexMathUtils.add(z, ComplexMathUtils.sqrt(ComplexMathUtils.subtract(ComplexMathUtils.multiply(z, z), 1))))); }
static ComplexNumber function(final ComplexNumber z) { Validate.notNull(z, "z"); return ComplexMathUtils.multiply(NEGATIVE_I, ComplexMathUtils.log(ComplexMathUtils.add(z, ComplexMathUtils.sqrt(ComplexMathUtils.subtract(ComplexMathUtils.multiply(z, z), 1))))); }
/** * arccos - the inverse of cos. * * @param z * A complex number * @return acos(z) */
arccos - the inverse of cos
acos
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/math/TrigonometricFunctionUtils.java", "license": "apache-2.0", "size": 5314 }
[ "com.opengamma.analytics.math.number.ComplexNumber", "org.apache.commons.lang.Validate" ]
import com.opengamma.analytics.math.number.ComplexNumber; import org.apache.commons.lang.Validate;
import com.opengamma.analytics.math.number.*; import org.apache.commons.lang.*;
[ "com.opengamma.analytics", "org.apache.commons" ]
com.opengamma.analytics; org.apache.commons;
1,781,539
void addExperimenter(ExperimenterData experimenter, TreeImageDisplay groupNode) { TreeImageSet node = createExperimenterNode(experimenter, groupNode); }
void addExperimenter(ExperimenterData experimenter, TreeImageDisplay groupNode) { TreeImageSet node = createExperimenterNode(experimenter, groupNode); }
/** * Adds a new experimenter to the tree. * * @param experimenter The experimenter to add. * @param groupNode The node to add the experimenter to. */
Adds a new experimenter to the tree
addExperimenter
{ "repo_name": "simleo/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java", "license": "gpl-2.0", "size": 83096 }
[ "org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay", "org.openmicroscopy.shoola.agents.util.browser.TreeImageSet" ]
import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay; import org.openmicroscopy.shoola.agents.util.browser.TreeImageSet;
import org.openmicroscopy.shoola.agents.util.browser.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
216,580
@Override public boolean matchesType(Type t) { if (equals(t)) { return true; } if (!t.isScalarType()) { return false; } ScalarType scalarType = (ScalarType) t; if (type == PrimitiveType.VARCHAR && scalarType.isWildcardVarchar()) { ...
boolean function(Type t) { if (equals(t)) { return true; } if (!t.isScalarType()) { return false; } ScalarType scalarType = (ScalarType) t; if (type == PrimitiveType.VARCHAR && scalarType.isWildcardVarchar()) { Preconditions.checkState(!isWildcardVarchar()); return true; } if (type == PrimitiveType.CHAR && scalarType.i...
/** * Returns true if this object is of type t. * Handles wildcard types. That is, if t is the wildcard type variant * of 'this', returns true. */
Returns true if this object is of type t. Handles wildcard types. That is, if t is the wildcard type variant of 'this', returns true
matchesType
{ "repo_name": "imay/palo", "path": "fe/src/main/java/org/apache/doris/catalog/ScalarType.java", "license": "apache-2.0", "size": 27312 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,856,989