method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private void drawGrid() { long time = 0; if (Profiler.ON) { time = System.currentTimeMillis(); } drawGrid(imageLayers.get(LAYER_GRID).createGraphics()); if (Profiler.ON) { Profiler.rendering(Profiler.DRAW_GRID, System.currentTimeMillis() ...
void function() { long time = 0; if (Profiler.ON) { time = System.currentTimeMillis(); } drawGrid(imageLayers.get(LAYER_GRID).createGraphics()); if (Profiler.ON) { Profiler.rendering(Profiler.DRAW_GRID, System.currentTimeMillis() - time); } }
/** * Initiates (re-)drawing grid. */
Initiates (re-)drawing grid
drawGrid
{ "repo_name": "mindrunner/funCKit", "path": "workspace/funCKit/src/main/java/de/sep2011/funckit/view/EditPanel.java", "license": "gpl-3.0", "size": 37626 }
[ "de.sep2011.funckit.util.Profiler" ]
import de.sep2011.funckit.util.Profiler;
import de.sep2011.funckit.util.*;
[ "de.sep2011.funckit" ]
de.sep2011.funckit;
2,342,434
public static final byte[] getBytes(String s, String encoding, String serverEncoding, boolean parserKnowsUnicode, MySQLConnection conn, ExceptionInterceptor exceptionInterceptor) throws SQLException { try { SingleByteCharsetConverter converter = null; if (conn != null) { converter = conn.ge...
static final byte[] function(String s, String encoding, String serverEncoding, boolean parserKnowsUnicode, MySQLConnection conn, ExceptionInterceptor exceptionInterceptor) throws SQLException { try { SingleByteCharsetConverter converter = null; if (conn != null) { converter = conn.getCharsetConverter(encoding); } else ...
/** * Returns the byte[] representation of the given string using given * encoding. * * @param s * the string to convert * @param encoding * the character encoding to use * @param parserKnowsUnicode * DOCUMENT ME! * * @return byte[] representation of the string ...
Returns the byte[] representation of the given string using given encoding
getBytes
{ "repo_name": "spullara/mysql-connector-java", "path": "src/main/java/com/mysql/jdbc/StringUtils.java", "license": "gpl-2.0", "size": 51789 }
[ "java.io.UnsupportedEncodingException", "java.sql.SQLException" ]
import java.io.UnsupportedEncodingException; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
1,628,161
public T[] value(T x) throws MathIllegalArgumentException, NullArgumentException { // safety check MathUtils.checkNotNull(x); if (abscissae.isEmpty()) { throw new MathIllegalArgumentException(LocalizedCoreFormats.EMPTY_INTERPOLATION_SAMPLE); } final T[] value = ...
T[] function(T x) throws MathIllegalArgumentException, NullArgumentException { MathUtils.checkNotNull(x); if (abscissae.isEmpty()) { throw new MathIllegalArgumentException(LocalizedCoreFormats.EMPTY_INTERPOLATION_SAMPLE); } final T[] value = MathArrays.buildArray(x.getField(), topDiagonal.get(0).length); T valueCoeff =...
/** Interpolate value at a specified abscissa. * @param x interpolation abscissa * @return interpolated value * @exception MathIllegalArgumentException if sample is empty * @throws NullArgumentException if x is null */
Interpolate value at a specified abscissa
value
{ "repo_name": "sdinot/hipparchus", "path": "hipparchus-core/src/main/java/org/hipparchus/analysis/interpolation/FieldHermiteInterpolator.java", "license": "apache-2.0", "size": 8578 }
[ "org.hipparchus.exception.LocalizedCoreFormats", "org.hipparchus.exception.MathIllegalArgumentException", "org.hipparchus.exception.NullArgumentException", "org.hipparchus.util.MathArrays", "org.hipparchus.util.MathUtils" ]
import org.hipparchus.exception.LocalizedCoreFormats; import org.hipparchus.exception.MathIllegalArgumentException; import org.hipparchus.exception.NullArgumentException; import org.hipparchus.util.MathArrays; import org.hipparchus.util.MathUtils;
import org.hipparchus.exception.*; import org.hipparchus.util.*;
[ "org.hipparchus.exception", "org.hipparchus.util" ]
org.hipparchus.exception; org.hipparchus.util;
1,229,539
@Override public void paintComponent(Graphics f_old) { setClipZone(f_old.getClipBounds()); final Graphics2D f = (Graphics2D) f_old; DrawGraphParams params = defaultDrawParams(); drawGraph(f, params); }
void function(Graphics f_old) { setClipZone(f_old.getClipBounds()); final Graphics2D f = (Graphics2D) f_old; DrawGraphParams params = defaultDrawParams(); drawGraph(f, params); }
/** * Draws the graph. This method should only be called by the virtual * machine. * * @param f_old * the graphical context */
Draws the graph. This method should only be called by the virtual machine
paintComponent
{ "repo_name": "mdamis/unilabIDE", "path": "Unitex-Java/src/fr/umlv/unitex/graphrendering/GraphicalZone.java", "license": "lgpl-3.0", "size": 57608 }
[ "java.awt.Graphics", "java.awt.Graphics2D" ]
import java.awt.Graphics; import java.awt.Graphics2D;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,990,161
public void removeListObjectToday(ListObject listObject) { if (todayEventList.contains(listObject)) { todayEventList.remove(listObject); removeLoAssociatedCats(listObject); this.notifyDataSetChanged(); } }
void function(ListObject listObject) { if (todayEventList.contains(listObject)) { todayEventList.remove(listObject); removeLoAssociatedCats(listObject); this.notifyDataSetChanged(); } }
/** * Remove a event from today. * * @param listObject * the listObject to remove */
Remove a event from today
removeListObjectToday
{ "repo_name": "simonjrp/ESCAPE", "path": "ESCAPE/src/se/chalmers/dat255/group22/escape/adapters/CustomExpandableListAdapter.java", "license": "gpl-3.0", "size": 25615 }
[ "se.chalmers.dat255.group22.escape.objects.ListObject" ]
import se.chalmers.dat255.group22.escape.objects.ListObject;
import se.chalmers.dat255.group22.escape.objects.*;
[ "se.chalmers.dat255" ]
se.chalmers.dat255;
1,706,118
ServiceResponse<byte[]> getNullBase64UrlEncoded() throws ErrorException, IOException;
ServiceResponse<byte[]> getNullBase64UrlEncoded() throws ErrorException, IOException;
/** * Get null value that is expected to be base64url encoded. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the byte[] object wrapped in {@link ServiceResponse} if successful. */
Get null value that is expected to be base64url encoded
getNullBase64UrlEncoded
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodystring/Strings.java", "license": "mit", "size": 16817 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
2,835,747
public void start() { if (LOG_EGL) { Log.w("EglHelper", "start() tid=" + Thread.currentThread().getId()); } mEgl = (EGL10) EGLContext.getEGL(); mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); if (...
void function() { if (LOG_EGL) { Log.w(STR, STR + Thread.currentThread().getId()); } mEgl = (EGL10) EGLContext.getEGL(); mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); if (mEglDisplay == EGL10.EGL_NO_DISPLAY) { throw new RuntimeException(STR); } int[] version = new int[2]; if (!mEgl.eglInitialize(mEglDisp...
/** * Initialize EGL for a given configuration spec. * * @param configSpec */
Initialize EGL for a given configuration spec
start
{ "repo_name": "nvllsvm/GZDoom-Android", "path": "doom/src/main/java/net/nullsum/doom/MyGLSurfaceView.java", "license": "gpl-2.0", "size": 78962 }
[ "android.util.Log", "javax.microedition.khronos.egl.EGLContext" ]
import android.util.Log; import javax.microedition.khronos.egl.EGLContext;
import android.util.*; import javax.microedition.khronos.egl.*;
[ "android.util", "javax.microedition" ]
android.util; javax.microedition;
281,591
protected IRecipe Wrap(IRecipe recipe, RecipeComponent[] components) { return recipe; }
IRecipe function(IRecipe recipe, RecipeComponent[] components) { return recipe; }
/** * Quick and dirty representation of a recipe wrapper * @param recipe The recipe to (potentially) wrap * @param components The components to check * @return The wrapped recipe; or the original if it didn't need wrapped. */
Quick and dirty representation of a recipe wrapper
Wrap
{ "repo_name": "legendblade/CraftingHarmonics", "path": "api/src/main/java/org/winterblade/minecraft/harmony/common/crafting/operations/BaseAddOperation.java", "license": "mit", "size": 2792 }
[ "net.minecraft.item.crafting.IRecipe", "org.winterblade.minecraft.harmony.api.crafting.components.RecipeComponent" ]
import net.minecraft.item.crafting.IRecipe; import org.winterblade.minecraft.harmony.api.crafting.components.RecipeComponent;
import net.minecraft.item.crafting.*; import org.winterblade.minecraft.harmony.api.crafting.components.*;
[ "net.minecraft.item", "org.winterblade.minecraft" ]
net.minecraft.item; org.winterblade.minecraft;
2,858,226
public List<String> getPeersJIDsFromCert() { return peersJIDsFromCert; }
List<String> function() { return peersJIDsFromCert; }
/** * Method description * * * */
Method description
getPeersJIDsFromCert
{ "repo_name": "DanielYao/tigase-server", "path": "src/main/java/tigase/net/IOService.java", "license": "agpl-3.0", "size": 37091 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,143,437
@Override public boolean doPreDeleteUser(java.lang.String username, org.wso2.carbon.user.core.UserStoreManager userStoreManager) throws org.wso2.carbon.user.core.UserStoreException { TokenMgtDAO tokenMgtDAO = new TokenMgtDAO(); String tenantDomain...
boolean function(java.lang.String username, org.wso2.carbon.user.core.UserStoreManager userStoreManager) throws org.wso2.carbon.user.core.UserStoreException { TokenMgtDAO tokenMgtDAO = new TokenMgtDAO(); String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); username = (username ...
/** * Deleting user from the identity database prerequisites. */
Deleting user from the identity database prerequisites
doPreDeleteUser
{ "repo_name": "laki88/carbon-identity", "path": "components/oauth/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/listener/IdentityOathEventListener.java", "license": "apache-2.0", "size": 5676 }
[ "java.util.Set", "org.wso2.carbon.context.PrivilegedCarbonContext", "org.wso2.carbon.identity.oauth.OAuthUtil", "org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception", "org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO", "org.wso2.carbon.identity.oauth2.model.AccessTokenDO", "org.wso2.carbon.identity.o...
import java.util.Set; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.oauth.OAuthUtil; import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception; import org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO; import org.wso2.carbon.identity.oauth2.model.AccessTokenDO; import org.ws...
import java.util.*; import org.wso2.carbon.context.*; import org.wso2.carbon.identity.oauth.*; import org.wso2.carbon.identity.oauth2.*; import org.wso2.carbon.identity.oauth2.dao.*; import org.wso2.carbon.identity.oauth2.model.*; import org.wso2.carbon.identity.oauth2.util.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
1,070,372
public void setRequestProcessorNames(List<ObjectName> requestProcessorNames) { this.requestProcessorNames = requestProcessorNames; }
void function(List<ObjectName> requestProcessorNames) { this.requestProcessorNames = requestProcessorNames; }
/** * Sets the request processor names. * * @param requestProcessorNames the new request processor names */
Sets the request processor names
setRequestProcessorNames
{ "repo_name": "dougwm/psi-probe", "path": "core/src/main/java/psiprobe/model/jmx/ThreadPoolObjectName.java", "license": "gpl-2.0", "size": 2310 }
[ "java.util.List", "javax.management.ObjectName" ]
import java.util.List; import javax.management.ObjectName;
import java.util.*; import javax.management.*;
[ "java.util", "javax.management" ]
java.util; javax.management;
1,743,902
public static java.util.Set extractCATSReferralStatusSet(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.CatsReferralStatusLiteVoCollection voCollection) { return extractCATSReferralStatusSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.CatsReferralStatusLiteVoCollection voCollection) { return extractCATSReferralStatusSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.RefMan.domain.objects.CATSReferralStatus set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.RefMan.domain.objects.CATSReferralStatus set from the value object collection
extractCATSReferralStatusSet
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/RefMan/vo/domain/CatsReferralStatusLiteVoAssembler.java", "license": "agpl-3.0", "size": 15867 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,188,237
@Test public void testThatPathsAreNormalized() throws Exception { // more info: https://www.owasp.org/index.php/Path_Traversal List<String> notFoundUris = new ArrayList<>(); notFoundUris.add("/_plugin/dummy/../../../../../log4j.properties"); notFoundUris.add("/_plugin/dummy/../.....
void function() throws Exception { List<String> notFoundUris = new ArrayList<>(); notFoundUris.add(STR); notFoundUris.add(STR); notFoundUris.add(STR); notFoundUris.add(STR); notFoundUris.add(STR); notFoundUris.add(STR); notFoundUris.add(STR); notFoundUris.add(STR); for (String uri : notFoundUris) { HttpResponse respons...
/** * Test normalizing of path */
Test normalizing of path
testThatPathsAreNormalized
{ "repo_name": "zuoyebushiwo/ElasticSearch-Final", "path": "src/test/java/org/elasticsearch/plugins/SitePluginTests.java", "license": "apache-2.0", "size": 6467 }
[ "java.util.ArrayList", "java.util.List", "java.util.Locale", "org.elasticsearch.rest.RestStatus", "org.elasticsearch.test.rest.client.http.HttpResponse", "org.hamcrest.Matchers" ]
import java.util.ArrayList; import java.util.List; import java.util.Locale; import org.elasticsearch.rest.RestStatus; import org.elasticsearch.test.rest.client.http.HttpResponse; import org.hamcrest.Matchers;
import java.util.*; import org.elasticsearch.rest.*; import org.elasticsearch.test.rest.client.http.*; import org.hamcrest.*;
[ "java.util", "org.elasticsearch.rest", "org.elasticsearch.test", "org.hamcrest" ]
java.util; org.elasticsearch.rest; org.elasticsearch.test; org.hamcrest;
1,579,645
public Map<String,Declaration> getOuterDeclarations() { return Collections.emptyMap(); }
Map<String,Declaration> function() { return Collections.emptyMap(); }
/** * It is not possible to declare and export any variables, * so always return an empty map * * @see org.kie.rule.RuleConditionElement#getOuterDeclarations() */
It is not possible to declare and export any variables, so always return an empty map
getOuterDeclarations
{ "repo_name": "bxf12315/drools", "path": "drools-core/src/main/java/org/drools/core/rule/NamedConsequence.java", "license": "apache-2.0", "size": 3506 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,140,251
public final static String getTplPageListKey(NormalisedTitle title) { return title + ":tpages"; }
final static String function(NormalisedTitle title) { return title + STR; }
/** * Gets the key to store the list of pages using a template at. * * @param title the template title (including <tt>Template:</tt>) * * @return Scalaris key */
Gets the key to store the list of pages using a template at
getTplPageListKey
{ "repo_name": "scalaris-team/scalaris", "path": "contrib/wikipedia/src/de/zib/scalaris/examples/wikipedia/ScalarisDataHandlerNormalised.java", "license": "apache-2.0", "size": 21697 }
[ "de.zib.scalaris.examples.wikipedia.bliki.NormalisedTitle" ]
import de.zib.scalaris.examples.wikipedia.bliki.NormalisedTitle;
import de.zib.scalaris.examples.wikipedia.bliki.*;
[ "de.zib.scalaris" ]
de.zib.scalaris;
1,459,669
public void resetCards(Long[] ids) { long[] nonNew = Utils.arrayList2array(mCol.getDb().queryColumn(Long.class, String.format(Locale.US, "select id from cards where id in %s and (queue != 0 or type != 0)", Utils.ids2str(ids)), 0)); mCol.getDb().execute("update cards set reps=0, lapse...
void function(Long[] ids) { long[] nonNew = Utils.arrayList2array(mCol.getDb().queryColumn(Long.class, String.format(Locale.US, STR, Utils.ids2str(ids)), 0)); mCol.getDb().execute(STR + Utils.ids2str(nonNew)); forgetCards(nonNew); mCol.log((Object[]) ids); }
/** * Completely reset cards for export. */
Completely reset cards for export
resetCards
{ "repo_name": "agrueneberg/Anki-Android", "path": "AnkiDroid/src/main/java/com/ichi2/libanki/Sched.java", "license": "gpl-3.0", "size": 87234 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,586,536
public T xpath(String text, Map<String, String> namespaces) { return delegate.xpath(text, namespaces); }
T function(String text, Map<String, String> namespaces) { return delegate.xpath(text, namespaces); }
/** * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath * expression</a> with the specified set of namespace prefixes and URIs * * @param text the expression to be evaluated * @param namespaces the namespace prefix and URIs to use * @return the builder to continue processing...
Evaluates an XPath expression with the specified set of namespace prefixes and URIs
xpath
{ "repo_name": "dmvolod/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java", "license": "apache-2.0", "size": 39472 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,641,331
public boolean needsRedo(Transaction xact) throws StandardException { return true; } /** the default for prepared log is always null for all the operations that don't have optionalData. If an operation has optional data, the operation need to prepare the optional d...
boolean function(Transaction xact) throws StandardException { return true; } /** the default for prepared log is always null for all the operations that don't have optionalData. If an operation has optional data, the operation need to prepare the optional data for this method.
/** * Check if this operation needs to be redone during recovery redo. * Returns true if this op should be redone during recovery redo, * @param xact the transaction that is doing the rollback * @return true, if this operation needs to be redone during recovery. * @exception StandardException...
Check if this operation needs to be redone during recovery redo. Returns true if this op should be redone during recovery redo
needsRedo
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/store/raw/data/EncryptContainerUndoOperation.java", "license": "apache-2.0", "size": 5580 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.store.raw.Transaction" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.store.raw.Transaction;
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.store.raw.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
1,508,380
public final void setProperty(String name, final Object value) throws PropertyException { try { switch (name) { case XML.LOCALE: { locale = (value instanceof CharSequence) ? Locales.parse(value.toString()) : (Locale) value; return; ...
final void function(String name, final Object value) throws PropertyException { try { switch (name) { case XML.LOCALE: { locale = (value instanceof CharSequence) ? Locales.parse(value.toString()) : (Locale) value; return; } case XML.TIMEZONE: { timezone = (value instanceof CharSequence) ? TimeZone.getTimeZone(value.toS...
/** * A method which is common to both {@code Marshaller} and {@code Unmarshaller}. * It saves the initial state if it was not already done, but subclasses will * need to complete the work. */
A method which is common to both Marshaller and Unmarshaller. It saves the initial state if it was not already done, but subclasses will need to complete the work
setProperty
{ "repo_name": "Geomatys/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java", "license": "apache-2.0", "size": 23632 }
[ "java.util.ConcurrentModificationException", "java.util.HashMap", "java.util.IllformedLocaleException", "java.util.Locale", "java.util.Map", "java.util.TimeZone", "javax.xml.bind.PropertyException", "org.apache.sis.internal.jaxb.Context", "org.apache.sis.internal.jaxb.LegacyNamespaces", "org.apach...
import java.util.ConcurrentModificationException; import java.util.HashMap; import java.util.IllformedLocaleException; import java.util.Locale; import java.util.Map; import java.util.TimeZone; import javax.xml.bind.PropertyException; import org.apache.sis.internal.jaxb.Context; import org.apache.sis.internal.jaxb.Legac...
import java.util.*; import javax.xml.bind.*; import org.apache.sis.internal.jaxb.*; import org.apache.sis.internal.util.*; import org.apache.sis.util.*; import org.apache.sis.util.logging.*; import org.apache.sis.util.resources.*;
[ "java.util", "javax.xml", "org.apache.sis" ]
java.util; javax.xml; org.apache.sis;
1,979,407
Sentiment[] getAllSentiments();
Sentiment[] getAllSentiments();
/** * Returns an array of all sentiment classes. * * @return an array of all sentiment classes. */
Returns an array of all sentiment classes
getAllSentiments
{ "repo_name": "ckristo/AIC-WS2014-G4-T1-Sentimental-Analysis", "path": "src/main/java/at/ac/tuwien/infosys/dsg/aic/ws2014/g4/t1/service/ITwitterSentimentService.java", "license": "mit", "size": 2881 }
[ "at.ac.tuwien.infosys.dsg.aic.ws2014.g4.t1.classifier.ITwitterSentimentClassifier" ]
import at.ac.tuwien.infosys.dsg.aic.ws2014.g4.t1.classifier.ITwitterSentimentClassifier;
import at.ac.tuwien.infosys.dsg.aic.ws2014.g4.t1.classifier.*;
[ "at.ac.tuwien" ]
at.ac.tuwien;
1,787,407
void onContainerRequest(final AMRMClient.ContainerRequest... containerRequests);
void onContainerRequest(final AMRMClient.ContainerRequest... containerRequests);
/** * Enqueue a set of container requests with YARN. * * @param containerRequests set of container requests */
Enqueue a set of container requests with YARN
onContainerRequest
{ "repo_name": "markusweimer/incubator-reef", "path": "lang/java/reef-runtime-yarn/src/main/java/org/apache/reef/runtime/yarn/driver/YarnContainerRequestHandler.java", "license": "apache-2.0", "size": 1387 }
[ "org.apache.hadoop.yarn.client.api.AMRMClient" ]
import org.apache.hadoop.yarn.client.api.AMRMClient;
import org.apache.hadoop.yarn.client.api.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,812,735
public Iterator<Integer> iterator() { return new RangeIterator(); }
Iterator<Integer> function() { return new RangeIterator(); }
/** * The main puprose of a range object is to produce an Iterator. Since IntegerRange is iterable, it is useful with * the Tapestry Loop component, but also with the Java for loop! */
The main puprose of a range object is to produce an Iterator. Since IntegerRange is iterable, it is useful with the Tapestry Loop component, but also with the Java for loop
iterator
{ "repo_name": "agileowl/tapestry-5", "path": "tapestry-core/src/main/java/org/apache/tapestry5/internal/util/IntegerRange.java", "license": "apache-2.0", "size": 2967 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,518,895
public PurApLineDao getPurApLineDao() { return purApLineDao; }
PurApLineDao function() { return purApLineDao; }
/** * Gets the purApLineDao attribute. * * @return Returns the purApLineDao. */
Gets the purApLineDao attribute
getPurApLineDao
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/cab/document/service/impl/PurApLineServiceImpl.java", "license": "apache-2.0", "size": 62162 }
[ "org.kuali.kfs.module.cab.dataaccess.PurApLineDao" ]
import org.kuali.kfs.module.cab.dataaccess.PurApLineDao;
import org.kuali.kfs.module.cab.dataaccess.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,664,720
super.attachToRecyclerView(recyclerView); if (recyclerView != null && !(recyclerView.getLayoutManager() instanceof CardSliderLayoutManager)) { throw new InvalidParameterException("LayoutManager must be instance of CardSliderLayoutManager"); } this.recyclerView = recyclerView; }
super.attachToRecyclerView(recyclerView); if (recyclerView != null && !(recyclerView.getLayoutManager() instanceof CardSliderLayoutManager)) { throw new InvalidParameterException(STR); } this.recyclerView = recyclerView; }
/** * Attaches the {@link CardSnapHelper} to the provided RecyclerView, by calling * {@link RecyclerView#setOnFlingListener(RecyclerView.OnFlingListener)}. * You can call this method with {@code null} to detach it from the current RecyclerView. * * @param recyclerView The RecyclerView instance to which y...
Attaches the <code>CardSnapHelper</code> to the provided RecyclerView, by calling <code>RecyclerView#setOnFlingListener(RecyclerView.OnFlingListener)</code>. You can call this method with null to detach it from the current RecyclerView
attachToRecyclerView
{ "repo_name": "xoodle/frost", "path": "app/src/main/java/com/studentsearch/xoodle/studentsearch/cardslider/CardSnapHelper.java", "license": "mit", "size": 4888 }
[ "java.security.InvalidParameterException" ]
import java.security.InvalidParameterException;
import java.security.*;
[ "java.security" ]
java.security;
2,158,583
public PDFormFieldAdditionalActions getActions() { COSDictionary aa = dictionary.getCOSDictionary(COSName.AA); return aa != null ? new PDFormFieldAdditionalActions(aa) : null; }
PDFormFieldAdditionalActions function() { COSDictionary aa = dictionary.getCOSDictionary(COSName.AA); return aa != null ? new PDFormFieldAdditionalActions(aa) : null; }
/** * Get the additional actions for this field. This will return null if there * are no additional actions for this field. * * @return The actions of the field. */
Get the additional actions for this field. This will return null if there are no additional actions for this field
getActions
{ "repo_name": "kalaspuffar/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDField.java", "license": "apache-2.0", "size": 14926 }
[ "org.apache.pdfbox.cos.COSDictionary", "org.apache.pdfbox.cos.COSName", "org.apache.pdfbox.pdmodel.interactive.action.PDFormFieldAdditionalActions" ]
import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.pdmodel.interactive.action.PDFormFieldAdditionalActions;
import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.interactive.action.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,157,972
public Image pull(ImageReference reference, UpdateListener<PullImageUpdateEvent> listener, String registryAuth) throws IOException { Assert.notNull(reference, "Reference must not be null"); Assert.notNull(listener, "Listener must not be null"); URI createUri = buildUrl("/images/create", "fromImage", r...
Image function(ImageReference reference, UpdateListener<PullImageUpdateEvent> listener, String registryAuth) throws IOException { Assert.notNull(reference, STR); Assert.notNull(listener, STR); URI createUri = buildUrl(STR, STR, reference.toString()); DigestCaptureUpdateListener digestCapture = new DigestCaptureUpdateLi...
/** * Pull an image from a registry. * @param reference the image reference to pull * @param listener a pull listener to receive update events * @param registryAuth registry authentication credentials * @return the {@link ImageApi pulled image} instance * @throws IOException on IO error */
Pull an image from a registry
pull
{ "repo_name": "jxblum/spring-boot", "path": "spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/DockerApi.java", "license": "apache-2.0", "size": 15993 }
[ "java.io.IOException", "org.springframework.boot.buildpack.platform.docker.transport.HttpTransport", "org.springframework.boot.buildpack.platform.docker.type.Image", "org.springframework.boot.buildpack.platform.docker.type.ImageReference", "org.springframework.util.Assert" ]
import java.io.IOException; import org.springframework.boot.buildpack.platform.docker.transport.HttpTransport; import org.springframework.boot.buildpack.platform.docker.type.Image; import org.springframework.boot.buildpack.platform.docker.type.ImageReference; import org.springframework.util.Assert;
import java.io.*; import org.springframework.boot.buildpack.platform.docker.transport.*; import org.springframework.boot.buildpack.platform.docker.type.*; import org.springframework.util.*;
[ "java.io", "org.springframework.boot", "org.springframework.util" ]
java.io; org.springframework.boot; org.springframework.util;
952,651
@Override public TypedValue getZeroValue(TypeRef type) { // Don't call getTypeName; we don't need to import these. if (type.isMap()) { return TypedValue.create(new TypeName("Hash"), "{}"); } if (type.isRepeated()) { return TypedValue.create(new TypeName("Array"), "[]"); } if (PRI...
TypedValue function(TypeRef type) { if (type.isMap()) { return TypedValue.create(new TypeName("Hash"), "{}"); } if (type.isRepeated()) { return TypedValue.create(new TypeName("Array"), "[]"); } if (PRIMITIVE_ZERO_VALUE.containsKey(type.getKind())) { return TypedValue.create(getTypeName(type), PRIMITIVE_ZERO_VALUE.get(t...
/** * Returns the Ruby representation of a zero value for that type, to be used in code sample doc. */
Returns the Ruby representation of a zero value for that type, to be used in code sample doc
getZeroValue
{ "repo_name": "saicheems/toolkit", "path": "src/main/java/com/google/api/codegen/transformer/ruby/RubyModelTypeNameConverter.java", "license": "apache-2.0", "size": 6737 }
[ "com.google.api.codegen.util.TypeName", "com.google.api.codegen.util.TypedValue", "com.google.api.tools.framework.model.EnumValue", "com.google.api.tools.framework.model.TypeRef" ]
import com.google.api.codegen.util.TypeName; import com.google.api.codegen.util.TypedValue; import com.google.api.tools.framework.model.EnumValue; import com.google.api.tools.framework.model.TypeRef;
import com.google.api.codegen.util.*; import com.google.api.tools.framework.model.*;
[ "com.google.api" ]
com.google.api;
2,388,755
public ImageReader createReaderInstance() throws IOException { return createReaderInstance(null); }
ImageReader function() throws IOException { return createReaderInstance(null); }
/** * Returns an instance of the <code>ImageReader</code> * implementation associated with this service provider. * The returned object will initially be in an initial state * as if its <code>reset</code> method had been called. * * <p> The default implementation simply returns * <cod...
Returns an instance of the <code>ImageReader</code> implementation associated with this service provider. The returned object will initially be in an initial state as if its <code>reset</code> method had been called. The default implementation simply returns <code>createReaderInstance(null)</code>
createReaderInstance
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/javax/imageio/spi/ImageReaderSpi.java", "license": "gpl-2.0", "size": 18353 }
[ "java.io.IOException", "javax.imageio.ImageReader" ]
import java.io.IOException; import javax.imageio.ImageReader;
import java.io.*; import javax.imageio.*;
[ "java.io", "javax.imageio" ]
java.io; javax.imageio;
2,355,900
public boolean isSupportDtd() { return this.supportDtd; } /** * Indicates whether external XML entities are processed when unmarshalling. * <p>Default is {@code false}, meaning that external entities are not resolved. * Note that processing of external entities will only be enabled/disabled when the * {...
boolean function() { return this.supportDtd; } /** * Indicates whether external XML entities are processed when unmarshalling. * <p>Default is {@code false}, meaning that external entities are not resolved. * Note that processing of external entities will only be enabled/disabled when the * {@code Source} passed to {@l...
/** * Whether DTD parsing is supported. */
Whether DTD parsing is supported
isSupportDtd
{ "repo_name": "kingtang/spring-learn", "path": "spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java", "license": "gpl-3.0", "size": 36045 }
[ "javax.xml.transform.Source", "javax.xml.transform.dom.DOMSource", "javax.xml.transform.sax.SAXSource", "javax.xml.transform.stax.StAXSource", "javax.xml.transform.stream.StreamSource" ]
import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stax.StAXSource; import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.sax.*; import javax.xml.transform.stax.*; import javax.xml.transform.stream.*;
[ "javax.xml" ]
javax.xml;
2,824,557
public String getIdName(Field field, ID annotation);
String function(Field field, ID annotation);
/** * Return the ID/Key name to use * * @param field * the field from the bean * @param annotation * the id annotation * @return name to use for the field (cannot be null) */
Return the ID/Key name to use
getIdName
{ "repo_name": "Netflix/astyanax", "path": "astyanax-cassandra/src/main/java/com/netflix/astyanax/mapping/AnnotationSet.java", "license": "apache-2.0", "size": 1882 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,412,552
public static Note createNote(String rawJSON) throws FacebookException { try { JSONObject json = new JSONObject(rawJSON); return noteConstructor.newInstance(json); } catch (InstantiationException e) { throw new FacebookException(e); } catch (IllegalAccessE...
static Note function(String rawJSON) throws FacebookException { try { JSONObject json = new JSONObject(rawJSON); return noteConstructor.newInstance(json); } catch (InstantiationException e) { throw new FacebookException(e); } catch (IllegalAccessException e) { throw new AssertionError(e); } catch (InvocationTargetExcep...
/** * Constructs a Note object from rawJSON string. * * @param rawJSON raw JSON form as String * @return Note * @throws FacebookException when provided string is not a valid JSON string. */
Constructs a Note object from rawJSON string
createNote
{ "repo_name": "igorekpotworek/facebook4j", "path": "facebook4j-core/src/main/java/facebook4j/json/DataObjectFactory.java", "license": "apache-2.0", "size": 57208 }
[ "java.lang.reflect.InvocationTargetException" ]
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,594,043
public PropertyDescriptor getPropertyDescriptor(String propertyName) { final PropertyDescriptor propertyDescriptor = findPropertyDescriptor(propertyName); if (propertyDescriptor == null) { throw new PropertyNotFoundException(beanClass, propertyName); } return proper...
PropertyDescriptor function(String propertyName) { final PropertyDescriptor propertyDescriptor = findPropertyDescriptor(propertyName); if (propertyDescriptor == null) { throw new PropertyNotFoundException(beanClass, propertyName); } return propertyDescriptor; }
/** * Get the property descriptor for the named property. Throws an exception if the property does not exist. * * @param propertyName property name * @return the PropertyDescriptor for the named property * @throws PropertyNotFoundException if the named property does not exist on the bean *...
Get the property descriptor for the named property. Throws an exception if the property does not exist
getPropertyDescriptor
{ "repo_name": "mistraltechnologies/smog", "path": "src/main/java/com/mistraltech/smog/core/util/PropertyDescriptorLocator.java", "license": "bsd-3-clause", "size": 2391 }
[ "com.mistraltech.smog.core.PropertyNotFoundException", "java.beans.PropertyDescriptor" ]
import com.mistraltech.smog.core.PropertyNotFoundException; import java.beans.PropertyDescriptor;
import com.mistraltech.smog.core.*; import java.beans.*;
[ "com.mistraltech.smog", "java.beans" ]
com.mistraltech.smog; java.beans;
941,053
protected static boolean isDebugModeEnabled() { return java.lang.management.ManagementFactory.getRuntimeMXBean() .getInputArguments().toString().indexOf("-agentlib:jdwp") > 0; } /** * Applies the commit string to a given Root instance * * The commit string represents ...
static boolean function() { return java.lang.management.ManagementFactory.getRuntimeMXBean() .getInputArguments().toString().indexOf(STR) > 0; } /** * Applies the commit string to a given Root instance * * The commit string represents a sequence of operations, jsonp style: * * <p> * / + "test": { "a": { "id": STR }, "b...
/** * Check whether the test is running in debug mode. * * @return true if debug most is (most likely) enabled */
Check whether the test is running in debug mode
isDebugModeEnabled
{ "repo_name": "leftouterjoin/jackrabbit-oak", "path": "oak-core/src/test/java/org/apache/jackrabbit/oak/query/AbstractQueryTest.java", "license": "apache-2.0", "size": 21411 }
[ "org.apache.jackrabbit.oak.api.Root" ]
import org.apache.jackrabbit.oak.api.Root;
import org.apache.jackrabbit.oak.api.*;
[ "org.apache.jackrabbit" ]
org.apache.jackrabbit;
2,843,085
@Test public void testStandbyDispatcherJobExecution() throws Exception { try (final TestingHighAvailabilityServices haServices1 = new TestingHighAvailabilityServices(); final TestingHighAvailabilityServices haServices2 = new TestingHighAvailabilityServices(); final CuratorFramework curatorFramework = ZooKee...
void function() throws Exception { try (final TestingHighAvailabilityServices haServices1 = new TestingHighAvailabilityServices(); final TestingHighAvailabilityServices haServices2 = new TestingHighAvailabilityServices(); final CuratorFramework curatorFramework = ZooKeeperUtils.startCuratorFramework(configuration)) { f...
/** * Tests that a standby Dispatcher does not interfere with the clean up of a completed * job. */
Tests that a standby Dispatcher does not interfere with the clean up of a completed job
testStandbyDispatcherJobExecution
{ "repo_name": "mylog00/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/ZooKeeperHADispatcherTest.java", "license": "apache-2.0", "size": 13803 }
[ "java.util.UUID", "java.util.concurrent.CompletableFuture", "org.apache.curator.framework.CuratorFramework", "org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph", "org.apache.flink.runtime.highavailability.TestingHighAvailabilityServices", "org.apache.flink.runtime.jobgraph.JobGraph", "org.a...
import java.util.UUID; import java.util.concurrent.CompletableFuture; import org.apache.curator.framework.CuratorFramework; import org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph; import org.apache.flink.runtime.highavailability.TestingHighAvailabilityServices; import org.apache.flink.runtime.jobgraph.Jo...
import java.util.*; import java.util.concurrent.*; import org.apache.curator.framework.*; import org.apache.flink.runtime.executiongraph.*; import org.apache.flink.runtime.highavailability.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.jobmanager.*; import org.apache.flink.runtime.jobmas...
[ "java.util", "org.apache.curator", "org.apache.flink", "org.hamcrest", "org.junit" ]
java.util; org.apache.curator; org.apache.flink; org.hamcrest; org.junit;
158,563
@Override public boolean equals (final Object obj) { return (obj == this) ? true : (obj instanceof User) && Objects.equals (this.getUsername (), ((User) obj).getUsername ()); }
boolean function (final Object obj) { return (obj == this) ? true : (obj instanceof User) && Objects.equals (this.getUsername (), ((User) obj).getUsername ()); }
/** * Compare two <code>User</code> instances to determine if they are * equal. The <code>User</code> instances are compared based upon the * this ID number and the username. * * @param obj The <code>User</code> instance to compare to the one * represented by the called instance * @return ...
Compare two <code>User</code> instances to determine if they are equal. The <code>User</code> instances are compared based upon the this ID number and the username
equals
{ "repo_name": "jestark/LMSDataHarvester", "path": "src/main/java/ca/uoguelph/socs/icc/edm/domain/User.java", "license": "gpl-3.0", "size": 33949 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
900,385
@Override public void sessionClosed(IoSession session) throws Exception { try { resourceLock.lock(); if ( log.isDebugEnabled() ) { log.debug("session has been closed. "); } } finally { resourceLock.unlock(); } }
void function(IoSession session) throws Exception { try { resourceLock.lock(); if ( log.isDebugEnabled() ) { log.debug(STR); } } finally { resourceLock.unlock(); } }
/** * Session closed */
Session closed
sessionClosed
{ "repo_name": "wangqi/gameserver", "path": "server/src/main/java/com/xinqihd/sns/gameserver/transport/GameClient.java", "license": "apache-2.0", "size": 7010 }
[ "org.apache.mina.core.session.IoSession" ]
import org.apache.mina.core.session.IoSession;
import org.apache.mina.core.session.*;
[ "org.apache.mina" ]
org.apache.mina;
1,892,621
protected void putChildrenInto(StringBuilder sb) { Node node; for (SimpleNodeIterator e = children (); e.hasMoreNodes ();) { node = e.nextNode (); // eliminate virtual tags // if (!(node.getStartPosition () == node.getEndPosition ())) sb...
void function(StringBuilder sb) { Node node; for (SimpleNodeIterator e = children (); e.hasMoreNodes ();) { node = e.nextNode (); sb.append (node.toHtml ()); } }
/** * Add the textual contents of the children of this node to the buffer. * @param sb The buffer to append to. */
Add the textual contents of the children of this node to the buffer
putChildrenInto
{ "repo_name": "bbossgroups/bbossgroups-3.5", "path": "bboss-htmlparser/src/org/htmlparser/tags/CompositeTag.java", "license": "apache-2.0", "size": 21445 }
[ "org.htmlparser.Node", "org.htmlparser.util.SimpleNodeIterator" ]
import org.htmlparser.Node; import org.htmlparser.util.SimpleNodeIterator;
import org.htmlparser.*; import org.htmlparser.util.*;
[ "org.htmlparser", "org.htmlparser.util" ]
org.htmlparser; org.htmlparser.util;
2,546,956
SimpleVersionedSerializer<CommitRecoverable> getCommitRecoverableSerializer();
SimpleVersionedSerializer<CommitRecoverable> getCommitRecoverableSerializer();
/** * The serializer for the CommitRecoverable types created in this writer. * This serializer should be used to store the CommitRecoverable in checkpoint * state or other forms of persistent state. */
The serializer for the CommitRecoverable types created in this writer. This serializer should be used to store the CommitRecoverable in checkpoint state or other forms of persistent state
getCommitRecoverableSerializer
{ "repo_name": "jinglining/flink", "path": "flink-core/src/main/java/org/apache/flink/core/fs/RecoverableWriter.java", "license": "apache-2.0", "size": 9235 }
[ "org.apache.flink.core.io.SimpleVersionedSerializer" ]
import org.apache.flink.core.io.SimpleVersionedSerializer;
import org.apache.flink.core.io.*;
[ "org.apache.flink" ]
org.apache.flink;
2,714,577
public static CacheBuilderSpec parse(String cacheBuilderSpecification) { CacheBuilderSpec spec = new CacheBuilderSpec(cacheBuilderSpecification); if (!cacheBuilderSpecification.isEmpty()) { for (String keyValuePair : KEYS_SPLITTER.split(cacheBuilderSpecification)) { List<String> keyAndValue = Im...
static CacheBuilderSpec function(String cacheBuilderSpecification) { CacheBuilderSpec spec = new CacheBuilderSpec(cacheBuilderSpecification); if (!cacheBuilderSpecification.isEmpty()) { for (String keyValuePair : KEYS_SPLITTER.split(cacheBuilderSpecification)) { List<String> keyAndValue = ImmutableList.copyOf(KEY_VALUE...
/** * Creates a CacheBuilderSpec from a string. * * @param cacheBuilderSpecification the string form */
Creates a CacheBuilderSpec from a string
parse
{ "repo_name": "trivium-io/trivium-core", "path": "src/io/trivium/dep/com/google/common/cache/CacheBuilderSpec.java", "license": "apache-2.0", "size": 17945 }
[ "io.trivium.dep.com.google.common.base.Preconditions", "io.trivium.dep.com.google.common.collect.ImmutableList", "java.util.List" ]
import io.trivium.dep.com.google.common.base.Preconditions; import io.trivium.dep.com.google.common.collect.ImmutableList; import java.util.List;
import io.trivium.dep.com.google.common.base.*; import io.trivium.dep.com.google.common.collect.*; import java.util.*;
[ "io.trivium.dep", "java.util" ]
io.trivium.dep; java.util;
205,186
private boolean fixSms(SmsToFix sms) { try { Cursor cur = findSmsInDb(sms); return updateSmsInDB(cur, sms); } catch (SmsNotFoundException se) { Log.w(TAG, "SMS not found in DB: " + se.getMessage()); SD.log("SmsTimeFixService [WorkerThread]: SMS not found in DB: " + se.getMessage()); ...
boolean function(SmsToFix sms) { try { Cursor cur = findSmsInDb(sms); return updateSmsInDB(cur, sms); } catch (SmsNotFoundException se) { Log.w(TAG, STR + se.getMessage()); SD.log(STR + se.getMessage()); return false; } catch (SmsFixException e) { Log.w(TAG, STR, e); SD.log(STR + e + STR + e.getMessage()); return false...
/** * Fixes a single sms * * @param sms * @return <code>true</code> if SMS could be found and fixed, * <code>false</code> otherwise */
Fixes a single sms
fixSms
{ "repo_name": "johnzweng/SMSSentTime", "path": "src/at/zweng/smssenttimefix/SmsTimeFixService.java", "license": "gpl-3.0", "size": 19424 }
[ "android.database.Cursor", "android.util.Log" ]
import android.database.Cursor; import android.util.Log;
import android.database.*; import android.util.*;
[ "android.database", "android.util" ]
android.database; android.util;
1,611,100
protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : graphixPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstr...
Collection<String> function() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : graphixPackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()...
/** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Returns the names of the types that can be created as the root object.
getInitialObjectNames
{ "repo_name": "xpomul/cdo-xtext", "path": "examples/net.winklerweb.cdoxtext.example.graphix.editor/src/net/winklerweb/cdoxtext/example/graphix/presentation/GraphixModelWizard.java", "license": "epl-1.0", "size": 18176 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "org.eclipse.emf.common.CommonPlugin", "org.eclipse.emf.ecore.EClass", "org.eclipse.emf.ecore.EClassifier" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import org.eclipse.emf.common.CommonPlugin; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier;
import java.util.*; import org.eclipse.emf.common.*; import org.eclipse.emf.ecore.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
2,075,837
public static ResultSetConversionStrategy fromName(String name) { if (name == null) { return null; } if (name.equals("ALL")) { return ResultSetConversionStrategies.all(); } if (name.equals("ONE")) { return ResultSetConversionStrategies.one(...
static ResultSetConversionStrategy function(String name) { if (name == null) { return null; } if (name.equals("ALL")) { return ResultSetConversionStrategies.all(); } if (name.equals("ONE")) { return ResultSetConversionStrategies.one(); } Matcher matcher = LIMIT_NAME_PATTERN.matcher(name); if (matcher.matches()) { int l...
/** * Get {@link ResultSetConversionStrategy} from String */
Get <code>ResultSetConversionStrategy</code> from String
fromName
{ "repo_name": "CodeSmell/camel", "path": "components/camel-cassandraql/src/main/java/org/apache/camel/component/cassandra/ResultSetConversionStrategies.java", "license": "apache-2.0", "size": 3719 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,314,782
private List<CommentRow> generateCommentRows(StudentAttributes student, InstructorAttributes instructor, String giverEmail, int totalNumOfComments, List<CommentAttributes> comments) { List<CommentRow> commentDivs = new ArrayList<CommentRow>(); for (CommentAttributes comment : co...
List<CommentRow> function(StudentAttributes student, InstructorAttributes instructor, String giverEmail, int totalNumOfComments, List<CommentAttributes> comments) { List<CommentRow> commentDivs = new ArrayList<CommentRow>(); for (CommentAttributes comment : comments) { String recipientDetails = student.name + STR + stu...
/** * Generates the comment rows for a specific giver, * based on the current instructor's privilege to modify comments. * @param student * @param instructor * @param giverEmail * @param totalNumOfComments * @param comments * @return A list of comment rows for comments from giver...
Generates the comment rows for a specific giver, based on the current instructor's privilege to modify comments
generateCommentRows
{ "repo_name": "belyabl9/teammates", "path": "src/main/java/teammates/ui/controller/InstructorStudentRecordsPageData.java", "license": "gpl-2.0", "size": 6363 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
451,664
public CallHandle lookupLdapAuthExperimenter(SecurityContext ctx, long userID, AgentEventListener observer);
CallHandle function(SecurityContext ctx, long userID, AgentEventListener observer);
/** * Changes the default group of the specified user or <code>null</code>. * * @param ctx The security context. * @param userID The identifier of the user to handle. * @param observer Call-back handler. * @return A handle that can be used to cancel the call. */
Changes the default group of the specified user or <code>null</code>
lookupLdapAuthExperimenter
{ "repo_name": "dominikl/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/views/AdminView.java", "license": "gpl-2.0", "size": 9346 }
[ "org.openmicroscopy.shoola.env.event.AgentEventListener" ]
import org.openmicroscopy.shoola.env.event.AgentEventListener;
import org.openmicroscopy.shoola.env.event.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
2,784,856
public static byte[] utf8Encode(CharSequence string) { try { ByteBuffer bytes = UTF8.newEncoder().encode(CharBuffer.wrap(string)); byte[] bytesCopy = new byte[bytes.limit()]; System.arraycopy(bytes.array(), 0, bytesCopy, 0, bytes.limit()); return bytesCopy; } catch (CharacterCodingException e) { ...
static byte[] function(CharSequence string) { try { ByteBuffer bytes = UTF8.newEncoder().encode(CharBuffer.wrap(string)); byte[] bytesCopy = new byte[bytes.limit()]; System.arraycopy(bytes.array(), 0, bytesCopy, 0, bytes.limit()); return bytesCopy; } catch (CharacterCodingException e) { throw new RuntimeException(e); }...
/** * UTF-8 encoding/decoding. Using a charset rather than `String.getBytes` is less forgiving * and will raise an exception for invalid data. */
UTF-8 encoding/decoding. Using a charset rather than `String.getBytes` is less forgiving and will raise an exception for invalid data
utf8Encode
{ "repo_name": "jgrandja/spring-security-oauth", "path": "spring-security-jwt/src/main/java/org/springframework/security/jwt/codec/Codecs.java", "license": "apache-2.0", "size": 5197 }
[ "java.nio.ByteBuffer", "java.nio.CharBuffer", "java.nio.charset.CharacterCodingException" ]
import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.CharacterCodingException;
import java.nio.*; import java.nio.charset.*;
[ "java.nio" ]
java.nio;
664,341
public void setSeconds(int seconds) { setData1(Convert.toByte(seconds)); }
void function(int seconds) { setData1(Convert.toByte(seconds)); }
/** * Sets the Faderate * * @param seconds * Faderate in Seconds */
Sets the Faderate
setSeconds
{ "repo_name": "openhab/openhab", "path": "bundles/binding/org.openhab.binding.plcbus/src/main/java/org/openhab/binding/plcbus/internal/protocol/commands/Bright.java", "license": "epl-1.0", "size": 1150 }
[ "org.openhab.binding.plcbus.internal.protocol.Convert" ]
import org.openhab.binding.plcbus.internal.protocol.Convert;
import org.openhab.binding.plcbus.internal.protocol.*;
[ "org.openhab.binding" ]
org.openhab.binding;
1,809,318
List<OntologyTerm> findExcatOntologyTerms(List<String> ontologyIds, Set<String> terms, int pageSize);
List<OntologyTerm> findExcatOntologyTerms(List<String> ontologyIds, Set<String> terms, int pageSize);
/** * Finds ontology terms that are exact matches to a certain search string. * * @param ontologies * {@link Ontology}s to search in * @param search * search term * @param pageSize * number of results to return. * @return List of {@link OntologyTerm}s that match the s...
Finds ontology terms that are exact matches to a certain search string
findExcatOntologyTerms
{ "repo_name": "joerivandervelde/molgenis", "path": "molgenis-ontology-core/src/main/java/org/molgenis/ontology/core/service/OntologyService.java", "license": "lgpl-3.0", "size": 2438 }
[ "java.util.List", "java.util.Set", "org.molgenis.ontology.core.model.OntologyTerm" ]
import java.util.List; import java.util.Set; import org.molgenis.ontology.core.model.OntologyTerm;
import java.util.*; import org.molgenis.ontology.core.model.*;
[ "java.util", "org.molgenis.ontology" ]
java.util; org.molgenis.ontology;
2,094,138
SysUser user = sysUserCache.getByKey(USER_KEY + username); if (user == null) { user = userService.findByUsername(username); if (user == null) { return null; } SysUser saveUser = new SysUser(); BeanCopier copier = BeanCopier.create(user.getClass(), saveUser.getClass(), false); copier.c...
SysUser user = sysUserCache.getByKey(USER_KEY + username); if (user == null) { user = userService.findByUsername(username); if (user == null) { return null; } SysUser saveUser = new SysUser(); BeanCopier copier = BeanCopier.create(user.getClass(), saveUser.getClass(), false); copier.copy(user, saveUser, null); Set<SysR...
/** * Get user object according given user name. * * @param username * unique user name. * @return user object or null. */
Get user object according given user name
getCacheByUsername
{ "repo_name": "zpxocivuby/freetong_mobile_server", "path": "itaf-aggregator/itaf-cache/src/main/java/itaf/framework/cache/business/service/impl/EhCacheUserServiceImpl.java", "license": "gpl-3.0", "size": 2181 }
[ "java.util.HashSet", "java.util.Set", "net.sf.cglib.beans.BeanCopier" ]
import java.util.HashSet; import java.util.Set; import net.sf.cglib.beans.BeanCopier;
import java.util.*; import net.sf.cglib.beans.*;
[ "java.util", "net.sf.cglib" ]
java.util; net.sf.cglib;
814,103
public Index getIndexForColumn(Column column, boolean first) { ArrayList<Index> indexes = getIndexes(); if (indexes != null) { for (int i = 1, size = indexes.size(); i < size; i++) { Index index = indexes.get(i); if (index.canGetFirstOrLast()) { ...
Index function(Column column, boolean first) { ArrayList<Index> indexes = getIndexes(); if (indexes != null) { for (int i = 1, size = indexes.size(); i < size; i++) { Index index = indexes.get(i); if (index.canGetFirstOrLast()) { int idx = index.getColumnIndex(column); if (idx == 0) { return index; } } } } return null;...
/** * Get the index that has the given column as the first element. * This method returns null if no matching index is found. * * @param column the column * @param first if the min value should be returned * @return the index or null */
Get the index that has the given column as the first element. This method returns null if no matching index is found
getIndexForColumn
{ "repo_name": "titus08/frostwire-desktop", "path": "lib/jars-src/h2-1.3.164/org/h2/table/Table.java", "license": "gpl-3.0", "size": 32549 }
[ "java.util.ArrayList", "org.h2.index.Index" ]
import java.util.ArrayList; import org.h2.index.Index;
import java.util.*; import org.h2.index.*;
[ "java.util", "org.h2.index" ]
java.util; org.h2.index;
491,804
public Set<String> getAllNodesUrls() { HashSet<String> nodesUrls = new HashSet<>(size() + (extraNodes != null ? extraNodes.size() : 0)); addNodesToUrlsSet(nodesUrls, this); if (extraNodes != null) { addNodesToUrlsSet(nodesUrls, extraNodes); } return nodesUrls; ...
Set<String> function() { HashSet<String> nodesUrls = new HashSet<>(size() + (extraNodes != null ? extraNodes.size() : 0)); addNodesToUrlsSet(nodesUrls, this); if (extraNodes != null) { addNodesToUrlsSet(nodesUrls, extraNodes); } return nodesUrls; }
/** * Returns a set containing all nodes urls (standard + extra) included in this node set * * @return set of urls */
Returns a set containing all nodes urls (standard + extra) included in this node set
getAllNodesUrls
{ "repo_name": "ShatalovYaroslav/scheduling", "path": "rm/rm-client/src/main/java/org/ow2/proactive/utils/NodeSet.java", "license": "agpl-3.0", "size": 4341 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,767,236
public static BindException bindAndValidate(ServletRequest request, Object object, String objectName, Validator validator) { BindException binder = bind(request, object, objectName); ValidationUtils.invokeValidator(validator, object, binder); return binder; }
static BindException function(ServletRequest request, Object object, String objectName, Validator validator) { BindException binder = bind(request, object, objectName); ValidationUtils.invokeValidator(validator, object, binder); return binder; }
/** * Bind the parameters from the given request to the given object, * invoking the given validator. * @param request request containing the parameters * @param object object to bind the parameters to * @param objectName name of the bind object * @param validator validator to be invoked, or null if no vali...
Bind the parameters from the given request to the given object, invoking the given validator
bindAndValidate
{ "repo_name": "dachengxi/spring1.1.1_source", "path": "src/org/springframework/web/bind/BindUtils.java", "license": "mit", "size": 4323 }
[ "javax.servlet.ServletRequest", "org.springframework.validation.BindException", "org.springframework.validation.ValidationUtils", "org.springframework.validation.Validator" ]
import javax.servlet.ServletRequest; import org.springframework.validation.BindException; import org.springframework.validation.ValidationUtils; import org.springframework.validation.Validator;
import javax.servlet.*; import org.springframework.validation.*;
[ "javax.servlet", "org.springframework.validation" ]
javax.servlet; org.springframework.validation;
1,256,529
private void checkTreeUsingPotentialNodes() throws DatabaseException { DatabaseImpl database = DbInternal.dbGetDatabaseImpl(db); Tree tree = database.getTree(); IN inAB = new IN(database, "ab".getBytes(), 4, 2); checkPotential(tree, inAB, firstLevel2IN); ...
void function() throws DatabaseException { DatabaseImpl database = DbInternal.dbGetDatabaseImpl(db); Tree tree = database.getTree(); IN inAB = new IN(database, "ab".getBytes(), 4, 2); checkPotential(tree, inAB, firstLevel2IN); BIN binAB = new BIN(database, "ab".getBytes(), 4, 1); checkPotential(tree, binAB, firstLevel2...
/** * Make up non-existent nodes and see where they'd fit in. This exercises * recovery type processing and cleaning. */
Make up non-existent nodes and see where they'd fit in. This exercises recovery type processing and cleaning
checkTreeUsingPotentialNodes
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/je-3.2.74/test/com/sleepycat/je/tree/GetParentNodeTest.java", "license": "gpl-2.0", "size": 16710 }
[ "com.sleepycat.je.DatabaseException", "com.sleepycat.je.DbInternal", "com.sleepycat.je.dbi.DatabaseImpl" ]
import com.sleepycat.je.DatabaseException; import com.sleepycat.je.DbInternal; import com.sleepycat.je.dbi.DatabaseImpl;
import com.sleepycat.je.*; import com.sleepycat.je.dbi.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
437,070
static TableChange addColumn( String[] fieldNames, DataType dataType, boolean isNullable, String comment, ColumnPosition position) { return new AddColumn(fieldNames, dataType, isNullable, comment, position); }
static TableChange addColumn( String[] fieldNames, DataType dataType, boolean isNullable, String comment, ColumnPosition position) { return new AddColumn(fieldNames, dataType, isNullable, comment, position); }
/** * Create a TableChange for adding a column. * <p> * If the field already exists, the change will result in an {@link IllegalArgumentException}. * If the new field is nested and its parent does not exist or is not a struct, the change will * result in an {@link IllegalArgumentException}. * * @pa...
Create a TableChange for adding a column. If the field already exists, the change will result in an <code>IllegalArgumentException</code>. If the new field is nested and its parent does not exist or is not a struct, the change will result in an <code>IllegalArgumentException</code>
addColumn
{ "repo_name": "darionyaphet/spark", "path": "sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/TableChange.java", "license": "apache-2.0", "size": 20108 }
[ "org.apache.spark.sql.types.DataType" ]
import org.apache.spark.sql.types.DataType;
import org.apache.spark.sql.types.*;
[ "org.apache.spark" ]
org.apache.spark;
157,760
public static synchronized void checkBouncyCastleDeprecation(Provider provider, String service, String algorithm) throws NoSuchAlgorithmException { // Applications may install their own BC provider, only the algorithms from the system // provider are deprecated. if (provider == S...
static synchronized void function(Provider provider, String service, String algorithm) throws NoSuchAlgorithmException { if (provider == SYSTEM_BOUNCY_CASTLE_PROVIDER) { checkBouncyCastleDeprecation(service, algorithm); } } private static final Set<String> DEPRECATED_ALGORITHMS = new HashSet<String>(); static { DEPRECA...
/** * Checks if the given provider is the system-installed Bouncy Castle provider. If so, * throws {@code NoSuchAlgorithmException} if the algorithm being requested is deprecated * and the application targets a late-enough API level. * * @hide */
Checks if the given provider is the system-installed Bouncy Castle provider. If so, throws NoSuchAlgorithmException if the algorithm being requested is deprecated and the application targets a late-enough API level
checkBouncyCastleDeprecation
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/ojluni/src/main/java/sun/security/jca/Providers.java", "license": "gpl-2.0", "size": 16234 }
[ "java.security.NoSuchAlgorithmException", "java.security.Provider", "java.util.Arrays", "java.util.HashSet", "java.util.Set" ]
import java.security.NoSuchAlgorithmException; import java.security.Provider; import java.util.Arrays; import java.util.HashSet; import java.util.Set;
import java.security.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
860,199
public Cancellable getRollupCapabilitiesAsync(GetRollupCapsRequest request, RequestOptions options, ActionListener<GetRollupCapsResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, RollupRequestConverters::g...
Cancellable function(GetRollupCapsRequest request, RequestOptions options, ActionListener<GetRollupCapsResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, RollupRequestConverters::getRollupCaps, options, GetRollupCapsResponse::fromXContent, listener, Collections.emptySet()); }
/** * Asynchronously Get the Rollup Capabilities of a target (non-rollup) index or pattern * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html"> * the docs</a> for more. * @param request the request * @param options the request options (e.g. header...
Asynchronously Get the Rollup Capabilities of a target (non-rollup) index or pattern See the docs for more
getRollupCapabilitiesAsync
{ "repo_name": "ern/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/RollupClient.java", "license": "apache-2.0", "size": 16558 }
[ "java.util.Collections", "org.elasticsearch.action.ActionListener", "org.elasticsearch.client.rollup.GetRollupCapsRequest", "org.elasticsearch.client.rollup.GetRollupCapsResponse" ]
import java.util.Collections; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.rollup.GetRollupCapsRequest; import org.elasticsearch.client.rollup.GetRollupCapsResponse;
import java.util.*; import org.elasticsearch.action.*; import org.elasticsearch.client.rollup.*;
[ "java.util", "org.elasticsearch.action", "org.elasticsearch.client" ]
java.util; org.elasticsearch.action; org.elasticsearch.client;
1,147,381
@Override public Schema outputSchema(Schema input){ try { Schema.FieldSchema inputFieldSchema = input.getField(0); if (inputFieldSchema.type != DataType.BAG){ throw new RuntimeException("Expected a BAG as input"); } Schema inputBagSchema = inputFieldSchema.schema; if (inputBagSchema.getField(0)...
Schema function(Schema input){ try { Schema.FieldSchema inputFieldSchema = input.getField(0); if (inputFieldSchema.type != DataType.BAG){ throw new RuntimeException(STR); } Schema inputBagSchema = inputFieldSchema.schema; if (inputBagSchema.getField(0).type != DataType.TUPLE){ throw new RuntimeException(String.format(S...
/** * The output schema of AEM UDF. * Bag in bag out. But the output bag elements are appended by an activityID. */
The output schema of AEM UDF. Bag in bag out. But the output bag elements are appended by an activityID
outputSchema
{ "repo_name": "caesar0301/piggybox", "path": "src/main/java/com/piggybox/omnilab/aem/LabelActivity.java", "license": "gpl-2.0", "size": 5251 }
[ "org.apache.pig.data.DataType", "org.apache.pig.impl.logicalLayer.FrontendException", "org.apache.pig.impl.logicalLayer.schema.Schema" ]
import org.apache.pig.data.DataType; import org.apache.pig.impl.logicalLayer.FrontendException; import org.apache.pig.impl.logicalLayer.schema.Schema;
import org.apache.pig.data.*; import org.apache.pig.impl.*;
[ "org.apache.pig" ]
org.apache.pig;
1,991,987
public static Map<BlockStoreLocation, List<Long>> generateBlockIdOnTiers( Map<TierAlias, List<Integer>> tiersConfig) { Map<BlockStoreLocation, List<Long>> blockMap = new HashMap<>(); long blockIdStart = Long.MAX_VALUE; for (Map.Entry<TierAlias, List<Integer>> tierConfig : tiersConfig.entrySet()...
static Map<BlockStoreLocation, List<Long>> function( Map<TierAlias, List<Integer>> tiersConfig) { Map<BlockStoreLocation, List<Long>> blockMap = new HashMap<>(); long blockIdStart = Long.MAX_VALUE; for (Map.Entry<TierAlias, List<Integer>> tierConfig : tiersConfig.entrySet()) { List<Integer> dirConfigs = tierConfig.getV...
/** * Generates block IDs according to the storage tier/dir setup. * In order to avoid block ID colliding with existing blocks, this will generate IDs * decreasingly from the {@link Long#MAX_VALUE}. * * @param tiersConfig the tier/dir block counts * @return a map of location to generated block lists ...
Generates block IDs according to the storage tier/dir setup. In order to avoid block ID colliding with existing blocks, this will generate IDs decreasingly from the <code>Long#MAX_VALUE</code>
generateBlockIdOnTiers
{ "repo_name": "wwjiang007/alluxio", "path": "stress/shell/src/main/java/alluxio/stress/cli/RpcBenchPreparationUtils.java", "license": "apache-2.0", "size": 8068 }
[ "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
6,949
public static List<Object> extractRawValues(String path, Map<String, Object> map) { List<Object> values = new ArrayList<>(); String[] pathElements = path.split("\\."); if (pathElements.length == 0) { return values; } extractRawValues(values, map, pathElements, 0);...
static List<Object> function(String path, Map<String, Object> map) { List<Object> values = new ArrayList<>(); String[] pathElements = path.split("\\."); if (pathElements.length == 0) { return values; } extractRawValues(values, map, pathElements, 0); return values; }
/** * Extracts raw values (string, int, and so on) based on the path provided returning all of them * as a single list. */
Extracts raw values (string, int, and so on) based on the path provided returning all of them as a single list
extractRawValues
{ "repo_name": "gingerwizard/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/xcontent/support/XContentMapValues.java", "license": "apache-2.0", "size": 19870 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
611,837
private void ensureContent() { if (mContentContainer != null && mProgressContainer != null) { return; } View root = getView(); if (root == null) { throw new IllegalStateException("Content view not yet created"); } mProgressContainer = root.find...
void function() { if (mContentContainer != null && mProgressContainer != null) { return; } View root = getView(); if (root == null) { throw new IllegalStateException(STR); } mProgressContainer = root.findViewById(R.id.progress_container); if (mProgressContainer == null) { throw new RuntimeException(STR); } mContentCont...
/** * Initialization views. */
Initialization views
ensureContent
{ "repo_name": "mthli/Geeky", "path": "src/Geeky/src/com/devspark/progressfragment/ProgressFragment.java", "license": "apache-2.0", "size": 11367 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,591,286
public void purgeChannel(Integer channelId) throws SQLException { synchronized (this) { if (channelIds.contains(channelId)) { psDeleteMessagesByChannelId.setInt(1, channelId); psDeleteMessagesByChannelId.execute(); psDeleteChannel.setInt(1, channelId); psDeleteChannel.execute(); ch...
void function(Integer channelId) throws SQLException { synchronized (this) { if (channelIds.contains(channelId)) { psDeleteMessagesByChannelId.setInt(1, channelId); psDeleteMessagesByChannelId.execute(); psDeleteChannel.setInt(1, channelId); psDeleteChannel.execute(); channelIds.remove(channelId); } } }
/** * Deletes all entries from given channelId from database. * * @param channelId * @throws SQLException */
Deletes all entries from given channelId from database
purgeChannel
{ "repo_name": "ccgreen13/zap-extensions", "path": "src/org/zaproxy/zap/extension/websocket/db/TableWebSocket.java", "license": "apache-2.0", "size": 24833 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,125,513
protected final void reportUnclosedStringLiteral() { final ISourceLocation location = getCurrentSourceLocation(0); final ICompilerProblem problem = new StringLiteralNotClosedProblem(location); getProblems().add(problem); }
final void function() { final ISourceLocation location = getCurrentSourceLocation(0); final ICompilerProblem problem = new StringLiteralNotClosedProblem(location); getProblems().add(problem); }
/** * Report syntax error: input ended before reaching the closing quotation * mark for a string literal. */
Report syntax error: input ended before reaching the closing quotation mark for a string literal
reportUnclosedStringLiteral
{ "repo_name": "adufilie/flex-falcon", "path": "compiler/src/org/apache/flex/compiler/internal/parsing/as/BaseRawASTokenizer.java", "license": "apache-2.0", "size": 10908 }
[ "org.apache.flex.compiler.common.ISourceLocation", "org.apache.flex.compiler.problems.ICompilerProblem", "org.apache.flex.compiler.problems.StringLiteralNotClosedProblem" ]
import org.apache.flex.compiler.common.ISourceLocation; import org.apache.flex.compiler.problems.ICompilerProblem; import org.apache.flex.compiler.problems.StringLiteralNotClosedProblem;
import org.apache.flex.compiler.common.*; import org.apache.flex.compiler.problems.*;
[ "org.apache.flex" ]
org.apache.flex;
45,323
public BlobContainerInner withMetadata(Map<String, String> metadata) { this.metadata = metadata; return this; }
BlobContainerInner function(Map<String, String> metadata) { this.metadata = metadata; return this; }
/** * Set a name-value pair to associate with the container as metadata. * * @param metadata the metadata value to set * @return the BlobContainerInner object itself. */
Set a name-value pair to associate with the container as metadata
withMetadata
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/storage/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/storage/v2019_06_01/implementation/BlobContainerInner.java", "license": "mit", "size": 7633 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,602,107
public void menuAboutToShow(IMenuManager menuManager) { ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); }
void function(IMenuManager menuManager) { ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); }
/** * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This implements <code>org.eclipse.jface.action.IMenuListener</code> to help fill the context menus with contributions from the Edit menu.
menuAboutToShow
{ "repo_name": "darvasd/gsoaarchitect", "path": "hu.bme.mit.inf.gs.dsl.editor/src/soamodel/presentation/SoamodelEditor.java", "license": "mit", "size": 54519 }
[ "org.eclipse.jface.action.IMenuListener", "org.eclipse.jface.action.IMenuManager" ]
import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,570,966
public static int insertProviderAt(Provider provider, int position) { int size = providers.size(); if ((position < 1) || (position > size)) { position = size + 1; } providers.add(position - 1, provider); providersNames.put(provider.getName(), provider); se...
static int function(Provider provider, int position) { int size = providers.size(); if ((position < 1) (position > size)) { position = size + 1; } providers.add(position - 1, provider); providersNames.put(provider.getName(), provider); setNeedRefresh(); return position; }
/** * Inserts a provider at a specified position * * @param provider * @param position * @return */
Inserts a provider at a specified position
insertProviderAt
{ "repo_name": "xdajog/samsung_sources_i927", "path": "libcore/luni/src/main/java/org/apache/harmony/security/fortress/Services.java", "license": "gpl-2.0", "size": 6748 }
[ "java.security.Provider" ]
import java.security.Provider;
import java.security.*;
[ "java.security" ]
java.security;
821,317
public static String[] getDemographicCountAllEvents(UserInfoCerealWrapper sessionInfo) { Long maleCount = 0L; Long femaleCount = 0L; Long unidentified = 0L; Long under18 = 0L; Long age18to20 = 0L; Long age21to24 = 0L; Long age25to29 = 0L; Long age30to39 = 0L; Long age40to49 = 0L; Long age50to59 =...
static String[] function(UserInfoCerealWrapper sessionInfo) { Long maleCount = 0L; Long femaleCount = 0L; Long unidentified = 0L; Long under18 = 0L; Long age18to20 = 0L; Long age21to24 = 0L; Long age25to29 = 0L; Long age30to39 = 0L; Long age40to49 = 0L; Long age50to59 = 0L; Long over60 = 0L; try { Map<String, String> p...
/** * Call the api analytics servlet to get all * gender information for the current vendor's * events * @param resultsArray * @return */
Call the api analytics servlet to get all gender information for the current vendor's events
getDemographicCountAllEvents
{ "repo_name": "pschuette22/Zeppa-AppEngine", "path": "zeppa-frontend/src/main/java/com/zeppamobile/frontend/webpages/AnalyticsServlet.java", "license": "apache-2.0", "size": 16180 }
[ "com.zeppamobile.common.UniversalConstants", "com.zeppamobile.common.cerealwrapper.UserInfoCerealWrapper", "com.zeppamobile.common.utils.ModuleUtils", "java.io.BufferedReader", "java.io.InputStreamReader", "java.net.HttpURLConnection", "java.net.URLEncoder", "java.util.HashMap", "java.util.Map" ]
import com.zeppamobile.common.UniversalConstants; import com.zeppamobile.common.cerealwrapper.UserInfoCerealWrapper; import com.zeppamobile.common.utils.ModuleUtils; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URLEncoder; import java.util.HashMap; ...
import com.zeppamobile.common.*; import com.zeppamobile.common.cerealwrapper.*; import com.zeppamobile.common.utils.*; import java.io.*; import java.net.*; import java.util.*;
[ "com.zeppamobile.common", "java.io", "java.net", "java.util" ]
com.zeppamobile.common; java.io; java.net; java.util;
1,137,224
private void removeDuplicateImages(Feed feed) { for (int x = 0; x < feed.getItems().size(); x++) { for (int y = x + 1; y < feed.getItems().size(); y++) { FeedItem item1 = feed.getItems().get(x); FeedItem item2 = feed.getItems().get(y); ...
void function(Feed feed) { for (int x = 0; x < feed.getItems().size(); x++) { for (int y = x + 1; y < feed.getItems().size(); y++) { FeedItem item1 = feed.getItems().get(x); FeedItem item2 = feed.getItems().get(y); if (item1.hasItemImage() && item2.hasItemImage()) { if (TextUtils.equals(item1.getImage().getDownload_url...
/** * Checks if the FeedItems of this feed have images that point * to the same URL. If two FeedItems have an image that points to * the same URL, the reference of the second item is removed, so that every image * reference is unique. */
Checks if the FeedItems of this feed have images that point to the same URL. If two FeedItems have an image that points to the same URL, the reference of the second item is removed, so that every image reference is unique
removeDuplicateImages
{ "repo_name": "Woogis/SisatongPodcast", "path": "core/src/main/java/net/sisatong/podcast/core/service/download/DownloadService.java", "license": "mit", "size": 46496 }
[ "android.text.TextUtils", "net.sisatong.podcast.core.feed.Feed", "net.sisatong.podcast.core.feed.FeedItem" ]
import android.text.TextUtils; import net.sisatong.podcast.core.feed.Feed; import net.sisatong.podcast.core.feed.FeedItem;
import android.text.*; import net.sisatong.podcast.core.feed.*;
[ "android.text", "net.sisatong.podcast" ]
android.text; net.sisatong.podcast;
1,132,283
public String getMessage() { return ThrowableMessageFormatter.getMessage(this); } //--------------------------------------------------------------------------- // members // protected Object[] _args = null; protected Throwable _next = null; protected boolean _isWrapper =...
String function() { return ThrowableMessageFormatter.getMessage(this); } protected Object[] _args = null; protected Throwable _next = null; protected boolean _isWrapper = false;
/** * Implementation of the standard {@link java.lang.Throwable#getMessage} method. It * delegates the call to the central * {@link de.susebox.java.lang.ThrowableMessageFormatter#getMessage} method. * * @return the formatted throwable message * @see de.susebox.java.lang.ThrowableMessageFormatter...
Implementation of the standard <code>java.lang.Throwable#getMessage</code> method. It delegates the call to the central <code>de.susebox.java.lang.ThrowableMessageFormatter#getMessage</code> method
getMessage
{ "repo_name": "dohkoos/todolet", "path": "src/de/susebox/jtopas/TokenizerException.java", "license": "mit", "size": 7463 }
[ "de.susebox.java.lang.ThrowableMessageFormatter" ]
import de.susebox.java.lang.ThrowableMessageFormatter;
import de.susebox.java.lang.*;
[ "de.susebox.java" ]
de.susebox.java;
1,460,013
public Kuzzle unsetJwtToken() { this.jwtToken = null; for (Map<String, Room> roomSubscriptions : subscriptions.values()) { for (Room room : roomSubscriptions.values()) { room.unsubscribe(); } } return this; }
Kuzzle function() { this.jwtToken = null; for (Map<String, Room> roomSubscriptions : subscriptions.values()) { for (Room room : roomSubscriptions.values()) { room.unsubscribe(); } } return this; }
/** * Unset the authentication token and cancel all subscriptions * * @return this */
Unset the authentication token and cancel all subscriptions
unsetJwtToken
{ "repo_name": "kuzzleio/sdk-android", "path": "src/main/java/io/kuzzle/sdk/core/Kuzzle.java", "license": "apache-2.0", "size": 81564 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,498,194
public ApplicationService getApplicationService() { return applicationService; }
ApplicationService function() { return applicationService; }
/** * Returns the application remote service. * * @return the application remote service */
Returns the application remote service
getApplicationService
{ "repo_name": "fraunhoferfokus/govapps", "path": "data-portlet/src/main/java/de/fraunhofer/fokus/movepla/service/base/MultiMediaServiceBaseImpl.java", "license": "bsd-3-clause", "size": 32769 }
[ "de.fraunhofer.fokus.movepla.service.ApplicationService" ]
import de.fraunhofer.fokus.movepla.service.ApplicationService;
import de.fraunhofer.fokus.movepla.service.*;
[ "de.fraunhofer.fokus" ]
de.fraunhofer.fokus;
119,596
@Test public void testGetFilterMapping() { String newItem = "aFilter"; FilterMapping item = cut.getFilterMapping(newItem); assertNotNull(item); assertEquals(1, item.getPortletNames().size()); assertEquals("portlet362", item.getPortletNames().get(0)); }
void function() { String newItem = STR; FilterMapping item = cut.getFilterMapping(newItem); assertNotNull(item); assertEquals(1, item.getPortletNames().size()); assertEquals(STR, item.getPortletNames().get(0)); }
/** * Test method for {@link org.apache.pluto.container.om.portlet.impl.PortletApplicationDefinitionImpl#getFilterMapping(java.lang.String)}. */
Test method for <code>org.apache.pluto.container.om.portlet.impl.PortletApplicationDefinitionImpl#getFilterMapping(java.lang.String)</code>
testGetFilterMapping
{ "repo_name": "apache/portals-pluto", "path": "pluto-container/src/test/java/org/apache/pluto/container/om/portlet/impl/jsr362/JSR362PortletFilterAnnotationTest.java", "license": "apache-2.0", "size": 10503 }
[ "org.apache.pluto.container.om.portlet.FilterMapping", "org.junit.Assert" ]
import org.apache.pluto.container.om.portlet.FilterMapping; import org.junit.Assert;
import org.apache.pluto.container.om.portlet.*; import org.junit.*;
[ "org.apache.pluto", "org.junit" ]
org.apache.pluto; org.junit;
989,357
public IEdge getEdge(final INode source, final INode target, final Vector shift) { for (Iterator edges = directedEdges(source, target); edges.hasNext();) { final IEdge e = (IEdge) edges.next(); if (getShift(e).equals(shift)) { return e; } else if (source.e...
IEdge function(final INode source, final INode target, final Vector shift) { for (Iterator edges = directedEdges(source, target); edges.hasNext();) { final IEdge e = (IEdge) edges.next(); if (getShift(e).equals(shift)) { return e; } else if (source.equals(target) && getShift(e).equals(shift.negative())) { return e.reve...
/** * Retrieve an edge with a given source, target and shift. * @param source the source node. * @param target the target node. * @param shift the shift vector. * @return the unique edge with this data, or null, if none exists. */
Retrieve an edge with a given source, target and shift
getEdge
{ "repo_name": "BackupTheBerlios/gavrog", "path": "src/org/gavrog/joss/pgraphs/basic/PeriodicGraph.java", "license": "apache-2.0", "size": 79927 }
[ "java.util.Iterator", "org.gavrog.joss.geometry.Vector" ]
import java.util.Iterator; import org.gavrog.joss.geometry.Vector;
import java.util.*; import org.gavrog.joss.geometry.*;
[ "java.util", "org.gavrog.joss" ]
java.util; org.gavrog.joss;
334,597
protected Item getNextItem(Item item, boolean includeChildren) { if (item == null) { return null; } if (includeChildren && getExpanded(item)) { Item[] children = getItems(item); if (children != null && children.length > 0) { return children[0]; } } // next item is either next sibling or ne...
Item function(Item item, boolean includeChildren) { if (item == null) { return null; } if (includeChildren && getExpanded(item)) { Item[] children = getItems(item); if (children != null && children.length > 0) { return children[0]; } } Item parent = getParentItem(item); if (parent == null) { return null; } Item[] sibli...
/** * Returns the item after the given item in the tree, or <code>null</code> * if there is no next item. * * @param item * the item * @param includeChildren * <code>true</code> if the children are considered in * determining which item is next, and <code>false</code> i...
Returns the item after the given item in the tree, or <code>null</code> if there is no next item
getNextItem
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/jface/viewers/AbstractTreeViewer.java", "license": "epl-1.0", "size": 92728 }
[ "org.eclipse.swt.widgets.Item" ]
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
436,854
ImmutableList<SchemaOrgType> getIncentivesList();
ImmutableList<SchemaOrgType> getIncentivesList();
/** * Returns the value list of property incentives. Empty list is returned if the property not set * in current object. */
Returns the value list of property incentives. Empty list is returned if the property not set in current object
getIncentivesList
{ "repo_name": "google/schemaorg-java", "path": "src/main/java/com/google/schemaorg/core/JobPosting.java", "license": "apache-2.0", "size": 13350 }
[ "com.google.common.collect.ImmutableList", "com.google.schemaorg.SchemaOrgType" ]
import com.google.common.collect.ImmutableList; import com.google.schemaorg.SchemaOrgType;
import com.google.common.collect.*; import com.google.schemaorg.*;
[ "com.google.common", "com.google.schemaorg" ]
com.google.common; com.google.schemaorg;
970,262
public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() { return new LinkedList<MemoryManagerMXBean>(getMemoryBean() .getMemoryManagerMXBeans()); }
static List<MemoryManagerMXBean> function() { return new LinkedList<MemoryManagerMXBean>(getMemoryBean() .getMemoryManagerMXBeans()); }
/** * Returns a list of all of the instances of {@link MemoryManagerMXBean}in * this virtual machine. Owing to the dynamic nature of this kind of * <code>MXBean</code>, it is possible that instances may be created or * destroyed between the invocation and return of this method. * * @retur...
Returns a list of all of the instances of <code>MemoryManagerMXBean</code>in this virtual machine. Owing to the dynamic nature of this kind of <code>MXBean</code>, it is possible that instances may be created or destroyed between the invocation and return of this method
getMemoryManagerMXBeans
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/lang-management/src/main/java/org/apache/harmony/lang/management/ManagementUtils.java", "license": "apache-2.0", "size": 64134 }
[ "java.lang.management.MemoryManagerMXBean", "java.util.LinkedList", "java.util.List" ]
import java.lang.management.MemoryManagerMXBean; import java.util.LinkedList; import java.util.List;
import java.lang.management.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
659,993
BotInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } interface DefinitionStages { interface Blank extends With...
BotInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } interface DefinitionStages { interface Blank extends WithLocation { }
/** * Gets the inner com.azure.resourcemanager.botservice.fluent.models.BotInner object. * * @return the inner object. */
Gets the inner com.azure.resourcemanager.botservice.fluent.models.BotInner object
innerModel
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Bot.java", "license": "mit", "size": 9954 }
[ "com.azure.resourcemanager.botservice.fluent.models.BotInner" ]
import com.azure.resourcemanager.botservice.fluent.models.BotInner;
import com.azure.resourcemanager.botservice.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,117,196
public boolean init() { try { checkAndCreateSchema(); checkAndCreateTables(); return true; }catch(Exception ex) { logger.log(Level.SEVERE,"Exception", ex); return false; } }
boolean function() { try { checkAndCreateSchema(); checkAndCreateTables(); return true; }catch(Exception ex) { logger.log(Level.SEVERE,STR, ex); return false; } }
/** * Check required schema and tables * @return */
Check required schema and tables
init
{ "repo_name": "wgpshashank/mysql_perf_analyzer", "path": "myperf/src/main/java/com/yahoo/dba/perf/myperf/meta/MetaDB.java", "license": "apache-2.0", "size": 34052 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
506,034
public void extractHTML(String htmlText) { // System.out.println(htmlText); extractTitle(htmlText); htmlText = preProcess(htmlText); if( !isContentPage(htmlText) ) { _text = "*推测您提供的网页为非主题型网页,目前暂不处理!:-)"; return ; } //System.out.println(htmlText); List<String> lin...
void function(String htmlText) { extractTitle(htmlText); htmlText = preProcess(htmlText); if( !isContentPage(htmlText) ) { _text = STR; return ; } List<String> lines = Arrays.asList(htmlText.split("\n")); List<Integer> indexDistribution = lineBlockDistribute(lines); List<String> textList = new ArrayList<String>(); List...
/** * Extract html. * * @param htmlText the html text */
Extract html
extractHTML
{ "repo_name": "zmdevelop/spider", "path": "src/main/java/net/kernal/spiderman/worker/extract/extractor/impl/TextExtractor.java", "license": "apache-2.0", "size": 9494 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,066,931
@RequestMapping(method = RequestMethod.POST, params = "methodToCall=addLine") public ModelAndView addLine(@ModelAttribute("KualiForm") UifFormBase uifForm, BindingResult result, HttpServletRequest request, HttpServletResponse response) { String selectedCollectionPath = uifForm.getAction...
@RequestMapping(method = RequestMethod.POST, params = STR) ModelAndView function(@ModelAttribute(STR) UifFormBase uifForm, BindingResult result, HttpServletRequest request, HttpServletResponse response) { String selectedCollectionPath = uifForm.getActionParamaterValue(UifParameters.SELLECTED_COLLECTION_PATH); if (Strin...
/** * Called by the add line action for a new collection line. Method * determines which collection the add action was selected for and invokes * the view helper service to add the line */
Called by the add line action for a new collection line. Method determines which collection the add action was selected for and invokes the view helper service to add the line
addLine
{ "repo_name": "sbower/kuali-rice-1", "path": "krad/krad-web-framework/src/main/java/org/kuali/rice/krad/web/controller/UifControllerBase.java", "license": "apache-2.0", "size": 32434 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.commons.lang.StringUtils", "org.kuali.rice.krad.uif.UifParameters", "org.kuali.rice.krad.uif.view.View", "org.kuali.rice.krad.web.form.UifFormBase", "org.springframework.validation.BindingResult", "org.sprin...
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.kuali.rice.krad.uif.UifParameters; import org.kuali.rice.krad.uif.view.View; import org.kuali.rice.krad.web.form.UifFormBase; import org.springframework.validation.BindingR...
import javax.servlet.http.*; import org.apache.commons.lang.*; import org.kuali.rice.krad.uif.*; import org.kuali.rice.krad.uif.view.*; import org.kuali.rice.krad.web.form.*; import org.springframework.validation.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*;
[ "javax.servlet", "org.apache.commons", "org.kuali.rice", "org.springframework.validation", "org.springframework.web" ]
javax.servlet; org.apache.commons; org.kuali.rice; org.springframework.validation; org.springframework.web;
2,111,329
@Override public BufferedReader getRemoteFile(String filename) { return null; }
BufferedReader function(String filename) { return null; }
/** * Returns a BufferedReader to the remote file. Null if it doesn't exist. * * @param filename Name of the file, without path */
Returns a BufferedReader to the remote file. Null if it doesn't exist
getRemoteFile
{ "repo_name": "taimur97/NotePad", "path": "app/src/free/java/com/nononsenseapps/notepad/sync/orgsync/DropboxSynchronizer.java", "license": "gpl-3.0", "size": 4109 }
[ "java.io.BufferedReader" ]
import java.io.BufferedReader;
import java.io.*;
[ "java.io" ]
java.io;
834,875
public void setInput( List<SubTotalInfo> rowSubList, List<GrandTotalInfo> rowGrandList, List<SubTotalInfo> colSubList, List<GrandTotalInfo> colGrandList ) { this.rowSubList.addAll( rowSubList ); this.rowGrandList.addAll( rowGrandList ); this.colSubList.addAll( colSubList ); this.colGrandList.addAll( colG...
void function( List<SubTotalInfo> rowSubList, List<GrandTotalInfo> rowGrandList, List<SubTotalInfo> colSubList, List<GrandTotalInfo> colGrandList ) { this.rowSubList.addAll( rowSubList ); this.rowGrandList.addAll( rowGrandList ); this.colSubList.addAll( colSubList ); this.colGrandList.addAll( colGrandList ); }
/** * Set the input * * @param subList * subtotal info list * @param grandList * grand total list info */
Set the input
setInput
{ "repo_name": "Charling-Huang/birt", "path": "xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/dialogs/AggregationDialog.java", "license": "epl-1.0", "size": 19445 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
708,078
public static Date parseDate(final String date) { final int semicolonIndex = date.indexOf(';'); final String trimmedDate = semicolonIndex >= 0 ? date.substring(0, semicolonIndex) : date; ParsePosition pp = new ParsePosition(0); SimpleDateFormat dateFormat = RFC1123_PATTERN...
static Date function(final String date) { final int semicolonIndex = date.indexOf(';'); final String trimmedDate = semicolonIndex >= 0 ? date.substring(0, semicolonIndex) : date; ParsePosition pp = new ParsePosition(0); SimpleDateFormat dateFormat = RFC1123_PATTERN_FORMAT.get(); dateFormat.setTimeZone(GMT_ZONE); Date v...
/** * Attempts to pass a HTTP date. * * @param date The date to parse * @return The parsed date, or null if parsing failed */
Attempts to pass a HTTP date
parseDate
{ "repo_name": "yonglehou/undertow", "path": "core/src/main/java/io/undertow/util/DateUtils.java", "license": "apache-2.0", "size": 9386 }
[ "java.text.ParsePosition", "java.text.SimpleDateFormat", "java.util.Date" ]
import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
897,125
public static ImageTypeSpecifier createFromRenderedImage(RenderedImage image) { if (image == null) { throw new IllegalArgumentException("image == null!"); } if (image instanceof BufferedImage) { int bufferedImageType = ((BufferedImage)image).getType(); ...
static ImageTypeSpecifier function(RenderedImage image) { if (image == null) { throw new IllegalArgumentException(STR); } if (image instanceof BufferedImage) { int bufferedImageType = ((BufferedImage)image).getType(); if (bufferedImageType != BufferedImage.TYPE_CUSTOM) { return getSpecifier(bufferedImageType); } } retu...
/** * Returns an <code>ImageTypeSpecifier</code> that encodes the * layout of a <code>RenderedImage</code> (which may be a * <code>BufferedImage</code>). * * @param image a <code>RenderedImage</code>. * * @return an <code>ImageTypeSpecifier</code> with the desired * characteristi...
Returns an <code>ImageTypeSpecifier</code> that encodes the layout of a <code>RenderedImage</code> (which may be a <code>BufferedImage</code>)
createFromRenderedImage
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/javax/imageio/ImageTypeSpecifier.java", "license": "apache-2.0", "size": 47775 }
[ "java.awt.image.BufferedImage", "java.awt.image.RenderedImage" ]
import java.awt.image.BufferedImage; import java.awt.image.RenderedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
167,288
@Override protected String doExecute() { String result; AbstractImageContainer cont; ImageSInt16 input; ConfigHoughPolar config; DetectLineHoughPolar detector; List<LineParametric2D_F32> found; SpreadSheet sheet; Row row; result = null; try { c...
String function() { String result; AbstractImageContainer cont; ImageSInt16 input; ConfigHoughPolar config; DetectLineHoughPolar detector; List<LineParametric2D_F32> found; SpreadSheet sheet; Row row; result = null; try { cont = (AbstractImageContainer) m_InputToken.getPayload(); input = (ImageSInt16) BoofCVHelper.toBo...
/** * Executes the flow item. * * @return null if everything is fine, otherwise error message */
Executes the flow item
doExecute
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-imaging-boofcv/src/main/java/adams/flow/transformer/BoofCVDetectLines.java", "license": "gpl-3.0", "size": 12718 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,442,890
public static String getDefaultSchema(Db db) { if (isDerby(db)) { // Derby sets default schema name to username return "SA"; } else if (isMySQL(db)) { // MySQL does not have schemas return null; } else if (isSQLite(db)) { // SQLite ...
static String function(Db db) { if (isDerby(db)) { return "SA"; } else if (isMySQL(db)) { return null; } else if (isSQLite(db)) { return null; } return STR; }
/** * Gets the default schema of the underlying database engine. * * @param db * @return the default schema */
Gets the default schema of the underlying database engine
getDefaultSchema
{ "repo_name": "gitblit/iciql", "path": "src/test/java/com/iciql/test/IciqlSuite.java", "license": "apache-2.0", "size": 26574 }
[ "com.iciql.Db" ]
import com.iciql.Db;
import com.iciql.*;
[ "com.iciql" ]
com.iciql;
2,271,361
private static void coverLinefeedValues() throws XMPException { writeMajorLabel ("Test CR and LF in values"); String valueWithCR = "ASCII \r CR"; String valueWithLF = "ASCII \n LF"; String valueWithCRLF = "ASCII \r\n CRLF"; XMPMeta meta = XMPMetaFactory.parseFromString(NEWLINE_RDF); meta.setPro...
static void function() throws XMPException { writeMajorLabel (STR); String valueWithCR = STR; String valueWithLF = STR; String valueWithCRLF = STR; XMPMeta meta = XMPMetaFactory.parseFromString(NEWLINE_RDF); meta.setProperty (NS2, "HasCR", valueWithCR); meta.setProperty (NS2, "HasLF", valueWithLF); meta.setProperty (NS...
/** * Test CR and LF in values. * @throws XMPException Forwards exceptions */
Test CR and LF in values
coverLinefeedValues
{ "repo_name": "k3b/APhotoManager", "path": "fotolib2/src/test/java/com/adobe/xmp/demo/XMPCoreCoverage.java", "license": "gpl-3.0", "size": 35838 }
[ "com.adobe.xmp.XMPException", "com.adobe.xmp.XMPMeta", "com.adobe.xmp.XMPMetaFactory", "com.adobe.xmp.options.SerializeOptions" ]
import com.adobe.xmp.XMPException; import com.adobe.xmp.XMPMeta; import com.adobe.xmp.XMPMetaFactory; import com.adobe.xmp.options.SerializeOptions;
import com.adobe.xmp.*; import com.adobe.xmp.options.*;
[ "com.adobe.xmp" ]
com.adobe.xmp;
2,907,327
public Datatype get(int pColumn, int pRow);
Datatype function(int pColumn, int pRow);
/** * Liefert den Wert der im Ergebnis in der Zeile pRow und der Spalte pColumn steht * @param pColumn Spalte aus der das Ergebnis zurückgeliefert werden soll * @param pRow Reihe aus der das Ergebnis zurückgeliefert werden soll * @return Wert im Ergebnis in der Reihe pRow und der Spalte pColumn */
Liefert den Wert der im Ergebnis in der Zeile pRow und der Spalte pColumn steht
get
{ "repo_name": "marcofranke/SE-SEMed", "path": "ReasoningMediator/src/de/biba/mediator/ISolutionIterator.java", "license": "gpl-3.0", "size": 2359 }
[ "de.biba.ontology.datatypes.Datatype" ]
import de.biba.ontology.datatypes.Datatype;
import de.biba.ontology.datatypes.*;
[ "de.biba.ontology" ]
de.biba.ontology;
395,801
public void testInvalidType() { NumberConverter converter = makeConverter(); try { converter.convert(Object.class, numbers[0]); fail("Invalid type test, expected ConversionException"); } catch (ConversionException e) { // expected result } }
void function() { NumberConverter converter = makeConverter(); try { converter.convert(Object.class, numbers[0]); fail(STR); } catch (ConversionException e) { } }
/** * Test specifying an invalid type. */
Test specifying an invalid type
testInvalidType
{ "repo_name": "vorburger/apache-commons-beanutils", "path": "src/test/java/org/apache/commons/beanutils/converters/NumberConverterTestBase.java", "license": "apache-2.0", "size": 14128 }
[ "org.apache.commons.beanutils.ConversionException" ]
import org.apache.commons.beanutils.ConversionException;
import org.apache.commons.beanutils.*;
[ "org.apache.commons" ]
org.apache.commons;
2,157,275
public GridIoManager io();
GridIoManager function();
/** * Gets communication manager. * * @return Communication manager. */
Gets communication manager
io
{ "repo_name": "leveyj/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java", "license": "apache-2.0", "size": 16870 }
[ "org.apache.ignite.internal.managers.communication.GridIoManager" ]
import org.apache.ignite.internal.managers.communication.GridIoManager;
import org.apache.ignite.internal.managers.communication.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,669,487
public static void setProperties(CamelContext context, Object bean, Map<String, Object> parameters) throws Exception { IntrospectionSupport.setProperties(context.getTypeConverter(), bean, parameters); } /** * Sets the reference properties on the given bean * <p/> * This is convention...
static void function(CamelContext context, Object bean, Map<String, Object> parameters) throws Exception { IntrospectionSupport.setProperties(context.getTypeConverter(), bean, parameters); } /** * Sets the reference properties on the given bean * <p/> * This is convention over configuration, setting all reference param...
/** * Sets the regular properties on the given bean * * @param context the camel context * @param bean the bean * @param parameters parameters * @throws Exception is thrown if setting property fails */
Sets the regular properties on the given bean
setProperties
{ "repo_name": "onders86/camel", "path": "camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java", "license": "apache-2.0", "size": 20667 }
[ "java.util.Map", "org.apache.camel.CamelContext" ]
import java.util.Map; import org.apache.camel.CamelContext;
import java.util.*; import org.apache.camel.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
634,412
@Override public String toString() { TextSerializationFactory factory = new TextSerializationFactory(); StringBuilder sb = new StringBuilder(); for (FeatureInfo feature : addedFeatures) { String path = feature.getPath(); sb.append("A\t" + path + "\t" + feature.get...
String function() { TextSerializationFactory factory = new TextSerializationFactory(); StringBuilder sb = new StringBuilder(); for (FeatureInfo feature : addedFeatures) { String path = feature.getPath(); sb.append("A\t" + path + "\t" + feature.getFeatureType().getId() + "\n"); ObjectWriter<RevObject> writer = factory.c...
/** * This method is not intended to serialize the patch, as it misses some needed information. To * serialize the patch, use the {@link PatchSerializer} class instead. Use this method to show * patch content in a human-readable format */
This method is not intended to serialize the patch, as it misses some needed information. To serialize the patch, use the <code>PatchSerializer</code> class instead. Use this method to show patch content in a human-readable format
toString
{ "repo_name": "rouault/GeoGit", "path": "src/core/src/main/java/org/geogit/api/plumbing/diff/Patch.java", "license": "bsd-3-clause", "size": 10875 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "org.geogit.api.FeatureInfo", "org.geogit.api.RevFeature", "org.geogit.api.RevFeatureBuilder", "org.geogit.api.RevObject", "org.geogit.storage.ObjectWriter", "org.geogit.storage.text.TextSerializationFactory" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import org.geogit.api.FeatureInfo; import org.geogit.api.RevFeature; import org.geogit.api.RevFeatureBuilder; import org.geogit.api.RevObject; import org.geogit.storage.ObjectWriter; import org.geogit.storage.text.TextSerializationFactory;
import java.io.*; import org.geogit.api.*; import org.geogit.storage.*; import org.geogit.storage.text.*;
[ "java.io", "org.geogit.api", "org.geogit.storage" ]
java.io; org.geogit.api; org.geogit.storage;
1,265,279
public Observable<ServiceResponseWithHeaders<Void, LROsDeleteAsyncNoHeaderInRetryHeaders>> deleteAsyncNoHeaderInRetryWithServiceResponseAsync() { Observable<Response<ResponseBody>> observable = service.deleteAsyncNoHeaderInRetry(this.client.acceptLanguage(), this.client.userAgent()); return client.g...
Observable<ServiceResponseWithHeaders<Void, LROsDeleteAsyncNoHeaderInRetryHeaders>> function() { Observable<Response<ResponseBody>> observable = service.deleteAsyncNoHeaderInRetry(this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultWithHeadersAsync(observable, new...
/** * Long running delete request, service returns an Azure-AsyncOperation header in the initial request. Subsequent calls to operation status do not contain Azure-AsyncOperation header. * * @return the observable for the request */
Long running delete request, service returns an Azure-AsyncOperation header in the initial request. Subsequent calls to operation status do not contain Azure-AsyncOperation header
deleteAsyncNoHeaderInRetryWithServiceResponseAsync
{ "repo_name": "yugangw-msft/autorest", "path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/implementation/LROsImpl.java", "license": "mit", "size": 358789 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponseWithHeaders" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponseWithHeaders;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
2,687,327
@Generated @Selector("remapValuesToCurveWithControlPoints:") public native void remapValuesToCurveWithControlPoints( NSDictionary<? extends NSNumber, ? extends NSNumber> controlPoints);
@Selector(STR) native void function( NSDictionary<? extends NSNumber, ? extends NSNumber> controlPoints);
/** * Remaps all noise values to a smooth curve that passes through the specified control points. * * @param controlPoints Pairs of 'input : output' values to use as control points for the smooth remapping curve. * Duplicate input values are not permitted. */
Remaps all noise values to a smooth curve that passes through the specified control points
remapValuesToCurveWithControlPoints
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/gameplaykit/GKNoise.java", "license": "apache-2.0", "size": 14043 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,636,374
@Test public void testSearchForFoodNextTo() { final Sheep meh = new Sheep(); final StendhalRPZone zone = new StendhalRPZone("testzone", 10, 10); zone.add(meh); final RPObject foodobject = new RPObject(); foodobject.put("amount", 1); final SheepFood food = new SheepFood(foodobject); assertTrue(food.ge...
void function() { final Sheep meh = new Sheep(); final StendhalRPZone zone = new StendhalRPZone(STR, 10, 10); zone.add(meh); final RPObject foodobject = new RPObject(); foodobject.put(STR, 1); final SheepFood food = new SheepFood(foodobject); assertTrue(food.getAmount() > 0); zone.add(food); assertTrue(meh.searchForFoo...
/** * Tests for searchForFoodNextTo. */
Tests for searchForFoodNextTo
testSearchForFoodNextTo
{ "repo_name": "AntumDeluge/arianne-stendhal", "path": "tests/games/stendhal/server/entity/creature/SheepTest.java", "license": "gpl-2.0", "size": 9134 }
[ "games.stendhal.server.core.engine.StendhalRPZone", "games.stendhal.server.entity.mapstuff.spawner.SheepFood", "org.junit.Assert" ]
import games.stendhal.server.core.engine.StendhalRPZone; import games.stendhal.server.entity.mapstuff.spawner.SheepFood; import org.junit.Assert;
import games.stendhal.server.core.engine.*; import games.stendhal.server.entity.mapstuff.spawner.*; import org.junit.*;
[ "games.stendhal.server", "org.junit" ]
games.stendhal.server; org.junit;
2,060,802
@Override public String getSystemDisplayName(File f) { String displayName = super.getSystemDisplayName(f); return f.isDirectory() ? displayName.toUpperCase() : displayName. toLowerCase(); }
String function(File f) { String displayName = super.getSystemDisplayName(f); return f.isDirectory() ? displayName.toUpperCase() : displayName. toLowerCase(); }
/** * Returns a string that represents a directory or a file in the FileChooser component. * A string with all upper case letters is returned for a directory. * A string with all lower case letters is returned for a file. */
Returns a string that represents a directory or a file in the FileChooser component. A string with all upper case letters is returned for a directory. A string with all lower case letters is returned for a file
getSystemDisplayName
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/demo/jfc/FileChooserDemo/ExampleFileSystemView.java", "license": "mit", "size": 3245 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
598,435
public void setSeriesPaint(Paint paint) { this.seriesPaint = paint; notifyListeners(new PlotChangeEvent(this)); }
void function(Paint paint) { this.seriesPaint = paint; notifyListeners(new PlotChangeEvent(this)); }
/** * Sets the paint for ALL series in the plot. If this is set to</code> null * </code>, then a list of paints is used instead (to allow different colors * to be used for each series of the radar group). * * @param paint the paint (<code>null</code> permitted). * * @see #getSeriesP...
Sets the paint for ALL series in the plot. If this is set to</code> null </code>, then a list of paints is used instead (to allow different colors to be used for each series of the radar group)
setSeriesPaint
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/plot/SpiderWebPlot.java", "license": "mit", "size": 54986 }
[ "java.awt.Paint", "org.jfree.chart.event.PlotChangeEvent" ]
import java.awt.Paint; import org.jfree.chart.event.PlotChangeEvent;
import java.awt.*; import org.jfree.chart.event.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
346,229
public static String versionFromId(final String id){ if(id == null) return IAttributes.EMPTY_STRING; int pos = id.indexOf('.'); // find first separator if(pos > 0 ) { pos = id.indexOf('.', pos+1); // find second separator if(pos > 0 ) return id.substring(pos+1); // the rest is version (is ...
static String function(final String id){ if(id == null) return IAttributes.EMPTY_STRING; int pos = id.indexOf('.'); if(pos > 0 ) { pos = id.indexOf('.', pos+1); if(pos > 0 ) return id.substring(pos+1); } return IAttributes.EMPTY_STRING; }
/** * Extracts version from id string * @param id Pack ID string * @return version string if found, null otherwise */
Extracts version from id string
versionFromId
{ "repo_name": "borayildiz/cmsis-pack-eclipse", "path": "com.arm.cmsis.pack/src/com/arm/cmsis/pack/data/CpPack.java", "license": "apache-2.0", "size": 5750 }
[ "com.arm.cmsis.pack.generic.IAttributes" ]
import com.arm.cmsis.pack.generic.IAttributes;
import com.arm.cmsis.pack.generic.*;
[ "com.arm.cmsis" ]
com.arm.cmsis;
322,647
@Test public void testMultiUpdate() throws IOException { final String moreRecordsString = ResourceUtil .loadResourceAsString("org/auscope/portal/core/test/responses/csw/cswRecordResponse.xml"); final String noMoreRecordsString = ResourceUtil .loadResourceAsString(...
void function() throws IOException { final String moreRecordsString = ResourceUtil .loadResourceAsString(STR); final String noMoreRecordsString = ResourceUtil .loadResourceAsString(STR); final Sequence t1Sequence = context.sequence(STR); final Sequence t2Sequence = context.sequence(STR); final Sequence t3Sequence = con...
/** * Tests a regular update goes through and makes multiple requests over multiple threads * @throws IOException */
Tests a regular update goes through and makes multiple requests over multiple threads
testMultiUpdate
{ "repo_name": "joshvote/portal-core", "path": "src/test/java/org/auscope/portal/core/services/TestCSWCacheService.java", "license": "gpl-3.0", "size": 43226 }
[ "java.io.ByteArrayInputStream", "java.io.IOException", "java.util.concurrent.TimeUnit", "org.auscope.portal.core.server.http.HttpClientInputStream", "org.auscope.portal.core.test.ResourceUtil", "org.auscope.portal.core.test.jmock.HttpMethodBaseMatcher", "org.jmock.Expectations", "org.jmock.Sequence", ...
import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.concurrent.TimeUnit; import org.auscope.portal.core.server.http.HttpClientInputStream; import org.auscope.portal.core.test.ResourceUtil; import org.auscope.portal.core.test.jmock.HttpMethodBaseMatcher; import org.jmock.Expectations; impor...
import java.io.*; import java.util.concurrent.*; import org.auscope.portal.core.server.http.*; import org.auscope.portal.core.test.*; import org.auscope.portal.core.test.jmock.*; import org.jmock.*; import org.junit.*;
[ "java.io", "java.util", "org.auscope.portal", "org.jmock", "org.junit" ]
java.io; java.util; org.auscope.portal; org.jmock; org.junit;
2,619,731
@Override public String getText(Object object) { String label = ((ProductionCapability)object).getName(); return label == null || label.length() == 0 ? getString("_UI_ProductionCapability_type") : getString("_UI_ProductionCapability_type") + " " + label; }
String function(Object object) { String label = ((ProductionCapability)object).getName(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the label text for the adapted class.
getText
{ "repo_name": "BaSys-PC1/models", "path": "de.dfki.iui.basys.model.domain.edit/src/de/dfki/iui/basys/model/domain/capability/provider/ProductionCapabilityItemProvider.java", "license": "epl-1.0", "size": 2731 }
[ "de.dfki.iui.basys.model.domain.capability.ProductionCapability" ]
import de.dfki.iui.basys.model.domain.capability.ProductionCapability;
import de.dfki.iui.basys.model.domain.capability.*;
[ "de.dfki.iui" ]
de.dfki.iui;
838,213
Dependency testFixtures(Object notation);
Dependency testFixtures(Object notation);
/** * Declares a dependency on the test fixtures of a component. * @param notation the coordinates of the component to use test fixtures for * * @since 5.6 */
Declares a dependency on the test fixtures of a component
testFixtures
{ "repo_name": "gradle/gradle", "path": "subprojects/core-api/src/main/java/org/gradle/api/artifacts/dsl/DependencyHandler.java", "license": "apache-2.0", "size": 27329 }
[ "org.gradle.api.artifacts.Dependency" ]
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.artifacts.*;
[ "org.gradle.api" ]
org.gradle.api;
1,078,565
public EReference getPEExtension_RootNodes() { return (EReference)peExtensionEClass.getEStructuralFeatures().get(1); }
EReference function() { return (EReference)peExtensionEClass.getEStructuralFeatures().get(1); }
/** * Returns the meta object for the reference list '{@link org.mar9000.pe.ecore.PEExtension#getRootNodes <em>Root Nodes</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Root Nodes</em>'. * @see org.mar9000.pe.ecore.PEExtension#getRootNodes() *...
Returns the meta object for the reference list '<code>org.mar9000.pe.ecore.PEExtension#getRootNodes Root Nodes</code>'.
getPEExtension_RootNodes
{ "repo_name": "mar9000/pe", "path": "src-gen/org/mar9000/pe/ecore/impl/EcorePackageImpl.java", "license": "apache-2.0", "size": 100111 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
251,375