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 static void hasLength(String text, CharSequence message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException("[FOSS-0008][hasLength][" + message + "]"); } }
static void function(String text, CharSequence message) { if (StringUtils.isEmpty(text)) { throw new IllegalArgumentException(STR + message + "]"); } }
/** * Assert that the given String is not empty; that is, it must not be * <code>null</code> and not the empty String. * * <pre class="code"> * Assert.hasLength(name, &quot;Name must not be empty&quot;); * </pre> * * @param text * the String to check * @param message * the ...
Assert that the given String is not empty; that is, it must not be <code>null</code> and not the empty String. Assert.hasLength(name, &quot;Name must not be empty&quot;); </code>
hasLength
{ "repo_name": "tylerchen/springmvc-mybatis-v1.0-project", "path": "src/main/java/org/iff/infra/util/Assert.java", "license": "mit", "size": 20050 }
[ "org.apache.commons.lang3.StringUtils" ]
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
921,323
public String getId() { return this._constructionElement.getAttributeNS(null, Constants._ATT_ID); }
String function() { return this._constructionElement.getAttributeNS(null, Constants._ATT_ID); }
/** * Returns the <code>Id</code> attribute * * @return the <code>Id</code> attribute */
Returns the <code>Id</code> attribute
getId
{ "repo_name": "test2v/DanDelXAdES", "path": "proj/xml-security-src-1_3_0/xml-security-1_3_0/src-xades/org/apache/xml/security/xades/QualifyingProperties.java", "license": "lgpl-3.0", "size": 7819 }
[ "org.apache.xml.security.xades.Constants" ]
import org.apache.xml.security.xades.Constants;
import org.apache.xml.security.xades.*;
[ "org.apache.xml" ]
org.apache.xml;
1,096,155
public Transition getSharedElementReturnTransition() { return null; }
public Transition getSharedElementReturnTransition() { return null; }
/** * Returns the Transition that will be used for shared elements transferred into the content * Scene. Requires {@link #FEATURE_ACTIVITY_TRANSITIONS}. * * @return Transition to use for sharend elements transferred into the content Scene. * @attr ref android.R.styleable#Window_windowSharedElem...
Returns the Transition that will be used for shared elements transferred into the content Scene. Requires <code>#FEATURE_ACTIVITY_TRANSITIONS</code>
getSharedElementEnterTransition
{ "repo_name": "OmniEvo/android_frameworks_base", "path": "core/java/android/view/Window.java", "license": "gpl-3.0", "size": 77630 }
[ "android.transition.Transition" ]
import android.transition.Transition;
import android.transition.*;
[ "android.transition" ]
android.transition;
146,021
NumberReplicas countNodes(Block b) { return countNodes(b, blocksMap.nodeIterator(b)); }
NumberReplicas countNodes(Block b) { return countNodes(b, blocksMap.nodeIterator(b)); }
/** * Return the number of nodes that are live and decommissioned. */
Return the number of nodes that are live and decommissioned
countNodes
{ "repo_name": "aseldawy/spatialhadoop", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 220549 }
[ "org.apache.hadoop.hdfs.protocol.Block" ]
import org.apache.hadoop.hdfs.protocol.Block;
import org.apache.hadoop.hdfs.protocol.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
398,689
public Observable<ServiceResponse<Page<RoleAssignmentInner>>> listForScopeSinglePageAsync(final String scope, final String filter) { if (scope == null) { throw new IllegalArgumentException("Parameter scope is required and cannot be null."); } if (this.client.apiVersion() == null)...
Observable<ServiceResponse<Page<RoleAssignmentInner>>> function(final String scope, final String filter) { if (scope == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException(STR); }
/** * Gets role assignments for a scope. * ServiceResponse<PageImpl<RoleAssignmentInner>> * @param scope The scope of the role assignments. ServiceResponse<PageImpl<RoleAssignmentInner>> * @param filter The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or ab...
Gets role assignments for a scope
listForScopeSinglePageAsync
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/RoleAssignmentsInner.java", "license": "mit", "size": 130097 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
918,077
public static <T> T parseObject(Object object, Class<T> objectType) { ObjectMapper mapper = getObjectMapper(); try { return mapper.readValue(object.toString(), objectType); } catch (JsonParseException e) { } catch (JsonMappingException e) { } catch (IOException e...
static <T> T function(Object object, Class<T> objectType) { ObjectMapper mapper = getObjectMapper(); try { return mapper.readValue(object.toString(), objectType); } catch (JsonParseException e) { } catch (JsonMappingException e) { } catch (IOException e) { } return null; }
/** * Reads the string representation of {@code object} and attempts to convert * it to an instance of class {@code objectType}. * * @param object * the object to read the string representation of * @param objectType * the class to deserialize the string to ...
Reads the string representation of object and attempts to convert it to an instance of class objectType
parseObject
{ "repo_name": "ProductLayer/ProductLayer-SDK-for-Java", "path": "src/main/java/com/productlayer/rest/client/helper/ConversionTool.java", "license": "bsd-2-clause", "size": 3798 }
[ "com.fasterxml.jackson.core.JsonParseException", "com.fasterxml.jackson.databind.JsonMappingException", "com.fasterxml.jackson.databind.ObjectMapper", "java.io.IOException" ]
import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException;
import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import java.io.*;
[ "com.fasterxml.jackson", "java.io" ]
com.fasterxml.jackson; java.io;
1,689,901
private NdTypeSignature parseClassTypeSignature(NdComplexTypeSignature parentTypeOrNull, SignatureWrapper wrapper) throws CoreException { char[] identifier = wrapper.nextWord(); char[] fieldDescriptor; if (parentTypeOrNull != null) { fieldDescriptor = CharArrayUtils.concat( parentTypeOrNull.getRawT...
NdTypeSignature function(NdComplexTypeSignature parentTypeOrNull, SignatureWrapper wrapper) throws CoreException { char[] identifier = wrapper.nextWord(); char[] fieldDescriptor; if (parentTypeOrNull != null) { fieldDescriptor = CharArrayUtils.concat( parentTypeOrNull.getRawType().getFieldDescriptorWithoutTrailingSemic...
/** * Parses a ClassTypeSignature (as described in section 4.7.9.1 of the Java VM Specification Java SE 8 Edition). The * read pointer should be located just after the identifier. The caller is expected to have already read the field * descriptor for the type. */
Parses a ClassTypeSignature (as described in section 4.7.9.1 of the Java VM Specification Java SE 8 Edition). The read pointer should be located just after the identifier. The caller is expected to have already read the field descriptor for the type
parseClassTypeSignature
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.jdt.core/src/org/eclipse/jdt/internal/core/nd/indexer/ClassFileToIndexConverter.java", "license": "epl-1.0", "size": 35011 }
[ "org.eclipse.core.runtime.CoreException", "org.eclipse.jdt.internal.compiler.lookup.SignatureWrapper", "org.eclipse.jdt.internal.core.nd.java.NdComplexTypeSignature", "org.eclipse.jdt.internal.core.nd.java.NdTypeArgument", "org.eclipse.jdt.internal.core.nd.java.NdTypeId", "org.eclipse.jdt.internal.core.nd...
import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.internal.compiler.lookup.SignatureWrapper; import org.eclipse.jdt.internal.core.nd.java.NdComplexTypeSignature; import org.eclipse.jdt.internal.core.nd.java.NdTypeArgument; import org.eclipse.jdt.internal.core.nd.java.NdTypeId; import org.eclipse.jdt...
import org.eclipse.core.runtime.*; import org.eclipse.jdt.internal.compiler.lookup.*; import org.eclipse.jdt.internal.core.nd.java.*; import org.eclipse.jdt.internal.core.nd.util.*;
[ "org.eclipse.core", "org.eclipse.jdt" ]
org.eclipse.core; org.eclipse.jdt;
2,272,850
protected VScrollTableRow getRenderedRowByKey(String key) { if (this.scrollBody != null) { final Iterator<Widget> it = this.scrollBody.iterator(); VScrollTableRow r = null; while (it.hasNext()) { r = (VScrollTableRow) it.next(); if (r.getKey().equals(key)) { return r; } } } return ...
VScrollTableRow function(String key) { if (this.scrollBody != null) { final Iterator<Widget> it = this.scrollBody.iterator(); VScrollTableRow r = null; while (it.hasNext()) { r = (VScrollTableRow) it.next(); if (r.getKey().equals(key)) { return r; } } } return null; }
/** * Get a rendered row by its key * * @param key * The key to search with * @return */
Get a rendered row by its key
getRenderedRowByKey
{ "repo_name": "Softhouse/orchid", "path": "se.softhouse.garden.orchid.vaadin/addon/src/main/java/se/softhouse/garden/orchid/vaadin/widgetset/client/ui/VOrchidScrollTable.java", "license": "mit", "size": 221302 }
[ "com.google.gwt.user.client.ui.Widget", "com.vaadin.terminal.gwt.client.ui.VScrollTable", "java.util.Iterator", "se.softhouse.garden.orchid.vaadin.widgetset.client.ui.VOrchidScrollTable" ]
import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ui.VScrollTable; import java.util.Iterator; import se.softhouse.garden.orchid.vaadin.widgetset.client.ui.VOrchidScrollTable;
import com.google.gwt.user.client.ui.*; import com.vaadin.terminal.gwt.client.ui.*; import java.util.*; import se.softhouse.garden.orchid.vaadin.widgetset.client.ui.*;
[ "com.google.gwt", "com.vaadin.terminal", "java.util", "se.softhouse.garden" ]
com.google.gwt; com.vaadin.terminal; java.util; se.softhouse.garden;
2,282,029
public BestFitLine createBestFitLineWithoutCurrentOutliers() { if (hasOutliers()) { final double[] filteredXValues = newArrayWithoutElementOnIndex(xValues, outlierIndices); final double[] filteredYValues = newArrayWithoutElementOnIndex(yValues, outlierIndices); List<Point...
BestFitLine function() { if (hasOutliers()) { final double[] filteredXValues = newArrayWithoutElementOnIndex(xValues, outlierIndices); final double[] filteredYValues = newArrayWithoutElementOnIndex(yValues, outlierIndices); List<Point> allOutliers = new ArrayList<>(outliers); allOutliers.addAll(removedOutliers); return...
/** * Create a new BestFitLine without outliers. * @return the new BestFitLine without the largest outlier, or this BestFitLine if no outliers are present. */
Create a new BestFitLine without outliers
createBestFitLineWithoutCurrentOutliers
{ "repo_name": "stokpop/lograter", "path": "src/main/java/nl/stokpop/lograter/util/fit/BestFitLine.java", "license": "apache-2.0", "size": 10112 }
[ "java.util.ArrayList", "java.util.List", "nl.stokpop.lograter.util.metric.Point" ]
import java.util.ArrayList; import java.util.List; import nl.stokpop.lograter.util.metric.Point;
import java.util.*; import nl.stokpop.lograter.util.metric.*;
[ "java.util", "nl.stokpop.lograter" ]
java.util; nl.stokpop.lograter;
2,610,322
@Generated @Selector("value") @MappedReturn(ObjCObjectMapper.class) public native Object value();
@Selector("value") @MappedReturn(ObjCObjectMapper.class) native Object function();
/** * [@property] value * <p> * The value of the metaparameter. */
[@property] value The value of the metaparameter
value
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/phase/PHASEMetaParameterDefinition.java", "license": "apache-2.0", "size": 4643 }
[ "org.moe.natj.general.ann.MappedReturn", "org.moe.natj.objc.ann.Selector", "org.moe.natj.objc.map.ObjCObjectMapper" ]
import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; import org.moe.natj.objc.map.*;
[ "org.moe.natj" ]
org.moe.natj;
338,716
public static Constructor getConstructor(String name, String[] paramNames) { return ClassUtils.getConstructor(name, paramNames, true); }
static Constructor function(String name, String[] paramNames) { return ClassUtils.getConstructor(name, paramNames, true); }
/** * Retrieve the constructor of the given class with the given parameter * type names. If there is any exception thrown during retrieval, the * program will print an error message to <code>STDERR</code> and terminate * via <code>System.exit(1)</code>. * * @param name The fully qualified...
Retrieve the constructor of the given class with the given parameter type names. If there is any exception thrown during retrieval, the program will print an error message to <code>STDERR</code> and terminate via <code>System.exit(1)</code>
getConstructor
{ "repo_name": "TeamCohen/MinorThird", "path": "src/main/java/LBJ2/util/ClassUtils.java", "license": "bsd-3-clause", "size": 15015 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
886,687
@Nullable public ByteBuffer asByteBuffer(@Nullable final Image image);
ByteBuffer function(@Nullable final Image image);
/** * Get the image data in {@link java.nio.ByteBuffer} format. */
Get the image data in <code>java.nio.ByteBuffer</code> format
asByteBuffer
{ "repo_name": "void256/nifty-gui", "path": "nifty-core/src/main/java/de/lessvoid/nifty/render/batch/spi/ImageFactory.java", "license": "bsd-2-clause", "size": 748 }
[ "de.lessvoid.nifty.render.batch.spi.BatchRenderBackend", "java.nio.ByteBuffer", "javax.annotation.Nullable" ]
import de.lessvoid.nifty.render.batch.spi.BatchRenderBackend; import java.nio.ByteBuffer; import javax.annotation.Nullable;
import de.lessvoid.nifty.render.batch.spi.*; import java.nio.*; import javax.annotation.*;
[ "de.lessvoid.nifty", "java.nio", "javax.annotation" ]
de.lessvoid.nifty; java.nio; javax.annotation;
603,037
public void setFile(File file) { this.file = new FileObject(file); }
public void setFile(File file) { this.file = new FileObject(file); }
/** * Sets the node of reference if set. * * @param refNode The node to set. */
Sets the node of reference if set
setRefNode
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/model/ImportableFile.java", "license": "gpl-2.0", "size": 6488 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,759,680
public DropboxDelResult del(String remotePath) throws DropboxException { try { client.files().deleteV2(remotePath); } catch (DbxException e) { throw new DropboxException(remotePath + " does not exist or cannot obtain metadata", e); } return new DropboxDelResul...
DropboxDelResult function(String remotePath) throws DropboxException { try { client.files().deleteV2(remotePath); } catch (DbxException e) { throw new DropboxException(remotePath + STR, e); } return new DropboxDelResult(remotePath); }
/** * Delete every files and subdirectories inside the remote directory. In * case the remotePath is a file, delete the file. * * @param remotePath the remote location to delete * @return a result object with the result of the delete operation. * @throws DropboxException */
Delete every files and subdirectories inside the remote directory. In case the remotePath is a file, delete the file
del
{ "repo_name": "davidkarlsen/camel", "path": "components/camel-dropbox/src/main/java/org/apache/camel/component/dropbox/core/DropboxAPIFacade.java", "license": "apache-2.0", "size": 16392 }
[ "com.dropbox.core.DbxException", "org.apache.camel.component.dropbox.dto.DropboxDelResult", "org.apache.camel.component.dropbox.util.DropboxException" ]
import com.dropbox.core.DbxException; import org.apache.camel.component.dropbox.dto.DropboxDelResult; import org.apache.camel.component.dropbox.util.DropboxException;
import com.dropbox.core.*; import org.apache.camel.component.dropbox.dto.*; import org.apache.camel.component.dropbox.util.*;
[ "com.dropbox.core", "org.apache.camel" ]
com.dropbox.core; org.apache.camel;
323,258
AuthDescriptor getAuthDescriptor();
AuthDescriptor getAuthDescriptor();
/** * Authenticate connections using the given auth descriptor. * * @return null if no authentication should take place */
Authenticate connections using the given auth descriptor
getAuthDescriptor
{ "repo_name": "whchoi83/arcus-java-client", "path": "src/main/java/net/spy/memcached/ConnectionFactory.java", "license": "apache-2.0", "size": 5407 }
[ "net.spy.memcached.auth.AuthDescriptor" ]
import net.spy.memcached.auth.AuthDescriptor;
import net.spy.memcached.auth.*;
[ "net.spy.memcached" ]
net.spy.memcached;
1,784,330
@ApiModelProperty(value = "Name of the Authorization header used for invoking the API. If it is not set, Authorization header name specified\nin tenant or system level will be used.\n") @JsonProperty("authorizationHeader") public String getAuthorizationHeader() { return authorizationHeader; }
@ApiModelProperty(value = STR) @JsonProperty(STR) String function() { return authorizationHeader; }
/** * Name of the Authorization header used for invoking the API. If it is not set, Authorization header name specified\nin tenant or system level will be used.\n **/
Name of the Authorization header used for invoking the API. If it is not set, Authorization header name specified\nin tenant or system level will be used.\n
getAuthorizationHeader
{ "repo_name": "nuwand/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.hybrid.gateway/org.wso2.carbon.apimgt.hybrid.gateway.api.synchronizer/src/main/java/org/wso2/carbon/apimgt/hybrid/gateway/api/synchronizer/dto/APIDTO.java", "license": "apache-2.0", "size": 17520 }
[ "com.fasterxml.jackson.annotation.JsonProperty", "io.swagger.annotations.ApiModelProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.*; import io.swagger.annotations.*;
[ "com.fasterxml.jackson", "io.swagger.annotations" ]
com.fasterxml.jackson; io.swagger.annotations;
2,385,072
void put(FlowFileRecord flowFile);
void put(FlowFileRecord flowFile);
/** * Adds the given FlowFile to this partition * @param flowFile the FlowFile to add */
Adds the given FlowFile to this partition
put
{ "repo_name": "mcgilman/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/partition/QueuePartition.java", "license": "apache-2.0", "size": 3897 }
[ "org.apache.nifi.controller.repository.FlowFileRecord" ]
import org.apache.nifi.controller.repository.FlowFileRecord;
import org.apache.nifi.controller.repository.*;
[ "org.apache.nifi" ]
org.apache.nifi;
1,628,572
public final BigDecimal getBigDecimal(String columnName, int scale) throws SQLException { checkIfClosed("getBigDecimal"); return (getBigDecimal(findColumnName(columnName), scale)); }
final BigDecimal function(String columnName, int scale) throws SQLException { checkIfClosed(STR); return (getBigDecimal(findColumnName(columnName), scale)); }
/** * Get the value of a column in the current row as a java.lang.BigDecimal object. * * @param columnName is the SQL name of the column * @param scale the number of digits to the right of the decimal * @return the column value; if the value is SQL NULL, the result is null * @exception SQLException th...
Get the value of a column in the current row as a java.lang.BigDecimal object
getBigDecimal
{ "repo_name": "splicemachine/spliceengine", "path": "db-engine/src/main/java/com/splicemachine/db/impl/jdbc/EmbedResultSet20.java", "license": "agpl-3.0", "size": 14606 }
[ "java.math.BigDecimal", "java.sql.SQLException" ]
import java.math.BigDecimal; import java.sql.SQLException;
import java.math.*; import java.sql.*;
[ "java.math", "java.sql" ]
java.math; java.sql;
439,502
public EnhancedItemStack toItemStack(final Material material, final int amount) { return toItemStack(material, amount, (short) 0); }
EnhancedItemStack function(final Material material, final int amount) { return toItemStack(material, amount, (short) 0); }
/** * Returns this as an ItemStack * * @param material * The item's material * @param amount * The amount of the item. * @return An ItemStack. * @author HomieDion * @since 1.0.0 */
Returns this as an ItemStack
toItemStack
{ "repo_name": "homiedion/RpgCore", "path": "src/main/java/com/homiedion/rpgcore/container/RpgContainer.java", "license": "mit", "size": 12035 }
[ "com.homiedion.aeoncore.enhanced.EnhancedItemStack", "org.bukkit.Material" ]
import com.homiedion.aeoncore.enhanced.EnhancedItemStack; import org.bukkit.Material;
import com.homiedion.aeoncore.enhanced.*; import org.bukkit.*;
[ "com.homiedion.aeoncore", "org.bukkit" ]
com.homiedion.aeoncore; org.bukkit;
697,745
public void setFacts(Collection<? extends Fact> facts) { this.facts = facts; }
void function(Collection<? extends Fact> facts) { this.facts = facts; }
/** * The facts about a person. * * @param facts The facts about a person. */
The facts about a person
setFacts
{ "repo_name": "nabilzhang/enunciate", "path": "examples/jackson2-api-lombok/src/main/java/com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/Person.java", "license": "apache-2.0", "size": 3974 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,082,602
// Add a listener for the Show Data menu item mntmShowData.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent ae) { // Display the log content dialog if not already open if (logConten...
mntmShowData.addActionListener(new ActionListener() { void function(ActionEvent ae) { if (logContent == null !logContent.isVisible()) { logContent = new CPMLogContentDialog(perfLog, perfIDs, CPMMain.this, plotPrefs); logContent.addWindowListener(nonModalDialogHandler); } else { logContent.toFront(); } } });
/****************************************************************** * Display the performance log contents *****************************************************************/
Display the performance log contents
actionPerformed
{ "repo_name": "CACTUS-Mission/TRAPSat", "path": "TRAPSat_cFS/cfs/cfe/tools/perfutils-java/src/CFSPerformanceMonitor/CPMMain.java", "license": "mit", "size": 87834 }
[ "java.awt.event.ActionEvent", "java.awt.event.ActionListener" ]
import java.awt.event.ActionEvent; import java.awt.event.ActionListener;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,197,566
public ByteBuffer toByteBuffer() { //2 ints at 4 bytes a piece, this includes the compression algorithm //that we convert to enum int enumSize = 2 * 4; //4 longs at 8 bytes a piece int sizesLength = 4 * 8; ByteBuffer directAlloc = ByteBuffer.allocateDirect(enumSize +...
ByteBuffer function() { int enumSize = 2 * 4; int sizesLength = 4 * 8; ByteBuffer directAlloc = ByteBuffer.allocateDirect(enumSize + sizesLength).order(ByteOrder.nativeOrder()); directAlloc.putInt(compressionType.ordinal()); directAlloc.putInt(CompressionAlgorithm.valueOf(compressionAlgorithm).ordinal()); directAlloc.p...
/** * Return a direct allocated * bytebuffer from the compression codec. * The size of the bytebuffer is calculated to be: * 40: 8 + 32 * two ints representing their enum values * for the compression algorithm and opType * * and 4 longs for the compressed and * original size...
Return a direct allocated bytebuffer from the compression codec. The size of the bytebuffer is calculated to be: 40: 8 + 32 two ints representing their enum values for the compression algorithm and opType and 4 longs for the compressed and original sizes
toByteBuffer
{ "repo_name": "deeplearning4j/nd4j", "path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/compression/CompressionDescriptor.java", "license": "apache-2.0", "size": 5165 }
[ "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,411,021
SpringApplication.run(DevcapsuleSpringApplication.class, args); }
SpringApplication.run(DevcapsuleSpringApplication.class, args); }
/** * The main method. * * @param args * the arguments */
The main method
main
{ "repo_name": "psachdev6375/devcapsule", "path": "services/src/main/java/com/puneet/devcapsule/DevcapsuleSpringApplication.java", "license": "gpl-3.0", "size": 883 }
[ "org.springframework.boot.SpringApplication" ]
import org.springframework.boot.SpringApplication;
import org.springframework.boot.*;
[ "org.springframework.boot" ]
org.springframework.boot;
197,334
public String getResourceType() { String result = null; if (attributes != null) { Attribute attribute = attributes.get(TYPE); if (attribute != null) { try { result = attribute.get().toString(); } catch (NamingException e) { ; // No value for the attribute ...
String function() { String result = null; if (attributes != null) { Attribute attribute = attributes.get(TYPE); if (attribute != null) { try { result = attribute.get().toString(); } catch (NamingException e) { ; } } } if (result == null) { if (collection) result = COLLECTION_TYPE; else result = ""; } return result; }
/** * Get resource type. * * @return String resource type */
Get resource type
getResourceType
{ "repo_name": "yukoff/concourse-connect", "path": "src/main/java/org/apache/naming/resources/ResourceAttributes.java", "license": "agpl-3.0", "size": 19344 }
[ "javax.naming.NamingException", "javax.naming.directory.Attribute" ]
import javax.naming.NamingException; import javax.naming.directory.Attribute;
import javax.naming.*; import javax.naming.directory.*;
[ "javax.naming" ]
javax.naming;
2,779,286
List<ActionCondition> getActionConditions();
List<ActionCondition> getActionConditions();
/** * Get list containing the ActionConditions in their current order * * @return the list of ActionConditions */
Get list containing the ActionConditions in their current order
getActionConditions
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/service/cmr/action/CompositeActionCondition.java", "license": "lgpl-3.0", "size": 3354 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
283,275
public int getPropertyType() { return SVGTypes.TYPE_IDENT; }
int function() { return SVGTypes.TYPE_IDENT; }
/** * Implements {@link ValueManager#getPropertyType()}. */
Implements <code>ValueManager#getPropertyType()</code>
getPropertyType
{ "repo_name": "adufilie/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/value/svg/FillRuleManager.java", "license": "apache-2.0", "size": 3088 }
[ "org.apache.flex.forks.batik.util.SVGTypes" ]
import org.apache.flex.forks.batik.util.SVGTypes;
import org.apache.flex.forks.batik.util.*;
[ "org.apache.flex" ]
org.apache.flex;
236,042
void writeTaskIds(List<Integer> taskIds) throws IOException;
void writeTaskIds(List<Integer> taskIds) throws IOException;
/** * This method sends a list of task IDs to a non-JVM bolt process * * @param taskIds list of task IDs */
This method sends a list of task IDs to a non-JVM bolt process
writeTaskIds
{ "repo_name": "anshuiisc/storm-Allbolts-wiring", "path": "storm-core/src/jvm/org/apache/storm/multilang/ISerializer.java", "license": "apache-2.0", "size": 2649 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
289,834
@Test public void testScenario18() throws Exception { InterestCalculationRequest request = new InterestCalculationRequest(); request.setInterestCalculatedToDate(new DateTime(2013, 8, 7, 0, 0).toDate()); List<ExtendedServicePeriod> extendedServicePeriods = new ArrayList<ExtendedServicePer...
void function() throws Exception { InterestCalculationRequest request = new InterestCalculationRequest(); request.setInterestCalculatedToDate(new DateTime(2013, 8, 7, 0, 0).toDate()); List<ExtendedServicePeriod> extendedServicePeriods = new ArrayList<ExtendedServicePeriod>(); ExtendedServicePeriod extendedServicePeriod...
/** * Ret Scenario - CSRS Firefighter Deposit.pdf * * @throws Exception * to JUnit. */
Ret Scenario - CSRS Firefighter Deposit.pdf
testScenario18
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/InterestTest.java", "license": "apache-2.0", "size": 87229 }
[ "gov.opm.scrd.TestsHelper", "gov.opm.scrd.entities.application.ExtendedServicePeriod", "gov.opm.scrd.entities.application.InterestCalculationRequest", "gov.opm.scrd.entities.application.InterestCalculationResponse", "java.math.BigDecimal", "java.util.ArrayList", "java.util.List", "junit.framework.Asse...
import gov.opm.scrd.TestsHelper; import gov.opm.scrd.entities.application.ExtendedServicePeriod; import gov.opm.scrd.entities.application.InterestCalculationRequest; import gov.opm.scrd.entities.application.InterestCalculationResponse; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; impo...
import gov.opm.scrd.*; import gov.opm.scrd.entities.application.*; import java.math.*; import java.util.*; import junit.framework.*; import org.joda.time.*;
[ "gov.opm.scrd", "java.math", "java.util", "junit.framework", "org.joda.time" ]
gov.opm.scrd; java.math; java.util; junit.framework; org.joda.time;
790,127
private RegistrationResponse registerTaskExecutorInternal( TaskExecutorGateway taskExecutorGateway, String taskExecutorAddress, ResourceID taskExecutorResourceId, int dataPort, HardwareDescription hardwareDescription) { WorkerRegistration<WorkerType> oldRegistration = taskExecutors.remove(taskExecut...
RegistrationResponse function( TaskExecutorGateway taskExecutorGateway, String taskExecutorAddress, ResourceID taskExecutorResourceId, int dataPort, HardwareDescription hardwareDescription) { WorkerRegistration<WorkerType> oldRegistration = taskExecutors.remove(taskExecutorResourceId); if (oldRegistration != null) { lo...
/** * Registers a new TaskExecutor. * * @param taskExecutorGateway to communicate with the registering TaskExecutor * @param taskExecutorAddress address of the TaskExecutor * @param taskExecutorResourceId ResourceID of the TaskExecutor * @param dataPort port used for data transfer * @param hardwareDescrip...
Registers a new TaskExecutor
registerTaskExecutorInternal
{ "repo_name": "shaoxuan-wang/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java", "license": "apache-2.0", "size": 43589 }
[ "org.apache.flink.runtime.clusterframework.types.ResourceID", "org.apache.flink.runtime.instance.HardwareDescription", "org.apache.flink.runtime.registration.RegistrationResponse", "org.apache.flink.runtime.resourcemanager.registration.WorkerRegistration", "org.apache.flink.runtime.taskexecutor.TaskExecutor...
import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.runtime.instance.HardwareDescription; import org.apache.flink.runtime.registration.RegistrationResponse; import org.apache.flink.runtime.resourcemanager.registration.WorkerRegistration; import org.apache.flink.runtime.taskexecuto...
import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.instance.*; import org.apache.flink.runtime.registration.*; import org.apache.flink.runtime.resourcemanager.registration.*; import org.apache.flink.runtime.taskexecutor.*;
[ "org.apache.flink" ]
org.apache.flink;
2,757,734
public boolean sendControlPacket(String sessionId, Packet packet) { // Seraching for a correct connection // TODO: speed it up somehow, maybe verify can be only sent to incoming // and result to outgoing? Check it out S2SConnection s2s_conn = getS2SConnectionForSessionId(sessionId); if (s2s_conn != null)...
boolean function(String sessionId, Packet packet) { S2SConnection s2s_conn = getS2SConnectionForSessionId(sessionId); if (s2s_conn != null) { s2s_conn.addControlPacket(packet); s2s_conn.sendAllControlPackets(); return true; } else { if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, STR + STR, new Object[] { packet,...
/** * Method description * * * * @param sessionId * @param packet * */
Method description
sendControlPacket
{ "repo_name": "amikey/tigase-server", "path": "src/main/java/tigase/server/xmppserver/CIDConnections.java", "license": "agpl-3.0", "size": 22588 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,097,143
protected String createEqualsClauseRequest(String libelle, String value, List<String> paramList) { StringBuilder subQuery = new StringBuilder(); if (value != null && !value.isEmpty()) { if (!isWhereAdded) { subQuery.append(" where "); isWhereAdded = true; } else { subQuery.append(" and "); ...
String function(String libelle, String value, List<String> paramList) { StringBuilder subQuery = new StringBuilder(); if (value != null && !value.isEmpty()) { if (!isWhereAdded) { subQuery.append(STR); isWhereAdded = true; } else { subQuery.append(STR); } subQuery.append(libelle); subQuery.append(STR); paramList.add(va...
/** * Add an equals clause to query * * @param libelle * @param value * @return */
Add an equals clause to query
createEqualsClauseRequest
{ "repo_name": "landryb/cadastrapp", "path": "cadastrapp/src/main/java/org/georchestra/cadastrapp/service/CadController.java", "license": "gpl-3.0", "size": 8101 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
284,004
@ApiModelProperty(example = "null", value = "When specified a reason, this field holds the reason's description") public String getPisExemptLegalReason() { return pisExemptLegalReason; }
@ApiModelProperty(example = "null", value = STR) String function() { return pisExemptLegalReason; }
/** * When specified a reason, this field holds the reason's description * @return pisExemptLegalReason **/
When specified a reason, this field holds the reason's description
getPisExemptLegalReason
{ "repo_name": "Avalara/avataxbr-clients", "path": "java-client/src/main/java/io/swagger/client/model/Agast.java", "license": "gpl-3.0", "size": 29773 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,113,130
public static String decodeString(DynamicByteBuffer in) { if (in.remaining() < 2) { return null; } in.mark(); int strLen = readWord(in); if (in.remaining() < strLen) { in.reset(); return null; } byte[] strRaw...
static String function(DynamicByteBuffer in) { if (in.remaining() < 2) { return null; } in.mark(); int strLen = readWord(in); if (in.remaining() < strLen) { in.reset(); return null; } byte[] strRaw = new byte[strLen]; in.get(strRaw); try { return new String(strRaw, CHAR_SET); } catch (UnsupportedEncodingException ex) {...
/** * Load a string from the given buffer, reading first the two bytes of len and then the UTF-8 bytes of the string. * * @return the decoded string or null if NEED_DATA */
Load a string from the given buffer, reading first the two bytes of len and then the UTF-8 bytes of the string
decodeString
{ "repo_name": "pjq/rpi", "path": "spring-server/src/main/java/com/aliyun/iot/util/ProtocolUtils.java", "license": "apache-2.0", "size": 3983 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
2,033,960
MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, List<RemoteRepository> repositories, RepositorySystemSession session ) throws MojoNotFoundException, PluginResolutionException, PluginDescriptorParsingException, InvalidPluginDescriptorException;
MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, List<RemoteRepository> repositories, RepositorySystemSession session ) throws MojoNotFoundException, PluginResolutionException, PluginDescriptorParsingException, InvalidPluginDescriptorException;
/** * Retrieves the descriptor for the specified plugin goal from the plugin's main artifact. * * @param plugin The plugin whose mojo descriptor should be retrieved, must not be {@code null}. * @param goal The simple name of the mojo whose descriptor should be retrieved, must not be {@code null}. ...
Retrieves the descriptor for the specified plugin goal from the plugin's main artifact
getMojoDescriptor
{ "repo_name": "sonatype/maven-demo", "path": "maven-core/src/main/java/org/apache/maven/plugin/MavenPluginManager.java", "license": "apache-2.0", "size": 5747 }
[ "java.util.List", "org.apache.maven.model.Plugin", "org.apache.maven.plugin.descriptor.MojoDescriptor", "org.sonatype.aether.RepositorySystemSession", "org.sonatype.aether.repository.RemoteRepository" ]
import java.util.List; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.descriptor.MojoDescriptor; import org.sonatype.aether.RepositorySystemSession; import org.sonatype.aether.repository.RemoteRepository;
import java.util.*; import org.apache.maven.model.*; import org.apache.maven.plugin.descriptor.*; import org.sonatype.aether.*; import org.sonatype.aether.repository.*;
[ "java.util", "org.apache.maven", "org.sonatype.aether" ]
java.util; org.apache.maven; org.sonatype.aether;
1,945,270
protected DataAccessException wrap( final Exception e) { if (e instanceof AxisFault) { if (e.getMessage() != null) { if (e.getMessage().contains("UportalServiceUserNotFoundException:")) { return new PortalUserNotFoundException(e); } if (e.getMessage().contains("UportalServiceGroupNotF...
DataAccessException function( final Exception e) { if (e instanceof AxisFault) { if (e.getMessage() != null) { if (e.getMessage().contains(STR)) { return new PortalUserNotFoundException(e); } if (e.getMessage().contains(STR)) { return new PortalGroupNotFoundException(e); } } } e.printStackTrace(); if (e instanceof Remo...
/** * Wrap exceptions. * Ugly hack but what else util Axis throws exceptions correctly? */
Wrap exceptions. Ugly hack but what else util Axis throws exceptions correctly
wrap
{ "repo_name": "vbonamy/esup-uportal", "path": "uportal-war/src/main/java/org/esupportail/portal/ws/client/support/uportal/BasicUportalServiceImpl.java", "license": "apache-2.0", "size": 11612 }
[ "java.rmi.RemoteException", "javax.xml.rpc.ServiceException", "org.apache.axis.AxisFault", "org.esupportail.portal.ws.client.exceptions.PortalAccessException", "org.esupportail.portal.ws.client.exceptions.PortalErrorException", "org.esupportail.portal.ws.client.exceptions.PortalGroupNotFoundException", ...
import java.rmi.RemoteException; import javax.xml.rpc.ServiceException; import org.apache.axis.AxisFault; import org.esupportail.portal.ws.client.exceptions.PortalAccessException; import org.esupportail.portal.ws.client.exceptions.PortalErrorException; import org.esupportail.portal.ws.client.exceptions.PortalGroupNotFo...
import java.rmi.*; import javax.xml.rpc.*; import org.apache.axis.*; import org.esupportail.portal.ws.client.exceptions.*; import org.springframework.dao.*;
[ "java.rmi", "javax.xml", "org.apache.axis", "org.esupportail.portal", "org.springframework.dao" ]
java.rmi; javax.xml; org.apache.axis; org.esupportail.portal; org.springframework.dao;
134,699
public int runJob(String name) throws MalformedURLException,IOException { int response = post(getJobRunUrl(name)); return response; }
int function(String name) throws MalformedURLException,IOException { int response = post(getJobRunUrl(name)); return response; }
/** * Initiate the execution of the job. * * @param name Job name * @return HTTP response code */
Initiate the execution of the job
runJob
{ "repo_name": "ModelN/build-management", "path": "mn-build-core/src/main/java/com/modeln/build/jenkins/XmlApi.java", "license": "mit", "size": 13632 }
[ "java.io.IOException", "java.net.MalformedURLException" ]
import java.io.IOException; import java.net.MalformedURLException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
89,551
public void incrementFailed(int pct) { _lifetimeFailed.incrementAndGet(); _failRate.addData(pct, 1); _lastFailed = _context.clock().now(); } public RateStat getRejectionRate() { return _rejectRate; }
void function(int pct) { _lifetimeFailed.incrementAndGet(); _failRate.addData(pct, 1); _lastFailed = _context.clock().now(); } public RateStat getRejectionRate() { return _rejectRate; }
/** * Define this rate as the probability it really failed * @param pct = probability * 100 */
Define this rate as the probability it really failed
incrementFailed
{ "repo_name": "oakes/Nightweb", "path": "common/java/router/net/i2p/router/peermanager/TunnelHistory.java", "license": "unlicense", "size": 10348 }
[ "net.i2p.stat.RateStat" ]
import net.i2p.stat.RateStat;
import net.i2p.stat.*;
[ "net.i2p.stat" ]
net.i2p.stat;
760,491
public List<U> listVersions(ObjectId referenceId);
List<U> function(ObjectId referenceId);
/** * List all versions * @param referenceId * @return */
List all versions
listVersions
{ "repo_name": "mnrasul/jongo-dao", "path": "src/main/java/ca/rasul/jongo/history/HistoryCRUD.java", "license": "apache-2.0", "size": 1707 }
[ "java.util.List", "org.bson.types.ObjectId" ]
import java.util.List; import org.bson.types.ObjectId;
import java.util.*; import org.bson.types.*;
[ "java.util", "org.bson.types" ]
java.util; org.bson.types;
88,245
private static String getCourseTitle(final SemesterTreeNode semester, final CourseTreeNode course) { final String courseTitle = FileBrowser.removeIllegalCharacters(course.title); final String courseTitleLowerCase = courseTitle.toLowerCase(Locale.GERMANY); if (course.type == 3 || courseTitleLowerCase.contains(...
static String function(final SemesterTreeNode semester, final CourseTreeNode course) { final String courseTitle = FileBrowser.removeIllegalCharacters(course.title); final String courseTitleLowerCase = courseTitle.toLowerCase(Locale.GERMANY); if (course.type == 3 courseTitleLowerCase.contains("übung") courseTitleLowerCa...
/** * Match exercises with lectures and return course title. * * @return */
Match exercises with lectures and return course title
getCourseTitle
{ "repo_name": "rockihack/Stud.IP-FileSync", "path": "src/de/uni/hannover/studip/sync/models/PathBuilder.java", "license": "gpl-3.0", "size": 3876 }
[ "de.uni.hannover.studip.sync.datamodel.CourseTreeNode", "de.uni.hannover.studip.sync.datamodel.SemesterTreeNode", "de.uni.hannover.studip.sync.utils.FileBrowser", "java.util.Locale" ]
import de.uni.hannover.studip.sync.datamodel.CourseTreeNode; import de.uni.hannover.studip.sync.datamodel.SemesterTreeNode; import de.uni.hannover.studip.sync.utils.FileBrowser; import java.util.Locale;
import de.uni.hannover.studip.sync.datamodel.*; import de.uni.hannover.studip.sync.utils.*; import java.util.*;
[ "de.uni.hannover", "java.util" ]
de.uni.hannover; java.util;
817,712
@DELETE @Path("{id}") public Response removeAclRule(@PathParam("id") String id) { RuleId ruleId = new RuleId(Long.parseLong(id.substring(2), 16)); get(AclService.class).removeAclRule(ruleId); return Response.ok().build(); }
@Path("{id}") Response function(@PathParam("id") String id) { RuleId ruleId = new RuleId(Long.parseLong(id.substring(2), 16)); get(AclService.class).removeAclRule(ruleId); return Response.ok().build(); }
/** * Remove ACL rule. * * @param id ACL rule id (in hex string format) * @return 200 OK */
Remove ACL rule
removeAclRule
{ "repo_name": "sonu283304/onos", "path": "apps/acl/src/main/java/org/onosproject/acl/AclWebResource.java", "license": "apache-2.0", "size": 6334 }
[ "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.core.Response" ]
import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Response;
import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
2,832,725
public static ResourceAdaptersDescriptor createTestDeployment(int allocationRetry, Boolean validation, int invalidConnectionFailureCount) { return createTestDeployment(allocationRetry, validation, invalidConnectionFailureCount, "TestConnectionFactory", "TestAdminObject", null); }
static ResourceAdaptersDescriptor function(int allocationRetry, Boolean validation, int invalidConnectionFailureCount) { return createTestDeployment(allocationRetry, validation, invalidConnectionFailureCount, STR, STR, null); }
/** * Create the test.rar deployment * * @param allocationRetry The number of allocation retries * @param validation True is foreground, false is background, null is none * @param invalidConnectionFailureCount The invalid connection failure count * @return The resource adapter descriptor */
Create the test.rar deployment
createTestDeployment
{ "repo_name": "jandsu/ironjacamar", "path": "testsuite/src/test/java/org/ironjacamar/rars/ResourceAdapterFactory.java", "license": "epl-1.0", "size": 36781 }
[ "org.ironjacamar.embedded.dsl.resourceadapters20.api.ResourceAdaptersDescriptor" ]
import org.ironjacamar.embedded.dsl.resourceadapters20.api.ResourceAdaptersDescriptor;
import org.ironjacamar.embedded.dsl.resourceadapters20.api.*;
[ "org.ironjacamar.embedded" ]
org.ironjacamar.embedded;
2,163,719
private String getLinkIncremental( final CommandLineLinkerConfiguration linkerConfig) { String incremental = "0"; String[] args = linkerConfig.getPreArguments(); for (int i = 0; i < args.length; i++) { if ("/INCREMENTAL:NO".equals(args[i])) { increment...
String function( final CommandLineLinkerConfiguration linkerConfig) { String incremental = "0"; String[] args = linkerConfig.getPreArguments(); for (int i = 0; i < args.length; i++) { if (STR.equals(args[i])) { incremental = "1"; } if (STR.equals(args[i])) { incremental = "2"; } } return incremental; }
/** * Get value of LinkIncremental property. * @param linkerConfig linker configuration. * @return value of LinkIncremental property */
Get value of LinkIncremental property
getLinkIncremental
{ "repo_name": "maven-nar/cpptasks-parallel", "path": "src/main/java/com/github/maven_nar/cpptasks/devstudio/VisualStudioNETProjectWriter.java", "license": "apache-2.0", "size": 32661 }
[ "com.github.maven_nar.cpptasks.compiler.CommandLineLinkerConfiguration" ]
import com.github.maven_nar.cpptasks.compiler.CommandLineLinkerConfiguration;
import com.github.maven_nar.cpptasks.compiler.*;
[ "com.github.maven_nar" ]
com.github.maven_nar;
814,554
private void updateRowHeights() { int valueColIndex = -1; for (int col = 0; col < resultsTable.getColumnCount(); col++) { if (resultsTable.getColumnName(col).equals(COLUMN_HEADERS[1])) { valueColIndex = col; } } if (valueColIndex != -1) { ...
void function() { int valueColIndex = -1; for (int col = 0; col < resultsTable.getColumnCount(); col++) { if (resultsTable.getColumnName(col).equals(COLUMN_HEADERS[1])) { valueColIndex = col; } } if (valueColIndex != -1) { for (int row = 0; row < resultsTable.getRowCount(); row++) { Component comp = resultsTable.prepar...
/** * Sets the row heights to the heights of the content in their Value column. */
Sets the row heights to the heights of the content in their Value column
updateRowHeights
{ "repo_name": "esaunders/autopsy", "path": "Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java", "license": "apache-2.0", "size": 44982 }
[ "java.awt.Component", "javax.swing.JTextArea", "javax.swing.text.View" ]
import java.awt.Component; import javax.swing.JTextArea; import javax.swing.text.View;
import java.awt.*; import javax.swing.*; import javax.swing.text.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,869,622
private void buildCache(final boolean recordStats) { // Setting concurrency level to 1 ensures global LRU eviction // by limiting all entries to one segment // (see http://stackoverflow.com/questions/10236057/guava-cache-eviction-policy ). // The "penalty" for this appears to be ser...
void function(final boolean recordStats) { CacheBuilder<CanvasId, CachedCanvasData> cacheBuilder = CacheBuilder.newBuilder() .concurrencyLevel(1) .maximumWeight(getKilobyteCapacity()) .weigher(weigher) .removalListener(asyncRemovalListener); if (recordStats) { cacheBuilder = cacheBuilder.recordStats(); } this.canvasIdT...
/** * Builds a new empty cache. */
Builds a new empty cache
buildCache
{ "repo_name": "fcollman/render", "path": "render-ws-spark-client/src/main/java/org/janelia/render/client/spark/cache/CanvasDataCache.java", "license": "gpl-2.0", "size": 9931 }
[ "com.google.common.cache.CacheBuilder", "org.janelia.alignment.match.CanvasId", "org.slf4j.Logger", "org.slf4j.LoggerFactory" ]
import com.google.common.cache.CacheBuilder; import org.janelia.alignment.match.CanvasId; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
import com.google.common.cache.*; import org.janelia.alignment.match.*; import org.slf4j.*;
[ "com.google.common", "org.janelia.alignment", "org.slf4j" ]
com.google.common; org.janelia.alignment; org.slf4j;
566,400
protected void initShardedIndex(String index) throws IOException { createShardedIndex(index, 3, 0); indexBatchOfDocuments(index); }
void function(String index) throws IOException { createShardedIndex(index, 3, 0); indexBatchOfDocuments(index); }
/** * Creates an index with given name with 3 shards */
Creates an index with given name with 3 shards
initShardedIndex
{ "repo_name": "gurbuzali/hazelcast-jet", "path": "extensions/elasticsearch/elasticsearch-6/src/test/java/com/hazelcast/jet/elastic/BaseElasticTest.java", "license": "apache-2.0", "size": 9121 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,758,237
@Test void createSession() { // Arrange // We want to ensure that the ReactorExecutor does not shutdown unexpectedly. There are still items to still // process. when(reactor.process()).thenReturn(true); when(reactor.connectionToHost(connectionHandler.getHostname(), connec...
void createSession() { when(reactor.process()).thenReturn(true); when(reactor.connectionToHost(connectionHandler.getHostname(), connectionHandler.getProtocolPort(), connectionHandler)).thenReturn(connectionProtonJ); when(connectionProtonJ.session()).thenReturn(session); when(session.attachments()).thenReturn(record); S...
/** * Creates a session with the given name and set handler. */
Creates a session with the given name and set handler
createSession
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorConnectionTest.java", "license": "mit", "size": 16542 }
[ "org.apache.qpid.proton.engine.Handler", "org.junit.jupiter.api.Assertions", "org.mockito.Mockito" ]
import org.apache.qpid.proton.engine.Handler; import org.junit.jupiter.api.Assertions; import org.mockito.Mockito;
import org.apache.qpid.proton.engine.*; import org.junit.jupiter.api.*; import org.mockito.*;
[ "org.apache.qpid", "org.junit.jupiter", "org.mockito" ]
org.apache.qpid; org.junit.jupiter; org.mockito;
2,418,777
public static int getIntValue(REGISTRY_ROOT_KEY rootKey, String subKeyName, String name) { Advapi32 advapi32; IntByReference pType, lpcbData; byte[] lpData = new byte[1]; int handle = 0; int ret = 0; advapi32 = Advapi32.INSTANCE; pType = new IntByReference(); lpcbData = n...
static int function(REGISTRY_ROOT_KEY rootKey, String subKeyName, String name) { Advapi32 advapi32; IntByReference pType, lpcbData; byte[] lpData = new byte[1]; int handle = 0; int ret = 0; advapi32 = Advapi32.INSTANCE; pType = new IntByReference(); lpcbData = new IntByReference(); handle = openKey(rootKey, subKeyName,...
/** * Read an int value. * * * @return int or 0 * @param rootKey root key * @param subKeyName key name * @param name value name */
Read an int value
getIntValue
{ "repo_name": "thepaul/libjna-java", "path": "contrib/ntservice/src/jnacontrib/win32/Registry.java", "license": "lgpl-2.1", "size": 13681 }
[ "com.sun.jna.ptr.IntByReference" ]
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.*;
[ "com.sun.jna" ]
com.sun.jna;
2,450,987
public void addElement(JRElement element) { addElement(children.size(), element); }
void function(JRElement element) { addElement(children.size(), element); }
/** * Adds a sub element to the frame. * * @param element the element to add */
Adds a sub element to the frame
addElement
{ "repo_name": "aleatorio12/ProVentasConnector", "path": "jasperreports-6.2.1-project/jasperreports-6.2.1/src/net/sf/jasperreports/engine/design/JRDesignFrame.java", "license": "gpl-3.0", "size": 8988 }
[ "net.sf.jasperreports.engine.JRElement" ]
import net.sf.jasperreports.engine.JRElement;
import net.sf.jasperreports.engine.*;
[ "net.sf.jasperreports" ]
net.sf.jasperreports;
1,077,136
String realm = "defaultRealm"; try { UserRegistry ur = RegistryHelper.getUserRegistry(null); if (ur != null) { String r = ur.getRealm(); if (r != null) { realm = r; } } } catch (Exception ex) { ...
String realm = STR; try { UserRegistry ur = RegistryHelper.getUserRegistry(null); if (ur != null) { String r = ur.getRealm(); if (r != null) { realm = r; } } } catch (Exception ex) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, STR, ex); } } return realm; }
/** * Obtains the realm name of the configured UserRegistry, if one is available. * * @return The configured realm name, or "defaultRealm" if no UserRegistry is present */
Obtains the realm name of the configured UserRegistry, if one is available
getRealmName
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.token.ltpa/src/com/ibm/ws/security/token/ltpa/internal/LTPAKeyFileCreatorImpl.java", "license": "epl-1.0", "size": 3080 }
[ "com.ibm.websphere.ras.Tr", "com.ibm.websphere.ras.TraceComponent", "com.ibm.websphere.security.UserRegistry", "com.ibm.wsspi.security.registry.RegistryHelper" ]
import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import com.ibm.websphere.security.UserRegistry; import com.ibm.wsspi.security.registry.RegistryHelper;
import com.ibm.websphere.ras.*; import com.ibm.websphere.security.*; import com.ibm.wsspi.security.registry.*;
[ "com.ibm.websphere", "com.ibm.wsspi" ]
com.ibm.websphere; com.ibm.wsspi;
533,779
//----------------------------------------------------------------------- protected void setInterval(long startInstant, long endInstant, Chronology chrono) { checkInterval(startInstant, endInstant); iStartMillis = startInstant; iEndMillis = endInstant; iChronology = DateTimeUtil...
void function(long startInstant, long endInstant, Chronology chrono) { checkInterval(startInstant, endInstant); iStartMillis = startInstant; iEndMillis = endInstant; iChronology = DateTimeUtils.getChronology(chrono); }
/** * Sets this interval from two millisecond instants and a chronology. * * @param startInstant the start of the time interval * @param endInstant the start of the time interval * @param chrono the chronology, not null * @throws IllegalArgumentException if the end is before the start ...
Sets this interval from two millisecond instants and a chronology
setInterval
{ "repo_name": "0359xiaodong/joda-time-android", "path": "library/src/org/joda/time/base/BaseInterval.java", "license": "apache-2.0", "size": 9995 }
[ "org.joda.time.Chronology", "org.joda.time.DateTimeUtils" ]
import org.joda.time.Chronology; import org.joda.time.DateTimeUtils;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,414,694
public double thresholdPercentageFromWatermark(String watermark) { try { return RatioValue.parseRatioValue(watermark).getAsPercent(); } catch (ElasticsearchParseException ex) { return 100.0; } }
double function(String watermark) { try { return RatioValue.parseRatioValue(watermark).getAsPercent(); } catch (ElasticsearchParseException ex) { return 100.0; } }
/** * Attempts to parse the watermark into a percentage, returning 100.0% if * it cannot be parsed. */
Attempts to parse the watermark into a percentage, returning 100.0% if it cannot be parsed
thresholdPercentageFromWatermark
{ "repo_name": "opendatasoft/elasticsearch", "path": "src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java", "license": "apache-2.0", "size": 29753 }
[ "org.elasticsearch.ElasticsearchParseException", "org.elasticsearch.common.unit.RatioValue" ]
import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.unit.RatioValue;
import org.elasticsearch.*; import org.elasticsearch.common.unit.*;
[ "org.elasticsearch", "org.elasticsearch.common" ]
org.elasticsearch; org.elasticsearch.common;
2,845,337
protected synchronized void callConnectionEventListeners(int eventType, SQLException sqlException) { if (this.connectionEventListeners == null) { return; } Iterator<Map.Entry<ConnectionEventListener, ConnectionEventListener>> iterator = this.connectionEventListeners.entrySet().iterator(); Connect...
synchronized void function(int eventType, SQLException sqlException) { if (this.connectionEventListeners == null) { return; } Iterator<Map.Entry<ConnectionEventListener, ConnectionEventListener>> iterator = this.connectionEventListeners.entrySet().iterator(); ConnectionEvent connectionevent = new ConnectionEvent(this, ...
/** * Notifies all registered ConnectionEventListeners of ConnectionEvents. * Instantiates a new ConnectionEvent which wraps sqlException and invokes * either connectionClose or connectionErrorOccurred on listener as * appropriate. * * @param eventType * value indicating whether connectionClos...
Notifies all registered ConnectionEventListeners of ConnectionEvents. Instantiates a new ConnectionEvent which wraps sqlException and invokes either connectionClose or connectionErrorOccurred on listener as appropriate
callConnectionEventListeners
{ "repo_name": "seadsystem/SchemaSpy", "path": "src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java", "license": "gpl-2.0", "size": 7846 }
[ "java.sql.SQLException", "java.util.Iterator", "java.util.Map", "javax.sql.ConnectionEvent", "javax.sql.ConnectionEventListener" ]
import java.sql.SQLException; import java.util.Iterator; import java.util.Map; import javax.sql.ConnectionEvent; import javax.sql.ConnectionEventListener;
import java.sql.*; import java.util.*; import javax.sql.*;
[ "java.sql", "java.util", "javax.sql" ]
java.sql; java.util; javax.sql;
1,464,619
private static void assertDataTruncation( String[] expectedRow, String[] actualRow, int index, boolean parameter, boolean read, int dataSize, int transferSize, SQLWarning warning) { assertEquals("Wrong number of columns", expectedRow.length, actualRow...
static void function( String[] expectedRow, String[] actualRow, int index, boolean parameter, boolean read, int dataSize, int transferSize, SQLWarning warning) { assertEquals(STR, expectedRow.length, actualRow.length); assertNotNull(STR, warning); for (int i = 0; i < expectedRow.length; i++) { assertEquals(STR + (i + 1...
/** * Assert that data returned from the server was truncated, and that the * proper warning came with the result. * * @param expectedRow the expected values * @param actualRow the actual values returned * @param index the expected column/parameter index in the warning * @para...
Assert that data returned from the server was truncated, and that the proper warning came with the result
assertDataTruncation
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/derbynet/PrepareStatementTest.java", "license": "apache-2.0", "size": 57607 }
[ "java.sql.DataTruncation", "java.sql.SQLWarning" ]
import java.sql.DataTruncation; import java.sql.SQLWarning;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,657,895
public File getRepository() { return repository; }
File function() { return repository; }
/** * Returns the directory used to temporarily store files that are larger than the configured * size threshold. * * @return The directory in which temporary files will be located. * * @see #setRepository(java.io.File) * */
Returns the directory used to temporarily store files that are larger than the configured size threshold
getRepository
{ "repo_name": "martin-g/wicket-osgi", "path": "wicket-util/src/main/java/org/apache/wicket/util/upload/DiskFileItemFactory.java", "license": "apache-2.0", "size": 6375 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,500,453
private void bindToThread() { _cacheThreadLocal.set(_cache); ThreadLocalServiceContext.init(_cycleServiceContext); AnalyticsEnvironment.setInstance(_targetEnvironment); }
void function() { _cacheThreadLocal.set(_cache); ThreadLocalServiceContext.init(_cycleServiceContext); AnalyticsEnvironment.setInstance(_targetEnvironment); }
/** * Binds the thread local state to the current thread. * * @return this, so it can be used in a try-finally block */
Binds the thread local state to the current thread
bindToThread
{ "repo_name": "jeorme/OG-Platform", "path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/engine/View.java", "license": "apache-2.0", "size": 39588 }
[ "com.opengamma.analytics.env.AnalyticsEnvironment", "com.opengamma.service.ThreadLocalServiceContext" ]
import com.opengamma.analytics.env.AnalyticsEnvironment; import com.opengamma.service.ThreadLocalServiceContext;
import com.opengamma.analytics.env.*; import com.opengamma.service.*;
[ "com.opengamma.analytics", "com.opengamma.service" ]
com.opengamma.analytics; com.opengamma.service;
342,293
protected final void processTilingPattern(PDTilingPattern tilingPattern, PDColor color, PDColorSpace colorSpace) throws IOException { processTilingPattern(tilingPattern, color, colorSpace, tilingPattern.getMatrix()); }
final void function(PDTilingPattern tilingPattern, PDColor color, PDColorSpace colorSpace) throws IOException { processTilingPattern(tilingPattern, color, colorSpace, tilingPattern.getMatrix()); }
/** * Process the given tiling pattern. * * @param tilingPattern the tiling pattern * @param color color to use, if this is an uncoloured pattern, otherwise null. * @param colorSpace color space to use, if this is an uncoloured pattern, otherwise null. * @throws IOException if there is an e...
Process the given tiling pattern
processTilingPattern
{ "repo_name": "gavanx/pdflearn", "path": "pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java", "license": "apache-2.0", "size": 32281 }
[ "java.io.IOException", "org.apache.pdfbox.pdmodel.graphics.color.PDColor", "org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace", "org.apache.pdfbox.pdmodel.graphics.pattern.PDTilingPattern" ]
import java.io.IOException; import org.apache.pdfbox.pdmodel.graphics.color.PDColor; import org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace; import org.apache.pdfbox.pdmodel.graphics.pattern.PDTilingPattern;
import java.io.*; import org.apache.pdfbox.pdmodel.graphics.color.*; import org.apache.pdfbox.pdmodel.graphics.pattern.*;
[ "java.io", "org.apache.pdfbox" ]
java.io; org.apache.pdfbox;
1,436,925
@Test public void isValidUserValidResponse() throws Exception { servlet.setExpectedMethodName("isValidUser"); servlet.setFakeResponse("true"); assertTrue(servlet.isValidUser("admin")); servlet.setFakeResponse("false"); assertFalse(servlet.isValidUser("admin")); }
void function() throws Exception { servlet.setExpectedMethodName(STR); servlet.setFakeResponse("true"); assertTrue(servlet.isValidUser("admin")); servlet.setFakeResponse("false"); assertFalse(servlet.isValidUser("admin")); }
/** * Test method for {@link com.ibm.ws.security.registry.test.UserRegistryServletConnection#isValidUser(java.lang.String)}. */
Test method for <code>com.ibm.ws.security.registry.test.UserRegistryServletConnection#isValidUser(java.lang.String)</code>
isValidUserValidResponse
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.registry_test.servlet/test/com/ibm/ws/security/registry/test/UserRegistryServletConnectionTest.java", "license": "epl-1.0", "size": 29746 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,253,006
private @Nullable BooleanSupplier buildInSSL(Auditor auditor, HttpClientBuilder builder, final String ssl) { builder.setSSLHostnameVerifier( new PromiscuousHostnameVerifier(auditor)); try { AuditingSSLSocketFactory auditingSSLSocketFact...
@Nullable BooleanSupplier function(Auditor auditor, HttpClientBuilder builder, final String ssl) { builder.setSSLHostnameVerifier( new PromiscuousHostnameVerifier(auditor)); try { AuditingSSLSocketFactory auditingSSLSocketFactory = new AuditingSSLSocketFactory(auditor, ssl); builder.setSSLSocketFactory(auditingSSLSocke...
/** * Configures builder for the given SSL/TLS version * * @param builder * the builder to configure * @param ssl * the ssl info */
Configures builder for the given SSL/TLS version
buildInSSL
{ "repo_name": "technosf/Posterer", "path": "Modules/src/main/java/com/github/technosf/posterer/modules/commons/transport/CommonsRequestModelImpl.java", "license": "apache-2.0", "size": 15060 }
[ "com.github.technosf.posterer.modules.commons.transport.ssl.AuditingSSLSocketFactory", "com.github.technosf.posterer.utils.Auditor", "com.github.technosf.posterer.utils.ssl.PromiscuousHostnameVerifier", "java.io.FileNotFoundException", "java.io.IOException", "java.security.KeyManagementException", "java...
import com.github.technosf.posterer.modules.commons.transport.ssl.AuditingSSLSocketFactory; import com.github.technosf.posterer.utils.Auditor; import com.github.technosf.posterer.utils.ssl.PromiscuousHostnameVerifier; import java.io.FileNotFoundException; import java.io.IOException; import java.security.KeyManagementEx...
import com.github.technosf.posterer.modules.commons.transport.ssl.*; import com.github.technosf.posterer.utils.*; import com.github.technosf.posterer.utils.ssl.*; import java.io.*; import java.security.*; import java.security.cert.*; import java.util.function.*; import org.apache.http.impl.client.*; import org.eclipse....
[ "com.github.technosf", "java.io", "java.security", "java.util", "org.apache.http", "org.eclipse.jdt" ]
com.github.technosf; java.io; java.security; java.util; org.apache.http; org.eclipse.jdt;
1,971,541
void insertNullAt(int n) { switch (n) { case 0: super.visitInsn(ACONST_NULL); break; case 1: super.visitInsn(ACONST_NULL); super.visitInsn(SWAP); break; case 2: super.visitInsn(ACONST_NULL); super.visitInsn(DUP_X2); super.visitInsn(POP); break; default: LocalVariableNode[] d =...
void insertNullAt(int n) { switch (n) { case 0: super.visitInsn(ACONST_NULL); break; case 1: super.visitInsn(ACONST_NULL); super.visitInsn(SWAP); break; case 2: super.visitInsn(ACONST_NULL); super.visitInsn(DUP_X2); super.visitInsn(POP); break; default: LocalVariableNode[] d = storeToLocals(n); super.visitInsn(ACONST_N...
/** * Will insert a NULL after the nth element from the top of the stack * * @param n */
Will insert a NULL after the nth element from the top of the stack
insertNullAt
{ "repo_name": "Programming-Systems-Lab/knarr", "path": "Phosphor/src/edu/columbia/cs/psl/phosphor/instrumenter/TaintPassingMV.java", "license": "mit", "size": 128574 }
[ "edu.columbia.cs.psl.phosphor.org.objectweb.asm.tree.LocalVariableNode" ]
import edu.columbia.cs.psl.phosphor.org.objectweb.asm.tree.LocalVariableNode;
import edu.columbia.cs.psl.phosphor.org.objectweb.asm.tree.*;
[ "edu.columbia.cs" ]
edu.columbia.cs;
931,991
@WebMethod @WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201408") @RequestWrapper(localName = "updateReconciliationReportRows", targetNamespace = "https://www.google.com/apis/ads/publisher/v201408", className = "com.google.api.ads.dfp.jaxws.v201408.ReconciliationRep...
@WebResult(name = "rval", targetNamespace = STRupdateReconciliationReportRowsSTRhttps: @ResponseWrapper(localName = "updateReconciliationReportRowsResponseSTRhttps: List<ReconciliationReportRow> function( @WebParam(name = "reconciliationReportRowsSTRhttps: List<ReconciliationReportRow> reconciliationReportRows) throws ...
/** * * Updates a list of {@link ReconciliationReportRow} which belong to same * {@link ReconciliationReport}. * * @param reconciliationReportRows a list of reconciliation report rows to update * @return the updated reconciliation report rows ...
Updates a list of <code>ReconciliationReportRow</code> which belong to same <code>ReconciliationReport</code>
updateReconciliationReportRows
{ "repo_name": "raja15792/googleads-java-lib", "path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201408/ReconciliationReportRowServiceInterface.java", "license": "apache-2.0", "size": 7261 }
[ "java.util.List", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.ResponseWrapper" ]
import java.util.List; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper;
import java.util.*; import javax.jws.*; import javax.xml.ws.*;
[ "java.util", "javax.jws", "javax.xml" ]
java.util; javax.jws; javax.xml;
39,018
public void testGetRestClientWithAccountSetup() throws URISyntaxException { // Make sure we have no accounts initially assertNoAccounts(); // Create account createTestAccount();
void function() throws URISyntaxException { assertNoAccounts(); createTestAccount();
/** * Test getRestClient - when there is an account * @throws URISyntaxException */
Test getRestClient - when there is an account
testGetRestClientWithAccountSetup
{ "repo_name": "kchitalia/android-travis", "path": "libs/test/SalesforceSDKTest/src/com/salesforce/androidsdk/rest/ClientManagerTest.java", "license": "apache-2.0", "size": 18670 }
[ "java.net.URISyntaxException" ]
import java.net.URISyntaxException;
import java.net.*;
[ "java.net" ]
java.net;
984,916
public static ImmutableBitSet bits(List<RexNode> exprs, RexNode expr) { final InputFinder inputFinder = new InputFinder(); RexUtil.apply(inputFinder, exprs, expr); return inputFinder.inputBitSet.build(); }
static ImmutableBitSet function(List<RexNode> exprs, RexNode expr) { final InputFinder inputFinder = new InputFinder(); RexUtil.apply(inputFinder, exprs, expr); return inputFinder.inputBitSet.build(); }
/** * Returns a bit set describing the inputs used by a collection of * project expressions and an optional condition. */
Returns a bit set describing the inputs used by a collection of project expressions and an optional condition
bits
{ "repo_name": "YrAuYong/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/plan/RelOptUtil.java", "license": "apache-2.0", "size": 119673 }
[ "java.util.List", "org.apache.calcite.rex.RexNode", "org.apache.calcite.rex.RexUtil", "org.apache.calcite.util.ImmutableBitSet" ]
import java.util.List; import org.apache.calcite.rex.RexNode; import org.apache.calcite.rex.RexUtil; import org.apache.calcite.util.ImmutableBitSet;
import java.util.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,007,837
public void testNoopUpdate() throws IOException { assertAcked(prepareCreate("test") .addMapping("type1", XContentFactory.jsonBuilder() .startObject() .startObject("type1") .startObject("_timestamp").field("enabled", true...
void function() throws IOException { assertAcked(prepareCreate("test") .addMapping("type1", XContentFactory.jsonBuilder() .startObject() .startObject("type1") .startObject(STR).field(STR, true).endObject() .startObject("_ttl").field(STR, true).endObject() .endObject() .endObject())); ensureYellow("test"); long aLongTim...
/** * Test that updates with detect_noop set to true (the default) that don't * change the source don't change the ttl. This is unexpected behavior and * documented in ttl-field.asciidoc. If this behavior changes it is safe to * rewrite this test to reflect the new behavior and to change the * ...
Test that updates with detect_noop set to true (the default) that don't change the source don't change the ttl. This is unexpected behavior and documented in ttl-field.asciidoc. If this behavior changes it is safe to rewrite this test to reflect the new behavior and to change the documentation
testNoopUpdate
{ "repo_name": "strapdata/elassandra-test", "path": "core/src/test/java/org/elasticsearch/ttl/SimpleTTLIT.java", "license": "apache-2.0", "size": 16805 }
[ "java.io.IOException", "org.elasticsearch.action.index.IndexResponse", "org.elasticsearch.action.update.UpdateRequestBuilder", "org.elasticsearch.common.xcontent.XContentFactory", "org.elasticsearch.test.hamcrest.ElasticsearchAssertions", "org.hamcrest.Matchers" ]
import java.io.IOException; import org.elasticsearch.action.index.IndexResponse; import org.elasticsearch.action.update.UpdateRequestBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; import org.hamcrest.Matchers;
import java.io.*; import org.elasticsearch.action.index.*; import org.elasticsearch.action.update.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.test.hamcrest.*; import org.hamcrest.*;
[ "java.io", "org.elasticsearch.action", "org.elasticsearch.common", "org.elasticsearch.test", "org.hamcrest" ]
java.io; org.elasticsearch.action; org.elasticsearch.common; org.elasticsearch.test; org.hamcrest;
1,277,157
public void addElement (Object element) { elements.add (element); // Avisa a los suscriptores creando un TableModelEvent... TableModelEvent evento; evento = new TableModelEvent (this, this.getRowCount()-1, this.getRowCount()-1, TableModelEvent.ALL_COLUMNS, ...
void function (Object element) { elements.add (element); TableModelEvent evento; evento = new TableModelEvent (this, this.getRowCount()-1, this.getRowCount()-1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT); alertListeners (evento); }
/** * agrega un objeto en el modelo. * avisa a los suscriptores el cambio. * @param element */
agrega un objeto en el modelo. avisa a los suscriptores el cambio
addElement
{ "repo_name": "iriber/miGestionSwing", "path": "src/main/java/com/migestion/swing/model/UICollection.java", "license": "gpl-2.0", "size": 11875 }
[ "javax.swing.event.TableModelEvent" ]
import javax.swing.event.TableModelEvent;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
807,215
Path getPath(SourcePath path);
Path getPath(SourcePath path);
/** * Does it get an absolute path? Does it get a relative path? Who knows! */
Does it get an absolute path? Does it get a relative path? Who knows
getPath
{ "repo_name": "vschs007/buck", "path": "src/com/facebook/buck/ide/intellij/model/IjLibraryFactoryResolver.java", "license": "apache-2.0", "size": 1171 }
[ "com.facebook.buck.rules.SourcePath", "java.nio.file.Path" ]
import com.facebook.buck.rules.SourcePath; import java.nio.file.Path;
import com.facebook.buck.rules.*; import java.nio.file.*;
[ "com.facebook.buck", "java.nio" ]
com.facebook.buck; java.nio;
1,157,780
@Test public void testDependencyResolution() throws DuplicateBundlePathException, BundleDependencyException, IOException{ List<JoinableResourceBundle> bundles = getBundles("css", "/bundle/factory/bundleshandlerfactory/jawr.properties"); assertEquals(4, bundles.size()); for (Iterator<JoinableResourceBund...
void function() throws DuplicateBundlePathException, BundleDependencyException, IOException{ List<JoinableResourceBundle> bundles = getBundles("css", STR); assertEquals(4, bundles.size()); for (Iterator<JoinableResourceBundle> iterator = bundles.iterator(); iterator.hasNext();) { JoinableResourceBundle bundle = (Joinab...
/** * Test the dependency resolution */
Test the dependency resolution
testDependencyResolution
{ "repo_name": "davidwebster48/jawr-main-repo", "path": "jawr/jawr-core/src/test/java/test/net/jawr/web/resource/bundle/factory/BundlesHandlerFactoryTestCase.java", "license": "apache-2.0", "size": 7921 }
[ "java.io.IOException", "java.util.Arrays", "java.util.Iterator", "java.util.List", "net.jawr.web.exception.BundleDependencyException", "net.jawr.web.exception.DuplicateBundlePathException", "net.jawr.web.resource.bundle.JoinableResourceBundle", "org.junit.Assert" ]
import java.io.IOException; import java.util.Arrays; import java.util.Iterator; import java.util.List; import net.jawr.web.exception.BundleDependencyException; import net.jawr.web.exception.DuplicateBundlePathException; import net.jawr.web.resource.bundle.JoinableResourceBundle; import org.junit.Assert;
import java.io.*; import java.util.*; import net.jawr.web.exception.*; import net.jawr.web.resource.bundle.*; import org.junit.*;
[ "java.io", "java.util", "net.jawr.web", "org.junit" ]
java.io; java.util; net.jawr.web; org.junit;
207,905
public void extractAndImport(){ // Connection sourceSession = null; // Connection destSession = null; try(Connection sourceSession = importFrom.getConnection(); Connection destSession = insertInto.getConnection()){ Statement selectStmt = sourceSession.createStatement(); // StringBuild...
void function(){ try(Connection sourceSession = importFrom.getConnection(); Connection destSession = insertInto.getConnection()){ Statement selectStmt = sourceSession.createStatement(); Statement recordsAlreadyExsists = destSession.createStatement(); for(Table table : importTables){ StringBuilder selectAll = new String...
/** * Records will be extracted one by one, according to the order specified in <code>imortTables</code> */
Records will be extracted one by one, according to the order specified in <code>imortTables</code>
extractAndImport
{ "repo_name": "mectest1/HelloGUI", "path": "HelloUtilityPlugin-VMAnalyzer/src/com/mec/app/plugin/grammar/Grammar5DB2DDLAnalyzer.java", "license": "gpl-3.0", "size": 12930 }
[ "com.mec.app.plugin.grammar.DB2Construct", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement", "java.util.stream.Collectors" ]
import com.mec.app.plugin.grammar.DB2Construct; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.stream.Collectors;
import com.mec.app.plugin.grammar.*; import java.sql.*; import java.util.stream.*;
[ "com.mec.app", "java.sql", "java.util" ]
com.mec.app; java.sql; java.util;
1,978,539
EOperation getproductionschema2petrinetAxiom_r1__AddElement__EMap_EList_EList();
EOperation getproductionschema2petrinetAxiom_r1__AddElement__EMap_EList_EList();
/** * Returns the meta object for the '{@link de.mdelab.mltgg.productionschema2petrinet.generated.productionschema2petrinetAxiom_r1#addElement(org.eclipse.emf.common.util.EMap, org.eclipse.emf.common.util.EList, org.eclipse.emf.common.util.EList) <em>Add Element</em>}' operation. * <!-- begin-user-doc --> * <!-- ...
Returns the meta object for the '<code>de.mdelab.mltgg.productionschema2petrinet.generated.productionschema2petrinetAxiom_r1#addElement(org.eclipse.emf.common.util.EMap, org.eclipse.emf.common.util.EList, org.eclipse.emf.common.util.EList) Add Element</code>' operation.
getproductionschema2petrinetAxiom_r1__AddElement__EMap_EList_EList
{ "repo_name": "Somae/mdsd-factory-project", "path": "transformation/de.mdelab.languages.productionschema2petrinet/src-gen/de/mdelab/mltgg/productionschema2petrinet/generated/GeneratedPackage.java", "license": "gpl-3.0", "size": 283384 }
[ "org.eclipse.emf.ecore.EOperation" ]
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,551,720
public String getParmValue(Map<String, String> parmSet, String Tag);
String function(Map<String, String> parmSet, String Tag);
/** * Return a parameter value within an XML tag * <TAG Parameter="VALUE"> * * <br><br><b>Usage:</b> String ThisColHead=getParmValue(parmSet,"TD"); * @param parmSet set of parms to search * @param Tag Tag to search for * @return String Parameter value */
Return a parameter value within an XML tag Usage: String ThisColHead=getParmValue(parmSet,"TD")
getParmValue
{ "repo_name": "ConsecroMUD/ConsecroMUD", "path": "com/suscipio_solutions/consecro_mud/Libraries/interfaces/XMLLibrary.java", "license": "apache-2.0", "size": 12522 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
675,939
@Override protected void mouseClicked(int par1, int par2, int par3) throws IOException { super.mouseClicked(par1, par2, par3); commandBox.mouseClicked(par1, par2, par3); }
void function(int par1, int par2, int par3) throws IOException { super.mouseClicked(par1, par2, par3); commandBox.mouseClicked(par1, par2, par3); }
/** * Called when the mouse is clicked. * * @throws IOException */
Called when the mouse is clicked
mouseClicked
{ "repo_name": "null-dev/EvenWurse", "path": "Wurst Client/src/tk/wurst_client/gui/options/keybinds/GuiKeybindChange.java", "license": "mpl-2.0", "size": 4090 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,648,071
@Test public void defaultProvider() { assertThat(ProviderRegistry.getLoggingProvider()).isInstanceOf(NopLoggingProvider.class); } /** * Verifies that a {@link NopLoggingProvider} will be created if there are no registered logging providers. * * @throws Exception * Failed invoking private me...
void function() { assertThat(ProviderRegistry.getLoggingProvider()).isInstanceOf(NopLoggingProvider.class); } /** * Verifies that a {@link NopLoggingProvider} will be created if there are no registered logging providers. * * @throws Exception * Failed invoking private method {@link ProviderRegistry#loadLoggingProvider(...
/** * Verifies that the expected logging provider will be returned. */
Verifies that the expected logging provider will be returned
defaultProvider
{ "repo_name": "pmwmedia/tinylog", "path": "tinylog-api/src/test/java/org/tinylog/provider/ProviderRegistryTest.java", "license": "apache-2.0", "size": 7751 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
360,135
@Override protected ScriptContext getScriptContext(final Bindings nn) { final GremlinScriptContext ctxt = new GremlinScriptContext(context.getReader(), context.getWriter(), context.getErrorWriter()); final Bindings gs = getBindings(ScriptContext.GLOBAL_SCOPE); if (gs != null) ctxt.setBi...
ScriptContext function(final Bindings nn) { final GremlinScriptContext ctxt = new GremlinScriptContext(context.getReader(), context.getWriter(), context.getErrorWriter()); final Bindings gs = getBindings(ScriptContext.GLOBAL_SCOPE); if (gs != null) ctxt.setBindings(gs, ScriptContext.GLOBAL_SCOPE); if (nn != null) { ctx...
/** * Creates the {@code ScriptContext} using a {@link GremlinScriptContext} which avoids a significant amount of * additional object creation on script evaluation. */
Creates the ScriptContext using a <code>GremlinScriptContext</code> which avoids a significant amount of additional object creation on script evaluation
getScriptContext
{ "repo_name": "artem-aliev/tinkerpop", "path": "gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java", "license": "apache-2.0", "size": 33574 }
[ "javax.script.Bindings", "javax.script.ScriptContext", "org.apache.tinkerpop.gremlin.jsr223.GremlinScriptContext" ]
import javax.script.Bindings; import javax.script.ScriptContext; import org.apache.tinkerpop.gremlin.jsr223.GremlinScriptContext;
import javax.script.*; import org.apache.tinkerpop.gremlin.jsr223.*;
[ "javax.script", "org.apache.tinkerpop" ]
javax.script; org.apache.tinkerpop;
1,396,327
public void generateLayoutOfConcepts(){ //init the layers ArrayList<ArrayList<VisuConcept>> conceptLayers=new ArrayList<>(); ArrayList<VisuConcept> layer=new ArrayList<>(); conceptLayers.add(layer); //select the layer for each concept and create the visuConcepts ArrayList<GenericConcept> concepts= new...
void function(){ ArrayList<ArrayList<VisuConcept>> conceptLayers=new ArrayList<>(); ArrayList<VisuConcept> layer=new ArrayList<>(); conceptLayers.add(layer); ArrayList<GenericConcept> concepts= new ArrayList<>(); concepts.addAll(co.getConcepts()); Collections.sort(concepts, Collections.reverseOrder(new CompareGenericCo...
/** * Generate the layout of visuconcepts by layer * */
Generate the layout of visuconcepts by layer
generateLayoutOfConcepts
{ "repo_name": "labib23dz/rcaexplore", "path": "src/org/rcaexplore/visu/VisuLatticePane.java", "license": "lgpl-3.0", "size": 10169 }
[ "java.awt.Dimension", "java.awt.Graphics2D", "java.util.ArrayList", "java.util.Collections", "java.util.HashSet", "java.util.Hashtable", "java.util.LinkedList", "org.rcaexplore.conceptorder.generic.CompareGenericConcepts", "org.rcaexplore.conceptorder.generic.GenericConcept" ]
import java.awt.Dimension; import java.awt.Graphics2D; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Hashtable; import java.util.LinkedList; import org.rcaexplore.conceptorder.generic.CompareGenericConcepts; import org.rcaexplore.conceptorder.generic.GenericConcept...
import java.awt.*; import java.util.*; import org.rcaexplore.conceptorder.generic.*;
[ "java.awt", "java.util", "org.rcaexplore.conceptorder" ]
java.awt; java.util; org.rcaexplore.conceptorder;
1,249,907
public ObjectAdapter adapterFor( final Object pojo, final ObjectAdapter parentAdapter, OneToManyAssociation collection);
ObjectAdapter function( final Object pojo, final ObjectAdapter parentAdapter, OneToManyAssociation collection);
/** * Looks up or creates a collection adapter. */
Looks up or creates a collection adapter
adapterFor
{ "repo_name": "howepeng/isis", "path": "core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/mgr/AdapterManager.java", "license": "apache-2.0", "size": 5082 }
[ "org.apache.isis.core.metamodel.adapter.ObjectAdapter", "org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation" ]
import org.apache.isis.core.metamodel.adapter.ObjectAdapter; import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
import org.apache.isis.core.metamodel.adapter.*; import org.apache.isis.core.metamodel.spec.feature.*;
[ "org.apache.isis" ]
org.apache.isis;
2,015,239
public KualiDecimal getItemPaidAmount() { if (!(this.isItemActiveIndicator())) { return KualiDecimal.ZERO; } return this.getItemInvoicedTotalAmount(); }
KualiDecimal function() { if (!(this.isItemActiveIndicator())) { return KualiDecimal.ZERO; } return this.getItemInvoicedTotalAmount(); }
/** * This method returns the total item paid amount * * @return */
This method returns the total item paid amount
getItemPaidAmount
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/businessobject/PurchaseOrderItem.java", "license": "agpl-3.0", "size": 13358 }
[ "org.kuali.rice.core.api.util.type.KualiDecimal" ]
import org.kuali.rice.core.api.util.type.KualiDecimal;
import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.rice" ]
org.kuali.rice;
532,592
// ------------------------------------------------------------------------- public static boolean allDatabasesPassed(String test) { List reports = getReportsByTestCase(test, ReportLine.PROBLEM); if (reports.size() > 0) { return false; } return true; }
static boolean function(String test) { List reports = getReportsByTestCase(test, ReportLine.PROBLEM); if (reports.size() > 0) { return false; } return true; }
/** * Check if all the databases passed a particular test. * * @param test * The test to check. * @return true if none of the databases failed this test (i.e. had no problems) */
Check if all the databases passed a particular test
allDatabasesPassed
{ "repo_name": "Ensembl/ensj-healthcheck", "path": "src/org/ensembl/healthcheck/ReportManager.java", "license": "apache-2.0", "size": 31340 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
202,263
public List<Integer> getPeriodUtilities() { return periodsTotalUtilities; }
List<Integer> function() { return periodsTotalUtilities; }
/** * Get the total utility of each period starting from 0 * @return the list of period utilities */
Get the total utility of each period starting from 0
getPeriodUtilities
{ "repo_name": "qualitified/qualitified-crm", "path": "qualitified-crm-core/src/main/java/ca/pfv/spmf/algorithms/frequentpatterns/tshoun/DatabaseWithPeriods.java", "license": "gpl-3.0", "size": 9347 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,435,212
public void addFilesToExistingZip(String sourceZipFileName, String[] files) throws IOException { File sourceZipFile = new File(sourceZipFileName); File tempFile; ZipFileReader zipFileReader = null; ZipFileWriter zipFileWriter = null; if (sourceZipFile.length() != 0) { ...
void function(String sourceZipFileName, String[] files) throws IOException { File sourceZipFile = new File(sourceZipFileName); File tempFile; ZipFileReader zipFileReader = null; ZipFileWriter zipFileWriter = null; if (sourceZipFile.length() != 0) { zipFileReader = new ZipFileReader(sourceZipFileName); } tempFile = File...
/** * Add files to an existing zip file. * @param sourceZipFileName is the existing zip file name * @param files is an array of files that we want to add to the existing zip file * @param talker is the CallBack. * @throws IOException */
Add files to an existing zip file
addFilesToExistingZip
{ "repo_name": "mwjmurphy/Axel-Framework", "path": "axel-common/src/main/java/org/xmlactions/common/zip/ZipFileExtras.java", "license": "apache-2.0", "size": 7107 }
[ "java.io.File", "java.io.IOException", "org.xmlactions.common.io.FileUtils" ]
import java.io.File; import java.io.IOException; import org.xmlactions.common.io.FileUtils;
import java.io.*; import org.xmlactions.common.io.*;
[ "java.io", "org.xmlactions.common" ]
java.io; org.xmlactions.common;
848,507
@WebMethod(operationName = "GetGeoIPContext", action = "http://www.webservicex.net/GetGeoIPContext") @RequestWrapper(localName = "GetGeoIPContext", targetNamespace = "http://www.webservicex.net/", className = "net.webservicex.GetGeoIPContext") @ResponseWrapper(localName = "GetGeoIPContextResponse", targetNa...
@WebMethod(operationName = STR, action = "http: @RequestWrapper(localName = STR, targetNamespace = "http: @ResponseWrapper(localName = "GetGeoIPContextResponseSTRhttp: @WebResult(name = "GetGeoIPContextResultSTRhttp: net.webservicex.GeoIP function();
/** * GeoIPService - GetGeoIPContext enables you to easily look up countries by Context */
GeoIPService - GetGeoIPContext enables you to easily look up countries by Context
getGeoIPContext
{ "repo_name": "ksuksu1601/java_training", "path": "soap_sample/src/main/java/net/webservicex/GeoIPServiceSoap.java", "license": "apache-2.0", "size": 1955 }
[ "javax.jws.WebMethod", "javax.jws.WebResult", "javax.xml.ws.RequestWrapper", "javax.xml.ws.ResponseWrapper" ]
import javax.jws.WebMethod; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper;
import javax.jws.*; import javax.xml.ws.*;
[ "javax.jws", "javax.xml" ]
javax.jws; javax.xml;
2,688,827
private void addHeader(Artifact header, Label label) { // We assume TreeArtifacts passed in are directories containing proper headers. boolean isHeader = CppFileTypes.CPP_HEADER.matches(header.getExecPath()) || header.isTreeArtifact(); boolean isTextualInclude = CppFileTypes.CPP_TEXTUAL_INCLUDE.ma...
void function(Artifact header, Label label) { boolean isHeader = CppFileTypes.CPP_HEADER.matches(header.getExecPath()) header.isTreeArtifact(); boolean isTextualInclude = CppFileTypes.CPP_TEXTUAL_INCLUDE.matches(header.getExecPath()); publicHeaders.add(header); if (!shouldProcessHeaders isTextualInclude !isHeader !ccTo...
/** * Adds a header to {@code publicHeaders} and in case header processing is switched on for the * file type also to compilationUnitSources. */
Adds a header to publicHeaders and in case header processing is switched on for the file type also to compilationUnitSources
addHeader
{ "repo_name": "safarmer/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java", "license": "apache-2.0", "size": 89014 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.cmdline.Label" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.cmdline.*;
[ "com.google.devtools" ]
com.google.devtools;
246,220
return result; } /** * Sets the value of the result property. * * @param value * allowed object is * {@link Note }
return result; } /** * Sets the value of the result property. * * @param value * allowed object is * {@link Note }
/** * Gets the value of the result property. * * @return * possible object is * {@link Note } * */
Gets the value of the result property
getResult
{ "repo_name": "dushmis/Oracle-Cloud", "path": "PaaS_SaaS_Accelerator_RESTFulFacade/FusionProxy_ActivityAppointmentService/src/com/oracle/xmlns/apps/crmcommon/activities/activitiesservice/_transient/types/GetNotesResponse.java", "license": "bsd-3-clause", "size": 1654 }
[ "com.oracle.xmlns.apps.crmcommon.notes.noteservice.Note" ]
import com.oracle.xmlns.apps.crmcommon.notes.noteservice.Note;
import com.oracle.xmlns.apps.crmcommon.notes.noteservice.*;
[ "com.oracle.xmlns" ]
com.oracle.xmlns;
1,536,936
void flush(ComputeService service, NodeMetadata node);
void flush(ComputeService service, NodeMetadata node);
/** * Removes all rules from the node. */
Removes all rules from the node
flush
{ "repo_name": "jonathanchristison/fabric8", "path": "fabric/fabric-core-agent-jclouds/src/main/java/io/fabric8/service/jclouds/firewall/ApiFirewallSupport.java", "license": "apache-2.0", "size": 1375 }
[ "org.jclouds.compute.ComputeService", "org.jclouds.compute.domain.NodeMetadata" ]
import org.jclouds.compute.ComputeService; import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.*; import org.jclouds.compute.domain.*;
[ "org.jclouds.compute" ]
org.jclouds.compute;
2,861,805
Type makeChar();
Type makeChar();
/** * Returns the reflective representation of type <tt>char</tt>. * @return the reflective representation of type <tt>char</tt>. */
Returns the reflective representation of type char
makeChar
{ "repo_name": "mobile-event-processing/Asper", "path": "source/src/com/asper/sources/sun/reflect/generics/factory/GenericsFactory.java", "license": "gpl-2.0", "size": 8115 }
[ "java.lang.reflect.Type" ]
import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,556,923
private NamedInfo getNamedInfo(Var v) { NamedInfo info = namedInfo.get(v); if (info == null) { info = new NamedInfo(); namedInfo.put(v, info); } return info; }
NamedInfo function(Var v) { NamedInfo info = namedInfo.get(v); if (info == null) { info = new NamedInfo(); namedInfo.put(v, info); } return info; }
/** * get the information on a variable */
get the information on a variable
getNamedInfo
{ "repo_name": "kencheung/js-symbolic-executor", "path": "closure-compiler/src/com/google/javascript/jscomp/CrossModuleCodeMotion.java", "license": "apache-2.0", "size": 13110 }
[ "com.google.javascript.jscomp.Scope" ]
import com.google.javascript.jscomp.Scope;
import com.google.javascript.jscomp.*;
[ "com.google.javascript" ]
com.google.javascript;
321,318
private void showDialog(String content, String apkUrl, boolean isAutoInstall, boolean checkExternal) { UpdateDialog d = new UpdateDialog(); Bundle args = new Bundle(); args.putString(Constants.APK_UPDATE_CONTENT, content); args.putString(Constants.APK_DOWNLOAD_URL, apkUrl); a...
void function(String content, String apkUrl, boolean isAutoInstall, boolean checkExternal) { UpdateDialog d = new UpdateDialog(); Bundle args = new Bundle(); args.putString(Constants.APK_UPDATE_CONTENT, content); args.putString(Constants.APK_DOWNLOAD_URL, apkUrl); args.putBoolean(Constants.APK_IS_AUTO_INSTALL, isAutoIn...
/** * Show dialog */
Show dialog
showDialog
{ "repo_name": "systembugtj/AutoUpdate", "path": "android-update-apk/src/main/java/com/artwl/update/UpdateChecker.java", "license": "apache-2.0", "size": 14435 }
[ "android.os.Bundle", "android.support.v4.app.FragmentTransaction" ]
import android.os.Bundle; import android.support.v4.app.FragmentTransaction;
import android.os.*; import android.support.v4.app.*;
[ "android.os", "android.support" ]
android.os; android.support;
1,711,740
EReference getImpedanceVariationCurve_TapChanger();
EReference getImpedanceVariationCurve_TapChanger();
/** * Returns the meta object for the reference '{@link gluemodel.CIM.IEC61970.Wires.ImpedanceVariationCurve#getTapChanger <em>Tap Changer</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Tap Changer</em>'. * @see gluemodel.CIM.IEC61970.Wires.Impedance...
Returns the meta object for the reference '<code>gluemodel.CIM.IEC61970.Wires.ImpedanceVariationCurve#getTapChanger Tap Changer</code>'.
getImpedanceVariationCurve_TapChanger
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Wires/WiresPackage.java", "license": "mit", "size": 669840 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
533,519
public static String parseString(final String cclQuery, final Subfield subfield) { final String[] termsToBeHighlighted = getHighlightedTerms(cclQuery); String text = subfield.getContent(); for (int i = 0; i < termsToBeHighlighted.length; i++) { String termineCorrente = termsToBeHighlighted[i]; ...
static String function(final String cclQuery, final Subfield subfield) { final String[] termsToBeHighlighted = getHighlightedTerms(cclQuery); String text = subfield.getContent(); for (int i = 0; i < termsToBeHighlighted.length; i++) { String termineCorrente = termsToBeHighlighted[i]; int[] indiciDelimitatore = indexesT...
/** * Inizia la ricerca nella stringa per inserire i delimitatori di tutti i pattern. * * @param cclQuery * @param subfield * @return la stringa con tutti i delimitatori */
Inizia la ricerca nella stringa per inserire i delimitatori di tutti i pattern
parseString
{ "repo_name": "atcult/mod-cataloging", "path": "src/main/java/org/folio/marccat/util/XmlUtils.java", "license": "apache-2.0", "size": 6948 }
[ "org.folio.marccat.model.Subfield" ]
import org.folio.marccat.model.Subfield;
import org.folio.marccat.model.*;
[ "org.folio.marccat" ]
org.folio.marccat;
1,847,612
public VolumeGroupList withValue(List<VolumeGroupInner> value) { this.value = value; return this; }
VolumeGroupList function(List<VolumeGroupInner> value) { this.value = value; return this; }
/** * Set the value property: List of volume Groups. * * @param value the value value to set. * @return the VolumeGroupList object itself. */
Set the value property: List of volume Groups
withValue
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/VolumeGroupList.java", "license": "mit", "size": 1539 }
[ "com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner", "java.util.List" ]
import com.azure.resourcemanager.netapp.fluent.models.VolumeGroupInner; import java.util.List;
import com.azure.resourcemanager.netapp.fluent.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
2,454,593
public static String getPlaceholderImagePathForIndividual( VitroRequest vreq, String individualUri) { PlaceholderUtil pu = getPlaceholderUtil(vreq); if (pu == null) { return DEFAULT_IMAGE_PATH; } else { IndividualDao iDao = vreq.getWebappDaoFactory().getIndividualDao(); return pu.getPlaceholderImag...
static String function( VitroRequest vreq, String individualUri) { PlaceholderUtil pu = getPlaceholderUtil(vreq); if (pu == null) { return DEFAULT_IMAGE_PATH; } else { IndividualDao iDao = vreq.getWebappDaoFactory().getIndividualDao(); return pu.getPlaceholderImagePathForIndividual(iDao, individualUri); } }
/** * If there is a placeholder image for any type that this Individual * instantiates, return that image. Otherwise, return the default. */
If there is a placeholder image for any type that this Individual instantiates, return that image. Otherwise, return the default
getPlaceholderImagePathForIndividual
{ "repo_name": "vivo-project/Vitro", "path": "api/src/main/java/edu/cornell/mannlib/vitro/webapp/web/images/PlaceholderUtil.java", "license": "bsd-3-clause", "size": 7459 }
[ "edu.cornell.mannlib.vitro.webapp.controller.VitroRequest", "edu.cornell.mannlib.vitro.webapp.dao.IndividualDao" ]
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest; import edu.cornell.mannlib.vitro.webapp.dao.IndividualDao;
import edu.cornell.mannlib.vitro.webapp.controller.*; import edu.cornell.mannlib.vitro.webapp.dao.*;
[ "edu.cornell.mannlib" ]
edu.cornell.mannlib;
2,323,960
EClass getTimelineBuilderContent();
EClass getTimelineBuilderContent();
/** * Returns the meta object for class '{@link gov.nasa.arc.spife.timeline.model.TimelineBuilderContent <em>Builder Content</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Builder Content</em>'. * @see gov.nasa.arc.spife.timeline.model.TimelineBuilderContent...
Returns the meta object for class '<code>gov.nasa.arc.spife.timeline.model.TimelineBuilderContent Builder Content</code>'.
getTimelineBuilderContent
{ "repo_name": "nasa/OpenSPIFe", "path": "gov.nasa.arc.spife/src/gov/nasa/arc/spife/timeline/TimelinePackage.java", "license": "apache-2.0", "size": 36126 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,500,940
protected String getScope(Object o) { try { String scope = (String)getAttribute(o, ATTR_SCOPE); if (scope.equals(HOST)) { return HOST; } else if (scope.equals(DOMAIN)) { return DOMAIN; } else { assert false : "Un...
String function(Object o) { try { String scope = (String)getAttribute(o, ATTR_SCOPE); if (scope.equals(HOST)) { return HOST; } else if (scope.equals(DOMAIN)) { return DOMAIN; } else { assert false : STR + scope + STR; } } catch (AttributeNotFoundException e) { logger.severe(e.getMessage()); } return null; }
/** * Decide whether using host or domain scope * @param o Context * @return String Host or domain * */
Decide whether using host or domain scope
getScope
{ "repo_name": "gaowangyizu/myHeritrix", "path": "myHeritrix/src/org/archive/crawler/deciderules/ScopePlusOneDecideRule.java", "license": "apache-2.0", "size": 7060 }
[ "javax.management.AttributeNotFoundException" ]
import javax.management.AttributeNotFoundException;
import javax.management.*;
[ "javax.management" ]
javax.management;
1,596,150
public PathFragment getShExecutable() { return shExecutable; }
PathFragment function() { return shExecutable; }
/** * Returns the path to sh. */
Returns the path to sh
getShExecutable
{ "repo_name": "Digas29/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java", "license": "apache-2.0", "size": 95237 }
[ "com.google.devtools.build.lib.vfs.PathFragment" ]
import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
1,139,775
@Test(expected = AccessException.class) public void testJobUpdateAccessException() throws P4JavaException { when(server.execMapCmdList(eq(JOB.toString()), argThat(UPDATE_MATCHER), // p4ic4idea: use a public, non-abstract class with default constructor eq(UPDATE_FIELD_MAP)...
@Test(expected = AccessException.class) void function() throws P4JavaException { when(server.execMapCmdList(eq(JOB.toString()), argThat(UPDATE_MATCHER), eq(UPDATE_FIELD_MAP))).thenThrow(AccessException.AccessExceptionForTests.class); jobDelegator.updateJob(updateJob); }
/** * Test update job access exception. * * @throws P4JavaException * the p4 java exception */
Test update job access exception
testJobUpdateAccessException
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/src/test/java/com/perforce/p4java/impl/mapbased/server/cmd/JobDelegatorTest.java", "license": "apache-2.0", "size": 18331 }
[ "com.perforce.p4java.exception.AccessException", "com.perforce.p4java.exception.P4JavaException", "com.perforce.p4java.server.CmdSpec", "org.junit.Test", "org.mockito.ArgumentMatchers", "org.mockito.Mockito" ]
import com.perforce.p4java.exception.AccessException; import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.server.CmdSpec; import org.junit.Test; import org.mockito.ArgumentMatchers; import org.mockito.Mockito;
import com.perforce.p4java.exception.*; import com.perforce.p4java.server.*; import org.junit.*; import org.mockito.*;
[ "com.perforce.p4java", "org.junit", "org.mockito" ]
com.perforce.p4java; org.junit; org.mockito;
2,517,151
@SuppressWarnings("unchecked") private void restoreDescendantComponentStates(UIComponent parent, boolean iterateFacets, Object state, boolean restoreChildFacets) { int descendantStateIndex = -1; List<? extends Object[]> stateCollection = null...
@SuppressWarnings(STR) void function(UIComponent parent, boolean iterateFacets, Object state, boolean restoreChildFacets) { int descendantStateIndex = -1; List<? extends Object[]> stateCollection = null; if (iterateFacets && parent.getFacetCount() > 0) { Iterator<UIComponent> childIterator = parent.getFacets().values()...
/** * Overwrite the state of the child components of this component with data previously saved by method * saveDescendantComponentStates. * <p> * The saved state info only covers those fields that are expected to vary between rows of a table. Other fields are * not modified. */
Overwrite the state of the child components of this component with data previously saved by method saveDescendantComponentStates. The saved state info only covers those fields that are expected to vary between rows of a table. Other fields are not modified
restoreDescendantComponentStates
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/component/UIData.java", "license": "epl-1.0", "size": 91452 }
[ "java.util.Iterator", "java.util.List" ]
import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,028,399
protected String getCoverFromSearchResults( final HttpURLConnection cnn ) throws IOException { String s = ""; BufferedReader in = null; try { in = new BufferedReader(new InputStreamReader(cnn.getInputStream()) ); while ( (s = in.readLine()) ...
String function( final HttpURLConnection cnn ) throws IOException { String s = ""; BufferedReader in = null; try { in = new BufferedReader(new InputStreamReader(cnn.getInputStream()) ); while ( (s = in.readLine()) != null ) { final String imageUrl = getCoverFromData( s ); if ( imageUrl != null ) { return imageUrl; } } ...
/** * read through an amazon search to try and extract the url of a cover image. * if nothing is found then null is returned. * * @param cnn * * @return * * @throws java.io.IOException * */
read through an amazon search to try and extract the url of a cover image. if nothing is found then null is returned
getCoverFromSearchResults
{ "repo_name": "rodnaph/sockso", "path": "src/com/pugh/sockso/web/action/AmazonCoverSearch.java", "license": "gpl-2.0", "size": 4220 }
[ "com.pugh.sockso.Utils", "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.net.HttpURLConnection" ]
import com.pugh.sockso.Utils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection;
import com.pugh.sockso.*; import java.io.*; import java.net.*;
[ "com.pugh.sockso", "java.io", "java.net" ]
com.pugh.sockso; java.io; java.net;
1,954,116
@SuppressWarnings("unchecked") public JSONObject toJSONObject(String device) { JSONObject mashObject = new JSONObject(); for (int i = 0; i < steps.size(); i++) { MashStep st = steps.get(i); JSONObject currentStep = new JSONObject(); currentStep.put("ty...
@SuppressWarnings(STR) JSONObject function(String device) { JSONObject mashObject = new JSONObject(); for (int i = 0; i < steps.size(); i++) { MashStep st = steps.get(i); JSONObject currentStep = new JSONObject(); currentStep.put("type", st.type); currentStep.put(STR, st.method); currentStep.put("temp", st.getStartTemp...
/** * Return the current mash steps as a JSON Representation. * @return The new JSONObject status */
Return the current mash steps as a JSON Representation
toJSONObject
{ "repo_name": "dbayub/SB_Elsinore_Server", "path": "src/main/java/ca/strangebrew/recipe/Mash.java", "license": "mit", "size": 39992 }
[ "org.json.simple.JSONObject" ]
import org.json.simple.JSONObject;
import org.json.simple.*;
[ "org.json.simple" ]
org.json.simple;
362,973
public static void addCoreValueType(Class<?> clazz, Converter converter) { ConvertUtils.register(converter, clazz); values.add(clazz); }
static void function(Class<?> clazz, Converter converter) { ConvertUtils.register(converter, clazz); values.add(clazz); }
/** * Adds supported core value type. * * @param clazz The core value type. * @param converter Converter for the specified core value type. */
Adds supported core value type
addCoreValueType
{ "repo_name": "eiichiro/bootleg", "path": "src/main/java/org/eiichiro/bootleg/Types.java", "license": "apache-2.0", "size": 16178 }
[ "org.apache.commons.beanutils.ConvertUtils", "org.apache.commons.beanutils.Converter" ]
import org.apache.commons.beanutils.ConvertUtils; import org.apache.commons.beanutils.Converter;
import org.apache.commons.beanutils.*;
[ "org.apache.commons" ]
org.apache.commons;
44,793
public int create(User loggedInUser, String label, String name, String summary, String archLabel, String parentLabel, String checksumType) throws PermissionCheckFailureException, InvalidChannelLabelException, InvalidChannelNameException, InvalidParentChannelException { re...
int function(User loggedInUser, String label, String name, String summary, String archLabel, String parentLabel, String checksumType) throws PermissionCheckFailureException, InvalidChannelLabelException, InvalidChannelNameException, InvalidParentChannelException { return create(loggedInUser, label, name, summary, archL...
/** * Creates a software channel, parent_channel_label can be empty string * @param loggedInUser The current user * @param label Channel label to be created * @param name Name of Channel * @param summary Channel Summary * @param archLabel Architecture label * @param parentLabel Parent...
Creates a software channel, parent_channel_label can be empty string
create
{ "repo_name": "davidhrbac/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java", "license": "gpl-2.0", "size": 127652 }
[ "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.xmlrpc.InvalidChannelLabelException", "com.redhat.rhn.frontend.xmlrpc.InvalidChannelNameException", "com.redhat.rhn.frontend.xmlrpc.InvalidParentChannelException", "com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException", "java.util.HashM...
import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.xmlrpc.InvalidChannelLabelException; import com.redhat.rhn.frontend.xmlrpc.InvalidChannelNameException; import com.redhat.rhn.frontend.xmlrpc.InvalidParentChannelException; import com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException; impor...
import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
1,918,356
public static List< Gemstone > getConvertedListDTOFromDomain( List< com.mana.innovative.domain.client.Gemstone > gemstones ) { List< Gemstone > gemstoneDTOList = new ArrayList<>( ); for ( com.mana.innovative.domain.client.Gemstone gemstone : gemstones ) { Gemstone gemstoneDTO = new Gemstone( ); gemstoneD...
static List< Gemstone > function( List< com.mana.innovative.domain.client.Gemstone > gemstones ) { List< Gemstone > gemstoneDTOList = new ArrayList<>( ); for ( com.mana.innovative.domain.client.Gemstone gemstone : gemstones ) { Gemstone gemstoneDTO = new Gemstone( ); gemstoneDTO = getConvertedDTOFromDomain( gemstoneDTO...
/** * Gets converted gemstone dTO list. * * @param gemstones the gemstones * * @return the converted gemstone dTO list */
Gets converted gemstone dTO list
getConvertedListDTOFromDomain
{ "repo_name": "arkoghosh11/bloom-test", "path": "bloom-converter/src/main/java/com/mana/innovative/converter/response/GemstoneDomainDTOConverter.java", "license": "apache-2.0", "size": 4890 }
[ "com.mana.innovative.dto.client.Gemstone", "java.util.ArrayList", "java.util.List" ]
import com.mana.innovative.dto.client.Gemstone; import java.util.ArrayList; import java.util.List;
import com.mana.innovative.dto.client.*; import java.util.*;
[ "com.mana.innovative", "java.util" ]
com.mana.innovative; java.util;
497,047
protected void doProcess(Source inputData, Result outputData, Object... inputParams) throws IOException { converter.convert(inputData, outputData, inputParams); }
void function(Source inputData, Result outputData, Object... inputParams) throws IOException { converter.convert(inputData, outputData, inputParams); }
/** * Processes <code>inputData</code> and <code>inputParams</code> and * writes converted result to <code>outputData</code>. Conversion is * delegated to the {@link Converter} set at construction time. * * @param inputData * input data * @param outputData * ...
Processes <code>inputData</code> and <code>inputParams</code> and writes converted result to <code>outputData</code>. Conversion is delegated to the <code>Converter</code> set at construction time
doProcess
{ "repo_name": "krasserm/ipf", "path": "platform-camel/core/src/main/java/org/openehealth/ipf/platform/camel/core/adapter/ConverterAdapter.java", "license": "apache-2.0", "size": 6377 }
[ "java.io.IOException", "javax.xml.transform.Result", "javax.xml.transform.Source" ]
import java.io.IOException; import javax.xml.transform.Result; import javax.xml.transform.Source;
import java.io.*; import javax.xml.transform.*;
[ "java.io", "javax.xml" ]
java.io; javax.xml;
1,216,525