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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Observable<ServiceResponse<InboundNatRuleInner>> getWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, String expand) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cann... | Observable<ServiceResponse<InboundNatRuleInner>> function(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, String expand) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (loadBalancerName == null) { throw new IllegalArgumentException(STR); } if (inboundNatRu... | /**
* Gets the specified load balancer inbound nat rule.
*
* @param resourceGroupName The name of the resource group.
* @param loadBalancerName The name of the load balancer.
* @param inboundNatRuleName The name of the inbound nat rule.
* @param expand Expands referenced resources.
* ... | Gets the specified load balancer inbound nat rule | getWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/InboundNatRulesInner.java",
"license": "mit",
"size": 51227
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,010,004 |
@Test
public void whenFindId() {
Tracker tracker = new Tracker();
Item item = new Item("Name_1", "Desc_1");
tracker.add(item);
String id = "N23";
item.setId(id);
Item resultItem = tracker.findById(id);
assertThat(resultItem, is(item));
} | void function() { Tracker tracker = new Tracker(); Item item = new Item(STR, STR); tracker.add(item); String id = "N23"; item.setId(id); Item resultItem = tracker.findById(id); assertThat(resultItem, is(item)); } | /**
* Test method for findById().
*/ | Test method for findById() | whenFindId | {
"repo_name": "YuzyakAV/ayuzyak",
"path": "chapter_002/src/test/java/ru/job4j/tracker/start/TrackerTest.java",
"license": "apache-2.0",
"size": 3390
} | [
"org.hamcrest.core.Is",
"org.junit.Assert",
"ru.job4j.tracker.models.Item"
] | import org.hamcrest.core.Is; import org.junit.Assert; import ru.job4j.tracker.models.Item; | import org.hamcrest.core.*; import org.junit.*; import ru.job4j.tracker.models.*; | [
"org.hamcrest.core",
"org.junit",
"ru.job4j.tracker"
] | org.hamcrest.core; org.junit; ru.job4j.tracker; | 571,811 |
@PostConstruct
public void init()
throws ServletException
{
// server/12cc - XXX: this should be allowed, though
// XXX: order
if (_singleSignon == null && ! _signonInstance.isUnsatisfied()) {
_singleSignon = _signonInstance.get();
}
} | void function() throws ServletException { if (_singleSignon == null && ! _signonInstance.isUnsatisfied()) { _singleSignon = _signonInstance.get(); } } | /**
* Initialize the login. <code>init()</code> will be called after all
* the bean parameters have been set.
*/ | Initialize the login. <code>init()</code> will be called after all the bean parameters have been set | init | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/security/AbstractLogin.java",
"license": "gpl-2.0",
"size": 20066
} | [
"javax.servlet.ServletException"
] | import javax.servlet.ServletException; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 1,019,840 |
public CmsUUID getDefaultFileId() {
return m_defaultFileId;
} | CmsUUID function() { return m_defaultFileId; } | /**
* Gets the default file id.<p>
*
* @return the default file id, or null if there is no detail page
*/ | Gets the default file id | getDefaultFileId | {
"repo_name": "it-tavis/opencms-core",
"path": "src/org/opencms/ade/sitemap/shared/CmsClientSitemapEntry.java",
"license": "lgpl-2.1",
"size": 28821
} | [
"org.opencms.util.CmsUUID"
] | import org.opencms.util.CmsUUID; | import org.opencms.util.*; | [
"org.opencms.util"
] | org.opencms.util; | 1,993,370 |
public double readDouble() throws IOException {
return Double.parseDouble(readInt() + "." + readUnsignedInt());
}
| double function() throws IOException { return Double.parseDouble(readInt() + "." + readUnsignedInt()); } | /**
* Method to read the next 64-bit floating point from the input stream.
*
* @return 64-bit floating point.
* @throws IOException Unable to read the next 64-bit floating point from the stream.
*/ | Method to read the next 64-bit floating point from the input stream | readDouble | {
"repo_name": "acampbell3000/java-mp4-reader",
"path": "src/main/java/uk/co/anthonycampbell/java/mp4reader/reader/MP4InputStream.java",
"license": "apache-2.0",
"size": 13680
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 696,672 |
ServiceCall<List<Product>> getMultiplePagesRetrySecondNextAsync(final String nextPageLink, final ServiceCall<List<Product>> serviceCall, final ListOperationCallback<Product> serviceCallback) throws IllegalArgumentException; | ServiceCall<List<Product>> getMultiplePagesRetrySecondNextAsync(final String nextPageLink, final ServiceCall<List<Product>> serviceCall, final ListOperationCallback<Product> serviceCallback) throws IllegalArgumentException; | /**
* A paging operation that includes a nextLink that has 10 pages, of which the 2nd call fails first with 500. The client should retry and finish all 10 pages eventually.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param serviceCall the ServiceCall ... | A paging operation that includes a nextLink that has 10 pages, of which the 2nd call fails first with 500. The client should retry and finish all 10 pages eventually | getMultiplePagesRetrySecondNextAsync | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/paging/Pagings.java",
"license": "mit",
"size": 32351
} | [
"com.microsoft.azure.ListOperationCallback",
"com.microsoft.rest.ServiceCall",
"java.util.List"
] | import com.microsoft.azure.ListOperationCallback; import com.microsoft.rest.ServiceCall; import java.util.List; | import com.microsoft.azure.*; import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"java.util"
] | com.microsoft.azure; com.microsoft.rest; java.util; | 1,354,217 |
return $classUnderTest;
}
@Invars(@Expression("$classUnderTest != null"))
private Class<_PersistentBean_> $classUnderTest; | return $classUnderTest; } @Invars(@Expression(STR)) private Class<_PersistentBean_> $classUnderTest; | /**
* Returns the class that is tested.
*/ | Returns the class that is tested | getClassUnderTest | {
"repo_name": "jandppw/ppwcode-recovered-from-google-code",
"path": "java/vernacular/persistence/dev/d20080825-1559/src/main/java/org/ppwcode/vernacular/persistence_III/junit/hibernate2/AbstractHibernate2PersistentBeanTest.java",
"license": "apache-2.0",
"size": 6845
} | [
"org.ppwcode.vernacular.persistence_III.PersistentBean",
"org.toryt.annotations_I.Expression",
"org.toryt.annotations_I.Invars"
] | import org.ppwcode.vernacular.persistence_III.PersistentBean; import org.toryt.annotations_I.Expression; import org.toryt.annotations_I.Invars; | import org.ppwcode.vernacular.*; import org.toryt.*; | [
"org.ppwcode.vernacular",
"org.toryt"
] | org.ppwcode.vernacular; org.toryt; | 1,217,690 |
Constants.ION_MODE getIonMode(); | Constants.ION_MODE getIonMode(); | /**
* Returns the ion mode.
*
* @return the ion mode
*/ | Returns the ion mode | getIonMode | {
"repo_name": "tomas-pluskal/masscascade",
"path": "MassCascadeCore/src/main/java/uk/ac/ebi/masscascade/interfaces/container/FeatureContainer.java",
"license": "gpl-3.0",
"size": 2519
} | [
"uk.ac.ebi.masscascade.parameters.Constants"
] | import uk.ac.ebi.masscascade.parameters.Constants; | import uk.ac.ebi.masscascade.parameters.*; | [
"uk.ac.ebi"
] | uk.ac.ebi; | 2,719,976 |
public RefCounted<SolrIndexSearcher> getSearcher() {
return getSearcher(false,true,null);
} | RefCounted<SolrIndexSearcher> function() { return getSearcher(false,true,null); } | /**
* Return a registered {@link RefCounted}<{@link SolrIndexSearcher}> with
* the reference count incremented. It <b>must</b> be decremented when no longer needed.
* This method should not be called from SolrCoreAware.inform() since it can result
* in a deadlock if useColdSearcher==false.
* If handlin... | Return a registered <code>RefCounted</code><<code>SolrIndexSearcher</code>> with the reference count incremented. It must be decremented when no longer needed. This method should not be called from SolrCoreAware.inform() since it can result in a deadlock if useColdSearcher==false. If handling a normal request, th... | getSearcher | {
"repo_name": "cscorley/solr-only-mirror",
"path": "core/src/java/org/apache/solr/core/SolrCore.java",
"license": "apache-2.0",
"size": 95685
} | [
"org.apache.solr.search.SolrIndexSearcher",
"org.apache.solr.util.RefCounted"
] | import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.util.RefCounted; | import org.apache.solr.search.*; import org.apache.solr.util.*; | [
"org.apache.solr"
] | org.apache.solr; | 2,715,701 |
Set<AffectedComponentEntity> getControllerServicesReferencingParameter(String groupId);
// ----------------------------------------
// Component state methods
// ---------------------------------------- | Set<AffectedComponentEntity> getControllerServicesReferencingParameter(String groupId); | /**
* Returns a Set representing all Controller Services that reference any Parameters and that belong to the group with the given ID
*
* @param groupId the id of the process group
* @return a Set representing all Controller Services that reference Parameters
*/ | Returns a Set representing all Controller Services that reference any Parameters and that belong to the group with the given ID | getControllerServicesReferencingParameter | {
"repo_name": "ijokarumawak/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 85103
} | [
"java.util.Set",
"org.apache.nifi.web.api.entity.AffectedComponentEntity"
] | import java.util.Set; import org.apache.nifi.web.api.entity.AffectedComponentEntity; | import java.util.*; import org.apache.nifi.web.api.entity.*; | [
"java.util",
"org.apache.nifi"
] | java.util; org.apache.nifi; | 1,101,278 |
EClass getMultiTouchDeviceConfiguration(); | EClass getMultiTouchDeviceConfiguration(); | /**
* Returns the meta object for class '{@link org.openhab.binding.tinkerforge.internal.model.MultiTouchDeviceConfiguration <em>Multi Touch Device Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Multi Touch Device Configuration</em>'.
* @s... | Returns the meta object for class '<code>org.openhab.binding.tinkerforge.internal.model.MultiTouchDeviceConfiguration Multi Touch Device Configuration</code>'. | getMultiTouchDeviceConfiguration | {
"repo_name": "gregfinley/openhab",
"path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/ModelPackage.java",
"license": "epl-1.0",
"size": 665067
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 64,051 |
public String getString(Context context) {
return context.getResources().getString(mDisplayStringResId);
}
}
public enum ItemModifiedDate {
Any(R.id.dateModifiedContainerAnyTime, R.string.any_time),
PastDay(R.id.dateModifiedContainerPastDay, R.... | String function(Context context) { return context.getResources().getString(mDisplayStringResId); } } public enum ItemModifiedDate { Any(R.id.dateModifiedContainerAnyTime, R.string.any_time), PastDay(R.id.dateModifiedContainerPastDay, R.string.past_day), PastWeek(R.id.dateModifiedContainerPastWeek, R.string.past_week), ... | /**
* Gets string.
*
* @param context the context
* @return the string
*/ | Gets string | getString | {
"repo_name": "box/box-android-browse-sdk",
"path": "box-browse-sdk/src/main/java/com/box/androidsdk/browse/models/BoxSearchFilters.java",
"license": "apache-2.0",
"size": 9810
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,933,618 |
Optional<T> retrieve(Tenant tenant, String uniqueName); | Optional<T> retrieve(Tenant tenant, String uniqueName); | /**
* Loads a single data set by the unique name.
*
* @param tenant the tenant to save the data for
* @param uniqueName the unique name of the data to be loaded.
*
* @return The selected data.
*/ | Loads a single data set by the unique name | retrieve | {
"repo_name": "KaiserpfalzEDV/kp-paladins-inn",
"path": "kp-pi-commons/kp-pi-commons-api/src/main/java/de/kaiserpfalzedv/paladinsinn/commons/api/persistence/MultitenantCrudService.java",
"license": "apache-2.0",
"size": 3657
} | [
"de.kaiserpfalzedv.paladinsinn.commons.api.tenant.model.Tenant",
"java.util.Optional"
] | import de.kaiserpfalzedv.paladinsinn.commons.api.tenant.model.Tenant; import java.util.Optional; | import de.kaiserpfalzedv.paladinsinn.commons.api.tenant.model.*; import java.util.*; | [
"de.kaiserpfalzedv.paladinsinn",
"java.util"
] | de.kaiserpfalzedv.paladinsinn; java.util; | 1,801,159 |
protected int tryToAddAdjacent(List <TINTriangle> adjacents) {
Iterator <TINTriangle> i = adjacents.iterator();
int count = 0;
while (i.hasNext()) {
try {
TINTriangle candidate = (TINTriangle) i.next();
if (candidate.isAdjacent(this)
... | int function(List <TINTriangle> adjacents) { Iterator <TINTriangle> i = adjacents.iterator(); int count = 0; while (i.hasNext()) { try { TINTriangle candidate = (TINTriangle) i.next(); if (candidate.isAdjacent(this) && !this.adjacentTriangles.contains(candidate)) { this.addAdjacentTriangle(candidate); } if (candidate.i... | /**
* Tries to add {@code adjacent} triangles. Before adding they are checked
* whether they are really adjacent or not and whether they are not already known.
* @param adjacents triangles to be added
* @return number of successfully added triangles
*/ | Tries to add adjacent triangles. Before adding they are checked whether they are really adjacent or not and whether they are not already known | tryToAddAdjacent | {
"repo_name": "iCarto/siga",
"path": "libTopology/src/org/geotools/referencefork/referencing/operation/builder/TINTriangle.java",
"license": "gpl-3.0",
"size": 7784
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 163,678 |
public static List< String > getGroups( String regexStr, String targetString )
{
List< String > groupList = new ArrayList< String >( );
try {
Pattern regex = Pattern
.compile( regexStr, Pattern.CASE_INSENSITIVE );
Matcher regexMatcher = regex.matcher( targ... | static List< String > function( String regexStr, String targetString ) { List< String > groupList = new ArrayList< String >( ); try { Pattern regex = Pattern .compile( regexStr, Pattern.CASE_INSENSITIVE ); Matcher regexMatcher = regex.matcher( targetString ); while( regexMatcher.find( ) ) { groupList.add( regexMatcher.... | /**
* Returns the list of groups found by the specified regex
* in the specified string.
* The regex is applied case insensitive
*
* @param regexStr
* The regex used to extract the groups
* @param targetString
* The string on which to apply the regex
* @return... | Returns the list of groups found by the specified regex in the specified string. The regex is applied case insensitive | getGroups | {
"repo_name": "asimonov-im/wesnoth",
"path": "utils/umc_dev/org.wesnoth/src/org/wesnoth/utils/StringUtils.java",
"license": "gpl-2.0",
"size": 9656
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.regex.Matcher",
"java.util.regex.Pattern",
"java.util.regex.PatternSyntaxException",
"org.wesnoth.Logger"
] | import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import org.wesnoth.Logger; | import java.util.*; import java.util.regex.*; import org.wesnoth.*; | [
"java.util",
"org.wesnoth"
] | java.util; org.wesnoth; | 2,386,925 |
public String toMetadataPath( VersionedReference reference ); | String function( VersionedReference reference ); | /**
* Given a {@link VersionedReference}, return the path to the metadata for
* the specific version of the project.
*
* @param reference the reference to use.
* @return the path to the metadata file, or null if no metadata is appropriate.
*/ | Given a <code>VersionedReference</code>, return the path to the metadata for the specific version of the project | toMetadataPath | {
"repo_name": "hiredman/archiva",
"path": "archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/ManagedRepositoryContent.java",
"license": "apache-2.0",
"size": 8069
} | [
"org.apache.maven.archiva.model.VersionedReference"
] | import org.apache.maven.archiva.model.VersionedReference; | import org.apache.maven.archiva.model.*; | [
"org.apache.maven"
] | org.apache.maven; | 264,475 |
public EventGridPublisherClientBuilder pipeline(HttpPipeline httpPipeline) {
if (this.httpPipeline != null && httpPipeline == null) {
logger.info("Http client is set to null when it was not previously null");
}
this.httpPipeline = httpPipeline;
return this;
} | EventGridPublisherClientBuilder function(HttpPipeline httpPipeline) { if (this.httpPipeline != null && httpPipeline == null) { logger.info(STR); } this.httpPipeline = httpPipeline; return this; } | /**
* Set the HTTP pipeline to use when sending calls to the service.
* @param httpPipeline the pipeline to use.
*
* @return the builder itself.
*/ | Set the HTTP pipeline to use when sending calls to the service | pipeline | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/EventGridPublisherClientBuilder.java",
"license": "mit",
"size": 11391
} | [
"com.azure.core.http.HttpPipeline"
] | import com.azure.core.http.HttpPipeline; | import com.azure.core.http.*; | [
"com.azure.core"
] | com.azure.core; | 723,921 |
public void addPolicy(final ExpirationPolicy policy) {
LOGGER.trace("Adding expiration policy [{}] with name [{}]", policy, policy.getName());
this.policies.put(policy.getName(), policy);
} | void function(final ExpirationPolicy policy) { LOGGER.trace(STR, policy, policy.getName()); this.policies.put(policy.getName(), policy); } | /**
* Add policy.
*
* @param policy the policy
*/ | Add policy | addPolicy | {
"repo_name": "fogbeam/cas_mirror",
"path": "core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/expiration/BaseDelegatingExpirationPolicy.java",
"license": "apache-2.0",
"size": 5071
} | [
"org.apereo.cas.ticket.ExpirationPolicy"
] | import org.apereo.cas.ticket.ExpirationPolicy; | import org.apereo.cas.ticket.*; | [
"org.apereo.cas"
] | org.apereo.cas; | 1,873,008 |
protected void compareAndVerify(ECBlock[] erasedBlocks,
ECBlock[] recoveredBlocks) {
for (int i = 0; i < erasedBlocks.length; ++i) {
compareAndVerify(((TestBlock) erasedBlocks[i]).chunks, ((TestBlock) recoveredBlocks[i]).chunks);
}
} | void function(ECBlock[] erasedBlocks, ECBlock[] recoveredBlocks) { for (int i = 0; i < erasedBlocks.length; ++i) { compareAndVerify(((TestBlock) erasedBlocks[i]).chunks, ((TestBlock) recoveredBlocks[i]).chunks); } } | /**
* Compare and verify if recovered blocks data are the same with the erased
* blocks data.
* @param erasedBlocks
* @param recoveredBlocks
*/ | Compare and verify if recovered blocks data are the same with the erased blocks data | compareAndVerify | {
"repo_name": "anjuncc/hadoop",
"path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/coder/TestErasureCoderBase.java",
"license": "apache-2.0",
"size": 9576
} | [
"org.apache.hadoop.io.erasurecode.ECBlock"
] | import org.apache.hadoop.io.erasurecode.ECBlock; | import org.apache.hadoop.io.erasurecode.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,285,281 |
public void addServerCellMoveListener(CellMoveListener listener) {
if (serverMoveListeners==null) {
serverMoveListeners = new ArrayList();
}
serverMoveListeners.add(listener);
} | void function(CellMoveListener listener) { if (serverMoveListeners==null) { serverMoveListeners = new ArrayList(); } serverMoveListeners.add(listener); } | /**
* Listen for move events from the server
* @param listener
*/ | Listen for move events from the server | addServerCellMoveListener | {
"repo_name": "AsherBond/MondocosmOS",
"path": "wonderland/core/src/classes/org/jdesktop/wonderland/client/cell/MovableComponent.java",
"license": "agpl-3.0",
"size": 10293
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,239,918 |
protected Context[] getParameters(int[][] outcomePatterns) throws java.io.IOException {
Context[] params = new Context[NUM_PREDS];
int pid=0;
for (int i=0; i<outcomePatterns.length; i++) {
//construct outcome pattern
int[] outcomePattern = new int[outcomePatterns[i].length-1];
for (int k... | Context[] function(int[][] outcomePatterns) throws java.io.IOException { Context[] params = new Context[NUM_PREDS]; int pid=0; for (int i=0; i<outcomePatterns.length; i++) { int[] outcomePattern = new int[outcomePatterns[i].length-1]; for (int k=1; k<outcomePatterns[i].length; k++) { outcomePattern[k-1] = outcomePatter... | /**
* Reads the parameters from a file and populates an array of context objects.
* @param outcomePatterns The outcomes patterns for the model. The first index refers to which
* outcome pattern (a set of outcomes that occurs with a context) is being specified. The
* second index specifies the number of c... | Reads the parameters from a file and populates an array of context objects | getParameters | {
"repo_name": "mccraigmccraig/maxent",
"path": "src/main/java/opennlp/model/AbstractModelReader.java",
"license": "apache-2.0",
"size": 5349
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,025,554 |
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
StringType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBR... | void function(ClassGenerator classGen, MethodGenerator methodGen, StringType type) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBRARY_CLASS, STR, "(D)" + STRING_SIG))); } | /**
* Expects a real on the stack and pushes its string value by calling
* <code>Double.toString(double d)</code>.
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/ | Expects a real on the stack and pushes its string value by calling <code>Double.toString(double d)</code> | translateTo | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java",
"license": "apache-2.0",
"size": 12468
} | [
"com.sun.org.apache.bcel.internal.generic.ConstantPoolGen",
"com.sun.org.apache.bcel.internal.generic.InstructionList"
] | import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.InstructionList; | import com.sun.org.apache.bcel.internal.generic.*; | [
"com.sun.org"
] | com.sun.org; | 1,986,040 |
public void setQty (BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
} | void function (BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } | /** Set Quantity.
@param Qty
Quantity
*/ | Set Quantity | setQty | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/X_GL_JournalLine.java",
"license": "gpl-2.0",
"size": 14356
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 169,140 |
@NotNull
public String getNullTerminatedString(int index, int maxLengthBytes, @NotNull Charset charset) throws IOException
{
return new String(getNullTerminatedBytes(index, maxLengthBytes), charset.name());
} | String function(int index, int maxLengthBytes, @NotNull Charset charset) throws IOException { return new String(getNullTerminatedBytes(index, maxLengthBytes), charset.name()); } | /**
* Creates a String from the _data buffer starting at the specified index,
* and ending where <code>byte=='\0'</code> or where <code>length==maxLength</code>.
*
* @param index The index within the buffer at which to start reading the string.
* @param maxLengthBytes The maximum numbe... | Creates a String from the _data buffer starting at the specified index, and ending where <code>byte=='\0'</code> or where <code>length==maxLength</code> | getNullTerminatedString | {
"repo_name": "Nadahar/metadata-extractor",
"path": "Source/com/drew/lang/RandomAccessReader.java",
"license": "apache-2.0",
"size": 17891
} | [
"com.drew.lang.annotations.NotNull",
"java.io.IOException",
"java.nio.charset.Charset"
] | import com.drew.lang.annotations.NotNull; import java.io.IOException; import java.nio.charset.Charset; | import com.drew.lang.annotations.*; import java.io.*; import java.nio.charset.*; | [
"com.drew.lang",
"java.io",
"java.nio"
] | com.drew.lang; java.io; java.nio; | 1,835,190 |
public void commitSubSection(FileSummary.Builder summary, SectionName name)
throws IOException {
if (!writeSubSections) {
return;
}
LOG.debug("Saving a subsection for {}", name.toString());
// The output stream must be flushed before the length is obtained
// as the fl... | void function(FileSummary.Builder summary, SectionName name) throws IOException { if (!writeSubSections) { return; } LOG.debug(STR, name.toString()); sectionOutputStream.flush(); long length = fileChannel.position() - subSectionOffset; if (length == 0) { LOG.warn(STR + STR, name.toString()); return; } summary.addSectio... | /**
* Commit the length and offset of a fsimage sub-section to the summary
* index.
* @param summary The image summary object
* @param name The name of the sub-section to commit
* @throws IOException
*/ | Commit the length and offset of a fsimage sub-section to the summary index | commitSubSection | {
"repo_name": "steveloughran/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormatProtobuf.java",
"license": "apache-2.0",
"size": 38765
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.server.namenode.FsImageProto"
] | import java.io.IOException; import org.apache.hadoop.hdfs.server.namenode.FsImageProto; | import java.io.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 146,236 |
public MilestoneDTO findOne(String id) {
log.debug("Request to get Milestone : {}", id);
Milestone milestone = milestoneRepository.findOne(UUID.fromString(id));
MilestoneDTO milestoneDTO = milestoneMapper.milestoneToMilestoneDTO(milestone);
return milestoneDTO;
} | MilestoneDTO function(String id) { log.debug(STR, id); Milestone milestone = milestoneRepository.findOne(UUID.fromString(id)); MilestoneDTO milestoneDTO = milestoneMapper.milestoneToMilestoneDTO(milestone); return milestoneDTO; } | /**
* get one milestone by id.
* @return the entity
*/ | get one milestone by id | findOne | {
"repo_name": "sandor-balazs/nosql-java",
"path": "cassandra/src/main/java/com/github/sandor_balazs/nosql_java/service/impl/MilestoneServiceImpl.java",
"license": "bsd-2-clause",
"size": 2491
} | [
"com.github.sandor_balazs.nosql_java.domain.Milestone",
"com.github.sandor_balazs.nosql_java.web.rest.dto.MilestoneDTO",
"java.util.UUID"
] | import com.github.sandor_balazs.nosql_java.domain.Milestone; import com.github.sandor_balazs.nosql_java.web.rest.dto.MilestoneDTO; import java.util.UUID; | import com.github.sandor_balazs.nosql_java.domain.*; import com.github.sandor_balazs.nosql_java.web.rest.dto.*; import java.util.*; | [
"com.github.sandor_balazs",
"java.util"
] | com.github.sandor_balazs; java.util; | 1,321,125 |
return getKeyFigures(null, null);
}
/**
* <p>Fetch all key figures data which match the input constraints.</p>
*
* @param keyFigures
* the key figures
* @param months
* the months
* @return the data wrapped in a list of
* {@link com.github.d... | return getKeyFigures(null, null); } /** * <p>Fetch all key figures data which match the input constraints.</p> * * @param keyFigures * the key figures * @param months * the months * @return the data wrapped in a list of * {@link com.github.dannil.scbjavaclient.model.ResponseModel ResponseModel} | /**
* <p>Fetch all key figures data.</p>
*
* @return the data wrapped in a list of
* {@link com.github.dannil.scbjavaclient.model.ResponseModel ResponseModel}
* objects
*
* @see #getKeyFigures(Collection, Collection)
*/ | Fetch all key figures data | getKeyFigures | {
"repo_name": "dannil/scb-java-client",
"path": "src/main/java/com/github/dannil/scbjavaclient/client/financialmarkets/statistics/keyfigures/FinancialMarketsStatisticsKeyFiguresClient.java",
"license": "apache-2.0",
"size": 2819
} | [
"com.github.dannil.scbjavaclient.model.ResponseModel"
] | import com.github.dannil.scbjavaclient.model.ResponseModel; | import com.github.dannil.scbjavaclient.model.*; | [
"com.github.dannil"
] | com.github.dannil; | 184,783 |
private void buttonHelpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonHelpActionPerformed
// Create an editor pane place the HTML file in it.
JEditorPane editorPane = new JEditorPane();
editorPane.setEditable(false);
java.net.URL helpURL = PanelMai... | void function(java.awt.event.ActionEvent evt) { JEditorPane editorPane = new JEditorPane(); editorPane.setEditable(false); java.net.URL helpURL = PanelMain.class.getResource(STR); if (helpURL != null) { try { editorPane.setPage(helpURL); } catch (IOException e) { System.err.println(STR + helpURL); } } else { System.err... | /**
* Button to launch the html help file.
*
* @param evt
*/ | Button to launch the html help file | buttonHelpActionPerformed | {
"repo_name": "JosephChip/Stats",
"path": "src/Stats/PanelMain.java",
"license": "apache-2.0",
"size": 25679
} | [
"java.awt.Dimension",
"java.io.IOException",
"javax.swing.JEditorPane",
"javax.swing.JFrame",
"javax.swing.JScrollPane"
] | import java.awt.Dimension; import java.io.IOException; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JScrollPane; | import java.awt.*; import java.io.*; import javax.swing.*; | [
"java.awt",
"java.io",
"javax.swing"
] | java.awt; java.io; javax.swing; | 2,334,658 |
protected Acl excludeInheritedAces(NodeRef nodeRef, Acl acl)
{
List<Ace> newAces = new ArrayList<Ace>();
Acl allACLs = getACL(nodeRef, false);
Map<String, Set<String>> originalsAcls = convertAclToMap(allACLs);
Map<String, Set<String>> newAcls = convertAclToMap(acl);
//... | Acl function(NodeRef nodeRef, Acl acl) { List<Ace> newAces = new ArrayList<Ace>(); Acl allACLs = getACL(nodeRef, false); Map<String, Set<String>> originalsAcls = convertAclToMap(allACLs); Map<String, Set<String>> newAcls = convertAclToMap(acl); for (Map.Entry<String, Set<String>> ace : originalsAcls.entrySet()) { Set<S... | /**
* Filter acl to ignore inherited ACEs
*
* @param nodeRef NodeRef
* @param acl Acl
* @return Acl
*/ | Filter acl to ignore inherited ACEs | excludeInheritedAces | {
"repo_name": "Kast0rTr0y/community-edition",
"path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java",
"license": "lgpl-3.0",
"size": 147090
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"java.util.Set",
"org.alfresco.service.cmr.repository.NodeRef",
"org.apache.chemistry.opencmis.commons.data.Ace",
"org.apache.chemistry.opencmis.commons.data.Acl",
"org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlEntryImpl",... | import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import org.alfresco.service.cmr.repository.NodeRef; import org.apache.chemistry.opencmis.commons.data.Ace; import org.apache.chemistry.opencmis.commons.data.Acl; import org.apache.chemistry.opencmis.commons.impl.dataobjects.A... | import java.util.*; import org.alfresco.service.cmr.repository.*; import org.apache.chemistry.opencmis.commons.data.*; import org.apache.chemistry.opencmis.commons.impl.dataobjects.*; | [
"java.util",
"org.alfresco.service",
"org.apache.chemistry"
] | java.util; org.alfresco.service; org.apache.chemistry; | 905,868 |
private Node namedItem( Element topLevel, String name )
{
Node node;
Node result;
synchronized ( topLevel )
{
// Traverse all the childs of the current element in the order
// they appear.
node = topLevel.getFirstChild();
while ( n... | Node function( Element topLevel, String name ) { Node node; Node result; synchronized ( topLevel ) { node = topLevel.getFirstChild(); while ( node != null ) { if ( node instanceof Element ) { if ( collectionMatch( (Element) node, name ) ) return node; else if ( recurse() ) { result = namedItem( (Element) node, name ); ... | /**
* Recursive function returns an element of a particular type with the
* specified name (<TT>id</TT> attribute).
*
* @param topLevel Top level element from which to scan
* @param name The named element to look for
* @return The first named element found
*/ | Recursive function returns an element of a particular type with the specified name (id attribute) | namedItem | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xerces-2_9_1/src/org/apache/html/dom/HTMLCollectionImpl.java",
"license": "gpl-3.0",
"size": 18558
} | [
"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; | 2,400,947 |
String tracePeerAddress = (String) config.getOrDefault(isProducer ? ProducerConfig.BOOTSTRAP_SERVERS_CONFIG : ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "");
return new KafkaClientOptions().setTracePeerAddress(tracePeerAddress);
} | String tracePeerAddress = (String) config.getOrDefault(isProducer ? ProducerConfig.BOOTSTRAP_SERVERS_CONFIG : ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, ""); return new KafkaClientOptions().setTracePeerAddress(tracePeerAddress); } | /**
* Create KafkaClientOptions from underlying Kafka config as map
* @param config config map to be passed down to underlying Kafka client
* @return an instance of KafkaClientOptions
*/ | Create KafkaClientOptions from underlying Kafka config as map | fromMap | {
"repo_name": "vert-x3/vertx-kafka-client",
"path": "src/main/java/io/vertx/kafka/client/common/KafkaClientOptions.java",
"license": "apache-2.0",
"size": 4669
} | [
"org.apache.kafka.clients.consumer.ConsumerConfig",
"org.apache.kafka.clients.producer.ProducerConfig"
] | import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.clients.producer.ProducerConfig; | import org.apache.kafka.clients.consumer.*; import org.apache.kafka.clients.producer.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 2,311,881 |
@SuppressWarnings("unchecked")
public V put(final int keyPartA, final int keyPartB, final V value)
{
final long key = compoundKey(keyPartA, keyPartB);
V oldValue = null;
final int mask = values.length - 1;
int index = Hashing.hash(key, mask);
while (null != values[i... | @SuppressWarnings(STR) V function(final int keyPartA, final int keyPartB, final V value) { final long key = compoundKey(keyPartA, keyPartB); V oldValue = null; final int mask = values.length - 1; int index = Hashing.hash(key, mask); while (null != values[index]) { if (key == keys[index]) { oldValue = (V)values[index]; ... | /**
* Put a value into the map.
*
* @param keyPartA for the key
* @param keyPartB for the key
* @param value to put into the map
* @return the previous value if found otherwise null
*/ | Put a value into the map | put | {
"repo_name": "real-logic/Agrona",
"path": "agrona/src/main/java/org/agrona/collections/BiInt2ObjectMap.java",
"license": "apache-2.0",
"size": 11747
} | [
"org.agrona.collections.Hashing"
] | import org.agrona.collections.Hashing; | import org.agrona.collections.*; | [
"org.agrona.collections"
] | org.agrona.collections; | 1,245,922 |
private void handleDataObjects() {
ArrayList<AbstractDataObject> dataObjects = new ArrayList<AbstractDataObject>();
this.getAllDataObjects(this.diagramChilds, dataObjects);
for (AbstractDataObject dataObject : dataObjects) {
if (dataObject.getProcess() != null)
continue;
dataObject.findRelate... | void function() { ArrayList<AbstractDataObject> dataObjects = new ArrayList<AbstractDataObject>(); this.getAllDataObjects(this.diagramChilds, dataObjects); for (AbstractDataObject dataObject : dataObjects) { if (dataObject.getProcess() != null) continue; dataObject.findRelatedProcess(); if (dataObject instanceof DataSt... | /**
* Assigns the DataObjectes to the appropriate {@link Process}.
*/ | Assigns the DataObjectes to the appropriate <code>Process</code> | handleDataObjects | {
"repo_name": "slowisfast168/axelor-bpm",
"path": "platform extensions/bpmn20xmlbasic/src/de/hpi/bpmn2_0/transformation/Diagram2BpmnConverter.java",
"license": "gpl-3.0",
"size": 72117
} | [
"de.hpi.bpmn2_0.factory.BPMNElement",
"de.hpi.bpmn2_0.model.Process",
"de.hpi.bpmn2_0.model.data_object.AbstractDataObject",
"de.hpi.bpmn2_0.model.data_object.DataStoreReference",
"de.hpi.diagram.SignavioUUID",
"java.util.ArrayList"
] | import de.hpi.bpmn2_0.factory.BPMNElement; import de.hpi.bpmn2_0.model.Process; import de.hpi.bpmn2_0.model.data_object.AbstractDataObject; import de.hpi.bpmn2_0.model.data_object.DataStoreReference; import de.hpi.diagram.SignavioUUID; import java.util.ArrayList; | import de.hpi.bpmn2_0.factory.*; import de.hpi.bpmn2_0.model.*; import de.hpi.bpmn2_0.model.data_object.*; import de.hpi.diagram.*; import java.util.*; | [
"de.hpi.bpmn2_0",
"de.hpi.diagram",
"java.util"
] | de.hpi.bpmn2_0; de.hpi.diagram; java.util; | 679,971 |
File getFileObject( String studyUID, String seriesUID, String instanceUID, String key );
| File getFileObject( String studyUID, String seriesUID, String instanceUID, String key ); | /**
* Return the File object to get or store a file for given arguments.
* <p>
* If the cache object referenced with arguments is'nt in this cache the returned file object
* exists() method will result false!
* @param studyUID Unique identifier of the study.
* @param seriesUID Unique identifier of the ser... | Return the File object to get or store a file for given arguments. If the cache object referenced with arguments is'nt in this cache the returned file object exists() method will result false | getFileObject | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4CHEE_2_10_15/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/cache/WADOCache.java",
"license": "apache-2.0",
"size": 9005
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 795,082 |
public void openCore() throws StandardException
{
beginTime = getCurrentTimeMillis();
if (SanityManager.DEBUG)
SanityManager.ASSERT( ! isOpen, "SetOpResultSet already open");
leftSource.openCore();
try {
rightSource.openCore();
rightInputRow = rightSource.getNext... | void function() throws StandardException { beginTime = getCurrentTimeMillis(); if (SanityManager.DEBUG) SanityManager.ASSERT( ! isOpen, STR); leftSource.openCore(); try { rightSource.openCore(); rightInputRow = rightSource.getNextRowCore(); } catch (StandardException e) { isOpen = true; try { close(); } catch (Standard... | /**
* open the first source.
* @exception StandardException thrown on failure
*/ | open the first source | openCore | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java",
"license": "apache-2.0",
"size": 13858
} | [
"org.apache.derby.shared.common.error.StandardException",
"org.apache.derby.shared.common.sanity.SanityManager"
] | import org.apache.derby.shared.common.error.StandardException; import org.apache.derby.shared.common.sanity.SanityManager; | import org.apache.derby.shared.common.error.*; import org.apache.derby.shared.common.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 625,116 |
@Nonnull
public SchedulingGroupCollectionRequest top(final int value) {
addTopOption(value);
return this;
} | SchedulingGroupCollectionRequest function(final int value) { addTopOption(value); return this; } | /**
* Sets the top value for the request
*
* @param value the max number of items to return
* @return the updated request
*/ | Sets the top value for the request | top | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/SchedulingGroupCollectionRequest.java",
"license": "mit",
"size": 5868
} | [
"com.microsoft.graph.requests.SchedulingGroupCollectionRequest"
] | import com.microsoft.graph.requests.SchedulingGroupCollectionRequest; | import com.microsoft.graph.requests.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 2,529,079 |
public ValueModel getCategoryUsed(Category category) {
if(d_categoryUsed.get(category) == null) {
d_categoryUsed.put(category, createCategoryNotUsedModel(category));
}
return d_categoryUsed.get(category);
} | ValueModel function(Category category) { if(d_categoryUsed.get(category) == null) { d_categoryUsed.put(category, createCategoryNotUsedModel(category)); } return d_categoryUsed.get(category); } | /**
* A utility for checking if a category is used in the tree.
* @param category
* @return a ValueModel which is true when the category is used in the tree, false otherwise
*/ | A utility for checking if a category is used in the tree | getCategoryUsed | {
"repo_name": "drugis/addis",
"path": "application/src/main/java/org/drugis/addis/presentation/wizard/TreatmentCategorizationWizardPresentation.java",
"license": "gpl-3.0",
"size": 22103
} | [
"com.jgoodies.binding.value.ValueModel",
"org.drugis.addis.entities.treatment.Category"
] | import com.jgoodies.binding.value.ValueModel; import org.drugis.addis.entities.treatment.Category; | import com.jgoodies.binding.value.*; import org.drugis.addis.entities.treatment.*; | [
"com.jgoodies.binding",
"org.drugis.addis"
] | com.jgoodies.binding; org.drugis.addis; | 1,398,429 |
if (!(o instanceof Tuple)) {
return false;
}
Tuple<?, ?> p = (Tuple<?, ?>) o;
return Objects.equals(p.first, first) && Objects.equals(p.second, second);
} | if (!(o instanceof Tuple)) { return false; } Tuple<?, ?> p = (Tuple<?, ?>) o; return Objects.equals(p.first, first) && Objects.equals(p.second, second); } | /**
* Checks the two objects for equality by delegating to their respective
* {@link Object#equals(Object)} methods.
*
* @param o the {@link Tuple} to which this one is to be checked for equality
* @return true if the underlying objects of the Tuple are both considered
* equal
*/ | Checks the two objects for equality by delegating to their respective <code>Object#equals(Object)</code> methods | equals | {
"repo_name": "yzbzz/beautifullife",
"path": "iannotation/src/main/java/com/iannotation/Tuple.java",
"license": "apache-2.0",
"size": 1789
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,293,111 |
@PrePersist
public void populateDbFields() {
if (templateParams != null) {
// add new entries
for (Entry<String, String> e : templateParams.entrySet()) {
ActivityTemplateParamsDb a = templateParamsDb.get(e.getKey());
if (a == null) {
a = new ActivityTemplateParamsDb();
... | void function() { if (templateParams != null) { for (Entry<String, String> e : templateParams.entrySet()) { ActivityTemplateParamsDb a = templateParamsDb.get(e.getKey()); if (a == null) { a = new ActivityTemplateParamsDb(); a.name = e.getKey(); a.value = e.getValue(); a.activity = this; templateParamsDb.put(e.getKey(),... | /**
* Hook into the pre persist JPA event to take the transient fields and
* populate the DB fields prior to persisting the data.
*/ | Hook into the pre persist JPA event to take the transient fields and populate the DB fields prior to persisting the data | populateDbFields | {
"repo_name": "inevo/shindig-1.1-BETA5-incubating",
"path": "java/samples/src/main/java/org/apache/shindig/social/opensocial/jpa/ActivityDb.java",
"license": "apache-2.0",
"size": 16394
} | [
"com.google.common.collect.Lists",
"java.util.List",
"java.util.Map"
] | import com.google.common.collect.Lists; import java.util.List; import java.util.Map; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,551,593 |
public static Region createPartionedRegion(String regionname, PartitionAttributes prattribs)
throws RegionExistsException {
AttributesFactory attribFactory = new AttributesFactory();
attribFactory.setDataPolicy(DataPolicy.PARTITION);
attribFactory.setPartitionAttributes(prattribs);
RegionAttribu... | static Region function(String regionname, PartitionAttributes prattribs) throws RegionExistsException { AttributesFactory attribFactory = new AttributesFactory(); attribFactory.setDataPolicy(DataPolicy.PARTITION); attribFactory.setPartitionAttributes(prattribs); RegionAttributes regionAttribs = attribFactory.create(); ... | /**
* This method creates a partitioned region with the given PR attributes. The cache created is a
* loner, so this is only suitable for single VM tests.
*/ | This method creates a partitioned region with the given PR attributes. The cache created is a loner, so this is only suitable for single VM tests | createPartionedRegion | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-junit/src/main/java/org/apache/geode/internal/cache/PartitionedRegionTestHelper.java",
"license": "apache-2.0",
"size": 10681
} | [
"org.apache.geode.cache.AttributesFactory",
"org.apache.geode.cache.DataPolicy",
"org.apache.geode.cache.PartitionAttributes",
"org.apache.geode.cache.Region",
"org.apache.geode.cache.RegionAttributes",
"org.apache.geode.cache.RegionExistsException"
] | import org.apache.geode.cache.AttributesFactory; import org.apache.geode.cache.DataPolicy; import org.apache.geode.cache.PartitionAttributes; import org.apache.geode.cache.Region; import org.apache.geode.cache.RegionAttributes; import org.apache.geode.cache.RegionExistsException; | import org.apache.geode.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,969,504 |
Scope getScope(String name); | Scope getScope(String name); | /**
* Return the scope for the given name.
*
* @param name
* The name.
* @return The scope.
*/ | Return the scope for the given name | getScope | {
"repo_name": "khmarbaise/jqassistant",
"path": "core/plugin/src/main/java/com/buschmais/jqassistant/core/plugin/api/ScopePluginRepository.java",
"license": "gpl-3.0",
"size": 688
} | [
"com.buschmais.jqassistant.core.scanner.api.Scope"
] | import com.buschmais.jqassistant.core.scanner.api.Scope; | import com.buschmais.jqassistant.core.scanner.api.*; | [
"com.buschmais.jqassistant"
] | com.buschmais.jqassistant; | 1,235,103 |
public boolean initialValue(CacheObject val,
GridCacheVersion ver,
@Nullable MvccVersion mvccVer,
@Nullable MvccVersion newMvccVer,
byte mvccTxState,
byte newMvccTxState,
long ttl,
long expireTime,
boolean preload,
AffinityTopologyVersion topVe... | boolean function(CacheObject val, GridCacheVersion ver, @Nullable MvccVersion mvccVer, @Nullable MvccVersion newMvccVer, byte mvccTxState, byte newMvccTxState, long ttl, long expireTime, boolean preload, AffinityTopologyVersion topVer, GridDrType drType, boolean fromStore, @Nullable CacheDataRow row) throws IgniteCheck... | /**
* Sets new value if current version is <tt>0</tt>
*
* @param val New value.
* @param ver Version to use.
* @param mvccVer Mvcc version.
* @param newMvccVer New mvcc version.
* @param mvccTxState Tx state hint for mvcc version.
* @param newMvccTxState Tx state hint for new mvc... | Sets new value if current version is 0 | initialValue | {
"repo_name": "nizhikov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java",
"license": "apache-2.0",
"size": 47298
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion",
"org.apache.ignite.internal.processors.cache.mvcc.MvccVersion",
"org.apache.ignite.internal.processors.cache.persistence.CacheDataRow",
"org.apache.ignite.internal.processors.cache.version.G... | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.mvcc.MvccVersion; import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow; import org.apache.ignite.internal.processors.c... | import org.apache.ignite.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.mvcc.*; import org.apache.ignite.internal.processors.cache.persistence.*; import org.apache.ignite.internal.processors.cache.version.*; import org.apache.ignite.internal.processors.dr.... | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 2,825,920 |
@Override
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
MessageDispatch info = (MessageDispatch) o;
int rc = super.tightMarshal1(wireFormat, o, bs);
rc += tightMarshalCachedObject1(wireFormat, info.getConsumerId(), bs);
rc +... | int function(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { MessageDispatch info = (MessageDispatch) o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, info.getConsumerId(), bs); rc += tightMarshalCachedObject1(wireFormat, info.getDestination(), ... | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | tightMarshal1 | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v2/MessageDispatchMarshaller.java",
"license": "apache-2.0",
"size": 5460
} | [
"java.io.IOException",
"org.apache.activemq.openwire.codec.BooleanStream",
"org.apache.activemq.openwire.codec.OpenWireFormat",
"org.apache.activemq.openwire.commands.MessageDispatch"
] | import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.MessageDispatch; | import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 125,167 |
public boolean reschedule() {
final ResourceResolver resolver = this.configuration.createResourceResolver();
try {
final Resource jobResource = resolver.getResource(job.getResourcePath());
if ( jobResource != null ) {
final ModifiableValueMap mvm = jobResource... | boolean function() { final ResourceResolver resolver = this.configuration.createResourceResolver(); try { final Resource jobResource = resolver.getResource(job.getResourcePath()); if ( jobResource != null ) { final ModifiableValueMap mvm = jobResource.adaptTo(ModifiableValueMap.class); mvm.put(Job.PROPERTY_JOB_RETRY_CO... | /**
* Reschedule the job
* Update the retry count and remove the started time.
* @return <code>true</code> if rescheduling was successful, <code>false</code> otherwise.
*/ | Reschedule the job Update the retry count and remove the started time | reschedule | {
"repo_name": "tmaret/sling",
"path": "bundles/extensions/event/resource/src/main/java/org/apache/sling/event/impl/jobs/JobHandler.java",
"license": "apache-2.0",
"size": 11765
} | [
"java.util.Calendar",
"org.apache.sling.api.resource.ModifiableValueMap",
"org.apache.sling.api.resource.PersistenceException",
"org.apache.sling.api.resource.Resource",
"org.apache.sling.api.resource.ResourceResolver",
"org.apache.sling.event.jobs.Job"
] | import java.util.Calendar; import org.apache.sling.api.resource.ModifiableValueMap; import org.apache.sling.api.resource.PersistenceException; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceResolver; import org.apache.sling.event.jobs.Job; | import java.util.*; import org.apache.sling.api.resource.*; import org.apache.sling.event.jobs.*; | [
"java.util",
"org.apache.sling"
] | java.util; org.apache.sling; | 2,188,991 |
public CategoryURLGenerator getURLGenerator(int series, int item);
| CategoryURLGenerator function(int series, int item); | /**
* Returns the URL generator for an item.
*
* @param series the series index (zero-based).
* @param item the item index (zero-based).
*
* @return The item URL generator.
*/ | Returns the URL generator for an item | getURLGenerator | {
"repo_name": "SpoonLabs/astor",
"path": "examples/chart_11/source/org/jfree/chart/renderer/category/CategoryItemRenderer.java",
"license": "gpl-2.0",
"size": 64985
} | [
"org.jfree.chart.urls.CategoryURLGenerator"
] | import org.jfree.chart.urls.CategoryURLGenerator; | import org.jfree.chart.urls.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,678,502 |
protected void doPaint(GC gc) {
if (fModel == null || fTextViewer == null)
return;
IAnnotationAccessExtension annotationAccessExtension= null;
if (fAnnotationAccess instanceof IAnnotationAccessExtension)
annotationAccessExtension= (IAnnotationAccessExtension) fAnnotationAccess;
StyledText styledText... | void function(GC gc) { if (fModel == null fTextViewer == null) return; IAnnotationAccessExtension annotationAccessExtension= null; if (fAnnotationAccess instanceof IAnnotationAccessExtension) annotationAccessExtension= (IAnnotationAccessExtension) fAnnotationAccess; StyledText styledText= fTextViewer.getTextWidget(); I... | /**
* Draws the vertical ruler w/o drawing the Canvas background.
*
* @param gc the GC to draw into
*/ | Draws the vertical ruler w/o drawing the Canvas background | doPaint | {
"repo_name": "neelance/jface4ruby",
"path": "jface4ruby/src/org/eclipse/jface/text/source/VerticalRuler.java",
"license": "epl-1.0",
"size": 16348
} | [
"java.util.Iterator",
"org.eclipse.jface.text.BadLocationException",
"org.eclipse.jface.text.IDocument",
"org.eclipse.jface.text.IRegion",
"org.eclipse.jface.text.JFaceTextUtil",
"org.eclipse.jface.text.Position",
"org.eclipse.swt.custom.StyledText",
"org.eclipse.swt.graphics.Point",
"org.eclipse.sw... | import java.util.Iterator; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.JFaceTextUtil; import org.eclipse.jface.text.Position; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.graphics.Po... | import java.util.*; import org.eclipse.jface.text.*; import org.eclipse.swt.custom.*; import org.eclipse.swt.graphics.*; | [
"java.util",
"org.eclipse.jface",
"org.eclipse.swt"
] | java.util; org.eclipse.jface; org.eclipse.swt; | 1,998,556 |
return new Builder();
}
public static class Builder {
private String source;
private String destination;
private SegmentNodeStorePersistence srcPersistence;
private SegmentNodeStorePersistence destPersistence;
private PrintWriter outWriter;
private Pri... | return new Builder(); } public static class Builder { private String source; private String destination; private SegmentNodeStorePersistence srcPersistence; private SegmentNodeStorePersistence destPersistence; private PrintWriter outWriter; private PrintWriter errWriter; private Integer revisionsCount = Integer.MAX_VAL... | /**
* Create a builder for the {@link SegmentCopy} command.
*
* @return an instance of {@link Builder}.
*/ | Create a builder for the <code>SegmentCopy</code> command | builder | {
"repo_name": "apache/jackrabbit-oak",
"path": "oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/tool/SegmentCopy.java",
"license": "apache-2.0",
"size": 14653
} | [
"java.io.PrintWriter",
"org.apache.jackrabbit.oak.segment.spi.persistence.SegmentNodeStorePersistence"
] | import java.io.PrintWriter; import org.apache.jackrabbit.oak.segment.spi.persistence.SegmentNodeStorePersistence; | import java.io.*; import org.apache.jackrabbit.oak.segment.spi.persistence.*; | [
"java.io",
"org.apache.jackrabbit"
] | java.io; org.apache.jackrabbit; | 1,052,587 |
public TaskState setLastUpdateDateTime(OffsetDateTime lastUpdateDateTime) {
this.lastUpdateDateTime = lastUpdateDateTime;
return this;
} | TaskState function(OffsetDateTime lastUpdateDateTime) { this.lastUpdateDateTime = lastUpdateDateTime; return this; } | /**
* Set the lastUpdateDateTime property: The lastUpdateDateTime property.
*
* @param lastUpdateDateTime the lastUpdateDateTime value to set.
* @return the TaskState object itself.
*/ | Set the lastUpdateDateTime property: The lastUpdateDateTime property | setLastUpdateDateTime | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/models/TaskState.java",
"license": "mit",
"size": 2368
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,649,424 |
public void setAuthenticationService(MutableAuthenticationService authenticationService)
{
this.authenticationService = authenticationService;
} | void function(MutableAuthenticationService authenticationService) { this.authenticationService = authenticationService; } | /**
* Sets the authentication service.
*
* @param authenticationService
* the authentication service
*/ | Sets the authentication service | setAuthenticationService | {
"repo_name": "surevine/alfresco-repository-client-customisations",
"path": "source/java/com/surevine/alfresco/repo/jscript/People.java",
"license": "gpl-2.0",
"size": 36669
} | [
"org.alfresco.service.cmr.security.MutableAuthenticationService"
] | import org.alfresco.service.cmr.security.MutableAuthenticationService; | import org.alfresco.service.cmr.security.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 2,385,682 |
// TODO : this function have been created specially to match the clean price as it come from bloomberg (ie without specification if it is real or nominal), maybe remove at one point.
public double zSpreadFromCurvesAndCleanPriceDirect(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface i... | double function(final BondCapitalIndexedSecurity<?> bond, final InflationIssuerProviderInterface issuerMulticurves, final double cleanPrice) { | /**
* Computes a bond z-spread from the curves and a present value.
* The z-spread is a parallel shift applied to the discounting curve associated to the bond (Issuer Entity) to match the present value.
* @param bond The bond.
* @param issuerMulticurves The issuer and multi-curves provider.
* @param clea... | Computes a bond z-spread from the curves and a present value. The z-spread is a parallel shift applied to the discounting curve associated to the bond (Issuer Entity) to match the present value | zSpreadFromCurvesAndCleanPriceDirect | {
"repo_name": "ChinaQuants/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/bond/provider/BondCapitalIndexedSecurityDiscountingMethod.java",
"license": "apache-2.0",
"size": 37503
} | [
"com.opengamma.analytics.financial.interestrate.bond.definition.BondCapitalIndexedSecurity",
"com.opengamma.analytics.financial.provider.description.inflation.InflationIssuerProviderInterface"
] | import com.opengamma.analytics.financial.interestrate.bond.definition.BondCapitalIndexedSecurity; import com.opengamma.analytics.financial.provider.description.inflation.InflationIssuerProviderInterface; | import com.opengamma.analytics.financial.interestrate.bond.definition.*; import com.opengamma.analytics.financial.provider.description.inflation.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 1,422,603 |
@Override
public int getMaxItemUseDuration(ItemStack par1ItemStack) {
return 32;
} | int function(ItemStack par1ItemStack) { return 32; } | /**
* How long it takes to use or consume an item
*/ | How long it takes to use or consume an item | getMaxItemUseDuration | {
"repo_name": "dougvanhorn/Still-Hungry",
"path": "src/main/java/net/seventeencups/stillhungry/item/ItemMugFilled.java",
"license": "gpl-3.0",
"size": 1972
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,630,606 |
// public Vision getColorVision();
public SimpleColorPalette getDefaultColorPalette(); | SimpleColorPalette function(); | /**
* For color blindness or "normal vision"
*
* @return
*/ | For color blindness or "normal vision" | getDefaultColorPalette | {
"repo_name": "tomas-pluskal/mzmine3",
"path": "src/main/java/io/github/mzmine/main/MZmineConfiguration.java",
"license": "gpl-2.0",
"size": 3214
} | [
"io.github.mzmine.util.color.SimpleColorPalette"
] | import io.github.mzmine.util.color.SimpleColorPalette; | import io.github.mzmine.util.color.*; | [
"io.github.mzmine"
] | io.github.mzmine; | 1,824,805 |
@SimpleFunction (description = "The hour of the day")
public static int Hour(Calendar instant) {
return Dates.Hour(instant);
} | @SimpleFunction (description = STR) static int function(Calendar instant) { return Dates.Hour(instant); } | /**
* Returns the hours for the given date.
*
* @param instant Calendar to use hours of
* @return hours (range 0 - 23)
*/ | Returns the hours for the given date | Hour | {
"repo_name": "mark-friedman/app-inventor-from-google-code",
"path": "src/components/runtime/components/android/Clock.java",
"license": "apache-2.0",
"size": 12789
} | [
"com.google.devtools.simple.runtime.Dates",
"com.google.devtools.simple.runtime.annotations.SimpleFunction",
"java.util.Calendar"
] | import com.google.devtools.simple.runtime.Dates; import com.google.devtools.simple.runtime.annotations.SimpleFunction; import java.util.Calendar; | import com.google.devtools.simple.runtime.*; import com.google.devtools.simple.runtime.annotations.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 1,279,316 |
public SearchSourceBuilder indexBoost(String index, float indexBoost) {
if (this.indexBoost == null) {
this.indexBoost = new ObjectFloatOpenHashMap<>();
}
this.indexBoost.put(index, indexBoost);
return this;
} | SearchSourceBuilder function(String index, float indexBoost) { if (this.indexBoost == null) { this.indexBoost = new ObjectFloatOpenHashMap<>(); } this.indexBoost.put(index, indexBoost); return this; } | /**
* Sets the boost a specific index will receive when the query is executeed against it.
*
* @param index The index to apply the boost against
* @param indexBoost The boost to apply to the index
*/ | Sets the boost a specific index will receive when the query is executeed against it | indexBoost | {
"repo_name": "0359xiaodong/elasticsearch",
"path": "src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java",
"license": "apache-2.0",
"size": 29314
} | [
"com.carrotsearch.hppc.ObjectFloatOpenHashMap"
] | import com.carrotsearch.hppc.ObjectFloatOpenHashMap; | import com.carrotsearch.hppc.*; | [
"com.carrotsearch.hppc"
] | com.carrotsearch.hppc; | 1,324,771 |
public static BodyBuilder put(String urlTemplate, Object... uriVars) {
return method(HttpMethod.PUT, urlTemplate, uriVars);
} | static BodyBuilder function(String urlTemplate, Object... uriVars) { return method(HttpMethod.PUT, urlTemplate, uriVars); } | /**
* HTTP PUT variant. See {@link #get(String, Object...)} for general info.
* {@link BaseBuilder#queryParam queryParam} builder methods.
* @param urlTemplate a URL template; the resulting URL will be encoded
* @param uriVars zero or more URI variables
* @return the created builder
*/ | HTTP PUT variant. See <code>#get(String, Object...)</code> for general info. <code>BaseBuilder#queryParam queryParam</code> builder methods | put | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpRequest.java",
"license": "apache-2.0",
"size": 18107
} | [
"org.springframework.http.HttpMethod"
] | import org.springframework.http.HttpMethod; | import org.springframework.http.*; | [
"org.springframework.http"
] | org.springframework.http; | 1,711,454 |
@SuppressWarnings({ "unchecked", "rawtypes" })
protected void prepareCompilerSetting() {
compilerSettings = new HashMap();
compilerSettings.put(CompilerOptions.OPTION_LineNumberAttribute,
CompilerOptions.GENERATE);
compilerSettings.put(CompilerOptions.OPTION_SourceFileAttribute,
Compile... | @SuppressWarnings({ STR, STR }) void function() { compilerSettings = new HashMap(); compilerSettings.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.GENERATE); compilerSettings.put(CompilerOptions.OPTION_SourceFileAttribute, CompilerOptions.GENERATE); compilerSettings.put(CompilerOptions.OPTION_Source, ... | /**
* Sets compiler options for JDT Compiler
*/ | Sets compiler options for JDT Compiler | prepareCompilerSetting | {
"repo_name": "phiLangley/openPHD",
"path": "[CODE]/processing/modes/ExperimentalMode/src/processing/mode/experimental/ErrorCheckerService.java",
"license": "gpl-2.0",
"size": 52289
} | [
"java.util.HashMap",
"org.eclipse.jdt.internal.compiler.impl.CompilerOptions"
] | import java.util.HashMap; import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; | import java.util.*; import org.eclipse.jdt.internal.compiler.impl.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 2,427,652 |
static boolean isObjectLitKey(Node node, Node parent) {
switch (node.getType()) {
case Token.STRING_KEY:
case Token.GETTER_DEF:
case Token.SETTER_DEF:
return true;
}
return false;
} | static boolean isObjectLitKey(Node node, Node parent) { switch (node.getType()) { case Token.STRING_KEY: case Token.GETTER_DEF: case Token.SETTER_DEF: return true; } return false; } | /**
* Determines whether a node represents an object literal key
* (e.g. key1 in {key1: value1, key2: value2}).
*
* @param node A node
* @param parent The node's parent
*/ | Determines whether a node represents an object literal key (e.g. key1 in {key1: value1, key2: value2}) | isObjectLitKey | {
"repo_name": "ajukraine/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 95188
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,152,880 |
public String getRemoteHost() {
return remoteAddress == null ? null :
remoteAddress.getAddress() == null ? remoteAddress.getHostName()
: NetUtils.filterLocalHost(remoteAddress.getAddress().getHostAddress());
}
| String function() { return remoteAddress == null ? null : remoteAddress.getAddress() == null ? remoteAddress.getHostName() : NetUtils.filterLocalHost(remoteAddress.getAddress().getHostAddress()); } | /**
* get remote host.
*
* @return remote host
*/ | get remote host | getRemoteHost | {
"repo_name": "alibaba/dubbo",
"path": "dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcContext.java",
"license": "apache-2.0",
"size": 20662
} | [
"org.apache.dubbo.common.utils.NetUtils"
] | import org.apache.dubbo.common.utils.NetUtils; | import org.apache.dubbo.common.utils.*; | [
"org.apache.dubbo"
] | org.apache.dubbo; | 276,209 |
public static boolean verifyImportCharacters(String pidParam) {
Pattern p = Pattern.compile(BundleUtil.getStringFromBundle("pid.allowedCharacters"));
Matcher m = p.matcher(pidParam);
return m.matches();
} | static boolean function(String pidParam) { Pattern p = Pattern.compile(BundleUtil.getStringFromBundle(STR)); Matcher m = p.matcher(pidParam); return m.matches(); } | /**
* Verifies that the pid only contains allowed characters.
*
* @param pidParam
* @return true if pid only contains allowed characters false if pid
* contains characters not specified in the allowed characters regex.
*/ | Verifies that the pid only contains allowed characters | verifyImportCharacters | {
"repo_name": "JayanthyChengan/dataverse",
"path": "src/main/java/edu/harvard/iq/dataverse/GlobalId.java",
"license": "apache-2.0",
"size": 8260
} | [
"edu.harvard.iq.dataverse.util.BundleUtil",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import edu.harvard.iq.dataverse.util.BundleUtil; import java.util.regex.Matcher; import java.util.regex.Pattern; | import edu.harvard.iq.dataverse.util.*; import java.util.regex.*; | [
"edu.harvard.iq",
"java.util"
] | edu.harvard.iq; java.util; | 1,807,573 |
@Nullable
public ExternalItem post(@Nonnull final ExternalItem newExternalItem) throws ClientException {
return send(HttpMethod.POST, newExternalItem);
} | ExternalItem function(@Nonnull final ExternalItem newExternalItem) throws ClientException { return send(HttpMethod.POST, newExternalItem); } | /**
* Creates a ExternalItem with a new object
*
* @param newExternalItem the new object to create
* @return the created ExternalItem
* @throws ClientException this exception occurs if the request was unable to complete for any reason
*/ | Creates a ExternalItem with a new object | post | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/externalconnectors/requests/ExternalItemRequest.java",
"license": "mit",
"size": 5810
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.externalconnectors.models.ExternalItem",
"com.microsoft.graph.http.HttpMethod",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.externalconnectors.models.ExternalItem; import com.microsoft.graph.http.HttpMethod; import javax.annotation.Nonnull; | import com.microsoft.graph.core.*; import com.microsoft.graph.externalconnectors.models.*; import com.microsoft.graph.http.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 2,005,452 |
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<DeviceInner> listAsync(
Integer limit, String skipToken, ManagementState deviceManagementType, Context context) {
return new PagedFlux<>(
() -> listSinglePageAsync(limit, skipToken, deviceManagementType, context),
... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<DeviceInner> function( Integer limit, String skipToken, ManagementState deviceManagementType, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(limit, skipToken, deviceManagementType, context), nextLink -> listNextSinglePageAsync(nextLink, con... | /**
* Get list of the devices by their subscription.
*
* @param limit Limit the number of items returned in a single page.
* @param skipToken Skip token used for pagination.
* @param deviceManagementType Get devices only from specific type, Managed or Unmanaged.
* @param context The contex... | Get list of the devices by their subscription | listAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/implementation/DevicesForSubscriptionsClientImpl.java",
"license": "mit",
"size": 16286
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.core.util.Context",
"com.azure.resourcemanager.security.fluent.models.DeviceInner",
"com.azure.resourcemanager.security.models.ManagementState"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.security.fluent.models.DeviceInner; import com.azure.resourcemanager.security.models.ManagementState; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.security.fluent.models.*; import com.azure.resourcemanager.security.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 763,615 |
private CharSequence[] getSensorList() {
SensorManager sensorManager = (SensorManager)getActivity().getSystemService(SENSOR_SERVICE);
List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL);
List<String> sensorListString = new ArrayList<String>();
f... | CharSequence[] function() { SensorManager sensorManager = (SensorManager)getActivity().getSystemService(SENSOR_SERVICE); List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL); List<String> sensorListString = new ArrayList<String>(); for (Sensor sensor : sensorList) { sensorListString.add(sensor.getName... | /**
* Get phone sensor list by name
* @return
*/ | Get phone sensor list by name | getSensorList | {
"repo_name": "kenyoneda/ActiTracker",
"path": "mobile/src/main/java/wisdm/cis/fordham/edu/actitracker/SettingsActivity.java",
"license": "mit",
"size": 9395
} | [
"android.hardware.Sensor",
"android.hardware.SensorManager",
"java.util.ArrayList",
"java.util.List"
] | import android.hardware.Sensor; import android.hardware.SensorManager; import java.util.ArrayList; import java.util.List; | import android.hardware.*; import java.util.*; | [
"android.hardware",
"java.util"
] | android.hardware; java.util; | 395,152 |
public String getString(String key, String defaultValue) {
mSharedPreferences = mContext.getSharedPreferences(APP_PREFS, Context.MODE_PRIVATE);
return mSharedPreferences.getString(key, defaultValue);
} | String function(String key, String defaultValue) { mSharedPreferences = mContext.getSharedPreferences(APP_PREFS, Context.MODE_PRIVATE); return mSharedPreferences.getString(key, defaultValue); } | /**
* Retrieve a String value from the preferences.
*
* @param key The name of the preference to retrieve.
* @param defaultValue Value to return if this preference does not exist.
* @return Returns the preference value if it exists, or defaultValue.
* Throws ClassCastException if ... | Retrieve a String value from the preferences | getString | {
"repo_name": "avinashkgit/Watook",
"path": "app/src/main/java/com/watook/util/SharedPrefUtil.java",
"license": "apache-2.0",
"size": 5332
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 179,502 |
protected void performDelete() throws IOException, InterruptedException {
getConfigFile().delete();
Util.deleteRecursive(getRootDir());
} | void function() throws IOException, InterruptedException { getConfigFile().delete(); Util.deleteRecursive(getRootDir()); } | /**
* Does the real job of deleting the item.
*/ | Does the real job of deleting the item | performDelete | {
"repo_name": "keyurpatankar/hudson",
"path": "core/src/main/java/hudson/model/AbstractItem.java",
"license": "mit",
"size": 27220
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 486,637 |
@Test public void testMergeUnionMixed() throws Exception {
HepProgram program = new HepProgramBuilder()
.addRuleInstance(UnionMergeRule.INSTANCE)
.build();
final String sql = "select * from emp where deptno = 10\n"
+ "union\n"
+ "select * from emp where deptno = 20\n"
... | @Test void function() throws Exception { HepProgram program = new HepProgramBuilder() .addRuleInstance(UnionMergeRule.INSTANCE) .build(); final String sql = STR + STR + STR + STR + STR; sql(sql).with(program).checkUnchanged(); } | /** Tests that {@link UnionMergeRule} does nothing if its arguments have
* different {@code ALL} settings. */ | Tests that <code>UnionMergeRule</code> does nothing if its arguments have | testMergeUnionMixed | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java",
"license": "apache-2.0",
"size": 255036
} | [
"org.apache.calcite.plan.hep.HepProgram",
"org.apache.calcite.plan.hep.HepProgramBuilder",
"org.apache.calcite.rel.rules.UnionMergeRule",
"org.junit.Test"
] | import org.apache.calcite.plan.hep.HepProgram; import org.apache.calcite.plan.hep.HepProgramBuilder; import org.apache.calcite.rel.rules.UnionMergeRule; import org.junit.Test; | import org.apache.calcite.plan.hep.*; import org.apache.calcite.rel.rules.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 2,617,398 |
void unicast(Player player, Packet packet); | void unicast(Player player, Packet packet); | /**
* Sends a packet to a player without blocking.
*
* @param player Player.
* @param packet Packet.
*/ | Sends a packet to a player without blocking | unicast | {
"repo_name": "phxql/gamedev-server",
"path": "src/main/java/edu/hm/gamedev/server/services/communication/CommunicationService.java",
"license": "lgpl-3.0",
"size": 2346
} | [
"edu.hm.gamedev.server.model.Player",
"edu.hm.gamedev.server.packets.Packet"
] | import edu.hm.gamedev.server.model.Player; import edu.hm.gamedev.server.packets.Packet; | import edu.hm.gamedev.server.model.*; import edu.hm.gamedev.server.packets.*; | [
"edu.hm.gamedev"
] | edu.hm.gamedev; | 1,625,065 |
public com.google.cloud.securitycenter.v1beta1.ListSourcesResponse listSources(
com.google.cloud.securitycenter.v1beta1.ListSourcesRequest request) {
return blockingUnaryCall(
getChannel(), getListSourcesMethodHelper(), getCallOptions(), request);
} | com.google.cloud.securitycenter.v1beta1.ListSourcesResponse function( com.google.cloud.securitycenter.v1beta1.ListSourcesRequest request) { return blockingUnaryCall( getChannel(), getListSourcesMethodHelper(), getCallOptions(), request); } | /**
*
*
* <pre>
* Lists all sources belonging to an organization.
* </pre>
*/ | <code> Lists all sources belonging to an organization. </code> | listSources | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-api-grpc/grpc-google-cloud-securitycenter-v1beta1/src/main/java/com/google/cloud/securitycenter/v1beta1/SecurityCenterGrpc.java",
"license": "apache-2.0",
"size": 108507
} | [
"io.grpc.stub.ClientCalls"
] | import io.grpc.stub.ClientCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 1,329 |
public synchronized void save(CloudObject object) {
if(storageQueue.contains(object)) {
storageQueue.remove(object);
}
storageQueue.addElement(object);
Storage.getInstance().writeObject("CN1StorageQueue", storageQueue);
object.setStatus(CloudObject.STATUS_COMMIT_I... | synchronized void function(CloudObject object) { if(storageQueue.contains(object)) { storageQueue.remove(object); } storageQueue.addElement(object); Storage.getInstance().writeObject(STR, storageQueue); object.setStatus(CloudObject.STATUS_COMMIT_IN_PROGRESS); } | /**
* Adds the given object to the save queue, the operation will only take place once committed
* @param object the object to save into the cloud, new objects are inserted. existing
* objects are updated
*/ | Adds the given object to the save queue, the operation will only take place once committed | save | {
"repo_name": "JrmyDev/CodenameOne",
"path": "CodenameOne/src/com/codename1/cloud/CloudStorage.java",
"license": "gpl-2.0",
"size": 45619
} | [
"com.codename1.io.Storage"
] | import com.codename1.io.Storage; | import com.codename1.io.*; | [
"com.codename1.io"
] | com.codename1.io; | 301,216 |
void log(Logger useLogger);
// Embodiement ... | void log(Logger useLogger); | /**
* <p>Log state information for the class source to a specified
* logger. State information uses 'debug' log enablement.</p>
*
* @param useLogger A logger which is to receive state information.
*/ | Log state information for the class source to a specified logger. State information uses 'debug' log enablement | log | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.anno/src/com/ibm/wsspi/annocache/classsource/ClassSource_Aggregate.java",
"license": "epl-1.0",
"size": 23466
} | [
"java.util.logging.Logger"
] | import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,045,496 |
public Session getSession() throws RepositoryException {
RepositoryService repositoryService = (RepositoryService) ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(RepositoryService.class);
SessionProviderService sessionProviderService = (SessionProviderService) ExoContainerContext.getCurr... | Session function() throws RepositoryException { RepositoryService repositoryService = (RepositoryService) ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(RepositoryService.class); SessionProviderService sessionProviderService = (SessionProviderService) ExoContainerContext.getCurrentContainer().getC... | /**
* Get a JCR Session
* @return A JCR Session
* @throws javax.jcr.RepositoryException
*/ | Get a JCR Session | getSession | {
"repo_name": "trangvh/spaces-administration",
"path": "services/src/main/java/org/exoplatform/addons/spacesadministration/SpacesAdministrationStorage.java",
"license": "lgpl-3.0",
"size": 8256
} | [
"javax.jcr.RepositoryException",
"javax.jcr.Session",
"org.exoplatform.container.ExoContainerContext",
"org.exoplatform.services.jcr.RepositoryService",
"org.exoplatform.services.jcr.core.ManageableRepository",
"org.exoplatform.services.jcr.ext.app.SessionProviderService"
] | import javax.jcr.RepositoryException; import javax.jcr.Session; import org.exoplatform.container.ExoContainerContext; import org.exoplatform.services.jcr.RepositoryService; import org.exoplatform.services.jcr.core.ManageableRepository; import org.exoplatform.services.jcr.ext.app.SessionProviderService; | import javax.jcr.*; import org.exoplatform.container.*; import org.exoplatform.services.jcr.*; import org.exoplatform.services.jcr.core.*; import org.exoplatform.services.jcr.ext.app.*; | [
"javax.jcr",
"org.exoplatform.container",
"org.exoplatform.services"
] | javax.jcr; org.exoplatform.container; org.exoplatform.services; | 2,466,403 |
public static String getFullDDLFromFieldSchema(String structName,
List<FieldSchema> fieldSchemas) {
StringBuilder ddl = new StringBuilder();
ddl.append(getDDLFromFieldSchema(structName, fieldSchemas));
ddl.append('#');
StringBuilder colnames = new StringBuilder();
StringBuilder coltypes = ne... | static String function(String structName, List<FieldSchema> fieldSchemas) { StringBuilder ddl = new StringBuilder(); ddl.append(getDDLFromFieldSchema(structName, fieldSchemas)); ddl.append('#'); StringBuilder colnames = new StringBuilder(); StringBuilder coltypes = new StringBuilder(); boolean first = true; for (FieldS... | /**
* Convert FieldSchemas to Thrift DDL + column names and column types
*
* @param structName
* The name of the table
* @param fieldSchemas
* List of fields along with their schemas
* @return String containing "Thrift
* DDL#comma-separated-column-names#colon-separated-... | Convert FieldSchemas to Thrift DDL + column names and column types | getFullDDLFromFieldSchema | {
"repo_name": "WANdisco/amplab-hive",
"path": "metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java",
"license": "apache-2.0",
"size": 59265
} | [
"java.util.List",
"org.apache.hadoop.hive.metastore.api.FieldSchema"
] | import java.util.List; import org.apache.hadoop.hive.metastore.api.FieldSchema; | import java.util.*; import org.apache.hadoop.hive.metastore.api.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,861,650 |
public HTable createTable(TableName tableName, byte[][] families,
int[] numVersions)
throws IOException {
HTableDescriptor desc = new HTableDescriptor(tableName);
int i = 0;
for (byte[] family : families) {
HColumnDescriptor hcd = new HColumnDescriptor(family)
.setMaxVersions(numVe... | HTable function(TableName tableName, byte[][] families, int[] numVersions) throws IOException { HTableDescriptor desc = new HTableDescriptor(tableName); int i = 0; for (byte[] family : families) { HColumnDescriptor hcd = new HColumnDescriptor(family) .setMaxVersions(numVersions[i]); desc.addFamily(hcd); i++; } getHBase... | /**
* Create a table.
* @param tableName
* @param families
* @param numVersions
* @return An HTable instance for the created table.
* @throws IOException
*/ | Create a table | createTable | {
"repo_name": "toshimasa-nasu/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 134883
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.client.HTable"
] | import java.io.IOException; import org.apache.hadoop.hbase.client.HTable; | import java.io.*; import org.apache.hadoop.hbase.client.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,981,106 |
@Override
public void setLeader(final Leader leader) {
this.leader = leader;
}
/**
* Gets the {@link Leader} for this {@link Record}.
*
* @return The {@link Leader} for this {@link Record} | void function(final Leader leader) { this.leader = leader; } /** * Gets the {@link Leader} for this {@link Record}. * * @return The {@link Leader} for this {@link Record} | /**
* Sets this {@link Record}'s {@link Leader}.
*
* @param leader A {@link Leader} to use in this record
*/ | Sets this <code>Record</code>'s <code>Leader</code> | setLeader | {
"repo_name": "Dyrcona/marc4j",
"path": "src/org/marc4j/marc/impl/RecordImpl.java",
"license": "lgpl-2.1",
"size": 13717
} | [
"org.marc4j.marc.Leader",
"org.marc4j.marc.Record"
] | import org.marc4j.marc.Leader; import org.marc4j.marc.Record; | import org.marc4j.marc.*; | [
"org.marc4j.marc"
] | org.marc4j.marc; | 1,852,019 |
public static void checkHasNoNullKeys (final Map <?, ?> map, final String mapName)
{
if (hasNullKeys (map)) illegalArgument (mapName, ArgumentStatus.NULL_KEYS);
} | static void function (final Map <?, ?> map, final String mapName) { if (hasNullKeys (map)) illegalArgument (mapName, ArgumentStatus.NULL_KEYS); } | /**
* Checks if the specified Map has any null keys. The check will pass if the Map itself is null, or if the map has any
* null values.
*
* @param map
* The Map to check, may be null.
* @param mapName
* The name of the Map to check, must not be null.
*
* @throws IllegalArgu... | Checks if the specified Map has any null keys. The check will pass if the Map itself is null, or if the map has any null values | checkHasNoNullKeys | {
"repo_name": "forerunnergames/fg-tools",
"path": "common/src/main/java/com/forerunnergames/tools/common/Arguments.java",
"license": "mit",
"size": 54025
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 575,935 |
public Collection<String> setUpDefaultMultiRepoServerWithRemotes(boolean http) throws Exception {
if (http) {
serveHttpRepos();
}
Repository repo1 = createRepo("repo1")//
.init("geogigUser", "repo1_Owner@geogig.org")//
.loadDefaultData()//
... | Collection<String> function(boolean http) throws Exception { if (http) { serveHttpRepos(); } Repository repo1 = createRepo("repo1") .loadDefaultData() String repo1Url = http ? getHttpLocation("repo1") : repo1.getLocation().toString(); Repository repo2 = createRepo("repo2") repo2.command(CloneOp.class).setRepositoryURL(... | /**
* Set up multiple repositories with remotes for testing.
*
* @return Collection of repository names created.
*
* @throws Exception
*/ | Set up multiple repositories with remotes for testing | setUpDefaultMultiRepoServerWithRemotes | {
"repo_name": "jdgarrett/geogig",
"path": "src/web/functional/src/test/java/org/geogig/web/functional/FunctionalTestContext.java",
"license": "bsd-3-clause",
"size": 17021
} | [
"com.google.common.base.Optional",
"com.google.common.base.Suppliers",
"java.util.Arrays",
"java.util.Collection",
"org.locationtech.geogig.model.RevObject",
"org.locationtech.geogig.plumbing.RevObjectParse",
"org.locationtech.geogig.porcelain.BranchDeleteOp",
"org.locationtech.geogig.porcelain.CloneO... | import com.google.common.base.Optional; import com.google.common.base.Suppliers; import java.util.Arrays; import java.util.Collection; import org.locationtech.geogig.model.RevObject; import org.locationtech.geogig.plumbing.RevObjectParse; import org.locationtech.geogig.porcelain.BranchDeleteOp; import org.locationtech.... | import com.google.common.base.*; import java.util.*; import org.locationtech.geogig.model.*; import org.locationtech.geogig.plumbing.*; import org.locationtech.geogig.porcelain.*; import org.locationtech.geogig.repository.*; | [
"com.google.common",
"java.util",
"org.locationtech.geogig"
] | com.google.common; java.util; org.locationtech.geogig; | 1,393,449 |
public Set<VulnerableSoftware> getVulnerableSoftware() {
return vulnerableSoftware;
} | Set<VulnerableSoftware> function() { return vulnerableSoftware; } | /**
* Get the value of vulnerableSoftware.
*
* @return the value of vulnerableSoftware
*/ | Get the value of vulnerableSoftware | getVulnerableSoftware | {
"repo_name": "stevespringett/DependencyCheck",
"path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Vulnerability.java",
"license": "apache-2.0",
"size": 14361
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,190,029 |
public static final DumbData[][] createDatas(final int[] pDatasPerRevision) {
final DumbData[][] returnVal = new DumbData[pDatasPerRevision.length][];
for (int i = 0; i < pDatasPerRevision.length; i++) {
returnVal[i] = new DumbData[pDatasPerRevision[i]];
for (int j = 0; j < p... | static final DumbData[][] function(final int[] pDatasPerRevision) { final DumbData[][] returnVal = new DumbData[pDatasPerRevision.length][]; for (int i = 0; i < pDatasPerRevision.length; i++) { returnVal[i] = new DumbData[pDatasPerRevision[i]]; for (int j = 0; j < pDatasPerRevision[i]; j++) { returnVal[i][j] = generate... | /**
* Generating new data-elements passed on a given number of datas within a revision
*
* @param pDatasPerRevision
* denote the number of datas within all versions
* @return a two-dimensional array containing the datas.
*/ | Generating new data-elements passed on a given number of datas within a revision | createDatas | {
"repo_name": "sebastiangraf/treetank",
"path": "thesismodules/integrity/src/main/java/org/treetank/bench/BenchUtils.java",
"license": "bsd-3-clause",
"size": 1387
} | [
"org.treetank.bucket.DumbDataFactory"
] | import org.treetank.bucket.DumbDataFactory; | import org.treetank.bucket.*; | [
"org.treetank.bucket"
] | org.treetank.bucket; | 6,563 |
public void update(Observable o, Object arg) {
// deliver tags only if the reader is not suspended
if (isStarted()) {
if (arg instanceof Tag) {
setChanged();
Tag tag = (Tag) arg;
tag.setReader(getName());
tag.addTrace(getName());
notifyObservers(tag);
} else if (arg instanceof List... | void function(Observable o, Object arg) { if (isStarted()) { if (arg instanceof Tag) { setChanged(); Tag tag = (Tag) arg; tag.setReader(getName()); tag.addTrace(getName()); notifyObservers(tag); } else if (arg instanceof List) { LOG.debug(STR); @SuppressWarnings(STR) List<Tag> tagList = (List<Tag>) arg; for (Tag tag : ... | /**
* implements the update-method for the observer-pattern for events.
* @param o the observed object
* @param arg the arguments passed by the observable
*/ | implements the update-method for the observer-pattern for events | update | {
"repo_name": "kyle0311/oliot-fc",
"path": "fc-server/src/main/java/org/fosstrak/ale/server/readers/CompositeReader.java",
"license": "lgpl-2.1",
"size": 7719
} | [
"java.util.List",
"java.util.Observable",
"org.fosstrak.ale.server.Tag"
] | import java.util.List; import java.util.Observable; import org.fosstrak.ale.server.Tag; | import java.util.*; import org.fosstrak.ale.server.*; | [
"java.util",
"org.fosstrak.ale"
] | java.util; org.fosstrak.ale; | 2,283,871 |
private byte[] createExpectedFormdataOutput(
String boundaryString,
String contentEncoding,
String titleField,
String titleValue,
String descriptionField,
String descriptionValue,
boolean firstMultipart,
boolean ... | byte[] function( String boundaryString, String contentEncoding, String titleField, String titleValue, String descriptionField, String descriptionValue, boolean firstMultipart, boolean lastMultipart) throws IOException { final byte[] DASH_DASH = "--".getBytes(ISO_8859_1); final ByteArrayOutputStream output = new ByteArr... | /**
* Create the expected output multipart/form-data, with only form data,
* and no file multipart.
* This method is copied from the PostWriterTest class
*
* @param lastMultipart true if this is the last multipart in the request
*/ | Create the expected output multipart/form-data, with only form data, and no file multipart. This method is copied from the PostWriterTest class | createExpectedFormdataOutput | {
"repo_name": "botelhojp/apache-jmeter-2.10",
"path": "test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java",
"license": "apache-2.0",
"size": 73627
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 72,298 |
@Test
public void testOffHeapSerialization() throws IOException
{
OffHeapBitSet bs = new OffHeapBitSet(100000);
populateAndReserialize(bs);
} | void function() throws IOException { OffHeapBitSet bs = new OffHeapBitSet(100000); populateAndReserialize(bs); } | /**
* Test serialization and de-serialization in-memory
*/ | Test serialization and de-serialization in-memory | testOffHeapSerialization | {
"repo_name": "DavidHerzogTU-Berlin/cassandraToRun",
"path": "test/unit/org/apache/cassandra/utils/BitSetTest.java",
"license": "apache-2.0",
"size": 4185
} | [
"java.io.IOException",
"org.apache.cassandra.utils.obs.OffHeapBitSet"
] | import java.io.IOException; import org.apache.cassandra.utils.obs.OffHeapBitSet; | import java.io.*; import org.apache.cassandra.utils.obs.*; | [
"java.io",
"org.apache.cassandra"
] | java.io; org.apache.cassandra; | 2,153,033 |
private IndexResult index(String repositoryName, Repository repository,
String branch, RevCommit commit) {
IndexResult result = new IndexResult();
try {
String [] encodings = storedSettings.getStrings(Keys.web.blobEncodings).toArray(new String[0]);
List<PathChangeModel> changedPaths = JGitUtils.ge... | IndexResult function(String repositoryName, Repository repository, String branch, RevCommit commit) { IndexResult result = new IndexResult(); try { String [] encodings = storedSettings.getStrings(Keys.web.blobEncodings).toArray(new String[0]); List<PathChangeModel> changedPaths = JGitUtils.getFilesInCommit(repository, ... | /**
* Incrementally update the index with the specified commit for the
* repository.
*
* @param repositoryName
* @param repository
* @param branch
* the fully qualified branch name (e.g. refs/heads/master)
* @param commit
* @return true, if successful
*/ | Incrementally update the index with the specified commit for the repository | index | {
"repo_name": "heavenlyhash/gitblit",
"path": "src/main/java/com/gitblit/LuceneExecutor.java",
"license": "apache-2.0",
"size": 47978
} | [
"com.gitblit.Constants",
"com.gitblit.models.PathModel",
"com.gitblit.models.RefModel",
"com.gitblit.utils.JGitUtils",
"com.gitblit.utils.StringUtils",
"java.text.MessageFormat",
"java.util.ArrayList",
"java.util.List",
"org.apache.lucene.document.DateTools",
"org.apache.lucene.document.Document",... | import com.gitblit.Constants; import com.gitblit.models.PathModel; import com.gitblit.models.RefModel; import com.gitblit.utils.JGitUtils; import com.gitblit.utils.StringUtils; import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import org.apache.lucene.document.DateTools; import org.apac... | import com.gitblit.*; import com.gitblit.models.*; import com.gitblit.utils.*; import java.text.*; import java.util.*; import org.apache.lucene.document.*; import org.apache.lucene.index.*; import org.eclipse.jgit.diff.*; import org.eclipse.jgit.lib.*; import org.eclipse.jgit.revwalk.*; | [
"com.gitblit",
"com.gitblit.models",
"com.gitblit.utils",
"java.text",
"java.util",
"org.apache.lucene",
"org.eclipse.jgit"
] | com.gitblit; com.gitblit.models; com.gitblit.utils; java.text; java.util; org.apache.lucene; org.eclipse.jgit; | 1,420,963 |
private void listAllJobs() throws IOException {
JobStatus[] jobs = getAllJobs();
if (jobs == null)
jobs = new JobStatus[0];
System.out.printf("%d jobs submitted\n", jobs.length);
System.out.printf("States are:\n\tRunning : 1\tSucceded : 2" +
"\tFailed : 3\tPrep : 4\n");
displayJobList(jo... | void function() throws IOException { JobStatus[] jobs = getAllJobs(); if (jobs == null) jobs = new JobStatus[0]; System.out.printf(STR, jobs.length); System.out.printf(STR + STR); displayJobList(jobs); } | /**
* Dump a list of all jobs submitted.
* @throws IOException
*/ | Dump a list of all jobs submitted | listAllJobs | {
"repo_name": "totemtang/hadoop-RHJoin",
"path": "src/mapred/org/apache/hadoop/mapred/JobClient.java",
"license": "apache-2.0",
"size": 64505
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,603,126 |
ScanDetails getDetails( int historyId ) throws TenableIoException; | ScanDetails getDetails( int historyId ) throws TenableIoException; | /**
* Get scan details
*
* @param historyId the history id
* @return the scan details
* @throws TenableIoException the Tenable IO exception
*/ | Get scan details | getDetails | {
"repo_name": "tenable/Tenable.io-SDK-for-Java",
"path": "src/main/java/com/tenable/io/api/scans/interfaces/ScanBaseOp.java",
"license": "mit",
"size": 4477
} | [
"com.tenable.io.api.scans.models.ScanDetails",
"com.tenable.io.core.exceptions.TenableIoException"
] | import com.tenable.io.api.scans.models.ScanDetails; import com.tenable.io.core.exceptions.TenableIoException; | import com.tenable.io.api.scans.models.*; import com.tenable.io.core.exceptions.*; | [
"com.tenable.io"
] | com.tenable.io; | 1,327,713 |
public static MulticurveProviderDiscount createMulticurveGbpUsd() {
return MULTICURVES_GBP_USD;
} | static MulticurveProviderDiscount function() { return MULTICURVES_GBP_USD; } | /**
* Returns a multi-curves provider with two currencies (GBP, USD), four Ibor indexes (UsdLibor3M, UsdLibor6M).
* @return The provider.
*/ | Returns a multi-curves provider with two currencies (GBP, USD), four Ibor indexes (UsdLibor3M, UsdLibor6M) | createMulticurveGbpUsd | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/test/java/com/opengamma/analytics/financial/provider/description/MulticurveProviderDiscountDataSets.java",
"license": "apache-2.0",
"size": 47170
} | [
"com.opengamma.analytics.financial.provider.description.interestrate.MulticurveProviderDiscount"
] | import com.opengamma.analytics.financial.provider.description.interestrate.MulticurveProviderDiscount; | import com.opengamma.analytics.financial.provider.description.interestrate.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 2,164,306 |
public void addPrune(String packagePrefix) {
String arg = packagePrefix;
if (arg.endsWith("."))
arg = arg.substring(0, arg.length() - 1);
arg = File.separator + arg.replace('.', File.separatorChar);
prunes.add(arg);
} | void function(String packagePrefix) { String arg = packagePrefix; if (arg.endsWith(".")) arg = arg.substring(0, arg.length() - 1); arg = File.separator + arg.replace('.', File.separatorChar); prunes.add(arg); } | /**
* Add an entry into the set of package prefixes
* that will be skipped as part of the dependency
* generation.
*/ | Add an entry into the set of package prefixes that will be skipped as part of the dependency generation | addPrune | {
"repo_name": "apache/river",
"path": "src/com/sun/jini/tool/ClassDep.java",
"license": "apache-2.0",
"size": 49012
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,324,168 |
public String executeCommandSave(ActionContext context) {
if (!getUser(context).getAccessAdmin()) {
return ERROR_PERMISSION;
}
if (!hasMatchingFormToken(context)) {
return ERROR_TOKEN;
}
Connection db = null;
try {
//get db connection
db = getConnection(contex... | String function(ActionContext context) { if (!getUser(context).getAccessAdmin()) { return ERROR_PERMISSION; } if (!hasMatchingFormToken(context)) { return ERROR_TOKEN; } Connection db = null; try { db = getConnection(context); LookupContributionList lookupContributionList = new LookupContributionList(); PagedListInfo p... | /**
* Updates the Contribution point system
*/ | Updates the Contribution point system | executeCommandSave | {
"repo_name": "Concursive/concourseconnect-community",
"path": "src/main/java/com/concursive/connect/web/modules/admin/actions/AdminContributionPointsSystem.java",
"license": "agpl-3.0",
"size": 6517
} | [
"com.concursive.commons.web.mvc.actions.ActionContext",
"com.concursive.connect.web.modules.contribution.dao.LookupContribution",
"com.concursive.connect.web.modules.contribution.dao.LookupContributionList",
"com.concursive.connect.web.utils.PagedListInfo",
"java.sql.Connection"
] | import com.concursive.commons.web.mvc.actions.ActionContext; import com.concursive.connect.web.modules.contribution.dao.LookupContribution; import com.concursive.connect.web.modules.contribution.dao.LookupContributionList; import com.concursive.connect.web.utils.PagedListInfo; import java.sql.Connection; | import com.concursive.commons.web.mvc.actions.*; import com.concursive.connect.web.modules.contribution.dao.*; import com.concursive.connect.web.utils.*; import java.sql.*; | [
"com.concursive.commons",
"com.concursive.connect",
"java.sql"
] | com.concursive.commons; com.concursive.connect; java.sql; | 2,104,643 |
@Test
public void testScriptEngine() throws Exception {
// eval(String)
assertEquals(Double.valueOf(1.0), scriptEngine.eval("return 1"));
// eval(Reader)
assertEquals(Double.valueOf(1.0), scriptEngine.eval(new StringReader(
"return 1")));
// createBindings()
Bindings bindings = scriptEngine.create... | void function() throws Exception { assertEquals(Double.valueOf(1.0), scriptEngine.eval(STR)); assertEquals(Double.valueOf(1.0), scriptEngine.eval(new StringReader( STR))); Bindings bindings = scriptEngine.createBindings(); assertNotNull(bindings); bindings.put("t", "test1"); assertEquals("test1", scriptEngine.eval(STR,... | /**
* Tests the Lua script engine.
*/ | Tests the Lua script engine | testScriptEngine | {
"repo_name": "Pumpkin-Framework/JNLua",
"path": "src/test/java/com/naef/jnlua/test/LuaScriptEngineTest.java",
"license": "mit",
"size": 9906
} | [
"java.io.StringReader",
"javax.script.Bindings",
"javax.script.ScriptContext",
"javax.script.ScriptEngine",
"javax.script.ScriptException",
"javax.script.SimpleBindings",
"javax.script.SimpleScriptContext",
"org.junit.Assert"
] | import java.io.StringReader; import javax.script.Bindings; import javax.script.ScriptContext; import javax.script.ScriptEngine; import javax.script.ScriptException; import javax.script.SimpleBindings; import javax.script.SimpleScriptContext; import org.junit.Assert; | import java.io.*; import javax.script.*; import org.junit.*; | [
"java.io",
"javax.script",
"org.junit"
] | java.io; javax.script; org.junit; | 1,102,767 |
public void testSetValue2() {
Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1);
Map.Entry s = new AbstractMap.SimpleImmutableEntry(s2);
assertEquals(k1, s.getKey());
assertEquals(v1, s.getValue());
try {
s.setValue(k2);
shouldThrow();
... | void function() { Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1); Map.Entry s = new AbstractMap.SimpleImmutableEntry(s2); assertEquals(k1, s.getKey()); assertEquals(v1, s.getValue()); try { s.setValue(k2); shouldThrow(); } catch (UnsupportedOperationException success) {} } | /**
* setValue for SimpleImmutableEntry throws UnsupportedOperationException
*/ | setValue for SimpleImmutableEntry throws UnsupportedOperationException | testSetValue2 | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/java/util/concurrent/tck/EntryTest.java",
"license": "gpl-2.0",
"size": 5383
} | [
"java.util.AbstractMap",
"java.util.Map"
] | import java.util.AbstractMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,246,770 |
@Test
public void testPurchaseOrder() throws XmlPullParserException, XMLParsingException, ParseException {
IceSoapParser<PurchaseOrder> parser = new IceSoapParserImpl<PurchaseOrder>(PurchaseOrder.class);
PurchaseOrder po = parser.parse(SampleXml.getPurchaseOrder());
assertEquals(99503l, po.getPurchaseOrderN... | void function() throws XmlPullParserException, XMLParsingException, ParseException { IceSoapParser<PurchaseOrder> parser = new IceSoapParserImpl<PurchaseOrder>(PurchaseOrder.class); PurchaseOrder po = parser.parse(SampleXml.getPurchaseOrder()); assertEquals(99503l, po.getPurchaseOrderNumber()); assertEquals(FORMAT.pars... | /**
* Holistic test on realistic data.
*
* @throws XmlPullParserException
* @throws XMLParsingException
* @throws ParseException
*/ | Holistic test on realistic data | testPurchaseOrder | {
"repo_name": "AlexGilleran/IceSoap",
"path": "IceSoapTest/src/test/java/com/alexgilleran/icesoap/parser/test/IceSoapParserTest.java",
"license": "apache-2.0",
"size": 11413
} | [
"com.alexgilleran.icesoap.exception.XMLParsingException",
"com.alexgilleran.icesoap.parser.IceSoapParser",
"com.alexgilleran.icesoap.parser.impl.IceSoapParserImpl",
"com.alexgilleran.icesoap.parser.test.xmlclasses.PurchaseOrder",
"java.math.BigDecimal",
"java.text.ParseException",
"org.junit.Assert",
... | import com.alexgilleran.icesoap.exception.XMLParsingException; import com.alexgilleran.icesoap.parser.IceSoapParser; import com.alexgilleran.icesoap.parser.impl.IceSoapParserImpl; import com.alexgilleran.icesoap.parser.test.xmlclasses.PurchaseOrder; import java.math.BigDecimal; import java.text.ParseException; import o... | import com.alexgilleran.icesoap.exception.*; import com.alexgilleran.icesoap.parser.*; import com.alexgilleran.icesoap.parser.impl.*; import com.alexgilleran.icesoap.parser.test.xmlclasses.*; import java.math.*; import java.text.*; import org.junit.*; import org.xmlpull.v1.*; | [
"com.alexgilleran.icesoap",
"java.math",
"java.text",
"org.junit",
"org.xmlpull.v1"
] | com.alexgilleran.icesoap; java.math; java.text; org.junit; org.xmlpull.v1; | 642,556 |
public void generateMissingAbstractMethods(MethodDeclaration[] methodDeclarations, CompilationResult compilationResult) {
if (methodDeclarations != null) {
TypeDeclaration currentDeclaration = this.referenceBinding.scope.referenceContext;
int typeDeclarationSourceStart = currentDeclaration.sourceStart();
... | void function(MethodDeclaration[] methodDeclarations, CompilationResult compilationResult) { if (methodDeclarations != null) { TypeDeclaration currentDeclaration = this.referenceBinding.scope.referenceContext; int typeDeclarationSourceStart = currentDeclaration.sourceStart(); int typeDeclarationSourceEnd = currentDecla... | /**
* INTERNAL USE-ONLY
* Generate the byte for problem method infos that correspond to missing abstract methods.
* http://dev.eclipse.org/bugs/show_bug.cgi?id=3179
*
* @param methodDeclarations Array of all missing abstract methods
*/ | INTERNAL USE-ONLY Generate the byte for problem method infos that correspond to missing abstract methods. HREF | generateMissingAbstractMethods | {
"repo_name": "trylimits/Eclipse-Postfix-Code-Completion",
"path": "luna/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java",
"license": "epl-1.0",
"size": 278846
} | [
"org.eclipse.jdt.core.compiler.CategorizedProblem",
"org.eclipse.jdt.core.compiler.IProblem",
"org.eclipse.jdt.internal.compiler.ast.MethodDeclaration",
"org.eclipse.jdt.internal.compiler.ast.TypeDeclaration",
"org.eclipse.jdt.internal.compiler.lookup.MethodBinding"
] | import org.eclipse.jdt.core.compiler.CategorizedProblem; import org.eclipse.jdt.core.compiler.IProblem; import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; import org.eclipse.jdt.internal.compiler.lookup.MethodBinding; | import org.eclipse.jdt.core.compiler.*; import org.eclipse.jdt.internal.compiler.ast.*; import org.eclipse.jdt.internal.compiler.lookup.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 39,396 |
public static void main(String[] args) throws Exception {
try {
SpkDiarizationLogger.setup();
Parameter parameter = MainTools.getParameters(args);
info(parameter, "SAdjSeg");
if (parameter.show.isEmpty() == false) {
// clusters
ClusterSet clusterSet = MainTools.readClusterSet(parameter);
/... | static void function(String[] args) throws Exception { try { SpkDiarizationLogger.setup(); Parameter parameter = MainTools.getParameters(args); info(parameter, STR); if (parameter.show.isEmpty() == false) { ClusterSet clusterSet = MainTools.readClusterSet(parameter); AudioFeatureSet featureSet = MainTools.readFeatureSe... | /**
* The main method.
*
* @param args the arguments
* @throws Exception the exception
*/ | The main method | main | {
"repo_name": "Adirockzz95/GenderDetect",
"path": "src/src/fr/lium/spkDiarization/tools/SAdjSeg.java",
"license": "gpl-3.0",
"size": 8387
} | [
"fr.lium.spkDiarization.lib.DiarizationException",
"fr.lium.spkDiarization.lib.MainTools",
"fr.lium.spkDiarization.lib.SpkDiarizationLogger",
"fr.lium.spkDiarization.libClusteringData.ClusterSet",
"fr.lium.spkDiarization.libFeature.AudioFeatureSet",
"fr.lium.spkDiarization.parameter.Parameter",
"java.ut... | import fr.lium.spkDiarization.lib.DiarizationException; import fr.lium.spkDiarization.lib.MainTools; import fr.lium.spkDiarization.lib.SpkDiarizationLogger; import fr.lium.spkDiarization.libClusteringData.ClusterSet; import fr.lium.spkDiarization.libFeature.AudioFeatureSet; import fr.lium.spkDiarization.parameter.Param... | import fr.lium.*; import java.util.logging.*; | [
"fr.lium",
"java.util"
] | fr.lium; java.util; | 1,763,803 |
public Product getProductByID(int prodID){
pDao = new ProductDAO();
Product prod = null;
prod = pDao.getProductByID(prodID);
if(prod.getProductID() == 0){
return null;
}else{
return prod;
}
}
| Product function(int prodID){ pDao = new ProductDAO(); Product prod = null; prod = pDao.getProductByID(prodID); if(prod.getProductID() == 0){ return null; }else{ return prod; } } | /**
* returns a product using product ID
* @param prodID the product ID of the product to search for
* @return product or null if no result
*/ | returns a product using product ID | getProductByID | {
"repo_name": "elliottpost/lakeshoremarket",
"path": "src/com/online/lakeshoremarket/domain/ProductDomain.java",
"license": "gpl-2.0",
"size": 3270
} | [
"com.online.lakeshoremarket.dao.ProductDAO",
"com.online.lakeshoremarket.model.product.Product"
] | import com.online.lakeshoremarket.dao.ProductDAO; import com.online.lakeshoremarket.model.product.Product; | import com.online.lakeshoremarket.dao.*; import com.online.lakeshoremarket.model.product.*; | [
"com.online.lakeshoremarket"
] | com.online.lakeshoremarket; | 1,526,631 |
public boolean sendGroupChat(String xmppChatRoom, String xmppMessage) {
MultiUserChat groupChat;
if (rooms.containsKey(xmppChatRoom)) {
groupChat = rooms.get(xmppChatRoom);
} else {
LOG.debug("Adding room: {}", xmppChatRoom);
groupChat = new MultiUserChat(xmpp, xmppChatRoom);
rooms.put(xmppChatRo... | boolean function(String xmppChatRoom, String xmppMessage) { MultiUserChat groupChat; if (rooms.containsKey(xmppChatRoom)) { groupChat = rooms.get(xmppChatRoom); } else { LOG.debug(STR, xmppChatRoom); groupChat = new MultiUserChat(xmpp, xmppChatRoom); rooms.put(xmppChatRoom, groupChat); } if (!groupChat.isJoined()) { LO... | /**
* send an xmpp message to a specified Chat Room.
*
* @param xmppChatRoom
* room to send message to.
* @param xmppMessage
* text to be sent in the body of the message
* @return true if message is sent, false otherwise
*/ | send an xmpp message to a specified Chat Room | sendGroupChat | {
"repo_name": "tdefilip/opennms",
"path": "opennms-services/src/main/java/org/opennms/netmgt/notifd/XMPPNotificationManager.java",
"license": "agpl-3.0",
"size": 10443
} | [
"org.jivesoftware.smack.XMPPException",
"org.jivesoftware.smackx.muc.MultiUserChat"
] | import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.muc.MultiUserChat; | import org.jivesoftware.smack.*; import org.jivesoftware.smackx.muc.*; | [
"org.jivesoftware.smack",
"org.jivesoftware.smackx"
] | org.jivesoftware.smack; org.jivesoftware.smackx; | 2,174,985 |
public static List<ImportRecord> getLimsRecent(Connection conn, Timestamp observationDate) throws ServletException, SQLException {
List<ImportRecord> items;
String sql = null;
Class clazz = ImportRecord.class;
ArrayList values = new ArrayList();
if (observationDate == null) {
... | static List<ImportRecord> function(Connection conn, Timestamp observationDate) throws ServletException, SQLException { List<ImportRecord> items; String sql = null; Class clazz = ImportRecord.class; ArrayList values = new ArrayList(); if (observationDate == null) { sql = STR + STR + STR + STR + STR + STR + STR + STR + S... | /**
* Get records from most recent id. filter for CD4A and if status is F (final).
* @param conn
* @param observationDate
* @return
* @throws ServletException
* @throws SQLException
*/ | Get records from most recent id. filter for CD4A and if status is F (final) | getLimsRecent | {
"repo_name": "chrisekelley/zeprs",
"path": "src/zeprs/org/cidrz/webapp/dynasite/dao/LabTestDAO.java",
"license": "apache-2.0",
"size": 14854
} | [
"java.sql.Connection",
"java.sql.SQLException",
"java.sql.Timestamp",
"java.util.ArrayList",
"java.util.List",
"javax.servlet.ServletException",
"org.cidrz.project.zeprs.valueobject.lims.utils.ImportRecord",
"org.cidrz.webapp.dynasite.utils.DatabaseUtils"
] | import java.sql.Connection; import java.sql.SQLException; import java.sql.Timestamp; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import org.cidrz.project.zeprs.valueobject.lims.utils.ImportRecord; import org.cidrz.webapp.dynasite.utils.DatabaseUtils; | import java.sql.*; import java.util.*; import javax.servlet.*; import org.cidrz.project.zeprs.valueobject.lims.utils.*; import org.cidrz.webapp.dynasite.utils.*; | [
"java.sql",
"java.util",
"javax.servlet",
"org.cidrz.project",
"org.cidrz.webapp"
] | java.sql; java.util; javax.servlet; org.cidrz.project; org.cidrz.webapp; | 2,589,221 |
@Test
public void testScan() throws IOException {
ClientProtos.Scan.Builder scanBuilder = ClientProtos.Scan.newBuilder();
scanBuilder.setStartRow(ByteString.copyFromUtf8("row1"));
scanBuilder.setStopRow(ByteString.copyFromUtf8("row2"));
Column.Builder columnBuilder = Column.newBuilder();
columnB... | void function() throws IOException { ClientProtos.Scan.Builder scanBuilder = ClientProtos.Scan.newBuilder(); scanBuilder.setStartRow(ByteString.copyFromUtf8("row1")); scanBuilder.setStopRow(ByteString.copyFromUtf8("row2")); Column.Builder columnBuilder = Column.newBuilder(); columnBuilder.setFamily(ByteString.copyFromU... | /**
* Test basic Scan conversions.
*
* @throws IOException
*/ | Test basic Scan conversions | testScan | {
"repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/protobuf/TestProtobufUtil.java",
"license": "apache-2.0",
"size": 12515
} | [
"com.google.protobuf.ByteString",
"java.io.IOException",
"org.apache.hadoop.hbase.protobuf.generated.ClientProtos",
"org.junit.Assert"
] | import com.google.protobuf.ByteString; import java.io.IOException; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; import org.junit.Assert; | import com.google.protobuf.*; import java.io.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.junit.*; | [
"com.google.protobuf",
"java.io",
"org.apache.hadoop",
"org.junit"
] | com.google.protobuf; java.io; org.apache.hadoop; org.junit; | 1,970,019 |
public static void main(String args[]) throws Exception
{
// XmlRpc.setDebug (true);
try
{
String url = args[0];
String method = args[1];
XmlRpcClientLite client = new XmlRpcClientLite (url);
Vector v = new Vector ();
for (int i... | static void function(String args[]) throws Exception { try { String url = args[0]; String method = args[1]; XmlRpcClientLite client = new XmlRpcClientLite (url); Vector v = new Vector (); for (int i = 2; i < args.length; i++) { try { v.addElement(new Integer(Integer.parseInt(args[i]))); } catch (NumberFormatException n... | /**
* Just for testing.
*/ | Just for testing | main | {
"repo_name": "mmohan01/ReFactory",
"path": "data/apachexmlrpc/apachexmlrpc-2.0/java/org/apache/xmlrpc/XmlRpcClientLite.java",
"license": "mit",
"size": 3162
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,639,196 |
public void setEventBus(EventBus eventBus) {
this.eventBus.set(eventBus);
} | void function(EventBus eventBus) { this.eventBus.set(eventBus); } | /**
* Sets the eventBus to use for posting events.
*/ | Sets the eventBus to use for posting events | setEventBus | {
"repo_name": "damienmg/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java",
"license": "apache-2.0",
"size": 90831
} | [
"com.google.common.eventbus.EventBus"
] | import com.google.common.eventbus.EventBus; | import com.google.common.eventbus.*; | [
"com.google.common"
] | com.google.common; | 2,024,953 |
public static void putGoogleAnalyticsTrackingIdIntoFlowScope(final RequestContext context, final Object value) {
context.getFlowScope().put("googleAnalyticsTrackingId", value);
} | static void function(final RequestContext context, final Object value) { context.getFlowScope().put(STR, value); } | /**
* Put tracking id into flow scope.
*
* @param context the context
* @param value the value
*/ | Put tracking id into flow scope | putGoogleAnalyticsTrackingIdIntoFlowScope | {
"repo_name": "Unicon/cas",
"path": "core/cas-server-core-web/src/main/java/org/apereo/cas/web/support/WebUtils.java",
"license": "apache-2.0",
"size": 33997
} | [
"org.springframework.webflow.execution.RequestContext"
] | import org.springframework.webflow.execution.RequestContext; | import org.springframework.webflow.execution.*; | [
"org.springframework.webflow"
] | org.springframework.webflow; | 1,085,338 |
public DocumentService getDocumentService() {
return documentService;
} | DocumentService function() { return documentService; } | /**
* Gets the documentService attribute.
* @return Returns the documentService.
*/ | Gets the documentService attribute | getDocumentService | {
"repo_name": "rashikpolus/MIT_KC",
"path": "coeus-impl/src/main/java/edu/mit/kc/timeandmoney/service/impl/MitTimeAndMoneyHistoryServiceImpl.java",
"license": "agpl-3.0",
"size": 33088
} | [
"org.kuali.rice.krad.service.DocumentService"
] | import org.kuali.rice.krad.service.DocumentService; | import org.kuali.rice.krad.service.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,173,116 |
@VisibleForTesting
void compactStore(byte[] family, ThroughputController throughputController)
throws IOException {
Store s = getStore(family);
CompactionContext compaction = s.requestCompaction();
if (compaction != null) {
compact(compaction, s, throughputController, null);
}
} | void compactStore(byte[] family, ThroughputController throughputController) throws IOException { Store s = getStore(family); CompactionContext compaction = s.requestCompaction(); if (compaction != null) { compact(compaction, s, throughputController, null); } } | /**
* This is a helper function that compact the given store
* It is used by utilities and testing
*
* @throws IOException e
*/ | This is a helper function that compact the given store It is used by utilities and testing | compactStore | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 328407
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.regionserver.compactions.CompactionContext",
"org.apache.hadoop.hbase.regionserver.throttle.ThroughputController"
] | import java.io.IOException; import org.apache.hadoop.hbase.regionserver.compactions.CompactionContext; import org.apache.hadoop.hbase.regionserver.throttle.ThroughputController; | import java.io.*; import org.apache.hadoop.hbase.regionserver.compactions.*; import org.apache.hadoop.hbase.regionserver.throttle.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,503,243 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.