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
void startBodyPart() throws MimeException;
void startBodyPart() throws MimeException;
/** * Called when a new body part starts inside a * <code>multipart/*</code> entity. * * @throws MimeException on processing errors */
Called when a new body part starts inside a <code>multipart/*</code> entity
startBodyPart
{ "repo_name": "arnaudsj/titanium_mobile", "path": "android/titanium/thirdparty/org/apache/james/mime4j/parser/ContentHandler.java", "license": "apache-2.0", "size": 7599 }
[ "org.apache.james.mime4j.MimeException" ]
import org.apache.james.mime4j.MimeException;
import org.apache.james.mime4j.*;
[ "org.apache.james" ]
org.apache.james;
501,919
@Test public void canDetect_ParameterAnnotation_OneRuntimeRetention_OneClassRetention() { final MethodInfo methodInfo = classInfo.getMethodInfo() .getSingleMethod("oneRuntimeRetention_OneClassRetention"); assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class.getNam...
void function() { final MethodInfo methodInfo = classInfo.getMethodInfo() .getSingleMethod(STR); assertThat(methodInfo.hasParameterAnnotation(ParamAnnoRuntime.class.getName())).isTrue(); }
/** * Annotations with CLASS retention does not need to be retained by vm at run time, but annotations with RUNTIME * retention should still be detectable. */
Annotations with CLASS retention does not need to be retained by vm at run time, but annotations with RUNTIME retention should still be detectable
canDetect_ParameterAnnotation_OneRuntimeRetention_OneClassRetention
{ "repo_name": "lukehutch/fast-classpath-scanner", "path": "src/test/java/io/github/classgraph/test/parameterannotation/RetentionPolicyForFunctionParameterAnnotationsTest.java", "license": "mit", "size": 7713 }
[ "io.github.classgraph.MethodInfo", "org.assertj.core.api.Assertions" ]
import io.github.classgraph.MethodInfo; import org.assertj.core.api.Assertions;
import io.github.classgraph.*; import org.assertj.core.api.*;
[ "io.github.classgraph", "org.assertj.core" ]
io.github.classgraph; org.assertj.core;
2,878,342
private void addParametersFromAuthenticationXML(String path, SourceParameters parameters) throws ProcessingException { final DocumentFragment fragment = this.authContext.getXML("/authentication" + path); if (fragment != null) { Nod...
void function(String path, SourceParameters parameters) throws ProcessingException { final DocumentFragment fragment = this.authContext.getXML(STR + path); if (fragment != null) { NodeList childs = fragment.getChildNodes(); if (childs != null) { Node current; for(int i = 0; i < childs.getLength(); i++) { current = chil...
/** * Convert the authentication XML of a handler to parameters. * The XML is flat and consists of elements which all have exactly one text node: * <parone>value_one<parone> * <partwo>value_two<partwo> * A parameter can occur more than once with different values. */
Convert the authentication XML of a handler to parameters. The XML is flat and consists of elements which all have exactly one text node: value_one value_two A parameter can occur more than once with different values
addParametersFromAuthenticationXML
{ "repo_name": "apache/cocoon", "path": "blocks/cocoon-authentication-fw/cocoon-authentication-fw-impl/src/main/java/org/apache/cocoon/webapps/authentication/context/AuthenticationContext.java", "license": "apache-2.0", "size": 34738 }
[ "org.apache.cocoon.ProcessingException", "org.apache.excalibur.source.SourceParameters", "org.w3c.dom.DocumentFragment", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import org.apache.cocoon.ProcessingException; import org.apache.excalibur.source.SourceParameters; import org.w3c.dom.DocumentFragment; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import org.apache.cocoon.*; import org.apache.excalibur.source.*; import org.w3c.dom.*;
[ "org.apache.cocoon", "org.apache.excalibur", "org.w3c.dom" ]
org.apache.cocoon; org.apache.excalibur; org.w3c.dom;
424,792
public void restore() { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Restoring I/O state"); } InputOutputState state = ioStack.pop(); if (state.autoCloseIn) { close(state.in); } if (state.autoCloseOut) { close(state.out, "output"); ...
void function() { if (LOG.isLoggable(Level.FINE)) { LOG.fine(STR); } InputOutputState state = ioStack.pop(); if (state.autoCloseIn) { close(state.in); } if (state.autoCloseOut) { close(state.out, STR); } if (state.autoCloseErr) { close(state.out, "error"); } } private static class InputOutputState implements Cloneable ...
/** * Restores the state. */
Restores the state
restore
{ "repo_name": "scgray/jsqsh", "path": "jsqsh-core/src/main/java/org/sqsh/InputOutputManager.java", "license": "apache-2.0", "size": 9062 }
[ "java.io.BufferedReader", "java.io.InputStreamReader", "java.io.PrintStream", "java.util.logging.Level" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintStream; import java.util.logging.Level;
import java.io.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
713,989
@Test public void rewindEmpty() { final CharSequenceReader<?> reader = this.createCharSequenceReader(""); assertThat(reader.getCurrentPosition(), is(0)); assertThat(reader.getCurrentCodePoint(), is(-1)); reader.rewind(); assertThat(reader.getCurrentPosition(), is(-1)); ...
void function() { final CharSequenceReader<?> reader = this.createCharSequenceReader(""); assertThat(reader.getCurrentPosition(), is(0)); assertThat(reader.getCurrentCodePoint(), is(-1)); reader.rewind(); assertThat(reader.getCurrentPosition(), is(-1)); assertThat(reader.getCurrentCodePoint(), is(-1)); } /** * Asserts ...
/** * Asserts that {@link CharSequenceReader#rewind()} works when the {@link CharSequence} is empty. */
Asserts that <code>CharSequenceReader#rewind()</code> works when the <code>CharSequence</code> is empty
rewindEmpty
{ "repo_name": "FraGag/fragag-commons", "path": "src/test/java/ca/fragag/text/CharSequenceReaderContract.java", "license": "mit", "size": 28488 }
[ "org.hamcrest.Matchers", "org.junit.Assert" ]
import org.hamcrest.Matchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
2,576,977
public byte[] toBytes(@Nullable Object val) { if (val != null) { byte[] bytes = getObjectStrategy().toBytes(val); return bytes != null ? bytes : ByteArrays.EMPTY_ARRAY; } else { return ByteArrays.EMPTY_ARRAY; } }
byte[] function(@Nullable Object val) { if (val != null) { byte[] bytes = getObjectStrategy().toBytes(val); return bytes != null ? bytes : ByteArrays.EMPTY_ARRAY; } else { return ByteArrays.EMPTY_ARRAY; } }
/** * Converts intermediate representation of aggregate to byte[]. * * @param val intermediate representation of aggregate * * @return serialized intermediate representation of aggregate in byte[] */
Converts intermediate representation of aggregate to byte[]
toBytes
{ "repo_name": "dkhwangbo/druid", "path": "processing/src/main/java/org/apache/druid/segment/serde/ComplexMetricSerde.java", "license": "apache-2.0", "size": 4586 }
[ "it.unimi.dsi.fastutil.bytes.ByteArrays", "javax.annotation.Nullable" ]
import it.unimi.dsi.fastutil.bytes.ByteArrays; import javax.annotation.Nullable;
import it.unimi.dsi.fastutil.bytes.*; import javax.annotation.*;
[ "it.unimi.dsi", "javax.annotation" ]
it.unimi.dsi; javax.annotation;
1,333,667
public static Tag status(ClientResponse response) { return Tag.of("status", String.valueOf(response.statusCode().value())); }
static Tag function(ClientResponse response) { return Tag.of(STR, String.valueOf(response.statusCode().value())); }
/** * Creates a {@code status} {@code Tag} derived from the * {@link ClientResponse#statusCode()} of the given {@code response}. * @param response the response * @return the status tag */
Creates a status Tag derived from the <code>ClientResponse#statusCode()</code> of the given response
status
{ "repo_name": "hello2009chen/spring-boot", "path": "spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/client/WebClientExchangeTags.java", "license": "apache-2.0", "size": 5053 }
[ "io.micrometer.core.instrument.Tag", "org.springframework.web.reactive.function.client.ClientResponse" ]
import io.micrometer.core.instrument.Tag; import org.springframework.web.reactive.function.client.ClientResponse;
import io.micrometer.core.instrument.*; import org.springframework.web.reactive.function.client.*;
[ "io.micrometer.core", "org.springframework.web" ]
io.micrometer.core; org.springframework.web;
1,552,812
public int countRows(final TableName tableName) throws IOException { Table table = getConnection().getTable(tableName); try { return countRows(table); } finally { table.close(); } }
int function(final TableName tableName) throws IOException { Table table = getConnection().getTable(tableName); try { return countRows(table); } finally { table.close(); } }
/** * Return the number of rows in the given table. */
Return the number of rows in the given table
countRows
{ "repo_name": "apurtell/hbase", "path": "hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 169342 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Table" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Table;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,074,879
public int sampleData(DataSource dataSource, int length, boolean allowEndOfInput) throws IOException { return rollingBuffer.appendData(dataSource, length, allowEndOfInput); } // TrackOutput implementation. Called by the loading thread.
int function(DataSource dataSource, int length, boolean allowEndOfInput) throws IOException { return rollingBuffer.appendData(dataSource, length, allowEndOfInput); }
/** * Invoked to write sample data to the output. * * @param dataSource A {@link DataSource} from which to read the sample data. * @param length The maximum length to read from the input. * @param allowEndOfInput True if encountering the end of the input having read no data is * allowed, and shoul...
Invoked to write sample data to the output
sampleData
{ "repo_name": "digantDj/Gifff-Talk", "path": "TMessagesProj/src/main/java/org/giffftalk/messenger/exoplayer/extractor/DefaultTrackOutput.java", "license": "gpl-2.0", "size": 9101 }
[ "java.io.IOException", "org.giffftalk.messenger.exoplayer.upstream.DataSource" ]
import java.io.IOException; import org.giffftalk.messenger.exoplayer.upstream.DataSource;
import java.io.*; import org.giffftalk.messenger.exoplayer.upstream.*;
[ "java.io", "org.giffftalk.messenger" ]
java.io; org.giffftalk.messenger;
1,587,832
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { if (errorChecking && !isXMLName(target,xml11Version)) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "INVALID_CHARACTER_ERR", null); t...
ProcessingInstruction function(String target, String data) throws DOMException { if (errorChecking && !isXMLName(target,xml11Version)) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, STR, null); throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg); } return new ProcessingInst...
/** * Factory method; creates a ProcessingInstruction having this Document * as its OwnerDoc. * * @param target The target "processor channel" * @param data Parameter string to be passed to the target. * * @throws DOMException(INVALID_NAME_ERR) if the target name is not * accepta...
Factory method; creates a ProcessingInstruction having this Document as its OwnerDoc
createProcessingInstruction
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/xerces/src/org/apache/xerces/dom/CoreDocumentImpl.java", "license": "gpl-2.0", "size": 97493 }
[ "org.w3c.dom.DOMException", "org.w3c.dom.ProcessingInstruction" ]
import org.w3c.dom.DOMException; import org.w3c.dom.ProcessingInstruction;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
504,692
public void cancelResource(ContentResourceEdit edit) { // check for closed edit if (!edit.isActiveEdit()) { Exception e = new Exception(); M_log.warn("cancelResource(): closed ContentResourceEdit", e); return; } // release the edit lock m_storage.cancelResource(edit); // if the edit is newl...
void function(ContentResourceEdit edit) { if (!edit.isActiveEdit()) { Exception e = new Exception(); M_log.warn(STR, e); return; } m_storage.cancelResource(edit); if (((BaseResourceEdit) edit).getEvent().equals(EVENT_RESOURCE_ADD)) { m_storage.removeResource(edit); } ((BaseResourceEdit) edit).closeEdit(); }
/** * Cancel the changes made object, and release the lock. The Object is disabled, and not to be used after this call. * * @param edit * The ContentResourceEdit object to commit. */
Cancel the changes made object, and release the lock. The Object is disabled, and not to be used after this call
cancelResource
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java", "license": "apache-2.0", "size": 426240 }
[ "org.sakaiproject.content.api.ContentResourceEdit" ]
import org.sakaiproject.content.api.ContentResourceEdit;
import org.sakaiproject.content.api.*;
[ "org.sakaiproject.content" ]
org.sakaiproject.content;
2,109,287
public Set<CollectorGem> getCollectors(){ return new HashSet<CollectorGem>(collectorSet); }
Set<CollectorGem> function(){ return new HashSet<CollectorGem>(collectorSet); }
/** * Get all collectors in the GemGraph * @return all collector gems in the GemGraph. */
Get all collectors in the GemGraph
getCollectors
{ "repo_name": "levans/Open-Quark", "path": "src/Quark_Gems/src/org/openquark/gems/client/GemGraph.java", "license": "bsd-3-clause", "size": 134737 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,680,612
public static List<String> getAvailableLocaleSuffixes(String messageBundles, String fileSuffix, ServletContext servletContext) { Set<String> availableLocaleSuffixes = new HashSet<>(); Locale[] availableLocales = Locale.getAvailableLocales(); String[] msgBundleArray = messageBundles.split("\\|"); for (St...
static List<String> function(String messageBundles, String fileSuffix, ServletContext servletContext) { Set<String> availableLocaleSuffixes = new HashSet<>(); Locale[] availableLocales = Locale.getAvailableLocales(); String[] msgBundleArray = messageBundles.split(STR); for (String messageBundle : msgBundleArray) { addS...
/** * Returns the list of available locale suffixes for a message resource * bundle * * @param messageBundles * the message bundles * @param fileSuffix * the file suffix * @param servletContext * the servlet context * @return the list of available locale suffixes fo...
Returns the list of available locale suffixes for a message resource bundle
getAvailableLocaleSuffixes
{ "repo_name": "davidwebster48/jawr-main-repo", "path": "jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/locale/LocaleUtils.java", "license": "apache-2.0", "size": 12096 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Locale", "java.util.Set", "javax.servlet.ServletContext" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Set; import javax.servlet.ServletContext;
import java.util.*; import javax.servlet.*;
[ "java.util", "javax.servlet" ]
java.util; javax.servlet;
1,671,829
HttpFuture httpFuture = asyncHttpService.doGet( createBaseUriBuilder( containerSecurityBaseUrl + imagesUrl + "/list" ).build() ); return httpFuture.getAsType( new TypeReference<List<CsContainerImage>>() {} ); }
HttpFuture httpFuture = asyncHttpService.doGet( createBaseUriBuilder( containerSecurityBaseUrl + imagesUrl + "/list" ).build() ); return httpFuture.getAsType( new TypeReference<List<CsContainerImage>>() {} ); }
/** * Gets the list of container images. * * @return the list of container images * @throws TenableIoException the tenable io exception */
Gets the list of container images
list
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/containerSecurity/CsImagesApi.java", "license": "mit", "size": 1945 }
[ "com.fasterxml.jackson.core.type.TypeReference", "com.tenable.io.api.containerSecurity.models.CsContainerImage", "com.tenable.io.core.services.HttpFuture", "java.util.List" ]
import com.fasterxml.jackson.core.type.TypeReference; import com.tenable.io.api.containerSecurity.models.CsContainerImage; import com.tenable.io.core.services.HttpFuture; import java.util.List;
import com.fasterxml.jackson.core.type.*; import com.tenable.io.api.*; import com.tenable.io.core.services.*; import java.util.*;
[ "com.fasterxml.jackson", "com.tenable.io", "java.util" ]
com.fasterxml.jackson; com.tenable.io; java.util;
1,520,317
@Description("The total number of sessions that have been created") public long getSessionCreateCountTotal();
@Description(STR) long function();
/** * Returns the count of sessions created */
Returns the count of sessions created
getSessionCreateCountTotal
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/management/server/SessionManagerMXBean.java", "license": "gpl-2.0", "size": 6831 }
[ "com.caucho.jmx.Description" ]
import com.caucho.jmx.Description;
import com.caucho.jmx.*;
[ "com.caucho.jmx" ]
com.caucho.jmx;
824,095
@Test public void testUpdateChannelBeforeRequest() throws Exception { SingleInputGate inputGate = new SingleInputGate( "t1", new JobID(), new IntermediateDataSetID(), ResultPartitionType.PIPELINED, 0, 1, mock(TaskActions.class), new UnregisteredTaskMetricsGroup.DummyTaskIOMetricGroup()); R...
void function() throws Exception { SingleInputGate inputGate = new SingleInputGate( "t1", new JobID(), new IntermediateDataSetID(), ResultPartitionType.PIPELINED, 0, 1, mock(TaskActions.class), new UnregisteredTaskMetricsGroup.DummyTaskIOMetricGroup()); ResultPartitionManager partitionManager = mock(ResultPartitionMana...
/** * Tests that an update channel does not trigger a partition request before the UDF has * requested any partitions. Otherwise, this can lead to races when registering a listener at * the gate (e.g. in UnionInputGate), which can result in missed buffer notifications at the * listener. */
Tests that an update channel does not trigger a partition request before the UDF has requested any partitions. Otherwise, this can lead to races when registering a listener at the gate (e.g. in UnionInputGate), which can result in missed buffer notifications at the listener
testUpdateChannelBeforeRequest
{ "repo_name": "DieBauer/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateTest.java", "license": "apache-2.0", "size": 15120 }
[ "org.apache.flink.api.common.JobID", "org.apache.flink.runtime.deployment.InputChannelDeploymentDescriptor", "org.apache.flink.runtime.deployment.ResultPartitionLocation", "org.apache.flink.runtime.io.network.LocalConnectionManager", "org.apache.flink.runtime.io.network.TaskEventDispatcher", "org.apache.f...
import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.deployment.InputChannelDeploymentDescriptor; import org.apache.flink.runtime.deployment.ResultPartitionLocation; import org.apache.flink.runtime.io.network.LocalConnectionManager; import org.apache.flink.runtime.io.network.TaskEventDispatcher; im...
import org.apache.flink.api.common.*; import org.apache.flink.runtime.deployment.*; import org.apache.flink.runtime.io.network.*; import org.apache.flink.runtime.io.network.buffer.*; import org.apache.flink.runtime.io.network.partition.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.opera...
[ "org.apache.flink", "org.mockito" ]
org.apache.flink; org.mockito;
1,217,583
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String applicationGatewayName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); }
/** * Deletes the specified application gateway. * * @param resourceGroupName The name of the resource group. * @param applicationGatewayName The name of the application gateway. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws Illegal...
Deletes the specified application gateway
beginDeleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/implementation/ApplicationGatewaysInner.java", "license": "mit", "size": 183090 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,491,267
public void arcade(double forward, double rotation) { forward = MathUtils.clamp(forward, -1.0, 1.0); rotation = MathUtils.clamp(rotation, -1.0, 1.0); // setMotors(forward - rotation); setMotors(forward + rotation, forward - rotation); }
void function(double forward, double rotation) { forward = MathUtils.clamp(forward, -1.0, 1.0); rotation = MathUtils.clamp(rotation, -1.0, 1.0); setMotors(forward + rotation, forward - rotation); }
/** * Arcade drive implements single stick driving. This function lets you directly * provide joystick values from any source. * * @param forward The value to use for forwards/backwards * @param rotation The value to use for the rotate right/left */
Arcade drive implements single stick driving. This function lets you directly provide joystick values from any source
arcade
{ "repo_name": "robolib/robolibj", "path": "src/io/github/robolib/module/actuator/DriveBase.java", "license": "mit", "size": 19864 }
[ "io.github.robolib.util.MathUtils" ]
import io.github.robolib.util.MathUtils;
import io.github.robolib.util.*;
[ "io.github.robolib" ]
io.github.robolib;
721,994
private boolean isPerspectiveMaximized(JsonObject partStacksState) { for (String partStackType : partStacksState.keys()) { JsonObject partStackState = partStacksState.getObject(partStackType); if (partStackState.hasKey("STATE") && PartStack.State.MAXIMIZED.name().equals(partStackState.getStr...
boolean function(JsonObject partStacksState) { for (String partStackType : partStacksState.keys()) { JsonObject partStackState = partStacksState.getObject(partStackType); if (partStackState.hasKey("STATE") && PartStack.State.MAXIMIZED.name().equals(partStackState.getString("STATE"))) { return true; } } return false; }
/** * Determines whether perspective is maximized. * * @param partStacksState part stack state * @return <b>true</b> is perspective has maximized part stack */
Determines whether perspective is maximized
isPerspectiveMaximized
{ "repo_name": "sudaraka94/che", "path": "ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/perspectives/general/AbstractPerspective.java", "license": "epl-1.0", "size": 15417 }
[ "org.eclipse.che.ide.api.parts.PartStack" ]
import org.eclipse.che.ide.api.parts.PartStack;
import org.eclipse.che.ide.api.parts.*;
[ "org.eclipse.che" ]
org.eclipse.che;
787,665
PagedIterable<IngestionSetting> list();
PagedIterable<IngestionSetting> list();
/** * Settings for ingesting security data and logs to correlate with resources associated with the subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the re...
Settings for ingesting security data and logs to correlate with resources associated with the subscription
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/IngestionSettings.java", "license": "mit", "size": 9493 }
[ "com.azure.core.http.rest.PagedIterable" ]
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
1,563,762
@SuppressWarnings("unchecked") private ListModel<Object> getSubModel(String inputText) { List<Object> result = new ArrayList<>(); final ListModel finderModel = finder.getModel(); for (int i = 0; i < finderModel.getSize(); i++) { Object obj = finderModel.getElementAt(i); ...
@SuppressWarnings(STR) ListModel<Object> function(String inputText) { List<Object> result = new ArrayList<>(); final ListModel finderModel = finder.getModel(); for (int i = 0; i < finderModel.getSize(); i++) { Object obj = finderModel.getElementAt(i); if (finder.entryMatchesText(obj, inputText)) { result.add(obj); } } ...
/** * Find {@link Label} which name or type start with prefix. * * @param inputText */
Find <code>Label</code> which name or type start with prefix
getSubModel
{ "repo_name": "PaulLuchyn/libreplan", "path": "libreplan-webapp/src/main/java/org/libreplan/web/common/components/bandboxsearch/BandboxSearch.java", "license": "agpl-3.0", "size": 10445 }
[ "java.util.ArrayList", "java.util.List", "org.zkoss.zul.ListModel", "org.zkoss.zul.SimpleListModel" ]
import java.util.ArrayList; import java.util.List; import org.zkoss.zul.ListModel; import org.zkoss.zul.SimpleListModel;
import java.util.*; import org.zkoss.zul.*;
[ "java.util", "org.zkoss.zul" ]
java.util; org.zkoss.zul;
2,389,357
public int insertNewUserProcess(int id, int storyId, int save_point) { ContentValues cv = new ContentValues(); cv.put("id_user",id); cv.put("story_id", storyId); cv.put("save_point", save_point); return (int) db.insert(USER_PROCESS_TABLE, null,cv); }
int function(int id, int storyId, int save_point) { ContentValues cv = new ContentValues(); cv.put(STR,id); cv.put(STR, storyId); cv.put(STR, save_point); return (int) db.insert(USER_PROCESS_TABLE, null,cv); }
/** * Save the process of a new user * @param id * @param selectedHistory * @param save_point * @return the row ID of the newly inserted row, or -1 if an error */
Save the process of a new user
insertNewUserProcess
{ "repo_name": "Anparejo/DAM", "path": "MathGame/src/com/project/mathgame/model/UserDAO.java", "license": "gpl-2.0", "size": 4880 }
[ "android.content.ContentValues" ]
import android.content.ContentValues;
import android.content.*;
[ "android.content" ]
android.content;
2,745,931
final String stringProjectID = Integer.toString(projectID); final Properties param = new Properties(); param.setProperty(Pages.PARAM_PROJECT_ID, stringProjectID); lnkDelete.setParameters(param); lnkEdit.setParameters(param); // Variable final Properties variablesParam = new Properties(); va...
final String stringProjectID = Integer.toString(projectID); final Properties param = new Properties(); param.setProperty(Pages.PARAM_PROJECT_ID, stringProjectID); lnkDelete.setParameters(param); lnkEdit.setParameters(param); final Properties variablesParam = new Properties(); variablesParam.setProperty(Pages.PARAM_VARI...
/** * Sets project ID * * @param projectID to set */
Sets project ID
setProjectID
{ "repo_name": "simeshev/parabuild-ci", "path": "src/org/parabuild/ci/webui/admin/project/ProjectCommandsFlow.java", "license": "lgpl-3.0", "size": 2382 }
[ "java.util.Properties", "org.parabuild.ci.object.StartParameter", "org.parabuild.ci.webui.common.Pages" ]
import java.util.Properties; import org.parabuild.ci.object.StartParameter; import org.parabuild.ci.webui.common.Pages;
import java.util.*; import org.parabuild.ci.object.*; import org.parabuild.ci.webui.common.*;
[ "java.util", "org.parabuild.ci" ]
java.util; org.parabuild.ci;
274,236
Collection<Map.Entry<K, V>> entries();
Collection<Map.Entry<K, V>> entries();
/** * Returns a view collection of all key-value pairs contained in this * multimap, as {@link Map.Entry} instances. * * <p>Changes to the returned collection or the entries it contains will * update the underlying multimap, and vice versa. However, <i>adding</i> to * the returned collection is not po...
Returns a view collection of all key-value pairs contained in this multimap, as <code>Map.Entry</code> instances. Changes to the returned collection or the entries it contains will update the underlying multimap, and vice versa. However, adding to the returned collection is not possible
entries
{ "repo_name": "DavesMan/guava", "path": "android/guava/src/com/google/common/collect/Multimap.java", "license": "apache-2.0", "size": 15406 }
[ "java.util.Collection", "java.util.Map" ]
import java.util.Collection; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,007,242
public static Properties loadProperties(Path path) { return loadProperties(path, new Properties()); }
static Properties function(Path path) { return loadProperties(path, new Properties()); }
/** * Loads the properties file. * * @param path the path to the property file. * @return the properties. */
Loads the properties file
loadProperties
{ "repo_name": "lorislab/mechanic", "path": "mechanic/src/main/java/org/lorislab/mechanic/util/FileUtil.java", "license": "apache-2.0", "size": 2123 }
[ "java.nio.file.Path", "java.util.Properties" ]
import java.nio.file.Path; import java.util.Properties;
import java.nio.file.*; import java.util.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
2,638,495
public void commit() throws SQLException { synchronized (getConnectionMutex()) { checkClosed(); try { if (this.connectionLifecycleInterceptors != null) { IterateBlock<Extension> iter = new IterateBlock<Extension>(this.connectionLifecycleIntercepto...
void function() throws SQLException { synchronized (getConnectionMutex()) { checkClosed(); try { if (this.connectionLifecycleInterceptors != null) { IterateBlock<Extension> iter = new IterateBlock<Extension>(this.connectionLifecycleInterceptors.iterator()) {
/** * The method commit() makes all changes made since the previous * commit/rollback permanent and releases any database locks currently held * by the Connection. This method should only be used when auto-commit has * been disabled. * <p> * <b>Note:</b> MySQL does not support transactions...
The method commit() makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection. This method should only be used when auto-commit has been disabled. Note: MySQL does not support transactions, so this method is a no-op.
commit
{ "repo_name": "mwaylabs/mysql-connector-j", "path": "src/com/mysql/jdbc/ConnectionImpl.java", "license": "gpl-2.0", "size": 217278 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,833,569
public List<String> getPossibibleSubTypesList(String companyName) throws BadRequestException{ Map<String, Object> params = new HashMap<String, Object>(); String[] fields = new String[] {"q.enriched.url.enrichedTitle.entities.entity.text", "q.enriched.url.enrichedTitle.entities.entity.disa...
List<String> function(String companyName) throws BadRequestException{ Map<String, Object> params = new HashMap<String, Object>(); String[] fields = new String[] {STR, STR, STR}; params.put(AlchemyDataNews.RETURN, StringUtils.join(fields, ",")); params.put(AlchemyDataNews.START, STR); params.put(AlchemyDataNews.END, "no...
/** * Get industries of a company * * @param comapanyName - company name * @return list of possible industries of a company */
Get industries of a company
getPossibibleSubTypesList
{ "repo_name": "alexbtk/amos-ss16-proj9", "path": "src/main/java/AMOSAlchemy/AlchemyNewsImpl.java", "license": "agpl-3.0", "size": 10684 }
[ "com.ibm.watson.developer_cloud.alchemy.v1.AlchemyDataNews", "com.ibm.watson.developer_cloud.alchemy.v1.model.Document", "com.ibm.watson.developer_cloud.alchemy.v1.model.Documents", "com.ibm.watson.developer_cloud.alchemy.v1.model.DocumentsResult", "com.ibm.watson.developer_cloud.alchemy.v1.model.Entity", ...
import com.ibm.watson.developer_cloud.alchemy.v1.AlchemyDataNews; import com.ibm.watson.developer_cloud.alchemy.v1.model.Document; import com.ibm.watson.developer_cloud.alchemy.v1.model.Documents; import com.ibm.watson.developer_cloud.alchemy.v1.model.DocumentsResult; import com.ibm.watson.developer_cloud.alchemy.v1.mo...
import com.ibm.watson.developer_cloud.alchemy.v1.*; import com.ibm.watson.developer_cloud.alchemy.v1.model.*; import com.ibm.watson.developer_cloud.service.*; import java.util.*; import org.apache.commons.lang3.*;
[ "com.ibm.watson", "java.util", "org.apache.commons" ]
com.ibm.watson; java.util; org.apache.commons;
284,122
public static void writeLine(PrintWriter out, String line) { out.write(line + "\r\n"); out.flush(); }
static void function(PrintWriter out, String line) { out.write(line + "\r\n"); out.flush(); }
/** * Writes to the output buffer */
Writes to the output buffer
writeLine
{ "repo_name": "DIUNIPI-ISTI/ConvertCsvToXes", "path": "ProM/src-Contexts/org/processmining/contexts/distributed/remote/TransferHelpFunctions.java", "license": "gpl-2.0", "size": 3092 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,829,309
public List<Group> getDirectSubGroups(Connection c, int groupId) throws AdminException { ResultSet rs = null; PreparedStatement statement = null; List<Group> theResult = new ArrayList<Group>(); String theQuery = "select " + getColumns() + " from " + drvSettings.getGroupTableName() + " wh...
List<Group> function(Connection c, int groupId) throws AdminException { ResultSet rs = null; PreparedStatement statement = null; List<Group> theResult = new ArrayList<Group>(); String theQuery = STR + getColumns() + STR + drvSettings.getGroupTableName() + STR + drvSettings.getGroupParentIdColumnName(); try { if (groupI...
/** * Returns the User whith the given id. */
Returns the User whith the given id
getDirectSubGroups
{ "repo_name": "CecileBONIN/Silverpeas-Core", "path": "lib-core/src/main/java/com/stratelia/silverpeas/domains/sqldriver/SQLGroupTable.java", "license": "agpl-3.0", "size": 9502 }
[ "com.stratelia.silverpeas.silvertrace.SilverTrace", "com.stratelia.webactiv.beans.admin.AdminException", "com.stratelia.webactiv.beans.admin.Group", "com.stratelia.webactiv.util.DBUtil", "com.stratelia.webactiv.util.exception.SilverpeasException", "java.sql.Connection", "java.sql.PreparedStatement", "...
import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.beans.admin.AdminException; import com.stratelia.webactiv.beans.admin.Group; import com.stratelia.webactiv.util.DBUtil; import com.stratelia.webactiv.util.exception.SilverpeasException; import java.sql.Connection; import java.sql.Pre...
import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.beans.admin.*; import com.stratelia.webactiv.util.*; import com.stratelia.webactiv.util.exception.*; import java.sql.*; import java.util.*;
[ "com.stratelia.silverpeas", "com.stratelia.webactiv", "java.sql", "java.util" ]
com.stratelia.silverpeas; com.stratelia.webactiv; java.sql; java.util;
2,212,259
public List<Map<String, Object>> getUserQueueUtilizationData( String queueName, Cluster cluster, String stat, String duration, String rangeFrom, String rangeTo, ClusterAnalysisMetrics metrics, RMCommunicator rmCommunicator) throws Exception { InfluxDBConf configuration = AdminConfigurationUtil.getInfluxd...
List<Map<String, Object>> function( String queueName, Cluster cluster, String stat, String duration, String rangeFrom, String rangeTo, ClusterAnalysisMetrics metrics, RMCommunicator rmCommunicator) throws Exception { InfluxDBConf configuration = AdminConfigurationUtil.getInfluxdbConfiguration(cluster.getClusterName());...
/** * It fetches user queue utilization data from influxdb * * @param queueName * @param clusterName * @param stat * @param duration * @param rangeFrom * @param rangeTo * @param metrics * @param rmCommunicator * @return * @throws Exception */
It fetches user queue utilization data from influxdb
getUserQueueUtilizationData
{ "repo_name": "impetus-opensource/jumbune", "path": "web/src/main/java/org/jumbune/web/utils/YarnQueuesUtils.java", "license": "lgpl-3.0", "size": 24544 }
[ "java.util.Collections", "java.util.List", "java.util.Map", "org.jumbune.clusteranalysis.yarn.ClusterAnalysisMetrics", "org.jumbune.common.beans.cluster.Cluster", "org.jumbune.common.influxdb.InfluxDBUtil", "org.jumbune.common.influxdb.InfluxDataReader", "org.jumbune.common.influxdb.beans.InfluxDBCons...
import java.util.Collections; import java.util.List; import java.util.Map; import org.jumbune.clusteranalysis.yarn.ClusterAnalysisMetrics; import org.jumbune.common.beans.cluster.Cluster; import org.jumbune.common.influxdb.InfluxDBUtil; import org.jumbune.common.influxdb.InfluxDataReader; import org.jumbune.common.infl...
import java.util.*; import org.jumbune.clusteranalysis.yarn.*; import org.jumbune.common.beans.cluster.*; import org.jumbune.common.influxdb.*; import org.jumbune.common.influxdb.beans.*; import org.jumbune.utils.conf.*; import org.jumbune.utils.conf.beans.*; import org.jumbune.utils.yarn.communicators.*;
[ "java.util", "org.jumbune.clusteranalysis", "org.jumbune.common", "org.jumbune.utils" ]
java.util; org.jumbune.clusteranalysis; org.jumbune.common; org.jumbune.utils;
843,306
private Set<RegionCoordinates> getViewableRegions(Position position) { // TODO possibly more complicated than this RegionCoordinates local = position.getRegionCoordinates(); int localX = local.getX(), localY = local.getY(); int maxX = localX + VIEWABLE_REGION_RADIUS, maxY = localY + VIEWABLE_REGION_RADIUS; ...
Set<RegionCoordinates> function(Position position) { RegionCoordinates local = position.getRegionCoordinates(); int localX = local.getX(), localY = local.getY(); int maxX = localX + VIEWABLE_REGION_RADIUS, maxY = localY + VIEWABLE_REGION_RADIUS; Set<RegionCoordinates> viewable = new HashSet<>(); for (int x = localX - V...
/** * Gets the {@link Set} of {@link RegionCoordinates} of Regions that are viewable from the specified {@link * Position}. * * @param position The Position. * @return The Set of RegionCoordinates. */
Gets the <code>Set</code> of <code>RegionCoordinates</code> of Regions that are viewable from the specified <code>Position</code>
getViewableRegions
{ "repo_name": "LegendSky/apollo", "path": "game/src/main/org/apollo/game/sync/task/PrePlayerSynchronizationTask.java", "license": "isc", "size": 5446 }
[ "java.util.HashSet", "java.util.Set", "org.apollo.game.model.Position", "org.apollo.game.model.area.RegionCoordinates" ]
import java.util.HashSet; import java.util.Set; import org.apollo.game.model.Position; import org.apollo.game.model.area.RegionCoordinates;
import java.util.*; import org.apollo.game.model.*; import org.apollo.game.model.area.*;
[ "java.util", "org.apollo.game" ]
java.util; org.apollo.game;
614,388
private void onQueryUpdated(@NonNull final SparseIntArray attrCount) { updateAttributeTypeButton(tagTypeButton, attrCount, AttributeType.TAG); updateAttributeTypeButton(artistTypeButton, attrCount, AttributeType.ARTIST, AttributeType.CIRCLE); updateAttributeTypeButton(seriesTypeButton, attrC...
void function(@NonNull final SparseIntArray attrCount) { updateAttributeTypeButton(tagTypeButton, attrCount, AttributeType.TAG); updateAttributeTypeButton(artistTypeButton, attrCount, AttributeType.ARTIST, AttributeType.CIRCLE); updateAttributeTypeButton(seriesTypeButton, attrCount, AttributeType.SERIE); updateAttribut...
/** * Observer for changes in the entry count inside each attribute type * * @param attrCount Entry count in every attribute type (key = attribute type code; value = count) */
Observer for changes in the entry count inside each attribute type
onQueryUpdated
{ "repo_name": "AVnetWS/Hentoid", "path": "app/src/main/java/me/devsaki/hentoid/activities/SearchActivity.java", "license": "apache-2.0", "size": 11121 }
[ "android.util.SparseIntArray", "androidx.annotation.NonNull", "me.devsaki.hentoid.enums.AttributeType" ]
import android.util.SparseIntArray; import androidx.annotation.NonNull; import me.devsaki.hentoid.enums.AttributeType;
import android.util.*; import androidx.annotation.*; import me.devsaki.hentoid.enums.*;
[ "android.util", "androidx.annotation", "me.devsaki.hentoid" ]
android.util; androidx.annotation; me.devsaki.hentoid;
2,125,487
public NamingEnumeration searchOneLevel(Name Searchbase, String filter, int limit, int timeout, String[] returnAttributes) { Name searchbase = preParse(Searchbase); if (ctx == null) { error("Null Directory Context\n in BasicOps.searchOne...
NamingEnumeration function(Name Searchbase, String filter, int limit, int timeout, String[] returnAttributes) { Name searchbase = preParse(Searchbase); if (ctx == null) { error(STR, null); return null; } if (returnAttributes != null && returnAttributes.length == 0) returnAttributes = new String[] {STR}; try { return ra...
/** * Performs a one-level directory search (i.e. a search of immediate children) * * @param Searchbase the domain name (relative to initial context in ldap) to seach from. * @param filter the non-null filter to use for the search * @param limit the maximum number of results to ret...
Performs a one-level directory search (i.e. a search of immediate children)
searchOneLevel
{ "repo_name": "idega/com.idega.block.ldap", "path": "src/java/com/idega/core/ldap/client/jndi/BasicOps.java", "license": "gpl-3.0", "size": 48723 }
[ "java.util.logging.Level", "javax.naming.Name", "javax.naming.NamingEnumeration", "javax.naming.NamingException" ]
import java.util.logging.Level; import javax.naming.Name; import javax.naming.NamingEnumeration; import javax.naming.NamingException;
import java.util.logging.*; import javax.naming.*;
[ "java.util", "javax.naming" ]
java.util; javax.naming;
1,492,809
String getPresetContractKeyContractOption(Contract contract);
String getPresetContractKeyContractOption(Contract contract);
/** * The contract may have been created with preset functionalities. In this * case, the key of the preset contract is kept as a contract option and this * method extract the value of this option from the option set * * @param contract * @return the presetContractKey */
The contract may have been created with preset functionalities. In this case, the key of the preset contract is kept as a contract option and this method extract the value of this option from the option set
getPresetContractKeyContractOption
{ "repo_name": "medsob/Tanaguru", "path": "web-app/tgol-api/src/main/java/org/tanaguru/webapp/entity/service/contract/ContractDataService.java", "license": "agpl-3.0", "size": 2352 }
[ "org.tanaguru.webapp.entity.contract.Contract" ]
import org.tanaguru.webapp.entity.contract.Contract;
import org.tanaguru.webapp.entity.contract.*;
[ "org.tanaguru.webapp" ]
org.tanaguru.webapp;
2,889,434
public void removeRunning(Request request) { running.remove(request); runningGroups.get(getGroupOf(request)).remove(request); }
void function(Request request) { running.remove(request); runningGroups.get(getGroupOf(request)).remove(request); }
/** * Removes a request from the set of running requests. Called from a service when a request has finished serving. * @param request */
Removes a request from the set of running requests. Called from a service when a request has finished serving
removeRunning
{ "repo_name": "moliva/proactive", "path": "src/Core/org/objectweb/proactive/multiactivity/compatibility/CompatibilityTracker.java", "license": "agpl-3.0", "size": 4759 }
[ "org.objectweb.proactive.core.body.request.Request" ]
import org.objectweb.proactive.core.body.request.Request;
import org.objectweb.proactive.core.body.request.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
616,334
public String saveFileDialog(Stage stage) { FileChooser fileChooser = new FileChooser(); fileChooser.setTitle("Save Ganttish Diagram"); fileChooser.getExtensionFilters().add(pngExtension); File path = fileChooser.showSaveDialog(stage); return path.getAbsolutePath(); }
String function(Stage stage) { FileChooser fileChooser = new FileChooser(); fileChooser.setTitle(STR); fileChooser.getExtensionFilters().add(pngExtension); File path = fileChooser.showSaveDialog(stage); return path.getAbsolutePath(); }
/** * Displays a file dialog for saving a .png file * * @return String path */
Displays a file dialog for saving a .png file
saveFileDialog
{ "repo_name": "aar118/RaiderPlanner", "path": "src/edu/wright/cs/raiderplanner/view/UIManager.java", "license": "gpl-3.0", "size": 19345 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
127,695
public CompilerToolkit getCompiler() { return compiler; }
CompilerToolkit function() { return compiler; }
/** * Returns the current session compiler. * @return the current session compiler */
Returns the current session compiler
getCompiler
{ "repo_name": "ashigeru/asakusafw", "path": "testing-project/asakusa-test-driver/src/test/java/com/asakusafw/testdriver/TempopraryCompiler.java", "license": "apache-2.0", "size": 3339 }
[ "com.asakusafw.testdriver.compiler.CompilerToolkit" ]
import com.asakusafw.testdriver.compiler.CompilerToolkit;
import com.asakusafw.testdriver.compiler.*;
[ "com.asakusafw.testdriver" ]
com.asakusafw.testdriver;
27,251
protected Flow lookupFlowConstruct(String name) { return (Flow) AbstractMuleTestCase.muleContext.getRegistry().lookupFlowConstruct( name); }
Flow function(String name) { return (Flow) AbstractMuleTestCase.muleContext.getRegistry().lookupFlowConstruct( name); }
/** * Retrieve a flow by name from the registry * * @param name Name of the flow to retrieve */
Retrieve a flow by name from the registry
lookupFlowConstruct
{ "repo_name": "tiry/nuxeo-mule-connector", "path": "src/test/java/org/nuxeo/mule/NuxeoConnectorTest.java", "license": "lgpl-2.1", "size": 7306 }
[ "org.mule.construct.Flow", "org.mule.tck.AbstractMuleTestCase" ]
import org.mule.construct.Flow; import org.mule.tck.AbstractMuleTestCase;
import org.mule.construct.*; import org.mule.tck.*;
[ "org.mule.construct", "org.mule.tck" ]
org.mule.construct; org.mule.tck;
2,430,127
public static Map<String, Map<String, InetSocketAddress>> getHaNnRpcAddresses( Configuration conf) { return getAddresses(conf, null, DFSConfigKeys.DFS_NAMENODE_RPC_ADDRESS_KEY); }
static Map<String, Map<String, InetSocketAddress>> function( Configuration conf) { return getAddresses(conf, null, DFSConfigKeys.DFS_NAMENODE_RPC_ADDRESS_KEY); }
/** * Returns list of InetSocketAddress corresponding to HA NN RPC addresses from * the configuration. * * @param conf configuration * @return list of InetSocketAddresses */
Returns list of InetSocketAddress corresponding to HA NN RPC addresses from the configuration
getHaNnRpcAddresses
{ "repo_name": "Wajihulhassan/Hadoop-2.7.0", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java", "license": "apache-2.0", "size": 69832 }
[ "java.net.InetSocketAddress", "java.util.Map", "org.apache.hadoop.conf.Configuration" ]
import java.net.InetSocketAddress; import java.util.Map; import org.apache.hadoop.conf.Configuration;
import java.net.*; import java.util.*; import org.apache.hadoop.conf.*;
[ "java.net", "java.util", "org.apache.hadoop" ]
java.net; java.util; org.apache.hadoop;
2,653,960
@Override public void onBackPressed() { Log.d(ContentListActivity.class.getName(), "onBackPressed() CurrentPosition: " + navigator.getCurrentPosition()); if(bItemAdapter != null){ bItemAdapter.cancelRunningTasks(); } String currentObjectId = navigator.getCurrentPositi...
void function() { Log.d(ContentListActivity.class.getName(), STR + navigator.getCurrentPosition()); if(bItemAdapter != null){ bItemAdapter.cancelRunningTasks(); } String currentObjectId = navigator.getCurrentPosition() == null ? Navigator.ITEM_ROOT_OBJECT_ID : navigator.getCurrentPosition().getObjectId(); if (Navigator...
/** * Stepps 'up' in the folder hierarchy or closes App if on device level. */
Stepps 'up' in the folder hierarchy or closes App if on device level
onBackPressed
{ "repo_name": "z7z8th/yaacc", "path": "yaacc/src/de/yaacc/browser/ContentListActivity.java", "license": "gpl-3.0", "size": 10128 }
[ "android.util.Log", "android.widget.ListView" ]
import android.util.Log; import android.widget.ListView;
import android.util.*; import android.widget.*;
[ "android.util", "android.widget" ]
android.util; android.widget;
2,834,927
void enterImportSpec(@NotNull GolangParser.ImportSpecContext ctx); void exitImportSpec(@NotNull GolangParser.ImportSpecContext ctx);
void enterImportSpec(@NotNull GolangParser.ImportSpecContext ctx); void exitImportSpec(@NotNull GolangParser.ImportSpecContext ctx);
/** * Exit a parse tree produced by {@link GolangParser#importSpec}. * @param ctx the parse tree */
Exit a parse tree produced by <code>GolangParser#importSpec</code>
exitImportSpec
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/GolangListener.java", "license": "gpl-3.0", "size": 35467 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,315,742
@Override public int getItemEnchantability(ItemStack itemStack) { return this.getMaterial(itemStack).getEnchantability(); }
int function(ItemStack itemStack) { return this.getMaterial(itemStack).getEnchantability(); }
/** * Return the enchantability factor of the item, most of the time is based on material. */
Return the enchantability factor of the item, most of the time is based on material
getItemEnchantability
{ "repo_name": "SneakingShadow/BVKS", "path": "src/main/java/com/sneakingshadow/bvks/item/ItemHammer.java", "license": "gpl-3.0", "size": 3002 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
2,034,978
private static void attachSrcref(RSyntaxElement syntaxElement, Object serObj, State state) { SourceSection ss = getFileSourceSection(syntaxElement); if (ss != null && serObj instanceof RAttributable) { String pathInternal = RSource.getPathInternal(ss.getSource()); // do this...
static void function(RSyntaxElement syntaxElement, Object serObj, State state) { SourceSection ss = getFileSourceSection(syntaxElement); if (ss != null && serObj instanceof RAttributable) { String pathInternal = RSource.getPathInternal(ss.getSource()); RContext ctx = state.getContext(); TruffleFile relPath = relativize...
/** * Converts the source section from the syntax element to a srcref attribute and attaches it to * the serialization object. * * @param syntaxElement The syntax element providing the source section. * @param serObj The object to attribute (most likely a pair list). */
Converts the source section from the syntax element to a srcref attribute and attaches it to the serialization object
attachSrcref
{ "repo_name": "graalvm/fastr", "path": "com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java", "license": "gpl-2.0", "size": 128940 }
[ "com.oracle.truffle.api.TruffleFile", "com.oracle.truffle.api.source.SourceSection", "com.oracle.truffle.r.runtime.context.RContext", "com.oracle.truffle.r.runtime.data.RAttributable", "com.oracle.truffle.r.runtime.data.RList", "com.oracle.truffle.r.runtime.nodes.RSyntaxElement" ]
import com.oracle.truffle.api.TruffleFile; import com.oracle.truffle.api.source.SourceSection; import com.oracle.truffle.r.runtime.context.RContext; import com.oracle.truffle.r.runtime.data.RAttributable; import com.oracle.truffle.r.runtime.data.RList; import com.oracle.truffle.r.runtime.nodes.RSyntaxElement;
import com.oracle.truffle.api.*; import com.oracle.truffle.api.source.*; import com.oracle.truffle.r.runtime.context.*; import com.oracle.truffle.r.runtime.data.*; import com.oracle.truffle.r.runtime.nodes.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
256,867
@Test public void testGetImtu() throws Exception { ddPacket.setImtu(5); result = ddPacket.imtu(); assertThat(result, is(notNullValue())); assertThat(result, is(5)); }
void function() throws Exception { ddPacket.setImtu(5); result = ddPacket.imtu(); assertThat(result, is(notNullValue())); assertThat(result, is(5)); }
/** * Tests imtu() getter method. */
Tests imtu() getter method
testGetImtu
{ "repo_name": "sdnwiselab/onos", "path": "protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/types/DdPacketTest.java", "license": "apache-2.0", "size": 13878 }
[ "org.hamcrest.CoreMatchers", "org.hamcrest.MatcherAssert" ]
import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
63,715
JsonAdaptor decoder = new JsonAdaptor(AdaptorTestUtils.getIniFile(className, "Null"), new ColumnInfo[0]); assertEquals("null JsonObject", 0, decoder.convertJson(null).size()); }
JsonAdaptor decoder = new JsonAdaptor(AdaptorTestUtils.getIniFile(className, "Null"), new ColumnInfo[0]); assertEquals(STR, 0, decoder.convertJson(null).size()); }
/** * Test that NULL is returned if NULL JsonObject is supplied */
Test that NULL is returned if NULL JsonObject is supplied
testNull
{ "repo_name": "parstream/json", "path": "decoder/src/test/java/com/parstream/adaptor/json/test/ProcessRecordTest.java", "license": "apache-2.0", "size": 4511 }
[ "com.parstream.adaptor.json.JsonAdaptor", "com.parstream.driver.ColumnInfo", "org.junit.Assert" ]
import com.parstream.adaptor.json.JsonAdaptor; import com.parstream.driver.ColumnInfo; import org.junit.Assert;
import com.parstream.adaptor.json.*; import com.parstream.driver.*; import org.junit.*;
[ "com.parstream.adaptor", "com.parstream.driver", "org.junit" ]
com.parstream.adaptor; com.parstream.driver; org.junit;
664,768
private void handleHttpQuery(final Channel chan, final HttpRequest req) { http_rpcs_received.incrementAndGet(); final HttpQuery query = new HttpQuery(req, chan); if (req.isChunked()) { logError(query, "Received an unsupported chunked request: " + query.request()); query.badReque...
void function(final Channel chan, final HttpRequest req) { http_rpcs_received.incrementAndGet(); final HttpQuery query = new HttpQuery(req, chan); if (req.isChunked()) { logError(query, STR + query.request()); query.badRequest(STR); return; } try { final HttpRpc rpc = http_commands.get(getEndPoint(query)); if (rpc != n...
/** * Finds the right handler for an HTTP query and executes it. * @param chan The channel on which the query was received. * @param req The parsed HTTP request. */
Finds the right handler for an HTTP query and executes it
handleHttpQuery
{ "repo_name": "bikash/opentsdb", "path": "src/tsd/RpcHandler.java", "license": "gpl-3.0", "size": 19250 }
[ "org.jboss.netty.channel.Channel", "org.jboss.netty.handler.codec.http.HttpRequest" ]
import org.jboss.netty.channel.Channel; import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.channel.*; import org.jboss.netty.handler.codec.http.*;
[ "org.jboss.netty" ]
org.jboss.netty;
2,375,387
public void drawBackground(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea) { float x0 = (float) dataArea.getX(); float x1 = x0 + (float) Math.abs(this.xOffset); float x3 = (float) dataArea.getMaxX(); float x2 = x3 - (float) Math.abs(this.xOffs...
void function(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea) { float x0 = (float) dataArea.getX(); float x1 = x0 + (float) Math.abs(this.xOffset); float x3 = (float) dataArea.getMaxX(); float x2 = x3 - (float) Math.abs(this.xOffset); float y0 = (float) dataArea.getMaxY(); float y1 = y0 - (float) Math.abs(this....
/** * Draws the background for the plot. * * @param g2 the graphics device. * @param plot the plot. * @param dataArea the area inside the axes. */
Draws the background for the plot
drawBackground
{ "repo_name": "opensim-org/opensim-gui", "path": "Gui/opensim/jfreechart/src/org/jfree/chart/renderer/category/BarRenderer3D.java", "license": "apache-2.0", "size": 28796 }
[ "java.awt.AlphaComposite", "java.awt.Color", "java.awt.Composite", "java.awt.Graphics2D", "java.awt.Image", "java.awt.Paint", "java.awt.geom.GeneralPath", "java.awt.geom.Line2D", "java.awt.geom.Rectangle2D", "org.jfree.chart.plot.CategoryPlot" ]
import java.awt.AlphaComposite; import java.awt.Color; import java.awt.Composite; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Paint; import java.awt.geom.GeneralPath; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.plot.CategoryPlot;
import java.awt.*; import java.awt.geom.*; import org.jfree.chart.plot.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
690,531
@Test() public void testFailInSubsequentPreAuth() throws Exception { final InMemoryDirectoryServer ds = getTestDS(); final SingleServerSet serverSet = new SingleServerSet("127.0.0.1", ds.getListenPort()); final LDAPConnectionPool pool = new LDAPConnectionPool(serverSet, nu...
@Test() void function() throws Exception { final InMemoryDirectoryServer ds = getTestDS(); final SingleServerSet serverSet = new SingleServerSet(STR, ds.getListenPort()); final LDAPConnectionPool pool = new LDAPConnectionPool(serverSet, null, 0, 1, new AggregatePostConnectProcessor( new TestPostConnectProcessor(null, n...
/** * Tests the behavior of the aggregate post-connect processor that wraps * several post-connect processors in which the first should succeed but a * subsequent processor should fail in pre-authentication processing. * * @throws Exception If an unexpected problem occurs. */
Tests the behavior of the aggregate post-connect processor that wraps several post-connect processors in which the first should succeed but a subsequent processor should fail in pre-authentication processing
testFailInSubsequentPreAuth
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/AggregatePostConnectProcessorTestCase.java", "license": "gpl-2.0", "size": 10444 }
[ "com.unboundid.ldap.listener.InMemoryDirectoryServer", "org.testng.annotations.Test" ]
import com.unboundid.ldap.listener.InMemoryDirectoryServer; import org.testng.annotations.Test;
import com.unboundid.ldap.listener.*; import org.testng.annotations.*;
[ "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.ldap; org.testng.annotations;
1,483,409
@Nonnull public String readWriteBufferContent() throws IOException { return new String(getWriteBufferContent(), StandardCharsets.UTF_8); }
String function() throws IOException { return new String(getWriteBufferContent(), StandardCharsets.UTF_8); }
/** * Read the whole content of the write buffer as an UTF-8 String. * * @return the write buffer content as an UTF-8 string * * @throws IOException if any */
Read the whole content of the write buffer as an UTF-8 String
readWriteBufferContent
{ "repo_name": "JeanRev/TeamcityDockerCloudPlugin", "path": "server/src/test/java/run/var/teamcity/cloud/docker/client/npipe/TestPipeChannel.java", "license": "apache-2.0", "size": 5067 }
[ "java.io.IOException", "java.nio.charset.StandardCharsets" ]
import java.io.IOException; import java.nio.charset.StandardCharsets;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
311,784
public final void setAttribute(Key key, String value) { // checks if key is valid if (checkIfPropertyIsValid(key)) { // stores the value setValue(key, value); } }
final void function(Key key, String value) { if (checkIfPropertyIsValid(key)) { setValue(key, value); } }
/** * Sets a custom field to data point. * * @param key key of java script object to set. * @param value value to set. */
Sets a custom field to data point
setAttribute
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/callbacks/ChartContext.java", "license": "apache-2.0", "size": 8337 }
[ "org.pepstock.charba.client.commons.Key" ]
import org.pepstock.charba.client.commons.Key;
import org.pepstock.charba.client.commons.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
2,615,300
public static Syntax getSyntax(String syntaxName) { Syntax syntax = syntaxPool.get(syntaxName); if (syntax == null) { syntax = createSyntax(syntaxName); } return syntax; }
static Syntax function(String syntaxName) { Syntax syntax = syntaxPool.get(syntaxName); if (syntax == null) { syntax = createSyntax(syntaxName); } return syntax; }
/** * DOCUMENT ME! * * @param syntaxName DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getSyntax
{ "repo_name": "tonivade/tedit", "path": "src/tk/tomby/tedit/services/SyntaxManager.java", "license": "gpl-2.0", "size": 2511 }
[ "tk.tomby.tedit.syntax.Syntax" ]
import tk.tomby.tedit.syntax.Syntax;
import tk.tomby.tedit.syntax.*;
[ "tk.tomby.tedit" ]
tk.tomby.tedit;
2,228,238
final String incompatible(final Unit<?> that) { return Errors.format(Errors.Keys.IncompatibleUnits_2, this, that); }
final String incompatible(final Unit<?> that) { return Errors.format(Errors.Keys.IncompatibleUnits_2, this, that); }
/** * Returns the error message for an incompatible unit. */
Returns the error message for an incompatible unit
incompatible
{ "repo_name": "apache/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/measure/AbstractUnit.java", "license": "apache-2.0", "size": 22474 }
[ "javax.measure.Unit", "org.apache.sis.util.resources.Errors" ]
import javax.measure.Unit; import org.apache.sis.util.resources.Errors;
import javax.measure.*; import org.apache.sis.util.resources.*;
[ "javax.measure", "org.apache.sis" ]
javax.measure; org.apache.sis;
2,435,853
EClass getBehavioralFeatureConcept();
EClass getBehavioralFeatureConcept();
/** * Returns the meta object for class '{@link IFML.Core.BehavioralFeatureConcept <em>Behavioral Feature Concept</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Behavioral Feature Concept</em>'. * @see IFML.Core.BehavioralFeatureConcept * @generated */
Returns the meta object for class '<code>IFML.Core.BehavioralFeatureConcept Behavioral Feature Concept</code>'.
getBehavioralFeatureConcept
{ "repo_name": "ifml/ifml-editor", "path": "plugins/IFMLEditor/src/IFML/Core/CorePackage.java", "license": "mit", "size": 245317 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,546,794
public Observable<ServiceResponse<Page<VirtualNetworkRuleInner>>> listByServerSinglePageAsync(final String resourceGroupName, final String serverName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } ...
Observable<ServiceResponse<Page<VirtualNetworkRuleInner>>> function(final String resourceGroupName, final String serverName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serverName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { thro...
/** * Gets a list of virtual network rules in a server. * ServiceResponse<PageImpl1<VirtualNetworkRuleInner>> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. ServiceResponse<PageImpl1<Vir...
Gets a list of virtual network rules in a server
listByServerSinglePageAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/mysql/mgmt-v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/VirtualNetworkRulesInner.java", "license": "mit", "size": 49400 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,512,916
public static ControlInterface getControlByIdentifier(String controlIdentifier) throws DynamicExtensionsSystemException, DynamicExtensionsApplicationException { ControlInterface controlInterface = null; controlInterface = (ControlInterface) getObjectByIdentifier(ControlInterface.class .getName(), co...
static ControlInterface function(String controlIdentifier) throws DynamicExtensionsSystemException, DynamicExtensionsApplicationException { ControlInterface controlInterface = null; controlInterface = (ControlInterface) getObjectByIdentifier(ControlInterface.class .getName(), controlIdentifier); return controlInterface...
/** * This method fetches the Control instance from the Database given the corresponding Control Identifier. * @param controlIdentifier The Idetifier of the Control. * @return the ControlInterface * @throws DynamicExtensionsSystemException on System exception * @throws DynamicExtensionsApplicationExcepti...
This method fetches the Control instance from the Database given the corresponding Control Identifier
getControlByIdentifier
{ "repo_name": "NCIP/cab2b", "path": "software/dependencies/dynamicextensions/caB2B_2009_JUN_02/src/edu/common/dynamicextensions/util/DynamicExtensionsUtility.java", "license": "bsd-3-clause", "size": 35564 }
[ "edu.common.dynamicextensions.domaininterface.userinterface.ControlInterface", "edu.common.dynamicextensions.exception.DynamicExtensionsApplicationException", "edu.common.dynamicextensions.exception.DynamicExtensionsSystemException" ]
import edu.common.dynamicextensions.domaininterface.userinterface.ControlInterface; import edu.common.dynamicextensions.exception.DynamicExtensionsApplicationException; import edu.common.dynamicextensions.exception.DynamicExtensionsSystemException;
import edu.common.dynamicextensions.domaininterface.userinterface.*; import edu.common.dynamicextensions.exception.*;
[ "edu.common.dynamicextensions" ]
edu.common.dynamicextensions;
542,775
public void printLn(String s) { clearConsole(); moveUp(); String time = String.valueOf((int) Timer.getFPGATimestamp()); msg[0] = "[" + time + "] " + s; for (int i = 0; i < 6; i++) { write(LINE[i], msg[5 - i]); } driverLCD.updateL...
void function(String s) { clearConsole(); moveUp(); String time = String.valueOf((int) Timer.getFPGATimestamp()); msg[0] = "[" + time + STR + s; for (int i = 0; i < 6; i++) { write(LINE[i], msg[5 - i]); } driverLCD.updateLCD(); }
/** * Prints a message to the Driver Station LCD in a console-like manner * * @param s The String to be printed on the Driver Station */
Prints a message to the Driver Station LCD in a console-like manner
printLn
{ "repo_name": "erhs-robotics/Robo2013", "path": "src/org/erhsroboticsclub/robo2013/utilities/Messenger.java", "license": "bsd-3-clause", "size": 3136 }
[ "edu.wpi.first.wpilibj.Timer" ]
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,512,555
public static TExternalCompactionJob getRunningCompaction(HostAndPort compactorAddr, ClientContext context) { CompactorService.Client client = null; try { client = ThriftUtil.getClient(new CompactorService.Client.Factory(), compactorAddr, context); TExternalCompactionJob job = cli...
static TExternalCompactionJob function(HostAndPort compactorAddr, ClientContext context) { CompactorService.Client client = null; try { client = ThriftUtil.getClient(new CompactorService.Client.Factory(), compactorAddr, context); TExternalCompactionJob job = client.getRunningCompaction(TraceUtil.traceInfo(), context.rp...
/** * Get the compaction currently running on the Compactor * * @param compactorAddr * compactor address * @param context * context * @return external compaction job or null if none running */
Get the compaction currently running on the Compactor
getRunningCompaction
{ "repo_name": "ctubbsii/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/util/compaction/ExternalCompactionUtil.java", "license": "apache-2.0", "size": 11613 }
[ "org.apache.accumulo.core.clientImpl.ClientContext", "org.apache.accumulo.core.compaction.thrift.CompactorService", "org.apache.accumulo.core.rpc.ThriftUtil", "org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob", "org.apache.accumulo.core.trace.TraceUtil", "org.apache.accumulo.core.util.H...
import org.apache.accumulo.core.clientImpl.ClientContext; import org.apache.accumulo.core.compaction.thrift.CompactorService; import org.apache.accumulo.core.rpc.ThriftUtil; import org.apache.accumulo.core.tabletserver.thrift.TExternalCompactionJob; import org.apache.accumulo.core.trace.TraceUtil; import org.apache.acc...
import org.apache.accumulo.core.*; import org.apache.accumulo.core.compaction.thrift.*; import org.apache.accumulo.core.rpc.*; import org.apache.accumulo.core.tabletserver.thrift.*; import org.apache.accumulo.core.trace.*; import org.apache.accumulo.core.util.*; import org.apache.thrift.*;
[ "org.apache.accumulo", "org.apache.thrift" ]
org.apache.accumulo; org.apache.thrift;
2,488,626
public byte[] getHelloBodyAsByteArray() { List<Byte> bodyLst = new ArrayList<>(); try { bodyLst.addAll(Bytes.asList(this.networkMask().toOctets())); bodyLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.helloInterval()))); bodyLst.add((byte) this.options())...
byte[] function() { List<Byte> bodyLst = new ArrayList<>(); try { bodyLst.addAll(Bytes.asList(this.networkMask().toOctets())); bodyLst.addAll(Bytes.asList(OspfUtil.convertToTwoBytes(this.helloInterval()))); bodyLst.add((byte) this.options()); bodyLst.add((byte) this.routerPriority()); bodyLst.addAll(Bytes.asList(OspfUt...
/** * Gets hello body as byte array. * * @return hello body as byte array */
Gets hello body as byte array
getHelloBodyAsByteArray
{ "repo_name": "sdnwiselab/onos", "path": "protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/ospfpacket/types/HelloPacket.java", "license": "apache-2.0", "size": 11971 }
[ "com.google.common.primitives.Bytes", "java.util.ArrayList", "java.util.List", "org.onlab.packet.Ip4Address", "org.onosproject.ospf.protocol.util.OspfUtil" ]
import com.google.common.primitives.Bytes; import java.util.ArrayList; import java.util.List; import org.onlab.packet.Ip4Address; import org.onosproject.ospf.protocol.util.OspfUtil;
import com.google.common.primitives.*; import java.util.*; import org.onlab.packet.*; import org.onosproject.ospf.protocol.util.*;
[ "com.google.common", "java.util", "org.onlab.packet", "org.onosproject.ospf" ]
com.google.common; java.util; org.onlab.packet; org.onosproject.ospf;
1,763,946
public Index createIndex(boolean remotelyOriginated, IndexType indexType, String indexName, String indexedExpression, String fromClause, String imports, boolean loadEntries) throws ForceReattemptException, IndexCreationException, IndexNameConflictException, IndexExistsException { return createI...
Index function(boolean remotelyOriginated, IndexType indexType, String indexName, String indexedExpression, String fromClause, String imports, boolean loadEntries) throws ForceReattemptException, IndexCreationException, IndexNameConflictException, IndexExistsException { return createIndex(remotelyOriginated, indexType,...
/** * Creates the actual index on this partitioned regions. * * @param remotelyOriginated * true if the index is created because of a remote index * creation call * @param indexType * the type of index created. * @param indexName * ...
Creates the actual index on this partitioned regions
createIndex
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java", "license": "apache-2.0", "size": 403335 }
[ "com.gemstone.gemfire.cache.query.Index", "com.gemstone.gemfire.cache.query.IndexCreationException", "com.gemstone.gemfire.cache.query.IndexExistsException", "com.gemstone.gemfire.cache.query.IndexNameConflictException", "com.gemstone.gemfire.cache.query.IndexType" ]
import com.gemstone.gemfire.cache.query.Index; import com.gemstone.gemfire.cache.query.IndexCreationException; import com.gemstone.gemfire.cache.query.IndexExistsException; import com.gemstone.gemfire.cache.query.IndexNameConflictException; import com.gemstone.gemfire.cache.query.IndexType;
import com.gemstone.gemfire.cache.query.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
172,153
TreePath parentPath = path.getParentPath(); boolean result = true; LinkedList<Tree.Kind> queue = new LinkedList<Tree.Kind>(Arrays.asList(kinds)); Tree tree; while ((tree = parentPath.getLeaf()) != null) { if (queue.isEmpty()) break; if (tre...
TreePath parentPath = path.getParentPath(); boolean result = true; LinkedList<Tree.Kind> queue = new LinkedList<Tree.Kind>(Arrays.asList(kinds)); Tree tree; while ((tree = parentPath.getLeaf()) != null) { if (queue.isEmpty()) break; if (tree.getKind() == Tree.Kind.BLOCK tree.getKind() == Tree.Kind.PARENTHESIZED) { pare...
/** * Determines whether a tree has a particular set of direct parents, * ignoring blocks and parentheses. * * <p> * * For example, to test whether an expression (specified by {@code path}) * is immediately contained by an if statement which is immediately * contained in a method...
Determines whether a tree has a particular set of direct parents, ignoring blocks and parentheses. For example, to test whether an expression (specified by path) is immediately contained by an if statement which is immediately contained in a method, one would invoke: <code> matchParents(path, Kind.IF, Kind.METHOD) </co...
matchParents
{ "repo_name": "biddyweb/checker-framework", "path": "framework/src/org/checkerframework/framework/util/Heuristics.java", "license": "gpl-2.0", "size": 7082 }
[ "com.sun.source.tree.Tree", "com.sun.source.util.SimpleTreeVisitor", "com.sun.source.util.TreePath", "java.util.Arrays", "java.util.LinkedList" ]
import com.sun.source.tree.Tree; import com.sun.source.util.SimpleTreeVisitor; import com.sun.source.util.TreePath; import java.util.Arrays; import java.util.LinkedList;
import com.sun.source.tree.*; import com.sun.source.util.*; import java.util.*;
[ "com.sun.source", "java.util" ]
com.sun.source; java.util;
2,714,567
void updateCountForQuota(int initThreads) { writeLock(); try { int threads = (initThreads < 1) ? 1 : initThreads; LOG.info("Initializing quota with " + threads + " thread(s)"); long start = Time.monotonicNow(); QuotaCounts counts = new QuotaCounts.Builder().build(); ForkJoinPool ...
void updateCountForQuota(int initThreads) { writeLock(); try { int threads = (initThreads < 1) ? 1 : initThreads; LOG.info(STR + threads + STR); long start = Time.monotonicNow(); QuotaCounts counts = new QuotaCounts.Builder().build(); ForkJoinPool p = new ForkJoinPool(threads); RecursiveAction task = new InitQuotaTask(...
/** * Update the count of each directory with quota in the namespace. * A directory's count is defined as the total number inodes in the tree * rooted at the directory. * * This is an update of existing state of the filesystem and does not * throw QuotaExceededException. */
Update the count of each directory with quota in the namespace. A directory's count is defined as the total number inodes in the tree rooted at the directory. This is an update of existing state of the filesystem and does not throw QuotaExceededException
updateCountForQuota
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java", "license": "apache-2.0", "size": 73906 }
[ "java.util.concurrent.ForkJoinPool", "java.util.concurrent.RecursiveAction", "org.apache.hadoop.util.Time" ]
import java.util.concurrent.ForkJoinPool; import java.util.concurrent.RecursiveAction; import org.apache.hadoop.util.Time;
import java.util.concurrent.*; import org.apache.hadoop.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,894,625
public OneResponse chown(int uid, int gid) { return chown(client, id, uid, gid); }
OneResponse function(int uid, int gid) { return chown(client, id, uid, gid); }
/** * Changes the owner/group * * @param uid The new owner user ID. Set it to -1 to leave the current one. * @param gid The new group ID. Set it to -1 to leave the current one. * @return If an error occurs the error message contains the reason. */
Changes the owner/group
chown
{ "repo_name": "dberzano/opennebula-torino", "path": "src/oca/java/src/org/opennebula/client/vnet/VirtualNetwork.java", "license": "apache-2.0", "size": 17032 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
2,364,189
return !(getDuration().getEndTime().isAfter(LocalDateTime.now())); }
return !(getDuration().getEndTime().isAfter(LocalDateTime.now())); }
/** * Return if an event has passed by comparing its endTime to the current time. * @return true if event passed; false if otherwise. */
Return if an event has passed by comparing its endTime to the current time
isEventCompleted
{ "repo_name": "CS2103AUG2016-F09-C4/main", "path": "src/main/java/seedu/task/model/item/Event.java", "license": "mit", "size": 2644 }
[ "java.time.LocalDateTime" ]
import java.time.LocalDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,983,008
private void update() { // set the newly received key and motion events. synchronized (eventLock) { processedKeyEvent.addAll(keyEvent); keyEvent.clear(); processedMotionEvent.addAll(motionEvent); motionEvent.clear(); } if (previousActi...
void function() { synchronized (eventLock) { processedKeyEvent.addAll(keyEvent); keyEvent.clear(); processedMotionEvent.addAll(motionEvent); motionEvent.clear(); } if (previousActive == false && active) { activeState = ActiveState.ACTIVE_PRESSED; } else if (previousActive == true && active == false) { activeState = Act...
/** * Process the input data. */
Process the input data
update
{ "repo_name": "roshanch/GearVRf", "path": "GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCursorController.java", "license": "apache-2.0", "size": 23273 }
[ "android.view.MotionEvent" ]
import android.view.MotionEvent;
import android.view.*;
[ "android.view" ]
android.view;
1,696,831
private String squeezeText(Element node) throws Exception { Node textChild = node.getFirstChild(); return textChild.getNodeValue(); }
String function(Element node) throws Exception { Node textChild = node.getFirstChild(); return textChild.getNodeValue(); }
/** * <p> * Squeeze the text out of an Element. * </p> */
Squeeze the text out of an Element.
squeezeText
{ "repo_name": "splicemachine/spliceengine", "path": "db-build/src/main/java/com/splicemachine/derbyBuild/messages/MessageBuilder.java", "license": "agpl-3.0", "size": 12790 }
[ "org.w3c.dom.Element", "org.w3c.dom.Node" ]
import org.w3c.dom.Element; import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,862,443
Map.Entry<K, V> pollFirstEntry();
Map.Entry<K, V> pollFirstEntry();
/** * Removes and returns a key-value mapping associated with the least key in this map, or {@code null} if the map is empty. * * @return the removed first entry of this map, or {@code null} if this map is empty */
Removes and returns a key-value mapping associated with the least key in this map, or null if the map is empty
pollFirstEntry
{ "repo_name": "wouterv/orientdb", "path": "core/src/main/java/com/orientechnologies/common/collection/ONavigableMap.java", "license": "apache-2.0", "size": 14807 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,633,093
private void assertElapsed(double duration, double start) { assertEquals(duration, now() - start - 200d, 250.0); }
void function(double duration, double start) { assertEquals(duration, now() - start - 200d, 250.0); }
/** * Fails the test unless the time from start until now is duration, accepting differences in * -50..+450 milliseconds. */
Fails the test unless the time from start until now is duration, accepting differences in -50..+450 milliseconds
assertElapsed
{ "repo_name": "square/okio", "path": "okio/src/jvmTest/java/okio/WaitUntilNotifiedTest.java", "license": "apache-2.0", "size": 5153 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
724,635
@Test public void testVehicleDescription(){ assertEquals("red",user.getCar().getColor()); assertEquals("Toyota",user.getCar().getMake()); assertEquals("Corolla",user.getCar().getModel()); assertEquals(2016,user.getCar().getYear()); }
void function(){ assertEquals("red",user.getCar().getColor()); assertEquals(STR,user.getCar().getMake()); assertEquals(STR,user.getCar().getModel()); assertEquals(2016,user.getCar().getYear()); }
/** * US 1.09.01 (added 2016-11-14) As a rider, I should see a description of the driver's vehicle. */
US 1.09.01 (added 2016-11-14)
testVehicleDescription
{ "repo_name": "CMPUT301F16T11/a2b", "path": "app/src/test/java/com/cmput301f16t11/a2b/ExtraRequirementsUnitTest.java", "license": "apache-2.0", "size": 4945 }
[ "junit.framework.Assert" ]
import junit.framework.Assert;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
716,162
public List<KPTSuggestion> insertChar(char chr) { resetCoreString(); KPTParamInputInsertion insertChar = new KPTParamInputInsertion(1); insertChar.setInsertChar(chr, 0, 0); KPTStatusCode statuscode = mAdaptxtCore.KPTFwkRunCmd(KPTCmd.KPTCMD_INPUTMGR_INSERTCHAR, insertChar); ...
List<KPTSuggestion> function(char chr) { resetCoreString(); KPTParamInputInsertion insertChar = new KPTParamInputInsertion(1); insertChar.setInsertChar(chr, 0, 0); KPTStatusCode statuscode = mAdaptxtCore.KPTFwkRunCmd(KPTCmd.KPTCMD_INPUTMGR_INSERTCHAR, insertChar); if (statuscode == KPTStatusCode.KPT_SC_SUCCESS) { KPTPa...
/** * Inserts a single character into the Adaptxt engine and gets suggestions * * @param c Character to be inserted * @return List of suggestions after inserting a single character */
Inserts a single character into the Adaptxt engine and gets suggestions
insertChar
{ "repo_name": "rednoah/android-wear-keydial", "path": "watch/app/src/main/java/ntu/csie/keydial/AdaptxtCoreEngine.java", "license": "lgpl-3.0", "size": 17946 }
[ "android.util.Log", "com.kpt.adaptxt.core.coreapi.KPTCommands", "com.kpt.adaptxt.core.coreapi.KPTParamInputInsertion", "com.kpt.adaptxt.core.coreapi.KPTParamSuggestion", "com.kpt.adaptxt.core.coreapi.KPTSuggEntry", "com.kpt.adaptxt.core.coreapi.KPTTypes", "java.util.ArrayList", "java.util.List" ]
import android.util.Log; import com.kpt.adaptxt.core.coreapi.KPTCommands; import com.kpt.adaptxt.core.coreapi.KPTParamInputInsertion; import com.kpt.adaptxt.core.coreapi.KPTParamSuggestion; import com.kpt.adaptxt.core.coreapi.KPTSuggEntry; import com.kpt.adaptxt.core.coreapi.KPTTypes; import java.util.ArrayList; import...
import android.util.*; import com.kpt.adaptxt.core.coreapi.*; import java.util.*;
[ "android.util", "com.kpt.adaptxt", "java.util" ]
android.util; com.kpt.adaptxt; java.util;
635,886
public static String csvToJsonArray(String csv, String fieldSeparator) { String[] lines = csv.split(System.getProperty("line.separator")); if (lines.length == 0) return "[]"; String[] header = lines[0].split(fieldSeparator); List<JsonElement> jsonObjects = new ArrayList<...
static String function(String csv, String fieldSeparator) { String[] lines = csv.split(System.getProperty(STR)); if (lines.length == 0) return "[]"; String[] header = lines[0].split(fieldSeparator); List<JsonElement> jsonObjects = new ArrayList<>(lines.length - 1); Gson gson = new GsonBuilder().create(); Map<String, St...
/** * Turns a csv with a header row into a JSON array. * * @param csv the csv string * @param fieldSeparator the column separators * @return a String representing a JSON array */
Turns a csv with a header row into a JSON array
csvToJsonArray
{ "repo_name": "intuit/wasabi", "path": "modules/functional-test/src/main/java/com/intuit/wasabi/tests/library/util/TestUtils.java", "license": "apache-2.0", "size": 5249 }
[ "com.google.gson.Gson", "com.google.gson.GsonBuilder", "com.google.gson.JsonElement", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
import com.google.gson.*; import java.util.*;
[ "com.google.gson", "java.util" ]
com.google.gson; java.util;
2,110,894
@Override public boolean addComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (this.averageGroundLevel < 0) { this.averageGroundLevel = this.getAverageGroundLevel(par1World, par3StructureBoundingBox); if (this.averageGroundLevel < 0) { return t...
boolean function(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (this.averageGroundLevel < 0) { this.averageGroundLevel = this.getAverageGroundLevel(par1World, par3StructureBoundingBox); if (this.averageGroundLevel < 0) { return true; } this.boundingBox.offset(0, this.averageGro...
/** * second Part of Structure generating, this for example places Spiderwebs, * Mob Spawners, it closes Mineshafts at the end, it adds Fences... */
second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at the end, it adds Fences..
addComponentParts
{ "repo_name": "4Space/4-Space-1.6.4", "path": "common/mattparks/mods/space/venus/world/gen/village/GCVenusComponentVillageWoodHut.java", "license": "gpl-2.0", "size": 36164 }
[ "java.util.Random", "net.minecraft.block.Block", "net.minecraft.world.World", "net.minecraft.world.gen.structure.StructureBoundingBox" ]
import java.util.Random; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraft.world.gen.structure.StructureBoundingBox;
import java.util.*; import net.minecraft.block.*; import net.minecraft.world.*; import net.minecraft.world.gen.structure.*;
[ "java.util", "net.minecraft.block", "net.minecraft.world" ]
java.util; net.minecraft.block; net.minecraft.world;
1,269,087
static public void assertEquals(Collection<?> actual, Collection<?> expected, String message) { if(actual == expected) { return; } if (actual == null || expected == null) { if (message != null) { fail(message); } else { fail("Collections not equal: expected: " + expected...
static void function(Collection<?> actual, Collection<?> expected, String message) { if(actual == expected) { return; } if (actual == null expected == null) { if (message != null) { fail(message); } else { fail(STR + expected + STR + actual); } } assertEquals(actual.size(), expected.size(), message + STR); Iterator<?> ...
/** * Asserts that two collections contain the same elements in the same order. If they do not, * an AssertionError, with the given message, is thrown. * @param actual the actual value * @param expected the expected value * @param message the assertion error message */
Asserts that two collections contain the same elements in the same order. If they do not, an AssertionError, with the given message, is thrown
assertEquals
{ "repo_name": "tremes/testng", "path": "src/main/java/org/testng/Assert.java", "license": "apache-2.0", "size": 30824 }
[ "java.util.Collection", "java.util.Iterator" ]
import java.util.Collection; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
198,597
private void proceedPrepare(GridDistributedTxMapping m, @Nullable final Queue<GridDistributedTxMapping> mappings) { if (isDone()) return; boolean set = cctx.tm().setTxTopologyHint(tx.topologyVersionSnapshot()); try { assert !m.empty(); final ClusterNode...
void function(GridDistributedTxMapping m, @Nullable final Queue<GridDistributedTxMapping> mappings) { if (isDone()) return; boolean set = cctx.tm().setTxTopologyHint(tx.topologyVersionSnapshot()); try { assert !m.empty(); final ClusterNode n = m.primary(); long timeout = tx.remainingTime(); if (timeout != -1) { GridNea...
/** * Continues prepare after previous mapping successfully finished. * * @param m Mapping. * @param mappings Queue of mappings. */
Continues prepare after previous mapping successfully finished
proceedPrepare
{ "repo_name": "endian675/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticTxPrepareFuture.java", "license": "apache-2.0", "size": 37548 }
[ "java.util.Queue", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.IgniteInternalFuture", "org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping", "org.apache.ignite.internal.processors.cache.transactions.IgniteTxE...
import java.util.Queue; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping; import org.apache.ignite.internal.processors.cache.trans...
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.distributed.*; import org.apache.ignite.internal.processors.cache.transactions.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
2,524,797
if (timestamp < lastUpdated) { return false; } Set<MemberImpl> currentDisconnectedMembers = disconnections.get(member); if (currentDisconnectedMembers == null) { if (disconnectedMembers.isEmpty()) { return false; } currentDisconn...
if (timestamp < lastUpdated) { return false; } Set<MemberImpl> currentDisconnectedMembers = disconnections.get(member); if (currentDisconnectedMembers == null) { if (disconnectedMembers.isEmpty()) { return false; } currentDisconnectedMembers = new HashSet<>(); disconnections.put(member, currentDisconnectedMembers); } b...
/** * Updates the disconnected members set for the given member if the given * timestamp is greater than the highest observed timestamp. * * @return true if the internal disconnected members set is updated. */
Updates the disconnected members set for the given member if the given timestamp is greater than the highest observed timestamp
update
{ "repo_name": "mdogan/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/PartialDisconnectionHandler.java", "license": "apache-2.0", "size": 8444 }
[ "com.hazelcast.cluster.impl.MemberImpl", "java.util.Collections", "java.util.HashSet", "java.util.Set" ]
import com.hazelcast.cluster.impl.MemberImpl; import java.util.Collections; import java.util.HashSet; import java.util.Set;
import com.hazelcast.cluster.impl.*; import java.util.*;
[ "com.hazelcast.cluster", "java.util" ]
com.hazelcast.cluster; java.util;
1,361,994
public ArtistBio getArtistBio(MediaFile mediaFile) { return getArtistBio(getCanonicalArtistName(getArtistName(mediaFile))); }
ArtistBio function(MediaFile mediaFile) { return getArtistBio(getCanonicalArtistName(getArtistName(mediaFile))); }
/** * Returns artist bio and images. * * @param mediaFile The media file (song, album or artist). * @return Artist bio. */
Returns artist bio and images
getArtistBio
{ "repo_name": "langera/libresonic", "path": "libresonic-main/src/main/java/org/libresonic/player/service/LastFmService.java", "license": "gpl-3.0", "size": 15938 }
[ "org.libresonic.player.domain.ArtistBio", "org.libresonic.player.domain.MediaFile" ]
import org.libresonic.player.domain.ArtistBio; import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.*;
[ "org.libresonic.player" ]
org.libresonic.player;
1,247,115
public KeyedPooledObjectFactory<K, T> getFactory() { return factory; } /** * Equivalent to <code>{@link #borrowObject(Object, long) borrowObject}(key, * {@link #getMaxWaitMillis()})</code>. * <p> * {@inheritDoc}
KeyedPooledObjectFactory<K, T> function() { return factory; } /** * Equivalent to <code>{@link #borrowObject(Object, long) borrowObject}(key, * {@link #getMaxWaitMillis()})</code>. * <p> * {@inheritDoc}
/** * Obtain a reference to the factory used to create, destroy and validate * the objects used by this pool. * * @return the factory */
Obtain a reference to the factory used to create, destroy and validate the objects used by this pool
getFactory
{ "repo_name": "bbossgroups/bbossgroups-3.5", "path": "bboss-persistent/src-jdk7/com/frameworkset/commons/pool2/impl/GenericKeyedObjectPool.java", "license": "apache-2.0", "size": 57366 }
[ "com.frameworkset.commons.pool2.KeyedPooledObjectFactory" ]
import com.frameworkset.commons.pool2.KeyedPooledObjectFactory;
import com.frameworkset.commons.pool2.*;
[ "com.frameworkset.commons" ]
com.frameworkset.commons;
371,222
@Nullable public CacheObject valueBytes(@Nullable GridCacheVersion ver) throws IgniteCheckedException, GridCacheEntryRemovedException;
@Nullable CacheObject function(@Nullable GridCacheVersion ver) throws IgniteCheckedException, GridCacheEntryRemovedException;
/** * Gets cached serialized value bytes. * * @param ver Version for which to get value bytes. * @return Serialized value bytes. * @throws IgniteCheckedException If serialization failed. * @throws GridCacheEntryRemovedException If entry was removed. */
Gets cached serialized value bytes
valueBytes
{ "repo_name": "vldpyatkov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java", "license": "apache-2.0", "size": 38956 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.cache.version.GridCacheVersion", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.version.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
2,843,470
boolean publishSegments( Set<DataSegment> segments, Object commitMetadata ) throws IOException;
boolean publishSegments( Set<DataSegment> segments, Object commitMetadata ) throws IOException;
/** * Publish segments, along with some commit metadata, in a single transaction. * * @return true if segments were published, false if they were not published due to txn failure with the metadata * * @throws IOException if there was an I/O error when publishing */
Publish segments, along with some commit metadata, in a single transaction
publishSegments
{ "repo_name": "tubemogul/druid", "path": "server/src/main/java/io/druid/segment/realtime/appenderator/TransactionalSegmentPublisher.java", "license": "apache-2.0", "size": 1395 }
[ "io.druid.timeline.DataSegment", "java.io.IOException", "java.util.Set" ]
import io.druid.timeline.DataSegment; import java.io.IOException; import java.util.Set;
import io.druid.timeline.*; import java.io.*; import java.util.*;
[ "io.druid.timeline", "java.io", "java.util" ]
io.druid.timeline; java.io; java.util;
943,878
void addFile(final File file);
void addFile(final File file);
/** * Puts the given file into the working directory of the Evaluator. * * @param file the file to be copied */
Puts the given file into the working directory of the Evaluator
addFile
{ "repo_name": "markusweimer/incubator-reef", "path": "lang/java/reef-common/src/main/java/org/apache/reef/driver/evaluator/AllocatedEvaluator.java", "license": "apache-2.0", "size": 3311 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,120,790
protected void sequence_OrExpression(EObject context, OrExpression semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(EObject context, OrExpression semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Constraint: * (left=OrExpression_OrExpression_1_0 op='or' right=AndExpression) */
Constraint: (left=OrExpression_OrExpression_1_0 op='or' right=AndExpression)
sequence_OrExpression
{ "repo_name": "martinbaker/euclideanspace", "path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/serializer/EditorSemanticSequencer.java", "license": "agpl-3.0", "size": 147119 }
[ "com.euclideanspace.spad.editor.OrExpression", "org.eclipse.emf.ecore.EObject" ]
import com.euclideanspace.spad.editor.OrExpression; import org.eclipse.emf.ecore.EObject;
import com.euclideanspace.spad.editor.*; import org.eclipse.emf.ecore.*;
[ "com.euclideanspace.spad", "org.eclipse.emf" ]
com.euclideanspace.spad; org.eclipse.emf;
465,919
public DataNode setRadiusScalar(double radius);
DataNode function(double radius);
/** * radius to centre of slit * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_LENGTH * </p> * * @param radius the radius */
radius to centre of slit Type: NX_FLOAT Units: NX_LENGTH
setRadiusScalar
{ "repo_name": "colinpalmer/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXdisk_chopper.java", "license": "epl-1.0", "size": 11747 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode;
import org.eclipse.dawnsci.analysis.api.tree.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
2,880,904
Builder add(Instruction instruction);
Builder add(Instruction instruction);
/** * Adds an instruction to the builder. * * @param instruction an instruction * @return a treatment builder */
Adds an instruction to the builder
add
{ "repo_name": "maxkondr/onos-porta", "path": "core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java", "license": "apache-2.0", "size": 7873 }
[ "org.onosproject.net.flow.instructions.Instruction" ]
import org.onosproject.net.flow.instructions.Instruction;
import org.onosproject.net.flow.instructions.*;
[ "org.onosproject.net" ]
org.onosproject.net;
2,232,128
protected void addHostRequestHeader(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace("enter HttpMethodBase.addHostRequestHeader(HttpState, " + "HttpConnection)"); // Per 19.6.1.1 of RFC 2616, it is legal for HTTP/1.0 based // applicat...
void function(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace(STR + STR); String host = this.params.getVirtualHost(); if (host != null) { LOG.debug(STR + host); } else { host = conn.getHost(); } int port = conn.getPort(); if (LOG.isDebugEnabled()) { LOG.debug(STR); } if (conn.getProt...
/** * Generates <tt>Host</tt> request header, as long as no <tt>Host</tt> request * header already exists. * * @param state the {@link HttpState state} information associated with this method * @param conn the {@link HttpConnection connection} used to execute * this HTTP method ...
Generates Host request header, as long as no Host request header already exists
addHostRequestHeader
{ "repo_name": "psiinon/zaproxy", "path": "zap/src/main/java/org/apache/commons/httpclient/HttpMethodBase.java", "license": "apache-2.0", "size": 99653 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Arrays", "java.util.Iterator", "java.util.List" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,560,815
public static SortedMap<String, Properties> findComponents(CamelContext camelContext) throws LoadPropertiesException { ClassResolver resolver = camelContext.getClassResolver(); LOG.debug("Finding all components using class resolver: {} -> {}", new Object[]{resolver}); Enumeration<URL> iter =...
static SortedMap<String, Properties> function(CamelContext camelContext) throws LoadPropertiesException { ClassResolver resolver = camelContext.getClassResolver(); LOG.debug(STR, new Object[]{resolver}); Enumeration<URL> iter = resolver.loadAllResourcesAsURL(COMPONENT_DESCRIPTOR); return findComponents(camelContext, it...
/** * Finds all possible Components on the classpath, already registered in {@link org.apache.camel.CamelContext}, * and from the {@link org.apache.camel.spi.Registry}. */
Finds all possible Components on the classpath, already registered in <code>org.apache.camel.CamelContext</code>, and from the <code>org.apache.camel.spi.Registry</code>
findComponents
{ "repo_name": "snadakuduru/camel", "path": "camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java", "license": "apache-2.0", "size": 26766 }
[ "java.util.Enumeration", "java.util.Properties", "java.util.SortedMap", "org.apache.camel.CamelContext", "org.apache.camel.spi.ClassResolver" ]
import java.util.Enumeration; import java.util.Properties; import java.util.SortedMap; import org.apache.camel.CamelContext; import org.apache.camel.spi.ClassResolver;
import java.util.*; import org.apache.camel.*; import org.apache.camel.spi.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
299,246
public void actionCreateResource() throws JspException { try { // calculate the new resource Title property value String title = computeNewTitleProperty(); // create the full resource name String fullResourceName = computeFullResourceName(); // ...
void function() throws JspException { try { String title = computeNewTitleProperty(); String fullResourceName = computeFullResourceName(); I_CmsResourceType resType = OpenCms.getResourceManager().getResourceType(getParamNewResourceType()); List<CmsProperty> properties = createResourceProperties(fullResourceName, resTyp...
/** * Creates the resource using the specified resource name and the newresourcetype parameter.<p> * * @throws JspException if inclusion of error dialog fails */
Creates the resource using the specified resource name and the newresourcetype parameter
actionCreateResource
{ "repo_name": "sbonoc/opencms-core", "path": "src/org/opencms/workplace/explorer/CmsNewResource.java", "license": "lgpl-2.1", "size": 42470 }
[ "java.util.List", "javax.servlet.jsp.JspException", "org.opencms.file.CmsProperty", "org.opencms.main.OpenCms" ]
import java.util.List; import javax.servlet.jsp.JspException; import org.opencms.file.CmsProperty; import org.opencms.main.OpenCms;
import java.util.*; import javax.servlet.jsp.*; import org.opencms.file.*; import org.opencms.main.*;
[ "java.util", "javax.servlet", "org.opencms.file", "org.opencms.main" ]
java.util; javax.servlet; org.opencms.file; org.opencms.main;
1,724,564
public List<Repository> getPluginRepositories() { if (pluginRepositories == null) { return emptyList(); } return new ArrayList<>(pluginRepositories); }
List<Repository> function() { if (pluginRepositories == null) { return emptyList(); } return new ArrayList<>(pluginRepositories); }
/** * Returns list of repositories which are collections of plugin artifacts. * * <p>Serves as a place to collect and store plugin artifacts. */
Returns list of repositories which are collections of plugin artifacts. Serves as a place to collect and store plugin artifacts
getPluginRepositories
{ "repo_name": "TypeFox/che", "path": "plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Model.java", "license": "epl-1.0", "size": 38042 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
4,708
@Test @Ignore("Intended only for local testing, not automated testing") public void testURLClassLoaderGetConnection() throws ClassNotFoundException, MalformedURLException, SQLException, InstantiationException, IllegalAccessException { final URL url = new URL("file:///var/tmp/mariadb-java-client-1.1...
@Ignore(STR) void function() throws ClassNotFoundException, MalformedURLException, SQLException, InstantiationException, IllegalAccessException { final URL url = new URL(STRorg.mariadb.jdbc.DriverSTRjdbc:mariadb: assertNotNull(driver2); final Connection connection = DriverManager.getConnection(STRcreate table restauran...
/** * NB!!!! Prerequisite: file should be present in /var/tmp/mariadb-java-client-1.1.7.jar Prerequisite: access to running MariaDb database server */
NB!!!! Prerequisite: file should be present in /var/tmp/mariadb-java-client-1.1.7.jar Prerequisite: access to running MariaDb database server
testURLClassLoaderGetConnection
{ "repo_name": "mcgilman/nifi", "path": "nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java", "license": "apache-2.0", "size": 28145 }
[ "java.net.MalformedURLException", "java.sql.Connection", "java.sql.DriverManager", "java.sql.SQLException", "org.junit.Assert", "org.junit.Ignore" ]
import java.net.MalformedURLException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import org.junit.Assert; import org.junit.Ignore;
import java.net.*; import java.sql.*; import org.junit.*;
[ "java.net", "java.sql", "org.junit" ]
java.net; java.sql; org.junit;
1,230,353
public void addPath(GeneralPath path, int style) { addCommand(new PDFShapeCmd(path, style)); }
void function(GeneralPath path, int style) { addCommand(new PDFShapeCmd(path, style)); }
/** * set the current path * @param path the path * @param style the style: PDFShapeCmd.STROKE, PDFShapeCmd.FILL, * PDFShapeCmd.BOTH, PDFShapeCmd.CLIP, or some combination. */
set the current path
addPath
{ "repo_name": "HarmonyEnterpriseSolutions/harmony-platform", "path": "java/src/com/sun/pdfview/PDFPage.java", "license": "gpl-2.0", "size": 24210 }
[ "java.awt.geom.GeneralPath" ]
import java.awt.geom.GeneralPath;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,469,450
Service resolveService(Service service);
Service resolveService(Service service);
/** * Resolve service from authentication request. * * @param service the service * @return the service */
Resolve service from authentication request
resolveService
{ "repo_name": "dodok1/cas", "path": "api/cas-server-core-api-authentication/src/main/java/org/apereo/cas/authentication/AuthenticationServiceSelectionPlan.java", "license": "apache-2.0", "size": 620 }
[ "org.apereo.cas.authentication.principal.Service" ]
import org.apereo.cas.authentication.principal.Service;
import org.apereo.cas.authentication.principal.*;
[ "org.apereo.cas" ]
org.apereo.cas;
183,071
public synchronized void reset() { log.info("Resetting extensions..."); pm.shutdown(); pm = PluginManagerFactory.createPluginManager(); if (Config.PLUGIN_DEBUG) { pm.addPluginsFrom(base, new OptionReportAfter()); } else { pm.addPluginsFrom(base); } }
synchronized void function() { log.info(STR); pm.shutdown(); pm = PluginManagerFactory.createPluginManager(); if (Config.PLUGIN_DEBUG) { pm.addPluginsFrom(base, new OptionReportAfter()); } else { pm.addPluginsFrom(base); } }
/** * Reset the loaded plugins and load them again */
Reset the loaded plugins and load them again
reset
{ "repo_name": "papamas/DMS-KANGREG-XI-MANADO", "path": "src/main/java/com/openkm/extension/core/ExtensionManager.java", "license": "gpl-3.0", "size": 2848 }
[ "com.openkm.core.Config", "net.xeoh.plugins.base.impl.PluginManagerFactory", "net.xeoh.plugins.base.options.addpluginsfrom.OptionReportAfter" ]
import com.openkm.core.Config; import net.xeoh.plugins.base.impl.PluginManagerFactory; import net.xeoh.plugins.base.options.addpluginsfrom.OptionReportAfter;
import com.openkm.core.*; import net.xeoh.plugins.base.impl.*; import net.xeoh.plugins.base.options.addpluginsfrom.*;
[ "com.openkm.core", "net.xeoh.plugins" ]
com.openkm.core; net.xeoh.plugins;
684,865
public void addPhrase(String key, Collection values) { phrases.put(key, values); }
void function(String key, Collection values) { phrases.put(key, values); }
/** * Add a new phrase to the archive. Phrases are used to provide for * extensions of the archive format. Each phrase has a key and a list of * values associated with it. * * @param key * The phrases key. * @param values * The values under the key....
Add a new phrase to the archive. Phrases are used to provide for extensions of the archive format. Each phrase has a key and a list of values associated with it
addPhrase
{ "repo_name": "tarzanek/jrcs", "path": "src/java/org/suigeneris/jrcs/rcs/Archive.java", "license": "lgpl-2.1", "size": 52938 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,796,367
private void attachActiveJob( JobGraph jobGraph, JobMeta newJobMeta, JobEntryCopy jobEntryCopy ) { if ( job != null && jobGraph != null ) { Job subJob = spoon.findActiveJob( job, jobEntryCopy ); if ( subJob != null ) { jobGraph.setJob( subJob ); jobGraph.jobGridDelegate.setJobTracker( ...
void function( JobGraph jobGraph, JobMeta newJobMeta, JobEntryCopy jobEntryCopy ) { if ( job != null && jobGraph != null ) { Job subJob = spoon.findActiveJob( job, jobEntryCopy ); if ( subJob != null ) { jobGraph.setJob( subJob ); jobGraph.jobGridDelegate.setJobTracker( subJob.getJobTracker() ); if ( !jobGraph.isExecut...
/** * Finds the last active job in the running job to the openened jobMeta * * @param jobGraph * @param newJob */
Finds the last active job in the running job to the openened jobMeta
attachActiveJob
{ "repo_name": "a186/pentaho-kettle", "path": "ui/src/org/pentaho/di/ui/spoon/job/JobGraph.java", "license": "apache-2.0", "size": 132109 }
[ "org.pentaho.di.job.Job", "org.pentaho.di.job.JobMeta", "org.pentaho.di.job.entry.JobEntryCopy" ]
import org.pentaho.di.job.Job; import org.pentaho.di.job.JobMeta; import org.pentaho.di.job.entry.JobEntryCopy;
import org.pentaho.di.job.*; import org.pentaho.di.job.entry.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,208,814
protected boolean hasAwardPermission(AwardSyncStatus awardStatus, Award award, String principalId) { return getKraAuthorizationService().hasPermission(principalId, award, AwardPermissionConstants.MODIFY_AWARD.getAwardPermission()); } /** * Run the {@link AwardDocumentRule#processSaveDocume...
boolean function(AwardSyncStatus awardStatus, Award award, String principalId) { return getKraAuthorizationService().hasPermission(principalId, award, AwardPermissionConstants.MODIFY_AWARD.getAwardPermission()); } /** * Run the {@link AwardDocumentRule#processSaveDocument} and {@link AwardDocumentRule#processRunAuditBu...
/** * Ensure that the person specified by principalId has modify permission on the award specified. * @param awardStatus * @param award * @param principalId * @param errorMessage * @param runnables * @return */
Ensure that the person specified by principalId has modify permission on the award specified
hasAwardPermission
{ "repo_name": "sanjupolus/KC6.oLatest", "path": "coeus-impl/src/main/java/org/kuali/kra/award/awardhierarchy/sync/service/AwardSyncServiceImpl.java", "license": "agpl-3.0", "size": 43278 }
[ "org.kuali.kra.award.AwardDocumentRule", "org.kuali.kra.award.awardhierarchy.sync.AwardSyncStatus", "org.kuali.kra.award.home.Award", "org.kuali.kra.award.infrastructure.AwardPermissionConstants" ]
import org.kuali.kra.award.AwardDocumentRule; import org.kuali.kra.award.awardhierarchy.sync.AwardSyncStatus; import org.kuali.kra.award.home.Award; import org.kuali.kra.award.infrastructure.AwardPermissionConstants;
import org.kuali.kra.award.*; import org.kuali.kra.award.awardhierarchy.sync.*; import org.kuali.kra.award.home.*; import org.kuali.kra.award.infrastructure.*;
[ "org.kuali.kra" ]
org.kuali.kra;
957,401
protected void checkModEngineFields(Engine e) { String engine = String.format("Engine %s: ", e.name); if(e.compatibility.isEmpty()) { report(e, engine + "has no compatible tanks"); } if(e.cost < 0) { // stock modules are for free! report(e, engine ...
void function(Engine e) { String engine = String.format(STR, e.name); if(e.compatibility.isEmpty()) { report(e, engine + STR); } if(e.cost < 0) { report(e, engine + STR + e.cost); } if(e.currency == null) { report(e, engine + STR); } if(e.name.length() < 2) { report(e, engine + STR + e.name); } if(e.nation == null) { r...
/** * Checks all fields of a single engine * @param e the engine to check */
Checks all fields of a single engine
checkModEngineFields
{ "repo_name": "Klamann/WotCrawler", "path": "src/main/java/de/nx42/wotcrawler/ext/Evaluator.java", "license": "gpl-3.0", "size": 19554 }
[ "de.nx42.wotcrawler.db.module.Engine" ]
import de.nx42.wotcrawler.db.module.Engine;
import de.nx42.wotcrawler.db.module.*;
[ "de.nx42.wotcrawler" ]
de.nx42.wotcrawler;
623,877
public Deque<SLogoExpression> parseSLogoExpression (String input) throws SLogoParsingException, NoSuchElementException { String filteredInput = parseOutComments(input); Deque<SLogoExpression> expressionStack = makeExpressionsFromInput(processInput(filteredInput)); loadAllExpress...
Deque<SLogoExpression> function (String input) throws SLogoParsingException, NoSuchElementException { String filteredInput = parseOutComments(input); Deque<SLogoExpression> expressionStack = makeExpressionsFromInput(processInput(filteredInput)); loadAllExpressionParameters(expressionStack); return myLoadedExpressions; ...
/** * Reads expression from back, parsing using a stack and returns list of expressions to evaluate * @param input String read from frontend * @return a deque of SLogoExpressions to evaluate * @throws SLogoParsingException if invalid input */
Reads expression from back, parsing using a stack and returns list of expressions to evaluate
parseSLogoExpression
{ "repo_name": "thewillchang/SLogo", "path": "src/interpreter/Parser.java", "license": "mit", "size": 3760 }
[ "java.util.Deque", "java.util.NoSuchElementException" ]
import java.util.Deque; import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
563,387
public static boolean containsSubdirectory(Path directory) throws FileNotFoundException, IOException { FileSystem fs = directory.getFileSystem(CONF); // Enumerate all the files in the source for (FileStatus fStatus: fs.listStatus(directory)) { if (fStatus.isDirectory()) { return true; ...
static boolean function(Path directory) throws FileNotFoundException, IOException { FileSystem fs = directory.getFileSystem(CONF); for (FileStatus fStatus: fs.listStatus(directory)) { if (fStatus.isDirectory()) { return true; } } return false; }
/** * Returns true if the given Path contains any sub directories, otherwise false. */
Returns true if the given Path contains any sub directories, otherwise false
containsSubdirectory
{ "repo_name": "grundprinzip/Impala", "path": "fe/src/main/java/com/cloudera/impala/common/FileSystemUtil.java", "license": "apache-2.0", "size": 9934 }
[ "java.io.FileNotFoundException", "java.io.IOException", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,915,199
public void linkStates() { Iterator<State> it = hiSched.iterator(); Iterator<State> it2 = hiSched.iterator(); // Construct the HI zone of the automata State s2 = it2.next(); while (it2.hasNext()) { State s = it.next(); if (it2.hasNext()) { s2 = it2.next(); Transition t = new Transition(s...
void function() { Iterator<State> it = hiSched.iterator(); Iterator<State> it2 = hiSched.iterator(); State s2 = it2.next(); while (it2.hasNext()) { State s = it.next(); if (it2.hasNext()) { s2 = it2.next(); Transition t = new Transition(s, s2, null); getH_transitions().add(t); } } State sk = new State(nbStates++, STR, ...
/** * Procedure links the states by creating Transitions objects * after the scheduling lists were created. */
Procedure links the states by creating Transitions objects after the scheduling lists were created
linkStates
{ "repo_name": "robertoxmed/ls_mxc", "path": "src/fr/tpt/s3/mcdag/avail/Automata.java", "license": "apache-2.0", "size": 12517 }
[ "fr.tpt.s3.mcdag.model.VertexScheduling", "java.util.Iterator" ]
import fr.tpt.s3.mcdag.model.VertexScheduling; import java.util.Iterator;
import fr.tpt.s3.mcdag.model.*; import java.util.*;
[ "fr.tpt.s3", "java.util" ]
fr.tpt.s3; java.util;
72,812
public double calcCost(int index) { SagaPricedItem[] exports = EconomyConfiguration.config().getTradingPostExports(); Double price = exports[index].getPrice(); double amount = collectedExports[index]; if(amount < 0.0) return 0.0; return amount * price; }
double function(int index) { SagaPricedItem[] exports = EconomyConfiguration.config().getTradingPostExports(); Double price = exports[index].getPrice(); double amount = collectedExports[index]; if(amount < 0.0) return 0.0; return amount * price; }
/** * Calculates the export cost for the given index. * * @param index export index * @return export cost */
Calculates the export cost for the given index
calcCost
{ "repo_name": "andfRa/Saga", "path": "src/org/saga/buildings/TradingPost.java", "license": "gpl-3.0", "size": 13440 }
[ "org.saga.buildings.production.SagaPricedItem", "org.saga.config.EconomyConfiguration" ]
import org.saga.buildings.production.SagaPricedItem; import org.saga.config.EconomyConfiguration;
import org.saga.buildings.production.*; import org.saga.config.*;
[ "org.saga.buildings", "org.saga.config" ]
org.saga.buildings; org.saga.config;
845,326
boolean setLandTax(Currency currency, BigDecimal value, Cause cause);
boolean setLandTax(Currency currency, BigDecimal value, Cause cause);
/** * Sets the land tax for the given currency. * @param currency The currency whose tax value to set. * @param value The rate per block per day to set it to. * @param cause The cause of this modification. * @return True if the modification took place, false otherwise. */
Sets the land tax for the given currency
setLandTax
{ "repo_name": "TheCrazyPhoenix/Societies", "path": "src/main/java/io/github/thecrazyphoenix/societies/api/society/Claim.java", "license": "mit", "size": 6758 }
[ "java.math.BigDecimal", "org.spongepowered.api.event.cause.Cause", "org.spongepowered.api.service.economy.Currency" ]
import java.math.BigDecimal; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.service.economy.Currency;
import java.math.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.service.economy.*;
[ "java.math", "org.spongepowered.api" ]
java.math; org.spongepowered.api;
2,851,383
public void testClassElement1() throws Exception { Class targetClass = IntegerPrimitiveKey.class; validateClassElements(targetClass); validateAttributeElement(targetClass, "id", "integer"); validateAttributeElement(targetClass, "name", "string"); }
void function() throws Exception { Class targetClass = IntegerPrimitiveKey.class; validateClassElements(targetClass); validateAttributeElement(targetClass, "id", STR); validateAttributeElement(targetClass, "name", STR); }
/** * Verifies that the 'element' and 'complexType' elements * corresponding to the Class are present in the XSD * Verifies that the Class attributes are present in the XSD * * @throws Exception */
Verifies that the 'element' and 'complexType' elements corresponding to the Class are present in the XSD Verifies that the Class attributes are present in the XSD
testClassElement1
{ "repo_name": "NCIP/cacore-sdk", "path": "sdk-toolkit/iso-example-project/junit/src/test/xsd/IntegerPrimitiveKeyXSDTest.java", "license": "bsd-3-clause", "size": 1528 }
[ "gov.nih.nci.cacoresdk.domain.other.primarykey.IntegerPrimitiveKey" ]
import gov.nih.nci.cacoresdk.domain.other.primarykey.IntegerPrimitiveKey;
import gov.nih.nci.cacoresdk.domain.other.primarykey.*;
[ "gov.nih.nci" ]
gov.nih.nci;
1,632,319