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 List<ModsInfo> getCollatedModInfo() {
List<ModsInfo> results = new ArrayList<ModsInfo>();
List<ModInfo> seenList = new ArrayList<ModInfo>();
for ( ModInfo modInfo : catalog ) {
if ( seenList.contains( modInfo ) ) continue;
seenList.add( modInfo );
ModsInfo modsInfo = new ModsInfo();
modsIn... | List<ModsInfo> function() { List<ModsInfo> results = new ArrayList<ModsInfo>(); List<ModInfo> seenList = new ArrayList<ModInfo>(); for ( ModInfo modInfo : catalog ) { if ( seenList.contains( modInfo ) ) continue; seenList.add( modInfo ); ModsInfo modsInfo = new ModsInfo(); modsInfo.setTitle( modInfo.getTitle() ); modsI... | /**
* Collects ModInfo objects that differ only in version, and creates ModsInfo objects.
*/ | Collects ModInfo objects that differ only in version, and creates ModsInfo objects | getCollatedModInfo | {
"repo_name": "eric-stanley/Slipstream-Mod-Manager",
"path": "src/main/java/net/vhati/modmanager/core/ModDB.java",
"license": "gpl-2.0",
"size": 3985
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"net.vhati.modmanager.core.ModInfo",
"net.vhati.modmanager.core.ModsInfo"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import net.vhati.modmanager.core.ModInfo; import net.vhati.modmanager.core.ModsInfo; | import java.util.*; import net.vhati.modmanager.core.*; | [
"java.util",
"net.vhati.modmanager"
] | java.util; net.vhati.modmanager; | 260,870 |
Session session = sessionProvider.getSession();
try {
Object result = action.execute(session);
return result;
} catch (Exception ex) {
logger.error("exception while execute", ex);
try {
sessionProvider.rollback();
} catch (HibernateException ee) {
logger.error("error while sessio... | Session session = sessionProvider.getSession(); try { Object result = action.execute(session); return result; } catch (Exception ex) { logger.error(STR, ex); try { sessionProvider.rollback(); } catch (HibernateException ee) { logger.error(STR, ee); } finally { sessionProvider.resetSession(); } throw new Exception(ex); ... | /**
* Execute the action specified by the given action object within event Session.
*
* @param action
* callback object that specifies the Hibernate action
* @param exposeNativeSession
* whether to expose the native Hibernate Session to callback
* code
* @return... | Execute the action specified by the given action object within event Session | doHibernate | {
"repo_name": "banq/jdonframework",
"path": "JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/persistence/hibernate/HibernateTemplate.java",
"license": "apache-2.0",
"size": 26891
} | [
"org.hibernate.HibernateException",
"org.hibernate.Session"
] | import org.hibernate.HibernateException; import org.hibernate.Session; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 913,283 |
EReference getMeterAsset_MeterServiceWorks(); | EReference getMeterAsset_MeterServiceWorks(); | /**
* Returns the meta object for the reference list '{@link CIM.IEC61968.Metering.MeterAsset#getMeterServiceWorks <em>Meter Service Works</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Meter Service Works</em>'.
* @see CIM.IEC61968.Metering.Met... | Returns the meta object for the reference list '<code>CIM.IEC61968.Metering.MeterAsset#getMeterServiceWorks Meter Service Works</code>'. | getMeterAsset_MeterServiceWorks | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Metering/MeteringPackage.java",
"license": "mit",
"size": 264485
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 660,858 |
public int isNullable(int column) throws SQLException {
if (!getField(column).isNotNull()) {
return java.sql.ResultSetMetaData.columnNullable;
}
return java.sql.ResultSetMetaData.columnNoNulls;
} | int function(int column) throws SQLException { if (!getField(column).isNotNull()) { return java.sql.ResultSetMetaData.columnNullable; } return java.sql.ResultSetMetaData.columnNoNulls; } | /**
* Can you put a NULL in this column?
*
* @param column
* the first column is 1, the second is 2...
*
* @return one of the columnNullable values
*
* @throws SQLException
* if a database access error occurs
*/ | Can you put a NULL in this column | isNullable | {
"repo_name": "namdp06/mysql-connector-java-1",
"path": "src/com/mysql/jdbc/ResultSetMetaData.java",
"license": "gpl-2.0",
"size": 22986
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,949,006 |
public X500Principal getSubjectX500Principal() {
return this.subject;
} | X500Principal function() { return this.subject; } | /**
* Get this CSR's subject.
*
* @return This CSR's subject.
*/ | Get this CSR's subject | getSubjectX500Principal | {
"repo_name": "hdecarne/certmgr",
"path": "src/main/java/de/carne/certmgr/certs/x509/PKCS10CertificateRequest.java",
"license": "gpl-3.0",
"size": 9730
} | [
"javax.security.auth.x500.X500Principal"
] | import javax.security.auth.x500.X500Principal; | import javax.security.auth.x500.*; | [
"javax.security"
] | javax.security; | 1,969,375 |
private String getUiXml() throws CommandFailedException {
String remoteFileName = String.format(XMLDUMP_REMOTE_FILE_NAME, wrappedDevice.getSerialNumber());
String localFileName = String.format(XMLDUMP_LOCAL_FILE_NAME, wrappedDevice.getSerialNumber());
automatorCommunicator.getUiDumpXml(remot... | String function() throws CommandFailedException { String remoteFileName = String.format(XMLDUMP_REMOTE_FILE_NAME, wrappedDevice.getSerialNumber()); String localFileName = String.format(XMLDUMP_LOCAL_FILE_NAME, wrappedDevice.getSerialNumber()); automatorCommunicator.getUiDumpXml(remoteFileName); File xmlDumpFile = null;... | /**
* Gets the UIAutomator UI XML dump.
*
* @return UI XML file dump in a string
* @throws CommandFailedException
* when UI XML dump fails
*/ | Gets the UIAutomator UI XML dump | getUiXml | {
"repo_name": "MusalaSoft/atmosphere-agent",
"path": "src/main/java/com/musala/atmosphere/agent/devicewrapper/AbstractWrapDevice.java",
"license": "gpl-3.0",
"size": 61687
} | [
"com.android.ddmlib.AdbCommandRejectedException",
"com.android.ddmlib.SyncException",
"com.android.ddmlib.TimeoutException",
"com.musala.atmosphere.commons.exceptions.CommandFailedException",
"java.io.File",
"java.io.IOException",
"java.util.Scanner"
] | import com.android.ddmlib.AdbCommandRejectedException; import com.android.ddmlib.SyncException; import com.android.ddmlib.TimeoutException; import com.musala.atmosphere.commons.exceptions.CommandFailedException; import java.io.File; import java.io.IOException; import java.util.Scanner; | import com.android.ddmlib.*; import com.musala.atmosphere.commons.exceptions.*; import java.io.*; import java.util.*; | [
"com.android.ddmlib",
"com.musala.atmosphere",
"java.io",
"java.util"
] | com.android.ddmlib; com.musala.atmosphere; java.io; java.util; | 626,390 |
@Override
public boolean containsColumn(@Nullable Object columnKey) {
return columnKeyToIndex.containsKey(columnKey);
} | boolean function(@Nullable Object columnKey) { return columnKeyToIndex.containsKey(columnKey); } | /**
* Returns {@code true} if the provided column key is among the column keys
* provided when the table was constructed.
*/ | Returns true if the provided column key is among the column keys provided when the table was constructed | containsColumn | {
"repo_name": "sarvex/guava",
"path": "guava/src/com/google/common/collect/ArrayTable.java",
"license": "apache-2.0",
"size": 23992
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,368,444 |
@Test
public void testExtractGoodEvent() {
String priority = "<10>";
String goodData1 = "Good good good data\n";
SyslogUtils util = new SyslogUtils(false);
ChannelBuffer buff = ChannelBuffers.buffer(100);
buff.writeBytes((priority + goodData1).getBytes());
Event e = util.extractEvent(buff);
... | void function() { String priority = "<10>"; String goodData1 = STR; SyslogUtils util = new SyslogUtils(false); ChannelBuffer buff = ChannelBuffers.buffer(100); buff.writeBytes((priority + goodData1).getBytes()); Event e = util.extractEvent(buff); if (e == null) { throw new NullPointerException(STR); } Map<String, Strin... | /**
* Good event
*/ | Good event | testExtractGoodEvent | {
"repo_name": "wangcy6/storm_app",
"path": "frame/apache-flume-1.7.0-src/flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUtils.java",
"license": "apache-2.0",
"size": 22868
} | [
"java.util.Map",
"org.apache.flume.Event",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.junit.Assert"
] | import java.util.Map; import org.apache.flume.Event; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.junit.Assert; | import java.util.*; import org.apache.flume.*; import org.jboss.netty.buffer.*; import org.junit.*; | [
"java.util",
"org.apache.flume",
"org.jboss.netty",
"org.junit"
] | java.util; org.apache.flume; org.jboss.netty; org.junit; | 911,811 |
public List<ScalingTrigger> describeTriggers(String autoScalingGroupName) throws AutoScalingException {
Map<String, String> params = new HashMap<String, String>();
params.put("AutoScalingGroupName", autoScalingGroupName);
HttpGet method = new HttpGet();
DescribeTriggersResponse response =
makeRequestInt(... | List<ScalingTrigger> function(String autoScalingGroupName) throws AutoScalingException { Map<String, String> params = new HashMap<String, String>(); params.put(STR, autoScalingGroupName); HttpGet method = new HttpGet(); DescribeTriggersResponse response = makeRequestInt(method, STR, params, DescribeTriggersResponse.cla... | /**
* Describes the scaling triggers for a given group.
*
* @param autoScalingGroupName a autoScaling group name
* @return activity descriptions
* @throws AutoScalingException wraps checked exceptions
*/ | Describes the scaling triggers for a given group | describeTriggers | {
"repo_name": "jonnyzzz/maragogype",
"path": "tags/v1.7/java/com/xerox/amazonws/ec2/AutoScaling.java",
"license": "apache-2.0",
"size": 23797
} | [
"com.xerox.amazonws.monitoring.StandardUnit",
"com.xerox.amazonws.monitoring.Statistics",
"com.xerox.amazonws.typica.autoscale.jaxb.DescribeTriggersResponse",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.apache.http.client.methods.HttpGet"
] | import com.xerox.amazonws.monitoring.StandardUnit; import com.xerox.amazonws.monitoring.Statistics; import com.xerox.amazonws.typica.autoscale.jaxb.DescribeTriggersResponse; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.http.client.methods.HttpGet; | import com.xerox.amazonws.monitoring.*; import com.xerox.amazonws.typica.autoscale.jaxb.*; import java.util.*; import org.apache.http.client.methods.*; | [
"com.xerox.amazonws",
"java.util",
"org.apache.http"
] | com.xerox.amazonws; java.util; org.apache.http; | 1,492,087 |
public static MethodHandle varargsArray(int nargs) {
MethodHandle mh = ARRAYS[nargs];
if (mh != null) return mh;
mh = findCollector("array", nargs, Object[].class);
if (mh != null) return ARRAYS[nargs] = mh;
mh = buildVarargsArray(FILL_NEW_ARRAY, ARRAY_IDENTITY, nargs);
... | static MethodHandle function(int nargs) { MethodHandle mh = ARRAYS[nargs]; if (mh != null) return mh; mh = findCollector("array", nargs, Object[].class); if (mh != null) return ARRAYS[nargs] = mh; mh = buildVarargsArray(FILL_NEW_ARRAY, ARRAY_IDENTITY, nargs); assert(assertCorrectArity(mh, nargs)); return ARRAYS[nargs] ... | /** Return a method handle that takes the indicated number of Object
* arguments and returns an Object array of them, as if for varargs.
*/ | Return a method handle that takes the indicated number of Object arguments and returns an Object array of them, as if for varargs | varargsArray | {
"repo_name": "greghaskins/openjdk-jdk7u-jdk",
"path": "src/share/classes/sun/invoke/util/ValueConversions.java",
"license": "gpl-2.0",
"size": 47789
} | [
"java.lang.invoke.MethodHandle"
] | import java.lang.invoke.MethodHandle; | import java.lang.invoke.*; | [
"java.lang"
] | java.lang; | 2,574,330 |
public BigDecimal getQtyPlan ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyPlan);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyPlan); if (bd == null) return Env.ZERO; return bd; } | /** Get Quantity Plan.
@return Planned Quantity
*/ | Get Quantity Plan | getQtyPlan | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/X_R_RequestAction.java",
"license": "gpl-2.0",
"size": 27521
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 1,678,800 |
public void removeContext(Context context);
| void function(Context context); | /**
* Remove the specified Context from the set of defined Contexts for its
* associated Host. If this is the last Context for this Host, the Host
* will also be removed.
*
* @param context The Context to be removed
*/ | Remove the specified Context from the set of defined Contexts for its associated Host. If this is the last Context for this Host, the Host will also be removed | removeContext | {
"repo_name": "c-rainstorm/jerrydog",
"path": "src/main/java/org/apache/catalina/startup/EmbeddedManagerMBean.java",
"license": "gpl-3.0",
"size": 11527
} | [
"org.apache.catalina.Context"
] | import org.apache.catalina.Context; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 1,086,934 |
public void bind(final ImageView view, final Contributor contributor) {
bind(view, contributor.getAvatarUrl());
} | void function(final ImageView view, final Contributor contributor) { bind(view, contributor.getAvatarUrl()); } | /**
* Bind view to image at URL
*
* @param view The ImageView that is to display the user's avatar.
* @param contributor A Contributor object that points to the desired user.
*/ | Bind view to image at URL | bind | {
"repo_name": "zhengxiaopeng/github-app",
"path": "app/src/main/java/com/github/mobile/util/AvatarLoader.java",
"license": "apache-2.0",
"size": 8448
} | [
"android.widget.ImageView",
"org.eclipse.egit.github.core.Contributor"
] | import android.widget.ImageView; import org.eclipse.egit.github.core.Contributor; | import android.widget.*; import org.eclipse.egit.github.core.*; | [
"android.widget",
"org.eclipse.egit"
] | android.widget; org.eclipse.egit; | 781,885 |
public static PartitionIterator filter(UnfilteredPartitionIterator iterator, int nowInSecs)
{
Filter filter = new Filter(true, nowInSecs);
if (iterator instanceof UnfilteredPartitions)
return new FilteredPartitions(filter, (UnfilteredPartitions) iterator);
return new Filtered... | static PartitionIterator function(UnfilteredPartitionIterator iterator, int nowInSecs) { Filter filter = new Filter(true, nowInSecs); if (iterator instanceof UnfilteredPartitions) return new FilteredPartitions(filter, (UnfilteredPartitions) iterator); return new FilteredPartitions(iterator, filter); } | /**
* Filter any RangeTombstoneMarker from the iterator's iterators, transforming it into a PartitionIterator.
*/ | Filter any RangeTombstoneMarker from the iterator's iterators, transforming it into a PartitionIterator | filter | {
"repo_name": "Jollyplum/cassandra",
"path": "src/java/org/apache/cassandra/db/transform/FilteredPartitions.java",
"license": "apache-2.0",
"size": 2280
} | [
"org.apache.cassandra.db.partitions.PartitionIterator",
"org.apache.cassandra.db.partitions.UnfilteredPartitionIterator"
] | import org.apache.cassandra.db.partitions.PartitionIterator; import org.apache.cassandra.db.partitions.UnfilteredPartitionIterator; | import org.apache.cassandra.db.partitions.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 710,426 |
public Builder addEntity(RuntimeEntity entity) {
Validator.notNull(entity, "entity cannot be null");
if (this.entities == null) {
this.entities = new ArrayList<RuntimeEntity>();
}
this.entities.add(entity);
return this;
} | Builder function(RuntimeEntity entity) { Validator.notNull(entity, STR); if (this.entities == null) { this.entities = new ArrayList<RuntimeEntity>(); } this.entities.add(entity); return this; } | /**
* Adds an entity to entities.
*
* @param entity the new entity
* @return the MessageOptions builder
*/ | Adds an entity to entities | addEntity | {
"repo_name": "supunucsc/java-sdk",
"path": "conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/model/MessageOptions.java",
"license": "apache-2.0",
"size": 7116
} | [
"com.ibm.watson.developer_cloud.util.Validator",
"java.util.ArrayList"
] | import com.ibm.watson.developer_cloud.util.Validator; import java.util.ArrayList; | import com.ibm.watson.developer_cloud.util.*; import java.util.*; | [
"com.ibm.watson",
"java.util"
] | com.ibm.watson; java.util; | 197,553 |
public static <T> T checkNotNull(T reference, Object errorMessage) {
if (ExoPlayerLibraryInfo.ASSERTIONS_ENABLED && reference == null) {
throw new NullPointerException(String.valueOf(errorMessage));
}
return reference;
} | static <T> T function(T reference, Object errorMessage) { if (ExoPlayerLibraryInfo.ASSERTIONS_ENABLED && reference == null) { throw new NullPointerException(String.valueOf(errorMessage)); } return reference; } | /**
* Throws {@link NullPointerException} if {@code reference} is null.
*
* @param <T> The type of the reference.
* @param reference The reference.
* @param errorMessage The exception message to use if the check fails. The message is converted
* to a string using {@link String#valueOf(Object)}.
... | Throws <code>NullPointerException</code> if reference is null | checkNotNull | {
"repo_name": "gysgogo/levetube",
"path": "lib/src/main/java/com/google/android/exoplayer2/util/Assertions.java",
"license": "gpl-3.0",
"size": 6384
} | [
"com.google.android.exoplayer2.ExoPlayerLibraryInfo"
] | import com.google.android.exoplayer2.ExoPlayerLibraryInfo; | import com.google.android.exoplayer2.*; | [
"com.google.android"
] | com.google.android; | 413,973 |
public Operation getOperation(String operationName)
throws UnknownOperationException {
Operation result = null;
for (Iterator iterator = getOperations().iterator(); iterator.hasNext();) {
Operation op = (Operation) iterator.next();
if (op.getName().equals(operationName)) {
result = op;
break;
... | Operation function(String operationName) throws UnknownOperationException { Operation result = null; for (Iterator iterator = getOperations().iterator(); iterator.hasNext();) { Operation op = (Operation) iterator.next(); if (op.getName().equals(operationName)) { result = op; break; } } if (result == null) throw new Unk... | /**
* Returns a WSDLOperation descriptor for an operation that matches the
* operationName.
*
* @param operationName
* @return a matching WSDLOperation descriptor
* @throws UnknowOperationException
* if no operation matches the name
*/ | Returns a WSDLOperation descriptor for an operation that matches the operationName | getOperation | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/workflow/wsdl-generic-t2/src/main/java/net/sf/taverna/wsdl/parser/WSDLParser.java",
"license": "bsd-3-clause",
"size": 24584
} | [
"java.util.Iterator",
"javax.wsdl.Operation"
] | import java.util.Iterator; import javax.wsdl.Operation; | import java.util.*; import javax.wsdl.*; | [
"java.util",
"javax.wsdl"
] | java.util; javax.wsdl; | 1,328,780 |
Map<String, JsonObject> getCreateIndexEvents(); | Map<String, JsonObject> getCreateIndexEvents(); | /**
* Return the create events.
*
* @return
*/ | Return the create events | getCreateIndexEvents | {
"repo_name": "gentics/mesh",
"path": "mdm/common/src/main/java/com/gentics/mesh/search/TrackingSearchProvider.java",
"license": "apache-2.0",
"size": 1158
} | [
"io.vertx.core.json.JsonObject",
"java.util.Map"
] | import io.vertx.core.json.JsonObject; import java.util.Map; | import io.vertx.core.json.*; import java.util.*; | [
"io.vertx.core",
"java.util"
] | io.vertx.core; java.util; | 1,059,318 |
private void assertSetResourcesCleared() {
assertSetIteratorsCleared();
for (int i = 0; i < gridCount(); i++) {
IgniteKernal grid = (IgniteKernal)grid(i);
for (IgniteCache cache : grid.caches()) {
CacheDataStructuresManager dsMgr = grid.internalCache(cache.g... | void function() { assertSetIteratorsCleared(); for (int i = 0; i < gridCount(); i++) { IgniteKernal grid = (IgniteKernal)grid(i); for (IgniteCache cache : grid.caches()) { CacheDataStructuresManager dsMgr = grid.internalCache(cache.getName()).context().dataStructures(); Map map = GridTestUtils.getFieldValue(dsMgr, STR)... | /**
* Checks internal set maps are cleared.
*/ | Checks internal set maps are cleared | assertSetResourcesCleared | {
"repo_name": "a1vanov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheSetAbstractSelfTest.java",
"license": "apache-2.0",
"size": 29584
} | [
"java.util.Map",
"org.apache.ignite.IgniteCache",
"org.apache.ignite.internal.IgniteKernal",
"org.apache.ignite.testframework.GridTestUtils"
] | import java.util.Map; import org.apache.ignite.IgniteCache; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.testframework.GridTestUtils; | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.internal.*; import org.apache.ignite.testframework.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 613,802 |
public ObjectType getObjectType();
| ObjectType function(); | /**
* This method retrieves the ObjectType for the accounting line. This method will only return a not null value for a Journal
* Voucher document.
*
* @return An ObjectType instance.
*/ | This method retrieves the ObjectType for the accounting line. This method will only return a not null value for a Journal Voucher document | getObjectType | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/sys/businessobject/AccountingLine.java",
"license": "agpl-3.0",
"size": 13563
} | [
"org.kuali.kfs.coa.businessobject.ObjectType"
] | import org.kuali.kfs.coa.businessobject.ObjectType; | import org.kuali.kfs.coa.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 84,939 |
public static Element createAttributeAssignmentElement(AttributeAssignmentElementDTO assignmentElementDTO,
Document doc) throws PolicyBuilderException {
String attributeId = assignmentElementDTO.getAttributeId();
if(attributeId != null && ... | static Element function(AttributeAssignmentElementDTO assignmentElementDTO, Document doc) throws PolicyBuilderException { String attributeId = assignmentElementDTO.getAttributeId(); if(attributeId != null && attributeId.trim().length() > 0){ String category = assignmentElementDTO.getCategory(); String issuer = assignme... | /**
* This creates XML representation of assignment element using AttributeAssignmentElementDTO object
*
* @param assignmentElementDTO AttributeAssignmentElementDTO
* @param doc Document
* @return DOM element
* @throws PolicyBuilderException throws
*/ | This creates XML representation of assignment element using AttributeAssignmentElementDTO object | createAttributeAssignmentElement | {
"repo_name": "shaundmorris/arbitro",
"path": "modules/arbitro-utils/src/main/java/com/connexta/arbitro/utils/PolicyUtils.java",
"license": "apache-2.0",
"size": 39198
} | [
"com.connexta.arbitro.utils.Constants",
"com.connexta.arbitro.utils.exception.PolicyBuilderException",
"com.connexta.arbitro.utils.policy.dto.ApplyElementDTO",
"com.connexta.arbitro.utils.policy.dto.AttributeAssignmentElementDTO",
"com.connexta.arbitro.utils.policy.dto.AttributeDesignatorDTO",
"com.connex... | import com.connexta.arbitro.utils.Constants; import com.connexta.arbitro.utils.exception.PolicyBuilderException; import com.connexta.arbitro.utils.policy.dto.ApplyElementDTO; import com.connexta.arbitro.utils.policy.dto.AttributeAssignmentElementDTO; import com.connexta.arbitro.utils.policy.dto.AttributeDesignatorDTO; ... | import com.connexta.arbitro.utils.*; import com.connexta.arbitro.utils.exception.*; import com.connexta.arbitro.utils.policy.dto.*; import org.w3c.dom.*; | [
"com.connexta.arbitro",
"org.w3c.dom"
] | com.connexta.arbitro; org.w3c.dom; | 654,836 |
public static TrainingMethod getTrainingMethod(String trainingMethod,
RCG g, BinaryRCG bg, Lexicon l, Numberer nb, String params)
throws ParameterException, UnknownTaskException {
if (trainingMethod == null) {
throw new UnknownTaskException(
"Got null... | static TrainingMethod function(String trainingMethod, RCG g, BinaryRCG bg, Lexicon l, Numberer nb, String params) throws ParameterException, UnknownTaskException { if (trainingMethod == null) { throw new UnknownTaskException( STR); } if (TrainingMethods.MLE.equals(trainingMethod)) { return new MleTrainer(g, bg, l, nb);... | /**
* Get a training method.
*
* @param trainingMethod
* The desired type.
* @param g
* The grammar
* @param bg
* The binarized grammar
* @param l
* The lexicon
* @param nb
* The numberer
* @param pa... | Get a training method | getTrainingMethod | {
"repo_name": "wmaier/rparse",
"path": "src/de/tuebingen/rparse/grammar/TrainingMethodFactory.java",
"license": "gpl-2.0",
"size": 2520
} | [
"de.tuebingen.rparse.misc.Numberer",
"de.tuebingen.rparse.misc.ParameterException",
"de.tuebingen.rparse.treebank.UnknownTaskException",
"de.tuebingen.rparse.treebank.lex.Lexicon"
] | import de.tuebingen.rparse.misc.Numberer; import de.tuebingen.rparse.misc.ParameterException; import de.tuebingen.rparse.treebank.UnknownTaskException; import de.tuebingen.rparse.treebank.lex.Lexicon; | import de.tuebingen.rparse.misc.*; import de.tuebingen.rparse.treebank.*; import de.tuebingen.rparse.treebank.lex.*; | [
"de.tuebingen.rparse"
] | de.tuebingen.rparse; | 2,272,950 |
public void setAnnotationAlignment(final WorkflowAnnotation anno, final AnnotationAlignment alignment) {
if (anno == null) {
throw new IllegalArgumentException("anno must not be null!");
}
if (alignment == null) {
throw new IllegalArgumentException("alignment must not be null!");
}
anno.getStyle().s... | void function(final WorkflowAnnotation anno, final AnnotationAlignment alignment) { if (anno == null) { throw new IllegalArgumentException(STR); } if (alignment == null) { throw new IllegalArgumentException(STR); } anno.getStyle().setAnnotationAlignment(alignment); fireProcessUpdate(anno); model.fireAnnotationMiscChang... | /**
* Sets the alignment of the annotation and fires an event afterwards.
*
* @param anno
* the annotation which will have its alignment changed
* @param alignment
* the new alignment
*/ | Sets the alignment of the annotation and fires an event afterwards | setAnnotationAlignment | {
"repo_name": "transwarpio/rapidminer",
"path": "rapidMiner/rapidminer-studio-core/src/main/java/com/rapidminer/gui/flow/processrendering/annotations/model/AnnotationsModel.java",
"license": "gpl-3.0",
"size": 18746
} | [
"com.rapidminer.gui.flow.processrendering.annotations.style.AnnotationAlignment"
] | import com.rapidminer.gui.flow.processrendering.annotations.style.AnnotationAlignment; | import com.rapidminer.gui.flow.processrendering.annotations.style.*; | [
"com.rapidminer.gui"
] | com.rapidminer.gui; | 2,746,068 |
public void collectUpdateCounters(CachePartitionPartialCountersMap cntrMap); | void function(CachePartitionPartialCountersMap cntrMap); | /**
* Collects update counters collected during exchange. Called on coordinator.
*
* @param cntrMap Counters map.
*/ | Collects update counters collected during exchange. Called on coordinator | collectUpdateCounters | {
"repo_name": "psadusumilli/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java",
"license": "apache-2.0",
"size": 13900
} | [
"org.apache.ignite.internal.processors.cache.distributed.dht.preloader.CachePartitionPartialCountersMap"
] | import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.CachePartitionPartialCountersMap; | import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,599,424 |
RegisterCertificateType asRivtaV2TransportModel() throws ScenarioNotFoundException; | RegisterCertificateType asRivtaV2TransportModel() throws ScenarioNotFoundException; | /**
* Returns the scenario as a rivta v2 transport model.
*
* @return The scenario as a rivta v2 transport model.
* @throws ScenarioNotFoundException
* if the scenario wasn't found.
*/ | Returns the scenario as a rivta v2 transport model | asRivtaV2TransportModel | {
"repo_name": "sklintyg/intygstyper",
"path": "fk7263/src/test/java/se/inera/intyg/intygstyper/fk7263/utils/Scenario.java",
"license": "gpl-3.0",
"size": 2475
} | [
"se.riv.clinicalprocess.healthcond.certificate.registerCertificate.v2.RegisterCertificateType"
] | import se.riv.clinicalprocess.healthcond.certificate.registerCertificate.v2.RegisterCertificateType; | import se.riv.clinicalprocess.healthcond.certificate.*; | [
"se.riv.clinicalprocess"
] | se.riv.clinicalprocess; | 2,235,633 |
public HashMap<Integer, String> getUsersTypesDb() {
Connection connection;
HashMap<Integer, String> userTypes = new HashMap<>();
try {
connection = new DBConnectionManager().getConnection();
Statement statement = connection.createStatement();
Re... | HashMap<Integer, String> function() { Connection connection; HashMap<Integer, String> userTypes = new HashMap<>(); try { connection = new DBConnectionManager().getConnection(); Statement statement = connection.createStatement(); ResultSet rs = statement.executeQuery(STR + getLang() + "'"); while (rs.next()) { int code ... | /**
* Gets the user types from DB.
* @return HashMap<Integer, String>
* @see
* @since 1.0
*/ | Gets the user types from DB | getUsersTypesDb | {
"repo_name": "ALIADA/aliada-tool",
"path": "aliada/aliada-user-interface/src/main/java/eu/aliada/gui/action/Methods.java",
"license": "gpl-3.0",
"size": 21777
} | [
"eu.aliada.gui.log.MessageCatalog",
"eu.aliada.gui.rdbms.DBConnectionManager",
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"java.util.HashMap"
] | import eu.aliada.gui.log.MessageCatalog; import eu.aliada.gui.rdbms.DBConnectionManager; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.HashMap; | import eu.aliada.gui.log.*; import eu.aliada.gui.rdbms.*; import java.sql.*; import java.util.*; | [
"eu.aliada.gui",
"java.sql",
"java.util"
] | eu.aliada.gui; java.sql; java.util; | 1,928,994 |
private void processDeadServersAndRecoverLostRegions(
Map<ServerName, List<HRegionInfo>> deadServers)
throws IOException, KeeperException {
if (deadServers != null) {
for (Map.Entry<ServerName, List<HRegionInfo>> server: deadServers.entrySet()) {
ServerName serverName = server.getKey... | void function( Map<ServerName, List<HRegionInfo>> deadServers) throws IOException, KeeperException { if (deadServers != null) { for (Map.Entry<ServerName, List<HRegionInfo>> server: deadServers.entrySet()) { ServerName serverName = server.getKey(); regionStates.setLastRegionServerOfRegions(serverName, server.getValue()... | /**
* Processes list of dead servers from result of hbase:meta scan and regions in RIT
* <p>
* This is used for failover to recover the lost regions that belonged to
* RegionServers which failed while there was no active master or regions
* that were in RIT.
* <p>
*
*
* @param deadServers
... | Processes list of dead servers from result of hbase:meta scan and regions in RIT This is used for failover to recover the lost regions that belonged to RegionServers which failed while there was no active master or regions that were in RIT. | processDeadServersAndRecoverLostRegions | {
"repo_name": "Jackygq1982/hbase_src",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java",
"license": "apache-2.0",
"size": 167470
} | [
"java.io.IOException",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.ServerName",
"org.apache.hadoop.hbase.master.RegionState",
"org.apache.hadoop.hbase.zookeeper.ZKUtil",
"org.apache.zookeeper.KeeperException"
] | import java.io.IOException; import java.util.List; import java.util.Map; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.master.RegionState; import org.apache.hadoop.hbase.zookeeper.ZKUtil; import org.apache.zookeeper.KeeperException; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.master.*; import org.apache.hadoop.hbase.zookeeper.*; import org.apache.zookeeper.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.zookeeper"
] | java.io; java.util; org.apache.hadoop; org.apache.zookeeper; | 1,284,961 |
public static final void saveAsPreferences(Context context, Cursor coasySettingsGroupCursor) {
final String settingsJsonEsc = coasySettingsGroupCursor.getString(coasySettingsGroupCursor.getColumnIndex(ContactsContract.Groups.NOTES));
final CoasySettings settings = CoasyDatabaseHelper.fromEscapedJson(settingsJso... | static final void function(Context context, Cursor coasySettingsGroupCursor) { final String settingsJsonEsc = coasySettingsGroupCursor.getString(coasySettingsGroupCursor.getColumnIndex(ContactsContract.Groups.NOTES)); final CoasySettings settings = CoasyDatabaseHelper.fromEscapedJson(settingsJsonEsc, CoasySettings.clas... | /**
* Saves the contact group as settings in the {@link SharedPreferences}.
*
* @param context
* @param coasySettingsGroupCursor
*/ | Saves the contact group as settings in the <code>SharedPreferences</code> | saveAsPreferences | {
"repo_name": "gwario/coasy",
"path": "android-frontend/src/at/ameise/coasy/util/SettingsUtil.java",
"license": "bsd-3-clause",
"size": 10690
} | [
"android.content.Context",
"android.database.Cursor",
"android.provider.ContactsContract",
"at.ameise.coasy.domain.persistence.database.CoasyDatabaseHelper"
] | import android.content.Context; import android.database.Cursor; import android.provider.ContactsContract; import at.ameise.coasy.domain.persistence.database.CoasyDatabaseHelper; | import android.content.*; import android.database.*; import android.provider.*; import at.ameise.coasy.domain.persistence.database.*; | [
"android.content",
"android.database",
"android.provider",
"at.ameise.coasy"
] | android.content; android.database; android.provider; at.ameise.coasy; | 2,791,647 |
protected void finalizeInstallation(String installDir)
{
super.finalizeInstallation(installDir);
File propertiesFile = new File(installDir, APTANA_PROPERTIES_FILE_NAME);
Properties properties = new Properties();
properties.put("PYTHON_install", urls[0]); //$NON-NLS-1$
FileOutputStream fileOutputStream = n... | void function(String installDir) { super.finalizeInstallation(installDir); File propertiesFile = new File(installDir, APTANA_PROPERTIES_FILE_NAME); Properties properties = new Properties(); properties.put(STR, urls[0]); FileOutputStream fileOutputStream = null; try { fileOutputStream = new FileOutputStream(propertiesFi... | /**
* Finalize the installation by placing a .aptana file in the installed directory, specifying some properties.
*
* @param installDir
*/ | Finalize the installation by placing a .aptana file in the installed directory, specifying some properties | finalizeInstallation | {
"repo_name": "HossainKhademian/Studio3",
"path": "plugins/com.aptana.portal.ui/src/com/aptana/portal/ui/dispatch/configurationProcessors/PythonInstallProcessor.java",
"license": "gpl-3.0",
"size": 14674
} | [
"com.aptana.core.logging.IdeLog",
"com.aptana.portal.ui.PortalUIPlugin",
"com.aptana.portal.ui.dispatch.configurationProcessors.installer.InstallerOptionsDialog",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.util.Properties",
"org.eclipse.osgi.util.NLS",
"org.eclipse.swt.... | import com.aptana.core.logging.IdeLog; import com.aptana.portal.ui.PortalUIPlugin; import com.aptana.portal.ui.dispatch.configurationProcessors.installer.InstallerOptionsDialog; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties; import org.eclipse.osgi.util.NL... | import com.aptana.core.logging.*; import com.aptana.portal.ui.*; import com.aptana.portal.ui.dispatch.*; import java.io.*; import java.util.*; import org.eclipse.osgi.util.*; import org.eclipse.swt.widgets.*; | [
"com.aptana.core",
"com.aptana.portal",
"java.io",
"java.util",
"org.eclipse.osgi",
"org.eclipse.swt"
] | com.aptana.core; com.aptana.portal; java.io; java.util; org.eclipse.osgi; org.eclipse.swt; | 538,742 |
public CompiledStage emit() throws IOException {
LOG.debug("Generating cleanup stage client for {}", environment.getFlowId()); //$NON-NLS-1$
Engine engine = new Engine(environment);
CompilationUnit source = engine.generate();
environment.emit(source);
Name packageName = sourc... | CompiledStage function() throws IOException { LOG.debug(STR, environment.getFlowId()); Engine engine = new Engine(environment); CompilationUnit source = engine.generate(); environment.emit(source); Name packageName = source.getPackageDeclaration().getName(); SimpleName simpleName = source.getTypeDeclarations().get(0).g... | /**
* Emits a new cleanup stage client.
* @return the compiled class info
* @throws IOException if faled to emit a class
*/ | Emits a new cleanup stage client | emit | {
"repo_name": "asakusafw/asakusafw-mapreduce",
"path": "compiler/core/src/main/java/com/asakusafw/compiler/flow/jobflow/CleanupStageClientEmitter.java",
"license": "apache-2.0",
"size": 8460
} | [
"com.asakusafw.compiler.common.Naming",
"com.asakusafw.compiler.flow.FlowCompilingEnvironment",
"com.asakusafw.runtime.stage.AbstractCleanupStageClient",
"com.asakusafw.utils.java.model.syntax.CompilationUnit",
"com.asakusafw.utils.java.model.syntax.ModelFactory",
"com.asakusafw.utils.java.model.syntax.Na... | import com.asakusafw.compiler.common.Naming; import com.asakusafw.compiler.flow.FlowCompilingEnvironment; import com.asakusafw.runtime.stage.AbstractCleanupStageClient; import com.asakusafw.utils.java.model.syntax.CompilationUnit; import com.asakusafw.utils.java.model.syntax.ModelFactory; import com.asakusafw.utils.jav... | import com.asakusafw.compiler.common.*; import com.asakusafw.compiler.flow.*; import com.asakusafw.runtime.stage.*; import com.asakusafw.utils.java.model.syntax.*; import com.asakusafw.utils.java.model.util.*; import java.io.*; | [
"com.asakusafw.compiler",
"com.asakusafw.runtime",
"com.asakusafw.utils",
"java.io"
] | com.asakusafw.compiler; com.asakusafw.runtime; com.asakusafw.utils; java.io; | 2,254,995 |
public Set<String> getUsersInClasses(
final Collection<String> classIds) throws ServiceException {
Set<String> usernames = new HashSet<String>();
for(String classId : classIds) {
usernames.addAll(getUsersInClass(classId));
}
return usernames;
}
| Set<String> function( final Collection<String> classIds) throws ServiceException { Set<String> usernames = new HashSet<String>(); for(String classId : classIds) { usernames.addAll(getUsersInClass(classId)); } return usernames; } | /**
* Retrieves a Set of all of the usernames in all of the classes.
*
* @param classIds A Collection of class identifiers.
*
* @return A Set of all of the users in all of the classes without
* duplicates.
*
* @throws ServiceException Thrown if there is an error.
*/ | Retrieves a Set of all of the usernames in all of the classes | getUsersInClasses | {
"repo_name": "HaiJiaoXinHeng/server-1",
"path": "src/org/ohmage/service/UserClassServices.java",
"license": "apache-2.0",
"size": 12825
} | [
"java.util.Collection",
"java.util.HashSet",
"java.util.Set",
"org.ohmage.exception.ServiceException"
] | import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.ohmage.exception.ServiceException; | import java.util.*; import org.ohmage.exception.*; | [
"java.util",
"org.ohmage.exception"
] | java.util; org.ohmage.exception; | 1,895,675 |
public Object[][] fetchDataBlock(
Method m ) throws DataProviderException, NoSuchPropertyException,
ConfigurationException {
InputStream dataFileInputStream = null;
try {
dataFileInputStream = getData... | Object[][] function( Method m ) throws DataProviderException, NoSuchPropertyException, ConfigurationException { InputStream dataFileInputStream = null; try { dataFileInputStream = getDataFileInputStream(m); String dataSheet = getDataSheet(m); ExcelParser excelParser = new ExcelParser(dataFileInputStream, dataSheet); Ob... | /**
* Returns a set of test data, depending on the {@link Method} that requires it. This specific implementation
* searches for the excel spread sheet in the same directory structure, that the calling method's class is in (i.e.
* com/axway/some_package/tests).
*
* @param m the {@link Method} th... | Returns a set of test data, depending on the <code>Method</code> that requires it. This specific implementation searches for the excel spread sheet in the same directory structure, that the calling method's class is in (i.e. com/axway/some_package/tests) | fetchDataBlock | {
"repo_name": "Axway/ats-framework",
"path": "testharness/src/main/java/com/axway/ats/harness/testng/dataproviders/ExcelDataProvider.java",
"license": "apache-2.0",
"size": 3329
} | [
"com.axway.ats.config.exceptions.ConfigurationException",
"com.axway.ats.config.exceptions.NoSuchPropertyException",
"com.axway.ats.core.utils.IoUtils",
"com.axway.ats.harness.testng.exceptions.DataProviderException",
"java.io.InputStream",
"java.lang.reflect.Method"
] | import com.axway.ats.config.exceptions.ConfigurationException; import com.axway.ats.config.exceptions.NoSuchPropertyException; import com.axway.ats.core.utils.IoUtils; import com.axway.ats.harness.testng.exceptions.DataProviderException; import java.io.InputStream; import java.lang.reflect.Method; | import com.axway.ats.config.exceptions.*; import com.axway.ats.core.utils.*; import com.axway.ats.harness.testng.exceptions.*; import java.io.*; import java.lang.reflect.*; | [
"com.axway.ats",
"java.io",
"java.lang"
] | com.axway.ats; java.io; java.lang; | 981,406 |
@Override
public void updateDataMapStatus(List<DataMapSchema> dataMapSchemas, DataMapStatus dataMapStatus)
throws IOException {
if (dataMapSchemas == null || dataMapSchemas.size() == 0) {
// There is nothing to update
return;
}
ICarbonLock carbonTableStatusLock = getDataMapStatusLock()... | void function(List<DataMapSchema> dataMapSchemas, DataMapStatus dataMapStatus) throws IOException { if (dataMapSchemas == null dataMapSchemas.size() == 0) { return; } ICarbonLock carbonTableStatusLock = getDataMapStatusLock(); boolean locked = false; try { locked = carbonTableStatusLock.lockWithRetries(); if (locked) {... | /**
* Update or add the status of passed datamaps with the given datamapstatus. If the datamapstatus
* given is enabled/disabled then updates/adds the datamap, in case of drop it just removes it
* from the file.
* This method always overwrites the old file.
* @param dataMapSchemas schemas of which are ne... | Update or add the status of passed datamaps with the given datamapstatus. If the datamapstatus given is enabled/disabled then updates/adds the datamap, in case of drop it just removes it from the file. This method always overwrites the old file | updateDataMapStatus | {
"repo_name": "manishgupta88/carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/datamap/status/DiskBasedDataMapStatusProvider.java",
"license": "apache-2.0",
"size": 8309
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.apache.carbondata.core.constants.CarbonCommonConstants",
"org.apache.carbondata.core.locks.CarbonLockUtil",
"org.apache.carbondata.core.locks.ICarbonLock",
"org.apache.carbondata.core.locks.LockUsage",
"org.apac... | import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.carbondata.core.constants.CarbonCommonConstants; import org.apache.carbondata.core.locks.CarbonLockUtil; import org.apache.carbondata.core.locks.ICarbonLock; import org.apache.carbondata.core.locks.... | import java.io.*; import java.util.*; import org.apache.carbondata.core.constants.*; import org.apache.carbondata.core.locks.*; import org.apache.carbondata.core.metadata.schema.table.*; import org.apache.carbondata.core.util.*; | [
"java.io",
"java.util",
"org.apache.carbondata"
] | java.io; java.util; org.apache.carbondata; | 316,508 |
public void testEquals() {
MiddlePinNeedle n1 = new MiddlePinNeedle();
MiddlePinNeedle n2 = new MiddlePinNeedle();
assertTrue(n1.equals(n2));
assertTrue(n2.equals(n1));
} | void function() { MiddlePinNeedle n1 = new MiddlePinNeedle(); MiddlePinNeedle n2 = new MiddlePinNeedle(); assertTrue(n1.equals(n2)); assertTrue(n2.equals(n1)); } | /**
* Check that the equals() method can distinguish all fields.
*/ | Check that the equals() method can distinguish all fields | testEquals | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/needle/junit/MiddlePinNeedleTests.java",
"license": "lgpl-2.1",
"size": 4017
} | [
"org.jfree.chart.needle.MiddlePinNeedle"
] | import org.jfree.chart.needle.MiddlePinNeedle; | import org.jfree.chart.needle.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 317,463 |
@Test
public void resolveStockfishPathTest() throws OperationNotSupportedException
{
final String stockfishPath = ChessContext.resolveStockfishPath();
final String operatingSystem = System.getProperty("os.name").toLowerCase();
String pathSubstr = ChessContext.STOCKFISH_PATH;
if(operatingSystem.contains(Che... | void function() throws OperationNotSupportedException { final String stockfishPath = ChessContext.resolveStockfishPath(); final String operatingSystem = System.getProperty(STR).toLowerCase(); String pathSubstr = ChessContext.STOCKFISH_PATH; if(operatingSystem.contains(ChessContext.OS_LINUX)) { pathSubstr += ChessContex... | /**
* Tests that path to Stockfish engine resolves properly
*
* @throws OperationNotSupportedException Thrown on attempt to resolve a path on an OS that is not supported
*/ | Tests that path to Stockfish engine resolves properly | resolveStockfishPathTest | {
"repo_name": "bigtobster/pgn-extract-alt",
"path": "src/test/java/com/bigtobster/pgnextractalt/chess/ChessContextTest.java",
"license": "gpl-3.0",
"size": 5916
} | [
"javax.naming.OperationNotSupportedException",
"org.junit.Assert"
] | import javax.naming.OperationNotSupportedException; import org.junit.Assert; | import javax.naming.*; import org.junit.*; | [
"javax.naming",
"org.junit"
] | javax.naming; org.junit; | 2,105,940 |
private Document getEmbeddingEntity(AssociationKey key, AssociationContext associationContext) {
Document embeddingEntityDocument = associationContext.getEntityTuplePointer().getTuple() != null ?
( (MongoDBTupleSnapshot) associationContext.getEntityTuplePointer().getTuple().getSnapshot() ).getDbObject() : null... | Document function(AssociationKey key, AssociationContext associationContext) { Document embeddingEntityDocument = associationContext.getEntityTuplePointer().getTuple() != null ? ( (MongoDBTupleSnapshot) associationContext.getEntityTuplePointer().getTuple().getSnapshot() ).getDbObject() : null; if ( embeddingEntityDocum... | /**
* Returns a {@link Document} representing the entity which embeds the specified association.
*/ | Returns a <code>Document</code> representing the entity which embeds the specified association | getEmbeddingEntity | {
"repo_name": "DavideD/hibernate-ogm",
"path": "mongodb/src/main/java/org/hibernate/ogm/datastore/mongodb/MongoDBDialect.java",
"license": "lgpl-2.1",
"size": 89202
} | [
"com.mongodb.client.MongoCollection",
"org.bson.Document",
"org.hibernate.ogm.datastore.mongodb.dialect.impl.MongoDBTupleSnapshot",
"org.hibernate.ogm.dialect.spi.AssociationContext",
"org.hibernate.ogm.model.key.spi.AssociationKey"
] | import com.mongodb.client.MongoCollection; import org.bson.Document; import org.hibernate.ogm.datastore.mongodb.dialect.impl.MongoDBTupleSnapshot; import org.hibernate.ogm.dialect.spi.AssociationContext; import org.hibernate.ogm.model.key.spi.AssociationKey; | import com.mongodb.client.*; import org.bson.*; import org.hibernate.ogm.datastore.mongodb.dialect.impl.*; import org.hibernate.ogm.dialect.spi.*; import org.hibernate.ogm.model.key.spi.*; | [
"com.mongodb.client",
"org.bson",
"org.hibernate.ogm"
] | com.mongodb.client; org.bson; org.hibernate.ogm; | 2,571,523 |
public static void assertBitmapsAreSimilar(
Bitmap expectedBitmap, Bitmap actualBitmap, double psnrThresholdDb) {
assertThat(getPsnr(expectedBitmap, actualBitmap)).isAtLeast(psnrThresholdDb);
} | static void function( Bitmap expectedBitmap, Bitmap actualBitmap, double psnrThresholdDb) { assertThat(getPsnr(expectedBitmap, actualBitmap)).isAtLeast(psnrThresholdDb); } | /**
* Asserts whether actual bitmap is very similar to the expected bitmap at some quality level.
*
* <p>This is defined as their PSNR value is greater than or equal to the threshold. The higher
* the threshold, the more similar they are.
*
* @param expectedBitmap The expected bitmap.
* @param actu... | Asserts whether actual bitmap is very similar to the expected bitmap at some quality level. This is defined as their PSNR value is greater than or equal to the threshold. The higher the threshold, the more similar they are | assertBitmapsAreSimilar | {
"repo_name": "saki4510t/ExoPlayer",
"path": "testutils/src/main/java/com/google/android/exoplayer2/testutil/TestUtil.java",
"license": "apache-2.0",
"size": 16007
} | [
"android.graphics.Bitmap",
"com.google.common.truth.Truth"
] | import android.graphics.Bitmap; import com.google.common.truth.Truth; | import android.graphics.*; import com.google.common.truth.*; | [
"android.graphics",
"com.google.common"
] | android.graphics; com.google.common; | 983,958 |
protected MessageContext decodeSoapRequest(final HttpServletRequest request) {
try {
val decoder = new HTTPSOAP11Decoder();
decoder.setParserPool(samlProfileHandlerConfigurationContext.getOpenSamlConfigBean().getParserPool());
decoder.setHttpServletRequest(request);
... | MessageContext function(final HttpServletRequest request) { try { val decoder = new HTTPSOAP11Decoder(); decoder.setParserPool(samlProfileHandlerConfigurationContext.getOpenSamlConfigBean().getParserPool()); decoder.setHttpServletRequest(request); val binding = new BindingDescriptor(); binding.setId(getClass().getName(... | /**
* Decode soap 11 context.
*
* @param request the request
* @return the soap 11 context
*/ | Decode soap 11 context | decodeSoapRequest | {
"repo_name": "pdrados/cas",
"path": "support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/AbstractSamlIdPProfileHandlerController.java",
"license": "apache-2.0",
"size": 23741
} | [
"javax.servlet.http.HttpServletRequest",
"org.apereo.cas.util.LoggingUtils",
"org.opensaml.messaging.context.MessageContext",
"org.opensaml.saml.common.binding.BindingDescriptor",
"org.opensaml.saml.saml2.binding.decoding.impl.HTTPSOAP11Decoder"
] | import javax.servlet.http.HttpServletRequest; import org.apereo.cas.util.LoggingUtils; import org.opensaml.messaging.context.MessageContext; import org.opensaml.saml.common.binding.BindingDescriptor; import org.opensaml.saml.saml2.binding.decoding.impl.HTTPSOAP11Decoder; | import javax.servlet.http.*; import org.apereo.cas.util.*; import org.opensaml.messaging.context.*; import org.opensaml.saml.common.binding.*; import org.opensaml.saml.saml2.binding.decoding.impl.*; | [
"javax.servlet",
"org.apereo.cas",
"org.opensaml.messaging",
"org.opensaml.saml"
] | javax.servlet; org.apereo.cas; org.opensaml.messaging; org.opensaml.saml; | 2,414,784 |
public Object decode(Object value) throws DecoderException {
if (value == null) {
return null;
} else if (value instanceof String) {
return decode((String) value);
} else {
throw new DecoderException("Objects of type " +
value.getC... | Object function(Object value) throws DecoderException { if (value == null) { return null; } else if (value instanceof String) { return decode((String) value); } else { throw new DecoderException(STR + value.getClass().getName() + STR); } } | /**
* Decodes a Base64 object into its original form. Escaped characters are converted back to their original
* representation.
*
* @param value
* Base64 object to convert into its original form
*
* @return original object
*
* @throws DecoderExce... | Decodes a Base64 object into its original form. Escaped characters are converted back to their original representation | decode | {
"repo_name": "renepreuss/P2P-Client",
"path": "src/org/apache/commons/codec/net/BCodec.java",
"license": "mit",
"size": 7261
} | [
"org.apache.commons.codec.DecoderException"
] | import org.apache.commons.codec.DecoderException; | import org.apache.commons.codec.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,198,878 |
public Element createFusionPlace(String pfusionname, String pname, String ptype) {
return createFusionPlace(pfusionname, pname, ptype, "");
} | Element function(String pfusionname, String pname, String ptype) { return createFusionPlace(pfusionname, pname, ptype, ""); } | /**
* Creates a fusion place, set locally the information and add it to the fusion set.
* Set an empty initmark.
*
* @param pfusionname Name of the fusion set to be added to.
* @param pname text describig the place.
* @param ptype color set of the present place.
* @return ... | Creates a fusion place, set locally the information and add it to the fusion set. Set an empty initmark | createFusionPlace | {
"repo_name": "pcgomes/libcpntools",
"path": "src/main/java/stave/cpntools/CPNToolsNetFactory.java",
"license": "gpl-3.0",
"size": 39718
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 596,746 |
private boolean validateField(Method method, Object actual, Object expected)
throws AssertionError {
DataTypeEnum type = ObjectUtil.resolveType(method.getReturnType());
if (!type.equals(DataTypeEnum.JAVA_DOT_LANG_OBJECT) && !type.equals(DataTypeEnum.STRING)
&& !method.getReturnT... | boolean function(Method method, Object actual, Object expected) throws AssertionError { DataTypeEnum type = ObjectUtil.resolveType(method.getReturnType()); if (!type.equals(DataTypeEnum.JAVA_DOT_LANG_OBJECT) && !type.equals(DataTypeEnum.STRING) && !method.getReturnType().isPrimitive()) { return validateBeanField(method... | /**
* main validation entry point for get*() functions, validation is branched according to method returnType,
* validation is forwarded to whether
*
* @param method
* @param actual
* @param expected
* @return
* @throws AssertionError
*/ | main validation entry point for get*() functions, validation is branched according to method returnType, validation is forwarded to whether | validateField | {
"repo_name": "eswdd/disco",
"path": "disco-test/disco-test-utils/src/main/java/uk/co/exemel/testing/utils/disco/assertions/SetAssertion.java",
"license": "apache-2.0",
"size": 14074
} | [
"java.lang.reflect.Method",
"uk.co.exemel.testing.utils.disco.misc.DataTypeEnum",
"uk.co.exemel.testing.utils.disco.misc.ObjectUtil"
] | import java.lang.reflect.Method; import uk.co.exemel.testing.utils.disco.misc.DataTypeEnum; import uk.co.exemel.testing.utils.disco.misc.ObjectUtil; | import java.lang.reflect.*; import uk.co.exemel.testing.utils.disco.misc.*; | [
"java.lang",
"uk.co.exemel"
] | java.lang; uk.co.exemel; | 2,793,430 |
public final int getInt(int columnIndex) throws SQLException {
checkIfClosed("getInt");
try {
DataValueDescriptor dvd = getColumn(columnIndex);
if (wasNull = dvd.isNull())
return 0;
return dvd.getInt();
} catch (StandardException t) {
throw noStateChangeException(t);
}
} | final int function(int columnIndex) throws SQLException { checkIfClosed(STR); try { DataValueDescriptor dvd = getColumn(columnIndex); if (wasNull = dvd.isNull()) return 0; return dvd.getInt(); } catch (StandardException t) { throw noStateChangeException(t); } } | /**
* Get the value of a column in the current row as a Java int.
*
* @param columnIndex the first column is 1, the second is 2, ...
* @return the column value; if the value is SQL NULL, the result is 0
* @exception SQLException thrown on failure.
*/ | Get the value of a column in the current row as a Java int | getInt | {
"repo_name": "viaper/DBPlus",
"path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java",
"license": "apache-2.0",
"size": 178663
} | [
"java.sql.SQLException",
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.types.DataValueDescriptor"
] | import java.sql.SQLException; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.types.DataValueDescriptor; | import java.sql.*; import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.types.*; | [
"java.sql",
"org.apache.derby"
] | java.sql; org.apache.derby; | 348,470 |
public static BigDecimal fv(double r, int nper, double c, double pv) {
return fv(r, nper, c, pv);
}
| static BigDecimal function(double r, int nper, double c, double pv) { return fv(r, nper, c, pv); } | /**
* Overloaded fv() call omitting type, which defaults to 0.
*
* @see #fv(double, int, double, double, int)
*/ | Overloaded fv() call omitting type, which defaults to 0 | fv | {
"repo_name": "dbsoftcombr/dbssdk",
"path": "src/main/java/br/com/dbsoft/util/DBSNumber.java",
"license": "mit",
"size": 45959
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,142,481 |
return cId;
}
/**
* Sets the value of the cId property.
*
* @param value
* allowed object is
* {@link BigInteger } | return cId; } /** * Sets the value of the cId property. * * @param value * allowed object is * {@link BigInteger } | /**
* Gets the value of the cId property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/ | Gets the value of the cId property | getCId | {
"repo_name": "bgithub1/span-java",
"path": "src/main/java/com/billybyte/spanjava/generated/Phy.java",
"license": "mit",
"size": 5651
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,688,424 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<VirtualNetworkGatewayInner> listByResourceGroup(String resourceGroupName); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<VirtualNetworkGatewayInner> listByResourceGroup(String resourceGroupName); | /**
* Gets all virtual network gateways by resource group.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejecte... | Gets all virtual network gateways by resource group | listByResourceGroup | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualNetworkGatewaysClient.java",
"license": "mit",
"size": 135947
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.network.fluent.models.VirtualNetworkGatewayInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.fluent.models.VirtualNetworkGatewayInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,644,693 |
public void sortTreeNodes(int sortType)
{
switch (model.getState()) {
//case COUNTING_ITEMS:
case LOADING_DATA:
case LOADING_LEAVES:
case DISCARDED:
throw new IllegalStateException(
"This method cannot be invoked in the... | void function(int sortType) { switch (model.getState()) { case LOADING_DATA: case LOADING_LEAVES: case DISCARDED: throw new IllegalStateException( STR+ STR); } switch (sortType) { case SORT_NODES_BY_DATE: case SORT_NODES_BY_NAME: break; default: throw new IllegalArgumentException(STR); } view.setCursor(Cursor.getPredef... | /**
* Implemented as specified by the {@link Browser} interface.
* @see Browser#sortTreeNodes(int)
*/ | Implemented as specified by the <code>Browser</code> interface | sortTreeNodes | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserComponent.java",
"license": "gpl-2.0",
"size": 78666
} | [
"java.awt.Cursor"
] | import java.awt.Cursor; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,749,628 |
public FsPermission getPermission() {
return permission;
} | FsPermission function() { return permission; } | /**
* Get FsPermission associated with the file.
* @return permission. If a filesystem does not have a notion of permissions
* or if permissions could not be determined, then default
* permissions equivalent of "rwxrwxrwx" is returned.
*/ | Get FsPermission associated with the file | getPermission | {
"repo_name": "Ethanlm/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java",
"license": "apache-2.0",
"size": 12871
} | [
"org.apache.hadoop.fs.permission.FsPermission"
] | import org.apache.hadoop.fs.permission.FsPermission; | import org.apache.hadoop.fs.permission.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 162,841 |
public synchronized void destroy() throws IOException {
if (mState == State.DESTROYED) {
return;
}
if (!mSuccess) {
saveWorkdir();
}
mCloser.close();
LOG.info("Destroyed cluster {}", mClusterName);
mState = State.DESTROYED;
} | synchronized void function() throws IOException { if (mState == State.DESTROYED) { return; } if (!mSuccess) { saveWorkdir(); } mCloser.close(); LOG.info(STR, mClusterName); mState = State.DESTROYED; } | /**
* Destroys the cluster. It may not be re-started after being destroyed.
*/ | Destroys the cluster. It may not be re-started after being destroyed | destroy | {
"repo_name": "Reidddddd/alluxio",
"path": "minicluster/src/main/java/alluxio/multi/process/MultiProcessCluster.java",
"license": "apache-2.0",
"size": 30090
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,758,134 |
private static boolean _isOnFocusPath(UIXHierarchy component)
{
boolean isOnFocusPath = false;
Object focusKey = component.getFocusRowKey();
Object currentRowKey = component.getRowKey();
if (focusKey != null)
{
List<Object> focusPath =
component.getAllAncestorContainerRowKe... | static boolean function(UIXHierarchy component) { boolean isOnFocusPath = false; Object focusKey = component.getFocusRowKey(); Object currentRowKey = component.getRowKey(); if (focusKey != null) { List<Object> focusPath = component.getAllAncestorContainerRowKeys(focusKey); focusPath = new ArrayList<Object>(focusPath); ... | /**
* Check if a component is on a focus path
*/ | Check if a component is on a focus path | _isOnFocusPath | {
"repo_name": "adamrduffy/trinidad-1.0.x",
"path": "trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java",
"license": "apache-2.0",
"size": 51302
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.apache.myfaces.trinidad.component.UIXHierarchy"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.myfaces.trinidad.component.UIXHierarchy; | import java.util.*; import org.apache.myfaces.trinidad.component.*; | [
"java.util",
"org.apache.myfaces"
] | java.util; org.apache.myfaces; | 75,125 |
public boolean load() {
Cursor cursor = null;
try {
cursor = mCol.getDb().getDatabase().rawQuery("SELECT * FROM cards WHERE id = " + mId, null);
if (!cursor.moveToFirst()) {
Log.w(AnkiDroidApp.TAG, "Card.load: No card with id " + mId);
return f... | boolean function() { Cursor cursor = null; try { cursor = mCol.getDb().getDatabase().rawQuery(STR + mId, null); if (!cursor.moveToFirst()) { Log.w(AnkiDroidApp.TAG, STR + mId); return false; } mId = cursor.getLong(0); mNid = cursor.getLong(1); mDid = cursor.getLong(2); mOrd = cursor.getInt(3); mMod = cursor.getLong(4);... | /**
* Reload Card details from db.
* @return True if the load was successful, false if no card with such id was found.
*/ | Reload Card details from db | load | {
"repo_name": "Acedio/Anki-Android",
"path": "src/com/ichi2/libanki/Card.java",
"license": "gpl-3.0",
"size": 18780
} | [
"android.database.Cursor",
"android.util.Log",
"com.ichi2.anki.AnkiDroidApp"
] | import android.database.Cursor; import android.util.Log; import com.ichi2.anki.AnkiDroidApp; | import android.database.*; import android.util.*; import com.ichi2.anki.*; | [
"android.database",
"android.util",
"com.ichi2.anki"
] | android.database; android.util; com.ichi2.anki; | 2,510,963 |
public static boolean containsAggregateExpression(AbstractExpression expr) {
return expr.hasAnySubexpressionOfType(ExpressionType.AGGREGATE_AVG) ||
expr.hasAnySubexpressionOfType(ExpressionType.AGGREGATE_COUNT) ||
expr.hasAnySubexpressionOfType(ExpressionType.AGGREGATE_COUNT_... | static boolean function(AbstractExpression expr) { return expr.hasAnySubexpressionOfType(ExpressionType.AGGREGATE_AVG) expr.hasAnySubexpressionOfType(ExpressionType.AGGREGATE_COUNT) expr.hasAnySubexpressionOfType(ExpressionType.AGGREGATE_COUNT_STAR) expr.hasAnySubexpressionOfType(ExpressionType.AGGREGATE_MAX) expr.hasA... | /**
* Return true/false whether an expression contains any aggregate expression
*
* @param expr
* @return true is expression contains an aggregate subexpression
*/ | Return true/false whether an expression contains any aggregate expression | containsAggregateExpression | {
"repo_name": "wolffcm/voltdb",
"path": "src/frontend/org/voltdb/expressions/ExpressionUtil.java",
"license": "agpl-3.0",
"size": 21729
} | [
"org.voltdb.types.ExpressionType"
] | import org.voltdb.types.ExpressionType; | import org.voltdb.types.*; | [
"org.voltdb.types"
] | org.voltdb.types; | 238,917 |
public static void assertValidVPM(VariationPoint vp) {
for (Variant v : vp.getVariants()) {
OuterLoop: for (SoftwareElement swe : v.getImplementingElements()) {
EObject wantedObject = swe.getWrappedElement();
TreeIterator<EObject> content = vp.getLocation().getWra... | static void function(VariationPoint vp) { for (Variant v : vp.getVariants()) { OuterLoop: for (SoftwareElement swe : v.getImplementingElements()) { EObject wantedObject = swe.getWrappedElement(); TreeIterator<EObject> content = vp.getLocation().getWrappedElement().eAllContents(); while (content.hasNext()) { if (content... | /**
* Assert that the given variation point is valid after a refactoring. A variation point is
* valid if all references software elements point to a leading resource.
*
* @param vp The variation point to be checked.
*/ | Assert that the given variation point is valid after a refactoring. A variation point is valid if all references software elements point to a leading resource | assertValidVPM | {
"repo_name": "kopl/SPLevo",
"path": "JaMoPPCartridge/org.splevo.jamopp.refactoring.java.ifelse.tests/src/org/splevo/jamopp/refactoring/java/ifelse/tests/util/RefactoringTestUtil.java",
"license": "epl-1.0",
"size": 38675
} | [
"org.eclipse.emf.common.util.TreeIterator",
"org.eclipse.emf.ecore.EObject",
"org.junit.Assert",
"org.splevo.vpm.software.SoftwareElement",
"org.splevo.vpm.variability.Variant",
"org.splevo.vpm.variability.VariationPoint"
] | import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.ecore.EObject; import org.junit.Assert; import org.splevo.vpm.software.SoftwareElement; import org.splevo.vpm.variability.Variant; import org.splevo.vpm.variability.VariationPoint; | import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.*; import org.junit.*; import org.splevo.vpm.software.*; import org.splevo.vpm.variability.*; | [
"org.eclipse.emf",
"org.junit",
"org.splevo.vpm"
] | org.eclipse.emf; org.junit; org.splevo.vpm; | 2,701,439 |
public Map<ConstraintAttribute, String> getAttributes() {
return _attributes;
} | Map<ConstraintAttribute, String> function() { return _attributes; } | /**
* Get all the attributes of the constraint
* @return scope-value pairs of attributes
*/ | Get all the attributes of the constraint | getAttributes | {
"repo_name": "dasahcc/helix",
"path": "helix-core/src/main/java/org/apache/helix/model/ConstraintItem.java",
"license": "apache-2.0",
"size": 4333
} | [
"java.util.Map",
"org.apache.helix.model.ClusterConstraints"
] | import java.util.Map; import org.apache.helix.model.ClusterConstraints; | import java.util.*; import org.apache.helix.model.*; | [
"java.util",
"org.apache.helix"
] | java.util; org.apache.helix; | 2,272,199 |
private Set<String> findCalledFunctions(Node node) {
Set<String> changed = Sets.newHashSet();
findCalledFunctions(NodeUtil.getFunctionBody(node), changed);
return changed;
} | Set<String> function(Node node) { Set<String> changed = Sets.newHashSet(); findCalledFunctions(NodeUtil.getFunctionBody(node), changed); return changed; } | /**
* This functions that may be called directly.
*/ | This functions that may be called directly | findCalledFunctions | {
"repo_name": "robbert/closure-compiler",
"path": "src/com/google/javascript/jscomp/InlineFunctions.java",
"license": "apache-2.0",
"size": 37024
} | [
"com.google.common.collect.Sets",
"com.google.javascript.rhino.Node",
"java.util.Set"
] | import com.google.common.collect.Sets; import com.google.javascript.rhino.Node; import java.util.Set; | import com.google.common.collect.*; import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.common",
"com.google.javascript",
"java.util"
] | com.google.common; com.google.javascript; java.util; | 2,872,427 |
@Schema(description = "Maximal total size of uploaded files (in bytes)")
public Long getMaxSize() {
return maxSize;
} | @Schema(description = STR) Long function() { return maxSize; } | /**
* Maximal total size of uploaded files (in bytes)
* @return maxSize
**/ | Maximal total size of uploaded files (in bytes) | getMaxSize | {
"repo_name": "iterate-ch/cyberduck",
"path": "dracoon/src/main/java/ch/cyberduck/core/sds/io/swagger/client/model/UpdateUploadShareRequest.java",
"license": "gpl-3.0",
"size": 16391
} | [
"io.swagger.v3.oas.annotations.media.Schema"
] | import io.swagger.v3.oas.annotations.media.Schema; | import io.swagger.v3.oas.annotations.media.*; | [
"io.swagger.v3"
] | io.swagger.v3; | 25,876 |
Constructor c = AuthzServerConfig.class.getDeclaredConstructor();
assertTrue(Modifier.isPrivate(c.getModifiers()));
// Create a new instance for coverage.
c.setAccessible(true);
c.newInstance();
} | Constructor c = AuthzServerConfig.class.getDeclaredConstructor(); assertTrue(Modifier.isPrivate(c.getModifiers())); c.setAccessible(true); c.newInstance(); } | /**
* Assert that the header is private.
*
* @throws Exception Should not be thrown.
*/ | Assert that the header is private | testPrivateConstructor | {
"repo_name": "kangaroo-server/kangaroo",
"path": "kangaroo-server-authz/src/test/java/net/krotscheck/kangaroo/authz/AuthzServerConfigTest.java",
"license": "apache-2.0",
"size": 1959
} | [
"java.lang.reflect.Constructor",
"java.lang.reflect.Modifier",
"org.junit.Assert"
] | import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import org.junit.Assert; | import java.lang.reflect.*; import org.junit.*; | [
"java.lang",
"org.junit"
] | java.lang; org.junit; | 2,736,320 |
public Long getRequiredParam(String paramName) {
Long result = getParamAsLong(paramName);
if (result == null) {
// TODO: One day, BadParameterException will take a message and we
// can do
// throw new BadParameterException("The parameter " + param +
/... | Long function(String paramName) { Long result = getParamAsLong(paramName); if (result == null) { throw new BadParameterException(STR + paramName + STR + request.getRequestURI()); } return result; } | /**
* Get the parameter <code>paramName</code> from the request and convert
* it to a <code>Long</code>. A BadParameterException is thrown if the
* parameter is not present in the request or can not be converted.
* @param paramName the name of the parameter
* @return the parameter value convert... | Get the parameter <code>paramName</code> from the request and convert it to a <code>Long</code>. A BadParameterException is thrown if the parameter is not present in the request or can not be converted | getRequiredParam | {
"repo_name": "mcalmer/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/struts/RequestContext.java",
"license": "gpl-2.0",
"size": 27579
} | [
"com.redhat.rhn.frontend.action.common.BadParameterException"
] | import com.redhat.rhn.frontend.action.common.BadParameterException; | import com.redhat.rhn.frontend.action.common.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 2,251,232 |
public static String getEncoding() {
// Check for standard locale environment variables, in order of precedence, first.
// See http://www.gnu.org/s/libc/manual/html_node/Locale-Categories.html
for (String envOption : new String[]{"LC_ALL", "LC_CTYPE", "LANG"}) {
String envEncodin... | static String function() { for (String envOption : new String[]{STR, STR, "LANG"}) { String envEncoding = extractEncodingFromCtype(System.getenv(envOption)); if (envEncoding != null) { try { if (Charset.isSupported(envEncoding)) { return envEncoding; } } catch (IllegalCharsetNameException e) { continue; } } } return ge... | /**
* Get the default encoding. Will first look at the LC_ALL, LC_CTYPE, and LANG environment variables, then the input.encoding
* system property, then the default charset according to the JVM.
*
* @return The default encoding to use when none is specified.
*/ | Get the default encoding. Will first look at the LC_ALL, LC_CTYPE, and LANG environment variables, then the input.encoding system property, then the default charset according to the JVM | getEncoding | {
"repo_name": "tkruse/jline2",
"path": "src/main/java/jline/internal/Configuration.java",
"license": "bsd-3-clause",
"size": 7688
} | [
"java.nio.charset.Charset",
"java.nio.charset.IllegalCharsetNameException"
] | import java.nio.charset.Charset; import java.nio.charset.IllegalCharsetNameException; | import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 227,043 |
private Function<String, Boolean> getDescription() {
return msg -> {
this.car.setDescription(msg);
return true;
};
} | Function<String, Boolean> function() { return msg -> { this.car.setDescription(msg); return true; }; } | /**
* Assign description to the car.
*
* @return result.
*/ | Assign description to the car | getDescription | {
"repo_name": "wamdue/agorbunov",
"path": "chapter_010/src/main/java/ru/job4j/mapping/carshop/controller/MvcNewCarController.java",
"license": "apache-2.0",
"size": 9488
} | [
"java.util.function.Function"
] | import java.util.function.Function; | import java.util.function.*; | [
"java.util"
] | java.util; | 564,460 |
public static void upto(Double self, Number to, Closure closure) {
double to1 = to.doubleValue();
if (self <= to1) {
for (double i = self; i <= to1; i++) {
closure.call(i);
}
} else
throw new GroovyRuntimeException("Infinite loop in " + sel... | static void function(Double self, Number to, Closure closure) { double to1 = to.doubleValue(); if (self <= to1) { for (double i = self; i <= to1; i++) { closure.call(i); } } else throw new GroovyRuntimeException(STR + self + STR + to + ")"); } | /**
* Iterates from this number up to the given number, inclusive,
* incrementing by one each time.
*
* @param self a Double
* @param to the end number
* @param closure the code to execute for each number
* @since 1.0
*/ | Iterates from this number up to the given number, inclusive, incrementing by one each time | upto | {
"repo_name": "mv2a/yajsw",
"path": "src/groovy-patch/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "apache-2.0",
"size": 704164
} | [
"groovy.lang.Closure",
"groovy.lang.GroovyRuntimeException"
] | import groovy.lang.Closure; import groovy.lang.GroovyRuntimeException; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 1,565,730 |
KrbIdentity updateIdentity(KrbIdentity identity) throws KrbException; | KrbIdentity updateIdentity(KrbIdentity identity) throws KrbException; | /**
* Update an identity, and return the updated result.
* @param identity The identity
* @return identity
* @throws KrbException e
*/ | Update an identity, and return the updated result | updateIdentity | {
"repo_name": "plusplusjiajia/directory-kerby",
"path": "kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/IdentityService.java",
"license": "apache-2.0",
"size": 3198
} | [
"org.apache.kerby.kerberos.kerb.KrbException",
"org.apache.kerby.kerberos.kerb.request.KrbIdentity"
] | import org.apache.kerby.kerberos.kerb.KrbException; import org.apache.kerby.kerberos.kerb.request.KrbIdentity; | import org.apache.kerby.kerberos.kerb.*; import org.apache.kerby.kerberos.kerb.request.*; | [
"org.apache.kerby"
] | org.apache.kerby; | 2,344,091 |
private void rollover(final boolean force) throws IOException {
if (!configuration.isAllowRollover()) {
return;
}
// If this is the first time we're creating the out stream, or if we
// have written something to the stream, then roll over
if (force || recordsWrit... | void function(final boolean force) throws IOException { if (!configuration.isAllowRollover()) { return; } if (force recordsWrittenSinceRollover.get() > 0L dirtyWriterCount.get() > 0) { final List<File> journalsToMerge = new ArrayList<>(); for (final RecordWriter writer : writers) { if (!writer.isClosed()) { final File ... | /**
* <p>
* MUST be called with the write lock held.
* </p>
*
* Rolls over the data in the journal files, merging them into a single
* Provenance Event Log File, and compressing and indexing as needed.
*
* @param force if true, will force a rollover regardless of whether or not
... | MUST be called with the write lock held. Rolls over the data in the journal files, merging them into a single Provenance Event Log File, and compressing and indexing as needed | rollover | {
"repo_name": "Xsixteen/nifi",
"path": "nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/PersistentProvenanceRepository.java",
"license": "apache-2.0",
"size": 126035
} | [
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.nifi.provenance.serialization.RecordWriter",
"org.apache.nifi.provenance.serialization.RecordWriters"
] | import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.nifi.provenance.serialization.RecordWriter; import org.apache.nifi.provenance.serialization.RecordWriters; | import java.io.*; import java.util.*; import org.apache.nifi.provenance.serialization.*; | [
"java.io",
"java.util",
"org.apache.nifi"
] | java.io; java.util; org.apache.nifi; | 769,649 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<ActionGroupResourceInner>> getByResourceGroupWithResponseAsync(
String resourceGroupName, String actionGroupName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new Il... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<ActionGroupResourceInner>> function( String resourceGroupName, String actionGroupName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentEx... | /**
* Get an action group.
*
* @param resourceGroupName The name of the resource group.
* @param actionGroupName The name of the action group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by ser... | Get an action group | getByResourceGroupWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/implementation/ActionGroupsClientImpl.java",
"license": "mit",
"size": 60371
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.monitor.fluent.models.ActionGroupResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.monitor.fluent.models.ActionGroupResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.monitor.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,197,071 |
public static String getTypeName(Type type, boolean box, boolean fullyQualified) {
switch (type.getSort()) {
case Type.VOID: return box ? "Void" : "void";
case Type.BOOLEAN: return box ? "Boolean" : "boolean";
case Type.CHAR: return box ? "Character" : "char"... | static String function(Type type, boolean box, boolean fullyQualified) { switch (type.getSort()) { case Type.VOID: return box ? "Void" : "void"; case Type.BOOLEAN: return box ? STR : STR; case Type.CHAR: return box ? STR : "char"; case Type.BYTE: return box ? "Byte" : "byte"; case Type.SHORT: return box ? "Short" : "sh... | /**
* Get the source code name for the specified type
*
* @param type Type to generate a friendly name for
* @param box True to return the equivalent boxing type for primitives
* @param fullyQualified fully-qualify class names
* @return String representation of the specified type, eg "in... | Get the source code name for the specified type | getTypeName | {
"repo_name": "simon816/Mixin",
"path": "src/main/java/org/spongepowered/asm/util/SignaturePrinter.java",
"license": "mit",
"size": 9986
} | [
"org.spongepowered.asm.lib.Type"
] | import org.spongepowered.asm.lib.Type; | import org.spongepowered.asm.lib.*; | [
"org.spongepowered.asm"
] | org.spongepowered.asm; | 1,896,338 |
protected String getLeafContent(String aFrameName, Attributes aAttributes,
StringBuffer aContentBuf) {
return aContentBuf.toString();
} | String function(String aFrameName, Attributes aAttributes, StringBuffer aContentBuf) { return aContentBuf.toString(); } | /**
* Gets the content to be included in a FrameLeaf. This method just returns the contents of the
* provided StringBuffer, but subclasses can override to provide specialized content.
*
* @param aFrameName
* name of the FrameLeaf
* @param aAttributes
* attributes of FrameLeaf
... | Gets the content to be included in a FrameLeaf. This method just returns the contents of the provided StringBuffer, but subclasses can override to provide specialized content | getLeafContent | {
"repo_name": "apache/uima-uimaj",
"path": "uimaj-adapter-vinci/src/main/java/org/apache/uima/adapter/vinci/util/SaxVinciFrameBuilder.java",
"license": "apache-2.0",
"size": 7517
} | [
"org.xml.sax.Attributes"
] | import org.xml.sax.Attributes; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 2,018,155 |
public YangEnumeration getSignalingVariantValue() throws JNCException {
YangEnumeration signalingVariant = (YangEnumeration)getValue("signaling-variant");
if (signalingVariant == null) {
signalingVariant = new YangEnumeration("itu", new String[] { // default
"itu",
... | YangEnumeration function() throws JNCException { YangEnumeration signalingVariant = (YangEnumeration)getValue(STR); if (signalingVariant == null) { signalingVariant = new YangEnumeration("itu", new String[] { "itu", "ansi", STR, "etsi", }); } return signalingVariant; } | /**
* Gets the value for child leaf "signaling-variant".
* @return The value of the leaf.
*/ | Gets the value for child leaf "signaling-variant" | getSignalingVariantValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/interface_/ss7/MmeSs7Profile.java",
"license": "apache-2.0",
"size": 36430
} | [
"com.tailf.jnc.YangEnumeration"
] | import com.tailf.jnc.YangEnumeration; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 2,732,101 |
public Set<Extension> getSoftUnloadExtensions() {
return softUnloadExtensions;
} | Set<Extension> function() { return softUnloadExtensions; } | /**
* Gets the extensions that have to be soft unloaded as result of the changes. The extension will be unloaded and then
* loaded once the dependency is updated-
*
* @return the extensions that have to be soft unloaded
*/ | Gets the extensions that have to be soft unloaded as result of the changes. The extension will be unloaded and then loaded once the dependency is updated- | getSoftUnloadExtensions | {
"repo_name": "JordanGS/zaproxy",
"path": "src/org/zaproxy/zap/extension/autoupdate/AddOnDependencyChecker.java",
"license": "apache-2.0",
"size": 40883
} | [
"java.util.Set",
"org.parosproxy.paros.extension.Extension"
] | import java.util.Set; import org.parosproxy.paros.extension.Extension; | import java.util.*; import org.parosproxy.paros.extension.*; | [
"java.util",
"org.parosproxy.paros"
] | java.util; org.parosproxy.paros; | 1,321,885 |
static TranslationResult makeResultReference(SyntacticReference resultReference, BasicBlock appendBlock) {
TranslationResult res = new TranslationResult();
res.resultReference = resultReference;
res.appendBlock = appendBlock;
return res;
} | static TranslationResult makeResultReference(SyntacticReference resultReference, BasicBlock appendBlock) { TranslationResult res = new TranslationResult(); res.resultReference = resultReference; res.appendBlock = appendBlock; return res; } | /**
* Creates a translation result that stores the result of an expression and the last basic block that been generated.
*/ | Creates a translation result that stores the result of an expression and the last basic block that been generated | makeResultReference | {
"repo_name": "cs-au-dk/TAJS",
"path": "src/dk/brics/tajs/js2flowgraph/TranslationResult.java",
"license": "apache-2.0",
"size": 2146
} | [
"dk.brics.tajs.flowgraph.BasicBlock",
"dk.brics.tajs.flowgraph.syntaticinfo.SyntacticReference"
] | import dk.brics.tajs.flowgraph.BasicBlock; import dk.brics.tajs.flowgraph.syntaticinfo.SyntacticReference; | import dk.brics.tajs.flowgraph.*; import dk.brics.tajs.flowgraph.syntaticinfo.*; | [
"dk.brics.tajs"
] | dk.brics.tajs; | 2,199,576 |
EReference getPhysicalDevice_MeteringPoint(); | EReference getPhysicalDevice_MeteringPoint(); | /**
* Returns the meta object for the containment reference '{@link COSEM.PhysicalDevice#getMeteringPoint <em>Metering Point</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Metering Point</em>'.
* @see COSEM.PhysicalDevice#getMeteringPoint... | Returns the meta object for the containment reference '<code>COSEM.PhysicalDevice#getMeteringPoint Metering Point</code>'. | getPhysicalDevice_MeteringPoint | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/COSEM/COSEMPackage.java",
"license": "mit",
"size": 60487
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,873,393 |
Configuration conf = new Configuration();
conf.setString(ConfigConstants.BLOB_SERVER_PORT, "0");
BlobServer srv = new BlobServer(conf, new VoidBlobStore());
srv.close();
} | Configuration conf = new Configuration(); conf.setString(ConfigConstants.BLOB_SERVER_PORT, "0"); BlobServer srv = new BlobServer(conf, new VoidBlobStore()); srv.close(); } | /**
* Start blob server on 0 = pick an ephemeral port
*/ | Start blob server on 0 = pick an ephemeral port | testOnEphemeralPort | {
"repo_name": "oscarceballos/flink-1.3.2",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerRangeTest.java",
"license": "apache-2.0",
"size": 3321
} | [
"org.apache.flink.configuration.ConfigConstants",
"org.apache.flink.configuration.Configuration"
] | import org.apache.flink.configuration.ConfigConstants; import org.apache.flink.configuration.Configuration; | import org.apache.flink.configuration.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,171,813 |
public void testTimedLock_Timeout() throws Exception {
ArrayList<Future<?>> futures = new ArrayList<>();
// Write locked
final StampedLock lock = new StampedLock();
long stamp = lock.writeLock();
assertEquals(0L, lock.tryReadLock(0L, DAYS));
assertEquals(0L, lock.try... | void function() throws Exception { ArrayList<Future<?>> futures = new ArrayList<>(); final StampedLock lock = new StampedLock(); long stamp = lock.writeLock(); assertEquals(0L, lock.tryReadLock(0L, DAYS)); assertEquals(0L, lock.tryReadLock(Long.MIN_VALUE, DAYS)); assertFalse(lock.asReadLock().tryLock(0L, DAYS)); assert... | /**
* timed lock operations time out if lock not available
*/ | timed lock operations time out if lock not available | testTimedLock_Timeout | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/java/util/concurrent/tck/StampedLockTest.java",
"license": "gpl-2.0",
"size": 57159
} | [
"java.util.ArrayList",
"java.util.concurrent.Future",
"java.util.concurrent.locks.StampedLock"
] | import java.util.ArrayList; import java.util.concurrent.Future; import java.util.concurrent.locks.StampedLock; | import java.util.*; import java.util.concurrent.*; import java.util.concurrent.locks.*; | [
"java.util"
] | java.util; | 846,467 |
public List<OrganizationMember> getMembers(int orgId, MultivaluedMap<String, String> options) {
return getResourceFactory()
.getApiResource("/org/" + orgId + "/member/")
.queryParams(options)
.get(new GenericType<List<OrganizationMember>>() { });
}
| List<OrganizationMember> function(int orgId, MultivaluedMap<String, String> options) { return getResourceFactory() .getApiResource("/org/" + orgId + STR) .queryParams(options) .get(new GenericType<List<OrganizationMember>>() { }); } | /**
* Returns the members, both invited and active, of the given organization.
* This method is only available for organization administrators. For users
* only invited, only very limited information will be returned for the user
* and profile.
*
* @param orgId
* The id of the organizat... | Returns the members, both invited and active, of the given organization. This method is only available for organization administrators. For users only invited, only very limited information will be returned for the user and profile | getMembers | {
"repo_name": "PetrF0X/podio-java",
"path": "src/main/java/com/podio/org/OrgAPI.java",
"license": "mit",
"size": 8164
} | [
"com.sun.jersey.api.client.GenericType",
"java.util.List",
"javax.ws.rs.core.MultivaluedMap"
] | import com.sun.jersey.api.client.GenericType; import java.util.List; import javax.ws.rs.core.MultivaluedMap; | import com.sun.jersey.api.client.*; import java.util.*; import javax.ws.rs.core.*; | [
"com.sun.jersey",
"java.util",
"javax.ws"
] | com.sun.jersey; java.util; javax.ws; | 391,931 |
public final void dropIndex(
Policy policy,
String namespace,
String setName,
String indexName
) throws AerospikeException {
if (policy == null) {
policy = writePolicyDefault;
}
StringBuilder sb = new StringBuilder(500);
sb.append("sindex-delete:ns=");
sb.append(namespace);
if (s... | final void function( Policy policy, String namespace, String setName, String indexName ) throws AerospikeException { if (policy == null) { policy = writePolicyDefault; } StringBuilder sb = new StringBuilder(500); sb.append(STR); sb.append(namespace); if (setName != null && setName.length() > 0) { sb.append(";set="); sb... | /**
* Delete secondary index.
* This method is only supported by Aerospike 3 servers.
*
* @param policy generic configuration parameters, pass in null for defaults
* @param namespace namespace - equivalent to database name
* @param setName optional set name - equivalent to database table
* @para... | Delete secondary index. This method is only supported by Aerospike 3 servers | dropIndex | {
"repo_name": "wgpshashank/aerospike-client-java",
"path": "client/src/com/aerospike/client/AerospikeClient.java",
"license": "apache-2.0",
"size": 64575
} | [
"com.aerospike.client.policy.Policy"
] | import com.aerospike.client.policy.Policy; | import com.aerospike.client.policy.*; | [
"com.aerospike.client"
] | com.aerospike.client; | 1,441,716 |
public void unfreeze() throws StandardException; | void function() throws StandardException; | /**
* Unfreeze the database after a backup has been taken.
* <P>Please see Derby on line documentation on backup and restore.
*
* @exception StandardException Thrown on error
*/ | Unfreeze the database after a backup has been taken. Please see Derby on line documentation on backup and restore | unfreeze | {
"repo_name": "lpxz/grail-derby104",
"path": "java/engine/org/apache/derby/iapi/store/access/AccessFactory.java",
"license": "apache-2.0",
"size": 12129
} | [
"org.apache.derby.iapi.error.StandardException"
] | import org.apache.derby.iapi.error.StandardException; | import org.apache.derby.iapi.error.*; | [
"org.apache.derby"
] | org.apache.derby; | 2,344,115 |
public JMenuItem getClearMenuItem() {
return fclear;
}
| JMenuItem function() { return fclear; } | /**
* Returns the Clear Menu Item.
* @return JMenuItem
*/ | Returns the Clear Menu Item | getClearMenuItem | {
"repo_name": "devjunix/libjt400-java",
"path": "src/com/ibm/as400/util/commtrace/FormatDisplay.java",
"license": "epl-1.0",
"size": 27927
} | [
"javax.swing.JMenuItem"
] | import javax.swing.JMenuItem; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,634,778 |
public Builder withRunModes(final Set<String> runModes) {
this.runModes = runModes;
return this;
}
/**
* Construct a {@link OakMachine} from the {@link Builder} state.
*
* @return a {@link OakMachine} | Builder function(final Set<String> runModes) { this.runModes = runModes; return this; } /** * Construct a {@link OakMachine} from the {@link Builder} state. * * @return a {@link OakMachine} | /**
* Provide a set of simulated sling run modes.
*
* @param runModes the set of sling run modes
* @return my builder self
* @since 2.2.0
*/ | Provide a set of simulated sling run modes | withRunModes | {
"repo_name": "adamcin/net.adamcin.oakpal",
"path": "core/src/main/java/net/adamcin/oakpal/core/OakMachine.java",
"license": "apache-2.0",
"size": 50931
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,266,243 |
public AzureReachabilityReportLatencyInfo withTimeStamp(DateTime timeStamp) {
this.timeStamp = timeStamp;
return this;
} | AzureReachabilityReportLatencyInfo function(DateTime timeStamp) { this.timeStamp = timeStamp; return this; } | /**
* Set the time stamp.
*
* @param timeStamp the timeStamp value to set
* @return the AzureReachabilityReportLatencyInfo object itself.
*/ | Set the time stamp | withTimeStamp | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/AzureReachabilityReportLatencyInfo.java",
"license": "mit",
"size": 1836
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 300,501 |
public net.minidev.ovh.api.order.catalog.OvhCatalog catalog_formatted_cloud_GET(OvhOvhSubsidiaryEnum ovhSubsidiary) throws IOException {
String qPath = "/order/catalog/formatted/cloud";
StringBuilder sb = path(qPath);
query(sb, "ovhSubsidiary", ovhSubsidiary);
String resp = execN(qPath, "GET", sb.toString(),... | net.minidev.ovh.api.order.catalog.OvhCatalog function(OvhOvhSubsidiaryEnum ovhSubsidiary) throws IOException { String qPath = STR; StringBuilder sb = path(qPath); query(sb, STR, ovhSubsidiary); String resp = execN(qPath, "GET", sb.toString(), null); return convertTo(resp, net.minidev.ovh.api.order.catalog.OvhCatalog.cl... | /**
* Retrieve information of Public Cloud catalog
*
* REST: GET /order/catalog/formatted/cloud
* @param ovhSubsidiary [required] Subsidiary of the country you want to consult catalog
*
* API beta
*/ | Retrieve information of Public Cloud catalog | catalog_formatted_cloud_GET | {
"repo_name": "UrielCh/ovh-java-sdk",
"path": "ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java",
"license": "bsd-3-clause",
"size": 511080
} | [
"java.io.IOException",
"net.minidev.ovh.api.nichandle.OvhOvhSubsidiaryEnum",
"net.minidev.ovh.api.order.catalog.privatecloud.OvhCatalog"
] | import java.io.IOException; import net.minidev.ovh.api.nichandle.OvhOvhSubsidiaryEnum; import net.minidev.ovh.api.order.catalog.privatecloud.OvhCatalog; | import java.io.*; import net.minidev.ovh.api.nichandle.*; import net.minidev.ovh.api.order.catalog.privatecloud.*; | [
"java.io",
"net.minidev.ovh"
] | java.io; net.minidev.ovh; | 1,423,472 |
public ResourceSet estimateResourceConsumptionLocal() {
// It's ok if this behaves differently even if the key is identical.
ResourceSet minLinkResources =
getLinkCommandLine().getLinkStaticness() == Link.LinkStaticness.DYNAMIC
? MIN_DYNAMIC_LINK_RESOURCES
: MIN_STATIC_LINK_RESOURCES;
... | ResourceSet function() { ResourceSet minLinkResources = getLinkCommandLine().getLinkStaticness() == Link.LinkStaticness.DYNAMIC ? MIN_DYNAMIC_LINK_RESOURCES : MIN_STATIC_LINK_RESOURCES; final int inputSize = Iterables.size(getLinkCommandLine().getLinkerInputs()) + Iterables.size(getLinkCommandLine().getRuntimeInputs())... | /**
* Estimate the resources consumed when this action is run locally.
*/ | Estimate the resources consumed when this action is run locally | estimateResourceConsumptionLocal | {
"repo_name": "mikelalcon/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java",
"license": "apache-2.0",
"size": 24831
} | [
"com.google.common.collect.Iterables",
"com.google.devtools.build.lib.actions.ResourceSet",
"com.google.devtools.build.lib.rules.cpp.Link"
] | import com.google.common.collect.Iterables; import com.google.devtools.build.lib.actions.ResourceSet; import com.google.devtools.build.lib.rules.cpp.Link; | import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.rules.cpp.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 2,678,575 |
public static void importExpressionTrees(final CConnection connection, final int moduleId,
final int rawModuleId) throws SQLException {
final String query =
"INSERT INTO " + CTableNames.EXPRESSION_TREE_IDS_TABLE + " SELECT " + moduleId + ", id "
+ " FROM ex_" + rawModuleId + "_expression... | static void function(final CConnection connection, final int moduleId, final int rawModuleId) throws SQLException { final String query = STR + CTableNames.EXPRESSION_TREE_IDS_TABLE + STR + moduleId + STR + STR + rawModuleId + STR; connection.executeUpdate(query, true); } | /**
* Imports the expressions table tree.
*
* @param connection Connection to the SQL database.
* @param moduleId ID of the raw module.
*
* @throws SQLException Thrown if the data could not be imported.
*/ | Imports the expressions table tree | importExpressionTrees | {
"repo_name": "paran0ids0ul/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Database/PostgreSQL/PostgreSQLDataImporter.java",
"license": "apache-2.0",
"size": 13826
} | [
"com.google.security.zynamics.binnavi.Database",
"java.sql.SQLException"
] | import com.google.security.zynamics.binnavi.Database; import java.sql.SQLException; | import com.google.security.zynamics.binnavi.*; import java.sql.*; | [
"com.google.security",
"java.sql"
] | com.google.security; java.sql; | 646,129 |
public void clearParserHighlights(Parser parser) {
Iterator<SyntaxLayeredHighlightInfoImpl> i = parserHighlights.iterator();
for (; i.hasNext(); ) {
SyntaxLayeredHighlightInfoImpl info = i.next();
if (info.notice.getParser()==parser) {
if (info.width > 0 && info.height > 0) {
textArea.rep... | void function(Parser parser) { Iterator<SyntaxLayeredHighlightInfoImpl> i = parserHighlights.iterator(); for (; i.hasNext(); ) { SyntaxLayeredHighlightInfoImpl info = i.next(); if (info.notice.getParser()==parser) { if (info.width > 0 && info.height > 0) { textArea.repaint(info.x, info.y, info.width, info.height); } i.... | /**
* Removes all of the highlights for a specific parser.
*
* @param parser The parser.
*/ | Removes all of the highlights for a specific parser | clearParserHighlights | {
"repo_name": "reqT/reqT-syntax",
"path": "src/org/fife/ui/rsyntaxtextarea/RSyntaxTextAreaHighlighter.java",
"license": "bsd-3-clause",
"size": 7840
} | [
"java.util.Iterator",
"org.fife.ui.rsyntaxtextarea.parser.Parser"
] | import java.util.Iterator; import org.fife.ui.rsyntaxtextarea.parser.Parser; | import java.util.*; import org.fife.ui.rsyntaxtextarea.parser.*; | [
"java.util",
"org.fife.ui"
] | java.util; org.fife.ui; | 2,606,465 |
public void testByQuery() throws Throwable {
echo("Testing if Solr is able to do the same as: allInFolderPriorityDateDesc resource collector");
CmsObject cms = getCmsObject();
cms.getRequestContext().setCurrentProject(cms.readProject(CmsProject.ONLINE_PROJECT_ID));
I_CmsResourceCol... | void function() throws Throwable { echo(STR); CmsObject cms = getCmsObject(); cms.getRequestContext().setCurrentProject(cms.readProject(CmsProject.ONLINE_PROJECT_ID)); I_CmsResourceCollector collector = new CmsSolrCollector(); StringBuffer q = new StringBuffer(128); q.append(STR/sites/default/xmlcontent/\STR&fq=type:ar... | /**
* Tests the "allInFolderPriorityDesc" resource collector.<p>
*
* @throws Throwable if something goes wrong
*/ | Tests the "allInFolderPriorityDesc" resource collector | testByQuery | {
"repo_name": "victos/opencms-core",
"path": "test/org/opencms/search/solr/TestCmsSolrCollector.java",
"license": "lgpl-2.1",
"size": 6588
} | [
"org.opencms.file.CmsObject",
"org.opencms.file.CmsProject",
"org.opencms.file.collectors.CmsSolrCollector"
] | import org.opencms.file.CmsObject; import org.opencms.file.CmsProject; import org.opencms.file.collectors.CmsSolrCollector; | import org.opencms.file.*; import org.opencms.file.collectors.*; | [
"org.opencms.file"
] | org.opencms.file; | 875,598 |
@CheckForNull
ExtractedText getText(String propertyPath, Blob blob) throws IOException; | ExtractedText getText(String propertyPath, Blob blob) throws IOException; | /**
* Get pre extracted text for given blob at given path
*
* @param propertyPath path of the binary property
* @param blob binary property value
*
* @return pre extracted text or null if no
* pre extracted text found for given blob
*/ | Get pre extracted text for given blob at given path | getText | {
"repo_name": "mduerig/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/fulltext/PreExtractedTextProvider.java",
"license": "apache-2.0",
"size": 1469
} | [
"java.io.IOException",
"org.apache.jackrabbit.oak.api.Blob"
] | import java.io.IOException; import org.apache.jackrabbit.oak.api.Blob; | import java.io.*; import org.apache.jackrabbit.oak.api.*; | [
"java.io",
"org.apache.jackrabbit"
] | java.io; org.apache.jackrabbit; | 717,104 |
@Override
public void startWalking(Collection<Node> startNodes,
HashMap<Node, Object> nodeOutput) throws SemanticException {
toWalk.addAll(startNodes);
while (toWalk.size() > 0) {
Node nd = toWalk.remove(0);
setRoot(nd);
walk(nd);
if (nodeOutput != null) {
nodeOutput.pu... | void function(Collection<Node> startNodes, HashMap<Node, Object> nodeOutput) throws SemanticException { toWalk.addAll(startNodes); while (toWalk.size() > 0) { Node nd = toWalk.remove(0); setRoot(nd); walk(nd); if (nodeOutput != null) { nodeOutput.put(nd, retMap.get(nd)); } } } | /**
* starting point for walking.
*
* @throws SemanticException
*/ | starting point for walking | startWalking | {
"repo_name": "WANdisco/amplab-hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezWorkWalker.java",
"license": "apache-2.0",
"size": 3281
} | [
"java.util.Collection",
"java.util.HashMap",
"org.apache.hadoop.hive.ql.lib.Node"
] | import java.util.Collection; import java.util.HashMap; import org.apache.hadoop.hive.ql.lib.Node; | import java.util.*; import org.apache.hadoop.hive.ql.lib.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 229,546 |
protected void afterReadUnlock(ReentrantReadWriteLock instance) {} | protected void afterReadUnlock(ReentrantReadWriteLock instance) {} | /**
* This (optional) method is always run after grabbing the read lock. It is
* useful for cases where it is necessary to update some additional state.
*/ | This (optional) method is always run after grabbing the read lock. It is useful for cases where it is necessary to update some additional state | afterReadLock | {
"repo_name": "dubex/concourse",
"path": "concourse-server/src/main/java/com/cinchapi/concourse/server/concurrent/ReferenceCountingLock.java",
"license": "apache-2.0",
"size": 8094
} | [
"java.util.concurrent.locks.ReentrantReadWriteLock"
] | import java.util.concurrent.locks.ReentrantReadWriteLock; | import java.util.concurrent.locks.*; | [
"java.util"
] | java.util; | 289,479 |
public AbstractEntity<?> positionAlreadyUsed(AbstractEntity<?> entity, List<AbstractEntity<?>> entities)
{ AbstractEntity<?> result = null;
Iterator<AbstractEntity<?>> it = entities.iterator();
while(result==null && it.hasNext())
{ AbstractEntity<?> temp = it.next();
if(temp.overlapsWith(entity))
re... | AbstractEntity<?> function(AbstractEntity<?> entity, List<AbstractEntity<?>> entities) { AbstractEntity<?> result = null; Iterator<AbstractEntity<?>> it = entities.iterator(); while(result==null && it.hasNext()) { AbstractEntity<?> temp = it.next(); if(temp.overlapsWith(entity)) result = temp; } return result; } | /**
* Checks whether a part of the specified entity was already detected as another
* entity. Returns the concerned entity.
*
* @param entity
* Newly detected entity.
* @param entities
* List of entities already detected.
* @return
* Entity intersecting the specified one,
* or {@code null} ... | Checks whether a part of the specified entity was already detected as another entity. Returns the concerned entity | positionAlreadyUsed | {
"repo_name": "CompNet/Nerwip",
"path": "src/tr/edu/gsu/nerwip/recognition/AbstractRecognizer.java",
"license": "gpl-2.0",
"size": 17842
} | [
"java.util.Iterator",
"java.util.List",
"tr.edu.gsu.nerwip.data.entity.AbstractEntity"
] | import java.util.Iterator; import java.util.List; import tr.edu.gsu.nerwip.data.entity.AbstractEntity; | import java.util.*; import tr.edu.gsu.nerwip.data.entity.*; | [
"java.util",
"tr.edu.gsu"
] | java.util; tr.edu.gsu; | 789,286 |
public static ResultSet execute(Connection conn, Reader reader) throws SQLException {
Statement stat = conn.createStatement();
ResultSet rs = null;
ScriptReader r = new ScriptReader(reader);
while (true) {
String sql = r.readStatement();
if (sql == null) {
... | static ResultSet function(Connection conn, Reader reader) throws SQLException { Statement stat = conn.createStatement(); ResultSet rs = null; ScriptReader r = new ScriptReader(reader); while (true) { String sql = r.readStatement(); if (sql == null) { break; } if (sql.trim().length() == 0) { continue; } boolean resultSe... | /**
* Executes the SQL commands read from the reader against a database.
*
* @param conn the connection to a database
* @param reader the reader
* @return the last result set
*/ | Executes the SQL commands read from the reader against a database | execute | {
"repo_name": "ferquies/2dam",
"path": "AD/Tema 2/h2/src/main/org/h2/tools/RunScript.java",
"license": "gpl-3.0",
"size": 12597
} | [
"java.io.Reader",
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"org.h2.util.ScriptReader"
] | import java.io.Reader; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.h2.util.ScriptReader; | import java.io.*; import java.sql.*; import org.h2.util.*; | [
"java.io",
"java.sql",
"org.h2.util"
] | java.io; java.sql; org.h2.util; | 1,325,474 |
public Observable<ServiceResponse<Sku>> putAsyncNonResourceWithServiceResponseAsync(Sku sku) {
Validator.validate(sku);
Observable<Response<ResponseBody>> observable = service.putAsyncNonResource(sku, this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getP... | Observable<ServiceResponse<Sku>> function(Sku sku) { Validator.validate(sku); Observable<Response<ResponseBody>> observable = service.putAsyncNonResource(sku, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<Sku>() { }.getType()); ... | /**
* Long running put request with non resource.
*
* @param sku Sku to put
* @return the observable for the request
*/ | Long running put request with non resource | putAsyncNonResourceWithServiceResponseAsync | {
"repo_name": "tbombach/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/implementation/LROsImpl.java",
"license": "mit",
"size": 386519
} | [
"com.google.common.reflect.TypeToken",
"com.microsoft.rest.ServiceResponse",
"com.microsoft.rest.Validator"
] | import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; | import com.google.common.reflect.*; import com.microsoft.rest.*; | [
"com.google.common",
"com.microsoft.rest"
] | com.google.common; com.microsoft.rest; | 1,355,441 |
protected Point getSheetCenter() {
log.println("Trying to get AccessibleSpreadsheet");
AccessibilityTools at = new AccessibilityTools();
XComponent xSheetDoc = (XComponent) tEnv.getObjRelation("DOCUMENT");
XModel xModel = UnoRuntime.queryInterface(XModel.class, xSheetDoc);
S... | Point function() { log.println(STR); AccessibilityTools at = new AccessibilityTools(); XComponent xSheetDoc = (XComponent) tEnv.getObjRelation(STR); XModel xModel = UnoRuntime.queryInterface(XModel.class, xSheetDoc); System.out.println(STR + xModel.getCurrentController().getFrame().getName()); XWindow xWindow = Accessi... | /**
* Determine the current top window center and return this as a point.
* @return a point representing the sheet center.
*/ | Determine the current top window center and return this as a point | getSheetCenter | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/ifc/sheet/_XRangeSelection.java",
"license": "gpl-3.0",
"size": 14074
} | [
"com.sun.star.accessibility.AccessibleRole",
"com.sun.star.accessibility.XAccessible",
"com.sun.star.accessibility.XAccessibleComponent",
"com.sun.star.accessibility.XAccessibleContext",
"com.sun.star.awt.Point",
"com.sun.star.awt.Rectangle",
"com.sun.star.awt.XExtendedToolkit",
"com.sun.star.awt.XTop... | import com.sun.star.accessibility.AccessibleRole; import com.sun.star.accessibility.XAccessible; import com.sun.star.accessibility.XAccessibleComponent; import com.sun.star.accessibility.XAccessibleContext; import com.sun.star.awt.Point; import com.sun.star.awt.Rectangle; import com.sun.star.awt.XExtendedToolkit; impor... | import com.sun.star.accessibility.*; import com.sun.star.awt.*; import com.sun.star.frame.*; import com.sun.star.lang.*; import com.sun.star.uno.*; | [
"com.sun.star"
] | com.sun.star; | 682,451 |
protected RuntimeManager createRuntimeManager(Strategy strategy, Map<String, ResourceType> resources,
String identifier) {
if (manager != null) {
return manager;
}
RuntimeEnvironmentBuilder builder = null;
if (persistence) {
builder = RuntimeEnvir... | RuntimeManager function(Strategy strategy, Map<String, ResourceType> resources, String identifier) { if (manager != null) { return manager; } RuntimeEnvironmentBuilder builder = null; if (persistence) { builder = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder().entityManagerFactory(emf) .registerableItemsFac... | /**
* Creates default configuration of <code>RuntimeManager</code> with given
* <code>strategy</code> and all <code>resources</code> being added to
* knowledge base. <br/>
* There should be only one <code>RuntimeManager</code> created during
* single test.
*
* @param strategy
* ... | Creates default configuration of <code>RuntimeManager</code> with given <code>strategy</code> and all <code>resources</code> being added to knowledge base. There should be only one <code>RuntimeManager</code> created during single test | createRuntimeManager | {
"repo_name": "droolsjbpm/kie-benchmarks",
"path": "jbpm-benchmarks/jbpm-performance-tests/src/main/java/org/jbpm/test/performance/jbpm/JBPMController.java",
"license": "apache-2.0",
"size": 22287
} | [
"java.util.Map",
"org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory",
"org.kie.api.io.ResourceType",
"org.kie.api.runtime.manager.RuntimeEnvironmentBuilder",
"org.kie.api.runtime.manager.RuntimeManager"
] | import java.util.Map; import org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory; import org.kie.api.io.ResourceType; import org.kie.api.runtime.manager.RuntimeEnvironmentBuilder; import org.kie.api.runtime.manager.RuntimeManager; | import java.util.*; import org.jbpm.runtime.manager.impl.*; import org.kie.api.io.*; import org.kie.api.runtime.manager.*; | [
"java.util",
"org.jbpm.runtime",
"org.kie.api"
] | java.util; org.jbpm.runtime; org.kie.api; | 2,636,476 |
@SimpleProperty(description = "The language to use for textual directions.")
@DesignerProperty(defaultValue = "en")
public void Language(String language) {
this.language = language;
} | @SimpleProperty(description = STR) @DesignerProperty(defaultValue = "en") void function(String language) { this.language = language; } | /**
* The language to use for textual directions. Default is "en" for English.
*
* @param language the language to use for generating directions
*/ | The language to use for textual directions. Default is "en" for English | Language | {
"repo_name": "jisqyv/appinventor-sources",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/Navigation.java",
"license": "apache-2.0",
"size": 17237
} | [
"com.google.appinventor.components.annotations.DesignerProperty",
"com.google.appinventor.components.annotations.SimpleProperty"
] | import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.annotations.SimpleProperty; | import com.google.appinventor.components.annotations.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 1,833,416 |
private static String getThumbnailPath(String picturePath) {
if (!TextUtils.isEmpty(picturePath) && picturePath.endsWith(".jpg")) {
return picturePath.replace(".jpg", "_thumb.jpg");
}
return null;
} | static String function(String picturePath) { if (!TextUtils.isEmpty(picturePath) && picturePath.endsWith(".jpg")) { return picturePath.replace(".jpg", STR); } return null; } | /**
* Returns the thumbnail path of shot image.
*
* @param picturePath the image path
* @return the thumbnail image path.
*/ | Returns the thumbnail path of shot image | getThumbnailPath | {
"repo_name": "vector-im/riot-android",
"path": "vector/src/main/java/im/vector/activity/VectorMediaPickerActivity.java",
"license": "apache-2.0",
"size": 88384
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 555,559 |
private void readResourceBundle(ResourceBundle bundle, String bundleName)
throws MissingResourceException {
Enumeration keys = bundle.getKeys();
while (keys.hasMoreElements()) {
String key = (String) keys.nextElement();
int pos = key.lastIndexOf('.');
... | void function(ResourceBundle bundle, String bundleName) throws MissingResourceException { Enumeration keys = bundle.getKeys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); int pos = key.lastIndexOf('.'); if (pos == -1) { stringToFontData.put(key, new FontData[] { makeFontData(bundle .getSt... | /**
* Reads the resource bundle. This puts FontData[] objects
* in the mapping table. These will lazily be turned into
* real Font objects when requested.
*/ | Reads the resource bundle. This puts FontData[] objects in the mapping table. These will lazily be turned into real Font objects when requested | readResourceBundle | {
"repo_name": "neelance/jface4ruby",
"path": "jface4ruby/src/org/eclipse/jface/resource/FontRegistry.java",
"license": "epl-1.0",
"size": 29153
} | [
"java.util.Enumeration",
"java.util.MissingResourceException",
"java.util.ResourceBundle",
"org.eclipse.swt.graphics.FontData"
] | import java.util.Enumeration; import java.util.MissingResourceException; import java.util.ResourceBundle; import org.eclipse.swt.graphics.FontData; | import java.util.*; import org.eclipse.swt.graphics.*; | [
"java.util",
"org.eclipse.swt"
] | java.util; org.eclipse.swt; | 2,862,435 |
public void searchDone() throws Exception {
_stopFurtherResponseWrites = true;
AtomFeed atom = this.getAtomFeed();
atom.writeEnd(this.getPrintWriter());
} | void function() throws Exception { _stopFurtherResponseWrites = true; AtomFeed atom = this.getAtomFeed(); atom.writeEnd(this.getPrintWriter()); } | /**
* Search done.
*
* @throws Exception the exception
*/ | Search done | searchDone | {
"repo_name": "GeoinformationSystems/GeoprocessingAppstore",
"path": "src/com/esri/gpt/control/rest/search/DistributedAdpAtomSearchPageWriter.java",
"license": "apache-2.0",
"size": 9685
} | [
"com.esri.gpt.control.georss.AtomFeedWriter"
] | import com.esri.gpt.control.georss.AtomFeedWriter; | import com.esri.gpt.control.georss.*; | [
"com.esri.gpt"
] | com.esri.gpt; | 376,459 |
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
RenderHelper.disableStandardItemLighting();
this.drawCenteredString(this.fontRendererObj, I18n.format("tile.beacon.primary", new Object[0]), 62, 10, 14737632);
this.drawCenteredString(this.fontRendererObj, I18n.format("tile.beacon.seconda... | void function(int mouseX, int mouseY) { RenderHelper.disableStandardItemLighting(); this.drawCenteredString(this.fontRendererObj, I18n.format(STR, new Object[0]), 62, 10, 14737632); this.drawCenteredString(this.fontRendererObj, I18n.format(STR, new Object[0]), 169, 10, 14737632); Iterator var3 = this.buttonList.iterato... | /**
* Draw the foreground layer for the GuiContainer (everything in front of
* the items). Args : mouseX, mouseY
*/ | Draw the foreground layer for the GuiContainer (everything in front of the items). Args : mouseX, mouseY | drawGuiContainerForegroundLayer | {
"repo_name": "KubaKaszycki/FreeCraft",
"path": "src/main/java/kk/freecraft/client/gui/inventory/GuiBeacon.java",
"license": "gpl-3.0",
"size": 9672
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 94,556 |
private boolean isExistingName(String teamName) {
boolean exist = false;
for (Team team : mGameManager.getGame().getTeamList()) {
if (teamName.equalsIgnoreCase((team.getName()))) {
exist = true;
break;
}
}
return exist;
} | boolean function(String teamName) { boolean exist = false; for (Team team : mGameManager.getGame().getTeamList()) { if (teamName.equalsIgnoreCase((team.getName()))) { exist = true; break; } } return exist; } | /**
* Check that no other team has the same name.
*
* @param teamName
* @return
*/ | Check that no other team has the same name | isExistingName | {
"repo_name": "florent-morel/spacedown",
"path": "spacedown/src/org/spacedown/activity/create/AddTeamActivity.java",
"license": "gpl-3.0",
"size": 2768
} | [
"org.spacedown.engine.game.Team"
] | import org.spacedown.engine.game.Team; | import org.spacedown.engine.game.*; | [
"org.spacedown.engine"
] | org.spacedown.engine; | 1,571,365 |
@Override
public void setServicesConfigurationAltUrlMapping() throws IOException, URISyntaxException, ConfigurationException {
if (getModelFolderPath() != null) {
String servicesConfigurationActual = getModelFolderPath().getAbsolutePath() + File.separator + ServicesConfigurationConcepts_FN;
addMapping(getSa... | void function() throws IOException, URISyntaxException, ConfigurationException { if (getModelFolderPath() != null) { String servicesConfigurationActual = getModelFolderPath().getAbsolutePath() + File.separator + ServicesConfigurationConcepts_FN; addMapping(getSadlUtils().fileNameToFileUrl(servicesConfigurationActual), ... | /**
* Call this method to set the mapping for the "SadServicesConfigurationConcepts.owl" model. This should be called if a default is added
* to a model to make sure that the definition of default value concepts is available as an import model.
*
* @throws IOException
* @throws URISyntaxException
* @throws... | Call this method to set the mapping for the "SadServicesConfigurationConcepts.owl" model. This should be called if a default is added to a model to make sure that the definition of default value concepts is available as an import model | setServicesConfigurationAltUrlMapping | {
"repo_name": "crapo/sadlos2",
"path": "sadl3/com.ge.research.sadl.parent/com.ge.research.sadl/src/com/ge/research/sadl/builder/ConfigurationManagerForIDE.java",
"license": "epl-1.0",
"size": 46940
} | [
"com.ge.research.sadl.reasoner.ConfigurationException",
"com.ge.research.sadl.utils.ResourceManager",
"java.io.File",
"java.io.IOException",
"java.net.URISyntaxException"
] | import com.ge.research.sadl.reasoner.ConfigurationException; import com.ge.research.sadl.utils.ResourceManager; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; | import com.ge.research.sadl.reasoner.*; import com.ge.research.sadl.utils.*; import java.io.*; import java.net.*; | [
"com.ge.research",
"java.io",
"java.net"
] | com.ge.research; java.io; java.net; | 578,205 |
public static void startSpan(ResponseWriter wr, String cssClass) throws IOException {
startSpan(wr, cssClass, null);
} | static void function(ResponseWriter wr, String cssClass) throws IOException { startSpan(wr, cssClass, null); } | /**
* start a span with the specified CSS classes
*
* @see #endSpan
* @param wr
* @param cssClass
*
* @throws IOException
*/ | start a span with the specified CSS classes | startSpan | {
"repo_name": "Heigvd/Wegas",
"path": "wegas-app/src/main/java/com/wegas/app/pdf/helper/UIHelper.java",
"license": "mit",
"size": 20637
} | [
"java.io.IOException",
"javax.faces.context.ResponseWriter"
] | import java.io.IOException; import javax.faces.context.ResponseWriter; | import java.io.*; import javax.faces.context.*; | [
"java.io",
"javax.faces"
] | java.io; javax.faces; | 238,505 |
public static PropertyMatches forProperty(String propertyName, Class beanClass, int maxDistance) {
return new PropertyMatches(propertyName, beanClass, maxDistance);
}
//---------------------------------------------------------------------
// Instance section
//------------------------------------------------... | static PropertyMatches function(String propertyName, Class beanClass, int maxDistance) { return new PropertyMatches(propertyName, beanClass, maxDistance); } private final String propertyName; private String[] possibleMatches; private PropertyMatches(String propertyName, Class beanClass, int maxDistance) { this.property... | /**
* Create PropertyMatches for the given bean property.
* @param propertyName the name of the property to find possible matches for
* @param beanClass the bean class to search for matches
* @param maxDistance the maximum property distance allowed for matches
*/ | Create PropertyMatches for the given bean property | forProperty | {
"repo_name": "TinyGroup/tiny",
"path": "web/org.tinygroup.weblayer/src/main/java/org/tinygroup/weblayer/webcontext/parser/util/PropertyMatches.java",
"license": "gpl-3.0",
"size": 5735
} | [
"org.springframework.beans.BeanUtils"
] | import org.springframework.beans.BeanUtils; | import org.springframework.beans.*; | [
"org.springframework.beans"
] | org.springframework.beans; | 651,693 |
private List<Continuation> doUnroll(Logger logger, FnID function,
Block outerBlock, int unrollFactor) {
logger.debug("Unrolling range loop " + this.loopName
+ " " + desiredUnroll + " times ");
String vPrefix = Var.VALUEOF_VAR_PREFIX + loop... | List<Continuation> function(Logger logger, FnID function, Block outerBlock, int unrollFactor) { logger.debug(STR + this.loopName + " " + desiredUnroll + STR); String vPrefix = Var.VALUEOF_VAR_PREFIX + loopName; String bigStepName = outerBlock.uniqueVarName(vPrefix + STR); VarProvenance prov = VarProvenance.optimizerTmp... | /**
* Unroll a loop by splitting into two loops, one short one
* with original stride, and another with a long stride
*
* We transform:
* range_loop [start:end:step]
*
* =======>
*
* range_loop [start : unroll_end : big_step]
* range_loop [remainder_start : end : st... | Unroll a loop by splitting into two loops, one short one with original stride, and another with a long stride We transform: range_loop [start:end:step] =======> range_loop [start : unroll_end : big_step] range_loop [remainder_start : end : step] | doUnroll | {
"repo_name": "swift-lang/swift-t",
"path": "stc/code/src/exm/stc/ic/tree/ForeachLoops.java",
"license": "apache-2.0",
"size": 34563
} | [
"java.util.Arrays",
"java.util.Collections",
"java.util.List",
"org.apache.log4j.Logger"
] | import java.util.Arrays; import java.util.Collections; import java.util.List; import org.apache.log4j.Logger; | import java.util.*; import org.apache.log4j.*; | [
"java.util",
"org.apache.log4j"
] | java.util; org.apache.log4j; | 794,928 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.