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
private double findUpperBound(final UnivariateRealFunction f, final double a, final double h) throws FunctionEvaluationException, OptimizationException { final double yA = f.value(a); double yB = yA; for (double step = h; step < Double.MAX_VALUE; ste...
double function(final UnivariateRealFunction f, final double a, final double h) throws FunctionEvaluationException, OptimizationException { final double yA = f.value(a); double yB = yA; for (double step = h; step < Double.MAX_VALUE; step *= Math.max(2, yA / yB)) { final double b = a + step; yB = f.value(b); if (yA * yB...
/** * Find the upper bound b ensuring bracketing of a root between a and b * @param f function whose root must be bracketed * @param a lower bound of the interval * @param h initial step to try * @return b such that f(a) and f(b) have opposite signs * @exception FunctionEvaluationException...
Find the upper bound b ensuring bracketing of a root between a and b
findUpperBound
{ "repo_name": "justinwm/astor", "path": "examples/math_76/src/main/java/org/apache/commons/math/optimization/general/NonLinearConjugateGradientOptimizer.java", "license": "gpl-2.0", "size": 11066 }
[ "org.apache.commons.math.FunctionEvaluationException", "org.apache.commons.math.analysis.UnivariateRealFunction", "org.apache.commons.math.optimization.OptimizationException" ]
import org.apache.commons.math.FunctionEvaluationException; import org.apache.commons.math.analysis.UnivariateRealFunction; import org.apache.commons.math.optimization.OptimizationException;
import org.apache.commons.math.*; import org.apache.commons.math.analysis.*; import org.apache.commons.math.optimization.*;
[ "org.apache.commons" ]
org.apache.commons;
2,375,594
public void testStoredProcedureParameterAPI() { if (supportsStoredProcedures() && getPlatform().isMySQL()) { EntityManager em = createEntityManager(); try { StoredProcedureQuery query = em.createStoredProcedureQuery("Parameter_Testing"); query.registe...
void function() { if (supportsStoredProcedures() && getPlatform().isMySQL()) { EntityManager em = createEntityManager(); try { StoredProcedureQuery query = em.createStoredProcedureQuery(STR); query.registerStoredProcedureParameter(1, String.class, ParameterMode.IN); query.registerStoredProcedureParameter(2, Integer.cla...
/** * Test stored procedure parameter API. */
Test stored procedure parameter API
testStoredProcedureParameterAPI
{ "repo_name": "gameduell/eclipselink.runtime", "path": "jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa22/advanced/StoredProcedureQueryTestSuite.java", "license": "epl-1.0", "size": 52079 }
[ "javax.persistence.EntityManager", "javax.persistence.ParameterMode", "javax.persistence.StoredProcedureQuery" ]
import javax.persistence.EntityManager; import javax.persistence.ParameterMode; import javax.persistence.StoredProcedureQuery;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
2,427,629
public interface OnCheckedChangeListener { public void onCheckedChanged(StepikRadioGroup group, @IdRes int checkedId); }
interface OnCheckedChangeListener { public void function(StepikRadioGroup group, @IdRes int checkedId); }
/** * <p>Called when the checked radio button has changed. When the * selection is cleared, checkedId is -1.</p> * * @param group the group in which the checked radio button has changed * @param checkedId the unique identifier of the newly checked radio button *...
Called when the checked radio button has changed. When the selection is cleared, checkedId is -1
onCheckedChanged
{ "repo_name": "StepicOrg/stepik-android", "path": "app/src/main/java/org/stepic/droid/ui/custom/StepikRadioGroup.java", "license": "apache-2.0", "size": 11024 }
[ "androidx.annotation.IdRes" ]
import androidx.annotation.IdRes;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
2,875,152
public static void addSeparator(int span, Composite parent) { Label empty = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR); GridData lgd = new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL); lgd.horizontalSpan = span; empty.setLayoutData(lgd); }
static void function(int span, Composite parent) { Label empty = new Label(parent, SWT.HORIZONTAL SWT.SEPARATOR); GridData lgd = new GridData(GridData.FILL_HORIZONTAL GridData.GRAB_HORIZONTAL); lgd.horizontalSpan = span; empty.setLayoutData(lgd); }
/** * Add a horizontal line to the page. * @param span number of horizontal columns to span * @param parent parent container */
Add a horizontal line to the page
addSeparator
{ "repo_name": "kolovos/texlipse", "path": "net.sourceforge.texlipse/src/net/sourceforge/texlipse/properties/TexlipsePreferencePage.java", "license": "epl-1.0", "size": 5513 }
[ "org.eclipse.swt.layout.GridData", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Label" ]
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
686,892
public void newFolder(String name) { database.openTransaction("", DBSituation.LOCAL_DATABASE); File newFile = new File(name); GhostFolderDob dob = new GhostFolderDob(null, newFile.getName(), root); database.createElement(dob); // insert in DB and Treeview root.addFolder((GhostFolderDob) database.createEl...
void function(String name) { database.openTransaction(STR", Messages.getIdSize(), DBSituation.LOCAL_DATABASE); }
/** * Insert new Folder * * @param name */
Insert new Folder
newFolder
{ "repo_name": "dev131/DropTillLate_Application", "path": "ch.droptilllate.application/src/ch/droptilllate/application/controller/ViewController.java", "license": "epl-1.0", "size": 21826 }
[ "ch.droptilllate.application.properties.Messages", "ch.droptilllate.database.api.DBSituation" ]
import ch.droptilllate.application.properties.Messages; import ch.droptilllate.database.api.DBSituation;
import ch.droptilllate.application.properties.*; import ch.droptilllate.database.api.*;
[ "ch.droptilllate.application", "ch.droptilllate.database" ]
ch.droptilllate.application; ch.droptilllate.database;
868,033
protected void setDeadForever(Map<String, Object> options) { switch (liveness) { case LIVENESS_DEAD_FOREVER: return; case LIVENESS_DEAD: this.liveness = LIVENESS_DEAD_FOREVER; if (logger.level <= Logger.FINE) logger.log("Found address " + address + " to be dead fo...
void function(Map<String, Object> options) { switch (liveness) { case LIVENESS_DEAD_FOREVER: return; case LIVENESS_DEAD: this.liveness = LIVENESS_DEAD_FOREVER; if (logger.level <= Logger.FINE) logger.log(STR + address + STR); break; default: this.best = null; this.liveness = LIVENESS_DEAD_FOREVER; notifyLivenessListene...
/** * Internal method which marks this address as being dead. If we were alive or suspected before, it * sends an update out to the observers. */
Internal method which marks this address as being dead. If we were alive or suspected before, it sends an update out to the observers
setDeadForever
{ "repo_name": "barnyard/pi", "path": "freepastry/src/org/mpisws/p2p/transport/sourceroute/manager/SourceRouteManagerImpl.java", "license": "apache-2.0", "size": 43670 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,619,971
public int getMonth() { DateTimeService dateTimeService = SpringContext.getBean(DateTimeService.class); Calendar cal = dateTimeService.getCalendar(new Date(this.universityFiscalPeriodEndDate.getTime())); return cal.get(Calendar.MONTH) + 1; }
int function() { DateTimeService dateTimeService = SpringContext.getBean(DateTimeService.class); Calendar cal = dateTimeService.getCalendar(new Date(this.universityFiscalPeriodEndDate.getTime())); return cal.get(Calendar.MONTH) + 1; }
/** * This method returns the month that this period represents * * @return the actual month (1 - 12) that this period represents */
This method returns the month that this period represents
getMonth
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/coa/businessobject/AccountingPeriod.java", "license": "agpl-3.0", "size": 8122 }
[ "java.sql.Date", "java.util.Calendar", "org.kuali.kfs.sys.context.SpringContext", "org.kuali.rice.core.api.datetime.DateTimeService" ]
import java.sql.Date; import java.util.Calendar; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.core.api.datetime.DateTimeService;
import java.sql.*; import java.util.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.core.api.datetime.*;
[ "java.sql", "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.sql; java.util; org.kuali.kfs; org.kuali.rice;
1,204,731
@Override public void combine(Iterator<Record> values, Collector<Record> out) { reduce(values, out); } }
void function(Iterator<Record> values, Collector<Record> out) { reduce(values, out); } }
/** * Creates partial sums on the price attribute for each data batch. */
Creates partial sums on the price attribute for each data batch
combine
{ "repo_name": "citlab/vs.msc.ws14", "path": "flink-0-7-custom/flink-tests/src/test/java/org/apache/flink/test/recordJobs/relational/TPCHQuery3.java", "license": "apache-2.0", "size": 9280 }
[ "java.util.Iterator", "org.apache.flink.types.Record", "org.apache.flink.util.Collector" ]
import java.util.Iterator; import org.apache.flink.types.Record; import org.apache.flink.util.Collector;
import java.util.*; import org.apache.flink.types.*; import org.apache.flink.util.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,860,639
protected ViewTable viewTable(CalcitePrepare.AnalyzeViewResult parsed, String viewSql, List<String> schemaPath, List<String> viewPath) { final JavaTypeFactory typeFactory = (JavaTypeFactory) parsed.typeFactory; final Type elementType = typeFactory.getJavaClass(parsed.rowType); return new ViewTable(e...
ViewTable function(CalcitePrepare.AnalyzeViewResult parsed, String viewSql, List<String> schemaPath, List<String> viewPath) { final JavaTypeFactory typeFactory = (JavaTypeFactory) parsed.typeFactory; final Type elementType = typeFactory.getJavaClass(parsed.rowType); return new ViewTable(elementType, RelDataTypeImpl.pro...
/** Allows a sub-class to return an extension of {@link ViewTable} by * overriding this method. */
Allows a sub-class to return an extension of <code>ViewTable</code> by
viewTable
{ "repo_name": "googleinterns/calcite", "path": "core/src/main/java/org/apache/calcite/schema/impl/ViewTableMacro.java", "license": "apache-2.0", "size": 4690 }
[ "java.lang.reflect.Type", "java.util.List", "org.apache.calcite.adapter.java.JavaTypeFactory", "org.apache.calcite.jdbc.CalcitePrepare", "org.apache.calcite.rel.type.RelDataTypeImpl" ]
import java.lang.reflect.Type; import java.util.List; import org.apache.calcite.adapter.java.JavaTypeFactory; import org.apache.calcite.jdbc.CalcitePrepare; import org.apache.calcite.rel.type.RelDataTypeImpl;
import java.lang.reflect.*; import java.util.*; import org.apache.calcite.adapter.java.*; import org.apache.calcite.jdbc.*; import org.apache.calcite.rel.type.*;
[ "java.lang", "java.util", "org.apache.calcite" ]
java.lang; java.util; org.apache.calcite;
1,891,236
private boolean validTemplates(ProtocolCorrespondenceTypeBase protocolCorrespondenceType, int typeIndex) throws IOException { boolean isValid = true; ProtocolCorrespondenceTemplateBase defaultTemplate = protocolCorrespondenceType.getDefaultProtocolCorrespondenceTemplate(); if (defau...
boolean function(ProtocolCorrespondenceTypeBase protocolCorrespondenceType, int typeIndex) throws IOException { boolean isValid = true; ProtocolCorrespondenceTemplateBase defaultTemplate = protocolCorrespondenceType.getDefaultProtocolCorrespondenceTemplate(); if (defaultTemplate != null) { if ((defaultTemplate.getCorre...
/** * * This method checks that template data of all templates are valid * @param protocolCorrespondenceTemplates * @param typeIndex * @return true if all files are valid of the templates, false otherwise * @throws IOException */
This method checks that template data of all templates are valid
validTemplates
{ "repo_name": "blackcathacker/kc.preclean", "path": "coeus-code/src/main/java/org/kuali/kra/protocol/correspondence/ProtocolCorrespondenceTemplateRule.java", "license": "apache-2.0", "size": 13313 }
[ "java.io.IOException", "java.util.List", "org.apache.commons.lang3.StringUtils", "org.kuali.kra.infrastructure.KeyConstants", "org.kuali.rice.krad.util.GlobalVariables" ]
import java.io.IOException; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.kuali.kra.infrastructure.KeyConstants; import org.kuali.rice.krad.util.GlobalVariables;
import java.io.*; import java.util.*; import org.apache.commons.lang3.*; import org.kuali.kra.infrastructure.*; import org.kuali.rice.krad.util.*;
[ "java.io", "java.util", "org.apache.commons", "org.kuali.kra", "org.kuali.rice" ]
java.io; java.util; org.apache.commons; org.kuali.kra; org.kuali.rice;
1,361,451
protected void removeExpandDirectory(Path path) { String prefix = path.getPath(); if (! prefix.endsWith("/")) prefix = prefix + "/"; removeExpandDirectory(path, prefix); }
void function(Path path) { String prefix = path.getPath(); if (! prefix.endsWith("/")) prefix = prefix + "/"; removeExpandDirectory(path, prefix); }
/** * Recursively remove all files in a directory. Used for wars when * they change. * * @param path root directory to start removal */
Recursively remove all files in a directory. Used for wars when they change
removeExpandDirectory
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/env/deploy/ExpandDeployController.java", "license": "gpl-2.0", "size": 18944 }
[ "com.caucho.vfs.Path" ]
import com.caucho.vfs.Path;
import com.caucho.vfs.*;
[ "com.caucho.vfs" ]
com.caucho.vfs;
511,567
public AuthInitiateMessageV4 createAuthInitiateV4(final ECKey key) { final AuthInitiateMessageV4 message = new AuthInitiateMessageV4(); final BigInteger secretScalar = key.keyAgreement(remotePublicKey); final byte[] token = ByteUtil.bigIntegerToBytes(secretScalar, NONCE_SIZE); fina...
AuthInitiateMessageV4 function(final ECKey key) { final AuthInitiateMessageV4 message = new AuthInitiateMessageV4(); final BigInteger secretScalar = key.keyAgreement(remotePublicKey); final byte[] token = ByteUtil.bigIntegerToBytes(secretScalar, NONCE_SIZE); final byte[] nonce = initiatorNonce; final byte[] signed = xo...
/** * Create a handshake auth message defined by EIP-8 * * @param key our private key */
Create a handshake auth message defined by EIP-8
createAuthInitiateV4
{ "repo_name": "loxal/FreeEthereum", "path": "free-ethereum-core/src/main/java/org/ethereum/net/rlpx/EncryptionHandshake.java", "license": "mit", "size": 15356 }
[ "java.math.BigInteger", "org.ethereum.crypto.ECKey", "org.ethereum.util.ByteUtil" ]
import java.math.BigInteger; import org.ethereum.crypto.ECKey; import org.ethereum.util.ByteUtil;
import java.math.*; import org.ethereum.crypto.*; import org.ethereum.util.*;
[ "java.math", "org.ethereum.crypto", "org.ethereum.util" ]
java.math; org.ethereum.crypto; org.ethereum.util;
2,505,863
@Test public void testSetLastDdPacket() throws Exception { ospfNbr.setLastDdPacket(new DdPacket()); assertThat(ospfNbr.lastDdPacket(), is(notNullValue())); }
void function() throws Exception { ospfNbr.setLastDdPacket(new DdPacket()); assertThat(ospfNbr.lastDdPacket(), is(notNullValue())); }
/** * Tests lastDdPacket() setter method. */
Tests lastDdPacket() setter method
testSetLastDdPacket
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfNbrImplTest.java", "license": "apache-2.0", "size": 27328 }
[ "org.hamcrest.CoreMatchers", "org.hamcrest.MatcherAssert", "org.onosproject.ospf.protocol.ospfpacket.types.DdPacket" ]
import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.onosproject.ospf.protocol.ospfpacket.types.DdPacket;
import org.hamcrest.*; import org.onosproject.ospf.protocol.ospfpacket.types.*;
[ "org.hamcrest", "org.onosproject.ospf" ]
org.hamcrest; org.onosproject.ospf;
863,297
@Deprecated public DFSInputStream open(String src, int buffersize, boolean verifyChecksum, FileSystem.Statistics stats) throws IOException, UnresolvedLinkException { return open(src, buffersize, verifyChecksum); }
DFSInputStream function(String src, int buffersize, boolean verifyChecksum, FileSystem.Statistics stats) throws IOException, UnresolvedLinkException { return open(src, buffersize, verifyChecksum); }
/** * Create an input stream that obtains a nodelist from the * namenode, and then reads from all the right places. Creates * inner subclass of InputStream that does the right out-of-band * work. * @deprecated Use {@link #open(String, int, boolean)} instead. */
Create an input stream that obtains a nodelist from the namenode, and then reads from all the right places. Creates inner subclass of InputStream that does the right out-of-band work
open
{ "repo_name": "adouang/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java", "license": "apache-2.0", "size": 114163 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.UnresolvedLinkException" ]
import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.UnresolvedLinkException;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,075,710
static int capacity(int expectedSize) { if (expectedSize < 3) { checkNonnegative(expectedSize, "expectedSize"); return expectedSize + 1; } if (expectedSize < Ints.MAX_POWER_OF_TWO) { // This is the calculation used in JDK8 to resize when a putAll // happens; it seems to be the most...
static int capacity(int expectedSize) { if (expectedSize < 3) { checkNonnegative(expectedSize, STR); return expectedSize + 1; } if (expectedSize < Ints.MAX_POWER_OF_TWO) { return (int) ((float) expectedSize / 0.75F + 1.0F); } return Integer.MAX_VALUE; } /** * Creates a <i>mutable</i> {@code HashMap} instance with the s...
/** * Returns a capacity that is sufficient to keep the map from being resized as * long as it grows no larger than expectedSize and the load factor is >= its * default (0.75). */
Returns a capacity that is sufficient to keep the map from being resized as long as it grows no larger than expectedSize and the load factor is >= its default (0.75)
capacity
{ "repo_name": "dmi3aleks/guava", "path": "guava/src/com/google/common/collect/Maps.java", "license": "apache-2.0", "size": 137471 }
[ "com.google.common.collect.CollectPreconditions", "com.google.common.primitives.Ints", "java.util.HashMap", "java.util.Map" ]
import com.google.common.collect.CollectPreconditions; import com.google.common.primitives.Ints; import java.util.HashMap; import java.util.Map;
import com.google.common.collect.*; import com.google.common.primitives.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,126,931
public IgniteMessaging message(ClusterGroup grp);
IgniteMessaging function(ClusterGroup grp);
/** * Gets {@code messaging} facade over nodes within the cluster group. All operations * on the returned {@link IgniteMessaging} instance will only include nodes from * the specified cluster group. * * @param grp Cluster group. * @return Messaging instance over given cluster group. ...
Gets messaging facade over nodes within the cluster group. All operations on the returned <code>IgniteMessaging</code> instance will only include nodes from the specified cluster group
message
{ "repo_name": "shurun19851206/ignite", "path": "modules/core/src/main/java/org/apache/ignite/Ignite.java", "license": "apache-2.0", "size": 20470 }
[ "org.apache.ignite.cluster.ClusterGroup" ]
import org.apache.ignite.cluster.ClusterGroup;
import org.apache.ignite.cluster.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,758,309
public Optional<T> query () { this.log.trace ("query:"); Preconditions.checkState (this.selector.getCardinality () != Selector.Cardinality.MULTIPLE, "Selector must be unique"); List<T> elements = this.queryAll (); T result = null; if (elements.size () > 1) { throw new IllegalStateException ("...
Optional<T> function () { this.log.trace (STR); Preconditions.checkState (this.selector.getCardinality () != Selector.Cardinality.MULTIPLE, STR); List<T> elements = this.queryAll (); T result = null; if (elements.size () > 1) { throw new IllegalStateException (STR); } if (! elements.isEmpty ()) { result = elements.get ...
/** * Fetch the <code>Element</code> instance from the <code>DataStore</code> * which matches the properties set on the <code>Query</code>. Values must * be specified for all of the properties for the <code>Query</code>. * * @return The <code>Element</code> instance which * ...
Fetch the <code>Element</code> instance from the <code>DataStore</code> which matches the properties set on the <code>Query</code>. Values must be specified for all of the properties for the <code>Query</code>
query
{ "repo_name": "jestark/LMSDataHarvester", "path": "src/main/java/ca/uoguelph/socs/icc/edm/domain/datastore/memory/MemQuery.java", "license": "gpl-3.0", "size": 9618 }
[ "ca.uoguelph.socs.icc.edm.domain.metadata.Selector", "com.google.common.base.Preconditions", "java.util.List", "java.util.Optional" ]
import ca.uoguelph.socs.icc.edm.domain.metadata.Selector; import com.google.common.base.Preconditions; import java.util.List; import java.util.Optional;
import ca.uoguelph.socs.icc.edm.domain.metadata.*; import com.google.common.base.*; import java.util.*;
[ "ca.uoguelph.socs", "com.google.common", "java.util" ]
ca.uoguelph.socs; com.google.common; java.util;
1,095,904
public static OnlabPackage init() { if (isInited) return (OnlabPackage)EPackage.Registry.INSTANCE.getEPackage(OnlabPackage.eNS_URI); // Obtain or create and register package OnlabPackageImpl theOnlabPackage = (OnlabPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof OnlabPackageImpl ? EPackage.Reg...
static OnlabPackage function() { if (isInited) return (OnlabPackage)EPackage.Registry.INSTANCE.getEPackage(OnlabPackage.eNS_URI); OnlabPackageImpl theOnlabPackage = (OnlabPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof OnlabPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new OnlabPackageImpl());...
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link OnlabPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to o...
Creates, registers, and initializes the Package for this model, and for any others upon which it depends. This method is used to initialize <code>OnlabPackage#eINSTANCE</code> when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
init
{ "repo_name": "FTSRG/viatra-dse-swarm", "path": "plugins/hu.bme.mit.passtheriver.model/src/onlab/impl/OnlabPackageImpl.java", "license": "epl-1.0", "size": 16598 }
[ "org.eclipse.emf.ecore.EPackage" ]
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,569,331
ResourceDto findByUid(String userLogin);
ResourceDto findByUid(String userLogin);
/** * Returns a resource from an LDAP UID. * * @param userLogin * The user LDAP login. * * @return A instance of {@link ResourceDto}. */
Returns a resource from an LDAP UID
findByUid
{ "repo_name": "softdays/mandy", "path": "mandy-service/src/main/java/org/softdays/mandy/service/ResourceService.java", "license": "agpl-3.0", "size": 2298 }
[ "org.softdays.mandy.dto.ResourceDto" ]
import org.softdays.mandy.dto.ResourceDto;
import org.softdays.mandy.dto.*;
[ "org.softdays.mandy" ]
org.softdays.mandy;
1,390,410
EReference getTupleTypeAttribute_TupleType();
EReference getTupleTypeAttribute_TupleType();
/** * Returns the meta object for the container reference '{@link anatlyzer.atlext.OCL.TupleTypeAttribute#getTupleType <em>Tuple Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the container reference '<em>Tuple Type</em>'. * @see anatlyzer.atlext.OCL.TupleTypeAttr...
Returns the meta object for the container reference '<code>anatlyzer.atlext.OCL.TupleTypeAttribute#getTupleType Tuple Type</code>'.
getTupleTypeAttribute_TupleType
{ "repo_name": "jesusc/anatlyzer", "path": "plugins/anatlyzer.atl.typing/src-gen/anatlyzer/atlext/OCL/OCLPackage.java", "license": "epl-1.0", "size": 484377 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,621,639
public static CodedOutputStream newInstance(OutputStream output) { return newInstance(output, DEFAULT_BUFFER_SIZE); }
static CodedOutputStream function(OutputStream output) { return newInstance(output, DEFAULT_BUFFER_SIZE); }
/** * Create a new {@code CodedOutputStream} wrapping the given * {@code OutputStream}. */
Create a new CodedOutputStream wrapping the given OutputStream
newInstance
{ "repo_name": "vleo/vleo-notebook", "path": "protobuf/trunk/protobuf/java/src/main/java/com/google/protobuf/CodedOutputStream.java", "license": "gpl-3.0", "size": 28767 }
[ "java.io.OutputStream" ]
import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,044,027
public void notifyAllSizesObtained(Job job);
void function(Job job);
/** * Notifies that all the pieces of data related to a job have been * profiled. * * @param job Job whose data has been profiled */
Notifies that all the pieces of data related to a job have been profiled
notifyAllSizesObtained
{ "repo_name": "flordan/final", "path": "code/runtime/commons/src/main/java/es/bsc/mobile/data/DataManager.java", "license": "apache-2.0", "size": 21474 }
[ "es.bsc.mobile.types.Job" ]
import es.bsc.mobile.types.Job;
import es.bsc.mobile.types.*;
[ "es.bsc.mobile" ]
es.bsc.mobile;
1,768,248
public BusinessDayConventionBean getBusinessDayConvention() { return _businessDayConvention; }
BusinessDayConventionBean function() { return _businessDayConvention; }
/** * Gets the businessDayConvention. * @return the businessDayConvention */
Gets the businessDayConvention
getBusinessDayConvention
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-MasterDB/src/main/java/com/opengamma/masterdb/security/hibernate/swap/SwapLegBean.java", "license": "apache-2.0", "size": 9525 }
[ "com.opengamma.masterdb.security.hibernate.BusinessDayConventionBean" ]
import com.opengamma.masterdb.security.hibernate.BusinessDayConventionBean;
import com.opengamma.masterdb.security.hibernate.*;
[ "com.opengamma.masterdb" ]
com.opengamma.masterdb;
130,251
@Deprecated public List<AdminEmailAttributes> getAllAdminEmails() { return makeAttributes(getAdminEmailEntities()); }
List<AdminEmailAttributes> function() { return makeAttributes(getAdminEmailEntities()); }
/** * This method is not scalable. Not to be used unless for admin features. * @return the list of all adminEmails in the database. */
This method is not scalable. Not to be used unless for admin features
getAllAdminEmails
{ "repo_name": "Mynk96/teammates", "path": "src/main/java/teammates/storage/api/AdminEmailsDb.java", "license": "gpl-2.0", "size": 8924 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
323,694
public void addStateChangeListener(StateChangeListener<TaskState> stateChangeListener) { taskState.addStateChangeListener(stateChangeListener); }
void function(StateChangeListener<TaskState> stateChangeListener) { taskState.addStateChangeListener(stateChangeListener); }
/** * Listener is always notified asynchronously using a dedicated notification thread pool so, care should * be taken to avoid leaking {@code this} when adding a listener in a constructor. Additionally, it is * possible notifications are observed out of order due to the asynchronous execution. */
Listener is always notified asynchronously using a dedicated notification thread pool so, care should be taken to avoid leaking this when adding a listener in a constructor. Additionally, it is possible notifications are observed out of order due to the asynchronous execution
addStateChangeListener
{ "repo_name": "electrum/presto", "path": "core/trino-main/src/main/java/io/trino/execution/TaskStateMachine.java", "license": "apache-2.0", "size": 4406 }
[ "io.trino.execution.StateMachine" ]
import io.trino.execution.StateMachine;
import io.trino.execution.*;
[ "io.trino.execution" ]
io.trino.execution;
2,242,181
public static MozuClient<List<com.mozu.api.contracts.productadmin.ProductExtra>> getExtrasClient(com.mozu.api.DataViewMode dataViewMode, String productCode) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.products.ProductExtraUrl.getExtrasUrl(productCode); String verb = "GET"; Cl...
static MozuClient<List<com.mozu.api.contracts.productadmin.ProductExtra>> function(com.mozu.api.DataViewMode dataViewMode, String productCode) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.products.ProductExtraUrl.getExtrasUrl(productCode); String verb = "GET"; Class<?> clz = new ArrayList<c...
/** * Retrieves a list of extras configured for the product according to any defined filter and sort criteria. * <p><pre><code> * MozuClient<List<com.mozu.api.contracts.productadmin.ProductExtra>> mozuClient=GetExtrasClient(dataViewMode, productCode); * client.setBaseAddress(url); * client.executeReques...
Retrieves a list of extras configured for the product according to any defined filter and sort criteria. <code><code> MozuClient> mozuClient=GetExtrasClient(dataViewMode, productCode); client.setBaseAddress(url); client.executeRequest(); ProductExtra productExtra = client.Result(); </code></code>
getExtrasClient
{ "repo_name": "johngatti/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/products/ProductExtraClient.java", "license": "mit", "size": 31216 }
[ "com.mozu.api.DataViewMode", "com.mozu.api.Headers", "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl", "java.util.ArrayList", "java.util.List" ]
import com.mozu.api.DataViewMode; import com.mozu.api.Headers; import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; import java.util.ArrayList; import java.util.List;
import com.mozu.api.*; import java.util.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
2,073,148
Observable<Snapshot> listSnapshotsAsync(final String resourceGroupName, final String name);
Observable<Snapshot> listSnapshotsAsync(final String resourceGroupName, final String name);
/** * Returns all Snapshots to the user. * Description for Returns all Snapshots to the user. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Website Name. * @throws IllegalArgumentException thrown if parameters fail the validation ...
Returns all Snapshots to the user. Description for Returns all Snapshots to the user
listSnapshotsAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/WebApps.java", "license": "mit", "size": 242740 }
[ "com.microsoft.azure.management.appservice.v2019_08_01.Snapshot" ]
import com.microsoft.azure.management.appservice.v2019_08_01.Snapshot;
import com.microsoft.azure.management.appservice.v2019_08_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
665,474
return TransportUtils.makeUrl(urls.getUrlRoot(), partialUrl); }
return TransportUtils.makeUrl(urls.getUrlRoot(), partialUrl); }
/** * Given a partial URL, use {@link TransportUtils#makeUrl(String, String)} to combine it with * the root URL and return the result. * @param partialUrl a partial URL * @return a full URL including the root URL */
Given a partial URL, use <code>TransportUtils#makeUrl(String, String)</code> to combine it with the root URL and return the result
makeFullUrl
{ "repo_name": "macieksmuga/compliance", "path": "cts-java/src/test/java/org/ga4gh/cts/api/endpoints/RawEndpointsIT.java", "license": "apache-2.0", "size": 3606 }
[ "org.ga4gh.ctk.transport.TransportUtils" ]
import org.ga4gh.ctk.transport.TransportUtils;
import org.ga4gh.ctk.transport.*;
[ "org.ga4gh.ctk" ]
org.ga4gh.ctk;
2,777,108
public double forwardVegaTheoretical(final ForexOptionVanilla option, final BlackForexSmileProviderInterface marketData) { ArgumentChecker.notNull(option, "option"); ArgumentChecker.notNull(marketData, "marketData"); final MulticurveProviderInterface multicurves = marketData.getMulticurveProvider(); f...
double function(final ForexOptionVanilla option, final BlackForexSmileProviderInterface marketData) { ArgumentChecker.notNull(option, STR); ArgumentChecker.notNull(marketData, STR); final MulticurveProviderInterface multicurves = marketData.getMulticurveProvider(); final double dfDomestic = multicurves.getDiscountFacto...
/** * Computes the forward vega (first derivative with respect to volatility). * * @param option * the Forex option, not null * @param marketData * the curve and smile data, not null * @return the forward vega */
Computes the forward vega (first derivative with respect to volatility)
forwardVegaTheoretical
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/forex/provider/ForexOptionVanillaBlackSmileMethod.java", "license": "apache-2.0", "size": 44308 }
[ "com.opengamma.analytics.financial.forex.derivative.ForexOptionVanilla", "com.opengamma.analytics.financial.model.volatility.BlackFormulaRepository", "com.opengamma.analytics.financial.provider.description.forex.BlackForexSmileProviderInterface", "com.opengamma.analytics.financial.provider.description.interes...
import com.opengamma.analytics.financial.forex.derivative.ForexOptionVanilla; import com.opengamma.analytics.financial.model.volatility.BlackFormulaRepository; import com.opengamma.analytics.financial.provider.description.forex.BlackForexSmileProviderInterface; import com.opengamma.analytics.financial.provider.descript...
import com.opengamma.analytics.financial.forex.derivative.*; import com.opengamma.analytics.financial.model.volatility.*; import com.opengamma.analytics.financial.provider.description.forex.*; import com.opengamma.analytics.financial.provider.description.interestrate.*; import com.opengamma.util.*;
[ "com.opengamma.analytics", "com.opengamma.util" ]
com.opengamma.analytics; com.opengamma.util;
1,061,625
public synchronized void removeToggleDocumentListener(ToggleDocumentListener listener) { if (listeners == null) { return; } listeners.removeElement(listener); }
synchronized void function(ToggleDocumentListener listener) { if (listeners == null) { return; } listeners.removeElement(listener); }
/** * Remove a Toggle Document Listener from the listener list. * * @param listener The ToggleDocumentListener to be removed */
Remove a Toggle Document Listener from the listener list
removeToggleDocumentListener
{ "repo_name": "zenovalle/tn5250j", "path": "src/org/tn5250j/gui/ToggleDocument.java", "license": "gpl-2.0", "size": 3114 }
[ "org.tn5250j.event.ToggleDocumentListener" ]
import org.tn5250j.event.ToggleDocumentListener;
import org.tn5250j.event.*;
[ "org.tn5250j.event" ]
org.tn5250j.event;
297,030
public Factory setLoadErrorHandlingPolicy( @Nullable LoadErrorHandlingPolicy loadErrorHandlingPolicy) { this.loadErrorHandlingPolicy = loadErrorHandlingPolicy != null ? loadErrorHandlingPolicy : new DefaultLoadErrorHandlingPolicy(); return this; }
Factory function( @Nullable LoadErrorHandlingPolicy loadErrorHandlingPolicy) { this.loadErrorHandlingPolicy = loadErrorHandlingPolicy != null ? loadErrorHandlingPolicy : new DefaultLoadErrorHandlingPolicy(); return this; }
/** * Sets the {@link LoadErrorHandlingPolicy}. The default value is created by calling {@link * DefaultLoadErrorHandlingPolicy#DefaultLoadErrorHandlingPolicy()}. * * @param loadErrorHandlingPolicy A {@link LoadErrorHandlingPolicy}. * @return This factory, for convenience. */
Sets the <code>LoadErrorHandlingPolicy</code>. The default value is created by calling <code>DefaultLoadErrorHandlingPolicy#DefaultLoadErrorHandlingPolicy()</code>
setLoadErrorHandlingPolicy
{ "repo_name": "androidx/media", "path": "libraries/exoplayer_smoothstreaming/src/main/java/androidx/media3/exoplayer/smoothstreaming/SsMediaSource.java", "license": "apache-2.0", "size": 23672 }
[ "androidx.annotation.Nullable", "androidx.media3.exoplayer.upstream.DefaultLoadErrorHandlingPolicy", "androidx.media3.exoplayer.upstream.LoadErrorHandlingPolicy" ]
import androidx.annotation.Nullable; import androidx.media3.exoplayer.upstream.DefaultLoadErrorHandlingPolicy; import androidx.media3.exoplayer.upstream.LoadErrorHandlingPolicy;
import androidx.annotation.*; import androidx.media3.exoplayer.upstream.*;
[ "androidx.annotation", "androidx.media3" ]
androidx.annotation; androidx.media3;
176,502
private void addAllEdges(Shape3D shape, Transform3D trans, double z, Attributes att, ArrayList<LineSegment> edges[]) { GeometryArray g = (GeometryArray)shape.getGeometry(); Point3d p1 = new Point3d(); Point3d p2 = new Point3d(); Point3d p3 = new Point3d(); Point3d q1 = new...
void function(Shape3D shape, Transform3D trans, double z, Attributes att, ArrayList<LineSegment> edges[]) { GeometryArray g = (GeometryArray)shape.getGeometry(); Point3d p1 = new Point3d(); Point3d p2 = new Point3d(); Point3d p3 = new Point3d(); Point3d q1 = new Point3d(); Point3d q2 = new Point3d(); Point3d q3 = new P...
/** * Run through a Shape3D and set edges from it at plane z * Apply the transform first * @param shape * @param trans * @param z */
Run through a Shape3D and set edges from it at plane z Apply the transform first
addAllEdges
{ "repo_name": "reprappro/host", "path": "src/org/reprap/geometry/polyhedra/AllSTLsToBuild.java", "license": "lgpl-2.1", "size": 44341 }
[ "java.util.ArrayList", "javax.media.j3d.GeometryArray", "javax.media.j3d.Shape3D", "javax.media.j3d.Transform3D", "javax.vecmath.Point3d", "org.reprap.Attributes", "org.reprap.utilities.Debug" ]
import java.util.ArrayList; import javax.media.j3d.GeometryArray; import javax.media.j3d.Shape3D; import javax.media.j3d.Transform3D; import javax.vecmath.Point3d; import org.reprap.Attributes; import org.reprap.utilities.Debug;
import java.util.*; import javax.media.j3d.*; import javax.vecmath.*; import org.reprap.*; import org.reprap.utilities.*;
[ "java.util", "javax.media", "javax.vecmath", "org.reprap", "org.reprap.utilities" ]
java.util; javax.media; javax.vecmath; org.reprap; org.reprap.utilities;
252,804
public synchronized void release() { if (_in!=null) { try{_in.close();}catch(IOException e){LogSupport.ignore(log,e);} _in=null; } if (_connection!=null) _connection=null; }
synchronized void function() { if (_in!=null) { try{_in.close();}catch(IOException e){LogSupport.ignore(log,e);} _in=null; } if (_connection!=null) _connection=null; }
/** Release any resources held by the resource. */
Release any resources held by the resource
release
{ "repo_name": "Jimmy-Gao/browsermob-proxy", "path": "src/main/java/org/browsermob/proxy/jetty/util/URLResource.java", "license": "apache-2.0", "size": 7911 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,038,903
@Test public void testPostHideWorksheetColumns() { System.out.println("PostHideWorksheetColumns"); String name = "test_cells.xlsx"; String sheetName = "Sheet1"; Integer startColumn = 1; Integer totalColumns = 5; String storage = ""; String folder = ""; try { SaaSposeResponse result = cellsApi...
void function() { System.out.println(STR); String name = STR; String sheetName = STR; Integer startColumn = 1; Integer totalColumns = 5; String storage = STRSTRexp:" + apiException.getMessage()); assertNull(apiException); } }
/** * Test of PostHideWorksheetColumns method, of class CellsApi. */
Test of PostHideWorksheetColumns method, of class CellsApi
testPostHideWorksheetColumns
{ "repo_name": "aspose-cells/Aspose.Cells-for-Cloud", "path": "SDKs/Aspose.Cells-Cloud-SDK-for-Android/Aspose.Cells-Cloud-SDK-Android/src/test/java/com/aspose/cells/api/CellsApiTest.java", "license": "mit", "size": 91749 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
239,810
public int getNullWidth() { return nullFormat.length(); } private DateFormatter dateFormatter = null;
int function() { return nullFormat.length(); } private DateFormatter dateFormatter = null;
/** * Returns the number of characters required to display a NULL. * * @return the number of characters required to display a NULL. */
Returns the number of characters required to display a NULL
getNullWidth
{ "repo_name": "scgray/jsqsh", "path": "jsqsh-core/src/main/java/org/sqsh/DataFormatter.java", "license": "apache-2.0", "size": 14248 }
[ "org.sqsh.format.DateFormatter" ]
import org.sqsh.format.DateFormatter;
import org.sqsh.format.*;
[ "org.sqsh.format" ]
org.sqsh.format;
1,289,025
static <E> IntIndexedSetter<E> of( final List<E> list, final int offset, final int length) { return new IntIndexedGetterSetter<E>() {
static <E> IntIndexedSetter<E> of( final List<E> list, final int offset, final int length) { return new IntIndexedGetterSetter<E>() {
/** * Creates and returns a new instance wrapped around a slice of a list. * * @param list the list * @param offset the offset * @param length the number of elements * @param <E> the type of elements in the list * @return the new instance */
Creates and returns a new instance wrapped around a slice of a list
of
{ "repo_name": "tandauioan/toolboxj", "path": "src/main/java/org/ticdev/toolboxj/collections/IntIndexedGetterSetter.java", "license": "lgpl-3.0", "size": 3740 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,876,480
public static void spreadOutResourceFiles(File dir) { for (File file : dir.listFiles()) { if (file.isDirectory()) { spreadOutResourceFiles(file); } else { String hash = getSHA1(file); File saveTo = new File(App.settings.getObjectsAssets...
static void function(File dir) { for (File file : dir.listFiles()) { if (file.isDirectory()) { spreadOutResourceFiles(file); } else { String hash = getSHA1(file); File saveTo = new File(App.settings.getObjectsAssetsDir(), hash.substring(0, 2) + File.separator + hash); saveTo.mkdirs(); copyFile(file, saveTo, true); } } ...
/** * Spread out resource files. * * @param dir the dir */
Spread out resource files
spreadOutResourceFiles
{ "repo_name": "LexMinecraft/Launcher", "path": "src/main/java/com/atlauncher/utils/Utils.java", "license": "gpl-3.0", "size": 64695 }
[ "com.atlauncher.App", "java.io.File" ]
import com.atlauncher.App; import java.io.File;
import com.atlauncher.*; import java.io.*;
[ "com.atlauncher", "java.io" ]
com.atlauncher; java.io;
1,416,927
@Test public void testAddViewerAndChangeToEditor() throws Exception { // sandboxing a special repository for this test, want to use a controlled permission // layout Repository repository = new BaseMemoryRepository().getRepository(); org.sakaiproject.nakamura.api.lite.Session adminSession = reposito...
void function() throws Exception { Repository repository = new BaseMemoryRepository().getRepository(); org.sakaiproject.nakamura.api.lite.Session adminSession = repository .loginAdministrative(); Content content = new Content(STR, ImmutableMap.<String, Object> of("key", "value")); adminSession.getContentManager().updat...
/** * Verify that when you switch a user from a viewer to an editor (or manager), that they * will have sufficient access to read the the content. * * @throws Exception */
Verify that when you switch a user from a viewer to an editor (or manager), that they will have sufficient access to read the the content
testAddViewerAndChangeToEditor
{ "repo_name": "dylanswartz/nakamura", "path": "bundles/files/impl/src/test/java/org/sakaiproject/nakamura/files/pool/ManageMembersContentPoolServletTest.java", "license": "apache-2.0", "size": 21775 }
[ "com.google.common.collect.ImmutableMap", "java.util.HashMap", "javax.jcr.Session", "org.apache.sling.api.SlingHttpServletRequest", "org.apache.sling.api.resource.Resource", "org.junit.Assert", "org.mockito.Mockito", "org.sakaiproject.nakamura.api.lite.Repository", "org.sakaiproject.nakamura.api.lit...
import com.google.common.collect.ImmutableMap; import java.util.HashMap; import javax.jcr.Session; import org.apache.sling.api.SlingHttpServletRequest; import org.apache.sling.api.resource.Resource; import org.junit.Assert; import org.mockito.Mockito; import org.sakaiproject.nakamura.api.lite.Repository; import org.sak...
import com.google.common.collect.*; import java.util.*; import javax.jcr.*; import org.apache.sling.api.*; import org.apache.sling.api.resource.*; import org.junit.*; import org.mockito.*; import org.sakaiproject.nakamura.api.lite.*; import org.sakaiproject.nakamura.api.lite.accesscontrol.*; import org.sakaiproject.nak...
[ "com.google.common", "java.util", "javax.jcr", "org.apache.sling", "org.junit", "org.mockito", "org.sakaiproject.nakamura" ]
com.google.common; java.util; javax.jcr; org.apache.sling; org.junit; org.mockito; org.sakaiproject.nakamura;
1,340,377
public Point2D.Double findClickedCoordinate(double xLoc, double yLoc){ SuperTile tile = findClickedTile(xLoc, yLoc); return tile.getCoordinates(); }
Point2D.Double function(double xLoc, double yLoc){ SuperTile tile = findClickedTile(xLoc, yLoc); return tile.getCoordinates(); }
/** * Get the grid coordinate of the mouse click event * for x and y pixel locations * * @param xLoc - x pixel location * @param yLoc - y pixel location * @return Point2D containing the grid coordinations of the mouse click * as (col, row) or (x, y) */
Get the grid coordinate of the mouse click event for x and y pixel locations
findClickedCoordinate
{ "repo_name": "mzhu22/TurnBasedStrategy", "path": "src/authoring_environment/SuperGrid.java", "license": "mit", "size": 3903 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,913,298
void reload() throws IOException;
void reload() throws IOException;
/** * <p>reload</p> * <p>Reload the configuration file<p> * * @throws java.io.IOException if any. */
reload Reload the configuration file
reload
{ "repo_name": "aihua/opennms", "path": "opennms-config/src/main/java/org/opennms/netmgt/config/EnhancedLinkdConfig.java", "license": "agpl-3.0", "size": 3324 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
618,363
// Given final FiscalDate fiscalDate = FiscalYears.earlyFiscalYear(startDate).createFromCalendarDate(currentDate); // When final long calendarYear = fiscalDate.getCalendarYear(); // Then Assert.assertEquals(currentDate.getYear(), calendarYear); }
final FiscalDate fiscalDate = FiscalYears.earlyFiscalYear(startDate).createFromCalendarDate(currentDate); final long calendarYear = fiscalDate.getCalendarYear(); Assert.assertEquals(currentDate.getYear(), calendarYear); }
/** * Ensures that for any given date the correct calendar year will be returned in an early fiscal year. * * @param startDate * The start date of the fiscal year. * @param currentDate * The current date in a calendar year. */
Ensures that for any given date the correct calendar year will be returned in an early fiscal year
shouldReturnCalendarYearInEarlyFiscalYear
{ "repo_name": "sebhoss/fiscal-year", "path": "src/test/java/de/xn__ho_hia/utils/fiscal_year/FiscalDateGetCalendarYearTest.java", "license": "cc0-1.0", "size": 2785 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,599,292
public okhttp3.Call listNamespacedRoleBindingAsync( String namespace, String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Integer timeou...
okhttp3.Call function( String namespace, String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Integer timeoutSeconds, Boolean watch, final ApiCallback<V1RoleBindingList> _callback) throws ApiExceptio...
/** * (asynchronously) list or watch objects of kind RoleBinding * * @param namespace object name and auth scope, such as for teams and projects (required) * @param pretty If &#39;true&#39;, then the output is pretty printed. (optional) * @param allowWatchBookmarks allowWatchBookmarks requests watch even...
(asynchronously) list or watch objects of kind RoleBinding
listNamespacedRoleBindingAsync
{ "repo_name": "kubernetes-client/java", "path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationV1Api.java", "license": "apache-2.0", "size": 563123 }
[ "com.google.gson.reflect.TypeToken", "io.kubernetes.client.openapi.ApiCallback", "io.kubernetes.client.openapi.ApiException", "io.kubernetes.client.openapi.models.V1RoleBindingList", "java.lang.reflect.Type" ]
import com.google.gson.reflect.TypeToken; import io.kubernetes.client.openapi.ApiCallback; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.models.V1RoleBindingList; import java.lang.reflect.Type;
import com.google.gson.reflect.*; import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; import java.lang.reflect.*;
[ "com.google.gson", "io.kubernetes.client", "java.lang" ]
com.google.gson; io.kubernetes.client; java.lang;
2,509,483
public final Property<ZonedDateTime> startDate() { return metaBean().startDate().createProperty(this); }
final Property<ZonedDateTime> function() { return metaBean().startDate().createProperty(this); }
/** * Gets the the {@code startDate} property. * @return the property, not null */
Gets the the startDate property
startDate
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/security/capfloor/CapFloorCMSSpreadSecurity.java", "license": "apache-2.0", "size": 25415 }
[ "org.joda.beans.Property", "org.threeten.bp.ZonedDateTime" ]
import org.joda.beans.Property; import org.threeten.bp.ZonedDateTime;
import org.joda.beans.*; import org.threeten.bp.*;
[ "org.joda.beans", "org.threeten.bp" ]
org.joda.beans; org.threeten.bp;
185,288
static Property getProperty(IteratorScope scope) { requireNonNull(scope); switch (scope) { case scan: return Property.TABLE_ITERATOR_SCAN_PREFIX; case minc: return Property.TABLE_ITERATOR_MINC_PREFIX; case majc: return Property.TABLE_ITERATOR_MAJC_PREFIX; defaul...
static Property getProperty(IteratorScope scope) { requireNonNull(scope); switch (scope) { case scan: return Property.TABLE_ITERATOR_SCAN_PREFIX; case minc: return Property.TABLE_ITERATOR_MINC_PREFIX; case majc: return Property.TABLE_ITERATOR_MAJC_PREFIX; default: throw new IllegalStateException(STR); } }
/** * Fetch the correct configuration key prefix for the given scope. Throws an IllegalArgumentException if no property exists for the given scope. */
Fetch the correct configuration key prefix for the given scope. Throws an IllegalArgumentException if no property exists for the given scope
getProperty
{ "repo_name": "adamjshook/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java", "license": "apache-2.0", "size": 15314 }
[ "java.util.Objects", "org.apache.accumulo.core.conf.Property" ]
import java.util.Objects; import org.apache.accumulo.core.conf.Property;
import java.util.*; import org.apache.accumulo.core.conf.*;
[ "java.util", "org.apache.accumulo" ]
java.util; org.apache.accumulo;
2,076,596
public void testSetGetWantClientAuth() throws Exception { SSLSocket socket = createSSLSocket(); socket.setNeedClientAuth(true); socket.setWantClientAuth(false); assertFalse("Result does not correspond to expected", socket.getWantClientAuth()); assertFalse("So...
void function() throws Exception { SSLSocket socket = createSSLSocket(); socket.setNeedClientAuth(true); socket.setWantClientAuth(false); assertFalse(STR, socket.getWantClientAuth()); assertFalse(STR, socket.getNeedClientAuth()); socket.setNeedClientAuth(true); socket.setWantClientAuth(true); assertTrue(STR, socket.get...
/** * setWantClientAuth(boolean want) method testing. * getWantClientAuth() method testing. */
setWantClientAuth(boolean want) method testing. getWantClientAuth() method testing
testSetGetWantClientAuth
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLSocketImplTest.java", "license": "apache-2.0", "size": 38570 }
[ "javax.net.ssl.SSLSocket" ]
import javax.net.ssl.SSLSocket;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
1,671,854
@VisibleForTesting boolean isCheckInSafe(final ContentletRelationships relationships) { if (relationships != null && relationships.getRelationshipsRecords().size() > 0) { final boolean isClusterReadOnly = ElasticsearchUtil.isClusterInReadOnlyMode(); final boolean isEitherLiveOrW...
boolean isCheckInSafe(final ContentletRelationships relationships) { if (relationships != null && relationships.getRelationshipsRecords().size() > 0) { final boolean isClusterReadOnly = ElasticsearchUtil.isClusterInReadOnlyMode(); final boolean isEitherLiveOrWorkingIndicesReadOnly = ElasticsearchUtil.isEitherLiveOrWork...
/** * Method that verifies if a check in operation can be executed. * It is safe to execute a checkin if write operations can be performed on the ES cluster. * Otherwise, check in will be allowed only if the contentlet to be saved does not have legacy relationships * @param relationships ContentletR...
Method that verifies if a check in operation can be executed. It is safe to execute a checkin if write operations can be performed on the ES cluster. Otherwise, check in will be allowed only if the contentlet to be saved does not have legacy relationships
isCheckInSafe
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ESContentletAPIImpl.java", "license": "gpl-3.0", "size": 427219 }
[ "com.dotmarketing.portlets.structure.model.ContentletRelationships" ]
import com.dotmarketing.portlets.structure.model.ContentletRelationships;
import com.dotmarketing.portlets.structure.model.*;
[ "com.dotmarketing.portlets" ]
com.dotmarketing.portlets;
626,455
public void apply(List<CompilationUnit> astCompilationUnits, RuleContext ctx, Language language) { RuleChainVisitor visitor = getRuleChainVisitor(language); if (visitor != null) { visitor.visitAll(astCompilationUnits, ctx); } }
void function(List<CompilationUnit> astCompilationUnits, RuleContext ctx, Language language) { RuleChainVisitor visitor = getRuleChainVisitor(language); if (visitor != null) { visitor.visitAll(astCompilationUnits, ctx); } }
/** * Apply the RuleChain to the given ASTCompilationUnits using the given * RuleContext, for those rules using the given Language. * * @param astCompilationUnits * The ASTCompilationUnits. * @param ctx * The RuleContext. * @param language * ...
Apply the RuleChain to the given ASTCompilationUnits using the given RuleContext, for those rules using the given Language
apply
{ "repo_name": "bolav/pmd-src-4.2.6-perl", "path": "src/net/sourceforge/pmd/RuleChain.java", "license": "bsd-3-clause", "size": 3028 }
[ "java.util.List", "net.sourceforge.pmd.ast.CompilationUnit" ]
import java.util.List; import net.sourceforge.pmd.ast.CompilationUnit;
import java.util.*; import net.sourceforge.pmd.ast.*;
[ "java.util", "net.sourceforge.pmd" ]
java.util; net.sourceforge.pmd;
470,096
private static boolean isArrayInitialization(int currentType, int parentType) { return (currentType == TokenTypes.RCURLY || currentType == TokenTypes.LCURLY) && (parentType == TokenTypes.ARRAY_INIT || parentType == TokenTypes.ANNOTATION_ARRAY_INIT); }
static boolean function(int currentType, int parentType) { return (currentType == TokenTypes.RCURLY currentType == TokenTypes.LCURLY) && (parentType == TokenTypes.ARRAY_INIT parentType == TokenTypes.ANNOTATION_ARRAY_INIT); }
/** * Is array initialization. * @param currentType current token * @param parentType parent token * @return true is current token inside array initialization */
Is array initialization
isArrayInitialization
{ "repo_name": "ivanov-alex/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/whitespace/WhitespaceAroundCheck.java", "license": "apache-2.0", "size": 19512 }
[ "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
2,079,910
public Map<String, String> getAttributes() { return attributes; }
Map<String, String> function() { return attributes; }
/** * Returns a map of all attributes associated with this sharing profile. * Each entry key is the attribute identifier, while each value is the * attribute value itself. * * @return * The attribute map for this sharing profile. */
Returns a map of all attributes associated with this sharing profile. Each entry key is the attribute identifier, while each value is the attribute value itself
getAttributes
{ "repo_name": "glyptodon/guacamole-client", "path": "guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/APISharingProfile.java", "license": "apache-2.0", "size": 6718 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,732,813
@Test public void test_assignAccount() throws Exception { entityManager.getTransaction().begin(); instance.create(account); entityManager.getTransaction().commit(); entityManager.clear(); entityManager.getTransaction().begin(); instance.assignAccount(account.getI...
void function() throws Exception { entityManager.getTransaction().begin(); instance.create(account); entityManager.getTransaction().commit(); entityManager.clear(); entityManager.getTransaction().begin(); instance.assignAccount(account.getId(), "new"); entityManager.getTransaction().commit(); entityManager.clear(); Acc...
/** * <p> * Accuracy test for the method <code>assignAccount(long accountId, String claimOfficer)</code>.<br> * The result should be correct. * </p> * * @throws Exception * to JUnit. */
Accuracy test for the method <code>assignAccount(long accountId, String claimOfficer)</code>. The result should be correct.
test_assignAccount
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/Batch_Processing/src/java/tests/gov/opm/scrd/services/impl/AccountServiceImplUnitTests.java", "license": "apache-2.0", "size": 61048 }
[ "gov.opm.scrd.entities.application.Account", "org.junit.Assert" ]
import gov.opm.scrd.entities.application.Account; import org.junit.Assert;
import gov.opm.scrd.entities.application.*; import org.junit.*;
[ "gov.opm.scrd", "org.junit" ]
gov.opm.scrd; org.junit;
1,749,167
@GET @Path("dataset") @Produces({ "application/xml", "application/json", "application/atom+xml", "application/rdf+xml", "application/rss+xml", "application/zip" }) public DatasetResource getDataset(@QueryParam("productTypeId") String productTypeId) throws WebApplicationException ...
@Path(STR) @Produces({ STR, STR, STR, STR, STR, STR }) DatasetResource function(@QueryParam(STR) String productTypeId) throws WebApplicationException { if (productTypeId == null productTypeId.trim().equals(STRALLSTRProductTypeSTR/STRUnable to find the requested resource."; LOGGER.log(Level.FINE, message, e); throw new ...
/** * Gets an HTTP response that represents a set of {@link Product products} from the file manager. * * @param productTypeId the ID of the {@link ProductType} for the data set or "ALL" to denote all * product types * @return an HTTP response that represents a set of {@link Product products} from the...
Gets an HTTP response that represents a set of <code>Product products</code> from the file manager
getDataset
{ "repo_name": "apache/oodt", "path": "webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java", "license": "apache-2.0", "size": 13080 }
[ "java.util.logging.Level", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.WebApplicationException", "org.apache.oodt.cas.product.jaxrs.exceptions.NotFoundException", "org.apache.oodt.cas.product.jaxrs.resources.DatasetResource" ]
import java.util.logging.Level; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; import org.apache.oodt.cas.product.jaxrs.exceptions.NotFoundException; import org.apache.oodt.cas.product.jaxrs.resources.DatasetResource;
import java.util.logging.*; import javax.ws.rs.*; import org.apache.oodt.cas.product.jaxrs.exceptions.*; import org.apache.oodt.cas.product.jaxrs.resources.*;
[ "java.util", "javax.ws", "org.apache.oodt" ]
java.util; javax.ws; org.apache.oodt;
2,903,819
public void updated(String pid, Dictionary properties) { String compositeIdentity = (String) properties.get(compositeIdentityKey); String portName = (String) properties.get(portNameKey); Object id = properties.get(ebusIdKey); Integer ebusId = id instanceof Integer ? (Integer) id : ...
void function(String pid, Dictionary properties) { String compositeIdentity = (String) properties.get(compositeIdentityKey); String portName = (String) properties.get(portNameKey); Object id = properties.get(ebusIdKey); Integer ebusId = id instanceof Integer ? (Integer) id : Integer.parseInt(id.toString()); Object rate...
/** * ManagedServiceFactory Interface method * Called by the framewok when the configuration manager has fond new configuration for this service. * * @param pid The persistent identificator of the EbusDevice service to update. * @param properties The new properties for this service. */
ManagedServiceFactory Interface method Called by the framewok when the configuration manager has fond new configuration for this service
updated
{ "repo_name": "lathil/Ptoceti", "path": "com.ptoceti.osgi.ebusdevice/src/main/java/com/ptoceti/ebus/ebusdevice/impl/EbusDeviceFactory.java", "license": "apache-2.0", "size": 7474 }
[ "com.ptoceti.ebus.ebusdevice.EbusDevice", "java.io.File", "java.io.InputStream", "java.net.MalformedURLException", "java.util.Dictionary", "org.osgi.service.log.LogService" ]
import com.ptoceti.ebus.ebusdevice.EbusDevice; import java.io.File; import java.io.InputStream; import java.net.MalformedURLException; import java.util.Dictionary; import org.osgi.service.log.LogService;
import com.ptoceti.ebus.ebusdevice.*; import java.io.*; import java.net.*; import java.util.*; import org.osgi.service.log.*;
[ "com.ptoceti.ebus", "java.io", "java.net", "java.util", "org.osgi.service" ]
com.ptoceti.ebus; java.io; java.net; java.util; org.osgi.service;
2,634,010
@Override public String toString() { final StringBuilder s = new StringBuilder("radial-gradient(focus-angle ").append(focusAngle) .append("deg, focus-distance ").append(focusDistance * 100) .append("% , center ").append(GradientUtils.lengthToString(centerX, proportional)) ...
@Override String function() { final StringBuilder s = new StringBuilder(STR).append(focusAngle) .append(STR).append(focusDistance * 100) .append(STR).append(GradientUtils.lengthToString(centerX, proportional)) .append(" ").append(GradientUtils.lengthToString(centerY, proportional)) .append(STR).append(GradientUtils.len...
/** * Returns a string representation of this {@code RadialGradient} object. * @return a string representation of this {@code RadialGradient} object. */
Returns a string representation of this RadialGradient object
toString
{ "repo_name": "166MMX/openjdk.java.net-openjfx-8u40-rt", "path": "modules/graphics/src/main/java/javafx/scene/paint/RadialGradient.java", "license": "gpl-2.0", "size": 19975 }
[ "com.sun.javafx.scene.paint.GradientUtils" ]
import com.sun.javafx.scene.paint.GradientUtils;
import com.sun.javafx.scene.paint.*;
[ "com.sun.javafx" ]
com.sun.javafx;
505,986
@Test public void testBuildXmlSinkDirect() { XmlSink.Bound<Bird> sink = XmlSink.writeOf(Bird.class, testRootElement, testFilePrefix); assertEquals(testClass, sink.classToBind); assertEquals(testRootElement, sink.rootElementName); assertEquals(testFilePrefix, sink.baseOutputFilename); }
void function() { XmlSink.Bound<Bird> sink = XmlSink.writeOf(Bird.class, testRootElement, testFilePrefix); assertEquals(testClass, sink.classToBind); assertEquals(testRootElement, sink.rootElementName); assertEquals(testFilePrefix, sink.baseOutputFilename); }
/** * Alternate builder method correctly initializes an XML Sink. */
Alternate builder method correctly initializes an XML Sink
testBuildXmlSinkDirect
{ "repo_name": "yafengguo/Apache-beam", "path": "sdks/java/core/src/test/java/org/apache/beam/sdk/io/XmlSinkTest.java", "license": "apache-2.0", "size": 9061 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,580,803
private String getName(int name, Locale locale) { if (nameTable == null) { byte[] data = getTrueTypeTable((byte)'n', (byte) 'a', (byte) 'm', (byte) 'e'); if( data == null ) return null; nameTable = ByteBuffer.wrap( data ); } return NameDecoder.getName(nameTable, name, locale)...
String function(int name, Locale locale) { if (nameTable == null) { byte[] data = getTrueTypeTable((byte)'n', (byte) 'a', (byte) 'm', (byte) 'e'); if( data == null ) return null; nameTable = ByteBuffer.wrap( data ); } return NameDecoder.getName(nameTable, name, locale); }
/** * Extracts a String from the font&#x2019;s name table. * * @param name the numeric TrueType or OpenType name ID. * * @param locale the locale for which names shall be localized, or * <code>null</code> if the locale does mot matter because the name * is known to be language-independent (for exam...
Extracts a String from the font&#x2019;s name table
getName
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java", "license": "bsd-3-clause", "size": 11203 }
[ "gnu.java.awt.font.opentype.NameDecoder", "java.nio.ByteBuffer", "java.util.Locale" ]
import gnu.java.awt.font.opentype.NameDecoder; import java.nio.ByteBuffer; import java.util.Locale;
import gnu.java.awt.font.opentype.*; import java.nio.*; import java.util.*;
[ "gnu.java.awt", "java.nio", "java.util" ]
gnu.java.awt; java.nio; java.util;
178,480
protected StringBuffer consolidateFieldNames(List fieldNames, String delimiter) { StringBuffer sb = new StringBuffer(); // setup some vars boolean firstPass = true; String delim = ""; // walk through the list for (Iterator iter = fieldNames.iterator(); iter.hasNext(...
StringBuffer function(List fieldNames, String delimiter) { StringBuffer sb = new StringBuffer(); boolean firstPass = true; String delim = ""; for (Iterator iter = fieldNames.iterator(); iter.hasNext(); ) { String fieldName = (String) iter.next(); sb.append(delim + getDataDictionaryService().getAttributeLabel(newDataObj...
/** * This method turns a list of field property names, into a delimited string of the human-readable names. * * @param fieldNames - List of fieldNames * @return A filled StringBuffer ready to go in an error message */
This method turns a list of field property names, into a delimited string of the human-readable names
consolidateFieldNames
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-kns/src/main/java/org/kuali/kfs/krad/rules/MaintenanceDocumentRuleBase.java", "license": "agpl-3.0", "size": 61252 }
[ "java.util.Iterator", "java.util.List" ]
import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
928,193
boolean ping(TaskAttemptID taskid) throws IOException;
boolean ping(TaskAttemptID taskid) throws IOException;
/** * Periodically called by child to check if parent is still alive. * * @return True if the task is known */
Periodically called by child to check if parent is still alive
ping
{ "repo_name": "dongpf/hadoop-0.19.1", "path": "src/mapred/org/apache/hadoop/mapred/TaskUmbilicalProtocol.java", "license": "apache-2.0", "size": 6399 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
621,981
String getName(); /** * Returns the {@link java.io.ObjectInputStream} associated with * the Client being handled. * It will be <code>null</code> if no {@link ClientObjectHandler}
String getName(); /** * Returns the {@link java.io.ObjectInputStream} associated with * the Client being handled. * It will be <code>null</code> if no {@link ClientObjectHandler}
/** * Returns the ClientHandler name * @since 1.4.6 */
Returns the ClientHandler name
getName
{ "repo_name": "QuickServerLab/QuickServer-Main", "path": "src/main/org/quickserver/net/server/ClientHandler.java", "license": "lgpl-2.1", "size": 15954 }
[ "java.io.ObjectInputStream" ]
import java.io.ObjectInputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,446,462
public void addWord(Word word) { list.add(word); updateMaxQueueSize(); }
void function(Word word) { list.add(word); updateMaxQueueSize(); }
/** * Adds word to the pool. * @param word word to add */
Adds word to the pool
addWord
{ "repo_name": "ferrerverck/englishwords", "path": "src/com/words/controller/words/wordpool/WordPool.java", "license": "gpl-3.0", "size": 7895 }
[ "com.words.controller.words.Word" ]
import com.words.controller.words.Word;
import com.words.controller.words.*;
[ "com.words.controller" ]
com.words.controller;
900,459
@Generated @StructureField(order = 0, isGetter = true) public native int mChunkType();
@StructureField(order = 0, isGetter = true) native int function();
/** * four char code */
four char code
mChunkType
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/audiotoolbox/struct/CAFChunkHeader.java", "license": "apache-2.0", "size": 2055 }
[ "org.moe.natj.c.ann.StructureField" ]
import org.moe.natj.c.ann.StructureField;
import org.moe.natj.c.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,573,616
public void packageRemove(HlPackage pkg);
void function(HlPackage pkg);
/** * Replaces packageClose() and packageDelete() with a single call, primarily * to make it easier to handle the safe marking of HlPackage and DirectoryItem * objects as invalid. * @param pkg The package to remove and close. */
Replaces packageClose() and packageDelete() with a single call, primarily to make it easier to handle the safe marking of HlPackage and DirectoryItem objects as invalid
packageRemove
{ "repo_name": "DHager/jhllib", "path": "src/main/java/com/technofovea/hllib/methods/ManagedCalls.java", "license": "lgpl-3.0", "size": 1499 }
[ "com.technofovea.hllib.HlPackage" ]
import com.technofovea.hllib.HlPackage;
import com.technofovea.hllib.*;
[ "com.technofovea.hllib" ]
com.technofovea.hllib;
1,738,832
public void setRefreshing() { int left = Main.get().mainPanel.dashboard.keyMapDashboard.scrollTable.getAbsoluteLeft() + (Main.get().mainPanel.dashboard.keyMapDashboard.scrollTable.getOffsetWidth()/2); int top = Main.get().mainPanel.dashboard.keyMapDashboard.scrollTable.getAbsoluteTop() + (Main.get...
void function() { int left = Main.get().mainPanel.dashboard.keyMapDashboard.scrollTable.getAbsoluteLeft() + (Main.get().mainPanel.dashboard.keyMapDashboard.scrollTable.getOffsetWidth()/2); int top = Main.get().mainPanel.dashboard.keyMapDashboard.scrollTable.getAbsoluteTop() + (Main.get().mainPanel.dashboard.keyMapDashb...
/** * Sets the refreshing */
Sets the refreshing
setRefreshing
{ "repo_name": "papamas/DMS-KANGREG-XI-MANADO", "path": "src/main/java/com/openkm/frontend/client/widget/dashboard/keymap/KeyMapTable.java", "license": "gpl-3.0", "size": 28777 }
[ "com.openkm.frontend.client.Main" ]
import com.openkm.frontend.client.Main;
import com.openkm.frontend.client.*;
[ "com.openkm.frontend" ]
com.openkm.frontend;
2,817,876
@Deprecated public String toString(Directory dir) { return toString(); }
String function(Directory dir) { return toString(); }
/** * Returns readable description of this segment. * @deprecated Use {@link #toString()} instead. */
Returns readable description of this segment
toString
{ "repo_name": "PATRIC3/p3_solr", "path": "lucene/core/src/java/org/apache/lucene/index/SegmentInfos.java", "license": "apache-2.0", "size": 39975 }
[ "org.apache.lucene.store.Directory" ]
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.*;
[ "org.apache.lucene" ]
org.apache.lucene;
1,241,643
@Override public IntIntMultiValueMap invert() { final IntIntMultiValueMap inv = new DefaultIntIntMultiValueMap(); final IntIterator keyIt = keySet().iterator(); while (keyIt.hasNext()) { final int key = keyIt.nextInt(); final IntIterator valIt = get(key).iterator(); while (valIt.hasNext()) { fina...
IntIntMultiValueMap function() { final IntIntMultiValueMap inv = new DefaultIntIntMultiValueMap(); final IntIterator keyIt = keySet().iterator(); while (keyIt.hasNext()) { final int key = keyIt.nextInt(); final IntIterator valIt = get(key).iterator(); while (valIt.hasNext()) { final int val = valIt.nextInt(); inv.add(v...
/** * Implementation returns a new {@link DefaultIntIntMultiValueMap} instance. * <p> * Changing the returned map does not affect this multi value map. * * @see ch.javasoft.util.map.MultiValueMap#invert() */
Implementation returns a new <code>DefaultIntIntMultiValueMap</code> instance. Changing the returned map does not affect this multi value map
invert
{ "repo_name": "mpgerstl/tEFMA", "path": "ch/javasoft/util/map/DefaultIntIntMultiValueMap.java", "license": "bsd-2-clause", "size": 15799 }
[ "ch.javasoft.util.ints.IntIterator" ]
import ch.javasoft.util.ints.IntIterator;
import ch.javasoft.util.ints.*;
[ "ch.javasoft.util" ]
ch.javasoft.util;
2,796,463
private void freezeAuditableAspect(NodeRef nodeRef, NodeRef versionNodeRef) { if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUDITABLE)) { Map<QName, Serializable> properties = dbNodeService.getProperties(nodeRef); dbNodeService.setProperty(versionNodeRef, Ve...
void function(NodeRef nodeRef, NodeRef versionNodeRef) { if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUDITABLE)) { Map<QName, Serializable> properties = dbNodeService.getProperties(nodeRef); dbNodeService.setProperty(versionNodeRef, Version2Model.PROP_QNAME_FROZEN_CREATOR, properties.get(ContentModel.PROP_CR...
/** * Freezes audit aspect properties. * * @param nodeRef * @param versionNodeRef */
Freezes audit aspect properties
freezeAuditableAspect
{ "repo_name": "dnacreative/records-management", "path": "rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/version/RecordableVersionServiceImpl.java", "license": "lgpl-3.0", "size": 33420 }
[ "java.io.Serializable", "java.util.Map", "org.alfresco.model.ContentModel", "org.alfresco.repo.version.Version2Model", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.namespace.QName" ]
import java.io.Serializable; import java.util.Map; import org.alfresco.model.ContentModel; import org.alfresco.repo.version.Version2Model; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName;
import java.io.*; import java.util.*; import org.alfresco.model.*; import org.alfresco.repo.version.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*;
[ "java.io", "java.util", "org.alfresco.model", "org.alfresco.repo", "org.alfresco.service" ]
java.io; java.util; org.alfresco.model; org.alfresco.repo; org.alfresco.service;
2,643,762
@Test public void testFilteringForNoMaxVersionWithProductId() throws IOException, BadVersionException, RequestFailureException, SecurityException, ClientFailureException { Asset assetWithMaxVersion = createTestAsset(); WlpInformation wlpInfo = new WlpInformation(); AppliesToFilterInfo fi...
void function() throws IOException, BadVersionException, RequestFailureException, SecurityException, ClientFailureException { Asset assetWithMaxVersion = createTestAsset(); WlpInformation wlpInfo = new WlpInformation(); AppliesToFilterInfo filterInfo = new AppliesToFilterInfo(); filterInfo.setProductId(STR); FilterVers...
/** * Tests that you can filter for an asset with no max version * * @throws RequestFailureException * @throws BadVersionException * @throws IOException * @throws ClientFailureException * @throws SecurityException */
Tests that you can filter for an asset with no max version
testFilteringForNoMaxVersionWithProductId
{ "repo_name": "WASdev/tool.lars", "path": "client-lib-tests/src/fat/java/com/ibm/ws/repository/transport/client/test/RepositoryClientTest.java", "license": "apache-2.0", "size": 75497 }
[ "com.ibm.ws.repository.transport.exceptions.BadVersionException", "com.ibm.ws.repository.transport.exceptions.ClientFailureException", "com.ibm.ws.repository.transport.exceptions.RequestFailureException", "com.ibm.ws.repository.transport.model.AppliesToFilterInfo", "com.ibm.ws.repository.transport.model.Ass...
import com.ibm.ws.repository.transport.exceptions.BadVersionException; import com.ibm.ws.repository.transport.exceptions.ClientFailureException; import com.ibm.ws.repository.transport.exceptions.RequestFailureException; import com.ibm.ws.repository.transport.model.AppliesToFilterInfo; import com.ibm.ws.repository.trans...
import com.ibm.ws.repository.transport.exceptions.*; import com.ibm.ws.repository.transport.model.*; import java.io.*; import java.util.*; import org.junit.*;
[ "com.ibm.ws", "java.io", "java.util", "org.junit" ]
com.ibm.ws; java.io; java.util; org.junit;
1,585,893
public Object visit(ForStatement node) { print("l."+node.getBeginLine()+" ForStatement {"); print("initialization:"); if (node.getInitialization() != null) { indent(); Iterator it = node.getInitialization().iterator(); while (it.hasNext()) { ((Node)it.next()).acceptVisitor(this); } ...
Object function(ForStatement node) { print("l."+node.getBeginLine()+STR); print(STR); if (node.getInitialization() != null) { indent(); Iterator it = node.getInitialization().iterator(); while (it.hasNext()) { ((Node)it.next()).acceptVisitor(this); } unindent(); } print(STR); if (node.getCondition() != null) { indent()...
/** * Visits a ForStatement * @param node the node to visit */
Visits a ForStatement
visit
{ "repo_name": "moegyver/mJeliot", "path": "Jeliot/src/koala/dynamicjava/util/DisplayVisitor.java", "license": "mit", "size": 43449 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,645,013
private static void checkJobStatus(JobStatus status, JobID expJobId, String expJobName, JobStatus.State expState, float expCleanupProgress) throws Exception { assert F.eq(status.getJobID(), expJobId) : "Expected=" + expJobId + ", actual=" + status.getJobID(); assert F.eq(status.getJobName(),...
static void function(JobStatus status, JobID expJobId, String expJobName, JobStatus.State expState, float expCleanupProgress) throws Exception { assert F.eq(status.getJobID(), expJobId) : STR + expJobId + STR + status.getJobID(); assert F.eq(status.getJobName(), expJobName) : STR + expJobName + STR + status.getJobName(...
/** * Check job status. * * @param status Job status. * @param expJobId Expected job ID. * @param expJobName Expected job name. * @param expState Expected state. * @param expCleanupProgress Expected cleanup progress. * @throws Exception If failed. */
Check job status
checkJobStatus
{ "repo_name": "ilantukh/ignite", "path": "modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/client/HadoopClientProtocolSelfTest.java", "license": "apache-2.0", "size": 22240 }
[ "org.apache.hadoop.mapreduce.JobID", "org.apache.hadoop.mapreduce.JobStatus", "org.apache.ignite.internal.util.typedef.F" ]
import org.apache.hadoop.mapreduce.JobID; import org.apache.hadoop.mapreduce.JobStatus; import org.apache.ignite.internal.util.typedef.F;
import org.apache.hadoop.mapreduce.*; import org.apache.ignite.internal.util.typedef.*;
[ "org.apache.hadoop", "org.apache.ignite" ]
org.apache.hadoop; org.apache.ignite;
1,107,791
public void closeWebApplicationContext(ServletContext servletContext) { servletContext.log("Closing Spring root WebApplicationContext"); try { if (this.context instanceof ConfigurableWebApplicationContext) { ((ConfigurableWebApplicationContext) this.context).close(); } } finally { ClassLoader cc...
void function(ServletContext servletContext) { servletContext.log(STR); try { if (this.context instanceof ConfigurableWebApplicationContext) { ((ConfigurableWebApplicationContext) this.context).close(); } } finally { ClassLoader ccl = Thread.currentThread().getContextClassLoader(); if (ccl == ContextLoader.class.getCla...
/** * Close Spring's web application context for the given servlet context. If * the default {@link #loadParentContext(ServletContext)} implementation, * which uses ContextSingletonBeanFactoryLocator, has loaded any shared * parent context, release one reference to that shared parent context. * <p>If overridi...
Close Spring's web application context for the given servlet context. If the default <code>#loadParentContext(ServletContext)</code> implementation, which uses ContextSingletonBeanFactoryLocator, has loaded any shared parent context, release one reference to that shared parent context. If overriding <code>#loadParentCo...
closeWebApplicationContext
{ "repo_name": "kingtang/spring-learn", "path": "spring-web/src/main/java/org/springframework/web/context/ContextLoader.java", "license": "gpl-3.0", "size": 28250 }
[ "javax.servlet.ServletContext" ]
import javax.servlet.ServletContext;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
2,630,058
long appendSchemaChangeToTable(String userId, String tableId, List<String> current, List<ColumnChange> changes, long transactionId);
long appendSchemaChangeToTable(String userId, String tableId, List<String> current, List<ColumnChange> changes, long transactionId);
/** * Append a schema change to the table's changes. * * @param userId * @param tableId * @param current * @param changes * @throws IOException */
Append a schema change to the table's changes
appendSchemaChangeToTable
{ "repo_name": "zimingd/Synapse-Repository-Services", "path": "lib/models/src/main/java/org/sagebionetworks/repo/model/dao/table/TableRowTruthDAO.java", "license": "apache-2.0", "size": 5506 }
[ "java.util.List", "org.sagebionetworks.repo.model.table.ColumnChange" ]
import java.util.List; import org.sagebionetworks.repo.model.table.ColumnChange;
import java.util.*; import org.sagebionetworks.repo.model.table.*;
[ "java.util", "org.sagebionetworks.repo" ]
java.util; org.sagebionetworks.repo;
1,194,123
private Object doInsert(DataValueDescriptor[] row) throws StandardException { return this.gfContainer.insertRow(row, this.tran, this.txState, this.tran.getLanguageConnectionContext(), false ); }
Object function(DataValueDescriptor[] row) throws StandardException { return this.gfContainer.insertRow(row, this.tran, this.txState, this.tran.getLanguageConnectionContext(), false ); }
/** * Insert a new row into the heap and return the region key of the row. * * @param row * The row to insert. * * @return the new slotId * * @exception StandardException * Standard exception policy. */
Insert a new row into the heap and return the region key of the row
doInsert
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/engine/access/heap/MemHeapController.java", "license": "apache-2.0", "size": 12212 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.types.DataValueDescriptor" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.types.DataValueDescriptor;
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.types.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
860,603
@Basic( optional = true ) @Column( name = "hp_screen_score" ) public Integer getHpScreeningScore() { return this.hpScreeningScore; }
@Basic( optional = true ) @Column( name = STR ) Integer function() { return this.hpScreeningScore; }
/** * Return the value associated with the column: hpScreenScore. * @return A Integer object (this.hpScreenScore) */
Return the value associated with the column: hpScreenScore
getHpScreeningScore
{ "repo_name": "servinglynk/servinglynk-hmis", "path": "hmis-model-v2016/src/main/java/com/servinglynk/hmis/warehouse/model/v2016/Entryssvf.java", "license": "mpl-2.0", "size": 25761 }
[ "javax.persistence.Basic", "javax.persistence.Column" ]
import javax.persistence.Basic; import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,339,148
public static byte[] escapeEasternUnicodeByteStream(byte[] origBytes, String origString, int offset, int length) { if ((origBytes == null) || (origBytes.length == 0)) { return origBytes; } int bytesLen = origBytes.length; int bufIndex = 0; int strInde...
static byte[] function(byte[] origBytes, String origString, int offset, int length) { if ((origBytes == null) (origBytes.length == 0)) { return origBytes; } int bytesLen = origBytes.length; int bufIndex = 0; int strIndex = 0; ByteArrayOutputStream bytesOut = new ByteArrayOutputStream(bytesLen); while (true) { if (origS...
/** * Unfortunately, SJIS has 0x5c as a high byte in some of its double-byte * characters, so we need to escape it. * * @param origBytes the original bytes in SJIS format * @param origString the string that had .getBytes() called on it * @param offset where to start converting from * ...
Unfortunately, SJIS has 0x5c as a high byte in some of its double-byte characters, so we need to escape it
escapeEasternUnicodeByteStream
{ "repo_name": "devoof/jPrinterAdmin", "path": "mysql-connector-java-5.1.23/src/com/mysql/jdbc/StringUtils.java", "license": "gpl-2.0", "size": 62879 }
[ "java.io.ByteArrayOutputStream" ]
import java.io.ByteArrayOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
604,848
protected Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) { return mDataBase.query(table, columns, selection, selectionArgs, groupBy, having, orderBy); }
Cursor function(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy) { return mDataBase.query(table, columns, selection, selectionArgs, groupBy, having, orderBy); }
/** * Runs a query on the real database * * @param table table name * @param columns columns * @param selection selection * @param selectionArgs selectionargs * @param groupBy groupby * @param having having clause * @param orderBy orderby * @return cursor */
Runs a query on the real database
query
{ "repo_name": "midhunhk/ae-apps-library", "path": "modules/database-helpers/src/main/java/com/ae/apps/lib/db/CopiedDataBaseHelper.java", "license": "apache-2.0", "size": 5136 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
2,088,853
@Override public Adapter createClassDetailsAdapter() { if (classDetailsItemProvider == null) { classDetailsItemProvider = new ClassDetailsItemProvider(this); } return classDetailsItemProvider; } protected ConversionArgumentItemProvider conversionArgumentItemProvider;
Adapter function() { if (classDetailsItemProvider == null) { classDetailsItemProvider = new ClassDetailsItemProvider(this); } return classDetailsItemProvider; } protected ConversionArgumentItemProvider conversionArgumentItemProvider;
/** * This creates an adapter for a {@link com.openMap1.mapper.ClassDetails}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>com.openMap1.mapper.ClassDetails</code>.
createClassDetailsAdapter
{ "repo_name": "openmapsoftware/mappingtools", "path": "openmap-mapper-edit/src/main/java/com/openMap1/mapper/provider/MapperItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 26253 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,588,679
public Image createTintedVersion(Color color);
Image function(Color color);
/** * Creates a new image with is tinted with the specified color. * * Tinting works by multiplying the color of the image's pixels * with the specified color. * * @param color The color used for tinting. * @return a new Image object. */
Creates a new image with is tinted with the specified color. Tinting works by multiplying the color of the image's pixels with the specified color
createTintedVersion
{ "repo_name": "ColaMachine/MyBlock", "path": "src/main/java/de/matthiasmann/twl/renderer/Image.java", "license": "bsd-2-clause", "size": 3049 }
[ "de.matthiasmann.twl.Color" ]
import de.matthiasmann.twl.Color;
import de.matthiasmann.twl.*;
[ "de.matthiasmann.twl" ]
de.matthiasmann.twl;
1,610,152
@Override public Value evalConstant() { return _value; }
Value function() { return _value; }
/** * Evaluates the expression as a constant. * * @return the expression value. */
Evaluates the expression as a constant
evalConstant
{ "repo_name": "CleverCloud/Quercus", "path": "quercus/src/main/java/com/caucho/quercus/expr/LiteralStringExpr.java", "license": "gpl-2.0", "size": 3642 }
[ "com.caucho.quercus.env.Value" ]
import com.caucho.quercus.env.Value;
import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
2,270,452
public QName createQName() { return new QName(nsUri,localName); }
QName function() { return new QName(nsUri,localName); }
/** * Creates a new QName object from {@link #nsUri} and {@link #localName}. */
Creates a new QName object from <code>#nsUri</code> and <code>#localName</code>
createQName
{ "repo_name": "axDev-JDK/jaxws", "path": "src/share/jaxws_classes/com/sun/xml/internal/ws/util/QNameMap.java", "license": "gpl-2.0", "size": 14361 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
997,579
void reportRemoteBadBlock(DatanodeInfo dnInfo, ExtendedBlock block) throws IOException { LocatedBlock lb = new LocatedBlock(block, new DatanodeInfo[]{dnInfo}); bpNamenode.reportBadBlocks(new LocatedBlock[]{lb}); }
void reportRemoteBadBlock(DatanodeInfo dnInfo, ExtendedBlock block) throws IOException { LocatedBlock lb = new LocatedBlock(block, new DatanodeInfo[]{dnInfo}); bpNamenode.reportBadBlocks(new LocatedBlock[]{lb}); }
/** * Report a bad block from another DN in this cluster. */
Report a bad block from another DN in this cluster
reportRemoteBadBlock
{ "repo_name": "gigaroby/hops", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java", "license": "apache-2.0", "size": 19073 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.DatanodeInfo", "org.apache.hadoop.hdfs.protocol.ExtendedBlock", "org.apache.hadoop.hdfs.protocol.LocatedBlock" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.protocol.LocatedBlock;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,765,331
void assertCounterGt(String name, long expected, BaseSource source);
void assertCounterGt(String name, long expected, BaseSource source);
/** * Assert that a counter exists and that it's value is greater than the given value. * * @param name The name of the counter. * @param expected The value the counter is expected to be greater than. * @param source The BaseSource{@link BaseSource} that will provide the tags, * ...
Assert that a counter exists and that it's value is greater than the given value
assertCounterGt
{ "repo_name": "ultratendency/hbase", "path": "hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/test/MetricsAssertHelper.java", "license": "apache-2.0", "size": 6630 }
[ "org.apache.hadoop.hbase.metrics.BaseSource" ]
import org.apache.hadoop.hbase.metrics.BaseSource;
import org.apache.hadoop.hbase.metrics.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
982,685
public int getRowTable(String table_name){ String countQuery = "SELECT * FROM " + table_name; db = this.getReadableDatabase(); Cursor cursor = db.rawQuery(countQuery, null); row = cursor.getCount(); return row; }
int function(String table_name){ String countQuery = STR + table_name; db = this.getReadableDatabase(); Cursor cursor = db.rawQuery(countQuery, null); row = cursor.getCount(); return row; }
/** * This method will return your total row from a table * * @param table_name : your table name * @return will return your total row from a table */
This method will return your total row from a table
getRowTable
{ "repo_name": "abangadit/sqlitehelper", "path": "SqliteHelper.java", "license": "apache-2.0", "size": 7337 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
1,126,859
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<PrivateEndpointConnectionInner> listByServerAsync(String resourceGroupName, String serverName) { return new PagedFlux<>( () -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNex...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<PrivateEndpointConnectionInner> function(String resourceGroupName, String serverName) { return new PagedFlux<>( () -> listByServerSinglePageAsync(resourceGroupName, serverName), nextLink -> listByServerNextSinglePageAsync(nextLink)); }
/** * Gets all private endpoint connections on a server. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementE...
Gets all private endpoint connections on a server
listByServerAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/postgresql/azure-resourcemanager-postgresql/src/main/java/com/azure/resourcemanager/postgresql/implementation/PrivateEndpointConnectionsClientImpl.java", "license": "mit", "size": 77661 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.postgresql.fluent.models.PrivateEndpointConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.postgresql.fluent.models.PrivateEndpointConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.postgresql.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,869,072
public HidModel updateExistingGateway(String hid, UpdateGatewayModel model) { String method = "updateExistingGateway"; try { URI uri = buildUri(UPDATE_EXISTING_URL.replace("{hid}", hid)); HidModel result = execute(new HttpPut(uri), JsonUtils.toJson(model), HidModel.class); log(method, result); return...
HidModel function(String hid, UpdateGatewayModel model) { String method = STR; try { URI uri = buildUri(UPDATE_EXISTING_URL.replace("{hid}", hid)); HidModel result = execute(new HttpPut(uri), JsonUtils.toJson(model), HidModel.class); log(method, result); return result; } catch (Throwable e) { throw handleException(e); ...
/** * Sends PUT request to update specific existing gateway according to * {@code model} passed * * @param hid {@link String} representing {@code hid} of gateway to be updated * @param model {@link GatewayModel} representing gateway parameters to be * updated * * @return {@link HidModel} ...
Sends PUT request to update specific existing gateway according to model passed
updateExistingGateway
{ "repo_name": "arrow-acs/acn-sdk-java", "path": "acn-client/src/main/java/com/arrow/acn/client/api/GatewayApi.java", "license": "apache-2.0", "size": 14791 }
[ "com.arrow.acn.client.model.UpdateGatewayModel", "com.arrow.acs.JsonUtils", "com.arrow.acs.client.model.HidModel", "org.apache.http.client.methods.HttpPut" ]
import com.arrow.acn.client.model.UpdateGatewayModel; import com.arrow.acs.JsonUtils; import com.arrow.acs.client.model.HidModel; import org.apache.http.client.methods.HttpPut;
import com.arrow.acn.client.model.*; import com.arrow.acs.*; import com.arrow.acs.client.model.*; import org.apache.http.client.methods.*;
[ "com.arrow.acn", "com.arrow.acs", "org.apache.http" ]
com.arrow.acn; com.arrow.acs; org.apache.http;
2,704,249
public String getAliasForX509CertThumb(byte[] thumb) throws WSSecurityException;
String function(byte[] thumb) throws WSSecurityException;
/** * Lookup a X509 Certificate in the keystore according to a given * Thumbprint. * * The search gets all alias names of the keystore, then reads the certificate chain * or certificate for each alias. Then the thumbprint for each user certificate * is compared with the thumbprint paramet...
Lookup a X509 Certificate in the keystore according to a given Thumbprint. The search gets all alias names of the keystore, then reads the certificate chain or certificate for each alias. Then the thumbprint for each user certificate is compared with the thumbprint parameter
getAliasForX509CertThumb
{ "repo_name": "hpmtissera/wso2-wss4j", "path": "modules/wss4j/src/org/apache/ws/security/components/crypto/Crypto.java", "license": "apache-2.0", "size": 8706 }
[ "org.apache.ws.security.WSSecurityException" ]
import org.apache.ws.security.WSSecurityException;
import org.apache.ws.security.*;
[ "org.apache.ws" ]
org.apache.ws;
2,121,806
public static BrowseDAO getInstance(Context context) throws BrowseException { String db = ConfigurationManager.getProperty("db.name"); if ("postgres".equals(db)) { return new BrowseDAOPostgres(context); } else if ("oracle".equals(db)) { return new BrowseDAOOracle(context); } else ...
static BrowseDAO function(Context context) throws BrowseException { String db = ConfigurationManager.getProperty(STR); if (STR.equals(db)) { return new BrowseDAOPostgres(context); } else if (STR.equals(db)) { return new BrowseDAOOracle(context); } else { throw new BrowseException(STR); } }
/** * Get an instance of the relevant Read Only DAO class, which will * conform to the BrowseDAO interface * * @param context the DSpace context * @return the relevant DAO * @throws BrowseException */
Get an instance of the relevant Read Only DAO class, which will conform to the BrowseDAO interface
getInstance
{ "repo_name": "jamie-dryad/dryad-repo", "path": "dspace-api/src/main/java/org/dspace/browse/BrowseDAOFactory.java", "license": "bsd-3-clause", "size": 3295 }
[ "org.dspace.core.ConfigurationManager", "org.dspace.core.Context" ]
import org.dspace.core.ConfigurationManager; import org.dspace.core.Context;
import org.dspace.core.*;
[ "org.dspace.core" ]
org.dspace.core;
2,484,498
public void addFailure(final Test test, final AssertionFailedError t) { addFailure(test, (Throwable) t); }
void function(final Test test, final AssertionFailedError t) { addFailure(test, (Throwable) t); }
/** * Interface TestListener for JUnit &gt; 3.4. * * <p>A Test failed. * @param test the test. * @param t the assertion. */
Interface TestListener for JUnit &gt; 3.4. A Test failed
addFailure
{ "repo_name": "mourao666/cassandra-sim", "path": "test/unit/org/apache/cassandra/CassandraXMLJUnitResultFormatter.java", "license": "apache-2.0", "size": 12942 }
[ "junit.framework.AssertionFailedError", "junit.framework.Test" ]
import junit.framework.AssertionFailedError; import junit.framework.Test;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,319,532
public void put(CacheGroup group, Object id, Object object) { this.cacheManager.put(group.toString(), id, object); }
void function(CacheGroup group, Object id, Object object) { this.cacheManager.put(group.toString(), id, object); }
/** * Puts an object with an ID in the specified {@link CacheGroup} group parameter. * <p> * The id parameter can be used to retrieve the object from the cache. * * @param group the {@link CacheGroup} which the object should be placed in * @param id the ID of the stored object. ...
Puts an object with an ID in the specified <code>CacheGroup</code> group parameter. The id parameter can be used to retrieve the object from the cache
put
{ "repo_name": "craftfire/Bifrost", "path": "src/main/java/com/craftfire/bifrost/classes/general/Cache.java", "license": "lgpl-3.0", "size": 8406 }
[ "com.craftfire.bifrost.enums.CacheGroup" ]
import com.craftfire.bifrost.enums.CacheGroup;
import com.craftfire.bifrost.enums.*;
[ "com.craftfire.bifrost" ]
com.craftfire.bifrost;
1,414,529
public SignupMeeting getMeeting();
SignupMeeting function();
/** * get the SignupMeeting object * * @return the SignupMeeting object */
get the SignupMeeting object
getMeeting
{ "repo_name": "harfalm/Sakai-10.1", "path": "signup/api/src/java/org/sakaiproject/signup/logic/messages/SignupEventTrackingInfo.java", "license": "apache-2.0", "size": 3428 }
[ "org.sakaiproject.signup.model.SignupMeeting" ]
import org.sakaiproject.signup.model.SignupMeeting;
import org.sakaiproject.signup.model.*;
[ "org.sakaiproject.signup" ]
org.sakaiproject.signup;
139,764
public static Discount parse(String disc) { if (disc.toLowerCase().equals("log2")) { return log2(); } Matcher m = LOG_PAT.matcher(disc); if (m.matches()) { String grp = m.group(1); double base = grp != null ? Double.parseDouble(grp) : 2; ...
static Discount function(String disc) { if (disc.toLowerCase().equals("log2")) { return log2(); } Matcher m = LOG_PAT.matcher(disc); if (m.matches()) { String grp = m.group(1); double base = grp != null ? Double.parseDouble(grp) : 2; return new LogDiscount(base); } m = EXP_PAT.matcher(disc); if (m.matches()) { double h...
/** * Parse a discount expression from a string. * @param disc The discount string. * @return The discount. */
Parse a discount expression from a string
parse
{ "repo_name": "amaliujia/lenskit", "path": "lenskit-eval/src/main/java/org/lenskit/eval/traintest/metrics/Discounts.java", "license": "lgpl-2.1", "size": 2840 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,546,852
static void record(ContextMenuParams params, int action) { assert action >= 0; assert action < NUM_ACTIONS; String histogramName; if (params.isVideo()) { histogramName = "ContextMenu.SelectedOption.Video"; } else if (params.isImage()) {...
static void record(ContextMenuParams params, int action) { assert action >= 0; assert action < NUM_ACTIONS; String histogramName; if (params.isVideo()) { histogramName = STR; } else if (params.isImage()) { histogramName = params.isAnchor() ? STR : STR; } else { assert params.isAnchor(); histogramName = STR; } RecordHis...
/** * Records a histogram entry when the user selects an item from a context menu. * @param params The ContextMenuParams describing the current context menu. * @param action The action that the user selected (e.g. ACTION_SAVE_IMAGE). */
Records a histogram entry when the user selects an item from a context menu
record
{ "repo_name": "TheTypoMaster/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java", "license": "bsd-3-clause", "size": 13896 }
[ "org.chromium.base.metrics.RecordHistogram" ]
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.*;
[ "org.chromium.base" ]
org.chromium.base;
914,058
public static boolean exists(final File file) throws SecurityException { if (file == null) { throw new IllegalArgumentException("file cannot be <null>"); }
static boolean function(final File file) throws SecurityException { if (file == null) { throw new IllegalArgumentException(STR); }
/** * Check if the file exists. * * @return {@code true} if file exists, {@code false} otherwise * @throws SecurityException if the required permissions to read the file, * or the path it is in, are missing * @see File#exists */
Check if the file exists
exists
{ "repo_name": "trejkaz/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/util/PrivilegedFileOpsForTests.java", "license": "apache-2.0", "size": 19681 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,091,517
private SecretKey t12DeriveKey(String algorithm, AlgorithmParameterSpec params) throws IOException { try { KeyAgreement ka = KeyAgreement.getInstance(algorithmName); ka.init(localPrivateKey); ka.doPhase(peerPublicKey, true); SecretKey preMasterSecr...
SecretKey function(String algorithm, AlgorithmParameterSpec params) throws IOException { try { KeyAgreement ka = KeyAgreement.getInstance(algorithmName); ka.init(localPrivateKey); ka.doPhase(peerPublicKey, true); SecretKey preMasterSecret = ka.generateSecret(STR); SSLMasterKeyDerivation mskd = SSLMasterKeyDerivation.va...
/** * Handle the TLSv1-1.2 objects, which don't use the HKDF algorithms. */
Handle the TLSv1-1.2 objects, which don't use the HKDF algorithms
t12DeriveKey
{ "repo_name": "md-5/jdk10", "path": "src/java.base/share/classes/sun/security/ssl/KAKeyDerivation.java", "license": "gpl-2.0", "size": 5383 }
[ "java.io.IOException", "java.security.GeneralSecurityException", "java.security.spec.AlgorithmParameterSpec", "javax.crypto.KeyAgreement", "javax.crypto.SecretKey", "javax.net.ssl.SSLHandshakeException" ]
import java.io.IOException; import java.security.GeneralSecurityException; import java.security.spec.AlgorithmParameterSpec; import javax.crypto.KeyAgreement; import javax.crypto.SecretKey; import javax.net.ssl.SSLHandshakeException;
import java.io.*; import java.security.*; import java.security.spec.*; import javax.crypto.*; import javax.net.ssl.*;
[ "java.io", "java.security", "javax.crypto", "javax.net" ]
java.io; java.security; javax.crypto; javax.net;
1,403,983
String location = String.format("System/Library/Frameworks/%s.framework", name); FileReference reference = FileReference.of(location, SourceTree.SDKROOT).withExplicitFileType(FRAMEWORK_FILE_TYPE); fileReferences.add(reference); return this; }
String location = String.format(STR, name); FileReference reference = FileReference.of(location, SourceTree.SDKROOT).withExplicitFileType(FRAMEWORK_FILE_TYPE); fileReferences.add(reference); return this; }
/** * Creates a new SDK framework based on the passed name. * * @param name simple framework name without ".framework" suffix, e.g. "Foundation" */
Creates a new SDK framework based on the passed name
addSdkFramework
{ "repo_name": "juhalindfors/bazel-patches", "path": "src/objc_tools/xcodegen/java/com/google/devtools/build/xcode/xcodegen/LibraryObjects.java", "license": "apache-2.0", "size": 4633 }
[ "com.facebook.buck.apple.xcode.xcodeproj.PBXReference" ]
import com.facebook.buck.apple.xcode.xcodeproj.PBXReference;
import com.facebook.buck.apple.xcode.xcodeproj.*;
[ "com.facebook.buck" ]
com.facebook.buck;
82,639
public boolean addNewCompanyProfile(final CompanyProfile companyProfile);
boolean function(final CompanyProfile companyProfile);
/** * Save a new CompanyProfile record * @param companyProfile CompanyProfile record * @return */
Save a new CompanyProfile record
addNewCompanyProfile
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "profile2/impl/src/java/org/sakaiproject/profile2/dao/ProfileDao.java", "license": "apache-2.0", "size": 19837 }
[ "org.sakaiproject.profile2.model.CompanyProfile" ]
import org.sakaiproject.profile2.model.CompanyProfile;
import org.sakaiproject.profile2.model.*;
[ "org.sakaiproject.profile2" ]
org.sakaiproject.profile2;
1,180,418
public void start() throws LifecycleException { // Validate and update our current component state if (started) throw new LifecycleException (sm.getString("realmBase.alreadyStarted")); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; // Create a MessageDigest inst...
void function() throws LifecycleException { if (started) throw new LifecycleException (sm.getString(STR)); lifecycle.fireLifecycleEvent(START_EVENT, null); started = true; if (digest != null) { try { md = MessageDigest.getInstance(digest); } catch (NoSuchAlgorithmException e) { throw new LifecycleException (sm.getStrin...
/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called before any of the public * methods of this component are utilized. It should also send a * LifecycleEvent of type START_EVENT to any registered listeners. * * @throws LifecycleExcept...
Prepare for the beginning of active use of the public methods of this component. This method should be called before any of the public methods of this component are utilized. It should also send a LifecycleEvent of type START_EVENT to any registered listeners
start
{ "repo_name": "NorthFacing/step-by-Java", "path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/realm/RealmBase.java", "license": "gpl-2.0", "size": 20806 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException", "org.apache.catalina.LifecycleException" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import org.apache.catalina.LifecycleException;
import java.security.*; import org.apache.catalina.*;
[ "java.security", "org.apache.catalina" ]
java.security; org.apache.catalina;
700,387
public static ExertionEnvelop getTemplate(Uuid exertionID, String providerName) { ExertionEnvelop ee = getTemplate(); ee.exertionID = exertionID; ee.providerName = providerName; return ee; }
static ExertionEnvelop function(Uuid exertionID, String providerName) { ExertionEnvelop ee = getTemplate(); ee.exertionID = exertionID; ee.providerName = providerName; return ee; }
/** * Create a template for mograms. * * @param exertionID * @param providerName * @return */
Create a template for mograms
getTemplate
{ "repo_name": "mwsobol/SORCER", "path": "core/sorcer-platform/src/main/java/sorcer/core/exertion/ExertionEnvelop.java", "license": "apache-2.0", "size": 5430 }
[ "net.jini.id.Uuid" ]
import net.jini.id.Uuid;
import net.jini.id.*;
[ "net.jini.id" ]
net.jini.id;
1,534,277
public boolean enlistResource(XAResource xaRes) throws RollbackException, SystemException, IllegalStateException { if (tc.isEntryEnabled()) Tr.entry(tc, "enlistResource", xaRes); // Determine if we are attempting to enlist a second resource within a transaction // that can't sup...
boolean function(XAResource xaRes) throws RollbackException, SystemException, IllegalStateException { if (tc.isEntryEnabled()) Tr.entry(tc, STR, xaRes); if (_disableTwoPhase && (_resourceObjects.size() > 0)) { final String msg = STR + STR; final IllegalStateException ise = new IllegalStateException(msg); if (tc.isEntry...
/** * Attempts to add a one-Phase XA Resource to this unit of work. * * @param xaRes The XAResource to add to this unit of work * * @return true if the resource was added, false if not. * * @throws RollbackException if enlistment fails * @throws SystemException if unexpected er...
Attempts to add a one-Phase XA Resource to this unit of work
enlistResource
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/RegisteredResources.java", "license": "epl-1.0", "size": 124704 }
[ "com.ibm.tx.jta.OnePhaseXAResource", "com.ibm.websphere.ras.Tr", "com.ibm.ws.Transaction", "com.ibm.ws.ffdc.FFDCFilter", "javax.transaction.RollbackException", "javax.transaction.SystemException", "javax.transaction.xa.XAResource" ]
import com.ibm.tx.jta.OnePhaseXAResource; import com.ibm.websphere.ras.Tr; import com.ibm.ws.Transaction; import com.ibm.ws.ffdc.FFDCFilter; import javax.transaction.RollbackException; import javax.transaction.SystemException; import javax.transaction.xa.XAResource;
import com.ibm.tx.jta.*; import com.ibm.websphere.ras.*; import com.ibm.ws.*; import com.ibm.ws.ffdc.*; import javax.transaction.*; import javax.transaction.xa.*;
[ "com.ibm.tx", "com.ibm.websphere", "com.ibm.ws", "javax.transaction" ]
com.ibm.tx; com.ibm.websphere; com.ibm.ws; javax.transaction;
929,990
public Fop newFop(String outputFormat, OutputStream stream) throws FOPException { return newFOUserAgent().newFop(outputFormat, stream); }
Fop function(String outputFormat, OutputStream stream) throws FOPException { return newFOUserAgent().newFop(outputFormat, stream); }
/** * Returns a new {@link Fop} instance. FOP will be configured with a default user agent * instance. Use this factory method if your output type requires an output stream. * <p> * MIME types are used to select the output format (ex. "application/pdf" for PDF). You can * use the constants defi...
Returns a new <code>Fop</code> instance. FOP will be configured with a default user agent instance. Use this factory method if your output type requires an output stream. MIME types are used to select the output format (ex. "application/pdf" for PDF). You can use the constants defined in <code>MimeConstants</code>
newFop
{ "repo_name": "apache/fop", "path": "fop-core/src/main/java/org/apache/fop/apps/FopFactory.java", "license": "apache-2.0", "size": 17647 }
[ "java.io.OutputStream" ]
import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,680,942
static BooleanLiteralSet getBooleanOutcomes(BooleanLiteralSet left, BooleanLiteralSet right, boolean condition) { return right.union(left.intersection(BooleanLiteralSet.get(!condition))); } private final class BooleanOutcomePair { final BooleanLiteralSet toBooleanOutcomes; final BooleanLiter...
static BooleanLiteralSet getBooleanOutcomes(BooleanLiteralSet left, BooleanLiteralSet right, boolean condition) { return right.union(left.intersection(BooleanLiteralSet.get(!condition))); } private final class BooleanOutcomePair { final BooleanLiteralSet toBooleanOutcomes; final BooleanLiteralSet booleanValues; final F...
/** * Infers the boolean literal set that can be taken by a * short-circuiting binary operation ({@code &&} or {@code ||}). * @param left the set of possible {@code ToBoolean} predicate results for * the expression on the left side of the operator * @param right the set of possible {@code ToBoolean} p...
Infers the boolean literal set that can be taken by a short-circuiting binary operation (&& or ||)
getBooleanOutcomes
{ "repo_name": "h4ck3rm1k3/javascript-closure-compiler-git", "path": "src/com/google/javascript/jscomp/TypeInference.java", "license": "apache-2.0", "size": 52310 }
[ "com.google.javascript.jscomp.type.FlowScope", "com.google.javascript.rhino.jstype.BooleanLiteralSet" ]
import com.google.javascript.jscomp.type.FlowScope; import com.google.javascript.rhino.jstype.BooleanLiteralSet;
import com.google.javascript.jscomp.type.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
1,732,261
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { if(request.getParameter("view")!=null){ ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); try (PrintWriter out = response.getWriter()) { if(request.getParameter("view")!=null){ HttpSession session = request.getSession(); int pk_user = 0; if(session.getAttribute(STR)!=n...
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "CaehLabControl/ClientManager", "path": "src/java/services/menuServices.java", "license": "gpl-2.0", "size": 4568 }
[ "java.io.IOException", "java.io.PrintWriter", "java.util.ArrayList", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "javax.servlet.http.HttpSession", "org.json.simple.JSONArray", "org.json.simple.JSONObject" ]
import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.json.simple.JSONArray; import org.json.simple.JSONObje...
import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.json.simple.*;
[ "java.io", "java.util", "javax.servlet", "org.json.simple" ]
java.io; java.util; javax.servlet; org.json.simple;
1,679,576