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
T evaluate(NullLiteral nullLiteral);
T evaluate(NullLiteral nullLiteral);
/** * Evaluate a {@link NullLiteral} node. * * @param nullLiteral the node to evaluate * @return the evaluation result */
Evaluate a <code>NullLiteral</code> node
evaluate
{ "repo_name": "Nimco/sling", "path": "bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/compiler/expression/NodeVisitor.java", "license": "apache-2.0", "size": 4740 }
[ "org.apache.sling.scripting.sightly.compiler.expression.nodes.NullLiteral" ]
import org.apache.sling.scripting.sightly.compiler.expression.nodes.NullLiteral;
import org.apache.sling.scripting.sightly.compiler.expression.nodes.*;
[ "org.apache.sling" ]
org.apache.sling;
25,380
public void init() { XFlatParagraphIterator tmpFlatParaIter = getXFlatParagraphIterator(xComponent); if (tmpFlatParaIter != null) { xFlatParaIter = tmpFlatParaIter; } }
void function() { XFlatParagraphIterator tmpFlatParaIter = getXFlatParagraphIterator(xComponent); if (tmpFlatParaIter != null) { xFlatParaIter = tmpFlatParaIter; } }
/** * Initialize XFlatParagraphIterator * Set the new iterator only if it is not null */
Initialize XFlatParagraphIterator Set the new iterator only if it is not null
init
{ "repo_name": "languagetool-org/languagetool", "path": "languagetool-office-extension/src/main/java/org/languagetool/openoffice/FlatParagraphTools.java", "license": "lgpl-2.1", "size": 29651 }
[ "com.sun.star.text.XFlatParagraphIterator" ]
import com.sun.star.text.XFlatParagraphIterator;
import com.sun.star.text.*;
[ "com.sun.star" ]
com.sun.star;
2,187,667
@SuppressWarnings("unchecked") private void submitData() { final JSONObject data = getServerData(); JSONArray pluginData = new JSONArray(); // Search for all other bStats Metrics classes to get their plugin data for (Class<?> service : Bukkit.getServicesManager().getKnownServices()...
@SuppressWarnings(STR) void function() { final JSONObject data = getServerData(); JSONArray pluginData = new JSONArray(); for (Class<?> service : Bukkit.getServicesManager().getKnownServices()) { try { service.getField(STR); } catch (NoSuchFieldException ignored) { continue; } try { pluginData.add(service.getMethod(STR...
/** * Collects the data and sends it afterwards. */
Collects the data and sends it afterwards
submitData
{ "repo_name": "ClickPT/EasySetSpawn", "path": "src/me/clickpt/easysetspawn/MetricsLite.java", "license": "mit", "size": 11453 }
[ "java.lang.reflect.InvocationTargetException", "org.bukkit.Bukkit", "org.json.simple.JSONArray", "org.json.simple.JSONObject" ]
import java.lang.reflect.InvocationTargetException; import org.bukkit.Bukkit; import org.json.simple.JSONArray; import org.json.simple.JSONObject;
import java.lang.reflect.*; import org.bukkit.*; import org.json.simple.*;
[ "java.lang", "org.bukkit", "org.json.simple" ]
java.lang; org.bukkit; org.json.simple;
270,015
void visitTransformationSteps(Action<? super TransformationStep> action);
void visitTransformationSteps(Action<? super TransformationStep> action);
/** * Extract the transformation steps from this transformation. */
Extract the transformation steps from this transformation
visitTransformationSteps
{ "repo_name": "lsmaira/gradle", "path": "subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/transform/Transformation.java", "license": "apache-2.0", "size": 1636 }
[ "org.gradle.api.Action" ]
import org.gradle.api.Action;
import org.gradle.api.*;
[ "org.gradle.api" ]
org.gradle.api;
1,516,193
@Authorized( { PrivilegeConstants.GET_ENCOUNTER_ROLES }) public List<EncounterRole> getEncounterRolesByName(String name);
@Authorized( { PrivilegeConstants.GET_ENCOUNTER_ROLES }) List<EncounterRole> function(String name);
/** * Get EncounterRoles by name * * @param name * @return List of EncounterRole objects * @since 1.11 * @should find encounter roles based on their name */
Get EncounterRoles by name
getEncounterRolesByName
{ "repo_name": "MitchellBot/openmrs-core", "path": "api/src/main/java/org/openmrs/api/EncounterService.java", "license": "mpl-2.0", "size": 28818 }
[ "java.util.List", "org.openmrs.EncounterRole", "org.openmrs.annotation.Authorized", "org.openmrs.util.PrivilegeConstants" ]
import java.util.List; import org.openmrs.EncounterRole; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants;
import java.util.*; import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*;
[ "java.util", "org.openmrs", "org.openmrs.annotation", "org.openmrs.util" ]
java.util; org.openmrs; org.openmrs.annotation; org.openmrs.util;
1,967,236
protected void enterSizeConstraint(Production node) throws ParseException { }
void function(Production node) throws ParseException { }
/** * Called when entering a parse tree node. * * @param node the node being entered * * @throws ParseException if the node analysis discovered errors */
Called when entering a parse tree node
enterSizeConstraint
{ "repo_name": "richb-hanover/mibble-2.9.2", "path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java", "license": "gpl-2.0", "size": 275483 }
[ "net.percederberg.grammatica.parser.ParseException", "net.percederberg.grammatica.parser.Production" ]
import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production;
import net.percederberg.grammatica.parser.*;
[ "net.percederberg.grammatica" ]
net.percederberg.grammatica;
447,678
@Override public JsonElement get() { return content; }
JsonElement function() { return content; }
/** * Returns the root node of the JSON tree. * @return the JSON root element. */
Returns the root node of the JSON tree
get
{ "repo_name": "supriyantomaftuh/java-client-api", "path": "src/main/java/com/marklogic/client/extra/gson/GSONHandle.java", "license": "apache-2.0", "size": 5212 }
[ "com.google.gson.JsonElement" ]
import com.google.gson.JsonElement;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
1,335,838
public void testChange2ElementsEnd() throws Exception { Element plainElement = paragraph.getElement(0); Element boldElement = paragraph.getElement(1); int offset = (plainElement.getStartOffset() + plainElement.getEndOffset()) / 2; int length = boldElement.getEndOffset() - offset; ...
void function() throws Exception { Element plainElement = paragraph.getElement(0); Element boldElement = paragraph.getElement(1); int offset = (plainElement.getStartOffset() + plainElement.getEndOffset()) / 2; int length = boldElement.getEndOffset() - offset; buf.change(offset, length, createEvent(offset, length)); fin...
/** * The change is applied from the middle of an element to the end of * the next element. * The first element is to be split, the other is unchanged. */
The change is applied from the middle of an element to the end of the next element. The first element is to be split, the other is unchanged
testChange2ElementsEnd
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/swing/src/test/api/java.injected/javax/swing/text/DefaultStyledDocument_ElementBuffer_ChangeTest.java", "license": "apache-2.0", "size": 11458 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,012,808
public void encode(CharBuffer[] in, BytesBuilder out); /** * Encode the characters from the subsequence of the specified {@code in} * starting at {@code offset} ending at {@code (offset + length)} and append * the result to the specified {@code out}. * * @param in * an array of {@code CharB...
void function(CharBuffer[] in, BytesBuilder out); /** * Encode the characters from the subsequence of the specified {@code in} * starting at {@code offset} ending at {@code (offset + length)} and append * the result to the specified {@code out}. * * @param in * an array of {@code CharBuffer}s containing the characters ...
/** * Encode the characters from the given sequence of char buffers and append * the result to the specified {@code out}. * * @param in * an array of {@code CharBuffer}s containing the characters to * be encoded * @param out * the {@code BytesBuilder} to append the enco...
Encode the characters from the given sequence of char buffers and append the result to the specified out
encode
{ "repo_name": "hyang04/jruyi", "path": "api/src/main/java/org/jruyi/common/ICharsetCodec.java", "license": "apache-2.0", "size": 15040 }
[ "java.nio.CharBuffer" ]
import java.nio.CharBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,410,073
protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) { Collection<IAction> actions = new ArrayList<IAction>(); if (descriptors != null) { for (Object descriptor : descriptors) { actions.add(n...
Collection<IAction> function(Collection<?> descriptors, ISelection selection) { Collection<IAction> actions = new ArrayList<IAction>(); if (descriptors != null) { for (Object descriptor : descriptors) { actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); } } return actions; }
/** * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>, * and returns the collection of these actions. * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */
This generates a <code>org.eclipse.emf.edit.ui.action.CreateSiblingAction</code> for each object in <code>descriptors</code>, and returns the collection of these actions.
generateCreateSiblingActions
{ "repo_name": "knadikari/developer-studio", "path": "data-services/org.wso2.developerstudio.eclipse.ds.editor/src/org/wso2/developerstudio/eclipse/ds/presentation/DsActionBarContributor.java", "license": "apache-2.0", "size": 51874 }
[ "java.util.ArrayList", "java.util.Collection", "org.eclipse.emf.edit.ui.action.CreateSiblingAction", "org.eclipse.jface.action.IAction", "org.eclipse.jface.viewers.ISelection" ]
import java.util.ArrayList; import java.util.Collection; import org.eclipse.emf.edit.ui.action.CreateSiblingAction; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection;
import java.util.*; import org.eclipse.emf.edit.ui.action.*; import org.eclipse.jface.action.*; import org.eclipse.jface.viewers.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.jface" ]
java.util; org.eclipse.emf; org.eclipse.jface;
950,172
@Override public boolean accept(File file) { String name = file.getName(); for (String prefix : this.prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
boolean function(File file) { String name = file.getName(); for (String prefix : this.prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File to check * @return true if the filename starts with one of our prefixes */
Checks to see if the filename starts with the prefix
accept
{ "repo_name": "Giraudux/java-quel-bazar", "path": "src/org/apache/commons/io/filefilter/PrefixFileFilter.java", "license": "mit", "size": 7180 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,001,374
public String stringify(Association association, String defTabs) { if (association == null) return null; String tabs = defTabs + TAB; StringBuilder result = new StringBuilder(); result.append(" - name: " + association.getName() + ", optional: " + association.isOptional() + ", "); result.append("lower...
String function(Association association, String defTabs) { if (association == null) return null; String tabs = defTabs + TAB; StringBuilder result = new StringBuilder(); result.append(STR + association.getName() + STR + association.isOptional() + STR); result.append(STR + association.getLowerBound() + STR + association...
/** * Method used to stringify an Association. * @param association The Association to be serialized. * @param defTabs The number of tabs to apply to the serialization. * @return A String containing a serialized Association. */
Method used to stringify an Association
stringify
{ "repo_name": "catedrasaes-umu/NoSQLDataEngineering", "path": "projects/es.um.nosql.s13e.datavisualization/src/data/utils/serializer/NoSQLSchemaSerializer.java", "license": "mit", "size": 9805 }
[ "es.um.nosql.s13e.NoSQLSchema", "java.util.stream.Collectors" ]
import es.um.nosql.s13e.NoSQLSchema; import java.util.stream.Collectors;
import es.um.nosql.s13e.*; import java.util.stream.*;
[ "es.um.nosql", "java.util" ]
es.um.nosql; java.util;
238,475
String expandForFile( BuildTarget target, CellPathResolver cellNames, BuildRuleResolver resolver, String input) throws MacroException;
String expandForFile( BuildTarget target, CellPathResolver cellNames, BuildRuleResolver resolver, String input) throws MacroException;
/** * Expand the input given for the this macro to some string, which is intended to be written to * a file. */
Expand the input given for the this macro to some string, which is intended to be written to a file
expandForFile
{ "repo_name": "janicduplessis/buck", "path": "src/com/facebook/buck/rules/macros/MacroExpanderWithCustomFileOutput.java", "license": "apache-2.0", "size": 1320 }
[ "com.facebook.buck.model.BuildTarget", "com.facebook.buck.model.MacroException", "com.facebook.buck.rules.BuildRuleResolver", "com.facebook.buck.rules.CellPathResolver" ]
import com.facebook.buck.model.BuildTarget; import com.facebook.buck.model.MacroException; import com.facebook.buck.rules.BuildRuleResolver; import com.facebook.buck.rules.CellPathResolver;
import com.facebook.buck.model.*; import com.facebook.buck.rules.*;
[ "com.facebook.buck" ]
com.facebook.buck;
1,291,275
@Test public void missingContext() { List<ContextEntry> nullContextEntries = null; KubeConfig kubeConfig = kubeConfig(// clusterEntries( // clusterEntry("cluster1", clusterCaCertPath("https://apiserver1", CA_CERT_PATH)), clusterEntr...
void function() { List<ContextEntry> nullContextEntries = null; KubeConfig kubeConfig = kubeConfig( clusterEntry(STR, clusterCaCertPath(STRcluster2STRhttps: userEntries( userEntry("user2", certAuthUserByPath(CLIENT_CERT_PATH, CLIENT_KEY_PATH))), STR); try { kubeConfig.validate(); fail(STR); } catch (IllegalArgumentExce...
/** * At least one context must be specified in kubeconfig for it to be useful * as an auth source for the {@link KubernetesCloudPool}. */
At least one context must be specified in kubeconfig for it to be useful as an auth source for the <code>KubernetesCloudPool</code>
missingContext
{ "repo_name": "elastisys/scale.cloudpool", "path": "kubernetes/src/test/java/com/elastisys/scale/cloudpool/kubernetes/config/kubeconfig/TestKubeConfig.java", "license": "apache-2.0", "size": 16900 }
[ "com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestCluster", "com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestClusterEntry", "com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestUser", "com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestUserEntry", "java.ut...
import com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestCluster; import com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestClusterEntry; import com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestUser; import com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestUserEntry; ...
import com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.*; import java.util.*; import org.hamcrest.*; import org.junit.*;
[ "com.elastisys.scale", "java.util", "org.hamcrest", "org.junit" ]
com.elastisys.scale; java.util; org.hamcrest; org.junit;
1,757,803
@Deprecated default <T extends Collection<?>> T collectionSize(String name, T collection) { return collectionSize(createId(name), collection); }
default <T extends Collection<?>> T collectionSize(String name, T collection) { return collectionSize(createId(name), collection); }
/** * Tells the registry to regularly poll the collection and report its size as a gauge. * See {@link #collectionSize(Id, Collection)} for more information. * * @param name * Name of the metric being registered. * @param collection * Thread-safe implementation of {@link Collection} used to...
Tells the registry to regularly poll the collection and report its size as a gauge. See <code>#collectionSize(Id, Collection)</code> for more information
collectionSize
{ "repo_name": "brharrington/spectator", "path": "spectator-api/src/main/java/com/netflix/spectator/api/Registry.java", "license": "apache-2.0", "size": 33577 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,255,810
Set<RoleGrant> listRoleGrants(Session session, String catalog, PrestoPrincipal principal);
Set<RoleGrant> listRoleGrants(Session session, String catalog, PrestoPrincipal principal);
/** * List roles grants in the specified catalog for a given principal, not recursively. */
List roles grants in the specified catalog for a given principal, not recursively
listRoleGrants
{ "repo_name": "stewartpark/presto", "path": "presto-main/src/main/java/com/facebook/presto/metadata/Metadata.java", "license": "apache-2.0", "size": 14812 }
[ "com.facebook.presto.Session", "com.facebook.presto.spi.security.PrestoPrincipal", "com.facebook.presto.spi.security.RoleGrant", "java.util.Set" ]
import com.facebook.presto.Session; import com.facebook.presto.spi.security.PrestoPrincipal; import com.facebook.presto.spi.security.RoleGrant; import java.util.Set;
import com.facebook.presto.*; import com.facebook.presto.spi.security.*; import java.util.*;
[ "com.facebook.presto", "java.util" ]
com.facebook.presto; java.util;
38,122
public List<OnAlarm> getOnAlarms() { return getChildren(OnAlarm.class); }
List<OnAlarm> function() { return getChildren(OnAlarm.class); }
/** * Gets the alarm for the pick; may be <code>null</code>. * * @return */
Gets the alarm for the pick; may be <code>null</code>
getOnAlarms
{ "repo_name": "apache/ode", "path": "bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/PickActivity.java", "license": "apache-2.0", "size": 1434 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,180,540
public static SMFPartialLogged<SMFMemoryMeshFilterType> parse( final Optional<URI> file, final int line, final List<String> text) { Objects.requireNonNull(file, "file"); Objects.requireNonNull(text, "text"); if (text.size() >= 1) { try { final Set<SMFAttributeName> names = ...
static SMFPartialLogged<SMFMemoryMeshFilterType> function( final Optional<URI> file, final int line, final List<String> text) { Objects.requireNonNull(file, "file"); Objects.requireNonNull(text, "text"); if (text.size() >= 1) { try { final Set<SMFAttributeName> names = text.stream() .map(SMFAttributeName::of) .collect(...
/** * Attempt to parse a command. * * @param file The file, if any * @param line The line * @param text The text * * @return A parsed command or a list of parse errors */
Attempt to parse a command
parse
{ "repo_name": "io7m/smf", "path": "com.io7m.smfj.processing.main/src/main/java/com/io7m/smfj/processing/main/SMFMemoryMeshFilterAttributeTrim.java", "license": "isc", "size": 5034 }
[ "com.io7m.smfj.core.SMFAttributeName", "com.io7m.smfj.core.SMFPartialLogged", "com.io7m.smfj.processing.api.SMFFilterCommandParsing", "com.io7m.smfj.processing.api.SMFMemoryMeshFilterType", "java.util.List", "java.util.Objects", "java.util.Optional", "java.util.Set", "java.util.stream.Collectors" ]
import com.io7m.smfj.core.SMFAttributeName; import com.io7m.smfj.core.SMFPartialLogged; import com.io7m.smfj.processing.api.SMFFilterCommandParsing; import com.io7m.smfj.processing.api.SMFMemoryMeshFilterType; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.Set; import java....
import com.io7m.smfj.core.*; import com.io7m.smfj.processing.api.*; import java.util.*; import java.util.stream.*;
[ "com.io7m.smfj", "java.util" ]
com.io7m.smfj; java.util;
1,008,489
@JsonIgnore public Double getAverageHouseholdSize() throws WifInvalidInputException { if (this.getHouseholds() != null) { if (this.getHouseholds() != 0) { return ((double) this.getTotalPopulation() - ((double) this .getgQPopulation())) / this.getHouseholds(); } } else { ...
Double function() throws WifInvalidInputException { if (this.getHouseholds() != null) { if (this.getHouseholds() != 0) { return ((double) this.getTotalPopulation() - ((double) this .getgQPopulation())) / this.getHouseholds(); } } else { throw new WifInvalidInputException(STR); } return 0.0; }
/** * Gets the average household size. * * @return the avgHHSize * @throws WifInvalidInputException * the wif invalid input exception */
Gets the average household size
getAverageHouseholdSize
{ "repo_name": "tosseto/online-whatif", "path": "src/main/java/au/org/aurin/wif/model/demand/ResidentialPastTrendInfo.java", "license": "mit", "size": 2736 }
[ "au.org.aurin.wif.exception.validate.WifInvalidInputException" ]
import au.org.aurin.wif.exception.validate.WifInvalidInputException;
import au.org.aurin.wif.exception.validate.*;
[ "au.org.aurin" ]
au.org.aurin;
408,606
@Test public void constructor_givenTable_setsTable() { Record record = new Record(table); Table expected = table; Table actual = record.getTable(); assertSame(expected, actual); }
void function() { Record record = new Record(table); Table expected = table; Table actual = record.getTable(); assertSame(expected, actual); }
/** * Tests whether {@link Record#Record(Table)} sets the record's table. */
Tests whether <code>Record#Record(Table)</code> sets the record's table
constructor_givenTable_setsTable
{ "repo_name": "adamIqbal/Health", "path": "health/src/test/java/com/health/RecordTest.java", "license": "mit", "size": 18473 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
646,583
private static Function<? super HttpService, EncodingService> contentEncodingDecorator( @Nullable String[] mimeTypes, @Nullable String[] excludedUserAgents, int minBytesToForceChunkedAndEncoding) { final Predicate<MediaType> encodableContentTypePredicate; if (mimeTypes == nul...
static Function<? super HttpService, EncodingService> function( @Nullable String[] mimeTypes, @Nullable String[] excludedUserAgents, int minBytesToForceChunkedAndEncoding) { final Predicate<MediaType> encodableContentTypePredicate; if (mimeTypes == null mimeTypes.length == 0) { encodableContentTypePredicate = contentTy...
/** * Configures a decorator for encoding the content of the HTTP responses sent from the server. */
Configures a decorator for encoding the content of the HTTP responses sent from the server
contentEncodingDecorator
{ "repo_name": "minwoox/armeria", "path": "dropwizard2/src/main/java/com/linecorp/armeria/dropwizard/ArmeriaConfigurationUtil.java", "license": "apache-2.0", "size": 21880 }
[ "com.linecorp.armeria.common.HttpHeaderNames", "com.linecorp.armeria.common.MediaType", "com.linecorp.armeria.common.RequestHeaders", "com.linecorp.armeria.server.HttpService", "com.linecorp.armeria.server.encoding.EncodingService", "java.util.Arrays", "java.util.List", "java.util.function.Function", ...
import com.linecorp.armeria.common.HttpHeaderNames; import com.linecorp.armeria.common.MediaType; import com.linecorp.armeria.common.RequestHeaders; import com.linecorp.armeria.server.HttpService; import com.linecorp.armeria.server.encoding.EncodingService; import java.util.Arrays; import java.util.List; import java.ut...
import com.linecorp.armeria.common.*; import com.linecorp.armeria.server.*; import com.linecorp.armeria.server.encoding.*; import java.util.*; import java.util.function.*; import java.util.regex.*; import javax.annotation.*;
[ "com.linecorp.armeria", "java.util", "javax.annotation" ]
com.linecorp.armeria; java.util; javax.annotation;
2,247,778
TriggerEvent getTrigger(TaskTriggerInformation triggerInformation);
TriggerEvent getTrigger(TaskTriggerInformation triggerInformation);
/** * Returns a trigger matching the information provided with the {@code triggerInformation}. * * @param triggerInformation the information about the trigger * @return the matching trigger */
Returns a trigger matching the information provided with the triggerInformation
getTrigger
{ "repo_name": "justin-hayes/motech", "path": "modules/tasks/tasks/src/main/java/org/motechproject/tasks/service/DynamicChannelLoader.java", "license": "bsd-3-clause", "size": 2387 }
[ "org.motechproject.tasks.domain.TaskTriggerInformation", "org.motechproject.tasks.domain.TriggerEvent" ]
import org.motechproject.tasks.domain.TaskTriggerInformation; import org.motechproject.tasks.domain.TriggerEvent;
import org.motechproject.tasks.domain.*;
[ "org.motechproject.tasks" ]
org.motechproject.tasks;
839,393
private void doGroupImport(String location) throws Throwable { File groupFile = ImporterBootstrap.getFile(location); BufferedReader reader = new BufferedReader( new InputStreamReader(new FileInputStream(groupFile), "UTF-8") ); String line; while( (line = reader.readLine(...
void function(String location) throws Throwable { File groupFile = ImporterBootstrap.getFile(location); BufferedReader reader = new BufferedReader( new InputStreamReader(new FileInputStream(groupFile), "UTF-8") ); String line; while( (line = reader.readLine()) != null ) { int splitAt = line.indexOf('='); if(splitAt == ...
/** * Note - This Could potentially be split out into another Bootstrap class, * but for now is inline to keep things simple */
Note - This Could potentially be split out into another Bootstrap class, but for now is inline to keep things simple
doGroupImport
{ "repo_name": "Redpill-Linpro/alfresco-document-templates", "path": "document-templates-repo/src/main/java/org/redpill_linpro/alfresco/repo/admin/patch/impl/SiteLoadPatch.java", "license": "lgpl-3.0", "size": 12278 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileInputStream", "java.io.InputStreamReader", "java.util.Set", "java.util.StringTokenizer", "org.alfresco.repo.importer.ImporterBootstrap" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; import java.util.Set; import java.util.StringTokenizer; import org.alfresco.repo.importer.ImporterBootstrap;
import java.io.*; import java.util.*; import org.alfresco.repo.importer.*;
[ "java.io", "java.util", "org.alfresco.repo" ]
java.io; java.util; org.alfresco.repo;
273,175
public static DataSource createDataSource(Properties properties) throws Exception { BasicDataSource dataSource = new BasicDataSource(); String value = null; value = properties.getProperty(PROP_DEFAULTAUTOCOMMIT); if (value != null) { dataSource.setDefaultAutoCommit...
static DataSource function(Properties properties) throws Exception { BasicDataSource dataSource = new BasicDataSource(); String value = null; value = properties.getProperty(PROP_DEFAULTAUTOCOMMIT); if (value != null) { dataSource.setDefaultAutoCommit(Boolean.valueOf(value).booleanValue()); } value = properties.getPrope...
/** * Creates and configures a {@link BasicDataSource} instance based on the * given properties. * * @param properties the datasource configuration properties * @throws Exception if an error occurs creating the data source */
Creates and configures a <code>BasicDataSource</code> instance based on the given properties
createDataSource
{ "repo_name": "besom/bbossgroups-mvn", "path": "bboss_persistent/src/main/java/com/frameworkset/commons/dbcp/BasicDataSourceFactory.java", "license": "apache-2.0", "size": 15068 }
[ "java.sql.Connection", "java.util.Collections", "java.util.Enumeration", "java.util.Properties", "java.util.StringTokenizer", "javax.sql.DataSource" ]
import java.sql.Connection; import java.util.Collections; import java.util.Enumeration; import java.util.Properties; import java.util.StringTokenizer; import javax.sql.DataSource;
import java.sql.*; import java.util.*; import javax.sql.*;
[ "java.sql", "java.util", "javax.sql" ]
java.sql; java.util; javax.sql;
1,873,080
@Override public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) { this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn); if (this.isChild) { float f6 = 2.0F; GlStateManage...
void function(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) { this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, scale, entityIn); if (this.isChild) { float f6 = 2.0F; GlStateManager.pushMatrix(); HEAD.render(scale...
/** * Sets the models various rotation angles then renders the model. */
Sets the models various rotation angles then renders the model
render
{ "repo_name": "CHeuberger/TFC2", "path": "src/Common/com/bioxx/tfc2/rendering/model/ModelBoar.java", "license": "gpl-3.0", "size": 4985 }
[ "net.minecraft.client.renderer.GlStateManager", "net.minecraft.entity.Entity" ]
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.Entity;
import net.minecraft.client.renderer.*; import net.minecraft.entity.*;
[ "net.minecraft.client", "net.minecraft.entity" ]
net.minecraft.client; net.minecraft.entity;
2,894,822
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0") public BueroPraxen.BueroTyp getBueroTyp() { return bueroTyp; } /** * Sets the value of the bueroTyp property. * * @param value * allowed object is * {@li...
@Generated(value = STR, date = STR, comments = STR) BueroPraxen.BueroTyp function() { return bueroTyp; } /** * Sets the value of the bueroTyp property. * * @param value * allowed object is * {@link BueroPraxen.BueroTyp }
/** * Gets the value of the bueroTyp property. * * @return * possible object is * {@link BueroPraxen.BueroTyp } * */
Gets the value of the bueroTyp property
getBueroTyp
{ "repo_name": "OpenEstate/OpenEstate-IO", "path": "ImmoXML/src/main/jaxb/org/openestate/io/immoxml/xml/BueroPraxen.java", "license": "apache-2.0", "size": 7810 }
[ "javax.annotation.Generated" ]
import javax.annotation.Generated;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,881,356
// System.out.println("------------------" + statusBar + "--" + color + "--" + activity); try { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Window w = activity.getWindow(); w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, ...
try { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Window w = activity.getWindow(); w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); int actionBarHeight = getActionBarHeight(activity); int statusBarHeight = getStatusBarHeight(activity); st...
/** * set (statusBar: systemBar + actionBar) View to (color) with given (activity) * * @param statusBar View * @param color int * @param activity FragmentActivity */
set (statusBar: systemBar + actionBar) View to (color) with given (activity)
setStatusBarColor
{ "repo_name": "junjunguo/PocketMaps", "path": "PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/util/SetStatusBarColor.java", "license": "mit", "size": 3255 }
[ "android.os.Build", "android.view.Window", "android.view.WindowManager" ]
import android.os.Build; import android.view.Window; import android.view.WindowManager;
import android.os.*; import android.view.*;
[ "android.os", "android.view" ]
android.os; android.view;
1,006,414
public void bind(UnixSocketAddress address) throws IOException { if (bound) close(); sock = native_bind(address.path, address.abs); bound = true; closed = false; this.address = address; }
void function(UnixSocketAddress address) throws IOException { if (bound) close(); sock = native_bind(address.path, address.abs); bound = true; closed = false; this.address = address; }
/** * Binds a server socket to the given address. * * @param address * Path to the socket. */
Binds a server socket to the given address
bind
{ "repo_name": "HACKhalo2/libmatthew-java", "path": "src/main/java/cx/ath/matthew/unix/UnixServerSocket.java", "license": "mit", "size": 3692 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
350,833
public boolean isReady(final Class serviceClass) { Service service = serviceCache.get(serviceClass); return (service != null && service.isRunning()); }
boolean function(final Class serviceClass) { Service service = serviceCache.get(serviceClass); return (service != null && service.isRunning()); }
/** * Return true if the given service is ready to be used, * means initialized and running. * * @param serviceClass * @return isReady */
Return true if the given service is ready to be used, means initialized and running
isReady
{ "repo_name": "derkaiserreich/structr", "path": "structr-core/src/main/java/org/structr/core/Services.java", "license": "gpl-3.0", "size": 24595 }
[ "org.structr.api.service.Service" ]
import org.structr.api.service.Service;
import org.structr.api.service.*;
[ "org.structr.api" ]
org.structr.api;
955,832
public void sendToServer(IMessage message) { channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER); channels.get(Side.CLIENT).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); }
void function(IMessage message) { channels.get(Side.CLIENT).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.TOSERVER); channels.get(Side.CLIENT).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); }
/** * Send this message to the server. * The {@link IMessageHandler} for this message type should be on the SERVER side. * * @param message The message to send */
Send this message to the server. The <code>IMessageHandler</code> for this message type should be on the SERVER side
sendToServer
{ "repo_name": "bonii-xx/MinecraftForge", "path": "src/main/java/net/minecraftforge/fml/common/network/simpleimpl/SimpleNetworkWrapper.java", "license": "lgpl-2.1", "size": 12545 }
[ "io.netty.channel.ChannelFutureListener", "net.minecraftforge.fml.common.network.FMLOutboundHandler", "net.minecraftforge.fml.relauncher.Side" ]
import io.netty.channel.ChannelFutureListener; import net.minecraftforge.fml.common.network.FMLOutboundHandler; import net.minecraftforge.fml.relauncher.Side;
import io.netty.channel.*; import net.minecraftforge.fml.common.network.*; import net.minecraftforge.fml.relauncher.*;
[ "io.netty.channel", "net.minecraftforge.fml" ]
io.netty.channel; net.minecraftforge.fml;
2,429,191
private void fireConnectionEventListeners(SQLException exception) { if (eventListener != null && !eventListener.isEmpty()) { ConnectionEvent event = new ConnectionEvent(this, exception); eventIterators++; try { for (Iterator it = eventListener.iterator(); ...
void function(SQLException exception) { if (eventListener != null && !eventListener.isEmpty()) { ConnectionEvent event = new ConnectionEvent(this, exception); eventIterators++; try { for (Iterator it = eventListener.iterator(); it.hasNext();) { ConnectionEventListener l = (ConnectionEventListener) it.next(); if (except...
/** * Fire all the {@code ConnectionEventListener}s registered. Callers must * synchronize on {@code this} to prevent others from modifying the list of * listeners. * * @param exception the exception that caused the event, or {@code null} if * it is a close event */
Fire all the ConnectionEventListeners registered. Callers must synchronize on this to prevent others from modifying the list of listeners
fireConnectionEventListeners
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/jdbc/EmbedPooledConnection.java", "license": "apache-2.0", "size": 19870 }
[ "java.sql.SQLException", "java.util.Iterator", "javax.sql.ConnectionEvent", "javax.sql.ConnectionEventListener" ]
import java.sql.SQLException; import java.util.Iterator; import javax.sql.ConnectionEvent; import javax.sql.ConnectionEventListener;
import java.sql.*; import java.util.*; import javax.sql.*;
[ "java.sql", "java.util", "javax.sql" ]
java.sql; java.util; javax.sql;
2,860,084
public static LinkedHashMap<String, CacheElement> buildElementMap(final Document doc) throws IOException, XPathExpressionException, SAXException, ParserConfigurationException { Node cacheNode = doc.getFirstChild(); if ("#comment".equals(cacheNode.getNodeName())) { cacheNode = cacheNode.getNextSibl...
static LinkedHashMap<String, CacheElement> function(final Document doc) throws IOException, XPathExpressionException, SAXException, ParserConfigurationException { Node cacheNode = doc.getFirstChild(); if (STR.equals(cacheNode.getNodeName())) { cacheNode = cacheNode.getNextSibling(); } final Map<String, String> schemaLo...
/** * Build <code>cache</code> element map for given <cod>doc</code>'s schemaLocation for * {@link CacheXml#GEODE_NAMESPACE}. * * @param doc {@link Document} to parse schema for. * @return Element map * @throws IOException * @throws ParserConfigurationException * @throws SAXException * @throw...
Build <code>cache</code> element map for given doc</code>'s schemaLocation for <code>CacheXml#GEODE_NAMESPACE</code>
buildElementMap
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/management/internal/configuration/domain/CacheElement.java", "license": "apache-2.0", "size": 8521 }
[ "java.io.IOException", "java.util.LinkedHashMap", "java.util.Map", "javax.xml.parsers.ParserConfigurationException", "javax.xml.xpath.XPathExpressionException", "org.apache.geode.internal.cache.xmlcache.CacheXml", "org.apache.geode.management.internal.configuration.utils.XmlUtils", "org.w3c.dom.Docume...
import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPathExpressionException; import org.apache.geode.internal.cache.xmlcache.CacheXml; import org.apache.geode.management.internal.configuration.utils.XmlUtils; im...
import java.io.*; import java.util.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.apache.geode.internal.cache.xmlcache.*; import org.apache.geode.management.internal.configuration.utils.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "java.util", "javax.xml", "org.apache.geode", "org.w3c.dom", "org.xml.sax" ]
java.io; java.util; javax.xml; org.apache.geode; org.w3c.dom; org.xml.sax;
1,906,558
static public CellImg< FloatType, ? > loadFloat( final IHDF5Reader reader, final String dataset, final int[] cellDimensions ) { final IHDF5FloatReader float32Reader = reader.float32(); final long[] dimensions = reorder( reader.object().getDimensions( dataset ) ); final int n = dimensions.length; ...
static CellImg< FloatType, ? > function( final IHDF5Reader reader, final String dataset, final int[] cellDimensions ) { final IHDF5FloatReader float32Reader = reader.float32(); final long[] dimensions = reorder( reader.object().getDimensions( dataset ) ); final int n = dimensions.length; final CellImg< FloatType, ? > t...
/** * Load an HDF5 float32 dataset into a {@link CellImg} of {@link FloatType}. * * @param reader * @param dataset * @param cellDimensions */
Load an HDF5 float32 dataset into a <code>CellImg</code> of <code>FloatType</code>
loadFloat
{ "repo_name": "hanslovsky/bigcat", "path": "src/main/java/bdv/img/h5/H5Utils.java", "license": "gpl-2.0", "size": 51530 }
[ "ch.systemsx.cisd.base.mdarray.MDFloatArray", "ch.systemsx.cisd.hdf5.IHDF5FloatReader", "ch.systemsx.cisd.hdf5.IHDF5Reader", "net.imglib2.RandomAccessibleInterval", "net.imglib2.img.cell.CellImg", "net.imglib2.img.cell.CellImgFactory", "net.imglib2.type.numeric.real.FloatType", "net.imglib2.util.Util"...
import ch.systemsx.cisd.base.mdarray.MDFloatArray; import ch.systemsx.cisd.hdf5.IHDF5FloatReader; import ch.systemsx.cisd.hdf5.IHDF5Reader; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.cell.CellImg; import net.imglib2.img.cell.CellImgFactory; import net.imglib2.type.numeric.real.FloatType; import...
import ch.systemsx.cisd.base.mdarray.*; import ch.systemsx.cisd.hdf5.*; import net.imglib2.*; import net.imglib2.img.cell.*; import net.imglib2.type.numeric.real.*; import net.imglib2.util.*; import net.imglib2.view.*;
[ "ch.systemsx.cisd", "net.imglib2", "net.imglib2.img", "net.imglib2.type", "net.imglib2.util", "net.imglib2.view" ]
ch.systemsx.cisd; net.imglib2; net.imglib2.img; net.imglib2.type; net.imglib2.util; net.imglib2.view;
2,574,934
public void add(Widget arg0) { //this.mainPanel.add(arg0); }
void function(Widget arg0) { }
/** * Adds the. * * @param arg0 the arg0 * @see com.google.gwt.user.client.ui.HasWidgets#add(com.google.gwt.user.client.ui.Widget) */
Adds the
add
{ "repo_name": "ebayopensource/turmeric-monitoring", "path": "mgmt-console/src/main/java/org/ebayopensource/turmeric/monitoring/client/view/DashboardContainer.java", "license": "apache-2.0", "size": 4219 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
960,528
public boolean resourceMapContains(IResource resource) { return resourceMap.containsKey(resource); }
boolean function(IResource resource) { return resourceMap.containsKey(resource); }
/** * Checks, if the given IResource is contained in this resourceMap. * <true> if the IResource is found * * @param resource to be looked up * @return <true> if the IResource is found */
Checks, if the given IResource is contained in this resourceMap. if the IResource is found
resourceMapContains
{ "repo_name": "Kelloggs/depclipse", "path": "src/de/plugins/eclipse/depclipse/model/JDependData.java", "license": "bsd-3-clause", "size": 10456 }
[ "org.eclipse.core.resources.IResource" ]
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.*;
[ "org.eclipse.core" ]
org.eclipse.core;
2,910,600
public static String encode(User user) { StringBuilder out = new StringBuilder(); out.append(user.id).append(FIELD_SEPARATOR); out.append(user.isEnabled()).append(FIELD_SEPARATOR); out.append(Base64.encodeBase64String(user.name.getBytes())).append(FIELD_SEPARATOR); out.append...
static String function(User user) { StringBuilder out = new StringBuilder(); out.append(user.id).append(FIELD_SEPARATOR); out.append(user.isEnabled()).append(FIELD_SEPARATOR); out.append(Base64.encodeBase64String(user.name.getBytes())).append(FIELD_SEPARATOR); out.append(user.getContext().getAuthenticationMethod().getT...
/** * Encodes the User in a String. Fields that contain strings are Base64 encoded. * * @param user the user * @return the string */
Encodes the User in a String. Fields that contain strings are Base64 encoded
encode
{ "repo_name": "psiinon/zaproxy", "path": "zap/src/main/java/org/zaproxy/zap/users/User.java", "license": "apache-2.0", "size": 13591 }
[ "org.apache.commons.codec.binary.Base64" ]
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.*;
[ "org.apache.commons" ]
org.apache.commons;
2,324,503
void hear( Component component, DeferredClass<?> implementation, Object source );
void hear( Component component, DeferredClass<?> implementation, Object source );
/** * Invoked when the {@link PlexusTypeListener} finds a Plexus component. * * @param component The Plexus component * @param implementation The implementation * @param source The source of this component */
Invoked when the <code>PlexusTypeListener</code> finds a Plexus component
hear
{ "repo_name": "eclipse/sisu.plexus", "path": "org.eclipse.sisu.plexus/src/org/eclipse/sisu/plexus/PlexusTypeListener.java", "license": "epl-1.0", "size": 1226 }
[ "org.codehaus.plexus.component.annotations.Component", "org.eclipse.sisu.inject.DeferredClass" ]
import org.codehaus.plexus.component.annotations.Component; import org.eclipse.sisu.inject.DeferredClass;
import org.codehaus.plexus.component.annotations.*; import org.eclipse.sisu.inject.*;
[ "org.codehaus.plexus", "org.eclipse.sisu" ]
org.codehaus.plexus; org.eclipse.sisu;
58,959
protected void loadRefs(ArrayList<Element> objectRefs, ArrayList<Element> boneRefs, Mainline.Key key) { for (final Element e : boneRefs) { final BoneRef boneRef = new BoneRef(e.getInt("id"), e.getInt("timeline"), e.getInt("key"), key.getBoneRef(e.getInt("parent", -1))); key.addBoneRef(boneRef); } f...
void function(ArrayList<Element> objectRefs, ArrayList<Element> boneRefs, Mainline.Key key) { for (final Element e : boneRefs) { final BoneRef boneRef = new BoneRef(e.getInt("id"), e.getInt(STR), e.getInt("key"), key.getBoneRef(e.getInt(STR, -1))); key.addBoneRef(boneRef); } for (final Element o : objectRefs) { final O...
/** * Iterates through the given bone and object references and adds them to the given {@link Mainline.Key} object. * * @param objectRefs * a list of object references * @param boneRefs * a list if bone references * @param key * the mainline key */
Iterates through the given bone and object references and adds them to the given <code>Mainline.Key</code> object
loadRefs
{ "repo_name": "headmadegames/ArtTag", "path": "core/src/headmade/arttag/spriter/SCMLReader.java", "license": "apache-2.0", "size": 12496 }
[ "java.util.ArrayList", "java.util.Arrays" ]
import java.util.ArrayList; import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,798,491
static String getUserId(HttpServletRequest req) throws ServletException, IOException { return req.getSession().getId(); }
static String getUserId(HttpServletRequest req) throws ServletException, IOException { return req.getSession().getId(); }
/** * Returns the user ID for the given HTTP servlet request. This identifies your application's user * and is used to assign and persist credentials to that user. Most commonly, this will be a user * id stored in the session or even the session id itself. */
Returns the user ID for the given HTTP servlet request. This identifies your application's user and is used to assign and persist credentials to that user. Most commonly, this will be a user id stored in the session or even the session id itself
getUserId
{ "repo_name": "GoogleCloudPlatform/java-docs-samples", "path": "appengine-java11/oauth2/src/main/java/com/example/appengine/Utils.java", "license": "apache-2.0", "size": 4244 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,692,862
public BindingsClient getBindings() { return this.bindings; } private final CertificatesClient certificates;
BindingsClient function() { return this.bindings; } private final CertificatesClient certificates;
/** * Gets the BindingsClient object to access its operations. * * @return the BindingsClient object. */
Gets the BindingsClient object to access its operations
getBindings
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/AppPlatformManagementClientImpl.java", "license": "mit", "size": 9296 }
[ "com.azure.resourcemanager.appplatform.fluent.BindingsClient", "com.azure.resourcemanager.appplatform.fluent.CertificatesClient" ]
import com.azure.resourcemanager.appplatform.fluent.BindingsClient; import com.azure.resourcemanager.appplatform.fluent.CertificatesClient;
import com.azure.resourcemanager.appplatform.fluent.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,380,479
// Also allocate space for rightWindow, just in case sequence model uses // it, even though this implementation doesn't. Probably it shouldn't, // or the left-to-right sampling is invalid, but our test classes do. int[] sample = new int[ts.length()+ts.leftWindow()+ts.rightWindow()]; for (int pos = ts.l...
int[] sample = new int[ts.length()+ts.leftWindow()+ts.rightWindow()]; for (int pos = ts.leftWindow(); pos < sample.length - ts.rightWindow(); pos++) { double[] scores = ts.scoresOf(sample, pos); for (int i = 0; i < scores.length; i++) { scores[i] = Math.exp(scores[i]); } ArrayMath.normalize(scores); int l = ArrayMath.s...
/** * Samples each label in turn from left to right. * * @return an array containing the int tags of the best sequence */
Samples each label in turn from left to right
bestSequence
{ "repo_name": "poojits/CoreNLP", "path": "src/edu/stanford/nlp/sequences/SequenceSampler.java", "license": "gpl-2.0", "size": 1294 }
[ "edu.stanford.nlp.math.ArrayMath" ]
import edu.stanford.nlp.math.ArrayMath;
import edu.stanford.nlp.math.*;
[ "edu.stanford.nlp" ]
edu.stanford.nlp;
415,790
response.setContentType("text/event-stream"); response.setCharacterEncoding ("UTF-8"); PrintWriter out = response.getWriter(); out.append("retry: 5000s\n"); out.append("data: "); HttpSession session = request.getSession(); String id = session.getAttribute("gid")....
response.setContentType(STR); response.setCharacterEncoding ("UTF-8"); PrintWriter out = response.getWriter(); out.append(STR); out.append(STR); HttpSession session = request.getSession(); String id = session.getAttribute("gid").toString(); if(id.equals("0")) { id = session.getAttribute("fbid").toString(); } String inv...
/** * Handles the HTTP * <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>GET</code> method
doGet
{ "repo_name": "mbdietrich/MUCapstone2013_Team2", "path": "ttt2/src/java/nz/ac/massey/cs/capstone/server/GameInvites.java", "license": "gpl-3.0", "size": 1878 }
[ "java.io.PrintWriter", "javax.servlet.http.HttpSession" ]
import java.io.PrintWriter; import javax.servlet.http.HttpSession;
import java.io.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,520,655
public void close() { if(itr != null){ try { itr.close(); } catch (IOException ioe) { LOG.warn("Error closing file iterator", ioe); } } } private TxnLogProposalIterator() { } public TxnLogProposalIterator(TxnIterat...
void function() { if(itr != null){ try { itr.close(); } catch (IOException ioe) { LOG.warn(STR, ioe); } } } private TxnLogProposalIterator() { } public TxnLogProposalIterator(TxnIterator itr) { if (itr != null) { this.itr = itr; hasNext = (itr.getHeader() != null); } }
/** * Close the files and release the resources which are used for iterating * transaction records */
Close the files and release the resources which are used for iterating transaction records
close
{ "repo_name": "jerry-sc/zookeeper-learning", "path": "src/java/main/org/apache/zookeeper/server/TxnLogProposalIterator.java", "license": "apache-2.0", "size": 3929 }
[ "java.io.IOException", "org.apache.zookeeper.server.persistence.TxnLog" ]
import java.io.IOException; import org.apache.zookeeper.server.persistence.TxnLog;
import java.io.*; import org.apache.zookeeper.server.persistence.*;
[ "java.io", "org.apache.zookeeper" ]
java.io; org.apache.zookeeper;
1,689,502
public void testDepth() { ResolutionNode a1n = new ResolutionNode( a1, Collections.EMPTY_LIST ); ResolutionNode b1n = new ResolutionNode( b1, Collections.EMPTY_LIST ); ResolutionNode a2n = new ResolutionNode( a2, Collections.EMPTY_LIST, b1n ); assertResolveConflict( a1n,...
void function() { ResolutionNode a1n = new ResolutionNode( a1, Collections.EMPTY_LIST ); ResolutionNode b1n = new ResolutionNode( b1, Collections.EMPTY_LIST ); ResolutionNode a2n = new ResolutionNode( a2, Collections.EMPTY_LIST, b1n ); assertResolveConflict( a1n, a1n, a2n ); }
/** * Tests that <code>a:1.0</code> wins in the scenario: * <pre> * a:1.0 * b:1.0 -> a:2.0 * </pre> */
Tests that <code>a:1.0</code> wins in the scenario: <code> a:1.0 b:1.0 -> a:2.0 </code>
testDepth
{ "repo_name": "sonatype/maven-demo", "path": "maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/OldestConflictResolverTest.java", "license": "apache-2.0", "size": 3380 }
[ "java.util.Collections", "org.apache.maven.artifact.resolver.ResolutionNode" ]
import java.util.Collections; import org.apache.maven.artifact.resolver.ResolutionNode;
import java.util.*; import org.apache.maven.artifact.resolver.*;
[ "java.util", "org.apache.maven" ]
java.util; org.apache.maven;
1,468,012
@Nullable public NotificationMessageTemplate put(@Nonnull final NotificationMessageTemplate newNotificationMessageTemplate) throws ClientException { return send(HttpMethod.PUT, newNotificationMessageTemplate); }
NotificationMessageTemplate function(@Nonnull final NotificationMessageTemplate newNotificationMessageTemplate) throws ClientException { return send(HttpMethod.PUT, newNotificationMessageTemplate); }
/** * Creates a NotificationMessageTemplate with a new object * * @param newNotificationMessageTemplate the object to create/update * @return the created NotificationMessageTemplate * @throws ClientException this exception occurs if the request was unable to complete for any reason */
Creates a NotificationMessageTemplate with a new object
put
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/NotificationMessageTemplateRequest.java", "license": "mit", "size": 6768 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.NotificationMessageTemplate", "javax.annotation.Nonnull" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.NotificationMessageTemplate; import javax.annotation.Nonnull;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
1,640,108
protected void addGetParam(String paramKey, String paramValue) { try { params_.put(paramKey, paramValue); } catch (JSONException ignore) { } }
void function(String paramKey, String paramValue) { try { params_.put(paramKey, paramValue); } catch (JSONException ignore) { } }
/** * Adds a param and its value to the get request * * @param paramKey A {@link String} value for the get param key * @param paramValue A {@link String} value for the get param value */
Adds a param and its value to the get request
addGetParam
{ "repo_name": "BranchMetrics/Android-Deferred-Deep-Linking-SDK", "path": "Branch-SDK/src/main/java/io/branch/referral/ServerRequest.java", "license": "mit", "size": 27891 }
[ "org.json.JSONException" ]
import org.json.JSONException;
import org.json.*;
[ "org.json" ]
org.json;
1,921,722
private void addVariableToFunction(Node function, Node varName, Node value) { Preconditions.checkArgument(function.isFunction(), "Node must be a function."); Node block = function.getLastChild(); Preconditions.checkArgument(block.isBlock(), "Node must be a block."); Preconditions.che...
void function(Node function, Node varName, Node value) { Preconditions.checkArgument(function.isFunction(), STR); Node block = function.getLastChild(); Preconditions.checkArgument(block.isBlock(), STR); Preconditions.checkState(value.getParent() == null); Node stmt; if (varName != null) { stmt = NodeUtil.newVarNode(var...
/** * Adds a variable to the top of a function block. * @param function A function node. * @param varName The name of the variable. * @param value The initial value of the variable. */
Adds a variable to the top of a function block
addVariableToFunction
{ "repo_name": "jhiswin/idiil-closure-compiler", "path": "src/com/google/javascript/jscomp/OptimizeParameters.java", "license": "apache-2.0", "size": 17685 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
501,789
@Override public void checkOutputSpecs(JobContext context) throws IOException, InterruptedException { // TODO Check if the table exists? }
void function(JobContext context) throws IOException, InterruptedException { }
/** * Checks if the output target exists. * * @param context The current context. * @throws IOException When the check fails. * @throws InterruptedException When the job is aborted. * @see org.apache.hadoop.mapreduce.OutputFormat#checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext) */
Checks if the output target exists
checkOutputSpecs
{ "repo_name": "simplegeo/hadoop-hbase", "path": "src/main/java/org/apache/hadoop/hbase/mapreduce/TableOutputFormat.java", "license": "apache-2.0", "size": 7322 }
[ "java.io.IOException", "org.apache.hadoop.mapreduce.JobContext" ]
import java.io.IOException; import org.apache.hadoop.mapreduce.JobContext;
import java.io.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,903,013
private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writeStroke(this.separatorStroke, stream); SerialUtilities.writePaint(this.separatorPaint, stream); }
void function(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writeStroke(this.separatorStroke, stream); SerialUtilities.writePaint(this.separatorPaint, stream); }
/** * Provides serialization support. * * @param stream the output stream. * * @throws IOException if there is an I/O error. */
Provides serialization support
writeObject
{ "repo_name": "aaronc/jfreechart", "path": "source/org/jfree/chart/plot/RingPlot.java", "license": "lgpl-2.1", "size": 25001 }
[ "java.io.IOException", "java.io.ObjectOutputStream", "org.jfree.io.SerialUtilities" ]
import java.io.IOException; import java.io.ObjectOutputStream; import org.jfree.io.SerialUtilities;
import java.io.*; import org.jfree.io.*;
[ "java.io", "org.jfree.io" ]
java.io; org.jfree.io;
2,368,082
public MultiMatchQueryBuilder field(String field, float boost) { if (Strings.isEmpty(field)) { throw new IllegalArgumentException("supplied field is null or empty."); } this.fieldsBoosts.put(field, boost); return this; }
MultiMatchQueryBuilder function(String field, float boost) { if (Strings.isEmpty(field)) { throw new IllegalArgumentException(STR); } this.fieldsBoosts.put(field, boost); return this; }
/** * Adds a field to run the multi match against with a specific boost. */
Adds a field to run the multi match against with a specific boost
field
{ "repo_name": "s1monw/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java", "license": "apache-2.0", "size": 35671 }
[ "org.elasticsearch.common.Strings" ]
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,408,315
public Dimension getPreferredSize(JComponent a) { Dimension returnValue = uis.elementAt(0).getPreferredSize(a); for (int i = 1; i < uis.size(); i++) { uis.elementAt(i).getPreferredSize(a); } return returnValue; }
Dimension function(JComponent a) { Dimension returnValue = uis.elementAt(0).getPreferredSize(a); for (int i = 1; i < uis.size(); i++) { uis.elementAt(i).getPreferredSize(a); } return returnValue; }
/** * Invokes the <code>getPreferredSize</code> method on each UI handled by this object. * * @return the value obtained from the first UI, which is * the UI obtained from the default <code>LookAndFeel</code> */
Invokes the <code>getPreferredSize</code> method on each UI handled by this object
getPreferredSize
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/plaf/multi/MultiColorChooserUI.java", "license": "apache-2.0", "size": 7335 }
[ "java.awt.Dimension", "javax.swing.JComponent" ]
import java.awt.Dimension; import javax.swing.JComponent;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
7,044
public boolean pathExists(String path) throws EncFSCorruptDataException, IOException { validateAbsoluteFileName(path, "fileName"); String encryptedPath = EncFSCrypto.encodePath(this, path, ROOT_PATH); return fileProvider.exists(encryptedPath); }
boolean function(String path) throws EncFSCorruptDataException, IOException { validateAbsoluteFileName(path, STR); String encryptedPath = EncFSCrypto.encodePath(this, path, ROOT_PATH); return fileProvider.exists(encryptedPath); }
/** * Checks whether the file or directory with the given path exists in the * volume * * @param path * Absolute volume path of the file or directory * * @return true if path exists in the volume, false otherwise * * @throws EncFSCorruptDataException * Filename encoding fai...
Checks whether the file or directory with the given path exists in the volume
pathExists
{ "repo_name": "triplein/plsql-encfs", "path": "src/org/mrpdaemon/sec/encfs/EncFSVolume.java", "license": "lgpl-3.0", "size": 28534 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,235,853
@Override public List findByDocumentHeaderIdAndLineType(Class clazz, String id, String lineType) { return findByDocumentHeaderId(clazz, id); }
List function(Class clazz, String id, String lineType) { return findByDocumentHeaderId(clazz, id); }
/** * Defers to findByDocumentHeaderId * * @see org.kuali.kfs.sys.dataaccess.AccountingLineDao#findByDocumentHeaderIdAndLineType(java.lang.Class, java.lang.String, java.lang.String) */
Defers to findByDocumentHeaderId
findByDocumentHeaderIdAndLineType
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ld/src/main/java/org/kuali/kfs/module/ld/dataaccess/impl/ExpenseTransferAccountingLineDaoOjb.java", "license": "agpl-3.0", "size": 3281 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
326,853
public StatusCode modifyFavoriteStatus(String sessionId, int accountId, MediaType mediaType, int mediaId, boolean setFavorite) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.SESSION_ID, sessionId); parameters.add(Param.ID, accountId); ...
StatusCode function(String sessionId, int accountId, MediaType mediaType, int mediaId, boolean setFavorite) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.SESSION_ID, sessionId); parameters.add(Param.ID, accountId); String jsonBody = new PostTools() .add(PostBody.MEDIA_...
/** * Add or remove a movie to an accounts favorite list. * * @param sessionId * @param accountId * @param mediaType * @param mediaId * @param setFavorite * @return * @throws MovieDbException */
Add or remove a movie to an accounts favorite list
modifyFavoriteStatus
{ "repo_name": "Omertron/api-themoviedb", "path": "src/main/java/com/omertron/themoviedbapi/methods/TmdbAccount.java", "license": "gpl-3.0", "size": 12814 }
[ "com.omertron.themoviedbapi.MovieDbException", "com.omertron.themoviedbapi.enumeration.MediaType", "com.omertron.themoviedbapi.model.StatusCode", "com.omertron.themoviedbapi.tools.ApiUrl", "com.omertron.themoviedbapi.tools.MethodBase", "com.omertron.themoviedbapi.tools.MethodSub", "com.omertron.themovie...
import com.omertron.themoviedbapi.MovieDbException; import com.omertron.themoviedbapi.enumeration.MediaType; import com.omertron.themoviedbapi.model.StatusCode; import com.omertron.themoviedbapi.tools.ApiUrl; import com.omertron.themoviedbapi.tools.MethodBase; import com.omertron.themoviedbapi.tools.MethodSub; import c...
import com.omertron.themoviedbapi.*; import com.omertron.themoviedbapi.enumeration.*; import com.omertron.themoviedbapi.model.*; import com.omertron.themoviedbapi.tools.*; import java.io.*; import org.yamj.api.common.exception.*;
[ "com.omertron.themoviedbapi", "java.io", "org.yamj.api" ]
com.omertron.themoviedbapi; java.io; org.yamj.api;
304,401
@SuppressWarnings("unchecked") protected static <T> T invoke(Method method, Object object, Object... parameters) throws IOException, RuntimeException { try { return (T) method.invoke(object, parameters); } catch (IllegalArgumentException e) { throw new RuntimeException(e)...
@SuppressWarnings(STR) static <T> T function(Method method, Object object, Object... parameters) throws IOException, RuntimeException { try { return (T) method.invoke(object, parameters); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeExceptio...
/** * Invoke a method on an object and return whatever it returns. * * @param method The method to invoke. * @param object The instance or class (for static methods) on which to invoke the method. * @param parameters The parameters to pass to the method. * @return Whatever the method retu...
Invoke a method on an object and return whatever it returns
invoke
{ "repo_name": "nano-projects/nano-framework", "path": "nano-core/src/main/java/org/nanoframework/core/component/scan/VFS.java", "license": "apache-2.0", "size": 7901 }
[ "java.io.IOException", "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method" ]
import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method;
import java.io.*; import java.lang.reflect.*;
[ "java.io", "java.lang" ]
java.io; java.lang;
2,033,500
public void setEventPublisher(EventPublisher eventPublisher) { this.eventPublisher = eventPublisher; }
void function(EventPublisher eventPublisher) { this.eventPublisher = eventPublisher; }
/** * Sets the event publisher */
Sets the event publisher
setEventPublisher
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java", "license": "lgpl-3.0", "size": 150987 }
[ "org.alfresco.repo.events.EventPublisher" ]
import org.alfresco.repo.events.EventPublisher;
import org.alfresco.repo.events.*;
[ "org.alfresco.repo" ]
org.alfresco.repo;
2,661,016
public DescendantSelector createDescendantSelector( Selector parent, SimpleSelector descendant ) throws CSSException { return new DescendantSelectorImpl( parent, descendant ); }
DescendantSelector function( Selector parent, SimpleSelector descendant ) throws CSSException { return new DescendantSelectorImpl( parent, descendant ); }
/** * Creates a descendant selector. * * @param parent the parent selector * @param descendant the descendant selector * @return the combinator selector. * @throws CSSException If this selector is not supported. */
Creates a descendant selector
createDescendantSelector
{ "repo_name": "mbatchelor/pentaho-reporting", "path": "libraries/flute/src/main/java/org/w3c/flute/parser/selectors/SelectorFactoryImpl.java", "license": "lgpl-2.1", "size": 8189 }
[ "org.w3c.css.sac.CSSException", "org.w3c.css.sac.DescendantSelector", "org.w3c.css.sac.Selector", "org.w3c.css.sac.SimpleSelector" ]
import org.w3c.css.sac.CSSException; import org.w3c.css.sac.DescendantSelector; import org.w3c.css.sac.Selector; import org.w3c.css.sac.SimpleSelector;
import org.w3c.css.sac.*;
[ "org.w3c.css" ]
org.w3c.css;
2,354,271
FileNameParts result = null; String topic = ""; String domain = ""; String localName = filename.replace(".ares", ""); if (localName.contains("/")) { try { String[] parts = localName.split("\\/"); localName = parts[parts.length-1]; } catch (Exception e) { ErrorUtils.report(logger, e); } ...
FileNameParts result = null; String topic = STRSTR.aresSTRSTR/STR\\/STR._STR_STR_STR_STR missing realm in filename, e.g. gr_GR_cog.STR not named correctly."); } } return result; }
/** * Parse the given filename into parts, topic and domain. * For example, da_d0_en_US_dedes * @param filename * @return FileNameParts instance */
Parse the given filename into parts, topic and domain. For example, da_d0_en_US_dedes
getAresFileNameParts
{ "repo_name": "OCMC-Translation-Projects/ioc-liturgical-ws", "path": "src/main/java/net/ages/alwb/gateway/utils/GatewayUtils.java", "license": "epl-1.0", "size": 2349 }
[ "net.ages.alwb.gateway.library.ares.FileNameParts" ]
import net.ages.alwb.gateway.library.ares.FileNameParts;
import net.ages.alwb.gateway.library.ares.*;
[ "net.ages.alwb" ]
net.ages.alwb;
1,582,780
public static Envelope createClassIdEnvelope ( Object content, String identifier, Agent owner ) throws UnsupportedEncodingException, EncodingFailedException, SerializationException { return createClassIdEnvelope(content, identifier, new Agent[] { owner }); }
static Envelope function ( Object content, String identifier, Agent owner ) throws UnsupportedEncodingException, EncodingFailedException, SerializationException { return createClassIdEnvelope(content, identifier, new Agent[] { owner }); }
/** * factory: create an envelope with a definite id for the given class and identifier string * * @param content * @param identifier * @param owner * * @return a new envelope * * @throws SerializationException * @throws EncodingFailedException * @throws UnsupportedEncodingException */
factory: create an envelope with a definite id for the given class and identifier string
createClassIdEnvelope
{ "repo_name": "AlexRuppert/las2peer_project", "path": "java/i5/las2peer/persistency/Envelope.java", "license": "mit", "size": 37160 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,524,512
@Override public void onClick(View v) { hide(); }
void function(View v) { hide(); }
/** * Dismiss button clicked * * @param v */
Dismiss button clicked
onClick
{ "repo_name": "evercam/evercam-play-android", "path": "showcaseView/src/main/java/uk/co/deanwild/materialshowcaseview/MaterialShowcaseView.java", "license": "agpl-3.0", "size": 27031 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,040,127
@Test public void sticky_facets_no_filters() { setupStickyFacets(); RuleQuery query = new RuleQuery(); SearchIdResult<String> result = underTest.search(query, new SearchOptions().addFacets(asList(FACET_LANGUAGES, FACET_REPOSITORIES, FACET_TAGS, FACET_TYPES))); Map<String, LinkedHashMap<String...
void function() { setupStickyFacets(); RuleQuery query = new RuleQuery(); SearchIdResult<String> result = underTest.search(query, new SearchOptions().addFacets(asList(FACET_LANGUAGES, FACET_REPOSITORIES, FACET_TAGS, FACET_TYPES))); Map<String, LinkedHashMap<String, Long>> facets = result.getFacets().getAll(); assertTha...
/** * Facet with no filters at all */
Facet with no filters at all
sticky_facets_no_filters
{ "repo_name": "SonarSource/sonarqube", "path": "server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexTest.java", "license": "lgpl-3.0", "size": 47651 }
[ "java.util.LinkedHashMap", "java.util.Map", "org.assertj.core.api.Assertions", "org.sonar.server.es.SearchIdResult", "org.sonar.server.es.SearchOptions" ]
import java.util.LinkedHashMap; import java.util.Map; import org.assertj.core.api.Assertions; import org.sonar.server.es.SearchIdResult; import org.sonar.server.es.SearchOptions;
import java.util.*; import org.assertj.core.api.*; import org.sonar.server.es.*;
[ "java.util", "org.assertj.core", "org.sonar.server" ]
java.util; org.assertj.core; org.sonar.server;
509,255
public OutputStream getDownload(ORDER order, OutputStream out) throws IOException;
OutputStream function(ORDER order, OutputStream out) throws IOException;
/** * Get the download for the order provided * @param order * @param out outputstram to write to * @return * @throws IOException */
Get the download for the order provided
getDownload
{ "repo_name": "Gnafu/OpenSDI-Manager2", "path": "src/modules/filemanager/src/main/java/it/geosolutions/opensdi2/download/DownloadService.java", "license": "gpl-3.0", "size": 902 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,161,530
public void fillViewMenu(IMenuManager mm) { if (mm.find(IWorkingSetActionGroup.ACTION_GROUP) == null) { mm.add(new Separator(IWorkingSetActionGroup.ACTION_GROUP)); } add(mm, fSelectWorkingSetAction); add(mm, fClearWorkingSetAction); add(mm, fEditWorkingSetAction); add(mm, new Separator()); add(mm...
void function(IMenuManager mm) { if (mm.find(IWorkingSetActionGroup.ACTION_GROUP) == null) { mm.add(new Separator(IWorkingSetActionGroup.ACTION_GROUP)); } add(mm, fSelectWorkingSetAction); add(mm, fClearWorkingSetAction); add(mm, fEditWorkingSetAction); add(mm, new Separator()); add(mm, new Separator(LRU_GROUP));
/** * Adds the filter actions to the menu * * @param mm the menu manager */
Adds the filter actions to the menu
fillViewMenu
{ "repo_name": "boniatillo-com/PhaserEditor", "path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/workingsets/WorkingSetFilterActionGroup.java", "license": "epl-1.0", "size": 11516 }
[ "org.eclipse.jface.action.IMenuManager", "org.eclipse.jface.action.Separator" ]
import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
894,466
protected void renderPage() { form = new Form<Object>("form"); form.setOutputMarkupId(true); studyCourseListSelector = new StudyCourseListSelectorPanel("studyCourseListSelector", getStudyCourseItems(), getSelectedStudyCourseItems()); form.add(studyCourseListSelector); // add ProcedureLi...
void function() { form = new Form<Object>("form"); form.setOutputMarkupId(true); studyCourseListSelector = new StudyCourseListSelectorPanel(STR, getStudyCourseItems(), getSelectedStudyCourseItems()); form.add(studyCourseListSelector); procedureListSelector = new ProcedureListSelectorPanel(STR, getProcedureModelItems(),...
/** * Renders the form page. This should be called after setting the {@link Campaign} to work with. */
Renders the form page. This should be called after setting the <code>Campaign</code> to work with
renderPage
{ "repo_name": "physalix-enrollment/physalix", "path": "AdminGui/src/main/java/hsa/awp/admingui/edit/AbstractCampaign.java", "license": "gpl-3.0", "size": 20235 }
[ "java.util.Date", "java.util.List", "org.apache.wicket.extensions.yui.calendar.DateTimeField", "org.apache.wicket.markup.html.WebMarkupContainer", "org.apache.wicket.markup.html.form.DropDownChoice", "org.apache.wicket.markup.html.form.Form", "org.apache.wicket.markup.html.form.IChoiceRenderer", "org....
import java.util.Date; import java.util.List; import org.apache.wicket.extensions.yui.calendar.DateTimeField; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.IChoi...
import java.util.*; import org.apache.wicket.extensions.yui.calendar.*; import org.apache.wicket.markup.html.*; import org.apache.wicket.markup.html.form.*; import org.apache.wicket.markup.html.panel.*; import org.apache.wicket.model.*; import org.apache.wicket.validation.validator.*;
[ "java.util", "org.apache.wicket" ]
java.util; org.apache.wicket;
2,555,108
@Override public MulticastDefinition executorService(ExecutorService executorService) { this.executorServiceBean = executorService; return this; }
MulticastDefinition function(ExecutorService executorService) { this.executorServiceBean = executorService; return this; }
/** * To use a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel * processing is automatically implied, and you do not have to enable that option as well. */
To use a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatically implied, and you do not have to enable that option as well
executorService
{ "repo_name": "apache/camel", "path": "core/camel-core-model/src/main/java/org/apache/camel/model/MulticastDefinition.java", "license": "apache-2.0", "size": 18523 }
[ "java.util.concurrent.ExecutorService" ]
import java.util.concurrent.ExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,501,787
private void destroyCleanUp(RegionEventImpl event, int serials[]) { String rId = getRegionIdentifier(); try { if (logger.isDebugEnabled()) { logger.debug("PartitionedRegion#destroyCleanUp: Destroying region: {}", getFullPath()); } sendDestroyRegionMessage(event, serials); try...
void function(RegionEventImpl event, int serials[]) { String rId = getRegionIdentifier(); try { if (logger.isDebugEnabled()) { logger.debug(STR, getFullPath()); } sendDestroyRegionMessage(event, serials); try { if (null != this.prRoot) { this.prRoot.destroy(rId); } } catch (EntryNotFoundException ex) { if (logger.isDeb...
/** * This method: <br> * Sends DestroyRegionMessage to other nodes <br> * Removes this PartitionedRegion from allPartitionedRegions <br> * Destroys bucket2node region <br> * * @param event * the RegionEvent that triggered the region clean up * * @see DestroyPartitionedRegion...
This method: Sends DestroyRegionMessage to other nodes Removes this PartitionedRegion from allPartitionedRegions Destroys bucket2node region
destroyCleanUp
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java", "license": "apache-2.0", "size": 426773 }
[ "com.gemstone.gemfire.CancelException", "com.gemstone.gemfire.cache.EntryNotFoundException" ]
import com.gemstone.gemfire.CancelException; import com.gemstone.gemfire.cache.EntryNotFoundException;
import com.gemstone.gemfire.*; import com.gemstone.gemfire.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
318,020
public EdgeLabelMaker multiplicity(Multiplicity multiplicity);
EdgeLabelMaker function(Multiplicity multiplicity);
/** * Sets the multiplicity of this label. The default multiplicity is {@link com.thinkaurelius.titan.core.Multiplicity#MULTI}. * @return this EdgeLabelMaker * @see Multiplicity */
Sets the multiplicity of this label. The default multiplicity is <code>com.thinkaurelius.titan.core.Multiplicity#MULTI</code>
multiplicity
{ "repo_name": "fengshao0907/titan", "path": "titan-core/src/main/java/com/thinkaurelius/titan/core/schema/EdgeLabelMaker.java", "license": "apache-2.0", "size": 1661 }
[ "com.thinkaurelius.titan.core.Multiplicity" ]
import com.thinkaurelius.titan.core.Multiplicity;
import com.thinkaurelius.titan.core.*;
[ "com.thinkaurelius.titan" ]
com.thinkaurelius.titan;
41,140
void use(VirtualHost vhost, String pattern, Middleware middleware);
void use(VirtualHost vhost, String pattern, Middleware middleware);
/** * Register a binding on a virtualhost * @param vhost * @param pattern * @param middleware */
Register a binding on a virtualhost
use
{ "repo_name": "core9/module-server", "path": "src/api/java/io/core9/plugin/server/Server.java", "license": "mit", "size": 1106 }
[ "io.core9.plugin.server.handler.Middleware" ]
import io.core9.plugin.server.handler.Middleware;
import io.core9.plugin.server.handler.*;
[ "io.core9.plugin" ]
io.core9.plugin;
2,112,448
public String generateCreateColumnSQL(AmberPersistenceUnit manager, int length, int precision, int scale) { return manager.getCreateColumnSQL(Types.BOOLEAN, length, precision, scale); }
String function(AmberPersistenceUnit manager, int length, int precision, int scale) { return manager.getCreateColumnSQL(Types.BOOLEAN, length, precision, scale); }
/** * Generates the type for the table. */
Generates the type for the table
generateCreateColumnSQL
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/amber/type/PrimitiveBooleanType.java", "license": "gpl-2.0", "size": 3667 }
[ "com.caucho.amber.manager.AmberPersistenceUnit", "java.sql.Types" ]
import com.caucho.amber.manager.AmberPersistenceUnit; import java.sql.Types;
import com.caucho.amber.manager.*; import java.sql.*;
[ "com.caucho.amber", "java.sql" ]
com.caucho.amber; java.sql;
610,553
void processElement(T element, Writer writer, MediaType mimetype) throws IOException;
void processElement(T element, Writer writer, MediaType mimetype) throws IOException;
/** * write the element to the response writer * * @param element the element to be written * @param writer the writer to be used. * @param mimetype the value of mimetype * @throws IOException */
write the element to the response writer
processElement
{ "repo_name": "etecture/dynamic-resources", "path": "dynamic-resources-api/src/main/java/de/etecture/opensource/dynamicresources/api/ResponseWriter.java", "license": "bsd-3-clause", "size": 2575 }
[ "java.io.IOException", "java.io.Writer" ]
import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
769,427
private static List<OArtifact> updateMetadataFromJars(InternalOModuleManager manager, List<Path> jars) { if(jars!=null && !jars.isEmpty()) { List<OArtifact> modules = manager.getMavenResolver().getResolvedOArtifacts(jars); if (modules.size() > 0) { manager.updateOArtifactsInMetadata(mo...
static List<OArtifact> function(InternalOModuleManager manager, List<Path> jars) { if(jars!=null && !jars.isEmpty()) { List<OArtifact> modules = manager.getMavenResolver().getResolvedOArtifacts(jars); if (modules.size() > 0) { manager.updateOArtifactsInMetadata(modules); } return modules; } else return new ArrayList<>(...
/** * Update modules list from modules folder. * @param jars jars in modules folder * @return list which contains Orienteer modules */
Update modules list from modules folder
updateMetadataFromJars
{ "repo_name": "OrienteerBAP/Orienteer", "path": "orienteer-core/src/main/java/org/orienteer/core/boot/loader/OrienteerClassLoader.java", "license": "apache-2.0", "size": 9353 }
[ "java.nio.file.Path", "java.util.ArrayList", "java.util.List", "org.orienteer.core.boot.loader.internal.InternalOModuleManager", "org.orienteer.core.boot.loader.internal.artifact.OArtifact" ]
import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import org.orienteer.core.boot.loader.internal.InternalOModuleManager; import org.orienteer.core.boot.loader.internal.artifact.OArtifact;
import java.nio.file.*; import java.util.*; import org.orienteer.core.boot.loader.internal.*; import org.orienteer.core.boot.loader.internal.artifact.*;
[ "java.nio", "java.util", "org.orienteer.core" ]
java.nio; java.util; org.orienteer.core;
549,868
public RectF getActualCropRect() { final Rect displayedImageRect = ImageViewUtil.getBitmapRectCenterInside(mBitmap, mImageView); // Get the scale factor between the actual Bitmap dimensions and the // displayed dimensions for width. final float actualImageWidth = mBitmap.getWidth()...
RectF function() { final Rect displayedImageRect = ImageViewUtil.getBitmapRectCenterInside(mBitmap, mImageView); final float actualImageWidth = mBitmap.getWidth(); final float displayedImageWidth = displayedImageRect.width(); final float scaleFactorWidth = actualImageWidth / displayedImageWidth; final float actualImage...
/** * Gets the crop window's position relative to the source Bitmap (not the image * displayed in the CropImageView). * * @return a RectF instance containing cropped area boundaries of the source Bitmap */
Gets the crop window's position relative to the source Bitmap (not the image displayed in the CropImageView)
getActualCropRect
{ "repo_name": "devsoulwolf/PictureChooseLib", "path": "library/src/main/java/net/soulwolf/image/picturelib/view/CropImageView.java", "license": "apache-2.0", "size": 19546 }
[ "android.graphics.Rect", "android.graphics.RectF", "net.soulwolf.image.picturelib.utils.ImageViewUtil", "net.soulwolf.image.picturelib.view.cropwindow.edge.Edge" ]
import android.graphics.Rect; import android.graphics.RectF; import net.soulwolf.image.picturelib.utils.ImageViewUtil; import net.soulwolf.image.picturelib.view.cropwindow.edge.Edge;
import android.graphics.*; import net.soulwolf.image.picturelib.utils.*; import net.soulwolf.image.picturelib.view.cropwindow.edge.*;
[ "android.graphics", "net.soulwolf.image" ]
android.graphics; net.soulwolf.image;
1,521,591
// if it was a "not your turn" message, just ignore it if (info instanceof NotYourTurnInfo) return; try { Thread.sleep(500); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } if (!(info instanceof PhaseState)) { // otherwise, if it's not a game-...
if (info instanceof NotYourTurnInfo) return; try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } if (!(info instanceof PhaseState)) { return; } PhaseState state = (PhaseState)info; boolean drawPile = Math.random()<.5f; game.sendAction(new PhaseDrawCardAction(this, drawPile)); int playerId...
/** * Called when the player receives a game-state (or other info) from the * game. * * @param gameInfo * the message from the game */
Called when the player receives a game-state (or other info) from the game
receiveInfo
{ "repo_name": "MaxRobinson/Phase10", "path": "Phase10Proj/src/edu/up/cs301/phase10/PhaseComputerPlayer0.java", "license": "gpl-2.0", "size": 2166 }
[ "edu.up.cs301.card.Card", "edu.up.cs301.card.CardColor", "edu.up.cs301.card.Rank", "edu.up.cs301.game.infoMsg.NotYourTurnInfo" ]
import edu.up.cs301.card.Card; import edu.up.cs301.card.CardColor; import edu.up.cs301.card.Rank; import edu.up.cs301.game.infoMsg.NotYourTurnInfo;
import edu.up.cs301.card.*; import edu.up.cs301.game.*;
[ "edu.up.cs301" ]
edu.up.cs301;
357,568
@Test(dataProvider = "propertyValues") protected <TYPE extends Bean> void testCycle(final JodaBeanProperties<TYPE> properties) { final TYPE bean = constructAndPopulateBeanBuilder(properties).build(); assertEncodeDecodeCycle(properties.getType(), bean); }
@Test(dataProvider = STR) <TYPE extends Bean> void function(final JodaBeanProperties<TYPE> properties) { final TYPE bean = constructAndPopulateBeanBuilder(properties).build(); assertEncodeDecodeCycle(properties.getType(), bean); }
/** * Tests a cycle. * * @param properties * information about the properties to be tested */
Tests a cycle
testCycle
{ "repo_name": "McLeodMoores/starling", "path": "projects/provider/src/test/java/com/opengamma/provider/AbstractBeanTestCase.java", "license": "apache-2.0", "size": 11919 }
[ "org.joda.beans.Bean", "org.testng.annotations.Test" ]
import org.joda.beans.Bean; import org.testng.annotations.Test;
import org.joda.beans.*; import org.testng.annotations.*;
[ "org.joda.beans", "org.testng.annotations" ]
org.joda.beans; org.testng.annotations;
747,230
public void setTransListeners( List<TransListener> transListeners ) { this.transListeners = Collections.synchronizedList( transListeners ); }
void function( List<TransListener> transListeners ) { this.transListeners = Collections.synchronizedList( transListeners ); }
/** * Sets the list of transformation listeners. * * @param transListeners the transListeners to set */
Sets the list of transformation listeners
setTransListeners
{ "repo_name": "flbrino/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 198588 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,439,808
private StructTypeImpl createStructTypeForNullProjection(List currentIterators, ExecutionContext context) { int len = currentIterators.size(); String fieldNames[] = new String[len]; ObjectType fieldTypes[] = new ObjectType[len]; String fldName = null; for (int i = 0; i < len; i++) { Ru...
StructTypeImpl function(List currentIterators, ExecutionContext context) { int len = currentIterators.size(); String fieldNames[] = new String[len]; ObjectType fieldTypes[] = new ObjectType[len]; String fldName = null; for (int i = 0; i < len; i++) { RuntimeIterator iter = (RuntimeIterator) currentIterators.get(i); if ...
/** * This function should be used to create a StructType for those queries which have * as * projection attribute (implying null projection attribute) & multiple from clauses */
This function should be used to create a StructType for those queries which have * as projection attribute (implying null projection attribute) & multiple from clauses
createStructTypeForNullProjection
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/cache/query/internal/CompiledSelect.java", "license": "apache-2.0", "size": 64007 }
[ "java.util.List", "org.apache.geode.cache.query.internal.types.StructTypeImpl", "org.apache.geode.cache.query.types.ObjectType" ]
import java.util.List; import org.apache.geode.cache.query.internal.types.StructTypeImpl; import org.apache.geode.cache.query.types.ObjectType;
import java.util.*; import org.apache.geode.cache.query.internal.types.*; import org.apache.geode.cache.query.types.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
2,627,724
@Override protected void initialize( TestParameters tParam, PrintWriter log ) { // get a soffice factory object SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF()); try { log.println( "creating a sheetdocument" ); xSheetDoc = SOF.createCalcDoc(null);...
void function( TestParameters tParam, PrintWriter log ) { SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF()); try { log.println( STR ); xSheetDoc = SOF.createCalcDoc(null); } catch (com.sun.star.uno.Exception e) { e.printStackTrace( log ); throw new StatusException( STR, e ); } }
/** * Creates Spreadsheet document. */
Creates Spreadsheet document
initialize
{ "repo_name": "Limezero/libreoffice", "path": "qadevOOo/tests/java/mod/_sc/ScIndexEnumeration_TableChartsEnumeration.java", "license": "gpl-3.0", "size": 8672 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,412,821
public void ApplyData(List<LUNs> source, boolean isIncluded) { ArrayList<LunModel> newItems = new ArrayList<LunModel>(); for (LUNs a : source) { if (a.getLunType() == getType() || a.getLunType() == StorageType.UNKNOWN) { ArrayList<SanTargetModel> ...
void function(List<LUNs> source, boolean isIncluded) { ArrayList<LunModel> newItems = new ArrayList<LunModel>(); for (LUNs a : source) { if (a.getLunType() == getType() a.getLunType() == StorageType.UNKNOWN) { ArrayList<SanTargetModel> targets = new ArrayList<SanTargetModel>(); if (a.getLunConnections() != null) { for ...
/** * Creates model items from the provided list of business entities. */
Creates model items from the provided list of business entities
ApplyData
{ "repo_name": "derekhiggins/ovirt-engine", "path": "frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/SanStorageModel.java", "license": "apache-2.0", "size": 18363 }
[ "java.util.ArrayList", "java.util.List", "org.ovirt.engine.core.common.businessentities.LUNs", "org.ovirt.engine.core.common.businessentities.StorageType", "org.ovirt.engine.core.compat.ObservableCollection" ]
import java.util.ArrayList; import java.util.List; import org.ovirt.engine.core.common.businessentities.LUNs; import org.ovirt.engine.core.common.businessentities.StorageType; import org.ovirt.engine.core.compat.ObservableCollection;
import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
1,000,688
public void onUpdate() { super.onUpdate(); if (!this.world.isRemote) { this.updateLeashedState(); if (this.ticksExisted % 5 == 0) { boolean flag = !(this.getControllingPassenger() instanceof EntityLiving); boolean flag...
void function() { super.onUpdate(); if (!this.world.isRemote) { this.updateLeashedState(); if (this.ticksExisted % 5 == 0) { boolean flag = !(this.getControllingPassenger() instanceof EntityLiving); boolean flag1 = !(this.getRidingEntity() instanceof EntityBoat); this.tasks.setControlFlag(1, flag); this.tasks.setContro...
/** * Called to update the entity's position/logic. */
Called to update the entity's position/logic
onUpdate
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/EntityLiving.java", "license": "gpl-3.0", "size": 50426 }
[ "net.minecraft.entity.item.EntityBoat" ]
import net.minecraft.entity.item.EntityBoat;
import net.minecraft.entity.item.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
1,983,226
public synchronized List<String> update(Map<String, String> renamedClasses, Map<String, String> renamedFields) throws PathException { // Update view paths updateView(renamedClasses, renamedFields); // Update constraints updateConstraints(renamedClasses, renamedFields); ...
synchronized List<String> function(Map<String, String> renamedClasses, Map<String, String> renamedFields) throws PathException { updateView(renamedClasses, renamedFields); updateConstraints(renamedClasses, renamedFields); updateOuterJoins(renamedClasses, renamedFields); updateDescriptionsPath(renamedClasses, renamedFie...
/** * Update the path query * @param renamedClasses the renamed classes * @param renamedFields the renamed fields * @return the list of problems * @throws PathException if there is problem in some paths */
Update the path query
update
{ "repo_name": "drhee/toxoMine", "path": "intermine/api/main/src/org/intermine/api/profile/PathQueryUpdate.java", "license": "lgpl-2.1", "size": 9458 }
[ "java.util.List", "java.util.Map", "org.intermine.pathquery.PathException" ]
import java.util.List; import java.util.Map; import org.intermine.pathquery.PathException;
import java.util.*; import org.intermine.pathquery.*;
[ "java.util", "org.intermine.pathquery" ]
java.util; org.intermine.pathquery;
1,006,786
protected TestEventHandler<? extends IDLEntity> createEventHandler( String eventName, String antennaName, int processingDelayMillis) { TestEventHandler<? extends IDLEntity> ret = null;
TestEventHandler<? extends IDLEntity> function( String eventName, String antennaName, int processingDelayMillis) { TestEventHandler<? extends IDLEntity> ret = null;
/** * Creates a typed event handler for the given eventName. * To avoid errors, the String-to-handler mapping is not done in a generic way (classForName etc with guessing the Java package) * but hardcoded for a few known event struct names that can be used for the tests. * * @param eventName Currently suppo...
Creates a typed event handler for the given eventName. To avoid errors, the String-to-handler mapping is not done in a generic way (classForName etc with guessing the Java package) but hardcoded for a few known event struct names that can be used for the tests
createEventHandler
{ "repo_name": "ACS-Community/ACS", "path": "Benchmark/corbaNotify/src/acs/benchmark/nc/comp/subscriber/CorbaNotifyConsumerImpl.java", "license": "lgpl-2.1", "size": 9996 }
[ "org.omg.CORBA" ]
import org.omg.CORBA;
import org.omg.*;
[ "org.omg" ]
org.omg;
1,154,714
private static void setDefaultProperties(Properties props) { String[] keyArr = { "serverName", "portNumber", "databaseName", JDBC_URL, USER, PASSWORD, DRIVER_CLASS_NAME, DATASOURCE_CLASS_NAME, MAX_POOL_SIZE, ALLOW_LOCAL_TXS }; String[] ...
static void function(Properties props) { String[] keyArr = { STR, STR, STR, JDBC_URL, USER, PASSWORD, DRIVER_CLASS_NAME, DATASOURCE_CLASS_NAME, MAX_POOL_SIZE, ALLOW_LOCAL_TXS }; String[] defaultPropArr = { STR", STRjdbc:h2:mem:jbpm-db;MVCC=trueSTRsa", STRorg.h2.DriverSTRorg.h2.jdbcx.JdbcDataSourceSTR5STRtrueSTRUnequal ...
/** * Return the default database/datasource properties - These properties use * an in-memory H2 database * * This is used when the developer is somehow running the tests but * bypassing the maven filtering that's been turned on in the pom. * * @return Properties containing the defaul...
Return the default database/datasource properties - These properties use an in-memory H2 database This is used when the developer is somehow running the tests but bypassing the maven filtering that's been turned on in the pom
setDefaultProperties
{ "repo_name": "romartin/jbpm", "path": "jbpm-human-task/jbpm-human-task-core/src/test/java/org/jbpm/services/task/HumanTaskServicesBaseTest.java", "license": "apache-2.0", "size": 10530 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,734,966
public Period evaluationFrequency() { return this.evaluationFrequency; }
Period function() { return this.evaluationFrequency; }
/** * Get how often the metric alert is evaluated represented in ISO 8601 duration format. * * @return the evaluationFrequency value */
Get how often the metric alert is evaluated represented in ISO 8601 duration format
evaluationFrequency
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/monitor/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/monitor/v2018_03_01/MetricAlertResourcePatch.java", "license": "mit", "size": 10660 }
[ "org.joda.time.Period" ]
import org.joda.time.Period;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
949,766
@Override public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { if (Activator.getInstance().isDebugging()) { System.out.println( "jlink.LaunchConfigurationDelegate.launch(" + config.getName() + ", " + mode + ") " + this); } o...
void function(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { if (Activator.getInstance().isDebugging()) { System.out.println( STR + config.getName() + STR + mode + STR + this); } org.eclipse.cdt.launch.LaunchUtils.enableActivity(STR, true); if (monitor == null...
/** * After Launch.initialise(), call here to effectively launch. * * The main reason for this is the custom launchDebugSession(). */
After Launch.initialise(), call here to effectively launch. The main reason for this is the custom launchDebugSession()
launch
{ "repo_name": "gnuarmeclipse/plug-ins", "path": "plugins/ilg.gnumcueclipse.debug.gdbjtag.jlink/src/ilg/gnumcueclipse/debug/gdbjtag/jlink/dsf/LaunchConfigurationDelegate.java", "license": "epl-1.0", "size": 19386 }
[ "org.eclipse.cdt.dsf.gdb.launching.LaunchUtils", "org.eclipse.core.runtime.CoreException", "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.core.runtime.NullProgressMonitor", "org.eclipse.debug.core.ILaunch", "org.eclipse.debug.core.ILaunchConfiguration", "org.eclipse.debug.core.ILaunchManager"...
import org.eclipse.cdt.dsf.gdb.launching.LaunchUtils; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug....
import org.eclipse.cdt.dsf.gdb.launching.*; import org.eclipse.core.runtime.*; import org.eclipse.debug.core.*;
[ "org.eclipse.cdt", "org.eclipse.core", "org.eclipse.debug" ]
org.eclipse.cdt; org.eclipse.core; org.eclipse.debug;
2,557,021
Completable removeListener(int listenerId);
Completable removeListener(int listenerId);
/** * Removes object event listener * * @param listenerId - listener id */
Removes object event listener
removeListener
{ "repo_name": "mrniko/redisson", "path": "redisson/src/main/java/org/redisson/api/RObjectRx.java", "license": "apache-2.0", "size": 5431 }
[ "io.reactivex.rxjava3.core.Completable" ]
import io.reactivex.rxjava3.core.Completable;
import io.reactivex.rxjava3.core.*;
[ "io.reactivex.rxjava3" ]
io.reactivex.rxjava3;
762,516
@ServiceMethod(returns = ReturnType.SINGLE) Response<ConfigurationInner> getWithResponse( String resourceGroupName, String serverName, String configurationName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<ConfigurationInner> getWithResponse( String resourceGroupName, String serverName, String configurationName, Context context);
/** * Gets information about a configuration of server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param configurationName The name of the server configuration. * @param context The context to as...
Gets information about a configuration of server
getWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/postgresqlflexibleserver/azure-resourcemanager-postgresqlflexibleserver/src/main/java/com/azure/resourcemanager/postgresqlflexibleserver/fluent/ConfigurationsClient.java", "license": "mit", "size": 11936 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.ConfigurationInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
854,064
public void setBusy(boolean busy) { this.busy = busy; if (busy) { repaintTimeline.playLoop(RepeatBehavior.LOOP); } else { repaintTimeline.abort(); this.repaint(); } }
void function(boolean busy) { this.busy = busy; if (busy) { repaintTimeline.playLoop(RepeatBehavior.LOOP); } else { repaintTimeline.abort(); this.repaint(); } }
/** * Sets whether this <code>BusyLabel</code> instance should consider * itself busy. A busy component indicate that it is busy via animation. * * @param busy Whether this <code>BusyLabel</code> instance should * consider itself busy. */
Sets whether this <code>BusyLabel</code> instance should consider itself busy. A busy component indicate that it is busy via animation
setBusy
{ "repo_name": "XtremeMP-Project/xtrememp-fx", "path": "src/xtrememp/ui/label/BusyLabel.java", "license": "bsd-3-clause", "size": 4743 }
[ "org.pushingpixels.trident.Timeline" ]
import org.pushingpixels.trident.Timeline;
import org.pushingpixels.trident.*;
[ "org.pushingpixels.trident" ]
org.pushingpixels.trident;
1,918,606
private OrcFileMetadata getFileFooterFromCacheOrDisk() throws IOException { LlapBufferOrBuffers tailBuffers = null; List<StripeStatistics> stats = null; List<StripeInformation> stripes = null; boolean hasCache = fileKey != null && metadataCache != null; if (hasCache) { tailBuffers = metadata...
OrcFileMetadata function() throws IOException { LlapBufferOrBuffers tailBuffers = null; List<StripeStatistics> stats = null; List<StripeInformation> stripes = null; boolean hasCache = fileKey != null && metadataCache != null; if (hasCache) { tailBuffers = metadataCache.getFileMetadata(fileKey); if (tailBuffers != null)...
/** * Gets file metadata for the split from cache, or reads it from the file. */
Gets file metadata for the split from cache, or reads it from the file
getFileFooterFromCacheOrDisk
{ "repo_name": "alanfgates/hive", "path": "llap-server/src/java/org/apache/hadoop/hive/llap/io/encoded/OrcEncodedDataReader.java", "license": "apache-2.0", "size": 41990 }
[ "java.io.IOException", "java.nio.ByteBuffer", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hive.common.io.encoded.MemoryBuffer", "org.apache.hadoop.hive.llap.counters.LlapIOCounters", "org.apache.hadoop.hive.llap.io.metadata.MetadataCache", "org.apache.hadoop.hive.llap.io.metadata.OrcFi...
import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hive.common.io.encoded.MemoryBuffer; import org.apache.hadoop.hive.llap.counters.LlapIOCounters; import org.apache.hadoop.hive.llap.io.metadata.MetadataCache; import org.apache.hadoop.hive...
import java.io.*; import java.nio.*; import java.util.*; import org.apache.hadoop.hive.common.io.encoded.*; import org.apache.hadoop.hive.llap.counters.*; import org.apache.hadoop.hive.llap.io.metadata.*; import org.apache.orc.*; import org.apache.orc.impl.*;
[ "java.io", "java.nio", "java.util", "org.apache.hadoop", "org.apache.orc" ]
java.io; java.nio; java.util; org.apache.hadoop; org.apache.orc;
649,807
public static MAsset getFromShipment (Properties ctx, int M_InOutLine_ID, String trxName) { MAsset retValue = null; String sql = "SELECT * FROM A_Asset WHERE M_InOutLine_ID=?"; PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = DB.prepareStatement (sql, trxName); pstmt.setInt (1, M...
static MAsset function (Properties ctx, int M_InOutLine_ID, String trxName) { MAsset retValue = null; String sql = STR; PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = DB.prepareStatement (sql, trxName); pstmt.setInt (1, M_InOutLine_ID); rs = pstmt.executeQuery (); if (rs.next ()) retValue = new MAss...
/** * Get Asset From Shipment * @param ctx context * @param M_InOutLine_ID shipment line * @param trxName transaction * @return asset or null */
Get Asset From Shipment
getFromShipment
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.business/src/main/java-legacy/org/compiere/model/MAsset.java", "license": "gpl-2.0", "size": 24931 }
[ "de.metas.logging.LogManager", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.util.Properties", "org.compiere.util.DB", "org.compiere.util.Env", "org.slf4j.Logger" ]
import de.metas.logging.LogManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Properties; import org.compiere.util.DB; import org.compiere.util.Env; import org.slf4j.Logger;
import de.metas.logging.*; import java.sql.*; import java.util.*; import org.compiere.util.*; import org.slf4j.*;
[ "de.metas.logging", "java.sql", "java.util", "org.compiere.util", "org.slf4j" ]
de.metas.logging; java.sql; java.util; org.compiere.util; org.slf4j;
578,240
public ELEngine getElEngine() { return elEngine; }
ELEngine function() { return elEngine; }
/** * Gets current implementation of {@link ELEngine} interface. A EL engine allows evaluate EL expressions. * Basically this component is required by another components and isn't of interest as separate component for use. * * @return EL engine */
Gets current implementation of <code>ELEngine</code> interface. A EL engine allows evaluate EL expressions. Basically this component is required by another components and isn't of interest as separate component for use
getElEngine
{ "repo_name": "jmingo-projects/jmingo", "path": "jmingo-core/src/main/java/org/jmingo/context/Context.java", "license": "gpl-3.0", "size": 8801 }
[ "org.jmingo.el.api.ELEngine" ]
import org.jmingo.el.api.ELEngine;
import org.jmingo.el.api.*;
[ "org.jmingo.el" ]
org.jmingo.el;
2,790,560
public void setOption(String key, String value) { Assert.isLegal(key != null); Assert.isLegal(value != null); fOptions.put(key, value); }
void function(String key, String value) { Assert.isLegal(key != null); Assert.isLegal(value != null); fOptions.put(key, value); }
/** * Sets the option for the given key to the given value. * * @param key the name of the option to set * @param value the value of the option * @throws IllegalArgumentException if the key is <code>null</code> * @see CleanUpOptions#TRUE * @see CleanUpOptions#FALSE */
Sets the option for the given key to the given value
setOption
{ "repo_name": "dhuebner/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/ui/cleanup/CleanUpOptions.java", "license": "epl-1.0", "size": 3095 }
[ "org.eclipse.core.runtime.Assert" ]
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
463,236
public static Font getFont(Font font, int style, Size size) { return getFont(font, size).deriveFont(style); }
static Font function(Font font, int style, Size size) { return getFont(font, size).deriveFont(style); }
/** * Gets the specified font with the specified style and size, correctly scaled * * @param style * @param size * @since 2.7.0 * @return */
Gets the specified font with the specified style and size, correctly scaled
getFont
{ "repo_name": "meitar/zaproxy", "path": "zap/src/main/java/org/zaproxy/zap/utils/FontUtils.java", "license": "apache-2.0", "size": 9404 }
[ "java.awt.Font" ]
import java.awt.Font;
import java.awt.*;
[ "java.awt" ]
java.awt;
271,819
@Test public void testFromDeclarationWithWorkingMemoryLogger() { final String drl = "package org.drools.compiler.integrationtests.operators;\n" + "import " + Cheesery.class.getCanonicalName() + ";\n" + "import " + Cheese.class.getCanonicalName() + ";\n" + "global java...
void function() { final String drl = STR + STR + Cheesery.class.getCanonicalName() + ";\n" + STR + Cheese.class.getCanonicalName() + ";\n" + STR + STRTest Rule\"\n" + STR + STR + STR + STR + STR + "end"; final KieBase kbase = KieBaseUtil.getKieBaseFromKieModuleFromDrl(STR, kieBaseTestConfiguration, drl); final KieSessi...
/** * JBRULES-1415 Certain uses of from causes NullPointerException in WorkingMemoryLogger */
JBRULES-1415 Certain uses of from causes NullPointerException in WorkingMemoryLogger
testFromDeclarationWithWorkingMemoryLogger
{ "repo_name": "lanceleverich/drools", "path": "drools-test-coverage/test-compiler-integration/src/test/java/org/drools/compiler/integrationtests/operators/FromTest.java", "license": "apache-2.0", "size": 43127 }
[ "java.util.ArrayList", "java.util.List", "org.drools.testcoverage.common.model.Cheese", "org.drools.testcoverage.common.model.Cheesery", "org.drools.testcoverage.common.util.KieBaseUtil", "org.junit.Assert", "org.kie.api.KieBase", "org.kie.api.runtime.KieSession" ]
import java.util.ArrayList; import java.util.List; import org.drools.testcoverage.common.model.Cheese; import org.drools.testcoverage.common.model.Cheesery; import org.drools.testcoverage.common.util.KieBaseUtil; import org.junit.Assert; import org.kie.api.KieBase; import org.kie.api.runtime.KieSession;
import java.util.*; import org.drools.testcoverage.common.model.*; import org.drools.testcoverage.common.util.*; import org.junit.*; import org.kie.api.*; import org.kie.api.runtime.*;
[ "java.util", "org.drools.testcoverage", "org.junit", "org.kie.api" ]
java.util; org.drools.testcoverage; org.junit; org.kie.api;
1,546,423
private int measureWidth(int measureSpec) { float result; int specMode = MeasureSpec.getMode(measureSpec); int specSize = MeasureSpec.getSize(measureSpec); if ((specMode == MeasureSpec.EXACTLY) || (mViewPager == null)) { //We were told how big to be result = ...
int function(int measureSpec) { float result; int specMode = MeasureSpec.getMode(measureSpec); int specSize = MeasureSpec.getSize(measureSpec); if ((specMode == MeasureSpec.EXACTLY) (mViewPager == null)) { result = specSize; } else { final int count = mViewPager.getAdapter().getCount(); result = getPaddingLeft() + getP...
/** * Determines the width of this view * * @param measureSpec * A measureSpec packed into an int * @return The width of the view, honoring constraints from measureSpec */
Determines the width of this view
measureWidth
{ "repo_name": "aliti/Learning", "path": "MLearning/src/com/example/androidnavigator/LinePageIndicator.java", "license": "apache-2.0", "size": 15557 }
[ "android.util.FloatMath" ]
import android.util.FloatMath;
import android.util.*;
[ "android.util" ]
android.util;
2,407,180
public ContentValues getCompleteValues() { final ContentValues values = new ContentValues(); if (mBefore != null) { values.putAll(mBefore); } if (mAfter != null) { values.putAll(mAfter); } if (values.containsKey(ContactsContract.CommonDataKinds...
ContentValues function() { final ContentValues values = new ContentValues(); if (mBefore != null) { values.putAll(mBefore); } if (mAfter != null) { values.putAll(mAfter); } if (values.containsKey(ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID)) { values.remove(ContactsContract.CommonDataKinds.GroupMember...
/** * Return complete set of "before" and "after" values mixed together, * giving full state regardless of edits. */
Return complete set of "before" and "after" values mixed together, giving full state regardless of edits
getCompleteValues
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/ContactsCommon/src/com/android/contacts/common/model/ValuesDelta.java", "license": "gpl-3.0", "size": 18421 }
[ "android.content.ContentValues", "android.provider.ContactsContract" ]
import android.content.ContentValues; import android.provider.ContactsContract;
import android.content.*; import android.provider.*;
[ "android.content", "android.provider" ]
android.content; android.provider;
2,856,607
private void checkHits(ScoreDoc[] hits, String prefix) { if (hits != null) { Map<Integer,Integer> idMap = new TreeMap<Integer,Integer>(); for (int docnum = 0; docnum < hits.length; ++docnum) { Integer luceneId = null; luceneId = Integer.valueOf(hits[docnum].doc); if (i...
void function(ScoreDoc[] hits, String prefix) { if (hits != null) { Map<Integer,Integer> idMap = new TreeMap<Integer,Integer>(); for (int docnum = 0; docnum < hits.length; ++docnum) { Integer luceneId = null; luceneId = Integer.valueOf(hits[docnum].doc); if (idMap.containsKey(luceneId)) { StringBuilder message = new St...
/** * Check the hits for duplicates. * * @param hits */
Check the hits for duplicates
checkHits
{ "repo_name": "bighaidao/lucene", "path": "lucene-core-test/src/test/java/org/apache/lucene/search/TestCustomSearcherSort.java", "license": "apache-2.0", "size": 9423 }
[ "java.util.Map", "java.util.TreeMap" ]
import java.util.Map; import java.util.TreeMap;
import java.util.*;
[ "java.util" ]
java.util;
2,202,118
private JsonWriter open(JsonScope empty, String openBracket) throws IOException { beforeValue(true); stack.add(empty); out.write(openBracket); return this; }
JsonWriter function(JsonScope empty, String openBracket) throws IOException { beforeValue(true); stack.add(empty); out.write(openBracket); return this; }
/** * Enters a new scope by appending any necessary whitespace and the given * bracket. */
Enters a new scope by appending any necessary whitespace and the given bracket
open
{ "repo_name": "jonasoreland/runnerup", "path": "app/src/main/org/runnerup/util/JsonWriter.java", "license": "gpl-3.0", "size": 17565 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,276,482
public static <T> T getProxy(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory fac...
static <T> T function(Class<T> protocol, long clientVersion, InetSocketAddress addr, UserGroupInformation ticket, Configuration conf, SocketFactory factory) throws IOException { return getProtocolProxy( protocol, clientVersion, addr, ticket, conf, factory).getProxy(); }
/** Construct a client-side proxy object that implements the named protocol, * talking to a server at the named address. * @param <T>*/
Construct a client-side proxy object that implements the named protocol, talking to a server at the named address
getProxy
{ "repo_name": "lukmajercak/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java", "license": "apache-2.0", "size": 38952 }
[ "java.io.IOException", "java.net.InetSocketAddress", "javax.net.SocketFactory", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.security.UserGroupInformation" ]
import java.io.IOException; import java.net.InetSocketAddress; import javax.net.SocketFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.security.UserGroupInformation;
import java.io.*; import java.net.*; import javax.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.security.*;
[ "java.io", "java.net", "javax.net", "org.apache.hadoop" ]
java.io; java.net; javax.net; org.apache.hadoop;
2,026,681
public void setQuantity(double value){ this.quantity = value; } /** * Gets the value of the dateBegin property. * * @return possible object is {@link XMLGregorianCalendar }
void function(double value){ this.quantity = value; } /** * Gets the value of the dateBegin property. * * @return possible object is {@link XMLGregorianCalendar }
/** * Sets the value of the quantity property. * */
Sets the value of the quantity property
setQuantity
{ "repo_name": "DavidGutknecht/elexis-3-base", "path": "bundles/at.medevit.elexis.tarmed.model/src-gen/ch/fd/invoice400/request/RecordUnclassifiedType.java", "license": "epl-1.0", "size": 11611 }
[ "javax.xml.datatype.XMLGregorianCalendar" ]
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.datatype.*;
[ "javax.xml" ]
javax.xml;
2,129,234
@Override public void respond(HttpServletRequest httpRequest, HttpServletResponse httpResponse) { LOGGER.info("Responding to the survey response annotation creation request."); super.respond(httpRequest, httpResponse, "annotation_id", annotationIdToReturn); }
void function(HttpServletRequest httpRequest, HttpServletResponse httpResponse) { LOGGER.info(STR); super.respond(httpRequest, httpResponse, STR, annotationIdToReturn); }
/** * Responds to the this request with success or a failure message * that contains a failure code and failure text. */
Responds to the this request with success or a failure message that contains a failure code and failure text
respond
{ "repo_name": "HaiJiaoXinHeng/server-1", "path": "src/org/ohmage/request/survey/annotation/PromptResponseAnnotationCreationRequest.java", "license": "apache-2.0", "size": 13020 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
794,877