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
ProcessorEntity createProcessor(Revision revision, String groupId, ProcessorDTO processorDTO);
ProcessorEntity createProcessor(Revision revision, String groupId, ProcessorDTO processorDTO);
/** * Creates a new Processor. * * @param revision revision * @param groupId Group id * @param processorDTO The processor DTO * @return The new processor DTO */
Creates a new Processor
createProcessor
{ "repo_name": "WilliamNouet/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 53848 }
[ "org.apache.nifi.web.api.dto.ProcessorDTO", "org.apache.nifi.web.api.entity.ProcessorEntity" ]
import org.apache.nifi.web.api.dto.ProcessorDTO; import org.apache.nifi.web.api.entity.ProcessorEntity;
import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.entity.*;
[ "org.apache.nifi" ]
org.apache.nifi;
125,526
public void clearCacheEntry(K key) { Cache<K, V> cache = getOpenIDCache(); if (cache != null && cache.containsKey(key)) { cache.remove(key); } }
void function(K key) { Cache<K, V> cache = getOpenIDCache(); if (cache != null && cache.containsKey(key)) { cache.remove(key); } }
/** * Clears a cache entry. * * @param key Key to clear cache. */
Clears a cache entry
clearCacheEntry
{ "repo_name": "pulasthi7/carbon-identity", "path": "components/openid/org.wso2.carbon.identity.provider/src/main/java/org/wso2/carbon/identity/provider/openid/cache/OpenIDBaseCache.java", "license": "apache-2.0", "size": 2828 }
[ "javax.cache.Cache" ]
import javax.cache.Cache;
import javax.cache.*;
[ "javax.cache" ]
javax.cache;
1,932,778
public static SimpleBigDecimal approximateDivisionByN(BigInteger k, BigInteger s, BigInteger vm, byte a, int m, int c) { int _k = (m + 5)/2 + c; BigInteger ns = k.shiftRight(m - _k - 2 + a); BigInteger gs = s.multiply(ns); BigInteger hs = gs.shiftRight(m); ...
static SimpleBigDecimal function(BigInteger k, BigInteger s, BigInteger vm, byte a, int m, int c) { int _k = (m + 5)/2 + c; BigInteger ns = k.shiftRight(m - _k - 2 + a); BigInteger gs = s.multiply(ns); BigInteger hs = gs.shiftRight(m); BigInteger js = vm.multiply(hs); BigInteger gsPlusJs = gs.add(js); BigInteger ls = g...
/** * Approximate division by <code>n</code>. For an integer * <code>k</code>, the value <code>&lambda; = s k / n</code> is * computed to <code>c</code> bits of accuracy. * @param k The parameter <code>k</code>. * @param s The curve parameter <code>s<sub>0</sub></code> or * <code>s<sub>1</...
Approximate division by <code>n</code>. For an integer <code>k</code>, the value <code>&lambda; = s k / n</code> is computed to <code>c</code> bits of accuracy
approximateDivisionByN
{ "repo_name": "credentials/irma_future_id", "path": "crypto/bouncycastle/src/bc/core/src/main/java/org/bouncycastle/math/ec/Tnaf.java", "license": "apache-2.0", "size": 26288 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,210,501
public String toString(String enc) throws UnsupportedEncodingException { return new String(buf, 0, count, enc); }
String function(String enc) throws UnsupportedEncodingException { return new String(buf, 0, count, enc); }
/** * Converts the buffer's contents into a string, translating bytes into * characters according to the specified character encoding. * * @param enc a character-encoding name. * @return String translated from the buffer's contents. * @throws UnsupportedEncodingException * ...
Converts the buffer's contents into a string, translating bytes into characters according to the specified character encoding
toString
{ "repo_name": "bullda/DroidText", "path": "src/core/com/lowagie/text/pdf/ByteBuffer.java", "license": "lgpl-3.0", "size": 21637 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,861,130
@Nested public Report getReport() { return fReport; }
Report function() { return fReport; }
/** * Get the underlying XML report for this section. * * @return The XML report the section's contents are based on. */
Get the underlying XML report for this section
getReport
{ "repo_name": "handmadecode/quill", "path": "src/main/java/org/myire/quill/dashboard/DashboardSection.java", "license": "apache-2.0", "size": 8143 }
[ "org.gradle.api.reporting.Report" ]
import org.gradle.api.reporting.Report;
import org.gradle.api.reporting.*;
[ "org.gradle.api" ]
org.gradle.api;
2,330,527
public InterestRateCurveSensitivity presentValueCurveSensitivity(final SwaptionPhysicalFixedIbor swaption, final HullWhiteOneFactorPiecewiseConstantDataBundle hwData) { Validate.notNull(swaption); Validate.notNull(hwData); int nbSigma = hwData.getHullWhiteParameter().getVolatility().length; AnnuityPay...
InterestRateCurveSensitivity function(final SwaptionPhysicalFixedIbor swaption, final HullWhiteOneFactorPiecewiseConstantDataBundle hwData) { Validate.notNull(swaption); Validate.notNull(hwData); int nbSigma = hwData.getHullWhiteParameter().getVolatility().length; AnnuityPaymentFixed cfe = CFEC.visit(swaption.getUnderl...
/** * Present value sensitivity to the curves. The present value is computed using the explicit formula. * @param swaption The physical delivery swaption. * @param hwData The Hull-White parameters and the curves. * @return The present value curve sensitivity. */
Present value sensitivity to the curves. The present value is computed using the explicit formula
presentValueCurveSensitivity
{ "repo_name": "charles-cooper/idylfin", "path": "src/com/opengamma/analytics/financial/interestrate/swaption/method/SwaptionPhysicalFixedIborHullWhiteMethod.java", "license": "apache-2.0", "size": 11053 }
[ "com.opengamma.analytics.financial.interestrate.InterestRateCurveSensitivity", "com.opengamma.analytics.financial.interestrate.annuity.derivative.AnnuityPaymentFixed", "com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionPhysicalFixedIbor", "com.opengamma.analytics.financial.model.inter...
import com.opengamma.analytics.financial.interestrate.InterestRateCurveSensitivity; import com.opengamma.analytics.financial.interestrate.annuity.derivative.AnnuityPaymentFixed; import com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionPhysicalFixedIbor; import com.opengamma.analytics.financial....
import com.opengamma.analytics.financial.interestrate.*; import com.opengamma.analytics.financial.interestrate.annuity.derivative.*; import com.opengamma.analytics.financial.interestrate.swaption.derivative.*; import com.opengamma.analytics.financial.model.interestrate.definition.*; import com.opengamma.util.tuple.*; i...
[ "com.opengamma.analytics", "com.opengamma.util", "java.util", "org.apache.commons" ]
com.opengamma.analytics; com.opengamma.util; java.util; org.apache.commons;
1,976,453
@Transactional(readOnly = true) public Number getActiveEscalationCount() { return new Integer(escalationStateDAO.size()); }
@Transactional(readOnly = true) Number function() { return new Integer(escalationStateDAO.size()); }
/** * Get the # of active escalations within HQ inventory */
Get the # of active escalations within HQ inventory
getActiveEscalationCount
{ "repo_name": "cc14514/hq6", "path": "hq-server/src/main/java/org/hyperic/hq/escalation/server/session/EscalationManagerImpl.java", "license": "unlicense", "size": 31648 }
[ "org.springframework.transaction.annotation.Transactional" ]
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.*;
[ "org.springframework.transaction" ]
org.springframework.transaction;
1,339,379
protected void addKeyboardPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Presentation_keyboard_feature"), getString("_UI_PropertyDescriptor...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), RevealPackage.Literals.PRESENTATION__KEYBOARD, true, false, false, ItemPropertyDescriptor.BOOLEAN...
/** * This adds a property descriptor for the Keyboard feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Keyboard feature.
addKeyboardPropertyDescriptor
{ "repo_name": "CohesionForce/reveal", "path": "plugins/com.cohesionforce.reveal.model.edit/src/com/cohesionforce/reveal/provider/PresentationItemProvider.java", "license": "epl-1.0", "size": 31411 }
[ "com.cohesionforce.reveal.RevealPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import com.cohesionforce.reveal.RevealPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import com.cohesionforce.reveal.*; import org.eclipse.emf.edit.provider.*;
[ "com.cohesionforce.reveal", "org.eclipse.emf" ]
com.cohesionforce.reveal; org.eclipse.emf;
2,110,213
@SuppressWarnings({ "rawtypes", "unchecked" }) private LinkedHashMap getStructureParameterMetadata(JCoField field) { // TODO Auto-generated method stub JCoFieldIterator iter = field.getStructure().getFieldIterator(); LinkedHashMap map = new LinkedHashMap(); while(iter.hasNextField()) { JCoFiel...
@SuppressWarnings({ STR, STR }) LinkedHashMap function(JCoField field) { JCoFieldIterator iter = field.getStructure().getFieldIterator(); LinkedHashMap map = new LinkedHashMap(); while(iter.hasNextField()) { JCoField f = iter.nextField(); map.put(f.getName(),f.getDescription()); } return map; }
/**<ul><li>Returns the description of structure of requested <TT>JCoField</TT> as meta-data. * * @param field instance of <tt>JCoField</tt>. * @return map instance of <tt>LinkedHashMap</tt> to put values of structure. */
Returns the description of structure of requested JCoField as meta-data
getStructureParameterMetadata
{ "repo_name": "runmyprocess/sec-jco3", "path": "src/main/java/com/runmyprocess/sec/JCO3DataHandler.java", "license": "apache-2.0", "size": 32065 }
[ "com.sap.conn.jco.JCoField", "com.sap.conn.jco.JCoFieldIterator", "java.util.LinkedHashMap" ]
import com.sap.conn.jco.JCoField; import com.sap.conn.jco.JCoFieldIterator; import java.util.LinkedHashMap;
import com.sap.conn.jco.*; import java.util.*;
[ "com.sap.conn", "java.util" ]
com.sap.conn; java.util;
1,634,129
protected static Session getSession(final Context context, final RequestMessage msg) { final String sessionId = (String) msg.getArgs().get(Tokens.ARGS_SESSION); logger.debug("In-session request {} for eval for session {} in thread {}", msg.getRequestId(), sessionId, Thread.currentTh...
static Session function(final Context context, final RequestMessage msg) { final String sessionId = (String) msg.getArgs().get(Tokens.ARGS_SESSION); logger.debug(STR, msg.getRequestId(), sessionId, Thread.currentThread().getName()); final Session session = sessions.computeIfAbsent(sessionId, k -> new Session(k, context...
/** * Examines the {@link RequestMessage} and extracts the session token. The session is then either found or a new * one is created. */
Examines the <code>RequestMessage</code> and extracts the session token. The session is then either found or a new one is created
getSession
{ "repo_name": "jorgebay/tinkerpop", "path": "gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/session/SessionOpProcessor.java", "license": "apache-2.0", "size": 13582 }
[ "java.util.function.Supplier", "org.apache.tinkerpop.gremlin.driver.Tokens", "org.apache.tinkerpop.gremlin.driver.message.RequestMessage", "org.apache.tinkerpop.gremlin.server.Context", "org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor" ]
import java.util.function.Supplier; import org.apache.tinkerpop.gremlin.driver.Tokens; import org.apache.tinkerpop.gremlin.driver.message.RequestMessage; import org.apache.tinkerpop.gremlin.server.Context; import org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor;
import java.util.function.*; import org.apache.tinkerpop.gremlin.driver.*; import org.apache.tinkerpop.gremlin.driver.message.*; import org.apache.tinkerpop.gremlin.server.*; import org.apache.tinkerpop.gremlin.server.op.*;
[ "java.util", "org.apache.tinkerpop" ]
java.util; org.apache.tinkerpop;
1,203,725
DateTime getStartTime();
DateTime getStartTime();
/** * Return the DateTime the job was started * * @return the DateTime the job was started */
Return the DateTime the job was started
getStartTime
{ "repo_name": "rashidaligee/kylo", "path": "core/job-repository/job-repository-api/src/main/java/com/thinkbiganalytics/jobrepo/query/model/ExecutedJob.java", "license": "apache-2.0", "size": 6391 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,243,159
public IElementType advance() throws java.io.IOException { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; CharSequence zzBufferL = zzBuffer; char[] zzBufferArrayL = zzBufferArray; char [] zzCMapL = ZZ_CMAP; int []...
IElementType function() throws java.io.IOException { int zzInput; int zzAction; int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; CharSequence zzBufferL = zzBuffer; char[] zzBufferArrayL = zzBufferArray; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL =...
/** * Resumes scanning until the next regular expression is matched, * the end of input is encountered or an I/O-Error occurs. * * @return the next token * @exception java.io.IOException if any I/O-Error occurs */
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs
advance
{ "repo_name": "joewalnes/idea-community", "path": "platform/lang-impl/src/com/intellij/psi/search/scope/packageSet/lexer/_ScopesLexer.java", "license": "apache-2.0", "size": 19647 }
[ "com.intellij.psi.tree.IElementType" ]
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.*;
[ "com.intellij.psi" ]
com.intellij.psi;
1,391,081
@Test public void updatePetTest() { Pet body = null; api.updatePet(body); // TODO: test validations }
void function() { Pet body = null; api.updatePet(body); }
/** * Update an existing pet * * * * @throws ApiException * if the Api call fails */
Update an existing pet
updatePetTest
{ "repo_name": "Niky4000/UsefulUtils", "path": "projects/tutorials-master/tutorials-master/spring-swagger-codegen/spring-swagger-codegen-api-client/src/test/java/com/baeldung/petstore/client/api/PetApiLiveTest.java", "license": "gpl-3.0", "size": 3739 }
[ "com.baeldung.petstore.client.model.Pet" ]
import com.baeldung.petstore.client.model.Pet;
import com.baeldung.petstore.client.model.*;
[ "com.baeldung.petstore" ]
com.baeldung.petstore;
2,810,679
public static <K, V> V replace(ConcurrentMap<K, V> map, K key, V value) { if (map == null) return null; return map.replace(key, value); }
static <K, V> V function(ConcurrentMap<K, V> map, K key, V value) { if (map == null) return null; return map.replace(key, value); }
/** * Replaces the entry for a key only if currently mapped to some value. * * @param map The map to be operated on. * @param key The key with which the specified value is associated. * @param value The value to be associated with the specified key. * @param <K> The class of keys in ...
Replaces the entry for a key only if currently mapped to some value
replace
{ "repo_name": "Permafrost/Tundra.java", "path": "src/main/java/permafrost/tundra/collection/ConcurrentMapHelper.java", "license": "mit", "size": 8644 }
[ "java.util.concurrent.ConcurrentMap" ]
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
491,428
public static KualiDecimal safeSubtract(KualiDecimal value, KualiDecimal subtrahend) { if (subtrahend == null || value == null) { return value; } return value.subtract(subtrahend); }
static KualiDecimal function(KualiDecimal value, KualiDecimal subtrahend) { if (subtrahend == null value == null) { return value; } return value.subtract(subtrahend); }
/** * Makes sure no null pointer exception occurs on fields that can accurately be null when subtracting. If either field are null * the value is returned. * * @param value * @param subtrahend * @return */
Makes sure no null pointer exception occurs on fields that can accurately be null when subtracting. If either field are null the value is returned
safeSubtract
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/util/KualiDecimalUtils.java", "license": "agpl-3.0", "size": 8399 }
[ "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,320,779
public static Player[] getOnlinePlayers(){ return server.getOnlinePlayers(); }
static Player[] function(){ return server.getOnlinePlayers(); }
/** * Gets the online players on the server * @return the online players */
Gets the online players on the server
getOnlinePlayers
{ "repo_name": "TorchPowered/Bloom", "path": "src/org/bloom/Bloom.java", "license": "mit", "size": 2740 }
[ "org.bloom.entity.Player" ]
import org.bloom.entity.Player;
import org.bloom.entity.*;
[ "org.bloom.entity" ]
org.bloom.entity;
2,770,790
public NDArray expi() { return mapi(FastMath::exp); }
NDArray function() { return mapi(FastMath::exp); }
/** * Convenience method for calculating <code>e^x</code> where <code>x</code> is the element value of the NDArray * in-place, i.e. <code>Math.exp(x)</code>. * * @return this NDArray */
Convenience method for calculating <code>e^x</code> where <code>x</code> is the element value of the NDArray in-place, i.e. <code>Math.exp(x)</code>
expi
{ "repo_name": "dbracewell/apollo", "path": "src/main/java/com/davidbracewell/apollo/linear/NDArray.java", "license": "apache-2.0", "size": 68768 }
[ "org.apache.commons.math3.util.FastMath" ]
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.*;
[ "org.apache.commons" ]
org.apache.commons;
926,302
public void setImageSize(Point size) { if (size == this.imageSize || (size != null && size.equals(this.imageSize))) return; this.imageSize = size; cachedImageSize = null; refreshControl(); }
void function(Point size) { if (size == this.imageSize (size != null && size.equals(this.imageSize))) return; this.imageSize = size; cachedImageSize = null; refreshControl(); }
/** * Set the size of the image, only if the style bit is not NO_IMAGE and then refresh the * control * @param size the new size */
Set the size of the image, only if the style bit is not NO_IMAGE and then refresh the control
setImageSize
{ "repo_name": "OpenSoftwareSolutions/PDFReporter-Studio", "path": "com.jaspersoft.studio/src/com/jaspersoft/studio/property/combomenu/ComboButton.java", "license": "lgpl-3.0", "size": 23680 }
[ "org.eclipse.swt.graphics.Point" ]
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,842,146
public static void checkArgument( boolean b, @Nullable String errorMessageTemplate, long p1, @Nullable Object p2) { if (!b) { throw new IllegalArgumentException(format(errorMessageTemplate, p1, p2)); } }
static void function( boolean b, @Nullable String errorMessageTemplate, long p1, @Nullable Object p2) { if (!b) { throw new IllegalArgumentException(format(errorMessageTemplate, p1, p2)); } }
/** * Ensures the truth of an expression involving one or more parameters to the calling method. * * <p>See {@link #checkArgument(boolean, String, Object...)} for details. */
Ensures the truth of an expression involving one or more parameters to the calling method. See <code>#checkArgument(boolean, String, Object...)</code> for details
checkArgument
{ "repo_name": "jakubmalek/guava", "path": "guava/src/com/google/common/base/Preconditions.java", "license": "apache-2.0", "size": 51675 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,514,782
public final void removeFileFormat(final FileFormat format) { fileFormatList.remove(format); }
final void function(final FileFormat format) { fileFormatList.remove(format); }
/** * Removes the file format from the internal signature. * * @param format The file format to remove. */
Removes the file format from the internal signature
removeFileFormat
{ "repo_name": "Det-Kongelige-Bibliotek/droid", "path": "droid-core/src/main/java/uk/gov/nationalarchives/droid/core/signature/droid6/InternalSignature.java", "license": "bsd-3-clause", "size": 15950 }
[ "uk.gov.nationalarchives.droid.core.signature.FileFormat" ]
import uk.gov.nationalarchives.droid.core.signature.FileFormat;
import uk.gov.nationalarchives.droid.core.signature.*;
[ "uk.gov.nationalarchives" ]
uk.gov.nationalarchives;
1,248,756
public com.google.common.util.concurrent.ListenableFuture<com.google.container.v1.ListOperationsResponse> listOperations( com.google.container.v1.ListOperationsRequest request) { return futureUnaryCall( getChannel().newCall(getListOperationsMethodHelper(), getCallOptions()), request); }
com.google.common.util.concurrent.ListenableFuture<com.google.container.v1.ListOperationsResponse> function( com.google.container.v1.ListOperationsRequest request) { return futureUnaryCall( getChannel().newCall(getListOperationsMethodHelper(), getCallOptions()), request); }
/** * <pre> * Lists all operations in a project in a specific zone or all zones. * </pre> */
<code> Lists all operations in a project in a specific zone or all zones. </code>
listOperations
{ "repo_name": "pongad/api-client-staging", "path": "generated/java/grpc-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterManagerGrpc.java", "license": "bsd-3-clause", "size": 147597 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
2,509,965
void revive(final ApplicationDomain application);
void revive(final ApplicationDomain application);
/** * Revive the application. * * @param application :: */
Revive the application
revive
{ "repo_name": "olacabs/fabric", "path": "fabric-manager/src/main/java/com/olacabs/fabric/manager/dao/IApplicationDAO.java", "license": "apache-2.0", "size": 1759 }
[ "com.olacabs.fabric.manager.domain.ApplicationDomain" ]
import com.olacabs.fabric.manager.domain.ApplicationDomain;
import com.olacabs.fabric.manager.domain.*;
[ "com.olacabs.fabric" ]
com.olacabs.fabric;
2,905,751
public SwaggerAssert satisfiesContract(Swagger expected) { SchemaObjectResolver schemaObjectResolver = new SchemaObjectResolver(expected, actual); consumerDrivenValidator.validateSwagger(expected, schemaObjectResolver); return myself; }
SwaggerAssert function(Swagger expected) { SchemaObjectResolver schemaObjectResolver = new SchemaObjectResolver(expected, actual); consumerDrivenValidator.validateSwagger(expected, schemaObjectResolver); return myself; }
/** * Verifies that the actual value is equal to the given one. * * @param expected the given value to compare the actual value to. * @return {@code this} assertion object. * @throws AssertionError if the actual value is not equal to the given one or if the actual value is {@code null}.. *...
Verifies that the actual value is equal to the given one
satisfiesContract
{ "repo_name": "thomsonreuters/assertj-swagger", "path": "src/main/java/io/github/robwin/swagger/test/SwaggerAssert.java", "license": "apache-2.0", "size": 5188 }
[ "io.swagger.models.Swagger" ]
import io.swagger.models.Swagger;
import io.swagger.models.*;
[ "io.swagger.models" ]
io.swagger.models;
1,064,149
public Object process(final Element elEcho) throws Exception { LOG.debug(">> process(elEcho)"); if (elEcho == null) { throw new SQLUnitException(IErrorCodes.ELEMENT_IS_NULL, new String[] {"echo"}); } String text = XMLUtils.getAttributeValue(elEcho, "...
Object function(final Element elEcho) throws Exception { LOG.debug(STR); if (elEcho == null) { throw new SQLUnitException(IErrorCodes.ELEMENT_IS_NULL, new String[] {"echo"}); } String text = XMLUtils.getAttributeValue(elEcho, "text"); String value = XMLUtils.getAttributeValue(elEcho, "value"); text = SymbolTable.replac...
/** * Processes a JDOM Element representing the Echo element. Writes * the specified value (after variable substitution) to the log. * @param elEcho the JDOM Element to use. * @return a null Object. * @exception Exception if there was a problem processing the tag. */
Processes a JDOM Element representing the Echo element. Writes the specified value (after variable substitution) to the log
process
{ "repo_name": "ecalo/SQLUnit-5.0-Fork", "path": "src/net/sourceforge/sqlunit/handlers/EchoHandler.java", "license": "gpl-3.0", "size": 3882 }
[ "net.sourceforge.sqlunit.IErrorCodes", "net.sourceforge.sqlunit.SQLUnitException", "net.sourceforge.sqlunit.SymbolTable", "net.sourceforge.sqlunit.utils.XMLUtils", "org.jdom.Element" ]
import net.sourceforge.sqlunit.IErrorCodes; import net.sourceforge.sqlunit.SQLUnitException; import net.sourceforge.sqlunit.SymbolTable; import net.sourceforge.sqlunit.utils.XMLUtils; import org.jdom.Element;
import net.sourceforge.sqlunit.*; import net.sourceforge.sqlunit.utils.*; import org.jdom.*;
[ "net.sourceforge.sqlunit", "org.jdom" ]
net.sourceforge.sqlunit; org.jdom;
2,851,836
private PathHandle complete(final Path file, final UploadHandle uploadHandle, final Map<Integer, PartHandle> partHandles) throws IOException { return complete(getRandomUploader(), uploadHandle, file, partHandles); }
PathHandle function(final Path file, final UploadHandle uploadHandle, final Map<Integer, PartHandle> partHandles) throws IOException { return complete(getRandomUploader(), uploadHandle, file, partHandles); }
/** * Perform the inner complete without verification. * @param file destination path * @param uploadHandle upload handle * @param partHandles map of parts * @return the path handle from the upload. * @throws IOException IO failure */
Perform the inner complete without verification
complete
{ "repo_name": "apurtell/hadoop", "path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractMultipartUploaderTest.java", "license": "apache-2.0", "size": 28464 }
[ "java.io.IOException", "java.util.Map", "org.apache.hadoop.fs.PartHandle", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.PathHandle", "org.apache.hadoop.fs.UploadHandle" ]
import java.io.IOException; import java.util.Map; import org.apache.hadoop.fs.PartHandle; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.PathHandle; import org.apache.hadoop.fs.UploadHandle;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,527,298
public boolean scheduledRefresh() { boolean listenerNeedsRefresh = refreshListeners.refreshNeeded(); if (isReadAllowed() && (listenerNeedsRefresh || getEngine().refreshNeeded())) { if (listenerNeedsRefresh == false // if we have a listener that is waiting for a refresh we need to force i...
boolean function() { boolean listenerNeedsRefresh = refreshListeners.refreshNeeded(); if (isReadAllowed() && (listenerNeedsRefresh getEngine().refreshNeeded())) { if (listenerNeedsRefresh == false && isSearchIdle() && indexSettings.isExplicitRefresh() == false && active.get()) { final Engine engine = getEngine(); engin...
/** * Executes a scheduled refresh if necessary. * * @return <code>true</code> iff the engine got refreshed otherwise <code>false</code> */
Executes a scheduled refresh if necessary
scheduledRefresh
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 137199 }
[ "org.elasticsearch.index.engine.Engine" ]
import org.elasticsearch.index.engine.Engine;
import org.elasticsearch.index.engine.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
1,212,900
@Test public void testWeaker() { long weaker = haunterService.isHaunterStronger(h1, h2); Assert.assertTrue(weaker < 0); }
void function() { long weaker = haunterService.isHaunterStronger(h1, h2); Assert.assertTrue(weaker < 0); }
/** * Test return values for isHaunterStronger method. */
Test return values for isHaunterStronger method
testWeaker
{ "repo_name": "DrakMelisek/pa165_haunted_houses", "path": "service_layer/src/test/java/com/peta2kuba/pa165_haunted_houses/service_layer/service/HaunterServiceTest.java", "license": "apache-2.0", "size": 4819 }
[ "org.testng.Assert" ]
import org.testng.Assert;
import org.testng.*;
[ "org.testng" ]
org.testng;
1,345,255
private void determineColors() { // Color _activeBumpsHighlight = activeBumpsHighlight; switch (getWindowDecorationStyle()) { case JRootPane.FRAME: activeBackground = UIManager.getColor("activeCaption"); activeForeground = UIManager.getColor("activeCaptionText"); ...
void function() { switch (getWindowDecorationStyle()) { case JRootPane.FRAME: activeBackground = UIManager.getColor(STR); activeForeground = UIManager.getColor(STR); activeShadow = UIManager.getColor(STR); break; case JRootPane.ERROR_DIALOG: activeBackground = UIManager.getColor( STR); activeForeground = UIManager.getC...
/** * Determines the Colors to draw with. */
Determines the Colors to draw with
determineColors
{ "repo_name": "takisd123/executequery", "path": "src/org/underworldlabs/swing/plaf/smoothgradient/SmoothGradientTitlePane.java", "license": "gpl-3.0", "size": 31578 }
[ "javax.swing.JRootPane", "javax.swing.UIManager" ]
import javax.swing.JRootPane; import javax.swing.UIManager;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,640,329
public void setProjectXml(File projectXml) { this.projectXml = projectXml; }
void function(File projectXml) { this.projectXml = projectXml; }
/** * Set the project.xml file to use when post-processing. * @param projectXml the project xml file */
Set the project.xml file to use when post-processing
setProjectXml
{ "repo_name": "joshkh/intermine", "path": "imbuild/im-ant-tasks/src/org/intermine/task/MergeSourceModelsTask.java", "license": "lgpl-2.1", "size": 6870 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,401,307
public void handleMouseInput() throws IOException { this.field_154330_a.mouseEvent(); super.handleMouseInput(); }
void function() throws IOException { this.field_154330_a.mouseEvent(); super.handleMouseInput(); }
/** * Handles mouse input. */
Handles mouse input
handleMouseInput
{ "repo_name": "dogjaw2233/tiu-s-mod", "path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/GuiScreenRealmsProxy.java", "license": "lgpl-2.1", "size": 7771 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
782,903
EClass getproductionschema2petrinetConjunctiveNode();
EClass getproductionschema2petrinetConjunctiveNode();
/** * Returns the meta object for class '{@link de.mdelab.mltgg.productionschema2petrinet.generated.productionschema2petrinetConjunctiveNode <em>productionschema2petrinet Conjunctive Node</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>productionschema2petrinet...
Returns the meta object for class '<code>de.mdelab.mltgg.productionschema2petrinet.generated.productionschema2petrinetConjunctiveNode productionschema2petrinet Conjunctive Node</code>'.
getproductionschema2petrinetConjunctiveNode
{ "repo_name": "Somae/mdsd-factory-project", "path": "transformation/de.mdelab.languages.productionschema2petrinet/src-gen/de/mdelab/mltgg/productionschema2petrinet/generated/GeneratedPackage.java", "license": "gpl-3.0", "size": 283384 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,551,708
@Override public String getText(Object object) { Vertex vertex = (Vertex)object; return getString("_UI_Vertex_type") + " " + vertex.getX(); }
String function(Object object) { Vertex vertex = (Vertex)object; return getString(STR) + " " + vertex.getX(); }
/** * 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": "jarrah42/eavp", "path": "org.eclipse.january.geometry.model.edit/src/org/eclipse/january/geometry/provider/VertexItemProvider.java", "license": "epl-1.0", "size": 6477 }
[ "org.eclipse.january.geometry.Vertex" ]
import org.eclipse.january.geometry.Vertex;
import org.eclipse.january.geometry.*;
[ "org.eclipse.january" ]
org.eclipse.january;
791,365
private void handleReplicationSynchronization(ReplicationSyncFileMessage msg) throws Exception { long id = msg.getId(); byte[] data = msg.getData(); SequentialFile channel1; switch (msg.getFileType()) { case LARGE_MESSAGE: { ReplicatedLargeMessage largeMessage = lookupLar...
void function(ReplicationSyncFileMessage msg) throws Exception { long id = msg.getId(); byte[] data = msg.getData(); SequentialFile channel1; switch (msg.getFileType()) { case LARGE_MESSAGE: { ReplicatedLargeMessage largeMessage = lookupLargeMessage(id, false, false); if (!(largeMessage instanceof LargeServerMessageInS...
/** * Receives 'raw' journal/page/large-message data from live server for synchronization of logs. * * @param msg * @throws Exception */
Receives 'raw' journal/page/large-message data from live server for synchronization of logs
handleReplicationSynchronization
{ "repo_name": "andytaylor/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java", "license": "apache-2.0", "size": 34242 }
[ "java.nio.ByteBuffer", "java.nio.channels.FileChannel", "org.apache.activemq.artemis.core.io.SequentialFile", "org.apache.activemq.artemis.core.paging.impl.Page", "org.apache.activemq.artemis.core.persistence.impl.journal.LargeServerMessageInSync", "org.apache.activemq.artemis.core.protocol.core.impl.wire...
import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import org.apache.activemq.artemis.core.io.SequentialFile; import org.apache.activemq.artemis.core.paging.impl.Page; import org.apache.activemq.artemis.core.persistence.impl.journal.LargeServerMessageInSync; import org.apache.activemq.artemis.core.protoc...
import java.nio.*; import java.nio.channels.*; import org.apache.activemq.artemis.core.io.*; import org.apache.activemq.artemis.core.paging.impl.*; import org.apache.activemq.artemis.core.persistence.impl.journal.*; import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.*; import org.apache.activemq.arte...
[ "java.nio", "org.apache.activemq" ]
java.nio; org.apache.activemq;
604,656
@Test public void encryptPasswordSuccessTest() { final String symmetricKey = "password"; final String value = "property"; new EncryptProperty(); final String encryptValue = EncryptProperty.encryptValue(symmetricKey, value); new EncryptProperty(); assertEquals(value, EncryptProperty.decryptValue(symmetri...
void function() { final String symmetricKey = STR; final String value = STR; new EncryptProperty(); final String encryptValue = EncryptProperty.encryptValue(symmetricKey, value); new EncryptProperty(); assertEquals(value, EncryptProperty.decryptValue(symmetricKey, encryptValue)); }
/** * Encrypt password success test. */
Encrypt password success test
encryptPasswordSuccessTest
{ "repo_name": "Hack23/cia", "path": "encrypt.properties/src/test/java/com/hack23/cia/encryption/properties/EncryptPropertyTest.java", "license": "apache-2.0", "size": 2746 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,869,762
public final void storePlacementInfo( PersistHelper helper, Element parent, boolean hidden ) { Document doc = parent.getOwnerDocument(); Element nodeElement = doc.createElement(this.getStoreElementName()); nodeElement.setAttribute("type", this.getStoreType()); Strin...
final void function( PersistHelper helper, Element parent, boolean hidden ) { Document doc = parent.getOwnerDocument(); Element nodeElement = doc.createElement(this.getStoreElementName()); nodeElement.setAttribute("type", this.getStoreType()); String kind = getStoreKind(); if (kind != null && ! kind.equals(STRkind", ki...
/** * Saves placement information about this placeable node. * @param hidden If this node should be hidden or not. * @return A XML representation of the layout information. */
Saves placement information about this placeable node
storePlacementInfo
{ "repo_name": "vnu-dse/rtl", "path": "src/gui/org/tzi/use/gui/views/diagrams/PlaceableNode.java", "license": "gpl-2.0", "size": 17275 }
[ "org.tzi.use.gui.util.PersistHelper", "org.tzi.use.gui.xmlparser.LayoutTags", "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.tzi.use.gui.util.PersistHelper; import org.tzi.use.gui.xmlparser.LayoutTags; import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.tzi.use.gui.util.*; import org.tzi.use.gui.xmlparser.*; import org.w3c.dom.*;
[ "org.tzi.use", "org.w3c.dom" ]
org.tzi.use; org.w3c.dom;
2,200,694
public Observable<ServiceResponse<RouteFilterInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and...
Observable<ServiceResponse<RouteFilterInner>> function(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (routeFilterName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscri...
/** * Creates or updates a route filter in a specified resource group. * * @param resourceGroupName The name of the resource group. * @param routeFilterName The name of the route filter. * @param routeFilterParameters Parameters supplied to the create or update route filter operation. * @t...
Creates or updates a route filter in a specified resource group
createOrUpdateWithServiceResponseAsync
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java", "license": "mit", "size": 69813 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponse", "com.microsoft.rest.Validator" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
2,603,796
public void readSolution(String filename) { Scanner scr; try { scr = new Scanner(new FileInputStream(filename)); double readObj = scr.nextDouble(); if (readObj != -1) { ArrayList<Integer> readX = new ArrayList<Integer>(); while (scr.hasNextInt()) { readX.add(scr.nextInt()); } Arra...
void function(String filename) { Scanner scr; try { scr = new Scanner(new FileInputStream(filename)); double readObj = scr.nextDouble(); if (readObj != -1) { ArrayList<Integer> readX = new ArrayList<Integer>(); while (scr.hasNextInt()) { readX.add(scr.nextInt()); } ArrayList<Integer> readR = new ArrayList<Integer>(); f...
/** * Read a solution from the given filename * * @param filename to read */
Read a solution from the given filename
readSolution
{ "repo_name": "midkiffj/knapsacks", "path": "src/Solutions/UnconstrainedSol.java", "license": "gpl-3.0", "size": 9082 }
[ "java.io.FileInputStream", "java.io.FileNotFoundException", "java.util.ArrayList", "java.util.Scanner" ]
import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Scanner;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,717,503
public static String getInAddress(String ipAddress) throws PermErrorException { if (ipAddress == null) { throw new PermErrorException( "IP is not a valid ipv4 or ipv6 address"); } else if (Inet6Util.isValidIPV4Address(ipAddress)) { return "in-a...
static String function(String ipAddress) throws PermErrorException { if (ipAddress == null) { throw new PermErrorException( STR); } else if (Inet6Util.isValidIPV4Address(ipAddress)) { return STR; } else if (Inet6Util.isValidIP6Address(ipAddress)) { return "ip6"; } else { throw new PermErrorException( STR); } }
/** * This method return the InAddress for the given ip. * * @param ipAddress - * ipAddress that should be processed * @return the inAddress (in-addr or ip6) * @throws PermErrorException * if the ipAddress is not valid (rfc conform) */
This method return the InAddress for the given ip
getInAddress
{ "repo_name": "chibenwa/james-jspf", "path": "resolver/src/main/java/org/apache/james/jspf/core/IPAddr.java", "license": "apache-2.0", "size": 15018 }
[ "org.apache.james.jspf.core.exceptions.PermErrorException" ]
import org.apache.james.jspf.core.exceptions.PermErrorException;
import org.apache.james.jspf.core.exceptions.*;
[ "org.apache.james" ]
org.apache.james;
858,228
public void loadUrl(String url, JSONObject props) throws JSONException { LOG.d("App", "App.loadUrl("+url+","+props+")"); int wait = 0; boolean openExternal = false; boolean clearHistory = false; // If there are properties, then set them on the Activity HashMap<String...
void function(String url, JSONObject props) throws JSONException { LOG.d("App", STR+url+","+props+")"); int wait = 0; boolean openExternal = false; boolean clearHistory = false; HashMap<String, Object> params = new HashMap<String, Object>(); if (props != null) { JSONArray keys = props.names(); for (int i = 0; i < keys....
/** * Load the url into the webview. * * @param url * @param props Properties that can be passed in to the Cordova activity (i.e. loadingDialog, wait, ...) * @throws JSONException */
Load the url into the webview
loadUrl
{ "repo_name": "GroupAhead/cordova-android", "path": "framework/src/org/apache/cordova/CoreAndroid.java", "license": "apache-2.0", "size": 14968 }
[ "java.util.HashMap", "org.json.JSONArray", "org.json.JSONException", "org.json.JSONObject" ]
import java.util.HashMap; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject;
import java.util.*; import org.json.*;
[ "java.util", "org.json" ]
java.util; org.json;
314,377
CommandLineConfig setOutputManifest(List<String> outputManifests) { this.outputManifests = new ArrayList<>(); for (String manifestName : outputManifests) { if (!manifestName.isEmpty()) { this.outputManifests.add(manifestName); } } this.outputManifests = ImmutableLis...
CommandLineConfig setOutputManifest(List<String> outputManifests) { this.outputManifests = new ArrayList<>(); for (String manifestName : outputManifests) { if (!manifestName.isEmpty()) { this.outputManifests.add(manifestName); } } this.outputManifests = ImmutableList.copyOf(this.outputManifests); return this; } private...
/** * Sets whether to print output manifest files. * Filter out empty file names. */
Sets whether to print output manifest files. Filter out empty file names
setOutputManifest
{ "repo_name": "lgeorgieff/closure-compiler", "path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java", "license": "apache-2.0", "size": 83284 }
[ "com.google.common.collect.ImmutableList", "java.util.ArrayList", "java.util.List" ]
import com.google.common.collect.ImmutableList; import java.util.ArrayList; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,857,938
@Test public void TestCommandLineXmlProcessorCalabash_setSaxonProcessor_professionalEdition() { SaxonProcessor expected = SaxonProcessor.pe; // Change the value of SaxonProcessor processor.setSaxonProcessor(expected); // Check that the active value has changed, as specified. assertEquals(expected...
void function() { SaxonProcessor expected = SaxonProcessor.pe; processor.setSaxonProcessor(expected); assertEquals(expected, processor.getSaxonProcessor()); }
/** * Check that it's possible to change the version of Saxon used by CommandLineXmlProcessorCalabash. */
Check that it's possible to change the version of Saxon used by CommandLineXmlProcessorCalabash
TestCommandLineXmlProcessorCalabash_setSaxonProcessor_professionalEdition
{ "repo_name": "martian-a/gourd", "path": "src/test/java/com/kaikoda/gourd/TestCommandLineXmlProcessorCalabash.java", "license": "gpl-3.0", "size": 20598 }
[ "com.kaikoda.gourd.CommandLineXmlProcessorCalabash", "org.junit.Assert" ]
import com.kaikoda.gourd.CommandLineXmlProcessorCalabash; import org.junit.Assert;
import com.kaikoda.gourd.*; import org.junit.*;
[ "com.kaikoda.gourd", "org.junit" ]
com.kaikoda.gourd; org.junit;
2,701,620
@ApiModelProperty(value = "") public Boolean getKeepLog() { return keepLog; }
@ApiModelProperty(value = "") Boolean function() { return keepLog; }
/** * Get keepLog * @return keepLog **/
Get keepLog
getKeepLog
{ "repo_name": "cliffano/swaggy-jenkins", "path": "clients/java-pkmst/generated/src/main/java/com/prokarma/pkmst/model/FreeStyleBuild.java", "license": "mit", "size": 11658 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,449,092
TypedArray typedArray = mContext.obtainStyledAttributes(attrs, R.styleable.ProgressPicture, 0, 0); try { animationType = typedArray.getInt(R.styleable.ProgressPicture_animation, 0); attachAnimation(animationType); } catch (Exception e) { e.printStackTrace(); ...
TypedArray typedArray = mContext.obtainStyledAttributes(attrs, R.styleable.ProgressPicture, 0, 0); try { animationType = typedArray.getInt(R.styleable.ProgressPicture_animation, 0); attachAnimation(animationType); } catch (Exception e) { e.printStackTrace(); } }
/** * Function to handle xml attributes * * @param attrs XML attributes */
Function to handle xml attributes
handelAttributes
{ "repo_name": "mmoamenn/ProgressImage_Android", "path": "progressimage/src/main/java/com/bluehomestudio/progressimage/ProgressPicture.java", "license": "mit", "size": 4674 }
[ "android.content.res.TypedArray" ]
import android.content.res.TypedArray;
import android.content.res.*;
[ "android.content" ]
android.content;
1,868,840
public List<Link> getNavigationBindings() { return bindingLinks; }
List<Link> function() { return bindingLinks; }
/** * Gets binding links. * * @return links. */
Gets binding links
getNavigationBindings
{ "repo_name": "AperIati/olingo-odata4", "path": "lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Linked.java", "license": "apache-2.0", "size": 2859 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,799,425
void saveImpl(Bundle saved, String prefix) throws NotBoundException;
void saveImpl(Bundle saved, String prefix) throws NotBoundException;
/** * The implementation of UriBound.saveImpl. * @param saved the bundle to save to * @param prefix the prefix to load with * @throws NotBoundException if the data isn't bound */
The implementation of UriBound.saveImpl
saveImpl
{ "repo_name": "interdroid/interdroid-vdb-avro", "path": "src/interdroid/vdb/avro/model/UriBoundAdapter.java", "license": "bsd-3-clause", "size": 5199 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
970,509
private void storeClone( DBconnection conn ) throws InvalidActionException, SQLException { if ( hasClone() ) { if ( clone.get_clone_id() == null ) { // store new clone data clone.store( conn ); // add log message that clone was inserted InsertLogger.log( "Inserted clone " + clone.get_name() + ...
void function( DBconnection conn ) throws InvalidActionException, SQLException { if ( hasClone() ) { if ( clone.get_clone_id() == null ) { clone.store( conn ); InsertLogger.log( STR + clone.get_name() + STR + clone.get_vector_type() + "]" + STR + clone.get_insert_type() + "]" + STR + clone.get_clone_id() + STR ); } ger...
/** * Stores germplasm's association to clone data. Clone data will be * INSERTed if no record exists for clone, however existing clone data * will not be UPDATEd. May have to change this depending on requirements * on online curation tool. * * @param conn A database connection with UPDATE...
Stores germplasm's association to clone data. Clone data will be INSERTed if no record exists for clone, however existing clone data will not be UPDATEd. May have to change this depending on requirements on online curation tool
storeClone
{ "repo_name": "tair/tairwebapp", "path": "src/org/tair/processor/microarray/data/LoadableGermplasm.java", "license": "gpl-3.0", "size": 16055 }
[ "java.sql.SQLException", "org.tair.tfc.DBconnection", "org.tair.utilities.InvalidActionException" ]
import java.sql.SQLException; import org.tair.tfc.DBconnection; import org.tair.utilities.InvalidActionException;
import java.sql.*; import org.tair.tfc.*; import org.tair.utilities.*;
[ "java.sql", "org.tair.tfc", "org.tair.utilities" ]
java.sql; org.tair.tfc; org.tair.utilities;
173,007
public @NotNull Message decode(@NotNull XMLStreamReader reader, @NotNull AttachmentSet att);
@NotNull Message function(@NotNull XMLStreamReader reader, @NotNull AttachmentSet att);
/** * Reads events from {@link XMLStreamReader} and constructs a * {@link Message} for SOAP envelope. * * @param reader that represents SOAP envelope infoset * @param att attachments for the message * @return a {@link Message} for SOAP envelope */
Reads events from <code>XMLStreamReader</code> and constructs a <code>Message</code> for SOAP envelope
decode
{ "repo_name": "FauxFaux/jdk9-jaxws", "path": "src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/pipe/StreamSOAPCodec.java", "license": "gpl-2.0", "size": 2478 }
[ "com.sun.istack.internal.NotNull", "com.sun.xml.internal.ws.api.message.AttachmentSet", "com.sun.xml.internal.ws.api.message.Message", "javax.xml.stream.XMLStreamReader" ]
import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.api.message.AttachmentSet; import com.sun.xml.internal.ws.api.message.Message; import javax.xml.stream.XMLStreamReader;
import com.sun.istack.internal.*; import com.sun.xml.internal.ws.api.message.*; import javax.xml.stream.*;
[ "com.sun.istack", "com.sun.xml", "javax.xml" ]
com.sun.istack; com.sun.xml; javax.xml;
1,015,374
public List<UpdatedContainerInfo> pullContainerUpdates();
List<UpdatedContainerInfo> function();
/** * Get and clear the list of containerUpdates accumulated across NM * heartbeats. * * @return containerUpdates accumulated across NM heartbeats. */
Get and clear the list of containerUpdates accumulated across NM heartbeats
pullContainerUpdates
{ "repo_name": "apurtell/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmnode/RMNode.java", "license": "apache-2.0", "size": 6149 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,763,580
public ServiceFuture<TaskInner> getDetailsAsync(String resourceGroupName, String registryName, String taskName, final ServiceCallback<TaskInner> serviceCallback) { return ServiceFuture.fromResponse(getDetailsWithServiceResponseAsync(resourceGroupName, registryName, taskName), serviceCallback); }
ServiceFuture<TaskInner> function(String resourceGroupName, String registryName, String taskName, final ServiceCallback<TaskInner> serviceCallback) { return ServiceFuture.fromResponse(getDetailsWithServiceResponseAsync(resourceGroupName, registryName, taskName), serviceCallback); }
/** * Returns a task with extended information that includes all secrets. * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param taskName The name of the container registry task. ...
Returns a task with extended information that includes all secrets
getDetailsAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerregistry/mgmt-v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/TasksInner.java", "license": "mit", "size": 62508 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,589,875
protected List<Map<String, Object>> getSavedAllocation() { return savedAllocation; }
List<Map<String, Object>> function() { return savedAllocation; }
/** * Gets the saved allocation. * * @return the saved allocation */
Gets the saved allocation
getSavedAllocation
{ "repo_name": "hieuvt/tccloudsim", "path": "sources/org/cloudbus/cloudsim/power/PowerVmAllocationPolicyMigrationAbstract.java", "license": "lgpl-3.0", "size": 20796 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
121,589
public T1 caseESharableResourceEffect(ESharableResourceEffect object) { return null; }
T1 function(ESharableResourceEffect object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>ESharable Resource Effect</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the...
Returns the result of interpreting the object as an instance of 'ESharable Resource Effect'. This implementation returns null; returning a non-null result will terminate the switch.
caseESharableResourceEffect
{ "repo_name": "nasa/OpenSPIFe", "path": "gov.nasa.ensemble.dictionary/src/gov/nasa/ensemble/dictionary/util/DictionarySwitch.java", "license": "apache-2.0", "size": 46564 }
[ "gov.nasa.ensemble.dictionary.ESharableResourceEffect" ]
import gov.nasa.ensemble.dictionary.ESharableResourceEffect;
import gov.nasa.ensemble.dictionary.*;
[ "gov.nasa.ensemble" ]
gov.nasa.ensemble;
2,612,990
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) { super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn); this.skeletonHead.rotate...
void function(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) { super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn); this.skeletonHead.rotateAngleY = netHeadYaw * 0.017453292F; this...
/** * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how * "far" arms and legs can swing at most. */
Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how "far" arms and legs can swing at most
setRotationAngles
{ "repo_name": "scribblemaniac/AwakenDreamsClient", "path": "mcp/src/minecraft/net/minecraft/client/model/ModelSkeletonHead.java", "license": "gpl-3.0", "size": 1761 }
[ "net.minecraft.entity.Entity" ]
import net.minecraft.entity.Entity;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
719,095
public static Collection<MRU> getDisplayableMRUs(final String userName) { final Collection<MRU> allMRUs = MRUController.getMRUs(userName); final List<MRU> displayableMRUs = new LinkedList<MRU>(); for (final MRU mru : allMRUs) { if (MRUController.isDisplayable(mru)) { ...
static Collection<MRU> function(final String userName) { final Collection<MRU> allMRUs = MRUController.getMRUs(userName); final List<MRU> displayableMRUs = new LinkedList<MRU>(); for (final MRU mru : allMRUs) { if (MRUController.isDisplayable(mru)) { displayableMRUs.add(mru); if (displayableMRUs.size() >= 10) { break; ...
/** * MRUController.getDisplayableMRUs Used to make the menus * * @param userName * @return */
MRUController.getDisplayableMRUs Used to make the menus
getDisplayableMRUs
{ "repo_name": "homiak/pims-lims", "path": "src/presentation/org/pimslims/presentation/mru/MRUController.java", "license": "bsd-2-clause", "size": 13900 }
[ "java.util.Collection", "java.util.LinkedList", "java.util.List" ]
import java.util.Collection; import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,801,042
void selectInTable(String pComponentName, String pColumnName, String pColumnValue) throws QTasteException;
void selectInTable(String pComponentName, String pColumnName, String pColumnValue) throws QTasteException;
/** * Select the row with the first occurrence of the value for the specified column in the {@link JTable}. * Can be used on {@link JTable}. * * @param pComponentName The {@link JTable}'s name. * @param pColumnName The column's name. * @param pColumnValue The value. */
Select the row with the first occurrence of the value for the specified column in the <code>JTable</code>. Can be used on <code>JTable</code>
selectInTable
{ "repo_name": "qspin/qtaste", "path": "plugins_src/javagui/src/main/java/com/qspin/qtaste/javagui/JavaGUI.java", "license": "lgpl-3.0", "size": 21383 }
[ "com.qspin.qtaste.testsuite.QTasteException" ]
import com.qspin.qtaste.testsuite.QTasteException;
import com.qspin.qtaste.testsuite.*;
[ "com.qspin.qtaste" ]
com.qspin.qtaste;
99,311
private Widget createDisclosureContentWidget(MeasureNoteDTO result) { TextBox title = new TextBox(); title.setTitle("Title"); title.setTitle("Measure Notes Title"); title.getElement().setAttribute("id", "NoteTitle_"+result.getId()); title.setWidth("400px"); title.setMaxLength(50); //TextAreaWithMaxLeng...
Widget function(MeasureNoteDTO result) { TextBox title = new TextBox(); title.setTitle("Title"); title.setTitle(STR); title.getElement().setAttribute("id", STR+result.getId()); title.setWidth("400px"); title.setMaxLength(50); RichTextArea editTextArea = new RichTextArea(); RichTextToolbar editToolbar = new RichTextTool...
/** * Creates the disclosure content widget. * * @param result * the result * @return the widget */
Creates the disclosure content widget
createDisclosureContentWidget
{ "repo_name": "JaLandry/MeasureAuthoringTool_LatestSprint", "path": "mat/src/mat/client/measure/MeasureNotesView.java", "license": "apache-2.0", "size": 27945 }
[ "com.google.gwt.user.client.ui.Button", "com.google.gwt.user.client.ui.HasHorizontalAlignment", "com.google.gwt.user.client.ui.HorizontalPanel", "com.google.gwt.user.client.ui.Label", "com.google.gwt.user.client.ui.RichTextArea", "com.google.gwt.user.client.ui.TextBox", "com.google.gwt.user.client.ui.Ve...
import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.HasHorizontalAlignment; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RichTextArea; import com.google.gwt.user.client.ui.TextBox; import com.google.g...
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
996,792
public void addValue(double value) { maxInput++; average = maxInput / buckets; int histSize = histogram.size(); if (histSize < buckets) { for (Bucket bucket : histogram) { if (bucket.getLeftBorder() == value) { bucket.incCount(); return; } } Bucket...
void function(double value) { maxInput++; average = maxInput / buckets; int histSize = histogram.size(); if (histSize < buckets) { for (Bucket bucket : histogram) { if (bucket.getLeftBorder() == value) { bucket.incCount(); return; } } Bucket bucket = new Bucket(value); histogram.add(bucket); return; } if (!sorted) { Co...
/** * Add an double value to histogram. Create extra bucket till no bucket are empty. * check the chiSquare if all buckets filled and repartition the histogram. * @param value a double value */
Add an double value to histogram. Create extra bucket till no bucket are empty. check the chiSquare if all buckets filled and repartition the histogram
addValue
{ "repo_name": "LichtiNam/DynHist", "path": "src/main/java/de/fuberlin/dynhist/CompressedHistogramImpl.java", "license": "mit", "size": 4202 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
499,965
final Scheduler scheduler = getScheduler(); List<ScheduledTask> jobs = getScheduledTasks(scheduler, true, null); return jobs; }
final Scheduler scheduler = getScheduler(); List<ScheduledTask> jobs = getScheduledTasks(scheduler, true, null); return jobs; }
/** * * Lists all jobs scheduled through the standard scheduler, the standard scheduler * let you run multiple jobs in parallel * * @return */
Lists all jobs scheduled through the standard scheduler, the standard scheduler let you run multiple jobs in parallel
getScheduledTasks
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/dotmarketing/quartz/QuartzUtils.java", "license": "gpl-3.0", "size": 24729 }
[ "java.util.List", "org.quartz.Scheduler" ]
import java.util.List; import org.quartz.Scheduler;
import java.util.*; import org.quartz.*;
[ "java.util", "org.quartz" ]
java.util; org.quartz;
2,876,292
@Override public void initModule() throws ModuleInitializationException { // pidNamespace (required, 1-17 chars, a-z, A-Z, 0-9 '-' '.') m_pidNamespace = getParameter("pidNamespace"); if (m_pidNamespace == null) { throw new ModuleInitializationException( "p...
void function() throws ModuleInitializationException { m_pidNamespace = getParameter(STR); if (m_pidNamespace == null) { throw new ModuleInitializationException( STR, getRole()); } if (m_pidNamespace.length() > 17 m_pidNamespace.length() < 1) { throw new ModuleInitializationException( STR, getRole()); } StringBuffer ba...
/** * Gets initial param values. */
Gets initial param values
initModule
{ "repo_name": "andreasnef/fcrepo", "path": "fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultDOManager.java", "license": "apache-2.0", "size": 91385 }
[ "org.fcrepo.server.Server", "org.fcrepo.server.errors.ModuleInitializationException", "org.fcrepo.server.validation.DOValidator" ]
import org.fcrepo.server.Server; import org.fcrepo.server.errors.ModuleInitializationException; import org.fcrepo.server.validation.DOValidator;
import org.fcrepo.server.*; import org.fcrepo.server.errors.*; import org.fcrepo.server.validation.*;
[ "org.fcrepo.server" ]
org.fcrepo.server;
2,383,793
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<BalanceInner> getForBillingPeriodByBillingAccountAsync( String billingAccountId, String billingPeriodName) { return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName) .flatMap( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<BalanceInner> function( String billingAccountId, String billingPeriodName) { return getForBillingPeriodByBillingAccountWithResponseAsync(billingAccountId, billingPeriodName) .flatMap( (Response<BalanceInner> res) -> { if (res.getValue() != null) { return Mono.just(res.ge...
/** * Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only * for May 1, 2014 or later. * * @param billingAccountId BillingAccount ID. * @param billingPeriodName Billing Period Name. * @throws IllegalArgumentException thrown if param...
Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later
getForBillingPeriodByBillingAccountAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/BalancesClientImpl.java", "license": "mit", "size": 16549 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.consumption.fluent.models.BalanceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.consumption.fluent.models.BalanceInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.consumption.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,289,104
private static void validateGeometry(String wellKnownText) { JtsSpatialContextFactory spatialContextFactory = new JtsSpatialContextFactory(); spatialContextFactory.normWrapLongitude = true; spatialContextFactory.srid = 4326; spatialContextFactory.datelineRule = DatelineRule.ccwRect; WKTReader rea...
static void function(String wellKnownText) { JtsSpatialContextFactory spatialContextFactory = new JtsSpatialContextFactory(); spatialContextFactory.normWrapLongitude = true; spatialContextFactory.srid = 4326; spatialContextFactory.datelineRule = DatelineRule.ccwRect; WKTReader reader = new WKTReader(spatialContextFacto...
/** * Verify that we have indeed a wellKnownText parameter. * See <a href="https://en.wikipedia.org/wiki/Well-known_text">Wikipedia</a> for basic WKT specs. * The validation implemented does both syntactic and topological validation (for polygons only). */
Verify that we have indeed a wellKnownText parameter. See Wikipedia for basic WKT specs. The validation implemented does both syntactic and topological validation (for polygons only)
validateGeometry
{ "repo_name": "gbif/gbif-api", "path": "src/main/java/org/gbif/api/util/SearchTypeValidator.java", "license": "apache-2.0", "size": 15818 }
[ "java.text.ParseException", "org.locationtech.jts.geom.Geometry", "org.locationtech.jts.geom.Polygon", "org.locationtech.jts.operation.valid.IsValidOp", "org.locationtech.spatial4j.context.jts.DatelineRule", "org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory", "org.locationtech.spatial4j.e...
import java.text.ParseException; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Polygon; import org.locationtech.jts.operation.valid.IsValidOp; import org.locationtech.spatial4j.context.jts.DatelineRule; import org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory; import org.loca...
import java.text.*; import org.locationtech.jts.geom.*; import org.locationtech.jts.operation.valid.*; import org.locationtech.spatial4j.context.jts.*; import org.locationtech.spatial4j.exception.*; import org.locationtech.spatial4j.io.*; import org.locationtech.spatial4j.shape.*; import org.locationtech.spatial4j.shap...
[ "java.text", "org.locationtech.jts", "org.locationtech.spatial4j" ]
java.text; org.locationtech.jts; org.locationtech.spatial4j;
2,553,206
Observable<ServiceResponse<Void>> arrayStringTsvValidWithServiceResponseAsync(); void arrayStringTsvValid(List<String> arrayQuery);
Observable<ServiceResponse<Void>> arrayStringTsvValidWithServiceResponseAsync(); void arrayStringTsvValid(List<String> arrayQuery);
/** * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &amp;=+$,/?#[]end' , null, ''] using the tsv-array format. * * @param arrayQuery an array of string ['ArrayQuery1', 'begin!*'();:@ &amp;=+$,/?#[]end' , null, ''] using the tsv-array format */
Get an array of string ['ArrayQuery1', 'begin!*'();:@ &amp;=+$,/?#[]end' , null, ''] using the tsv-array format
arrayStringTsvValid
{ "repo_name": "yugangw-msft/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/Queries.java", "license": "mit", "size": 53223 }
[ "com.microsoft.rest.ServiceResponse", "java.util.List" ]
import com.microsoft.rest.ServiceResponse; import java.util.List;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
1,955,374
@Transactional(readOnly = true) public String getConceptName(Integer conceptId, String localeKey);
@Transactional(readOnly = true) String function(Integer conceptId, String localeKey);
/** * Gets the name of a concept with a given id. * * @param conceptId * the concept id. * @param localeKey * the locale key. * @return the concept name. */
Gets the name of a concept with a given id
getConceptName
{ "repo_name": "christianrafael/buendia", "path": "third_party/openmrs-module-xforms/api/src/main/java/org/openmrs/module/xforms/XformsService.java", "license": "apache-2.0", "size": 7945 }
[ "org.springframework.transaction.annotation.Transactional" ]
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.annotation.*;
[ "org.springframework.transaction" ]
org.springframework.transaction;
703,411
public void setColor(Color color) { if (color == null) return; currentColor = color; currentPaint = color; }
void function(Color color) { if (color == null) return; currentColor = color; currentPaint = color; }
/** * Sets the current color and the current paint. Calls writePaint(Color). * * @param color * to be set */
Sets the current color and the current paint. Calls writePaint(Color)
setColor
{ "repo_name": "nickmain/xmind", "path": "bundles/org.xmind.org.freehep.vectorgraphics/src/org/xmind/org/freehep/graphics2d/AbstractVectorGraphics.java", "license": "epl-1.0", "size": 26481 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
71,675
@ReadOperation public Ticket getToken( @Selector final String token) { try { val ticketId = extractAccessTokenFrom(token); return centralAuthenticationService.getTicket(ticketId, Ticket.class); } catch (final Exception e) { LOGGER.debug("Ticket...
Ticket function( final String token) { try { val ticketId = extractAccessTokenFrom(token); return centralAuthenticationService.getTicket(ticketId, Ticket.class); } catch (final Exception e) { LOGGER.debug(STR, token); return null; } }
/** * Gets access token. * * @param token the token id * @return the access token */
Gets access token
getToken
{ "repo_name": "pdrados/cas", "path": "support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/mgmt/OAuth20TokenManagementEndpoint.java", "license": "apache-2.0", "size": 3282 }
[ "org.apereo.cas.ticket.Ticket" ]
import org.apereo.cas.ticket.Ticket;
import org.apereo.cas.ticket.*;
[ "org.apereo.cas" ]
org.apereo.cas;
1,304,126
public void setFlags(String flagsAsString) { String[] flagsArray = flagsAsString.split(","); this.flags = new Flag[flagsArray.length]; for (int i = 0; i < flagsArray.length; i++) { this.flags[i] = Flag.valueOf(flagsArray[i]); } }
void function(String flagsAsString) { String[] flagsArray = flagsAsString.split(","); this.flags = new Flag[flagsArray.length]; for (int i = 0; i < flagsArray.length; i++) { this.flags[i] = Flag.valueOf(flagsArray[i]); } }
/** * A comma separated list of Flag to be applied by default on each cache invocation, not applicable to remote * caches. */
A comma separated list of Flag to be applied by default on each cache invocation, not applicable to remote caches
setFlags
{ "repo_name": "adessaigne/camel", "path": "components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java", "license": "apache-2.0", "size": 9915 }
[ "org.infinispan.context.Flag" ]
import org.infinispan.context.Flag;
import org.infinispan.context.*;
[ "org.infinispan.context" ]
org.infinispan.context;
2,435,757
@JsonProperty( "ssh_port" ) public void setSshPort( String sshPort ) { this.sshPort = sshPort; }
@JsonProperty( STR ) void function( String sshPort ) { this.sshPort = sshPort; }
/** * Sets ssh port. * * @param sshPort the ssh port */
Sets ssh port
setSshPort
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/policies/models/PolicySettings.java", "license": "mit", "size": 90382 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,164,929
public Component getTableCellRendererComponent (final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { setFont(null); icon.setImage((Image) value); if (isSelected) { setBackground(table.getSelectionBackground()...
Component function (final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) { setFont(null); icon.setImage((Image) value); if (isSelected) { setBackground(table.getSelectionBackground()); } else { setBackground(null); } return this; }
/** * Returns itself as the renderer. Supports the TableCellRenderer interface. * * @param table The table. * @param value The data to be rendered. * @param isSelected A boolean that indicates whether or not the cell is selected. * @param hasFocus A boolean that indicates whether or not th...
Returns itself as the renderer. Supports the TableCellRenderer interface
getTableCellRendererComponent
{ "repo_name": "mbatchelor/pentaho-reporting", "path": "engine/demo/src/main/java/org/pentaho/reporting/engine/classic/demo/ancient/demo/swingicons/ImageCellRenderer.java", "license": "lgpl-2.1", "size": 2624 }
[ "java.awt.Component", "java.awt.Image", "javax.swing.JTable" ]
import java.awt.Component; import java.awt.Image; import javax.swing.JTable;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,526,851
public void addChildrenAfter(Node children, Node node) { Preconditions.checkArgument(node == null || node.parent == this); for (Node child = children; child != null; child = child.next) { Preconditions.checkArgument(child.parent == null); child.parent = this; } Node lastSibling = children...
void function(Node children, Node node) { Preconditions.checkArgument(node == null node.parent == this); for (Node child = children; child != null; child = child.next) { Preconditions.checkArgument(child.parent == null); child.parent = this; } Node lastSibling = children.getLastSibling(); if (node != null) { Node oldNe...
/** * Add all children after 'node'. */
Add all children after 'node'
addChildrenAfter
{ "repo_name": "nicks/closure-compiler-old", "path": "src/com/google/javascript/rhino/Node.java", "license": "apache-2.0", "size": 72738 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,133,179
private void computeCGSForAll(AbstractLatticeNode currentNode) { BFSFramework bfs = new BFSFramework(this); bfs.breadthFirstSearchRev(currentNode); }
void function(AbstractLatticeNode currentNode) { BFSFramework bfs = new BFSFramework(this); bfs.breadthFirstSearchRev(currentNode); }
/** * determine which cgs(es) are satisfied by each node. * Due to the on-line character of this checking algorithm, the underlying breadth-first * search should be controlled to just examine the new nodes which have been created since * the last checking algorithm. * * @param currentNode calculate...
determine which cgs(es) are satisfied by each node. Due to the on-line character of this checking algorithm, the underlying breadth-first search should be controlled to just examine the new nodes which have been created since the last checking algorithm
computeCGSForAll
{ "repo_name": "alg-nju/mipa", "path": "src/net/sourceforge/mipa/predicatedetection/lattice/ctl/CTLLatticeChecker.java", "license": "gpl-3.0", "size": 10496 }
[ "net.sourceforge.mipa.predicatedetection.lattice.AbstractLatticeNode", "net.sourceforge.mipa.util.algorithm.bfs.BFSFramework" ]
import net.sourceforge.mipa.predicatedetection.lattice.AbstractLatticeNode; import net.sourceforge.mipa.util.algorithm.bfs.BFSFramework;
import net.sourceforge.mipa.predicatedetection.lattice.*; import net.sourceforge.mipa.util.algorithm.bfs.*;
[ "net.sourceforge.mipa" ]
net.sourceforge.mipa;
828,301
private void fillBookmarkForm() { // retrieve bookmark Bookmark bookmark = mRealm.where(Bookmark.class).equalTo(Bookmark.FIELD_ID, mBookmarkId).findFirst(); if (bookmark == null) { Timber.d("Edit bookmark activity created with bookmarkId=" + mBookmarkId + " ca...
void function() { Bookmark bookmark = mRealm.where(Bookmark.class).equalTo(Bookmark.FIELD_ID, mBookmarkId).findFirst(); if (bookmark == null) { Timber.d(STR + mBookmarkId + STR); finish(); return; } mBookmarkTitle.setText(bookmark.getTitle()); mBookmarkUrl.setText(bookmark.getUrl()); mBookmarkNotes.setText(bookmark.get...
/** * Retrieves bookmark from realm persistence and fills all form fields. */
Retrieves bookmark from realm persistence and fills all form fields
fillBookmarkForm
{ "repo_name": "nfdz/saved.io-plus-plus", "path": "Saved.io++/app/src/main/java/io/github/nfdz/savedio/EditBookmarkActivity.java", "license": "gpl-3.0", "size": 10520 }
[ "android.text.TextUtils", "io.github.nfdz.savedio.model.Bookmark", "java.util.Collections" ]
import android.text.TextUtils; import io.github.nfdz.savedio.model.Bookmark; import java.util.Collections;
import android.text.*; import io.github.nfdz.savedio.model.*; import java.util.*;
[ "android.text", "io.github.nfdz", "java.util" ]
android.text; io.github.nfdz; java.util;
1,949,502
public QName []getHeaders();
public QName []getHeaders();
/** * Returns the headers processed by the handler. */
Returns the headers processed by the handler
getHeaders
{ "repo_name": "christianchristensen/resin", "path": "modules/jaxrpc/src/javax/xml/rpc/handler/Handler.java", "license": "gpl-2.0", "size": 1828 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
2,149,584
public boolean addEdge(AndersenField m, Node n, Object q) { if (TRACK_REASONS) { if (edgesToReasons == null) edgesToReasons = new HashMap(); //if (!edgesToReasons.containsKey(Edge.get(this, n, m))) edgesToReasons.put(new Edge(this, n, m), q); ...
boolean function(AndersenField m, Node n, Object q) { if (TRACK_REASONS) { if (edgesToReasons == null) edgesToReasons = new HashMap(); edgesToReasons.put(new Edge(this, n, m), q); } n.addPredecessor(m, this); if (addedEdges == null) addedEdges = new LinkedHashMap(); Object o = addedEdges.get(m); if (o == null) { addedE...
/** Add the given successor node on the given field to the inside edge set. * Also adds a predecessor link from the successor node to this node. * Returns true if that edge didn't already exist, false otherwise. */
Add the given successor node on the given field to the inside edge set. Also adds a predecessor link from the successor node to this node
addEdge
{ "repo_name": "wctaiwan/joeq", "path": "Compil3r/Quad/MethodSummary.java", "license": "lgpl-2.1", "size": 193177 }
[ "java.util.HashMap", "java.util.LinkedHashMap", "java.util.Set" ]
import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
451,980
static native int jni_YGNodeGetInstanceCount(); private YogaNode mParent; private List<YogaNode> mChildren; private YogaMeasureFunction mMeasureFunction; private YogaBaselineFunction mBaselineFunction; private long mNativePointer; private Object mData; private final static int MARGIN = 1; private...
static native int jni_YGNodeGetInstanceCount(); private YogaNode mParent; private List<YogaNode> mChildren; private YogaMeasureFunction mMeasureFunction; private YogaBaselineFunction mBaselineFunction; private long mNativePointer; private Object mData; private final static int MARGIN = 1; private final static int PADDI...
/** * Get native instance count. Useful for testing only. */
Get native instance count. Useful for testing only
jni_YGNodeGetInstanceCount
{ "repo_name": "gunaangs/Feedonymous", "path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java", "license": "mit", "size": 22595 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,129,670
public ResourceBundle getBundle() { return getBundle(getCurrentUserLanguageCode()); }
ResourceBundle function() { return getBundle(getCurrentUserLanguageCode()); }
/** * Get ResourceBundle for the current user language */
Get ResourceBundle for the current user language
getBundle
{ "repo_name": "erwinwinder/molgenis", "path": "molgenis-data/src/main/java/org/molgenis/data/i18n/LanguageService.java", "license": "lgpl-3.0", "size": 2529 }
[ "java.util.ResourceBundle" ]
import java.util.ResourceBundle;
import java.util.*;
[ "java.util" ]
java.util;
560,532
private void processProducer(RoutingContext routingContext) { HttpServerRequest httpServerRequest = routingContext.request(); String contentType = httpServerRequest.getHeader("Content-Type") != null ? httpServerRequest.getHeader("Content-Type") : BridgeContentType.KAFKA_JSON_BINARY; ...
void function(RoutingContext routingContext) { HttpServerRequest httpServerRequest = routingContext.request(); String contentType = httpServerRequest.getHeader(STR) != null ? httpServerRequest.getHeader(STR) : BridgeContentType.KAFKA_JSON_BINARY; SourceBridgeEndpoint source = this.httpBridgeContext.getHttpSourceEndpoin...
/** * Process an HTTP request related to the producer * * @param routingContext RoutingContext instance */
Process an HTTP request related to the producer
processProducer
{ "repo_name": "rhiot/amqp-kafka-bridge", "path": "src/main/java/io/strimzi/kafka/bridge/http/HttpBridge.java", "license": "apache-2.0", "size": 23734 }
[ "io.netty.handler.codec.http.HttpResponseStatus", "io.strimzi.kafka.bridge.BridgeContentType", "io.strimzi.kafka.bridge.SourceBridgeEndpoint", "io.strimzi.kafka.bridge.http.model.HttpBridgeError", "io.vertx.core.http.HttpServerRequest", "io.vertx.ext.web.RoutingContext", "org.apache.kafka.common.seriali...
import io.netty.handler.codec.http.HttpResponseStatus; import io.strimzi.kafka.bridge.BridgeContentType; import io.strimzi.kafka.bridge.SourceBridgeEndpoint; import io.strimzi.kafka.bridge.http.model.HttpBridgeError; import io.vertx.core.http.HttpServerRequest; import io.vertx.ext.web.RoutingContext; import org.apache....
import io.netty.handler.codec.http.*; import io.strimzi.kafka.bridge.*; import io.strimzi.kafka.bridge.http.model.*; import io.vertx.core.http.*; import io.vertx.ext.web.*; import org.apache.kafka.common.serialization.*;
[ "io.netty.handler", "io.strimzi.kafka", "io.vertx.core", "io.vertx.ext", "org.apache.kafka" ]
io.netty.handler; io.strimzi.kafka; io.vertx.core; io.vertx.ext; org.apache.kafka;
2,836,596
public ServiceFuture<CheckNameAvailabilityOutputInner> checkNameAvailabilityAsync(String name, final ServiceCallback<CheckNameAvailabilityOutputInner> serviceCallback) { return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name), serviceCallback); }
ServiceFuture<CheckNameAvailabilityOutputInner> function(String name, final ServiceCallback<CheckNameAvailabilityOutputInner> serviceCallback) { return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name), serviceCallback); }
/** * Checks whether or not the given Search service name is available for use. Search service names must be globally unique since they are part of the service URI (https://&lt;name&gt;.search.windows.net). * * @param name The Search service name to validate. Search service names must only contain lowerc...
Checks whether or not the given Search service name is available for use. Search service names must be globally unique since they are part of the service URI (HREF)
checkNameAvailabilityAsync
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/ServicesInner.java", "license": "mit", "size": 85259 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,382,364
public static void main(final String[] args) throws IOException { int numChannels = 1; if (1 <= args.length) { numChannels = Integer.parseInt(args[0]); } String remoteHost = "localhost"; if (2 <= args.length) { remoteHost = args[1]...
static void function(final String[] args) throws IOException { int numChannels = 1; if (1 <= args.length) { numChannels = Integer.parseInt(args[0]); } String remoteHost = STR; if (2 <= args.length) { remoteHost = args[1]; } System.out.printf(STR, numChannels, remoteHost); final ByteBuffer buffer = ByteBuffer.allocateDi...
/** * Main method for launching the process. * * @param args passed to the process. * @throws IOException if an error occurs with the channel. */
Main method for launching the process
main
{ "repo_name": "mikeb01/Aeron", "path": "aeron-samples/src/main/java/io/aeron/samples/raw/ReceiveSendUdpPong.java", "license": "apache-2.0", "size": 3604 }
[ "io.aeron.driver.Configuration", "io.aeron.samples.raw.Common", "java.io.IOException", "java.net.InetSocketAddress", "java.nio.ByteBuffer", "java.nio.channels.DatagramChannel", "java.util.concurrent.atomic.AtomicBoolean", "org.agrona.concurrent.SigInt", "org.agrona.hints.ThreadHints" ]
import io.aeron.driver.Configuration; import io.aeron.samples.raw.Common; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.nio.channels.DatagramChannel; import java.util.concurrent.atomic.AtomicBoolean; import org.agrona.concurrent.SigInt; import org.agrona.hints.Th...
import io.aeron.driver.*; import io.aeron.samples.raw.*; import java.io.*; import java.net.*; import java.nio.*; import java.nio.channels.*; import java.util.concurrent.atomic.*; import org.agrona.concurrent.*; import org.agrona.hints.*;
[ "io.aeron.driver", "io.aeron.samples", "java.io", "java.net", "java.nio", "java.util", "org.agrona.concurrent", "org.agrona.hints" ]
io.aeron.driver; io.aeron.samples; java.io; java.net; java.nio; java.util; org.agrona.concurrent; org.agrona.hints;
150,977
public void setColorFrom(NativeCallback colorCallback) { // resets callback setColorFrom((ColorCallback<DatasetContext>) null); // stores value setValue(Property.COLOR_FROM, colorCallback); }
void function(NativeCallback colorCallback) { setColorFrom((ColorCallback<DatasetContext>) null); setValue(Property.COLOR_FROM, colorCallback); }
/** * Sets the color "from" callback. * * @param colorCallback the color "from" callback. */
Sets the color "from" callback
setColorFrom
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/sankey/SankeyDataset.java", "license": "apache-2.0", "size": 34482 }
[ "org.pepstock.charba.client.callbacks.ColorCallback", "org.pepstock.charba.client.callbacks.DatasetContext", "org.pepstock.charba.client.callbacks.NativeCallback" ]
import org.pepstock.charba.client.callbacks.ColorCallback; import org.pepstock.charba.client.callbacks.DatasetContext; import org.pepstock.charba.client.callbacks.NativeCallback;
import org.pepstock.charba.client.callbacks.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
1,529,752
public iucn_region_country[] findByiucnregionid_PrevAndNext( int whp_iucn_region_country_id, int iucn_region_id, OrderByComparator orderByComparator) throws NoSuchiucn_region_countryException, SystemException { iucn_region_country iucn_region_country = findByPrimaryKey(whp_iucn_region_country_id); Session...
iucn_region_country[] function( int whp_iucn_region_country_id, int iucn_region_id, OrderByComparator orderByComparator) throws NoSuchiucn_region_countryException, SystemException { iucn_region_country iucn_region_country = findByPrimaryKey(whp_iucn_region_country_id); Session session = null; try { session = openSessio...
/** * Returns the iucn_region_countries before and after the current iucn_region_country in the ordered set where iucn_region_id = &#63;. * * @param whp_iucn_region_country_id the primary key of the current iucn_region_country * @param iucn_region_id the iucn_region_id * @param orderByComparator the comparato...
Returns the iucn_region_countries before and after the current iucn_region_country in the ordered set where iucn_region_id = &#63;
findByiucnregionid_PrevAndNext
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/persistence/iucn_region_countryPersistenceImpl.java", "license": "gpl-2.0", "size": 60180 }
[ "com.liferay.portal.kernel.dao.orm.Session", "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.util.OrderByComparator" ]
import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*;
[ "com.liferay.portal" ]
com.liferay.portal;
1,162,411
public void onEvent(GridDhtPartitionExchangeId exchId, DiscoveryEvent discoEvt) { assert exchId.equals(this.exchId); this.discoEvt = discoEvt; evtLatch.countDown(); }
void function(GridDhtPartitionExchangeId exchId, DiscoveryEvent discoEvt) { assert exchId.equals(this.exchId); this.discoEvt = discoEvt; evtLatch.countDown(); }
/** * Event callback. * * @param exchId Exchange ID. * @param discoEvt Discovery event. */
Event callback
onEvent
{ "repo_name": "ryanzz/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java", "license": "apache-2.0", "size": 53688 }
[ "org.apache.ignite.events.DiscoveryEvent" ]
import org.apache.ignite.events.DiscoveryEvent;
import org.apache.ignite.events.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,702,443
public HashMap<String, User> getAllUsers() throws RemoteException;
HashMap<String, User> function() throws RemoteException;
/** * Restituisce tutti gli utenti registrati al Server. * * @return Un'HashMap che contiene tutti gli utenti registrati sul Server. * @throws RemoteException */
Restituisce tutti gli utenti registrati al Server
getAllUsers
{ "repo_name": "MrAsterisco/Phoenix", "path": "Phoenix-Base/src/phoenix/base/Server.java", "license": "gpl-2.0", "size": 5745 }
[ "java.rmi.RemoteException", "java.util.HashMap" ]
import java.rmi.RemoteException; import java.util.HashMap;
import java.rmi.*; import java.util.*;
[ "java.rmi", "java.util" ]
java.rmi; java.util;
491,687
static void getNumDataBytesAndNumECBytesForBlockID(int numTotalBytes, int numDataBytes, int numRSBlocks, int blockID, ...
static void getNumDataBytesAndNumECBytesForBlockID(int numTotalBytes, int numDataBytes, int numRSBlocks, int blockID, int[] numDataBytesInBlock, int[] numECBytesInBlock) throws WriterException { if (blockID >= numRSBlocks) { throw new WriterException(STR); } int numRsBlocksInGroup2 = numTotalBytes % numRSBlocks; int nu...
/** * Get number of data bytes and number of error correction bytes for block id "blockID". Store * the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of * JISX0510:2004 (p.30) */
Get number of data bytes and number of error correction bytes for block id "blockID". Store the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of JISX0510:2004 (p.30)
getNumDataBytesAndNumECBytesForBlockID
{ "repo_name": "simplezhli/Tesseract-OCR-Scanner", "path": "zxing/src/main/java/com/google/zxing/qrcode/encoder/Encoder.java", "license": "apache-2.0", "size": 23095 }
[ "com.google.zxing.WriterException" ]
import com.google.zxing.WriterException;
import com.google.zxing.*;
[ "com.google.zxing" ]
com.google.zxing;
2,809,308
void onParticipantRemoved(WaveletData waveletData, ParticipantId participant);
void onParticipantRemoved(WaveletData waveletData, ParticipantId participant);
/** * Notifies this listener that a participant has been removed. * * @param waveletData the wavelet data which the participant has been removed from * @param participant participant that was removed */
Notifies this listener that a participant has been removed
onParticipantRemoved
{ "repo_name": "vega113/incubator-wave", "path": "wave/src/main/java/org/waveprotocol/wave/model/wave/data/WaveletDataListener.java", "license": "apache-2.0", "size": 4868 }
[ "org.waveprotocol.wave.model.wave.ParticipantId" ]
import org.waveprotocol.wave.model.wave.ParticipantId;
import org.waveprotocol.wave.model.wave.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
2,227,609
private boolean updateSettings(Settings toApply, Settings.Builder target, Settings.Builder updates, String type, boolean onlyDynamic) { boolean changed = false; final Set<String> toRemove = new HashSet<>(); Settings.Builder settingsBuilder = Settings.builder(); final Predicate<String...
boolean function(Settings toApply, Settings.Builder target, Settings.Builder updates, String type, boolean onlyDynamic) { boolean changed = false; final Set<String> toRemove = new HashSet<>(); Settings.Builder settingsBuilder = Settings.builder(); final Predicate<String> canUpdate = (key) -> ( isFinalSetting(key) == fa...
/** * Updates a target settings builder with new, updated or deleted settings from a given settings builder. * * @param toApply the new settings to apply * @param target the target settings builder that the updates are applied to. All keys that have explicit null value in toApply will be * ...
Updates a target settings builder with new, updated or deleted settings from a given settings builder
updateSettings
{ "repo_name": "fred84/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/settings/AbstractScopedSettings.java", "license": "apache-2.0", "size": 33193 }
[ "java.util.HashSet", "java.util.Set", "java.util.function.Predicate" ]
import java.util.HashSet; import java.util.Set; import java.util.function.Predicate;
import java.util.*; import java.util.function.*;
[ "java.util" ]
java.util;
1,024,235
public int getEndDateNoOfDays() { calendar.setTime(endDate); return calendar.get(Calendar.DATE); }
int function() { calendar.setTime(endDate); return calendar.get(Calendar.DATE); }
/** * Returns the no. of days in endDate * * @return int */
Returns the no. of days in endDate
getEndDateNoOfDays
{ "repo_name": "blackcathacker/kc.preclean", "path": "coeus-code/src/main/java/org/kuali/coeus/common/budget/impl/calculator/Boundary.java", "license": "apache-2.0", "size": 5803 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,699,714
private static void setMethodAccessible(final Method method) { try { // // XXX Default access superclass workaround // // When a public class has a default access superclass // with public methods, these methods are accessible. // Calli...
static void function(final Method method) { try { method.setAccessible(true); } } catch (final SecurityException se) { if (!loggedAccessibleWarning) { boolean vulnerableJVM = false; try { final String specVersion = System.getProperty(STR); if (specVersion.charAt(0) == '1' && (specVersion.charAt(2) == '0' specVersion.ch...
/** * Try to make the method accessible * @param method The source arguments */
Try to make the method accessible
setMethodAccessible
{ "repo_name": "8enet/AppOpsX", "path": "opsxlib/src/main/java/com/zzzmode/appopsx/common/MethodUtils.java", "license": "mit", "size": 51215 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,235,578
protected AbstractHighlighter getConfiguredMatchHighlighter() { AbstractHighlighter searchHL = getMatchHighlighter(); searchHL.setHighlightPredicate(createMatchPredicate()); return searchHL; }
AbstractHighlighter function() { AbstractHighlighter searchHL = getMatchHighlighter(); searchHL.setHighlightPredicate(createMatchPredicate()); return searchHL; }
/** * Configures and returns the match highlighter for the current match. * * @return a highlighter configured for matching */
Configures and returns the match highlighter for the current match
getConfiguredMatchHighlighter
{ "repo_name": "trejkaz/swingx", "path": "swingx-core/src/main/java/org/jdesktop/swingx/search/AbstractSearchable.java", "license": "lgpl-2.1", "size": 23818 }
[ "org.jdesktop.swingx.decorator.AbstractHighlighter" ]
import org.jdesktop.swingx.decorator.AbstractHighlighter;
import org.jdesktop.swingx.decorator.*;
[ "org.jdesktop.swingx" ]
org.jdesktop.swingx;
1,966,986
@IgniteAsyncSupported public void run(IgniteRunnable job) throws IgniteException;
void function(IgniteRunnable job) throws IgniteException;
/** * Executes provided job on a node within the underlying cluster group. * * @param job Job closure to execute. * @throws IgniteException If execution failed. */
Executes provided job on a node within the underlying cluster group
run
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/main/java/org/apache/ignite/IgniteCompute.java", "license": "apache-2.0", "size": 36886 }
[ "org.apache.ignite.lang.IgniteRunnable" ]
import org.apache.ignite.lang.IgniteRunnable;
import org.apache.ignite.lang.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,384,724
EClass getMachine();
EClass getMachine();
/** * Returns the meta object for class '{@link datacenter.core.Machine <em>Machine</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Machine</em>'. * @see datacenter.core.Machine * @generated */
Returns the meta object for class '<code>datacenter.core.Machine Machine</code>'.
getMachine
{ "repo_name": "diverse-project/flink-datacenter", "path": "datacenter/src/datacenter/core/CorePackage.java", "license": "mit", "size": 36104 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,413,959
EOperation getTieFlowLinkControlArea__Perform_FWD__IsApplicableMatch();
EOperation getTieFlowLinkControlArea__Perform_FWD__IsApplicableMatch();
/** * Returns the meta object for the '{@link rgse.ttc17.emoflon.tgg.task2.Rules.TieFlowLinkControlArea#perform_FWD(org.moflon.tgg.runtime.IsApplicableMatch) <em>Perform FWD</em>}' operation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the '<em>Perform FWD</em>' operation. ...
Returns the meta object for the '<code>rgse.ttc17.emoflon.tgg.task2.Rules.TieFlowLinkControlArea#perform_FWD(org.moflon.tgg.runtime.IsApplicableMatch) Perform FWD</code>' operation.
getTieFlowLinkControlArea__Perform_FWD__IsApplicableMatch
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.emoflon.tgg.task2/gen/rgse/ttc17/emoflon/tgg/task2/Rules/RulesPackage.java", "license": "mit", "size": 437406 }
[ "org.eclipse.emf.ecore.EOperation" ]
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,727,870
public QueryResult queryChanges(Predicate<ChangeData> query) throws OrmException, QueryParseException { return queryChanges(ImmutableList.of(query)).get(0); }
QueryResult function(Predicate<ChangeData> query) throws OrmException, QueryParseException { return queryChanges(ImmutableList.of(query)).get(0); }
/** * Query for changes that match a structured query. * * @see #queryChanges(List) * @param query the query. * @return results of the query. */
Query for changes that match a structured query
queryChanges
{ "repo_name": "MerritCR/merrit", "path": "gerrit-server/src/main/java/com/google/gerrit/server/query/change/QueryProcessor.java", "license": "apache-2.0", "size": 8976 }
[ "com.google.common.collect.ImmutableList", "com.google.gerrit.server.query.Predicate", "com.google.gerrit.server.query.QueryParseException", "com.google.gwtorm.server.OrmException" ]
import com.google.common.collect.ImmutableList; import com.google.gerrit.server.query.Predicate; import com.google.gerrit.server.query.QueryParseException; import com.google.gwtorm.server.OrmException;
import com.google.common.collect.*; import com.google.gerrit.server.query.*; import com.google.gwtorm.server.*;
[ "com.google.common", "com.google.gerrit", "com.google.gwtorm" ]
com.google.common; com.google.gerrit; com.google.gwtorm;
2,357,712
Object addMarkedOccurrenceHighlight(int start, int end, SmartHighlightPainter p) throws BadLocationException { Document doc = textArea.getDocument(); TextUI mapper = textArea.getUI(); // Always layered highlights for marked occurrences. SyntaxLayeredHighlightInfoImpl i = new SyntaxLayeredHighlightInf...
Object addMarkedOccurrenceHighlight(int start, int end, SmartHighlightPainter p) throws BadLocationException { Document doc = textArea.getDocument(); TextUI mapper = textArea.getUI(); SyntaxLayeredHighlightInfoImpl i = new SyntaxLayeredHighlightInfoImpl(); i.setPainter(p); i.setStartOffset(doc.createPosition(start)); i...
/** * Adds a special "marked occurrence" highlight. * * @param start * @param end * @param p * @return A tag to reference the highlight later. * @throws BadLocationException * @see #clearMarkOccurrencesHighlights() */
Adds a special "marked occurrence" highlight
addMarkedOccurrenceHighlight
{ "repo_name": "fanruan/finereport-design", "path": "designer_base/src/com/fr/design/gui/syntax/ui/rsyntaxtextarea/RSyntaxTextAreaHighlighter.java", "license": "gpl-3.0", "size": 8194 }
[ "com.fr.design.gui.syntax.ui.rtextarea.SmartHighlightPainter", "javax.swing.plaf.TextUI", "javax.swing.text.BadLocationException", "javax.swing.text.Document" ]
import com.fr.design.gui.syntax.ui.rtextarea.SmartHighlightPainter; import javax.swing.plaf.TextUI; import javax.swing.text.BadLocationException; import javax.swing.text.Document;
import com.fr.design.gui.syntax.ui.rtextarea.*; import javax.swing.plaf.*; import javax.swing.text.*;
[ "com.fr.design", "javax.swing" ]
com.fr.design; javax.swing;
1,346,477
public boolean isForUser(Packet dg_pck) throws UnknownHostException { // Not really sure what a backbone should do here ;) // its always for him return true; }
boolean function(Packet dg_pck) throws UnknownHostException { return true; }
/** * A advert is for the user if the data packet being advertised has * not already been won by this node at some other auction and also * if the advert is either from this nodes associated backbone OR * any other node. (So that excludes advert from other backbones) ...
A advert is for the user if the data packet being advertised has not already been won by this node at some other auction and also if the advert is either from this nodes associated backbone OR any other node. (So that excludes advert from other backbones)
isForUser
{ "repo_name": "maniacchallenge/2013", "path": "extras/SAVMAN/maniac-simulator4/src/de/tuhh/maniac/simulator/Backbone.java", "license": "lgpl-3.0", "size": 13859 }
[ "de.fu_berlin.maniac.packet_builder.Packet", "java.net.UnknownHostException" ]
import de.fu_berlin.maniac.packet_builder.Packet; import java.net.UnknownHostException;
import de.fu_berlin.maniac.packet_builder.*; import java.net.*;
[ "de.fu_berlin.maniac", "java.net" ]
de.fu_berlin.maniac; java.net;
2,446,531
@Override public List<QualificationEntity> getQualificationsArtwork(Long idArtwork) { return persistence.findAll(null, null, idArtwork); }
List<QualificationEntity> function(Long idArtwork) { return persistence.findAll(null, null, idArtwork); }
/** * Obtiene la lista de los registros de Qualification de la obra de arte. * * @param idArtwork Id de la obra de arte a consultar las calificaciones * @return Colección de objetos de QualificationEntity. * @generated */
Obtiene la lista de los registros de Qualification de la obra de arte
getQualificationsArtwork
{ "repo_name": "Uniandes-MISO4203/artwork-201620-1", "path": "artwork-logic/src/main/java/co/edu/uniandes/csw/artwork/ejbs/QualificationLogic.java", "license": "mit", "size": 5091 }
[ "co.edu.uniandes.csw.artwork.entities.QualificationEntity", "java.util.List" ]
import co.edu.uniandes.csw.artwork.entities.QualificationEntity; import java.util.List;
import co.edu.uniandes.csw.artwork.entities.*; import java.util.*;
[ "co.edu.uniandes", "java.util" ]
co.edu.uniandes; java.util;
245,223
public InheritanceRef getInheritanceDefinition( MetaObject mc ) { InheritanceRef def = (InheritanceRef) mc.getCacheValue( INHERITANCE_REF ); if ( def == null ) { if ( !mc.hasMetaAttr( INHERITANCE_REF )) return null; Properties props = (Properties) mc.getMetaAttr( INHERITANCE_REF ).getValue(); if ( pro...
InheritanceRef function( MetaObject mc ) { InheritanceRef def = (InheritanceRef) mc.getCacheValue( INHERITANCE_REF ); if ( def == null ) { if ( !mc.hasMetaAttr( INHERITANCE_REF )) return null; Properties props = (Properties) mc.getMetaAttr( INHERITANCE_REF ).getValue(); if ( props == null ) return null; def = new Inher...
/** * Returns the inheritance definition for a given MetaClass or returns null if none exists * @param mc The MetaClass to retrieve the inheritance definition for * @return The inheritance definition or null */
Returns the inheritance definition for a given MetaClass or returns null if none exists
getInheritanceDefinition
{ "repo_name": "Draagon/draagon-metaobjects", "path": "omdb/src/main/java/com/draagon/meta/manager/db/SimpleMappingHandlerDB.java", "license": "apache-2.0", "size": 14497 }
[ "com.draagon.meta.object.MetaObject", "java.util.Properties" ]
import com.draagon.meta.object.MetaObject; import java.util.Properties;
import com.draagon.meta.object.*; import java.util.*;
[ "com.draagon.meta", "java.util" ]
com.draagon.meta; java.util;
2,097,694
protected void initEmbeddedTypePre(IStructuredModel model, IStructuredDocument structuredDocument) { initEmbeddedTypePre(model); }
void function(IStructuredModel model, IStructuredDocument structuredDocument) { initEmbeddedTypePre(model); }
/** * Method initEmbeddedType, "pre"-stage. By default simply calls the * version of this method that uses only the structured model. * * @param model * the model for which to initialize * @param structuredDocument * The structured document containing the text content for the * ...
Method initEmbeddedType, "pre"-stage. By default simply calls the version of this method that uses only the structured model
initEmbeddedTypePre
{ "repo_name": "ttimbul/eclipse.wst", "path": "bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/AbstractModelLoader.java", "license": "epl-1.0", "size": 22408 }
[ "org.eclipse.wst.sse.core.internal.provisional.IStructuredModel", "org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument" ]
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.eclipse.wst.sse.core.internal.provisional.*; import org.eclipse.wst.sse.core.internal.provisional.text.*;
[ "org.eclipse.wst" ]
org.eclipse.wst;
2,842,437
@Test public void testChangedFieldTypesWithKeyedState() throws Exception { try { testPojoSerializerUpgrade(SOURCE_A, SOURCE_C, true, true); fail("Expected a state migration exception."); } catch (Exception e) { if (CommonTestUtils.containsCause(e, StateMigrationException.class)) { // StateMigration...
void function() throws Exception { try { testPojoSerializerUpgrade(SOURCE_A, SOURCE_C, true, true); fail(STR); } catch (Exception e) { if (CommonTestUtils.containsCause(e, StateMigrationException.class)) { } else { throw e; } } }
/** * Changing field types of a POJO as keyed state should require a state migration. */
Changing field types of a POJO as keyed state should require a state migration
testChangedFieldTypesWithKeyedState
{ "repo_name": "hequn8128/flink", "path": "flink-tests/src/test/java/org/apache/flink/test/typeserializerupgrade/PojoSerializerUpgradeTest.java", "license": "apache-2.0", "size": 18027 }
[ "org.apache.flink.core.testutils.CommonTestUtils", "org.apache.flink.util.StateMigrationException", "org.junit.Assert" ]
import org.apache.flink.core.testutils.CommonTestUtils; import org.apache.flink.util.StateMigrationException; import org.junit.Assert;
import org.apache.flink.core.testutils.*; import org.apache.flink.util.*; import org.junit.*;
[ "org.apache.flink", "org.junit" ]
org.apache.flink; org.junit;
1,838,988
public boolean findContentletByIdentifier(String identifier, boolean live, long languageId, User user, boolean respectFrontendRoles);
boolean function(String identifier, boolean live, long languageId, User user, boolean respectFrontendRoles);
/** * Retrieves a contentlet from the database based on its identifier * @param identifier * @param live Retrieves the live version if false retrieves the working version * @return */
Retrieves a contentlet from the database based on its identifier
findContentletByIdentifier
{ "repo_name": "zhiqinghuang/core", "path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPIPreHook.java", "license": "gpl-3.0", "size": 46827 }
[ "com.liferay.portal.model.User" ]
import com.liferay.portal.model.User;
import com.liferay.portal.model.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,319,855
public static String changeOrgAndTag(String image) { Matcher m = IMAGE_PATTERN_FULL_PATH.matcher(image); if (m.find()) { String registry = setImageProperties(m.group("registry"), Environment.STRIMZI_REGISTRY, Environment.STRIMZI_REGISTRY_DEFAULT); String org = setImagePropert...
static String function(String image) { Matcher m = IMAGE_PATTERN_FULL_PATH.matcher(image); if (m.find()) { String registry = setImageProperties(m.group(STR), Environment.STRIMZI_REGISTRY, Environment.STRIMZI_REGISTRY_DEFAULT); String org = setImageProperties(m.group("org"), Environment.STRIMZI_ORG, Environment.STRIMZI_...
/** * The method to configure docker image to use proper docker registry, docker org and docker tag. * @param image Image that needs to be changed * @return Updated docker image with a proper registry, org, tag */
The method to configure docker image to use proper docker registry, docker org and docker tag
changeOrgAndTag
{ "repo_name": "ppatierno/kaas", "path": "systemtest/src/main/java/io/strimzi/systemtest/utils/StUtils.java", "license": "apache-2.0", "size": 20498 }
[ "io.strimzi.systemtest.Environment", "java.util.regex.Matcher" ]
import io.strimzi.systemtest.Environment; import java.util.regex.Matcher;
import io.strimzi.systemtest.*; import java.util.regex.*;
[ "io.strimzi.systemtest", "java.util" ]
io.strimzi.systemtest; java.util;
1,049,188
@Autowired(required = false) @ConfigurationPropertiesBinding public void setGenericConverters(List<GenericConverter> converters) { this.genericConverters = converters; }
@Autowired(required = false) void function(List<GenericConverter> converters) { this.genericConverters = converters; }
/** * A list of custom converters (in addition to the defaults) to use when * converting properties for binding. * @param converters the converters to set */
A list of custom converters (in addition to the defaults) to use when converting properties for binding
setGenericConverters
{ "repo_name": "ihoneymon/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBinderBuilder.java", "license": "apache-2.0", "size": 6246 }
[ "java.util.List", "org.springframework.beans.factory.annotation.Autowired", "org.springframework.core.convert.converter.GenericConverter" ]
import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.convert.converter.GenericConverter;
import java.util.*; import org.springframework.beans.factory.annotation.*; import org.springframework.core.convert.converter.*;
[ "java.util", "org.springframework.beans", "org.springframework.core" ]
java.util; org.springframework.beans; org.springframework.core;
1,924,844