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
@Override public boolean equals( final @Nullable Object obj ) { return bcelComparator.equals(this, obj); }
boolean function( final @Nullable Object obj ) { return bcelComparator.equals(this, obj); }
/** * Return value as defined by given BCELComparator strategy. * By default two method objects are said to be equal when * their names and signatures are equal. * * @see java.lang.Object#equals(java.lang.Object) */
Return value as defined by given BCELComparator strategy. By default two method objects are said to be equal when their names and signatures are equal
equals
{ "repo_name": "typetools/commons-bcel", "path": "src/main/java/org/apache/bcel/classfile/Method.java", "license": "apache-2.0", "size": 8538 }
[ "org.checkerframework.checker.nullness.qual.Nullable" ]
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.checker.nullness.qual.*;
[ "org.checkerframework.checker" ]
org.checkerframework.checker;
1,002,811
@DELETE @Path("{appId}/{key}") public void deleteIntentById(@PathParam("appId") String appId, @PathParam("key") String key) { final ApplicationId app = get(CoreService.class).getAppId(appId); Intent intent = get(IntentService.class).getIntent(Key.of(key, app...
@Path(STR) void function(@PathParam("appId") String appId, @PathParam("key") String key) { final ApplicationId app = get(CoreService.class).getAppId(appId); Intent intent = get(IntentService.class).getIntent(Key.of(key, app)); IntentService service = get(IntentService.class); if (intent == null) { intent = service .get...
/** * Withdraw intent. * Withdraws the specified intent from the system. * * @param appId application identifier * @param key intent key */
Withdraw intent. Withdraws the specified intent from the system
deleteIntentById
{ "repo_name": "rvhub/onos", "path": "web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java", "license": "apache-2.0", "size": 7552 }
[ "java.util.concurrent.CountDownLatch", "java.util.concurrent.TimeUnit", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "org.onosproject.core.ApplicationId", "org.onosproject.core.CoreService", "org.onosproject.net.intent.Intent", "org.onosproject.net.intent.IntentListener", "org.onosproject.net.intent...
import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.onosproject.core.ApplicationId; import org.onosproject.core.CoreService; import org.onosproject.net.intent.Intent; import org.onosproject.net.intent.IntentListener; import ...
import java.util.concurrent.*; import javax.ws.rs.*; import org.onosproject.core.*; import org.onosproject.net.intent.*;
[ "java.util", "javax.ws", "org.onosproject.core", "org.onosproject.net" ]
java.util; javax.ws; org.onosproject.core; org.onosproject.net;
373,610
ClusterPrincipalAssignmentInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } interface DefinitionStages { interface Blank extends WithParentResource { }
ClusterPrincipalAssignmentInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } interface DefinitionStages { interface Blank extends WithParentResource { }
/** * Gets the inner com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner object. * * @return the inner object. */
Gets the inner com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner object
innerModel
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ClusterPrincipalAssignment.java", "license": "mit", "size": 9810 }
[ "com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner" ]
import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner;
import com.azure.resourcemanager.synapse.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,459,522
public T headers() { return expression(ExpressionBuilder.headersExpression()); }
T function() { return expression(ExpressionBuilder.headersExpression()); }
/** * An expression of the inbound headers */
An expression of the inbound headers
headers
{ "repo_name": "objectiser/camel", "path": "components/camel-mock/src/main/java/org/apache/camel/component/mock/MockExpressionClauseSupport.java", "license": "apache-2.0", "size": 10358 }
[ "org.apache.camel.support.builder.ExpressionBuilder" ]
import org.apache.camel.support.builder.ExpressionBuilder;
import org.apache.camel.support.builder.*;
[ "org.apache.camel" ]
org.apache.camel;
550,930
public static TextFileChange organizeImportsChange(final IFile file) throws CoreException { sortImports = Platform.getPreferencesService().getBoolean(Activator.PLUGIN_ID, PreferenceConstants.ORG_IMPORT_SORT, true, null); addImports = Platform.getPreferencesService().getBoolean(Activator.PLUGIN_ID, PreferenceCons...
static TextFileChange function(final IFile file) throws CoreException { sortImports = Platform.getPreferencesService().getBoolean(Activator.PLUGIN_ID, PreferenceConstants.ORG_IMPORT_SORT, true, null); addImports = Platform.getPreferencesService().getBoolean(Activator.PLUGIN_ID, PreferenceConstants.ORG_IMPORT_ADD, true,...
/** * Organize the import statements of a file. The necessary changes are * collected and returned in a <code>TextFileChange</code> object. * * @param file * The file to organize. * @return The change to perform. * @throws CoreException * when document associated with the file ca...
Organize the import statements of a file. The necessary changes are collected and returned in a <code>TextFileChange</code> object
organizeImportsChange
{ "repo_name": "alovassy/titan.EclipsePlug-ins", "path": "org.eclipse.titanium/src/org/eclipse/titanium/organize/OrganizeImports.java", "license": "epl-1.0", "size": 15693 }
[ "org.eclipse.core.resources.IFile", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.Platform", "org.eclipse.jface.text.BadLocationException", "org.eclipse.jface.text.IDocument", "org.eclipse.ltk.core.refactoring.TextFileChange", "org.eclipse.titan.common.logging.ErrorReporter", "or...
import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.ltk.core.refactoring.TextFileChange; import org.eclipse.titan.common.logging.E...
import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jface.text.*; import org.eclipse.ltk.core.refactoring.*; import org.eclipse.titan.common.logging.*; import org.eclipse.titan.designer.*; import org.eclipse.titan.designer.parsers.*; import org.eclipse.titanium.*; import org.eclip...
[ "org.eclipse.core", "org.eclipse.jface", "org.eclipse.ltk", "org.eclipse.titan", "org.eclipse.titanium" ]
org.eclipse.core; org.eclipse.jface; org.eclipse.ltk; org.eclipse.titan; org.eclipse.titanium;
1,421,966
void setSpawnLocation(Location respawnLocation);
void setSpawnLocation(Location respawnLocation);
/** * Sets the new player respawn location permanently. * * @param respawnLocation The new respawn location */
Sets the new player respawn location permanently
setSpawnLocation
{ "repo_name": "frogocomics/SpongeAPI", "path": "src/main/java/org/spongepowered/api/event/entity/player/PlayerRespawnEvent.java", "license": "mit", "size": 1987 }
[ "org.spongepowered.api.world.Location" ]
import org.spongepowered.api.world.Location;
import org.spongepowered.api.world.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
2,220,721
public TypeInfo<?> getSupertype(Class<?> supertype) { checkArgument(supertype.isAssignableFrom(rawType), "%s is not a supertype of %s", supertype, this.type); return resolve(Types.getGenericSupertype(type, rawType, supertype)); }
TypeInfo<?> function(Class<?> supertype) { checkArgument(supertype.isAssignableFrom(rawType), STR, supertype, this.type); return resolve(Types.getGenericSupertype(type, rawType, supertype)); }
/** * Returns the generic form of {@code supertype}. For example, if this is {@code * ArrayList<String>}, this returns {@code Iterable<String>} given the input {@code * Iterable.class}. * * @param supertype a superclass of, or interface implemented by, this. * @since 2.0 */
Returns the generic form of supertype. For example, if this is ArrayList, this returns Iterable given the input Iterable.class
getSupertype
{ "repo_name": "jaspeen/classinfo", "path": "src/main/java/org/jeesy/classinfo/TypeInfo.java", "license": "apache-2.0", "size": 14691 }
[ "org.jeesy.classinfo.Utils" ]
import org.jeesy.classinfo.Utils;
import org.jeesy.classinfo.*;
[ "org.jeesy.classinfo" ]
org.jeesy.classinfo;
2,196,700
public CMSSignedData toCMSSignedData() { return tsToken; }
CMSSignedData function() { return tsToken; }
/** * Return the underlying CMSSignedData object. * * @return the underlying CMS structure. */
Return the underlying CMSSignedData object
toCMSSignedData
{ "repo_name": "ruhr-universitaet-bochum/jpdfsigner", "path": "src/main/java/de/rub/dez6a3/jpdfsigner/TimeStampToken.java", "license": "gpl-3.0", "size": 10359 }
[ "org.bouncycastle.cms.CMSSignedData" ]
import org.bouncycastle.cms.CMSSignedData;
import org.bouncycastle.cms.*;
[ "org.bouncycastle.cms" ]
org.bouncycastle.cms;
126,321
private File createHeapDump(File outputDir) { if (hotSpotDiagnosticName == null) { return null; } File outputFile; try { // The default dump name is "java.hprof". outputFile = createNewFile(outputDir, "java", "hprof"); platformMBeanSe...
File function(File outputDir) { if (hotSpotDiagnosticName == null) { return null; } File outputFile; try { outputFile = createNewFile(outputDir, "java", "hprof"); platformMBeanServer.invoke(hotSpotDiagnosticName, STR, new Object[] { outputFile.getAbsolutePath(), false }, new String[] { String.class.getName(), boolean.c...
/** * Create a heap dump. This is the same as jmap -dump:file=... * * @param outputDir the server output directory * @return the resulting file */
Create a heap dump. This is the same as jmap -dump:file=..
createHeapDump
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/commands/HotSpotJavaDumperImpl.java", "license": "epl-1.0", "size": 12630 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,288,110
public static void setDescription(final AbstractSQLProvider provider, final CAddressSpace addressSpace, final String description) throws CouldntSaveDataException { checkArguments(provider, addressSpace); Preconditions.checkNotNull(description, "IE00395: Description argument can not be null"); final ...
static void function(final AbstractSQLProvider provider, final CAddressSpace addressSpace, final String description) throws CouldntSaveDataException { checkArguments(provider, addressSpace); Preconditions.checkNotNull(description, STR); final CConnection connection = provider.getConnection(); PostgreSQLHelpers.setDescr...
/** * Changes the description of the address space. If updating the description was successful, the * modification date of the address space is updated. * * The address space must be stored in the database connected to by the provider argument. * * @param provider The SQL provider that provides the ...
Changes the description of the address space. If updating the description was successful, the modification date of the address space is updated. The address space must be stored in the database connected to by the provider argument
setDescription
{ "repo_name": "AmesianX/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Database/PostgreSQL/Functions/PostgreSQLAddressSpaceFunctions.java", "license": "apache-2.0", "size": 16630 }
[ "com.google.common.base.Preconditions", "com.google.security.zynamics.binnavi.Database", "com.google.security.zynamics.binnavi.disassembly.AddressSpaces" ]
import com.google.common.base.Preconditions; import com.google.security.zynamics.binnavi.Database; import com.google.security.zynamics.binnavi.disassembly.AddressSpaces;
import com.google.common.base.*; import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.binnavi.disassembly.*;
[ "com.google.common", "com.google.security" ]
com.google.common; com.google.security;
2,855,632
public static CConnection connect(final CDatabaseConfiguration configuration) throws CouldntLoadDriverException, CouldntConnectException { checkDriver(configuration); try { return new CConnection(configuration); } catch (final SQLException e) { CUtilityFunctions.logException(e); ...
static CConnection function(final CDatabaseConfiguration configuration) throws CouldntLoadDriverException, CouldntConnectException { checkDriver(configuration); try { return new CConnection(configuration); } catch (final SQLException e) { CUtilityFunctions.logException(e); throw new CouldntConnectException(e, e.getErro...
/** * Tries to connect to the database using the given connection options. * * @param configuration The database configuration used to connect to the database. * * @return The connection to the database. * * @throws CouldntLoadDriverException if the database driver could not be loaded. * @throws...
Tries to connect to the database using the given connection options
connect
{ "repo_name": "AmesianX/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/Database/implementations/CDatabaseConnector.java", "license": "apache-2.0", "size": 7229 }
[ "com.google.security.zynamics.binnavi.CUtilityFunctions", "com.google.security.zynamics.binnavi.Database", "java.sql.SQLException" ]
import com.google.security.zynamics.binnavi.CUtilityFunctions; import com.google.security.zynamics.binnavi.Database; import java.sql.SQLException;
import com.google.security.zynamics.binnavi.*; import java.sql.*;
[ "com.google.security", "java.sql" ]
com.google.security; java.sql;
2,013,781
@Override public void visit(final NodeTraversal t, final Node n, final Node p) { final JSDocInfo info = n.getJSDocInfo(); if (info == null) { return; } final TypeIRegistry registry = compiler.getTypeIRegistry();
void function(final NodeTraversal t, final Node n, final Node p) { final JSDocInfo info = n.getJSDocInfo(); if (info == null) { return; } final TypeIRegistry registry = compiler.getTypeIRegistry();
/** * Crawls the JSDoc of the given node to find any names in JSDoc * that are implicitly null. */
Crawls the JSDoc of the given node to find any names in JSDoc that are implicitly null
visit
{ "repo_name": "Medium/closure-compiler", "path": "src/com/google/javascript/jscomp/ImplicitNullabilityCheck.java", "license": "apache-2.0", "size": 4514 }
[ "com.google.javascript.rhino.JSDocInfo", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.TypeIRegistry" ]
import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.TypeIRegistry;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,303,052
public long getNextUniqueTransactionId() { // get the current time, usually the salt value is zero // in testing it is used to simulate clock skew long currentTime = m_clock.get() + m_timestampTestingSalt; if (currentTime == lastUsedTime) { // increment the counter for th...
long function() { long currentTime = m_clock.get() + m_timestampTestingSalt; if (currentTime == lastUsedTime) { counterValue++; if (counterValue > COUNTER_MAX_VALUE) { while (currentTime == lastUsedTime) currentTime = m_clock.get(); lastUsedTime = currentTime; counterValue = 0; } } else { if (currentTime < lastUsedTime...
/** * Generate a unique id that contains a timestamp, a counter * and a siteid packed into a 64-bit long value. Subsequent calls * to this method will return strictly larger long values. * @return The newly generated transaction id. */
Generate a unique id that contains a timestamp, a counter and a siteid packed into a 64-bit long value. Subsequent calls to this method will return strictly larger long values
getNextUniqueTransactionId
{ "repo_name": "kobronson/cs-voltdb", "path": "src/frontend/org/voltdb/TransactionIdManager.java", "license": "agpl-3.0", "size": 11565 }
[ "org.voltcore.logging.VoltLogger" ]
import org.voltcore.logging.VoltLogger;
import org.voltcore.logging.*;
[ "org.voltcore.logging" ]
org.voltcore.logging;
2,724,308
Array<T> filter(Predicate<ArrayValue<T>> predicate);
Array<T> filter(Predicate<ArrayValue<T>> predicate);
/** * Returns a newly created array including values that pass the predicate * @param predicate the predicate to filter the array * @return the filtered array */
Returns a newly created array including values that pass the predicate
filter
{ "repo_name": "zavtech/morpheus-core", "path": "src/main/java/com/zavtech/morpheus/array/Array.java", "license": "apache-2.0", "size": 34601 }
[ "java.util.function.Predicate" ]
import java.util.function.Predicate;
import java.util.function.*;
[ "java.util" ]
java.util;
2,219,128
@RequestMapping(params = "update", method = RequestMethod.POST ) public ModelAndView update(TbCfcChecklistMstDto cfcChecklistMstDto, BindingResult bindingResult, Model model, HttpServletRequest httpServletRequest) { log("Action 'update'"); try { if (!bindingResult.hasErrors()) { checklistMstServi...
@RequestMapping(params = STR, method = RequestMethod.POST ) ModelAndView function(TbCfcChecklistMstDto cfcChecklistMstDto, BindingResult bindingResult, Model model, HttpServletRequest httpServletRequest) { log(STR); try { if (!bindingResult.hasErrors()) { checklistMstService.updateChecklistData(cfcChecklistMstDto, chec...
/** * 'UPDATE' action processing. <br> * This action is based on the 'Post/Redirect/Get (PRG)' pattern, so it ends by 'http redirect'<br> * @param tbCfcChecklistMst entity to be updated * @param bindingResult Spring MVC binding result * @param model Spring MVC model * @param redirectAttributes Spring MVC r...
'UPDATE' action processing. This action is based on the 'Post/Redirect/Get (PRG)' pattern, so it ends by 'http redirect'
update
{ "repo_name": "abmindiarepomanager/ABMOpenMainet", "path": "Mainet1.0/MainetServiceParent/MainetServiceCommon/src/main/java/com/abm/mainet/cfc/checklist/ui/controller/ChecklistMstController.java", "license": "gpl-3.0", "size": 12417 }
[ "com.abm.mainet.cfc.checklist.dto.TbCfcChecklistMstDto", "com.abm.mainet.common.constant.FormMode", "com.abm.mainet.common.constant.MainetConstants", "javax.servlet.http.HttpServletRequest", "org.springframework.ui.Model", "org.springframework.validation.BindingResult", "org.springframework.web.bind.ann...
import com.abm.mainet.cfc.checklist.dto.TbCfcChecklistMstDto; import com.abm.mainet.common.constant.FormMode; import com.abm.mainet.common.constant.MainetConstants; import javax.servlet.http.HttpServletRequest; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springfr...
import com.abm.mainet.cfc.checklist.dto.*; import com.abm.mainet.common.constant.*; import javax.servlet.http.*; import org.springframework.ui.*; import org.springframework.validation.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*; import org.springframework.web.servlet.vi...
[ "com.abm.mainet", "javax.servlet", "org.springframework.ui", "org.springframework.validation", "org.springframework.web" ]
com.abm.mainet; javax.servlet; org.springframework.ui; org.springframework.validation; org.springframework.web;
1,717,621
public Cursor query(Predicate predicate){ return new UnmodifiableCursor(bag.query(predicate)); }
Cursor function(Predicate predicate){ return new UnmodifiableCursor(bag.query(predicate)); }
/** * Returns a cursor to iterate over all elements in this bag for which * the given predicate returns <tt>true</tt>. This method is very * similar to the cursor method except that its result is determined * by a predicate. * * @param predicate a predicate that determines whether an element of * t...
Returns a cursor to iterate over all elements in this bag for which the given predicate returns true. This method is very similar to the cursor method except that its result is determined by a predicate
query
{ "repo_name": "hannoman/xxl", "path": "src/xxl/core/collections/bags/UnmodifiableBag.java", "license": "lgpl-3.0", "size": 6064 }
[ "xxl.core.cursors.Cursor", "xxl.core.cursors.identities.UnmodifiableCursor", "xxl.core.predicates.Predicate" ]
import xxl.core.cursors.Cursor; import xxl.core.cursors.identities.UnmodifiableCursor; import xxl.core.predicates.Predicate;
import xxl.core.cursors.*; import xxl.core.cursors.identities.*; import xxl.core.predicates.*;
[ "xxl.core.cursors", "xxl.core.predicates" ]
xxl.core.cursors; xxl.core.predicates;
2,555,314
private MinMax<String> getPhenomenonTime() throws OwsExceptionReport { final DateTime minDate = getCache().getMinPhenomenonTime(); final DateTime maxDate = getCache().getMaxPhenomenonTime(); return new MinMax<String>().setMinimum( minDate != null ? DateTimeHelper.formatDateTi...
MinMax<String> function() throws OwsExceptionReport { final DateTime minDate = getCache().getMinPhenomenonTime(); final DateTime maxDate = getCache().getMaxPhenomenonTime(); return new MinMax<String>().setMinimum( minDate != null ? DateTimeHelper.formatDateTime2ResponseString(minDate) : null).setMaximum( maxDate != nul...
/** * Get the min/max phenomenon time of contained observations * * @return min/max phenomenon time * * * @throws OwsExceptionReport * * If an error occurs. */
Get the min/max phenomenon time of contained observations
getPhenomenonTime
{ "repo_name": "impulze/SOS", "path": "core/api/src/main/java/org/n52/sos/ds/AbstractGetObservationDAO.java", "license": "gpl-2.0", "size": 6787 }
[ "org.joda.time.DateTime", "org.n52.sos.ogc.ows.OwsExceptionReport", "org.n52.sos.util.DateTimeHelper", "org.n52.sos.util.MinMax" ]
import org.joda.time.DateTime; import org.n52.sos.ogc.ows.OwsExceptionReport; import org.n52.sos.util.DateTimeHelper; import org.n52.sos.util.MinMax;
import org.joda.time.*; import org.n52.sos.ogc.ows.*; import org.n52.sos.util.*;
[ "org.joda.time", "org.n52.sos" ]
org.joda.time; org.n52.sos;
1,303,159
public static Class<?> getCollectionParameter(Field field) { if (field != null) { Type genericType = field.getGenericType(); if (genericType instanceof ParameterizedType) { Type[] typeArgs = ((ParameterizedType) genericType).getActualTypeArguments(); if (typeArgs.length == ...
static Class<?> function(Field field) { if (field != null) { Type genericType = field.getGenericType(); if (genericType instanceof ParameterizedType) { Type[] typeArgs = ((ParameterizedType) genericType).getActualTypeArguments(); if (typeArgs.length == 1 && typeArgs[0] instanceof Class<?>) { return (Class<?>) typeArgs[...
/** * Returns the type parameter for the given field assuming it is of type * collection. */
Returns the type parameter for the given field assuming it is of type collection
getCollectionParameter
{ "repo_name": "alonerocky/PicasaPlus", "path": "app/src/main/java/com/google/api/client/util/ClassInfo.java", "license": "apache-2.0", "size": 8662 }
[ "java.lang.reflect.Field", "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type" ]
import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,327,934
final String protocol = resourceURL.getProtocol(); switch (protocol) { case "jar": try { final JarURLConnection jarConnection = (JarURLConnection) resourceURL.openConnection(); final JarEntry entry = jarConnection.getJarEntry(); ...
final String protocol = resourceURL.getProtocol(); switch (protocol) { case "jar": try { final JarURLConnection jarConnection = (JarURLConnection) resourceURL.openConnection(); final JarEntry entry = jarConnection.getJarEntry(); if (entry.isDirectory()) { return true; } final String fileName = resourceURL.getFile(); fi...
/** * Returns true if the URL passed to it corresponds to a directory. This is slightly tricky due to some quirks * of the {@link JarFile} API. Only jar:// and file:// URLs are supported. * * @param resourceURL the URL to check * @return true if resource is a directory */
Returns true if the URL passed to it corresponds to a directory. This is slightly tricky due to some quirks of the <code>JarFile</code> API. Only jar:// and file:// URLs are supported
isDirectory
{ "repo_name": "zhiqinghuang/dropwizard", "path": "dropwizard-servlets/src/main/java/io/dropwizard/servlets/assets/ResourceURL.java", "license": "apache-2.0", "size": 5704 }
[ "java.io.File", "java.io.IOException", "java.io.InputStream", "java.net.JarURLConnection", "java.util.jar.JarEntry", "java.util.jar.JarFile", "java.util.zip.ZipEntry" ]
import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.JarURLConnection; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.zip.ZipEntry;
import java.io.*; import java.net.*; import java.util.jar.*; import java.util.zip.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
2,853,496
@Override @PUT @Path("freeze") @Produces("application/json") public boolean freezeScheduler(@HeaderParam("sessionid") final String sessionId) throws NotConnectedRestException, PermissionRestException { try { Scheduler s = checkAccess(sessionId, "freeze"); return s...
@Path(STR) @Produces(STR) boolean function(@HeaderParam(STR) final String sessionId) throws NotConnectedRestException, PermissionRestException { try { Scheduler s = checkAccess(sessionId, STR); return s.freeze(); } catch (PermissionException e) { throw new PermissionRestException(e); } catch (NotConnectedException e) {...
/** * freezes the scheduler * * @param sessionId * a valid session id * @return true if success, false otherwise * @throws NotConnectedRestException * @throws PermissionRestException */
freezes the scheduler
freezeScheduler
{ "repo_name": "youribonnaffe/scheduling", "path": "rest/rest-server/src/main/java/org/ow2/proactive_grid_cloud_portal/scheduler/SchedulerStateRest.java", "license": "agpl-3.0", "size": 103364 }
[ "javax.ws.rs.HeaderParam", "javax.ws.rs.Path", "javax.ws.rs.Produces", "org.ow2.proactive.scheduler.common.Scheduler", "org.ow2.proactive.scheduler.common.exception.NotConnectedException", "org.ow2.proactive.scheduler.common.exception.PermissionException", "org.ow2.proactive_grid_cloud_portal.scheduler....
import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.ow2.proactive.scheduler.common.Scheduler; import org.ow2.proactive.scheduler.common.exception.NotConnectedException; import org.ow2.proactive.scheduler.common.exception.PermissionException; import org.ow2.proactive_grid_clo...
import javax.ws.rs.*; import org.ow2.proactive.scheduler.common.*; import org.ow2.proactive.scheduler.common.exception.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*;
[ "javax.ws", "org.ow2.proactive", "org.ow2.proactive_grid_cloud_portal" ]
javax.ws; org.ow2.proactive; org.ow2.proactive_grid_cloud_portal;
644,801
public void setFieldWithAccess(Class<?> targetClass, String whichField, boolean setAccess) throws Exception { Object targetInstance = targetClass.newInstance(); Field field = targetClass.getDeclaredField(whichField); if (setAccess) { field.setAccessible(true); } // Not checking for type errors in this t...
void function(Class<?> targetClass, String whichField, boolean setAccess) throws Exception { Object targetInstance = targetClass.newInstance(); Field field = targetClass.getDeclaredField(whichField); if (setAccess) { field.setAccessible(true); } if (field.getType().equals(int.class)) { field.set(targetInstance, 888); }...
/** * Sets a field in class, can override access constraints if requested to do so. */
Sets a field in class, can override access constraints if requested to do so
setFieldWithAccess
{ "repo_name": "ksfzhaohui/spring-loaded", "path": "testdata/src/main/java/reflection/fields/FieldSetAccessTarget002.java", "license": "apache-2.0", "size": 2076 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
125,480
public static InputStream getStringInputStream( CharSequence cs ) { return new ByteArrayInputStream( toBytes( cs ) ); }
static InputStream function( CharSequence cs ) { return new ByteArrayInputStream( toBytes( cs ) ); }
/** * Returns an input stream for the specified character sequence, using UTF-8 encoding. * * @param cs the character sequence to wrap * * @return an input stream for reading the specified character sequence */
Returns an input stream for the specified character sequence, using UTF-8 encoding
getStringInputStream
{ "repo_name": "manifold-systems/manifold", "path": "manifold-core-parent/manifold-rt/src/main/java/manifold/rt/api/util/StreamUtil.java", "license": "apache-2.0", "size": 14266 }
[ "java.io.ByteArrayInputStream", "java.io.InputStream" ]
import java.io.ByteArrayInputStream; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,804,184
private void doDrawing(Shape shape, boolean fill) { if (!fill) { graphicsObj.newSegment(); } graphicsObj.setColor(gc.getColor()); applyPaint(gc.getPaint(), fill); if (fill) { graphicsObj.beginArea(); } else { applyStroke(gc.getSt...
void function(Shape shape, boolean fill) { if (!fill) { graphicsObj.newSegment(); } graphicsObj.setColor(gc.getColor()); applyPaint(gc.getPaint(), fill); if (fill) { graphicsObj.beginArea(); } else { applyStroke(gc.getStroke()); } AffineTransform trans = gc.getTransform(); PathIterator iter = shape.getPathIterator(tran...
/** * Handle the Batik drawing event * * @param shape * the shape to draw * @param fill * true if the shape is to be drawn filled */
Handle the Batik drawing event
doDrawing
{ "repo_name": "argv-minus-one/fop", "path": "fop-core/src/main/java/org/apache/fop/afp/AFPGraphics2D.java", "license": "apache-2.0", "size": 24025 }
[ "java.awt.Shape", "java.awt.geom.AffineTransform", "java.awt.geom.Ellipse2D", "java.awt.geom.Line2D", "java.awt.geom.PathIterator", "java.awt.geom.Rectangle2D" ]
import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Ellipse2D; import java.awt.geom.Line2D; import java.awt.geom.PathIterator; import java.awt.geom.Rectangle2D;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
707,015
void setReactiveExecutor(ReactiveExecutor reactiveExecutor);
void setReactiveExecutor(ReactiveExecutor reactiveExecutor);
/** * Sets a custom {@link ReactiveExecutor} to be used. */
Sets a custom <code>ReactiveExecutor</code> to be used
setReactiveExecutor
{ "repo_name": "christophd/camel", "path": "core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java", "license": "apache-2.0", "size": 29137 }
[ "org.apache.camel.spi.ReactiveExecutor" ]
import org.apache.camel.spi.ReactiveExecutor;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
2,479,415
static void updateMetadata(IIOMetadata metadata, BufferedImage image, int dpi) throws IIOInvalidTreeException { String metaDataFormat = metadata.getNativeMetadataFormatName(); if (metaDataFormat == null) { logger.debug("TIFF image writer doesn't support any data f...
static void updateMetadata(IIOMetadata metadata, BufferedImage image, int dpi) throws IIOInvalidTreeException { String metaDataFormat = metadata.getNativeMetadataFormatName(); if (metaDataFormat == null) { logger.debug(STR); return; } debugLogMetadata(metadata, metaDataFormat); IIOMetadataNode root = new IIOMetadataNod...
/** * Updates the given ImageIO metadata with Sun's custom TIFF tags, as described in * the <a href="https://svn.apache.org/repos/asf/xmlgraphics/commons/tags/commons-1_3_1/src/java/org/apache/xmlgraphics/image/writer/imageio/ImageIOTIFFImageWriter.java">org.apache.xmlgraphics.image.writer.imageio.ImageIOTIFF...
Updates the given ImageIO metadata with Sun's custom TIFF tags, as described in the org.apache.xmlgraphics.image.writer.imageio.ImageIOTIFFImageWriter sources, the com.sun.media.imageio.plugins.tiff package javadoc and the TIFF specification
updateMetadata
{ "repo_name": "GCRC/nunaliit", "path": "nunaliit2-multimedia/src/main/java/ca/carleton/gcrc/olkit/multimedia/apachePDFBox/imageio/TIFFUtil.java", "license": "bsd-3-clause", "size": 7214 }
[ "ca.carleton.gcrc.olkit.multimedia.apachePDFBox.imageio.MetaUtil", "java.awt.image.BufferedImage", "javax.imageio.metadata.IIOInvalidTreeException", "javax.imageio.metadata.IIOMetadata", "javax.imageio.metadata.IIOMetadataNode" ]
import ca.carleton.gcrc.olkit.multimedia.apachePDFBox.imageio.MetaUtil; import java.awt.image.BufferedImage; import javax.imageio.metadata.IIOInvalidTreeException; import javax.imageio.metadata.IIOMetadata; import javax.imageio.metadata.IIOMetadataNode;
import ca.carleton.gcrc.olkit.multimedia.*; import java.awt.image.*; import javax.imageio.metadata.*;
[ "ca.carleton.gcrc", "java.awt", "javax.imageio" ]
ca.carleton.gcrc; java.awt; javax.imageio;
676,503
public Builder addAllExpand(List<String> elements) { if (this.expand == null) { this.expand = new ArrayList<>(); } this.expand.addAll(elements); return this; }
Builder function(List<String> elements) { if (this.expand == null) { this.expand = new ArrayList<>(); } this.expand.addAll(elements); return this; }
/** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link * TransactionListParams#expand} for the field documentation. */
Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See <code>TransactionListParams#expand</code> for the field documentation
addAllExpand
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/issuing/TransactionListParams.java", "license": "mit", "size": 11331 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,175,534
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut) throws IOException { NetworkBridgeFilter info = (NetworkBridgeFilter)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getNetworkTTL()); looseMarshalCachedObject(wire...
void function(OpenWireFormat wireFormat, Object o, DataByteArrayOutputStream dataOut) throws IOException { NetworkBridgeFilter info = (NetworkBridgeFilter)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getNetworkTTL()); looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(),...
/** * Write the booleans that this object uses to a BooleanStream */
Write the booleans that this object uses to a BooleanStream
looseMarshal
{ "repo_name": "nkasvosve/beyondj", "path": "beyondj-gateway/beyondj-gateway-core/src/main/java/com/beyondj/gateway/handlers/detecting/protocol/openwire/codec/v1/NetworkBridgeFilterMarshaller.java", "license": "apache-2.0", "size": 4832 }
[ "com.beyondj.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat", "com.beyondj.gateway.handlers.detecting.protocol.openwire.command.DataStructure", "com.beyondj.gateway.handlers.detecting.protocol.openwire.command.NetworkBridgeFilter", "java.io.IOException", "org.fusesource.hawtbuf.DataByteAr...
import com.beyondj.gateway.handlers.detecting.protocol.openwire.codec.OpenWireFormat; import com.beyondj.gateway.handlers.detecting.protocol.openwire.command.DataStructure; import com.beyondj.gateway.handlers.detecting.protocol.openwire.command.NetworkBridgeFilter; import java.io.IOException; import org.fusesource.hawt...
import com.beyondj.gateway.handlers.detecting.protocol.openwire.codec.*; import com.beyondj.gateway.handlers.detecting.protocol.openwire.command.*; import java.io.*; import org.fusesource.hawtbuf.*;
[ "com.beyondj.gateway", "java.io", "org.fusesource.hawtbuf" ]
com.beyondj.gateway; java.io; org.fusesource.hawtbuf;
1,111,156
@SuppressWarnings("rawtypes") public boolean supports(Class c) { if (log.isDebugEnabled()) { log.debug(this.getClass().getName() + ".supports: " + c.getName()); } return Provider.class.isAssignableFrom(c); }
@SuppressWarnings(STR) boolean function(Class c) { if (log.isDebugEnabled()) { log.debug(this.getClass().getName() + STR + c.getName()); } return Provider.class.isAssignableFrom(c); }
/** * Returns whether or not this validator supports validating a given class. * * @param c The class to check for support. * @see org.springframework.validation.Validator#supports(java.lang.Class) */
Returns whether or not this validator supports validating a given class
supports
{ "repo_name": "sintjuri/openmrs-core", "path": "api/src/main/java/org/openmrs/validator/ProviderValidator.java", "license": "mpl-2.0", "size": 3799 }
[ "org.openmrs.Provider" ]
import org.openmrs.Provider;
import org.openmrs.*;
[ "org.openmrs" ]
org.openmrs;
2,884,845
public T caseMStringParamOSSPSwitchCase(MStringParamOSSPSwitchCase object) { return null; }
T function(MStringParamOSSPSwitchCase object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>MString Param OSSP Switch Case</em>'. * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>MString Param OSSP Switch Case</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) ...
Returns the result of interpreting the object as an instance of 'MString Param OSSP Switch Case'
caseMStringParamOSSPSwitchCase
{ "repo_name": "parraman/micobs", "path": "common/es.uah.aut.srg.micobs.pdl/src/es/uah/aut/srg/micobs/pdl/util/pdlSwitch.java", "license": "epl-1.0", "size": 33881 }
[ "es.uah.aut.srg.micobs.pdl.MStringParamOSSPSwitchCase" ]
import es.uah.aut.srg.micobs.pdl.MStringParamOSSPSwitchCase;
import es.uah.aut.srg.micobs.pdl.*;
[ "es.uah.aut" ]
es.uah.aut;
1,594,785
public void releaseReferences(ChunkLocationSet chunkSet) { synchronized (counters) { for (ChunkLocation location : chunkSet.locations()) { CRefCounter counter = get(location); if (counter != null) { counter.releaseStrong(); } ...
void function(ChunkLocationSet chunkSet) { synchronized (counters) { for (ChunkLocation location : chunkSet.locations()) { CRefCounter counter = get(location); if (counter != null) { counter.releaseStrong(); } } } }
/** * Releases the reference counters associated with the chunks that are specified in the set given * * @param chunkSet the set of chunks to release references to, given that they exist in this cache */
Releases the reference counters associated with the chunks that are specified in the set given
releaseReferences
{ "repo_name": "PizzaCrust/Trident", "path": "src/main/java/net/tridentsdk/server/chunk/ChunkHandler.java", "license": "apache-2.0", "size": 6603 }
[ "net.tridentsdk.world.ChunkLocation" ]
import net.tridentsdk.world.ChunkLocation;
import net.tridentsdk.world.*;
[ "net.tridentsdk.world" ]
net.tridentsdk.world;
1,370,250
public List<String> getAllName();
List<String> function();
/** * Returns all <code>name</code> elements * @return list of <code>name</code> */
Returns all <code>name</code> elements
getAllName
{ "repo_name": "forge/javaee-descriptors", "path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/facesconfig21/FacesConfigAbsoluteOrderingType.java", "license": "epl-1.0", "size": 3633 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,733,443
public void remove(Class<? extends T> type) throws IOException { for (T t : data) { if(t.getClass()==type) { data.remove(t); onModified(); return; } } }
void function(Class<? extends T> type) throws IOException { for (T t : data) { if(t.getClass()==type) { data.remove(t); onModified(); return; } } }
/** * Removes an instance by its type. */
Removes an instance by its type
remove
{ "repo_name": "vivek/hudson", "path": "core/src/main/java/hudson/util/PersistedList.java", "license": "mit", "size": 6442 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,387,603
protected JarPackageData readJarPackage(IFile description, MultiStatus readStatus) { Assert.isLegal(description.isAccessible()); Assert.isNotNull(description.getFileExtension()); Assert.isLegal(description.getFileExtension().equals(JarPackagerUtil.DESCRIPTION_EXTENSION)); JarPackageData jarPackage= new JarPa...
JarPackageData function(IFile description, MultiStatus readStatus) { Assert.isLegal(description.isAccessible()); Assert.isNotNull(description.getFileExtension()); Assert.isLegal(description.getFileExtension().equals(JarPackagerUtil.DESCRIPTION_EXTENSION)); JarPackageData jarPackage= new JarPackageData(); IJarDescriptio...
/** * Reads the JAR package spec from file. * @param description the description file * @param readStatus status * @return returns the read the JAR package spec */
Reads the JAR package spec from file
readJarPackage
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/jarpackager/CreateJarActionDelegate.java", "license": "epl-1.0", "size": 5951 }
[ "org.eclipse.core.resources.IFile", "org.eclipse.core.runtime.Assert", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.MultiStatus", "org.eclipse.jdt.internal.core.manipulation.util.BasicElementLabels", "org.eclipse.jdt.internal.corext.util.Messages", "org.eclipse.jdt.ui.jarpackager....
import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.jdt.internal.core.manipulation.util.BasicElementLabels; import org.eclipse.jdt.internal.corext.util.Messages; import org.eclipse...
import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.internal.core.manipulation.util.*; import org.eclipse.jdt.internal.corext.util.*; import org.eclipse.jdt.ui.jarpackager.*;
[ "org.eclipse.core", "org.eclipse.jdt" ]
org.eclipse.core; org.eclipse.jdt;
1,343,718
public void logout(boolean sendStatus) { final XMPPConnection con = SparkManager.getConnection(); String status = null; if (con.isConnected() && sendStatus) { final InputTextAreaDialog inputTextDialog = new InputTextAreaDialog(); status = inputTextDialog.getInp...
void function(boolean sendStatus) { final XMPPConnection con = SparkManager.getConnection(); String status = null; if (con.isConnected() && sendStatus) { final InputTextAreaDialog inputTextDialog = new InputTextAreaDialog(); status = inputTextDialog.getInput(Res.getString(STR), Res.getString(STR), SparkRes.getImageIcon...
/** * Prepares Spark for shutting down by first calling all {@link MainWindowListener}s and * setting the Agent to be offline. * * @param sendStatus true if Spark should send a presence with a status message. */
Prepares Spark for shutting down by first calling all <code>MainWindowListener</code>s and setting the Agent to be offline
logout
{ "repo_name": "joshuairl/toothchat-client", "path": "src/java/org/jivesoftware/MainWindow.java", "license": "apache-2.0", "size": 28218 }
[ "org.jivesoftware.resource.Res", "org.jivesoftware.resource.SparkRes", "org.jivesoftware.smack.XMPPConnection", "org.jivesoftware.spark.SparkManager", "org.jivesoftware.sparkimpl.plugin.alerts.InputTextAreaDialog", "org.jivesoftware.sparkimpl.settings.local.SettingsManager" ]
import org.jivesoftware.resource.Res; import org.jivesoftware.resource.SparkRes; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.spark.SparkManager; import org.jivesoftware.sparkimpl.plugin.alerts.InputTextAreaDialog; import org.jivesoftware.sparkimpl.settings.local.SettingsManager;
import org.jivesoftware.resource.*; import org.jivesoftware.smack.*; import org.jivesoftware.spark.*; import org.jivesoftware.sparkimpl.plugin.alerts.*; import org.jivesoftware.sparkimpl.settings.local.*;
[ "org.jivesoftware.resource", "org.jivesoftware.smack", "org.jivesoftware.spark", "org.jivesoftware.sparkimpl" ]
org.jivesoftware.resource; org.jivesoftware.smack; org.jivesoftware.spark; org.jivesoftware.sparkimpl;
2,655,757
@Deprecated public static Builder builder(Path sourceDirectory, Path stagingDirectory) { return new Builder().sourceDirectory(sourceDirectory).stagingDirectory(stagingDirectory); } public static final class Builder { @Nullable private Path sourceDirectory; @Nullable private Path stagingDirectory; ...
static Builder function(Path sourceDirectory, Path stagingDirectory) { return new Builder().sourceDirectory(sourceDirectory).stagingDirectory(stagingDirectory); } public static final class Builder { @Nullable private Path sourceDirectory; @Nullable private Path stagingDirectory; @Nullable private Path dockerfile; @Null...
/** * Create a new builder for AppEngineWebXmlProjectStageConfiguration. * * @deprecated Use * newBuilder().sourceDirectory(sourceDirectory).stagingDirectory(stagingDirectory) instead. */
Create a new builder for AppEngineWebXmlProjectStageConfiguration
builder
{ "repo_name": "GoogleCloudPlatform/appengine-plugins-core", "path": "src/main/java/com/google/cloud/tools/appengine/configuration/AppEngineWebXmlProjectStageConfiguration.java", "license": "apache-2.0", "size": 7384 }
[ "java.nio.file.Path", "javax.annotation.Nullable" ]
import java.nio.file.Path; import javax.annotation.Nullable;
import java.nio.file.*; import javax.annotation.*;
[ "java.nio", "javax.annotation" ]
java.nio; javax.annotation;
967,702
List<String> resolve(Context context, List<String> expressions); } static final class WildcardExpressionResolver implements ExpressionResolver {
List<String> resolve(Context context, List<String> expressions); } static final class WildcardExpressionResolver implements ExpressionResolver {
/** * Resolves the list of expressions into other expressions if possible (possible concrete indices and aliases, but * that isn't required). The provided implementations can also be left untouched. * * @return a new list with expressions based on the provided expressions */
Resolves the list of expressions into other expressions if possible (possible concrete indices and aliases, but that isn't required). The provided implementations can also be left untouched
resolve
{ "repo_name": "EvilMcJerkface/crate", "path": "server/src/main/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolver.java", "license": "apache-2.0", "size": 34473 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,231,958
public LinkedHashMap<BigDecimal, AttributeSubCoordinatorInfo> getListOfSubCoordinatorsOfSP() { return listOfSubCoordinatorsOfSP; }
LinkedHashMap<BigDecimal, AttributeSubCoordinatorInfo> function() { return listOfSubCoordinatorsOfSP; }
/** * This method returns a list of the current Sub-Coordinators of a Support * Peer. * * @return the list of the Sub-Coordinators */
This method returns a list of the current Sub-Coordinators of a Support Peer
getListOfSubCoordinatorsOfSP
{ "repo_name": "flyroom/PeerfactSimKOM_Clone", "path": "src/org/peerfact/impl/service/aggregation/skyeye/attributes/AttributeStorage.java", "license": "gpl-2.0", "size": 11542 }
[ "java.math.BigDecimal", "java.util.LinkedHashMap" ]
import java.math.BigDecimal; import java.util.LinkedHashMap;
import java.math.*; import java.util.*;
[ "java.math", "java.util" ]
java.math; java.util;
1,165,205
public boolean isRoutingStable() { long last = (long) (lastRoutingChange.toEpochMilli() / 1000.0); long now = (long) (Instant.now().toEpochMilli() / 1000.0); log.trace("Routing stable since {}s", now - last); return (now - last) > STABLITY_THRESHOLD; }
boolean function() { long last = (long) (lastRoutingChange.toEpochMilli() / 1000.0); long now = (long) (Instant.now().toEpochMilli() / 1000.0); log.trace(STR, now - last); return (now - last) > STABLITY_THRESHOLD; }
/** * Determines if routing in the network has been stable in the last * STABILITY_THRESHOLD seconds, by comparing the current time to the last * routing change timestamp. * * @return true if stable */
Determines if routing in the network has been stable in the last STABILITY_THRESHOLD seconds, by comparing the current time to the last routing change timestamp
isRoutingStable
{ "repo_name": "oplinkoms/onos", "path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java", "license": "apache-2.0", "size": 103484 }
[ "java.time.Instant" ]
import java.time.Instant;
import java.time.*;
[ "java.time" ]
java.time;
1,196,369
public Set<GHTeam> getTeams() throws IOException { GHOrganization org = root().getOrganization(getOwnerName()); return root().createRequest() .withUrlPath(getApiTailUrl("teams")) .toIterable(GHTeam[].class, item -> item.wrapUp(org)) .toSet(); }
Set<GHTeam> function() throws IOException { GHOrganization org = root().getOrganization(getOwnerName()); return root().createRequest() .withUrlPath(getApiTailUrl("teams")) .toIterable(GHTeam[].class, item -> item.wrapUp(org)) .toSet(); }
/** * If this repository belongs to an organization, return a set of teams. * * @return the teams * @throws IOException * the io exception */
If this repository belongs to an organization, return a set of teams
getTeams
{ "repo_name": "kohsuke/github-api", "path": "src/main/java/org/kohsuke/github/GHRepository.java", "license": "mit", "size": 103118 }
[ "java.io.IOException", "java.util.Set" ]
import java.io.IOException; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,288,979
@Test public void readFrom_tabId_successful() throws IOException { try (InputStream stream = getClass().getClassLoader().getResourceAsStream("export-tab-word-request.json")) { ExportWordRequest exportRequest = reader.readFrom(ExportWordRequest.class, null, null, null, null, stream); assertEquals("exportWord...
void function() throws IOException { try (InputStream stream = getClass().getClassLoader().getResourceAsStream(STR)) { ExportWordRequest exportRequest = reader.readFrom(ExportWordRequest.class, null, null, null, null, stream); assertEquals(STR, exportRequest.getUserOperation()); assertEquals(STR, exportRequest.getUrl()...
/** * Successful read test for tab id. * * @throws IOException * Signals that an I/O exception has occurred. */
Successful read test for tab id
readFrom_tabId_successful
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/platform/seip-parent/platform/domain-model/instance-export/src/test/java/com/sirma/sep/export/word/action/ExportWordBodyReaderTest.java", "license": "lgpl-3.0", "size": 3866 }
[ "com.sirma.sep.export.word.action.ExportWordRequest", "java.io.IOException", "java.io.InputStream", "org.junit.Assert" ]
import com.sirma.sep.export.word.action.ExportWordRequest; import java.io.IOException; import java.io.InputStream; import org.junit.Assert;
import com.sirma.sep.export.word.action.*; import java.io.*; import org.junit.*;
[ "com.sirma.sep", "java.io", "org.junit" ]
com.sirma.sep; java.io; org.junit;
2,015,195
public void setWifProject(final WifProject wifProject) { this.wifProject = wifProject; }
void function(final WifProject wifProject) { this.wifProject = wifProject; }
/** * Sets the wif project. * * @param wifProject * the new wif project */
Sets the wif project
setWifProject
{ "repo_name": "tosseto/online-whatif", "path": "src/main/java/au/org/aurin/wif/model/allocation/ColorALU.java", "license": "mit", "size": 1219 }
[ "au.org.aurin.wif.model.WifProject" ]
import au.org.aurin.wif.model.WifProject;
import au.org.aurin.wif.model.*;
[ "au.org.aurin" ]
au.org.aurin;
602,273
public BukkitTask runTaskTimerAsynchronously(Runnable runnable, long delay, long interval) { return add(getReal().runTaskTimerAsynchronously(Core.getInstance(), runnable, delay, interval)); }
BukkitTask function(Runnable runnable, long delay, long interval) { return add(getReal().runTaskTimerAsynchronously(Core.getInstance(), runnable, delay, interval)); }
/** * Run a task asynchronously, at an interval. * @param runnable * @param delay * @param interval * @return task */
Run a task asynchronously, at an interval
runTaskTimerAsynchronously
{ "repo_name": "Kneesnap/Kineticraft", "path": "src/net/kineticraft/lostcity/utils/tasks/TaskList.java", "license": "gpl-3.0", "size": 2515 }
[ "net.kineticraft.lostcity.Core", "org.bukkit.scheduler.BukkitTask" ]
import net.kineticraft.lostcity.Core; import org.bukkit.scheduler.BukkitTask;
import net.kineticraft.lostcity.*; import org.bukkit.scheduler.*;
[ "net.kineticraft.lostcity", "org.bukkit.scheduler" ]
net.kineticraft.lostcity; org.bukkit.scheduler;
1,422,217
public static boolean isEmpty(EditText edit) { return TextUtils.isEmpty(getText(edit)); }
static boolean function(EditText edit) { return TextUtils.isEmpty(getText(edit)); }
/** * returns true if nothing has been entered into passed editor */
returns true if nothing has been entered into passed editor
isEmpty
{ "repo_name": "wangkang0627/WordPress-Android", "path": "libs/utils/WordPressUtils/src/main/java/org/wordpress/android/util/EditTextUtils.java", "license": "gpl-2.0", "size": 1943 }
[ "android.text.TextUtils", "android.widget.EditText" ]
import android.text.TextUtils; import android.widget.EditText;
import android.text.*; import android.widget.*;
[ "android.text", "android.widget" ]
android.text; android.widget;
71,086
protected boolean getMaskTouched(float x0, float y0) { float x1 = x0 + diameter; float y1 = y0 + diameter; Color value; int sum = 0; for (float y = y0; y < y1; ++y) { for (float x = x0; x < x1; ++x) { if(imgMask.canSampleAt(x, y)) { ++sum; value = new Color(imgMask.sample1x1Unchecked(x, y...
boolean function(float x0, float y0) { float x1 = x0 + diameter; float y1 = y0 + diameter; Color value; int sum = 0; for (float y = y0; y < y1; ++y) { for (float x = x0; x < x1; ++x) { if(imgMask.canSampleAt(x, y)) { ++sum; value = new Color(imgMask.sample1x1Unchecked(x, y)); if (value.getRed() != 0) { return true; } }...
/** * test the mask from x0,y0 (top left) to x1,y1 (bottom right) to see if this region has already been visited * * @param x0 left * @param y0 top * @return true if all the pixels in this region are zero. */
test the mask from x0,y0 (top left) to x1,y1 (bottom right) to see if this region has already been visited
getMaskTouched
{ "repo_name": "MakeHartford/Makelangelo", "path": "java/src/main/java/com/marginallyclever/makelangeloRobot/converters/Converter_ColorFloodFill.java", "license": "gpl-2.0", "size": 8562 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,315,467
public void write(byte b[], int off, int len) throws IOException { socketWrite(b, off, len); }
void function(byte b[], int off, int len) throws IOException { socketWrite(b, off, len); }
/** * Writes <i>length</i> bytes from buffer <i>b</i> starting at * offset <i>len</i>. * @param b the data to be written * @param off the start offset in the data * @param len the number of bytes that are written * @exception SocketException If an I/O error has occurred. */
Writes length bytes from buffer b starting at offset len
write
{ "repo_name": "openjdk/jdk7u", "path": "jdk/src/share/classes/java/net/SocketOutputStream.java", "license": "gpl-2.0", "size": 6179 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,049,577
private static void zhangSuenThinningIteration(Mat img, int step) { // Get image pixels byte[] buffer = new byte[(int) img.total() * img.channels()]; img.get(0, 0, buffer); byte[] markerBuffer = new byte[buffer.length]; int rows = img.rows(); int cols = img.cols(); // Process al...
static void function(Mat img, int step) { byte[] buffer = new byte[(int) img.total() * img.channels()]; img.get(0, 0, buffer); byte[] markerBuffer = new byte[buffer.length]; int rows = img.rows(); int cols = img.cols(); for (int y = 1; y < rows-1; ++y) { for (int x = 1; x < cols-1; ++x) { int prev = cols*(y-1) + x; int...
/** * Iteration step for the Zhang-Suen thinning algorithm * @param img * @param step */
Iteration step for the Zhang-Suen thinning algorithm
zhangSuenThinningIteration
{ "repo_name": "Aletheios/MIME", "path": "app/src/main/java/de/lmu/ifi/medien/mime/OpenCVUtil.java", "license": "gpl-2.0", "size": 7392 }
[ "org.opencv.core.Mat" ]
import org.opencv.core.Mat;
import org.opencv.core.*;
[ "org.opencv.core" ]
org.opencv.core;
824,063
public void onRestoreInstanceState(CoordinatorLayout parent, V child, Parcelable state) { // no-op }
void function(CoordinatorLayout parent, V child, Parcelable state) { }
/** * Hook allowing a behavior to re-apply a representation of its internal state that had * previously been generated by {@link #onSaveInstanceState}. This function will never * be called with a null state. * * @param parent the parent CoordinatorLayout * @param ch...
Hook allowing a behavior to re-apply a representation of its internal state that had previously been generated by <code>#onSaveInstanceState</code>. This function will never be called with a null state
onRestoreInstanceState
{ "repo_name": "mobvoi/ticdesign", "path": "ticDesign/src/main/java/ticwear/design/widget/CoordinatorLayout.java", "license": "apache-2.0", "size": 129547 }
[ "android.os.Parcelable" ]
import android.os.Parcelable;
import android.os.*;
[ "android.os" ]
android.os;
1,121,808
private boolean retireBids(Instant cutoff) { boolean anyRemain = false; for (Map.Entry<Long, List<Instant>> entry : bids.entrySet()) { long auction = entry.getKey(); Iterator<Instant> itr = entry.getValue().iterator(); while (itr.hasNext()) { Instant bid = itr.next(); ...
boolean function(Instant cutoff) { boolean anyRemain = false; for (Map.Entry<Long, List<Instant>> entry : bids.entrySet()) { long auction = entry.getKey(); Iterator<Instant> itr = entry.getValue().iterator(); while (itr.hasNext()) { Instant bid = itr.next(); if (bid.isBefore(cutoff)) { NexmarkUtils.info(STR, bid, aucti...
/** * Retire bids which are strictly before {@code cutoff}. Return true if there are any bids * remaining. */
Retire bids which are strictly before cutoff. Return true if there are any bids remaining
retireBids
{ "repo_name": "jbonofre/beam", "path": "sdks/java/nexmark/src/main/java/org/apache/beam/sdk/nexmark/queries/Query5Model.java", "license": "apache-2.0", "size": 6041 }
[ "java.util.Iterator", "java.util.List", "java.util.Map", "org.apache.beam.sdk.nexmark.NexmarkUtils", "org.joda.time.Instant" ]
import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.beam.sdk.nexmark.NexmarkUtils; import org.joda.time.Instant;
import java.util.*; import org.apache.beam.sdk.nexmark.*; import org.joda.time.*;
[ "java.util", "org.apache.beam", "org.joda.time" ]
java.util; org.apache.beam; org.joda.time;
2,151,113
public void pinterpolate(double wt, Hmm source) { if (ns != source.ns) throw new RuntimeException("Hmm.pinterpolate(): different numbers of states"); for (int i = 0; i < ns; ++i) { pi[i] = (float) (wt * source.pi[i] + (1. - wt) * pi[i]); Arithmetics.interp1(a[i], source.a[i], (float) wt); Arithmet...
void function(double wt, Hmm source) { if (ns != source.ns) throw new RuntimeException(STR); for (int i = 0; i < ns; ++i) { pi[i] = (float) (wt * source.pi[i] + (1. - wt) * pi[i]); Arithmetics.interp1(a[i], source.a[i], (float) wt); Arithmetics.makesumto1(a[i]); s[i].pinterpolate(wt, source.s[i]); } Arithmetics.makesum...
/** * Interpolate the local parameters (!) with the referenced ones. * @param wt this = wt * source + (1 - wt) * this * @param source */
Interpolate the local parameters (!) with the referenced ones
pinterpolate
{ "repo_name": "jokereactive/SpeakerCounter", "path": "src/de/fau/cs/jstk/stat/hmm/Hmm.java", "license": "gpl-3.0", "size": 16449 }
[ "de.fau.cs.jstk.util.Arithmetics" ]
import de.fau.cs.jstk.util.Arithmetics;
import de.fau.cs.jstk.util.*;
[ "de.fau.cs" ]
de.fau.cs;
2,407,744
@After public void tearDown() throws LifecycleException { this.authenticator.stop(); }
void function() throws LifecycleException { this.authenticator.stop(); }
/** * Tear down. * * @throws LifecycleException * the lifecycle exception */
Tear down
tearDown
{ "repo_name": "AriSuutariST/waffle", "path": "Source/JNA/waffle-tomcat9/src/test/java/waffle/apache/MixedAuthenticatorTests.java", "license": "epl-1.0", "size": 13846 }
[ "org.apache.catalina.LifecycleException" ]
import org.apache.catalina.LifecycleException;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
1,485,455
public static boolean isStartTag(XmlPullParser xpp, String name) throws XmlPullParserException { return isStartTag(xpp) && xpp.getName().equals(name); }
static boolean function(XmlPullParser xpp, String name) throws XmlPullParserException { return isStartTag(xpp) && xpp.getName().equals(name); }
/** * Returns whether the current event is a start tag with the specified name. * * @param xpp The {@link XmlPullParser} to query. * @param name The specified name. * @return Whether the current event is a start tag with the specified name. * @throws XmlPullParserException If an error occurs querying ...
Returns whether the current event is a start tag with the specified name
isStartTag
{ "repo_name": "google/ExoPlayer", "path": "library/common/src/main/java/com/google/android/exoplayer2/util/XmlPullParserUtil.java", "license": "apache-2.0", "size": 4944 }
[ "org.xmlpull.v1.XmlPullParser", "org.xmlpull.v1.XmlPullParserException" ]
import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.*;
[ "org.xmlpull.v1" ]
org.xmlpull.v1;
590,702
public Collection<JcrNodeType> getMixinNodeTypes() { return this.unmodifiableMixinNodeTypes; }
Collection<JcrNodeType> function() { return this.unmodifiableMixinNodeTypes; }
/** * Return an immutable snapshot of the mixin node types that are currently registered in this node type manager. * * @return the immutable collection of (immutable) mixin node types; never null * @see #getPrimaryNodeTypes() */
Return an immutable snapshot of the mixin node types that are currently registered in this node type manager
getMixinNodeTypes
{ "repo_name": "stemig62/modeshape", "path": "modeshape-jcr/src/main/java/org/modeshape/jcr/NodeTypes.java", "license": "apache-2.0", "size": 166534 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,276,996
EAttribute getaAirStat_StrcTwst();
EAttribute getaAirStat_StrcTwst();
/** * Returns the meta object for the attribute list '{@link sc.ndt.editor.fast.fastbld.aAirStat#getStrcTwst <em>Strc Twst</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute list '<em>Strc Twst</em>'. * @see sc.ndt.editor.fast.fastbld.aAirStat#getStrcTws...
Returns the meta object for the attribute list '<code>sc.ndt.editor.fast.fastbld.aAirStat#getStrcTwst Strc Twst</code>'.
getaAirStat_StrcTwst
{ "repo_name": "cooked/NDT", "path": "sc.ndt.editor.fast.bld/src-gen/sc/ndt/editor/fast/fastbld/FastbldPackage.java", "license": "gpl-3.0", "size": 123602 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,480,319
public static InstrumentDefinition<?> createBondInstrument(FinanceInterpreter financeInterpreter, String funcArgs) throws SymbolNotFoundException, FIFActoryException { //Setup the reference to the interpretor, as it contains the symbol table information AnalyticsAbstractFactory.setFinInterp(financeInter...
static InstrumentDefinition<?> function(FinanceInterpreter financeInterpreter, String funcArgs) throws SymbolNotFoundException, FIFActoryException { AnalyticsAbstractFactory.setFinInterp(financeInterpreter); AnalyticsAbstractFactory af = AnalyticsAbstractFactory.getFactory(AnalyticsAbstractFactory.ProductFamilies.FIXED...
/** CREATOR FUNCTIONS * @param financeInterpreter * @return * @throws SymbolNotFoundException * @throws FIFActoryException */
CREATOR FUNCTIONS
createBondInstrument
{ "repo_name": "randheerDas/FinanceLingo", "path": "src/main/java/analytics/util/AnalyticsUtil.java", "license": "mit", "size": 9423 }
[ "com.opengamma.analytics.financial.instrument.InstrumentDefinition" ]
import com.opengamma.analytics.financial.instrument.InstrumentDefinition;
import com.opengamma.analytics.financial.instrument.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
2,790,071
public Object nextContent() throws JSONException { char c; StringBuilder sb; do { c = next(); } while (Character.isWhitespace(c)); if (c == 0) { return null; } if (c == '<') { return XML.LT; } sb = ne...
Object function() throws JSONException { char c; StringBuilder sb; do { c = next(); } while (Character.isWhitespace(c)); if (c == 0) { return null; } if (c == '<') { return XML.LT; } sb = new StringBuilder(); for (;;) { if (c == '<' c == 0) { back(); return sb.toString().trim(); } if (c == '&') { sb.append(nextEntity(c...
/** * Get the next XML outer token, trimming whitespace. There are two kinds * of tokens: the '<' character which begins a markup tag, and the content * text between markup tags. * * @return A string, or a '<' Character, or null if there is no more * source text. * @throws JSONExcept...
Get the next XML outer token, trimming whitespace. There are two kinds of tokens: the '<' character which begins a markup tag, and the content text between markup tags
nextContent
{ "repo_name": "mojo1643/margarita", "path": "app/src/main/java/com/example/root/margarita/util/XMLTokener.java", "license": "mit", "size": 9975 }
[ "org.json.JSONException" ]
import org.json.JSONException;
import org.json.*;
[ "org.json" ]
org.json;
2,191,250
protected CookieStore getCookieStore() throws Exception { return ((DefaultHttpClient) getHttpClient()).getCookieStore(); } /** * Given the a path on the api server, return a {@link HttpPost} that has the appropriate headers and server name. * * @param path the relative path to the se...
CookieStore function() throws Exception { return ((DefaultHttpClient) getHttpClient()).getCookieStore(); } /** * Given the a path on the api server, return a {@link HttpPost} that has the appropriate headers and server name. * * @param path the relative path to the server, such as <tt>/services/Soap</tt> or * <tt>/serv...
/** * Gets httpclient cookie store * * @return cookie store * @throws Exception */
Gets httpclient cookie store
getCookieStore
{ "repo_name": "badlogicmanpreet/aura", "path": "aura/src/test/java/org/auraframework/test/util/AuraHttpTestCase.java", "license": "apache-2.0", "size": 29594 }
[ "org.apache.http.client.CookieStore", "org.apache.http.client.methods.HttpPost", "org.apache.http.impl.client.DefaultHttpClient" ]
import org.apache.http.client.CookieStore; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.client.*; import org.apache.http.client.methods.*; import org.apache.http.impl.client.*;
[ "org.apache.http" ]
org.apache.http;
577,039
private Class<?> resolveListenerGeneric(final MethodGenericsContext generics, final Class listenerType, final int position) { // TO BE IMPROVED here must be correct resolution of RequiresRecordConversion generic, but it requires // some improvements in gen...
Class<?> function(final MethodGenericsContext generics, final Class listenerType, final int position) { if (RequiresRecordConversion.class.isAssignableFrom(listenerType) && listenerType.getTypeParameters().length > 0) { try { return generics.resolveGenericOf(generics.currentMethod().getGenericParameterTypes()[position]...
/** * Resolve generic specified directly in listener parameter (e.g. {@code QueryListener<Model>}). It would be * useful if, for some reason, correct type could not be resolved from listener instance (in most cases it * would be possible). * * @param generics repository method generics cont...
Resolve generic specified directly in listener parameter (e.g. QueryListener). It would be useful if, for some reason, correct type could not be resolved from listener instance (in most cases it would be possible)
resolveListenerGeneric
{ "repo_name": "xvik/guice-persist-orient", "path": "src/main/java/ru/vyarus/guice/persist/orient/repository/command/ext/listen/ListenParamExtension.java", "license": "mit", "size": 9018 }
[ "ru.vyarus.guice.persist.orient.repository.command.ext.listen.support.RequiresRecordConversion", "ru.vyarus.java.generics.resolver.context.MethodGenericsContext" ]
import ru.vyarus.guice.persist.orient.repository.command.ext.listen.support.RequiresRecordConversion; import ru.vyarus.java.generics.resolver.context.MethodGenericsContext;
import ru.vyarus.guice.persist.orient.repository.command.ext.listen.support.*; import ru.vyarus.java.generics.resolver.context.*;
[ "ru.vyarus.guice", "ru.vyarus.java" ]
ru.vyarus.guice; ru.vyarus.java;
2,597,907
@Test public void testSerialization() throws IOException, ClassNotFoundException { LineNeedle n1 = new LineNeedle(); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(n1); out.cl...
void function() throws IOException, ClassNotFoundException { LineNeedle n1 = new LineNeedle(); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(n1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteAr...
/** * Serialize an instance, restore it, and check for equality. */
Serialize an instance, restore it, and check for equality
testSerialization
{ "repo_name": "akardapolov/ASH-Viewer", "path": "jfreechart-fse/src/test/java/org/jfree/chart/needle/LineNeedleTest.java", "license": "gpl-3.0", "size": 3304 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.ObjectInput", "java.io.ObjectInputStream", "java.io.ObjectOutput", "java.io.ObjectOutputStream", "org.junit.Assert" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
2,722,096
private void ackSecurity() { assert log != null; U.quietAndInfo(log, "Security status [authentication=" + onOff(ctx.security().enabled()) + ", sandbox=" + onOff(ctx.security().sandbox().enabled()) + ", tls/ssl=" + onOff(ctx.config().getSslContextFactory() != null) + ']'); ...
void function() { assert log != null; U.quietAndInfo(log, STR + onOff(ctx.security().enabled()) + STR + onOff(ctx.security().sandbox().enabled()) + STR + onOff(ctx.config().getSslContextFactory() != null) + ']'); }
/** * Prints security status. */
Prints security status
ackSecurity
{ "repo_name": "nizhikov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java", "license": "apache-2.0", "size": 167540 }
[ "org.apache.ignite.internal.util.typedef.internal.U" ]
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,035,393
@Test public void testCloseWithoutHarvest() { TupleMetadata schema = new SchemaBuilder() .addMapArray("m") .add("a", MinorType.INT) .add("b", MinorType.VARCHAR) .resumeSchema() .buildSchema(); ResultSetLoaderImpl.ResultSetOptions options = new OptionBuilder() ...
void function() { TupleMetadata schema = new SchemaBuilder() .addMapArray("m") .add("a", MinorType.INT) .add("b", MinorType.VARCHAR) .resumeSchema() .buildSchema(); ResultSetLoaderImpl.ResultSetOptions options = new OptionBuilder() .setSchema(schema) .setRowCountLimit(ValueVector.MAX_ROW_COUNT) .build(); ResultSetLoade...
/** * Test that memory is released if the loader is closed with an active * batch (that is, before the batch is harvested.) */
Test that memory is released if the loader is closed with an active batch (that is, before the batch is harvested.)
testCloseWithoutHarvest
{ "repo_name": "Ben-Zvi/drill", "path": "exec/java-exec/src/test/java/org/apache/drill/exec/physical/resultSet/impl/TestResultSetLoaderMapArray.java", "license": "apache-2.0", "size": 17794 }
[ "org.apache.drill.common.types.TypeProtos", "org.apache.drill.exec.physical.resultSet.ResultSetLoader", "org.apache.drill.exec.physical.resultSet.RowSetLoader", "org.apache.drill.exec.record.metadata.SchemaBuilder", "org.apache.drill.exec.record.metadata.TupleMetadata", "org.apache.drill.exec.vector.Value...
import org.apache.drill.common.types.TypeProtos; import org.apache.drill.exec.physical.resultSet.ResultSetLoader; import org.apache.drill.exec.physical.resultSet.RowSetLoader; import org.apache.drill.exec.record.metadata.SchemaBuilder; import org.apache.drill.exec.record.metadata.TupleMetadata; import org.apache.drill....
import org.apache.drill.common.types.*; import org.apache.drill.exec.physical.*; import org.apache.drill.exec.record.metadata.*; import org.apache.drill.exec.vector.*; import org.apache.drill.exec.vector.accessor.*;
[ "org.apache.drill" ]
org.apache.drill;
2,576,448
private void checkEmptyJavadoc(TextBlock comment) { final String commentText = getCommentText(comment.getText()); if (commentText.length() == 0) { log(comment.getStartLineNo(), EMPTY); } }
void function(TextBlock comment) { final String commentText = getCommentText(comment.getText()); if (commentText.length() == 0) { log(comment.getStartLineNo(), EMPTY); } }
/** * Checks that the Javadoc is not empty. * * @param comment the source lines that make up the Javadoc comment. */
Checks that the Javadoc is not empty
checkEmptyJavadoc
{ "repo_name": "naver/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java", "license": "lgpl-2.1", "size": 19913 }
[ "com.puppycrawl.tools.checkstyle.api.TextBlock" ]
import com.puppycrawl.tools.checkstyle.api.TextBlock;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
2,084,882
@DataProvider(name = "appendEqualValuesDataProvider") public Object[][] appendEqualValuesDataProvider() { return new Object[][]{ {"abc", "abc"}, {new long[]{1, 2}, new long[]{1, 2}}, {new int[]{1, 2}, new int[]{1, 2}}, {new short[]{1, 2}, new short[]{1, 2}...
@DataProvider(name = STR) Object[][] function() { return new Object[][]{ {"abc", "abc"}, {new long[]{1, 2}, new long[]{1, 2}}, {new int[]{1, 2}, new int[]{1, 2}}, {new short[]{1, 2}, new short[]{1, 2}}, {new byte[]{1, 2}, new byte[]{1, 2}}, {new char[]{'a', 'b'}, new char[]{'a', 'b'}}, {new boolean[]{true, false}, new ...
/** * Data provider. * * @return Test data. */
Data provider
appendEqualValuesDataProvider
{ "repo_name": "elasticlib/elasticlib", "path": "elasticlib-common/src/test/java/org/elasticlib/common/util/EqualsBuilderTest.java", "license": "apache-2.0", "size": 9229 }
[ "org.testng.annotations.DataProvider" ]
import org.testng.annotations.DataProvider;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
332,324
private static String decodeIfSpecified(String value, boolean decode) { return decode ? SdkHttpUtils.urlDecode(value) : value; }
static String function(String value, boolean decode) { return decode ? SdkHttpUtils.urlDecode(value) : value; }
/** * Perform a url decode on the given value if specified. * Return value by default; */
Perform a url decode on the given value if specified. Return value by default
decodeIfSpecified
{ "repo_name": "dump247/aws-sdk-java", "path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser.java", "license": "apache-2.0", "size": 88975 }
[ "com.amazonaws.util.SdkHttpUtils" ]
import com.amazonaws.util.SdkHttpUtils;
import com.amazonaws.util.*;
[ "com.amazonaws.util" ]
com.amazonaws.util;
19,968
public void setupFormatList() { String[] outputFormats = TridasIO.getSupportedWritingFormats(); ArrayList<String> blah = new ArrayList<String>(Arrays.asList(outputFormats)); formatModel.addAll(blah); // Set the previously used format or default to TRiDaS if(App.prefs.getPref(PrefKey.EXPOR...
void function() { String[] outputFormats = TridasIO.getSupportedWritingFormats(); ArrayList<String> blah = new ArrayList<String>(Arrays.asList(outputFormats)); formatModel.addAll(blah); if(App.prefs.getPref(PrefKey.EXPORT_FORMAT, null)!=null) { cboExportFormat.setSelectedItem(App.prefs.getPref(PrefKey.EXPORT_FORMAT, nu...
/** * Set up the combo box containing the output file formats */
Set up the combo box containing the output file formats
setupFormatList
{ "repo_name": "petebrew/tellervo", "path": "src/main/java/org/tellervo/desktop/io/ExportUI.java", "license": "gpl-3.0", "size": 29323 }
[ "java.util.ArrayList", "java.util.Arrays", "org.tellervo.desktop.core.App", "org.tellervo.desktop.prefs.Prefs", "org.tridas.io.TridasIO" ]
import java.util.ArrayList; import java.util.Arrays; import org.tellervo.desktop.core.App; import org.tellervo.desktop.prefs.Prefs; import org.tridas.io.TridasIO;
import java.util.*; import org.tellervo.desktop.core.*; import org.tellervo.desktop.prefs.*; import org.tridas.io.*;
[ "java.util", "org.tellervo.desktop", "org.tridas.io" ]
java.util; org.tellervo.desktop; org.tridas.io;
355,566
public Result getClosestRowBefore(final byte [] regionName, final byte [] row, final byte [] family) throws IOException;
Result function(final byte [] regionName, final byte [] row, final byte [] family) throws IOException;
/** * Return all the data for the row that matches <i>row</i> exactly, * or the one that immediately preceeds it. * * @param regionName region name * @param row row key * @param family Column family to look for row in. * @return map of values * @throws IOException e */
Return all the data for the row that matches row exactly, or the one that immediately preceeds it
getClosestRowBefore
{ "repo_name": "axfcampos/hbase-0.94.19", "path": "src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java", "license": "apache-2.0", "size": 23798 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Result" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Result;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,161,860
protected void appendComparisonFunctions(GenerationContext context, XtendTypeDeclaration source, JvmGenericType target) { // Create a list of the declared non-static fields. final List<JvmField> declaredInstanceFields = new ArrayList<>(); for (final JvmField field : target.getDeclaredFields()) { if (!field....
void function(GenerationContext context, XtendTypeDeclaration source, JvmGenericType target) { final List<JvmField> declaredInstanceFields = new ArrayList<>(); for (final JvmField field : target.getDeclaredFields()) { if (!field.isStatic()) { declaredInstanceFields.add(field); } } if (!declaredInstanceFields.isEmpty())...
/** Create the functions that permits to compare the object. * * @param context the current generation context. * @param source the source object. * @param target the inferred JVM object. */
Create the functions that permits to compare the object
appendComparisonFunctions
{ "repo_name": "gallandarakhneorg/sarl", "path": "eclipse-sarl/plugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/SARLJvmModelInferrer.java", "license": "apache-2.0", "size": 113698 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.xtend.core.xtend.XtendTypeDeclaration", "org.eclipse.xtext.common.types.JvmField", "org.eclipse.xtext.common.types.JvmGenericType", "org.eclipse.xtext.common.types.JvmOperation" ]
import java.util.ArrayList; import java.util.List; import org.eclipse.xtend.core.xtend.XtendTypeDeclaration; import org.eclipse.xtext.common.types.JvmField; import org.eclipse.xtext.common.types.JvmGenericType; import org.eclipse.xtext.common.types.JvmOperation;
import java.util.*; import org.eclipse.xtend.core.xtend.*; import org.eclipse.xtext.common.types.*;
[ "java.util", "org.eclipse.xtend", "org.eclipse.xtext" ]
java.util; org.eclipse.xtend; org.eclipse.xtext;
969,950
public static void createMapping(HazelcastInstance instance, String name, Class<?> keyClass, Class<?> valueClass) { try (SqlResult result = instance.getSql().execute("CREATE OR REPLACE MAPPING " + name + " TYPE " + IMapSqlConnector.TYPE_NAME + "\n" + "OPTIONS (\n" + '\'' + OP...
static void function(HazelcastInstance instance, String name, Class<?> keyClass, Class<?> valueClass) { try (SqlResult result = instance.getSql().execute(STR + name + STR + IMapSqlConnector.TYPE_NAME + "\n" + STR + '\'' + OPTION_KEY_FORMAT + "'='" + JAVA_FORMAT + "'\n" + STR + OPTION_KEY_CLASS + "'='" + keyClass.getNam...
/** * Create an IMap mapping with the given {@code name} that uses * java serialization for both key and value with the given classes. */
Create an IMap mapping with the given name that uses java serialization for both key and value with the given classes
createMapping
{ "repo_name": "jerrinot/hazelcast", "path": "hazelcast-sql/src/test/java/com/hazelcast/jet/sql/SqlTestSupport.java", "license": "apache-2.0", "size": 18036 }
[ "com.hazelcast.core.HazelcastInstance", "com.hazelcast.jet.sql.impl.connector.map.IMapSqlConnector", "com.hazelcast.sql.SqlResult", "org.assertj.core.api.Assertions" ]
import com.hazelcast.core.HazelcastInstance; import com.hazelcast.jet.sql.impl.connector.map.IMapSqlConnector; import com.hazelcast.sql.SqlResult; import org.assertj.core.api.Assertions;
import com.hazelcast.core.*; import com.hazelcast.jet.sql.impl.connector.map.*; import com.hazelcast.sql.*; import org.assertj.core.api.*;
[ "com.hazelcast.core", "com.hazelcast.jet", "com.hazelcast.sql", "org.assertj.core" ]
com.hazelcast.core; com.hazelcast.jet; com.hazelcast.sql; org.assertj.core;
2,444,907
public void unregisterFilter(ContentName filter, CCNInterestHandler callbackHandler);
void function(ContentName filter, CCNInterestHandler callbackHandler);
/** * Unregister a standing interest filter * @param filter * @param callbackListener */
Unregister a standing interest filter
unregisterFilter
{ "repo_name": "MobileCloudNetworking/icnaas", "path": "mcn-ccn-router/ccnx-0.8.2/javasrc/src/main/org/ccnx/ccn/CCNBase.java", "license": "apache-2.0", "size": 4152 }
[ "org.ccnx.ccn.protocol.ContentName" ]
import org.ccnx.ccn.protocol.ContentName;
import org.ccnx.ccn.protocol.*;
[ "org.ccnx.ccn" ]
org.ccnx.ccn;
1,716,890
private JCheckBox getJTimeControlCheckBox() { if (jTimeControlCheckBox == null) { jTimeControlCheckBox = new JCheckBox(); jTimeControlCheckBox.setSelected(true); jTimeControlCheckBox.setText("Time control"); } return jTimeControlCheckBox; }
JCheckBox function() { if (jTimeControlCheckBox == null) { jTimeControlCheckBox = new JCheckBox(); jTimeControlCheckBox.setSelected(true); jTimeControlCheckBox.setText(STR); } return jTimeControlCheckBox; }
/** * This method initializes jTimeControlCheckBox * * @return javax.swing.JCheckBox */
This method initializes jTimeControlCheckBox
getJTimeControlCheckBox
{ "repo_name": "emreg00/biana", "path": "biana/BianaGUI/ParserOptionsPanel.java", "license": "gpl-3.0", "size": 17168 }
[ "javax.swing.JCheckBox" ]
import javax.swing.JCheckBox;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
226,421
public synchronized Task obtainNewReduceTask(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts ) throws IOException { if (status.getRunState() != JobStatus.RUNNING) { LOG.info("Cannot c...
synchronized Task function(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts ) throws IOException { if (status.getRunState() != JobStatus.RUNNING) { LOG.info(STR + profile.getJobID()); return null; } long estimatedReduceInputSize = resourceEstimator.getEstimatedReduceInputSize()/2; if (((estimatedReduceInputSi...
/** * Return a ReduceTask, if appropriate, to run on the given tasktracker. * We don't have cache-sensitivity for reduce tasks, as they * work on temporary MapRed files. */
Return a ReduceTask, if appropriate, to run on the given tasktracker. We don't have cache-sensitivity for reduce tasks, as they work on temporary MapRed files
obtainNewReduceTask
{ "repo_name": "CodEnFisH/palantir", "path": "hadoop/src/mapred/org/apache/hadoop/mapred/JobInProgress.java", "license": "apache-2.0", "size": 149641 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,940,731
public PigStats runSingle(String propfile) throws IOException { Properties props = new Properties(); FileInputStream fin = null; try { fin = new FileInputStream(propfile); props.load(fin); } finally { if (fin != null) fin.close(); } ...
PigStats function(String propfile) throws IOException { Properties props = new Properties(); FileInputStream fin = null; try { fin = new FileInputStream(propfile); props.load(fin); } finally { if (fin != null) fin.close(); } return runSingle(props); }
/** * Run a pipeline on Hadoop. * If there are no stores in this pipeline then nothing will be run. * @param propfile File with properties that Pig should set when running the script. * @return {@link PigStats}, null if there is no bound query to run. * @throws IOException */
Run a pipeline on Hadoop. If there are no stores in this pipeline then nothing will be run
runSingle
{ "repo_name": "kaituo/sedge", "path": "trunk/src/org/apache/pig/scripting/BoundScript.java", "license": "mit", "size": 13343 }
[ "java.io.FileInputStream", "java.io.IOException", "java.util.Properties", "org.apache.pig.tools.pigstats.PigStats" ]
import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; import org.apache.pig.tools.pigstats.PigStats;
import java.io.*; import java.util.*; import org.apache.pig.tools.pigstats.*;
[ "java.io", "java.util", "org.apache.pig" ]
java.io; java.util; org.apache.pig;
2,565,397
@Override public void paintBarShadow(final Graphics2D g2, final BarRenderer renderer, final int row, final int column, final RectangularShape bar, final RectangleEdge base, final boolean pegShadow) {}
void function(final Graphics2D g2, final BarRenderer renderer, final int row, final int column, final RectangularShape bar, final RectangleEdge base, final boolean pegShadow) {}
/** * Paints a single bar instance. * * @param g2 * the graphics target. * @param renderer * the renderer. * @param row * the row index. * @param column * the column index. * @param bar * the bar * @param base * ...
Paints a single bar instance
paintBarShadow
{ "repo_name": "rapidminer/rapidminer-studio", "path": "src/main/java/com/rapidminer/gui/plotter/charts/RapidBarPainter.java", "license": "agpl-3.0", "size": 5018 }
[ "java.awt.Graphics2D", "java.awt.geom.RectangularShape", "org.jfree.chart.renderer.category.BarRenderer", "org.jfree.ui.RectangleEdge" ]
import java.awt.Graphics2D; import java.awt.geom.RectangularShape; import org.jfree.chart.renderer.category.BarRenderer; import org.jfree.ui.RectangleEdge;
import java.awt.*; import java.awt.geom.*; import org.jfree.chart.renderer.category.*; import org.jfree.ui.*;
[ "java.awt", "org.jfree.chart", "org.jfree.ui" ]
java.awt; org.jfree.chart; org.jfree.ui;
1,535,920
public static BeanBinder<Map<String, Object>> simpleElementBinder(final String path) { final BeanBinder<Map<String, Object>> binder = BeanBinder.instance(MAP_CLASS, path); binder.registerBinder("id", PropertyBinder.instance(Long.class, "id", IdConverter.instance())); binder.registerBinder("u...
static BeanBinder<Map<String, Object>> function(final String path) { final BeanBinder<Map<String, Object>> binder = BeanBinder.instance(MAP_CLASS, path); binder.registerBinder("id", PropertyBinder.instance(Long.class, "id", IdConverter.instance())); binder.registerBinder(STR, PropertyBinder.instance(String.class, STR))...
/** * Returns a data binder for a Map to allow reading members as a Map with the properties: username, name */
Returns a data binder for a Map to allow reading members as a Map with the properties: username, name
simpleElementBinder
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/utils/binding/DataBinderHelper.java", "license": "gpl-2.0", "size": 9839 }
[ "java.util.Map", "nl.strohalm.cyclos.utils.conversion.IdConverter" ]
import java.util.Map; import nl.strohalm.cyclos.utils.conversion.IdConverter;
import java.util.*; import nl.strohalm.cyclos.utils.conversion.*;
[ "java.util", "nl.strohalm.cyclos" ]
java.util; nl.strohalm.cyclos;
2,510,333
public List<CplifeResidentInfo> getResidentInfo() { return this.residentInfo; }
List<CplifeResidentInfo> function() { return this.residentInfo; }
/** * <p>Getter for the field <code>residentInfo</code>.</p> * * @return a {@link java.util.List} object. */
Getter for the field <code>residentInfo</code>
getResidentInfo
{ "repo_name": "NotFound403/WePay", "path": "src/main/java/cn/felord/wepay/ali/sdk/api/domain/AlipayEcoCplifeResidentinfoUploadModel.java", "license": "apache-2.0", "size": 2184 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
533,223
private void translateImageToCenterTouchPosition(float t) { float targetX = startTouch.x + t * (endTouch.x - startTouch.x); float targetY = startTouch.y + t * (endTouch.y - startTouch.y); PointF curr = transformCoordBitmapToTouch(bitmapX, bitmapY); matrix.postTran...
void function(float t) { float targetX = startTouch.x + t * (endTouch.x - startTouch.x); float targetY = startTouch.y + t * (endTouch.y - startTouch.y); PointF curr = transformCoordBitmapToTouch(bitmapX, bitmapY); matrix.postTranslate(targetX - curr.x, targetY - curr.y); }
/** * Interpolate between where the image should start and end in order to translate * the image so that the point that is touched is what ends up centered at the end * of the zoom. * @param t */
Interpolate between where the image should start and end in order to translate the image so that the point that is touched is what ends up centered at the end of the zoom
translateImageToCenterTouchPosition
{ "repo_name": "oshepherd/Impeller", "path": "src/eu/e43/impeller/uikit/TouchImageView.java", "license": "apache-2.0", "size": 32406 }
[ "android.graphics.PointF" ]
import android.graphics.PointF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
481,252
private Artifact findMatchingArtifact( MavenProject project, Artifact requestedArtifact ) { String requestedRepositoryConflictId = ArtifactIdUtils.toVersionlessId( requestedArtifact ); Artifact mainArtifact = RepositoryUtils.toArtifact( project.getArtifact() ); if ( requestedRepositoryC...
Artifact function( MavenProject project, Artifact requestedArtifact ) { String requestedRepositoryConflictId = ArtifactIdUtils.toVersionlessId( requestedArtifact ); Artifact mainArtifact = RepositoryUtils.toArtifact( project.getArtifact() ); if ( requestedRepositoryConflictId.equals( ArtifactIdUtils.toVersionlessId( ma...
/** * Tries to resolve the specified artifact from the artifacts of the given project. * * @param project The project to try to resolve the artifact from, must not be <code>null</code>. * @param requestedArtifact The artifact to resolve, must not be <code>null</code>. * @return The matching art...
Tries to resolve the specified artifact from the artifacts of the given project
findMatchingArtifact
{ "repo_name": "cstamas/maven", "path": "maven-core/src/main/java/org/apache/maven/ReactorReader.java", "license": "apache-2.0", "size": 14365 }
[ "org.apache.maven.project.MavenProject", "org.eclipse.aether.artifact.Artifact", "org.eclipse.aether.util.artifact.ArtifactIdUtils" ]
import org.apache.maven.project.MavenProject; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.util.artifact.ArtifactIdUtils;
import org.apache.maven.project.*; import org.eclipse.aether.artifact.*; import org.eclipse.aether.util.artifact.*;
[ "org.apache.maven", "org.eclipse.aether" ]
org.apache.maven; org.eclipse.aether;
1,931,436
public boolean isCurrentDBDef(DBDef currentDBDef) { return _currentDBDef.equals(currentDBDef); }
boolean function(DBDef currentDBDef) { return _currentDBDef.equals(currentDBDef); }
/** * Is the current DB specified DB? * @param currentDBDef The DB definition of current DB. (NullAllowed: if null, returns false) * @return The determination, true or false. */
Is the current DB specified DB
isCurrentDBDef
{ "repo_name": "dbflute-example/dbflute-example-with-non-rdb", "path": "src/main/java/org/docksidestage/dbflute/allcommon/DBCurrent.java", "license": "apache-2.0", "size": 5074 }
[ "org.dbflute.dbway.DBDef" ]
import org.dbflute.dbway.DBDef;
import org.dbflute.dbway.*;
[ "org.dbflute.dbway" ]
org.dbflute.dbway;
2,095,190
protected Array getCollection() { try { // oracle.sql.ARRAY array = new oracle.sql.ARRAY( // arrayDesc, jdbcConn, arrayValues); Class clArrayDescriptor = Class.forName("oracle.sql.ArrayDescriptor"); Constructor constructor = classOracleARRAY.getDeclaredConstructor( new Class...
Array function() { try { Class clArrayDescriptor = Class.forName(STR); Constructor constructor = classOracleARRAY.getDeclaredConstructor( new Class[] {clArrayDescriptor, Connection.class, Object.class}); Object []elements = _javaCollection.toArray(); _collection = (Array) constructor.newInstance(new Object[] {_arrayDes...
/** * Returns the underlying Oracle collection */
Returns the underlying Oracle collection
getCollection
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/quercus/lib/db/OracleOciCollection.java", "license": "gpl-2.0", "size": 7128 }
[ "java.lang.reflect.Constructor", "java.lang.reflect.Method", "java.sql.Array", "java.sql.Connection", "java.util.logging.Level" ]
import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.sql.Array; import java.sql.Connection; import java.util.logging.Level;
import java.lang.reflect.*; import java.sql.*; import java.util.logging.*;
[ "java.lang", "java.sql", "java.util" ]
java.lang; java.sql; java.util;
298,283
protected void createBonusChest() { WorldGeneratorBonusChest worldgeneratorbonuschest = net.minecraftforge.common.ForgeHooks.getBonusChest(rand); for (int i = 0; i < 10; ++i) { int j = this.worldInfo.getSpawnX() + this.rand.nextInt(6) - this.rand.nextInt(6); int ...
void function() { WorldGeneratorBonusChest worldgeneratorbonuschest = net.minecraftforge.common.ForgeHooks.getBonusChest(rand); for (int i = 0; i < 10; ++i) { int j = this.worldInfo.getSpawnX() + this.rand.nextInt(6) - this.rand.nextInt(6); int k = this.worldInfo.getSpawnZ() + this.rand.nextInt(6) - this.rand.nextInt(6...
/** * Creates the bonus chest in the world. */
Creates the bonus chest in the world
createBonusChest
{ "repo_name": "tomtomtom09/CampCraft", "path": "build/tmp/recompileMc/sources/net/minecraft/world/WorldServer.java", "license": "gpl-3.0", "size": 48292 }
[ "net.minecraft.util.BlockPos", "net.minecraft.world.gen.feature.WorldGeneratorBonusChest" ]
import net.minecraft.util.BlockPos; import net.minecraft.world.gen.feature.WorldGeneratorBonusChest;
import net.minecraft.util.*; import net.minecraft.world.gen.feature.*;
[ "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.util; net.minecraft.world;
2,110,546
private String modifyContact(String id, JSONObject contact, Account account) { // Get the RAW_CONTACT_ID which is needed to insert new values in an already existing contact. // But not needed to update existing values. int rawId = (new Integer(getJsonString(contact,"rawId"))).intValue(); // Creat...
String function(String id, JSONObject contact, Account account) { int rawId = (new Integer(getJsonString(contact,"rawId"))).intValue(); ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>(); ops.add(ContentProviderOperation.newUpdate(ContactsContract.RawContacts.CONTENT_URI) .withValue(Con...
/** * Creates a new contact and stores it in the database * * @param id the raw contact id which is required for linking items to the contact * @param contact the contact to be saved * @param account the account to be saved under */
Creates a new contact and stores it in the database
modifyContact
{ "repo_name": "brycecurtis/cordova-android", "path": "framework/src/com/phonegap/ContactAccessorSdk5.java", "license": "apache-2.0", "size": 83394 }
[ "android.accounts.Account", "android.content.ContentProviderOperation", "android.content.ContentValues", "android.content.OperationApplicationException", "android.os.RemoteException", "android.provider.ContactsContract", "android.util.Log", "java.util.ArrayList", "org.json.JSONArray", "org.json.JS...
import android.accounts.Account; import android.content.ContentProviderOperation; import android.content.ContentValues; import android.content.OperationApplicationException; import android.os.RemoteException; import android.provider.ContactsContract; import android.util.Log; import java.util.ArrayList; import org.json....
import android.accounts.*; import android.content.*; import android.os.*; import android.provider.*; import android.util.*; import java.util.*; import org.json.*;
[ "android.accounts", "android.content", "android.os", "android.provider", "android.util", "java.util", "org.json" ]
android.accounts; android.content; android.os; android.provider; android.util; java.util; org.json;
1,702,612
public void explain(PhysicalPlan pp, PigContext pc, PrintStream ps, String format) throws PlanException, VisitorException, IOException { if ("xml".equals(format)) { ps.println("<mapReducePlan>No MR jobs. Fetch only</mapReducePlan>"); } else { ps.println("#...
void function(PhysicalPlan pp, PigContext pc, PrintStream ps, String format) throws PlanException, VisitorException, IOException { if ("xml".equals(format)) { ps.println(STR); } else { ps.println(STR); ps.println(STR); ps.println(STR); ps.println(STR); } return; }
/** * Creates an empty MR plan * * @param pp - Physical plan * @param pc - PigContext * @param ps - PrintStream to write the plan to * @param format format of the output plan * @throws PlanException * @throws VisitorException * @throws IOException */
Creates an empty MR plan
explain
{ "repo_name": "piaozhexiu/apache-pig", "path": "src/org/apache/pig/backend/hadoop/executionengine/fetch/FetchLauncher.java", "license": "apache-2.0", "size": 6512 }
[ "java.io.IOException", "java.io.PrintStream", "org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhysicalPlan", "org.apache.pig.impl.PigContext", "org.apache.pig.impl.plan.PlanException", "org.apache.pig.impl.plan.VisitorException" ]
import java.io.IOException; import java.io.PrintStream; import org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhysicalPlan; import org.apache.pig.impl.PigContext; import org.apache.pig.impl.plan.PlanException; import org.apache.pig.impl.plan.VisitorException;
import java.io.*; import org.apache.pig.backend.hadoop.executionengine.*; import org.apache.pig.impl.*; import org.apache.pig.impl.plan.*;
[ "java.io", "org.apache.pig" ]
java.io; org.apache.pig;
2,511,402
public final List<EdgeInfo> getInputEdges() { return Collections.unmodifiableList(inEdgeList); }
final List<EdgeInfo> function() { return Collections.unmodifiableList(inEdgeList); }
/** * Get incoming edge information for a specific vertex * * @return List<EdgeInfo> list of input edges on this vertex */
Get incoming edge information for a specific vertex
getInputEdges
{ "repo_name": "guiling/tez", "path": "tez-plugins/tez-history-parser/src/main/java/org/apache/tez/history/parser/datamodel/VertexInfo.java", "license": "apache-2.0", "size": 19614 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,883,209
private void handleConvenienceSymlinks(AnalysisResult analysisResult) { ImmutableList<ConvenienceSymlink> convenienceSymlinks = ImmutableList.of(); if (request.getBuildOptions().experimentalConvenienceSymlinks != ConvenienceSymlinksMode.IGNORE) { convenienceSymlinks = createConvenienceSymlinks(r...
void function(AnalysisResult analysisResult) { ImmutableList<ConvenienceSymlink> convenienceSymlinks = ImmutableList.of(); if (request.getBuildOptions().experimentalConvenienceSymlinks != ConvenienceSymlinksMode.IGNORE) { convenienceSymlinks = createConvenienceSymlinks(request.getBuildOptions(), analysisResult); } if (...
/** * Handles what action to perform on the convenience symlinks. If the the mode is {@link * ConvenienceSymlinksMode#IGNORE}, then skip any creating or cleaning of convenience symlinks. * Otherwise, manage the convenience symlinks and then post a {@link * ConvenienceSymlinksIdentifiedEvent} build event. ...
Handles what action to perform on the convenience symlinks. If the the mode is <code>ConvenienceSymlinksMode#IGNORE</code>, then skip any creating or cleaning of convenience symlinks. Otherwise, manage the convenience symlinks and then post a <code>ConvenienceSymlinksIdentifiedEvent</code> build event
handleConvenienceSymlinks
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/buildtool/ExecutionTool.java", "license": "apache-2.0", "size": 41356 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.analysis.AnalysisResult", "com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos", "com.google.devtools.build.lib.buildtool.BuildRequestOptions", "com.google.devtools.build.lib.buildtool.buildevent.ConvenienceSymlinksI...
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.analysis.AnalysisResult; import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos; import com.google.devtools.build.lib.buildtool.BuildRequestOptions; import com.google.devtools.build.lib.buildtool.buildevent.Conven...
import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.buildeventstream.*; import com.google.devtools.build.lib.buildtool.*; import com.google.devtools.build.lib.buildtool.buildevent.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
1,936,272
public void setField(TaskField field) { m_field = field; }
void function(TaskField field) { m_field = field; }
/** * Set the target task field. * * @param field TaskField instance */
Set the target task field
setField
{ "repo_name": "tmyroadctfig/mpxj", "path": "net/sf/mpxj/mpx/MPXReader.java", "license": "lgpl-2.1", "size": 46480 }
[ "net.sf.mpxj.TaskField" ]
import net.sf.mpxj.TaskField;
import net.sf.mpxj.*;
[ "net.sf.mpxj" ]
net.sf.mpxj;
624,171
public int stepToOuterScreenEvent() { FormIndex index = stepIndexOut(getFormIndex()); int currentEvent = getEvent(); // Step out of any group indexes that are present. while (index != null && getEvent(index) == FormEntryController.EVENT_GROUP) { index = s...
int function() { FormIndex index = stepIndexOut(getFormIndex()); int currentEvent = getEvent(); while (index != null && getEvent(index) == FormEntryController.EVENT_GROUP) { index = stepIndexOut(index); } if (index == null) { jumpToIndex(FormIndex.createBeginningOfFormIndex()); } else { if (currentEvent == FormEntryCon...
/** * Move the current form index to the index of the first enclosing repeat * or to the start of the form. * * @return */
Move the current form index to the index of the first enclosing repeat or to the start of the form
stepToOuterScreenEvent
{ "repo_name": "smap-consulting/smap-survey-manager", "path": "src/main/java/org/odk/FormController.java", "license": "apache-2.0", "size": 44117 }
[ "org.javarosa.core.model.FormIndex", "org.javarosa.form.api.FormEntryController" ]
import org.javarosa.core.model.FormIndex; import org.javarosa.form.api.FormEntryController;
import org.javarosa.core.model.*; import org.javarosa.form.api.*;
[ "org.javarosa.core", "org.javarosa.form" ]
org.javarosa.core; org.javarosa.form;
2,426,283
public void setCollDetailFKnoPK(java.util.Vector collDetailFKnoPK) { this.collDetailFKnoPK = collDetailFKnoPK; }
void function(java.util.Vector collDetailFKnoPK) { this.collDetailFKnoPK = collDetailFKnoPK; }
/** * Sets the collDetailFKnoPK. * @param collDetailFKnoPK The collDetailFKnoPK to set */
Sets the collDetailFKnoPK
setCollDetailFKnoPK
{ "repo_name": "kuali/ojb-1.0.4", "path": "src/test/org/apache/ojb/odmg/shared/Master.java", "license": "apache-2.0", "size": 2883 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,725,805
public static int readCompressedInt(ByteBuffer buffer) { byte b = buffer.get(); if ((b & NEXT_BIT_MASK) != 0) { return (b & VALUE_MASK) + (readCompressedInt(buffer) << NEXT_BIT_SHIFT); } return b & VALUE_MASK; }
static int function(ByteBuffer buffer) { byte b = buffer.get(); if ((b & NEXT_BIT_MASK) != 0) { return (b & VALUE_MASK) + (readCompressedInt(buffer) << NEXT_BIT_SHIFT); } return b & VALUE_MASK; }
/** * Read integer from buffer coded in 7 bits and increment position. * @return Read integer. */
Read integer from buffer coded in 7 bits and increment position
readCompressedInt
{ "repo_name": "juwi/hbase", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java", "license": "apache-2.0", "size": 27886 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,738,272
public Set<String> allowedRequestHeaders() { return Collections.unmodifiableSet(allowedRequestHeaders); }
Set<String> function() { return Collections.unmodifiableSet(allowedRequestHeaders); }
/** * Returns the allowed set of Request Headers. * * The header names returned from this method will be used to set the CORS * 'Access-Control-Allow-Headers' response header. * * @return {@code Set<String>} of strings that represent the allowed Request Headers. */
Returns the allowed set of Request Headers. The header names returned from this method will be used to set the CORS 'Access-Control-Allow-Headers' response header
allowedRequestHeaders
{ "repo_name": "drowning/netty", "path": "codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsConfig.java", "license": "apache-2.0", "size": 21769 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,473,075
public static ThingStatusInfoBuilder create(ThingStatus status, ThingStatusDetail statusDetail) throws IllegalArgumentException { if (status == null) { throw new IllegalArgumentException("Thing status must not be null"); } if (statusDetail == null) { throw...
static ThingStatusInfoBuilder function(ThingStatus status, ThingStatusDetail statusDetail) throws IllegalArgumentException { if (status == null) { throw new IllegalArgumentException(STR); } if (statusDetail == null) { throw new IllegalArgumentException(STR); } return new ThingStatusInfoBuilder(status, statusDetail, nul...
/** * Creates a status info builder for the given status and detail. * * @param status the status (must not be null) * @param statusDetail the detail of the status (must not be null) * @return status info builder * * @throws IllegalArgumentException if thing status or thing status d...
Creates a status info builder for the given status and detail
create
{ "repo_name": "phxql/smarthome", "path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/binding/builder/ThingStatusInfoBuilder.java", "license": "epl-1.0", "size": 3464 }
[ "org.eclipse.smarthome.core.thing.ThingStatus", "org.eclipse.smarthome.core.thing.ThingStatusDetail" ]
import org.eclipse.smarthome.core.thing.ThingStatus; import org.eclipse.smarthome.core.thing.ThingStatusDetail;
import org.eclipse.smarthome.core.thing.*;
[ "org.eclipse.smarthome" ]
org.eclipse.smarthome;
1,107,795
public RuleExecutionSet createRuleExecutionSet(final Object ruleExecutionSetAst, final Map properties) throws RuleExecutionSetCreateException { if ( ruleExecutionSetAst instanceof InternalKnowledgePackage ) { InternalKnowledgePackage pkg = (Inte...
RuleExecutionSet function(final Object ruleExecutionSetAst, final Map properties) throws RuleExecutionSetCreateException { if ( ruleExecutionSetAst instanceof InternalKnowledgePackage ) { InternalKnowledgePackage pkg = (InternalKnowledgePackage) ruleExecutionSetAst; return this.createRuleExecutionSet( pkg, properties )...
/** * Creates a <code>RuleExecutionSet</code> implementation from a * Drools-specific AST representation and Drools-specific properties. * * @param ruleExecutionSetAst * the vendor representation of a rule execution set * @param properties * additional properties...
Creates a <code>RuleExecutionSet</code> implementation from a Drools-specific AST representation and Drools-specific properties
createRuleExecutionSet
{ "repo_name": "bxf12315/drools", "path": "drools-jsr94/src/main/java/org/drools/jsr94/rules/admin/LocalRuleExecutionSetProviderImpl.java", "license": "apache-2.0", "size": 10146 }
[ "java.util.Map", "javax.rules.admin.RuleExecutionSet", "javax.rules.admin.RuleExecutionSetCreateException", "org.drools.core.definitions.InternalKnowledgePackage" ]
import java.util.Map; import javax.rules.admin.RuleExecutionSet; import javax.rules.admin.RuleExecutionSetCreateException; import org.drools.core.definitions.InternalKnowledgePackage;
import java.util.*; import javax.rules.admin.*; import org.drools.core.definitions.*;
[ "java.util", "javax.rules", "org.drools.core" ]
java.util; javax.rules; org.drools.core;
1,019,173
public void deleteExercise(String exerciseName) { Log.d(TAG,"deleteExercise"); writableDB.delete( TABLE_EXERCISES, KEY_EXERCISE_NAME + "=?", new String[]{exerciseName} ); writableDB.delete( TABLE_EXERCISE_SESSIONS, ...
void function(String exerciseName) { Log.d(TAG,STR); writableDB.delete( TABLE_EXERCISES, KEY_EXERCISE_NAME + "=?", new String[]{exerciseName} ); writableDB.delete( TABLE_EXERCISE_SESSIONS, KEY_EXERCISE_NAME + "=?", new String[]{exerciseName} ); writableDB.delete( TABLE_ROUTINE_EXERCISES, KEY_EXERCISE_NAME + "=?", new S...
/*** * Deletes an exercise and all of the data related to the exercise, including * ExerciseSessions, Sets, and RoutineExercises. * @param exerciseName Name of the exercise to be deleted from the database */
Deletes an exercise and all of the data related to the exercise, including ExerciseSessions, Sets, and RoutineExercises
deleteExercise
{ "repo_name": "mpsonic/Evolve-Workout-Logger", "path": "app/src/main/java/edu/umn/paull011/evolveworkoutlogger/data_structures/DatabaseHelper.java", "license": "mit", "size": 61590 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
94,315
public Node getOffendingNode() { return offendingNode; }
Node function() { return offendingNode; }
/** * Returns the <code>Node</code> that caused the error in parsing. * * @return the offending <code>Node</code>. */
Returns the <code>Node</code> that caused the error in parsing
getOffendingNode
{ "repo_name": "flyzsd/java-code-snippets", "path": "ibm.jdk8/src/javax/imageio/metadata/IIOInvalidTreeException.java", "license": "mit", "size": 3165 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,665,214
return RandomStringUtils.randomAlphanumeric(DEF_COUNT); }
return RandomStringUtils.randomAlphanumeric(DEF_COUNT); }
/** * Generate a password. * * @return the generated password */
Generate a password
generatePassword
{ "repo_name": "janes/janes-master-thesis-ecommerce", "path": "src/main/java/br/com/janes/ecommerce/service/util/RandomUtil.java", "license": "apache-2.0", "size": 1454 }
[ "org.apache.commons.lang3.RandomStringUtils" ]
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
1,382,227
@Test void withAssertions_setRemoveAssertJRelatedElementsFromStackTrace_Test() { setRemoveAssertJRelatedElementsFromStackTrace(true); }
void withAssertions_setRemoveAssertJRelatedElementsFromStackTrace_Test() { setRemoveAssertJRelatedElementsFromStackTrace(true); }
/** * Test that the delegate method is called. */
Test that the delegate method is called
withAssertions_setRemoveAssertJRelatedElementsFromStackTrace_Test
{ "repo_name": "hazendaz/assertj-core", "path": "src/test/java/org/assertj/core/api/WithAssertions_delegation_Test.java", "license": "apache-2.0", "size": 25178 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
1,576,439
public HistoryStep[] getBackSteps() { return null; }
HistoryStep[] function() { return null; }
/** * no back action possible, return null. */
no back action possible, return null
getBackSteps
{ "repo_name": "auroreallibe/Silverpeas-Core", "path": "core-services/workflow/src/main/java/org/silverpeas/core/workflow/engine/task/CreationTaskImpl.java", "license": "agpl-3.0", "size": 3131 }
[ "org.silverpeas.core.workflow.api.instance.HistoryStep" ]
import org.silverpeas.core.workflow.api.instance.HistoryStep;
import org.silverpeas.core.workflow.api.instance.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
1,879,468
static <T extends Annotation> Set<T> collectAnnotationsOfMethod( Class<T> annotation, Method annotatedMethod) { return new LinkedHashSet<>(Arrays.asList(annotatedMethod.getAnnotationsByType(annotation))); } // -------------------------------------------------------------------------------------------- //...
static <T extends Annotation> Set<T> collectAnnotationsOfMethod( Class<T> annotation, Method annotatedMethod) { return new LinkedHashSet<>(Arrays.asList(annotatedMethod.getAnnotationsByType(annotation))); } static class AssigningConstructor { public final Constructor<?> constructor; public final List<String> parameterN...
/** * Collects all annotations of the given type defined in the given method. Duplicates are ignored. */
Collects all annotations of the given type defined in the given method. Duplicates are ignored
collectAnnotationsOfMethod
{ "repo_name": "greghogan/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/extraction/ExtractionUtils.java", "license": "apache-2.0", "size": 32539 }
[ "java.lang.annotation.Annotation", "java.lang.reflect.Constructor", "java.lang.reflect.Method", "java.util.Arrays", "java.util.LinkedHashSet", "java.util.List", "java.util.Set" ]
import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Set;
import java.lang.annotation.*; import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
759,340
boolean removeAttributeWithoutCheck(PerunSession sess, Facility facility, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException;
boolean removeAttributeWithoutCheck(PerunSession sess, Facility facility, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException;
/** * Unset all attributes for the facility without check of value. * * @param sess * @param facility * @param attribute * @return {@code true} if attribute was changed (deleted) or {@code false} if attribute was not present in a first place * @throws WrongAttributeAssignmentException if attribute isn't f...
Unset all attributes for the facility without check of value
removeAttributeWithoutCheck
{ "repo_name": "jirmauritz/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java", "license": "bsd-2-clause", "size": 193360 }
[ "cz.metacentrum.perun.core.api.AttributeDefinition", "cz.metacentrum.perun.core.api.Facility", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException" ]
import cz.metacentrum.perun.core.api.AttributeDefinition; import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
1,296,671
public Observable<ServiceResponseWithHeaders<CertificateContractInner, CertificateCreateOrUpdateHeaders>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParameters parameters) { if (resourceGroupName == null) { ...
Observable<ServiceResponseWithHeaders<CertificateContractInner, CertificateCreateOrUpdateHeaders>> function(String resourceGroupName, String serviceName, String certificateId, CertificateCreateOrUpdateParameters parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serviceName ==...
/** * Creates or updates the certificate being used for authentication with the backend. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param certificateId Identifier of the certificate entity. Must be unique in the c...
Creates or updates the certificate being used for authentication with the backend
createOrUpdateWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/apimanagement/mgmt-v2019_12_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_12_01/implementation/CertificatesInner.java", "license": "mit", "size": 63278 }
[ "com.microsoft.azure.management.apimanagement.v2019_12_01.CertificateCreateOrUpdateHeaders", "com.microsoft.azure.management.apimanagement.v2019_12_01.CertificateCreateOrUpdateParameters", "com.microsoft.rest.ServiceResponseWithHeaders" ]
import com.microsoft.azure.management.apimanagement.v2019_12_01.CertificateCreateOrUpdateHeaders; import com.microsoft.azure.management.apimanagement.v2019_12_01.CertificateCreateOrUpdateParameters; import com.microsoft.rest.ServiceResponseWithHeaders;
import com.microsoft.azure.management.apimanagement.v2019_12_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,275,048
@Test public void testUnknownJobThrowsException() throws Exception { expectedThrown.expect(IllegalStateException.class); createMockRunner( createMockJob("testUnknownJob-projectId", "testUnknownJob-jobId", State.UNKNOWN)) .run(TestPipeline.create()); }
void function() throws Exception { expectedThrown.expect(IllegalStateException.class); createMockRunner( createMockJob(STR, STR, State.UNKNOWN)) .run(TestPipeline.create()); }
/** * Tests that the {@link BlockingDataflowRunner} throws the appropriate exception * when a job terminates in the {@link State#UNKNOWN UNKNOWN} state, indicating that the * Dataflow service returned a state that the SDK is unfamiliar with (possibly because it * is an old SDK relative the service). */
Tests that the <code>BlockingDataflowRunner</code> throws the appropriate exception when a job terminates in the <code>State#UNKNOWN UNKNOWN</code> state, indicating that the Dataflow service returned a state that the SDK is unfamiliar with (possibly because it is an old SDK relative the service)
testUnknownJobThrowsException
{ "repo_name": "tweise/beam", "path": "runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/BlockingDataflowRunnerTest.java", "license": "apache-2.0", "size": 11534 }
[ "org.apache.beam.sdk.PipelineResult", "org.apache.beam.sdk.testing.TestPipeline" ]
import org.apache.beam.sdk.PipelineResult; import org.apache.beam.sdk.testing.TestPipeline;
import org.apache.beam.sdk.*; import org.apache.beam.sdk.testing.*;
[ "org.apache.beam" ]
org.apache.beam;
1,326,693
private long computePixelArea(BufferedImage image) throws JobManagerException { int type = image.getType(); if (type != BufferedImage.TYPE_3BYTE_BGR && type != BufferedImage.TYPE_4BYTE_ABGR && type != BufferedImage.TYPE_4BYTE_ABGR_PRE && type != BufferedImage.TYPE_BYTE_GRAY) { // BufferedImage is ...
long function(BufferedImage image) throws JobManagerException { int type = image.getType(); if (type != BufferedImage.TYPE_3BYTE_BGR && type != BufferedImage.TYPE_4BYTE_ABGR && type != BufferedImage.TYPE_4BYTE_ABGR_PRE && type != BufferedImage.TYPE_BYTE_GRAY) { throw(new JobManagerException( STR +STR +type) ); } long a...
/** * Compute the number of non-black pixels in an image as a measure of its * area as a pixel count. We can only handle 3 and 4 byte formats though. * * @param image * @return */
Compute the number of non-black pixels in an image as a measure of its area as a pixel count. We can only handle 3 and 4 byte formats though
computePixelArea
{ "repo_name": "WhisperingGibbon/Photonic3D", "path": "host/src/main/java/org/area515/resinprinter/job/render/CurrentImageRenderer.java", "license": "gpl-3.0", "size": 5291 }
[ "java.awt.image.BufferedImage", "java.awt.image.DataBufferByte", "org.area515.resinprinter.job.JobManagerException" ]
import java.awt.image.BufferedImage; import java.awt.image.DataBufferByte; import org.area515.resinprinter.job.JobManagerException;
import java.awt.image.*; import org.area515.resinprinter.job.*;
[ "java.awt", "org.area515.resinprinter" ]
java.awt; org.area515.resinprinter;
2,607,297