method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public boolean addDataSetElement( DataElement dataElement )
{
DataSetElement element = new DataSetElement( this, dataElement, null );
dataElement.getDataSetElements().add( element );
return dataSetElements.add( element );
} | boolean function( DataElement dataElement ) { DataSetElement element = new DataSetElement( this, dataElement, null ); dataElement.getDataSetElements().add( element ); return dataSetElements.add( element ); } | /**
* Adds a data set element using this data set, the given data element and
* no category combo.
*
* @param dataElement the data element.
*/ | Adds a data set element using this data set, the given data element and no category combo | addDataSetElement | {
"repo_name": "vmluan/dhis2-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java",
"license": "bsd-3-clause",
"size": 28471
} | [
"org.hisp.dhis.dataelement.DataElement"
] | import org.hisp.dhis.dataelement.DataElement; | import org.hisp.dhis.dataelement.*; | [
"org.hisp.dhis"
] | org.hisp.dhis; | 125,016 |
@VisibleForTesting
public Environment getEnvironment() {
return globalEnv;
} | Environment function() { return globalEnv; } | /**
* Returns the static environment initialized once and shared by all packages
* created by this factory. No updates occur to this environment once created.
*/ | Returns the static environment initialized once and shared by all packages created by this factory. No updates occur to this environment once created | getEnvironment | {
"repo_name": "charlieaustin/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java",
"license": "apache-2.0",
"size": 56209
} | [
"com.google.devtools.build.lib.syntax.Environment"
] | import com.google.devtools.build.lib.syntax.Environment; | import com.google.devtools.build.lib.syntax.*; | [
"com.google.devtools"
] | com.google.devtools; | 74,499 |
private static Object getLockOwner(final TransactionSynchronizationRegistry transactionSynchronizationRegistry) {
Object owner = transactionSynchronizationRegistry.getTransactionKey();
return owner != null ? owner : Thread.currentThread();
} | static Object function(final TransactionSynchronizationRegistry transactionSynchronizationRegistry) { Object owner = transactionSynchronizationRegistry.getTransactionKey(); return owner != null ? owner : Thread.currentThread(); } | /**
* Use either the active transaction or the current thread as the lock owner
*
* @param transactionSynchronizationRegistry
* The synronization registry
* @return The lock owner
*/ | Use either the active transaction or the current thread as the lock owner | getLockOwner | {
"repo_name": "tomazzupan/wildfly",
"path": "ejb3/src/main/java/org/jboss/as/ejb3/component/stateful/StatefulSessionSynchronizationInterceptor.java",
"license": "lgpl-2.1",
"size": 15815
} | [
"javax.transaction.TransactionSynchronizationRegistry"
] | import javax.transaction.TransactionSynchronizationRegistry; | import javax.transaction.*; | [
"javax.transaction"
] | javax.transaction; | 2,433,487 |
public File getSubsequentSpaceTestSet() {
return m_SubsequentSpaceTestSet;
} | File function() { return m_SubsequentSpaceTestSet; } | /**
* Gets the test set to use for the sub-sequent sub-spaces.
*
* @return the test set, ignored if dir.
*/ | Gets the test set to use for the sub-sequent sub-spaces | getSubsequentSpaceTestSet | {
"repo_name": "Waikato/meka",
"path": "src/main/java/meka/core/multisearch/MekaSearch.java",
"license": "gpl-3.0",
"size": 23805
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,792,949 |
public void mousePressed(MouseEvent me) {} | public void mousePressed(MouseEvent me) {} | /**
* Required by {@link MouseListener} I/F but not actually needed in our
* case, no-operation implementation.
* @see MouseListener#mouseClicked(MouseEvent)
*/ | Required by <code>MouseListener</code> I/F but not actually needed in our case, no-operation implementation | mouseClicked | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/actions/ActivityImageAction.java",
"license": "gpl-2.0",
"size": 4269
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 82,648 |
public static StereoSGBM create(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff) {
return StereoSGBM.__fromPtr__(create_5(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff));
} | static StereoSGBM function(int minDisparity, int numDisparities, int blockSize, int P1, int P2, int disp12MaxDiff) { return StereoSGBM.__fromPtr__(create_5(minDisparity, numDisparities, blockSize, P1, P2, disp12MaxDiff)); } | /**
* Creates StereoSGBM object
*
* @param minDisparity Minimum possible disparity value. Normally, it is zero but sometimes
* rectification algorithms can shift images, so this parameter needs to be adjusted accordingly.
* @param numDisparities Maximum disparity minus minimum dispa... | Creates StereoSGBM object | create | {
"repo_name": "HuTianQi/QQ",
"path": "openCVLibrary411/src/main/java/org/opencv/calib3d/StereoSGBM.java",
"license": "mit",
"size": 40594
} | [
"org.opencv.calib3d.StereoSGBM"
] | import org.opencv.calib3d.StereoSGBM; | import org.opencv.calib3d.*; | [
"org.opencv.calib3d"
] | org.opencv.calib3d; | 1,048,222 |
EReference getElement_Constraints(); | EReference getElement_Constraints(); | /**
* Returns the meta object for the containment reference list '{@link IFML.Core.Element#getConstraints <em>Constraints</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Constraints</em>'.
* @see IFML.Core.Element#getConstraints()
*... | Returns the meta object for the containment reference list '<code>IFML.Core.Element#getConstraints Constraints</code>'. | getElement_Constraints | {
"repo_name": "ifml/ifml-editor",
"path": "plugins/IFMLEditor/src/IFML/Core/CorePackage.java",
"license": "mit",
"size": 245317
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,546,741 |
protected Cookie getCookieByName(final HttpServletRequest request, final String name) {
final Cookie[] cookies = request.getCookies();
if (cookies != null) {
for (final Cookie cookie : cookies) {
if (name.equals(cookie.getName())) {
return cookie;
}
}
}
return nu... | Cookie function(final HttpServletRequest request, final String name) { final Cookie[] cookies = request.getCookies(); if (cookies != null) { for (final Cookie cookie : cookies) { if (name.equals(cookie.getName())) { return cookie; } } } return null; } | /**
* Retrieves a cookie by name. Potential issue in performance if a lot of
* cookie variables are used.
*/ | Retrieves a cookie by name. Potential issue in performance if a lot of cookie variables are used | getCookieByName | {
"repo_name": "tianjianinline/azkaban-psbc",
"path": "azkaban-web-server/src/main/java/azkaban/webapp/servlet/AbstractAzkabanServlet.java",
"license": "apache-2.0",
"size": 12324
} | [
"javax.servlet.http.Cookie",
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,706,232 |
public static void
copyData(BufferedImage src, Rectangle srcRect,
BufferedImage dst, Point destP) {
boolean srcAlpha = src.getColorModel().hasAlpha();
boolean dstAlpha = dst.getColorModel().hasAlpha();
// System.out.println("Src has: " + srcAlpha +
... | static void function(BufferedImage src, Rectangle srcRect, BufferedImage dst, Point destP) { boolean srcAlpha = src.getColorModel().hasAlpha(); boolean dstAlpha = dst.getColorModel().hasAlpha(); if (srcAlpha == dstAlpha) { if (!srcAlpha src.isAlphaPremultiplied() == dst.isAlphaPremultiplied()) { copyData(src.getRaster(... | /**
* Copies data from one bufferedImage to another paying attention
* to the state of AlphaPreMultiplied.
*
* @param src The source
* @param srcRect The Rectangle of source data to be copied
* @param dst The destination
* @param destP The Place for the upper left corner of srcRect in... | Copies data from one bufferedImage to another paying attention to the state of AlphaPreMultiplied | copyData | {
"repo_name": "apache/xml-graphics-commons",
"path": "src/main/java/org/apache/xmlgraphics/image/GraphicsUtil.java",
"license": "apache-2.0",
"size": 46306
} | [
"java.awt.Point",
"java.awt.Rectangle",
"java.awt.image.BufferedImage",
"java.awt.image.Raster",
"java.awt.image.WritableRaster"
] | import java.awt.Point; import java.awt.Rectangle; import java.awt.image.BufferedImage; import java.awt.image.Raster; import java.awt.image.WritableRaster; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,146,525 |
public boolean isInvalidated(CacheKey key) {
return isInvalidated(key, System.currentTimeMillis());
}
| boolean function(CacheKey key) { return isInvalidated(key, System.currentTimeMillis()); } | /**
* INTERNAL:
* return true if this object is expire, false otherwise.
*/ | return true if this object is expire, false otherwise | isInvalidated | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/invalidation/CacheInvalidationPolicy.java",
"license": "epl-1.0",
"size": 7274
} | [
"org.eclipse.persistence.internal.identitymaps.CacheKey"
] | import org.eclipse.persistence.internal.identitymaps.CacheKey; | import org.eclipse.persistence.internal.identitymaps.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 1,419,318 |
public void setQueryParams(Set<String> queryParams) {
this.server.setQueryParams(queryParams);
}
class Runner implements Runnable {
final Lock runnerLock = new ReentrantLock(); | void function(Set<String> queryParams) { this.server.setQueryParams(queryParams); } class Runner implements Runnable { final Lock runnerLock = new ReentrantLock(); | /**
* Expert Method.
* @param queryParams set of param keys to only send via the query string
*/ | Expert Method | setQueryParams | {
"repo_name": "cscorley/solr-only-mirror",
"path": "solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrServer.java",
"license": "apache-2.0",
"size": 17801
} | [
"java.util.Set",
"java.util.concurrent.locks.Lock",
"java.util.concurrent.locks.ReentrantLock"
] | import java.util.Set; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; | import java.util.*; import java.util.concurrent.locks.*; | [
"java.util"
] | java.util; | 1,480,345 |
public static SingleSignOnService makeSingleSignOnService(String binding, String location) {
SingleSignOnService service = singleSignOnServiceBuilder.buildObject();
service.setBinding(binding);
service.setLocation(location);
return service;
} | static SingleSignOnService function(String binding, String location) { SingleSignOnService service = singleSignOnServiceBuilder.buildObject(); service.setBinding(binding); service.setLocation(location); return service; } | /**
* Static factory for SAML {@link SingleSignOnService} objects.
*
* @param binding The SAML binding implemented by this service.
* @param location The URL that the service listens to.
* @return A new <code>SingleSignOnService</code> object.
*/ | Static factory for SAML <code>SingleSignOnService</code> objects | makeSingleSignOnService | {
"repo_name": "dweidenfeld/library",
"path": "src/com/google/enterprise/adaptor/secmgr/saml/OpenSamlUtil.java",
"license": "apache-2.0",
"size": 43010
} | [
"org.opensaml.saml2.metadata.SingleSignOnService"
] | import org.opensaml.saml2.metadata.SingleSignOnService; | import org.opensaml.saml2.metadata.*; | [
"org.opensaml.saml2"
] | org.opensaml.saml2; | 2,398,044 |
void updateOperationOrders(Timesheet timesheet) throws AxelorException; | void updateOperationOrders(Timesheet timesheet) throws AxelorException; | /**
* Given an unsaved timesheet, update the related orders by taking all timesheet lines and
* timesheet lines in db.
*
* @param timesheet an unsaved timesheet.
*/ | Given an unsaved timesheet, update the related orders by taking all timesheet lines and timesheet lines in db | updateOperationOrders | {
"repo_name": "ama-axelor/axelor-business-suite",
"path": "axelor-business-production/src/main/java/com/axelor/apps/businessproduction/service/OperationOrderTimesheetService.java",
"license": "agpl-3.0",
"size": 1929
} | [
"com.axelor.apps.hr.db.Timesheet",
"com.axelor.exception.AxelorException"
] | import com.axelor.apps.hr.db.Timesheet; import com.axelor.exception.AxelorException; | import com.axelor.apps.hr.db.*; import com.axelor.exception.*; | [
"com.axelor.apps",
"com.axelor.exception"
] | com.axelor.apps; com.axelor.exception; | 2,434,850 |
public boolean setBaudrate(int baudrate) {
byte[] baudByte = new byte[4];
baudByte[0] = (byte) (baudrate & 0x000000FF);
baudByte[1] = (byte) ((baudrate & 0x0000FF00) >> 8);
baudByte[2] = (byte) ((baudrate & 0x00FF0000) >> 16);
baudByte[3] = (byte) ((baudrate & 0xFF000000) >>... | boolean function(int baudrate) { byte[] baudByte = new byte[4]; baudByte[0] = (byte) (baudrate & 0x000000FF); baudByte[1] = (byte) ((baudrate & 0x0000FF00) >> 8); baudByte[2] = (byte) ((baudrate & 0x00FF0000) >> 16); baudByte[3] = (byte) ((baudrate & 0xFF000000) >> 24); int ret = mConnection.controlTransfer(0x21, 0x20,... | /**
* Sets baudrate
*
* @param baudrate baudrate e.g. 9600
* @return true : successful, false : fail
*/ | Sets baudrate | setBaudrate | {
"repo_name": "cattaka/PhysicaloidVc",
"path": "physicaloid/src/main/java/com/physicaloid/lib/usb/driver/uart/UartCdcAcm.java",
"license": "apache-2.0",
"size": 12590
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 223,458 |
public final Translation getTranslation() {
return this.translation;
} | final Translation function() { return this.translation; } | /**
* Returns the translation of this {@link Text}.
*
* @return The translation of this text
*/ | Returns the translation of this <code>Text</code> | getTranslation | {
"repo_name": "SpongeHistory/SpongeAPI-History",
"path": "src/main/java/org/spongepowered/api/text/Text.java",
"license": "mit",
"size": 20866
} | [
"org.spongepowered.api.text.translation.Translation"
] | import org.spongepowered.api.text.translation.Translation; | import org.spongepowered.api.text.translation.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 717,349 |
@Override
public void validate(final IDescription d) {
final IExpressionDescription fDesc = d.getFacet(EQUATION_LEFT);
final IExpression func = fDesc.getExpression();
final IExpressionDescription eDesc = d.getFacet(EQUATION_RIGHT);
final IExpression expr = eDesc.getExpression();
final boolean isF... | void function(final IDescription d) { final IExpressionDescription fDesc = d.getFacet(EQUATION_LEFT); final IExpression func = fDesc.getExpression(); final IExpressionDescription eDesc = d.getFacet(EQUATION_RIGHT); final IExpression expr = eDesc.getExpression(); final boolean isFunction = func instanceof IOperator && o... | /**
* Method validate()
*
* @see msi.gaml.compilation.IDescriptionValidator#validate(msi.gaml.descriptions.IDescription)
*/ | Method validate() | validate | {
"repo_name": "hqnghi88/gamaClone",
"path": "ummisco.gaml.extensions.maths/src/ummisco/gaml/extensions/maths/ode/statements/SingleEquationStatement.java",
"license": "gpl-3.0",
"size": 10191
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 280,664 |
List<RistorantePosition> getAll(); | List<RistorantePosition> getAll(); | /**
* Returns all the position
*
* @return all the position
*/ | Returns all the position | getAll | {
"repo_name": "alessandro-vincelli/youeat",
"path": "src/main/java/it/av/youeat/service/RistorantePositionService.java",
"license": "apache-2.0",
"size": 2875
} | [
"it.av.youeat.ocm.model.geo.RistorantePosition",
"java.util.List"
] | import it.av.youeat.ocm.model.geo.RistorantePosition; import java.util.List; | import it.av.youeat.ocm.model.geo.*; import java.util.*; | [
"it.av.youeat",
"java.util"
] | it.av.youeat; java.util; | 2,042,742 |
public Optional<Integer> getThresholdNumber() {
return thresholdNumber;
} | Optional<Integer> function() { return thresholdNumber; } | /**
* Gets the threshold number within a threshold register.
*
* @return the threshold number
*/ | Gets the threshold number within a threshold register | getThresholdNumber | {
"repo_name": "paulianttila/openhab2",
"path": "bundles/org.openhab.binding.lcn/src/main/java/org/openhab/binding/lcn/internal/common/Variable.java",
"license": "epl-1.0",
"size": 11228
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 586,489 |
public ThriftServiceRegistrationBean addExampleHeaders(String methodName, HttpHeaders exampleHeaders) {
return addExampleHeaders(ExampleHeaders.of(methodName, exampleHeaders));
} | ThriftServiceRegistrationBean function(String methodName, HttpHeaders exampleHeaders) { return addExampleHeaders(ExampleHeaders.of(methodName, exampleHeaders)); } | /**
* Adds an example HTTP header for the specified method.
*/ | Adds an example HTTP header for the specified method | addExampleHeaders | {
"repo_name": "anuraaga/armeria",
"path": "spring/boot-autoconfigure/src/main/java/com/linecorp/armeria/spring/ThriftServiceRegistrationBean.java",
"license": "apache-2.0",
"size": 3805
} | [
"com.linecorp.armeria.common.HttpHeaders"
] | import com.linecorp.armeria.common.HttpHeaders; | import com.linecorp.armeria.common.*; | [
"com.linecorp.armeria"
] | com.linecorp.armeria; | 51,755 |
public static List<FieldInfo> getRemoteFields() throws SophieException {
LukeRequest request = new LukeRequest();
try {
LukeResponse response = request.process(Sophie.client);
return new ArrayList<FieldInfo>(response.getFieldInfo().values());
} catch (SolrServerExcept... | static List<FieldInfo> function() throws SophieException { LukeRequest request = new LukeRequest(); try { LukeResponse response = request.process(Sophie.client); return new ArrayList<FieldInfo>(response.getFieldInfo().values()); } catch (SolrServerException IOException SolrException e) { throw new SophieException(STR, ... | /**
* Get list of instantiated fields from the remote Solr server.
*
* Dynamic fields are named according to how they are instantiated (e.g.
* dynamic_foobar).
*
* @return List of fields defined on the remote Solr server.
* @throws SophieException
* If the remote fi... | Get list of instantiated fields from the remote Solr server. Dynamic fields are named according to how they are instantiated (e.g. dynamic_foobar) | getRemoteFields | {
"repo_name": "fengtan/sophie",
"path": "src/main/java/com/github/fengtan/sophie/beans/SolrUtils.java",
"license": "gpl-3.0",
"size": 11659
} | [
"com.github.fengtan.sophie.Sophie",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.solr.client.solrj.SolrServerException",
"org.apache.solr.client.solrj.request.LukeRequest",
"org.apache.solr.client.solrj.response.LukeResponse",
"org.apache.solr.common.SolrException"
] | import com.github.fengtan.sophie.Sophie; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.request.LukeRequest; import org.apache.solr.client.solrj.response.LukeResponse; import org.apache.solr.comm... | import com.github.fengtan.sophie.*; import java.io.*; import java.util.*; import org.apache.solr.client.solrj.*; import org.apache.solr.client.solrj.request.*; import org.apache.solr.client.solrj.response.*; import org.apache.solr.common.*; | [
"com.github.fengtan",
"java.io",
"java.util",
"org.apache.solr"
] | com.github.fengtan; java.io; java.util; org.apache.solr; | 2,507,473 |
private void appendOrAnd(BinaryOperationNode node, boolean isOr) throws TranslationException {
node.getLhs().accept(this);
mv.visitInsn(DUP); // place three lhs es on the stack
mv.visitInsn(DUP);
Label l1 = new Label();
mv.visitJumpInsn(IFNULL, l1); // if lh... | void function(BinaryOperationNode node, boolean isOr) throws TranslationException { node.getLhs().accept(this); mv.visitInsn(DUP); mv.visitInsn(DUP); Label l1 = new Label(); mv.visitJumpInsn(IFNULL, l1); mv.visitMethodInsn(INVOKEVIRTUAL, STR, STR, "()Z", false); Label l2 = new Label(); mv.visitJumpInsn(isOr ? IFEQ : IF... | /**
* Appends the or-operation, or appends the and-operation.
* @param node The node to append, which is an binary operation node since both the OrNode and the AndNode are.
* @param isOr if {@code true} then the operation to append is the or-operation, otherwise it is the and-operation.
* @throws TranslationExc... | Appends the or-operation, or appends the and-operation | appendOrAnd | {
"repo_name": "gmulders/abacus",
"path": "translator-java/src/main/java/org/gertje/abacus/translator/java/nodevisitors/ClassTranslator.java",
"license": "apache-2.0",
"size": 34568
} | [
"org.gertje.abacus.nodes.BinaryOperationNode",
"org.objectweb.asm.Label"
] | import org.gertje.abacus.nodes.BinaryOperationNode; import org.objectweb.asm.Label; | import org.gertje.abacus.nodes.*; import org.objectweb.asm.*; | [
"org.gertje.abacus",
"org.objectweb.asm"
] | org.gertje.abacus; org.objectweb.asm; | 2,708,396 |
@Override
public void writeToNBT( NBTTagCompound tagCompound )
{
tagCompound.setString( "value", this.value );
} | void function( NBTTagCompound tagCompound ) { tagCompound.setString( "value", this.value ); } | /********************************************************************************
* Methods - Implement Packageable
********************************************************************************/ | Methods - Implement Packageable | writeToNBT | {
"repo_name": "DerOli82/yadm",
"path": "src/main/java/de/alaoli/games/minecraft/mods/yadm/data/settings/GeneratorOptionsSetting.java",
"license": "lgpl-3.0",
"size": 3665
} | [
"net.minecraft.nbt.NBTTagCompound"
] | import net.minecraft.nbt.NBTTagCompound; | import net.minecraft.nbt.*; | [
"net.minecraft.nbt"
] | net.minecraft.nbt; | 48,840 |
@WebMethod
@WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201505")
@RequestWrapper(localName = "createExchangeRates", targetNamespace = "https://www.google.com/apis/ads/publisher/v201505", className = "com.google.api.ads.dfp.jaxws.v201505.ExchangeRateServiceInterface... | @WebResult(name = "rval", targetNamespace = STRcreateExchangeRatesSTRhttps: @ResponseWrapper(localName = "createExchangeRatesResponseSTRhttps: List<ExchangeRate> function( @WebParam(name = "exchangeRatesSTRhttps: List<ExchangeRate> exchangeRates) throws ApiException_Exception ; | /**
*
* Creates new {@link ExchangeRate} objects.
*
* For each exchange rate, the following fields are required:
* <ul>
* <li>{@link ExchangeRate#currencyCode}</li>
* <li>{@link ExchangeRate#exchangeRate} when {@link ExchangeRate#refre... | Creates new <code>ExchangeRate</code> objects. For each exchange rate, the following fields are required: <code>ExchangeRate#currencyCode</code> <code>ExchangeRate#exchangeRate</code> when <code>ExchangeRate#refreshRate</code> is <code>ExchangeRateRefreshRate#FIXED</code> | createExchangeRates | {
"repo_name": "shyTNT/googleads-java-lib",
"path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201505/ExchangeRateServiceInterface.java",
"license": "apache-2.0",
"size": 8552
} | [
"java.util.List",
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.ws.ResponseWrapper"
] | import java.util.List; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper; | import java.util.*; import javax.jws.*; import javax.xml.ws.*; | [
"java.util",
"javax.jws",
"javax.xml"
] | java.util; javax.jws; javax.xml; | 463,001 |
@Override
public byte[] getCompressedAttributes(final String mbs, final ObjectName on, final QueryExp query, final String[] attrNames) {
return compress(getAttributes(mbs, on, query, attrNames));
}
| byte[] function(final String mbs, final ObjectName on, final QueryExp query, final String[] attrNames) { return compress(getAttributes(mbs, on, query, attrNames)); } | /**
* Locates all registered MBeans matching the criteria defined by the passed ObjectName and query
* and returns a compressed byte array containing the serialized bulk value map for all through {@link #getCompressedAttributes(Map)}.
* @param on The object name to match
* @param query The query to match
* @p... | Locates all registered MBeans matching the criteria defined by the passed ObjectName and query and returns a compressed byte array containing the serialized bulk value map for all through <code>#getCompressedAttributes(Map)</code> | getCompressedAttributes | {
"repo_name": "nickman/heliosutils",
"path": "src/main/java/com/heliosapm/utils/jmx/bulk/BulkJMXService.java",
"license": "apache-2.0",
"size": 18074
} | [
"javax.management.ObjectName",
"javax.management.QueryExp"
] | import javax.management.ObjectName; import javax.management.QueryExp; | import javax.management.*; | [
"javax.management"
] | javax.management; | 270,877 |
public Set<WrCyanPackage> getImportPackageSet() {
if ( iSetCyanPackage == null ) {
iSetCyanPackage = new HashSet<>();
Set<CyanPackage> cps = ((CompilationUnit ) hidden).getImportPackageSet();
if ( cps != null ) {
for ( final CyanPackage p : cps) {
this.iSetCyanPackage.add(p.getI());
}
}
... | Set<WrCyanPackage> function() { if ( iSetCyanPackage == null ) { iSetCyanPackage = new HashSet<>(); Set<CyanPackage> cps = ((CompilationUnit ) hidden).getImportPackageSet(); if ( cps != null ) { for ( final CyanPackage p : cps) { this.iSetCyanPackage.add(p.getI()); } } } return this.iSetCyanPackage; } Set<WrCyanPackage... | /**
* return the set of imported packages of this compilation unit
@return
*/ | return the set of imported packages of this compilation unit | getImportPackageSet | {
"repo_name": "joseoliv/Cyan",
"path": "meta/WrCompilationUnit.java",
"license": "gpl-3.0",
"size": 4625
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,563,609 |
public Bitmap.Config getBitmapConfig() {
return mBitmapConfig;
} | Bitmap.Config function() { return mBitmapConfig; } | /**
* Returns the Bitmap.Config that is used by this renderer.
*
* @return
*/ | Returns the Bitmap.Config that is used by this renderer | getBitmapConfig | {
"repo_name": "rahulmaddineni/Stayfit",
"path": "app/libs/MPAndroidChart-2.2.3/MPAndroidChart-2.2.3/MPChartLib/src/com/github/mikephil/charting/renderer/LineChartRenderer.java",
"license": "apache-2.0",
"size": 21030
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,293,118 |
@ServiceMethod(returns = ReturnType.SINGLE)
public VirtualMachineExtensionInner createOrUpdate(
String resourceGroupName,
String vmScaleSetName,
String instanceId,
String vmExtensionName,
VirtualMachineExtensionInner extensionParameters) {
return createOrUpdateAsy... | @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineExtensionInner function( String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { return createOrUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, vmExtensionName, ex... | /**
* The operation to create or update the VMSS VM extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceId The instance ID of the virtual machine.
* @param vmExtensionName The name of the virtual mac... | The operation to create or update the VMSS VM extension | createOrUpdate | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMExtensionsClientImpl.java",
"license": "mit",
"size": 76869
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.compute.fluent.models.VirtualMachineExtensionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineExtensionInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,777,772 |
public Timestamp getPendingAgeTimestamp() {
return pendingAgeTimestamp;
} | Timestamp function() { return pendingAgeTimestamp; } | /**
* Return the action last check time
*
* @return the last check time
*/ | Return the action last check time | getPendingAgeTimestamp | {
"repo_name": "cbaenziger/oozie",
"path": "core/src/main/java/org/apache/oozie/WorkflowActionBean.java",
"license": "apache-2.0",
"size": 37347
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,381,651 |
@SmallTest
public void testActionButtonBadRatio() throws InterruptedException {
Bitmap expectedIcon = createTestBitmap(60, 20);
Intent intent = createMinimalCustomTabIntent();
addActionButtonToIntent(intent, expectedIcon, "Good test");
startCustomTabActivityWithIntent(intent);
... | void function() throws InterruptedException { Bitmap expectedIcon = createTestBitmap(60, 20); Intent intent = createMinimalCustomTabIntent(); addActionButtonToIntent(intent, expectedIcon, STR); startCustomTabActivityWithIntent(intent); View toolbarView = getActivity().findViewById(R.id.toolbar); assertTrue(STR, toolbar... | /**
* Test the case that the action button should not be shown, given a bitmap with unacceptable
* height/width ratio.
*/ | Test the case that the action button should not be shown, given a bitmap with unacceptable height/width ratio | testActionButtonBadRatio | {
"repo_name": "hujiajie/chromium-crosswalk",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java",
"license": "bsd-3-clause",
"size": 38867
} | [
"android.content.Intent",
"android.graphics.Bitmap",
"android.view.View",
"android.widget.ImageButton",
"org.chromium.chrome.browser.toolbar.CustomTabToolbar"
] | import android.content.Intent; import android.graphics.Bitmap; import android.view.View; import android.widget.ImageButton; import org.chromium.chrome.browser.toolbar.CustomTabToolbar; | import android.content.*; import android.graphics.*; import android.view.*; import android.widget.*; import org.chromium.chrome.browser.toolbar.*; | [
"android.content",
"android.graphics",
"android.view",
"android.widget",
"org.chromium.chrome"
] | android.content; android.graphics; android.view; android.widget; org.chromium.chrome; | 957,506 |
public static void waitAll(Object o) {
if (MOP.isReifiedObject(o)) {
ProxyForGroup<?> theProxy = PAGroup.findProxyForGroup(o);
// If the object represents a group, we use the proxyForGroup's method
if (theProxy != null) {
theProxy.waitAll();
}... | static void function(Object o) { if (MOP.isReifiedObject(o)) { ProxyForGroup<?> theProxy = PAGroup.findProxyForGroup(o); if (theProxy != null) { theProxy.waitAll(); } } } | /**
* Waits for all the futures are arrived.
* @param o a typed group.
*/ | Waits for all the futures are arrived | waitAll | {
"repo_name": "lpellegr/programming",
"path": "programming-core/src/main/java/org/objectweb/proactive/api/PAGroup.java",
"license": "agpl-3.0",
"size": 79338
} | [
"org.objectweb.proactive.core.group.ProxyForGroup",
"org.objectweb.proactive.core.mop.MOP"
] | import org.objectweb.proactive.core.group.ProxyForGroup; import org.objectweb.proactive.core.mop.MOP; | import org.objectweb.proactive.core.group.*; import org.objectweb.proactive.core.mop.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 1,769,627 |
Set<String> getResultFiles(){
return model.getResultFiles();
}
| Set<String> getResultFiles(){ return model.getResultFiles(); } | /**
* Return the loaded resultfile file names.
* @return The loaded resultfile file names.
*/ | Return the loaded resultfile file names | getResultFiles | {
"repo_name": "Olshansk/PLSNPAIRS-Thesis",
"path": "pls/othertools/niftiextractor/NiftiExtractorController.java",
"license": "gpl-2.0",
"size": 6258
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 891,815 |
public boolean process(Phase phase, Context context); | boolean function(Phase phase, Context context); | /**
* Process the given {@link Phase} with the given {@link Context}.
* @param phase
* @param context
* @return
*/ | Process the given <code>Phase</code> with the given <code>Context</code> | process | {
"repo_name": "ryancblack/FoDBugTrackerUtility",
"path": "processrunner/src/main/java/com/fortify/processrunner/processor/IProcessor.java",
"license": "mit",
"size": 1107
} | [
"com.fortify.processrunner.context.Context"
] | import com.fortify.processrunner.context.Context; | import com.fortify.processrunner.context.*; | [
"com.fortify.processrunner"
] | com.fortify.processrunner; | 2,401,554 |
//~ Methods ------------------------------------------------------------------------------------
//-------------//
// buildBuffer //
//-------------//
public static ByteProcessor buildBuffer (int width,
int height,
... | static ByteProcessor function (int width, int height, Lag... lags) { final Point offset = new Point(0, 0); final ByteProcessor buf = new ByteProcessor(width, height); ByteUtil.raz(buf); for (Lag lag : lags) { for (Section section : lag.getEntities()) { section.fillBuffer(buf, offset); } } return buf; } | /**
* Populate a buffer with the content of all provided lags.
*
* @param width width of the target buffer
* @param height height of the target buffer
* @param lags the contributing lags
* @return the populated buffer
*/ | Populate a buffer with the content of all provided lags | buildBuffer | {
"repo_name": "Audiveris/audiveris",
"path": "src/main/org/audiveris/omr/lag/Lags.java",
"license": "agpl-3.0",
"size": 3426
} | [
"java.awt.Point",
"org.audiveris.omr.util.ByteUtil"
] | import java.awt.Point; import org.audiveris.omr.util.ByteUtil; | import java.awt.*; import org.audiveris.omr.util.*; | [
"java.awt",
"org.audiveris.omr"
] | java.awt; org.audiveris.omr; | 2,629,230 |
@SimpleProperty(
category = PropertyCategory.APPEARANCE)
public String Hint() {
return hint;
} | @SimpleProperty( category = PropertyCategory.APPEARANCE) String function() { return hint; } | /**
* Hint property getter method.
*
* @return hint text
*/ | Hint property getter method | Hint | {
"repo_name": "niteshmourya/app-inventor-for-android",
"path": "src/components/runtime/components/android/PasswordTextBox.java",
"license": "apache-2.0",
"size": 12090
} | [
"com.google.devtools.simple.common.PropertyCategory",
"com.google.devtools.simple.runtime.annotations.SimpleProperty"
] | import com.google.devtools.simple.common.PropertyCategory; import com.google.devtools.simple.runtime.annotations.SimpleProperty; | import com.google.devtools.simple.common.*; import com.google.devtools.simple.runtime.annotations.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,355,658 |
public void setAddLineLabelField(LabelField addLineLabelField) {
this.addLineLabelField = addLineLabelField;
} | void function(LabelField addLineLabelField) { this.addLineLabelField = addLineLabelField; } | /**
* Setter for the <code>LabelField</code> instance for the add line label
*
* @param addLineLabelField
* @see #getAddLineLabel()
*/ | Setter for the <code>LabelField</code> instance for the add line label | setAddLineLabelField | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-kns/src/main/java/org/kuali/kfs/krad/uif/container/CollectionGroup.java",
"license": "agpl-3.0",
"size": 26974
} | [
"org.kuali.kfs.krad.uif.field.LabelField"
] | import org.kuali.kfs.krad.uif.field.LabelField; | import org.kuali.kfs.krad.uif.field.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,591,786 |
public MessageBytes addValue( String name ) {
MimeHeaderField mh = createHeader();
mh.getName().setString(name);
return mh.getValue();
} | MessageBytes function( String name ) { MimeHeaderField mh = createHeader(); mh.getName().setString(name); return mh.getValue(); } | /** Create a new named header , return the MessageBytes
container for the new value
*/ | Create a new named header , return the MessageBytes | addValue | {
"repo_name": "plumer/codana",
"path": "tomcat_files/7.0.0/MimeHeaders.java",
"license": "mit",
"size": 14322
} | [
"org.apache.tomcat.util.buf.MessageBytes"
] | import org.apache.tomcat.util.buf.MessageBytes; | import org.apache.tomcat.util.buf.*; | [
"org.apache.tomcat"
] | org.apache.tomcat; | 2,295,238 |
@Test(expected = NullPointerException.class)
public void cleanseNullList() {
Geometry.cleanse((List<Vector2>)null);
}
| @Test(expected = NullPointerException.class) void function() { Geometry.cleanse((List<Vector2>)null); } | /**
* Tests the cleanse method passing a null list.
* @since 2.2.3
*/ | Tests the cleanse method passing a null list | cleanseNullList | {
"repo_name": "satishbabusee/dyn4j",
"path": "junit/org/dyn4j/geometry/GeometryTest.java",
"license": "bsd-3-clause",
"size": 54121
} | [
"java.util.List",
"org.dyn4j.geometry.Geometry",
"org.dyn4j.geometry.Vector2",
"org.junit.Test"
] | import java.util.List; import org.dyn4j.geometry.Geometry; import org.dyn4j.geometry.Vector2; import org.junit.Test; | import java.util.*; import org.dyn4j.geometry.*; import org.junit.*; | [
"java.util",
"org.dyn4j.geometry",
"org.junit"
] | java.util; org.dyn4j.geometry; org.junit; | 2,796,647 |
@SuppressWarnings("rawtypes")
protected String describeEntity(StringBuilder sb, String prefix, String id, String format, boolean extra, List<Class<? extends EntityProvider>> caps, Locale locale) {
if (caps == null) {
caps = entityProviderManager.getPrefixCapabilities(prefix);
}
... | @SuppressWarnings(STR) String function(StringBuilder sb, String prefix, String id, String format, boolean extra, List<Class<? extends EntityProvider>> caps, Locale locale) { if (caps == null) { caps = entityProviderManager.getPrefixCapabilities(prefix); } if (locale == null) { locale = entityProperties.getLocale(); } S... | /**
* This is reducing code duplication
* @param sb
* @param prefix
* @param id
* @param format
* @param extra
* @param caps
* @param locale used for translations
* @return the entity description
*/ | This is reducing code duplication | describeEntity | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "entitybroker/rest/src/java/org/sakaiproject/entitybroker/rest/EntityDescriptionManager.java",
"license": "apache-2.0",
"size": 62576
} | [
"java.util.List",
"java.util.Locale",
"org.sakaiproject.entitybroker.EntityReference",
"org.sakaiproject.entitybroker.EntityView",
"org.sakaiproject.entitybroker.access.EntityViewAccessProvider",
"org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider",
"org.sakaiproject.entitybroker.entityprov... | import java.util.List; import java.util.Locale; import org.sakaiproject.entitybroker.EntityReference; import org.sakaiproject.entitybroker.EntityView; import org.sakaiproject.entitybroker.access.EntityViewAccessProvider; import org.sakaiproject.entitybroker.entityprovider.CoreEntityProvider; import org.sakaiproject.ent... | import java.util.*; import org.sakaiproject.entitybroker.*; import org.sakaiproject.entitybroker.access.*; import org.sakaiproject.entitybroker.entityprovider.*; import org.sakaiproject.entitybroker.entityprovider.capabilities.*; import org.sakaiproject.entitybroker.entityprovider.extension.*; | [
"java.util",
"org.sakaiproject.entitybroker"
] | java.util; org.sakaiproject.entitybroker; | 1,337,333 |
public static TaskoRun lookupRunById(Long runId) {
Map params = new HashMap();
params.put("run_id", runId);
return (TaskoRun) singleton.lookupObjectByNamedQuery(
"TaskoRun.lookupById", params);
} | static TaskoRun function(Long runId) { Map params = new HashMap(); params.put(STR, runId); return (TaskoRun) singleton.lookupObjectByNamedQuery( STR, params); } | /**
* lookup run by id
* @param runId run id
* @return run
*/ | lookup run by id | lookupRunById | {
"repo_name": "dmacvicar/spacewalk",
"path": "java/code/src/com/redhat/rhn/taskomatic/TaskoFactory.java",
"license": "gpl-2.0",
"size": 16463
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 91,111 |
public PrintWriter getServletPrintWriter() {
return servletPrintWriter;
} | PrintWriter function() { return servletPrintWriter; } | /**
* Gets the servlet print writer.
*
* @return the servlet print writer
*/ | Gets the servlet print writer | getServletPrintWriter | {
"repo_name": "tmcsantos/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 199612
} | [
"java.io.PrintWriter"
] | import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,157,945 |
Duration getSearchTimeout(); | Duration getSearchTimeout(); | /**
* Gets search timeout.
*
* @return the search timeout
*/ | Gets search timeout | getSearchTimeout | {
"repo_name": "apereo/cas",
"path": "support/cas-server-support-couchbase-core/src/main/java/org/apereo/cas/couchbase/core/CouchbaseClientFactory.java",
"license": "apache-2.0",
"size": 6318
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 1,627,303 |
public static java.util.List extractProfile_ListOwnerList(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.Profile_ListOwnerVoCollection voCollection)
{
return extractProfile_ListOwnerList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.Profile_ListOwnerVoCollection voCollection) { return extractProfile_ListOwnerList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.scheduling.domain.objects.Profile_ListOwner list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.scheduling.domain.objects.Profile_ListOwner list from the value object collection | extractProfile_ListOwnerList | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/scheduling/vo/domain/Profile_ListOwnerVoAssembler.java",
"license": "agpl-3.0",
"size": 16670
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,241,477 |
public Position toPosition(World world){
return new Position(world, this.x, this.y, this.z);
} | Position function(World world){ return new Position(world, this.x, this.y, this.z); } | /**
* Create a position based from this vector with
* a provided world.
*
* @param world The world of the position
* @return A Position representation of this vector
*/ | Create a position based from this vector with a provided world | toPosition | {
"repo_name": "TridentSDK/TridentSDK",
"path": "src/main/java/net/tridentsdk/base/AbstractVector.java",
"license": "apache-2.0",
"size": 14779
} | [
"net.tridentsdk.world.World"
] | import net.tridentsdk.world.World; | import net.tridentsdk.world.*; | [
"net.tridentsdk.world"
] | net.tridentsdk.world; | 1,379,364 |
default float[] aryEq(float[] value) {
return AdditionalMatchers.aryEq(value);
} | default float[] aryEq(float[] value) { return AdditionalMatchers.aryEq(value); } | /**
* Delegates call to {@link AdditionalMatchers#aryEq(float[])}.
*/ | Delegates call to <code>AdditionalMatchers#aryEq(float[])</code> | aryEq | {
"repo_name": "szpak/mockito-java8",
"path": "src/main/java/info/solidsoft/mockito/java8/api/WithAdditionalMatchers.java",
"license": "apache-2.0",
"size": 12875
} | [
"org.mockito.AdditionalMatchers"
] | import org.mockito.AdditionalMatchers; | import org.mockito.*; | [
"org.mockito"
] | org.mockito; | 471,892 |
public static SortType getByStringValue(String value) {
SortType sortType = serviceDefault;
if (value != null) {
if ("title".equals(value)) {
sortType = title;
} else if ("publicationDate".equals(value)) {
sortType ... | static SortType function(String value) { SortType sortType = serviceDefault; if (value != null) { if ("title".equals(value)) { sortType = title; } else if (STR.equals(value)) { sortType = publicationDate; } } return sortType; } } private String anyText; private String title = null; private String abstract_ = null; priv... | /**
* gets a SortType enum based upon the string that is passed in. If the
* string is not valid then return a default.
*
* @param value
* the value to test
* @return a SortType enum if the value was okay
*/ | gets a SortType enum based upon the string that is passed in. If the string is not valid then return a default | getByStringValue | {
"repo_name": "joshvote/portal-core",
"path": "src/main/java/org/auscope/portal/core/services/methodmakers/filter/csw/CSWGetDataRecordsFilter.java",
"license": "gpl-3.0",
"size": 20971
} | [
"org.auscope.portal.core.services.methodmakers.filter.FilterBoundingBox",
"org.joda.time.DateTime"
] | import org.auscope.portal.core.services.methodmakers.filter.FilterBoundingBox; import org.joda.time.DateTime; | import org.auscope.portal.core.services.methodmakers.filter.*; import org.joda.time.*; | [
"org.auscope.portal",
"org.joda.time"
] | org.auscope.portal; org.joda.time; | 623,914 |
public Adapter createMdfDatasetDerivedPropertyAdapter() {
return null;
} | Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '{@link com.odcgroup.mdf.metamodel.MdfDatasetDerivedProperty <em>Dataset Derived Property</em>}'.
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* @... | Creates a new adapter for an object of class '<code>com.odcgroup.mdf.metamodel.MdfDatasetDerivedProperty Dataset Derived Property</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway | createMdfDatasetDerivedPropertyAdapter | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/domain/core/com.odcgroup.mdf.ecore/src/main/java/com/odcgroup/mdf/ecore/util/MdfAdapterFactory.java",
"license": "epl-1.0",
"size": 13679
} | [
"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,030,244 |
List<ServiceStatusResponse> listServices(); | List<ServiceStatusResponse> listServices(); | /**
* Returns the status of services
*
* @return The status of services
*/ | Returns the status of services | listServices | {
"repo_name": "claudiu-stanciu/kylo",
"path": "services/service-monitor-service/service-monitor-service-api/src/main/java/com/thinkbiganalytics/servicemonitor/ServiceMonitorRepository.java",
"license": "apache-2.0",
"size": 1013
} | [
"com.thinkbiganalytics.servicemonitor.model.ServiceStatusResponse",
"java.util.List"
] | import com.thinkbiganalytics.servicemonitor.model.ServiceStatusResponse; import java.util.List; | import com.thinkbiganalytics.servicemonitor.model.*; import java.util.*; | [
"com.thinkbiganalytics.servicemonitor",
"java.util"
] | com.thinkbiganalytics.servicemonitor; java.util; | 1,642,201 |
void enterNewExpression(@NotNull ECMAScriptParser.NewExpressionContext ctx);
void exitNewExpression(@NotNull ECMAScriptParser.NewExpressionContext ctx); | void enterNewExpression(@NotNull ECMAScriptParser.NewExpressionContext ctx); void exitNewExpression(@NotNull ECMAScriptParser.NewExpressionContext ctx); | /**
* Exit a parse tree produced by {@link ECMAScriptParser#NewExpression}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>ECMAScriptParser#NewExpression</code> | exitNewExpression | {
"repo_name": "IsThisThePayneResidence/intellidots",
"path": "src/main/java/ua/edu/hneu/ast/parsers/ECMAScriptListener.java",
"license": "gpl-3.0",
"size": 39591
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 44,078 |
protected int shouldReplaceFile(File file)
{
replaceBox.setMessage(L10N.get("PV.FileExistsReplace?",
"File exists. Replace file?")
+ "\n" + file.getAbsolutePath());
return replaceBox.open();
} | int function(File file) { replaceBox.setMessage(L10N.get(STR, STR) + "\n" + file.getAbsolutePath()); return replaceBox.open(); } | /**
* Prompt user whether a file should be replaced with the Project's data.
* @param file the file that may be replaced
* @return true if the file should be replaced, false if it should not be
*/ | Prompt user whether a file should be replaced with the Project's data | shouldReplaceFile | {
"repo_name": "cogtool/cogtool",
"path": "java/edu/cmu/cs/hcii/cogtool/view/PersistenceView.java",
"license": "lgpl-2.1",
"size": 13016
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 225,526 |
public int anySetBit() {
if (SanityManager.DEBUG) {
SanityManager.ASSERT(invariantHolds(), "broken invariant");
}
final int numbytes = getLengthInBytes();
for (int i = 0; i < numbytes; ++i) {
final byte v = value[i];
if (v == 0) continue;
return (umul8(i) + firstSet(v));
}
return -1;
} | int function() { if (SanityManager.DEBUG) { SanityManager.ASSERT(invariantHolds(), STR); } final int numbytes = getLengthInBytes(); for (int i = 0; i < numbytes; ++i) { final byte v = value[i]; if (v == 0) continue; return (umul8(i) + firstSet(v)); } return -1; } | /**
* If any bit is set, return the zero-based bit index of the first
* bit that is set. If no bit is set, return -1. By using
* anySetBit() and anySetBit(beyondBit), one can quickly go thru
* the entire bit array to return all set bit.
*
* @return the zero-based index of the first bit that is set, or
* -... | If any bit is set, return the zero-based bit index of the first bit that is set. If no bit is set, return -1. By using anySetBit() and anySetBit(beyondBit), one can quickly go thru the entire bit array to return all set bit | anySetBit | {
"repo_name": "lpxz/grail-derby104",
"path": "java/engine/org/apache/derby/iapi/services/io/FormatableBitSet.java",
"license": "apache-2.0",
"size": 23834
} | [
"org.apache.derby.iapi.services.sanity.SanityManager"
] | import org.apache.derby.iapi.services.sanity.SanityManager; | import org.apache.derby.iapi.services.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 1,879,506 |
void enterFormalParameterList(@NotNull JavaParser.FormalParameterListContext ctx);
void exitFormalParameterList(@NotNull JavaParser.FormalParameterListContext ctx); | void enterFormalParameterList(@NotNull JavaParser.FormalParameterListContext ctx); void exitFormalParameterList(@NotNull JavaParser.FormalParameterListContext ctx); | /**
* Exit a parse tree produced by {@link JavaParser#formalParameterList}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>JavaParser#formalParameterList</code> | exitFormalParameterList | {
"repo_name": "code4craft/daogen",
"path": "daogen-core/src/main/java/com/dianping/daogen/antlr/JavaListener.java",
"license": "mit",
"size": 38983
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,470,273 |
public void setTimeLimit(long seconds) {
try {
mConf.put("timeLim", seconds);
} catch (JSONException e) {
throw new RuntimeException(e);
}
} | void function(long seconds) { try { mConf.put(STR, seconds); } catch (JSONException e) { throw new RuntimeException(e); } } | /**
* Timeboxing *************************************************************** ********************************
*/ | Timeboxing *************************************************************** | setTimeLimit | {
"repo_name": "vince-d/Anki-Android",
"path": "AnkiDroid/src/main/java/com/ichi2/libanki/Collection.java",
"license": "gpl-3.0",
"size": 56134
} | [
"org.json.JSONException"
] | import org.json.JSONException; | import org.json.*; | [
"org.json"
] | org.json; | 36,828 |
public PlatformTarget createCacheFromConfig(long memPtr) throws IgniteCheckedException; | PlatformTarget function(long memPtr) throws IgniteCheckedException; | /**
* Create cache.
*
* @param memPtr Stream with cache config.
* @return Cache.
* @throws IgniteCheckedException If failed.
*/ | Create cache | createCacheFromConfig | {
"repo_name": "VladimirErshov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessor.java",
"license": "apache-2.0",
"size": 6096
} | [
"org.apache.ignite.IgniteCheckedException"
] | import org.apache.ignite.IgniteCheckedException; | import org.apache.ignite.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 794,139 |
void setSchemaAuthorization(Session session, CatalogSchemaName source, PrestoPrincipal principal); | void setSchemaAuthorization(Session session, CatalogSchemaName source, PrestoPrincipal principal); | /**
* Set the specified schema's user/role.
*/ | Set the specified schema's user/role | setSchemaAuthorization | {
"repo_name": "hgschmie/presto",
"path": "presto-main/src/main/java/io/prestosql/metadata/Metadata.java",
"license": "apache-2.0",
"size": 19709
} | [
"io.prestosql.Session",
"io.prestosql.spi.connector.CatalogSchemaName",
"io.prestosql.spi.security.PrestoPrincipal"
] | import io.prestosql.Session; import io.prestosql.spi.connector.CatalogSchemaName; import io.prestosql.spi.security.PrestoPrincipal; | import io.prestosql.*; import io.prestosql.spi.connector.*; import io.prestosql.spi.security.*; | [
"io.prestosql",
"io.prestosql.spi"
] | io.prestosql; io.prestosql.spi; | 802,948 |
Call<ResponseBody> getEmptyAsync(final ServiceCallback<List<Integer>> serviceCallback); | Call<ResponseBody> getEmptyAsync(final ServiceCallback<List<Integer>> serviceCallback); | /**
* Get empty array value [].
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link Call} object
*/ | Get empty array value [] | getEmptyAsync | {
"repo_name": "matt-gibbs/AutoRest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyarray/Array.java",
"license": "mit",
"size": 57270
} | [
"com.microsoft.rest.ServiceCallback",
"com.squareup.okhttp.ResponseBody",
"java.util.List"
] | import com.microsoft.rest.ServiceCallback; import com.squareup.okhttp.ResponseBody; import java.util.List; | import com.microsoft.rest.*; import com.squareup.okhttp.*; import java.util.*; | [
"com.microsoft.rest",
"com.squareup.okhttp",
"java.util"
] | com.microsoft.rest; com.squareup.okhttp; java.util; | 104,152 |
Set<String> buckets(); | Set<String> buckets(); | /**
* Returns the set of buckets currently available to a distributor
* instance.
*
* <p>This method may return an empty set if no buckets are yet available.
* It may block, depending on the implementation.</p>
*/ | Returns the set of buckets currently available to a distributor instance. This method may return an empty set if no buckets are yet available. It may block, depending on the implementation | buckets | {
"repo_name": "froderick/bucket-distributor",
"path": "hyrax/src/java/hyrax/dist/IDistributor.java",
"license": "apache-2.0",
"size": 945
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,476,176 |
public void setLines(List<TraceEntry> lines) {
this.lines = lines;
} | void function(List<TraceEntry> lines) { this.lines = lines; } | /**
* Sets the list of TraceEntry objects
*
* @param the list of TraceEntry
* */ | Sets the list of TraceEntry objects | setLines | {
"repo_name": "davidstreader/JavaAutomata",
"path": "src/main/tracer/Trace.java",
"license": "gpl-2.0",
"size": 2102
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 924,501 |
public List<ResourceNavigationLinkInner> resourceNavigationLinks() {
return this.resourceNavigationLinks;
} | List<ResourceNavigationLinkInner> function() { return this.resourceNavigationLinks; } | /**
* Get the resourceNavigationLinks value.
*
* @return the resourceNavigationLinks value
*/ | Get the resourceNavigationLinks value | resourceNavigationLinks | {
"repo_name": "jianghaolu/azure-sdk-for-java",
"path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java",
"license": "mit",
"size": 5694
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,435,424 |
public void recordSuccessfulAttempt(String username, String address) {
attemptsPerIP.remove(address);
attemptsPerUsername.remove(username);
securityAuditManager.logEvent(username, "Successful admin console login attempt", "The user logged in successfully to the admin console from address " +... | void function(String username, String address) { attemptsPerIP.remove(address); attemptsPerUsername.remove(username); securityAuditManager.logEvent(username, STR, STR + address + STR); } private class PerUsernameTask extends TimerTask { | /**
* Clears failed login attempts if a success occurs.
*
* @param username Username being attempted.
* @param address IP address that is attempting.
*/ | Clears failed login attempts if a success occurs | recordSuccessfulAttempt | {
"repo_name": "guusdk/Openfire",
"path": "xmppserver/src/main/java/org/jivesoftware/admin/LoginLimitManager.java",
"license": "apache-2.0",
"size": 7548
} | [
"java.util.TimerTask"
] | import java.util.TimerTask; | import java.util.*; | [
"java.util"
] | java.util; | 2,522,377 |
@SuppressWarnings("unchecked")
@Transactional(readOnly = true)
public <S extends T> List<S> findAllByLimitAndOffset(int limit, int offset,
Sort sort) {
return (List<S>) getRepository()
.findAll(new LimitOffsetPageable(limit, offset, sort))
.getConten... | @SuppressWarnings(STR) @Transactional(readOnly = true) <S extends T> List<S> function(int limit, int offset, Sort sort) { return (List<S>) getRepository() .findAll(new LimitOffsetPageable(limit, offset, sort)) .getContent(); } | /**
* Finds all entities using a paging mechanism.
*
* @param limit
* Maximum amount of entities to retrieve.
* @param offset
* The offset where the query should begin.
* @param sort
* The sort order to use.
* @param <S>
* ... | Finds all entities using a paging mechanism | findAllByLimitAndOffset | {
"repo_name": "inoah1/cms",
"path": "src/main/java/com/noah/cms/service/AbstractTransactionalService.java",
"license": "mit",
"size": 4208
} | [
"com.noah.cms.domain.common.LimitOffsetPageable",
"java.util.List",
"org.springframework.data.domain.Sort",
"org.springframework.transaction.annotation.Transactional"
] | import com.noah.cms.domain.common.LimitOffsetPageable; import java.util.List; import org.springframework.data.domain.Sort; import org.springframework.transaction.annotation.Transactional; | import com.noah.cms.domain.common.*; import java.util.*; import org.springframework.data.domain.*; import org.springframework.transaction.annotation.*; | [
"com.noah.cms",
"java.util",
"org.springframework.data",
"org.springframework.transaction"
] | com.noah.cms; java.util; org.springframework.data; org.springframework.transaction; | 2,420,845 |
public ServiceFuture<OperationStatus> updateRegexEntityModelAsync(UUID appId, String versionId, UUID regexEntityId, RegexModelUpdateObject regexEntityUpdateObject, final ServiceCallback<OperationStatus> serviceCallback) {
return ServiceFuture.fromResponse(updateRegexEntityModelWithServiceResponseAsync(appId... | ServiceFuture<OperationStatus> function(UUID appId, String versionId, UUID regexEntityId, RegexModelUpdateObject regexEntityUpdateObject, final ServiceCallback<OperationStatus> serviceCallback) { return ServiceFuture.fromResponse(updateRegexEntityModelWithServiceResponseAsync(appId, versionId, regexEntityId, regexEntit... | /**
* Updates the regular expression entity in a version of the application.
*
* @param appId The application ID.
* @param versionId The version ID.
* @param regexEntityId The regular expression entity extractor ID.
* @param regexEntityUpdateObject An object containing the new entity name ... | Updates the regular expression entity in a version of the application | updateRegexEntityModelAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java",
"license": "mit",
"size": 818917
} | [
"com.microsoft.azure.cognitiveservices.language.luis.authoring.models.OperationStatus",
"com.microsoft.azure.cognitiveservices.language.luis.authoring.models.RegexModelUpdateObject",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.OperationStatus; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.RegexModelUpdateObject; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,213,514 |
public Collection<PaymentDTO> findPreauth(Integer userId) {
UserDTO user = new UserDAS().find(userId);
Criteria criteria = getSession().createCriteria(PaymentDTO.class);
criteria.add(Restrictions.eq("baseUser", user));
criteria.add(Restrictions.ge("balance", Constants.BIGDE... | Collection<PaymentDTO> function(Integer userId) { UserDTO user = new UserDAS().find(userId); Criteria criteria = getSession().createCriteria(PaymentDTO.class); criteria.add(Restrictions.eq(STR, user)); criteria.add(Restrictions.ge(STR, Constants.BIGDECIMAL_ONE_CENT)); criteria.add(Restrictions.eq(STR, 0)); criteria.add... | /**
*
* query="SELECT OBJECT(p) FROM payment p WHERE
* p.userId = ?1 AND
* p.balance >= 0.01 AND
* p.isRefund = 0 AND
* p.isPreauth = 1 AND
* p.deleted = 0"
*
* @param userId
* @return
*/ | query="SELECT OBJECT(p) FROM payment p WHERE p.userId = ?1 AND p.balance >= 0.01 AND p.isRefund = 0 AND p.isPreauth = 1 AND p.deleted = 0" | findPreauth | {
"repo_name": "liquidJbilling/LT-Jbilling-MsgQ-3.1",
"path": "src/java/com/sapienter/jbilling/server/payment/db/PaymentDAS.java",
"license": "agpl-3.0",
"size": 12479
} | [
"com.sapienter.jbilling.common.Constants",
"com.sapienter.jbilling.server.user.db.UserDAS",
"com.sapienter.jbilling.server.user.db.UserDTO",
"java.util.Collection",
"org.hibernate.Criteria",
"org.hibernate.criterion.Restrictions"
] | import com.sapienter.jbilling.common.Constants; import com.sapienter.jbilling.server.user.db.UserDAS; import com.sapienter.jbilling.server.user.db.UserDTO; import java.util.Collection; import org.hibernate.Criteria; import org.hibernate.criterion.Restrictions; | import com.sapienter.jbilling.common.*; import com.sapienter.jbilling.server.user.db.*; import java.util.*; import org.hibernate.*; import org.hibernate.criterion.*; | [
"com.sapienter.jbilling",
"java.util",
"org.hibernate",
"org.hibernate.criterion"
] | com.sapienter.jbilling; java.util; org.hibernate; org.hibernate.criterion; | 59,952 |
public void substitute(ByteBuffer[] p, int len, ByteBuffer q, int x) {
int y = 1, iIdx, oIdx;
for (int i = 0; i < p.length; i++) {
ByteBuffer pi = p[i];
int pos = pi != null ? pi.position() : 0;
int limit = pi != null ? pi.limit() : len;
for (oIdx = q.position(), iIdx = pos;
... | void function(ByteBuffer[] p, int len, ByteBuffer q, int x) { int y = 1, iIdx, oIdx; for (int i = 0; i < p.length; i++) { ByteBuffer pi = p[i]; int pos = pi != null ? pi.position() : 0; int limit = pi != null ? pi.limit() : len; for (oIdx = q.position(), iIdx = pos; iIdx < limit; iIdx++, oIdx++) { int pij = pi != null ... | /**
* A "bulk" version of the substitute, using ByteBuffer.
* Tends to be 2X faster than the "int" substitute in a loop.
*
* @param p input polynomial
* @param q store the return result
* @param x input field
*/ | A "bulk" version of the substitute, using ByteBuffer. Tends to be 2X faster than the "int" substitute in a loop | substitute | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GaloisField.java",
"license": "apache-2.0",
"size": 17231
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,180,559 |
public long reduceEntriesToLongInParallel
(ObjectToLong<Map.Entry<K,V>> transformer,
long basis,
LongByLongToLong reducer) {
return ForkJoinTasks.reduceEntriesToLong
(this, transformer, basis, reducer).invoke();
} | long function (ObjectToLong<Map.Entry<K,V>> transformer, long basis, LongByLongToLong reducer) { return ForkJoinTasks.reduceEntriesToLong (this, transformer, basis, reducer).invoke(); } | /**
* Returns the result of accumulating the given transformation
* of all entries using the given reducer to combine values,
* and the given basis as an identity value.
*
* @param transformer a function returning the transformation
* for an element
* @param basis the identity (initia... | Returns the result of accumulating the given transformation of all entries using the given reducer to combine values, and the given basis as an identity value | reduceEntriesToLongInParallel | {
"repo_name": "dongaihua/highlight-elasticsearch",
"path": "src/main/java/jsr166e/ConcurrentHashMapV8.java",
"license": "apache-2.0",
"size": 283748
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,013,063 |
@Test
public void testConcatenateAndHash() throws NoSuchAlgorithmException,
UnsupportedEncodingException {
String a = "AA:BB:CC:DD:EE:FF";
String b = "11:22:33:44:55:66";
// Calculated by hand with
// echo -n "AA:BB:CC:DD:EE:FF11:22:33:44:55:66" | shasu... | void function() throws NoSuchAlgorithmException, UnsupportedEncodingException { String a = STR; String b = STR; final String answer = STR; assertEquals(answer, toHexString(PeerManager.concatAndHash(a, b))); final String answer2 = STR; assertEquals(answer2, toHexString(PeerManager.concatAndHash(b, a))); } | /**
* Test the PeerManager.concatAndHash() function.
*/ | Test the PeerManager.concatAndHash() function | testConcatenateAndHash | {
"repo_name": "casific/murmur",
"path": "unit test/PeerManagerTest.java",
"license": "apache-2.0",
"size": 14891
} | [
"java.io.UnsupportedEncodingException",
"java.security.NoSuchAlgorithmException",
"org.junit.Assert"
] | import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import org.junit.Assert; | import java.io.*; import java.security.*; import org.junit.*; | [
"java.io",
"java.security",
"org.junit"
] | java.io; java.security; org.junit; | 917,907 |
private URI buildTrackingUrl(URI trackingUri, final HttpServletRequest req,
String rest) throws UriBuilderException {
UriBuilder builder = UriBuilder.fromUri(trackingUri);
String queryString = req.getQueryString();
if (queryString != null) {
List<NameValuePair> queryPairs = URLEncodedUtils.pa... | URI function(URI trackingUri, final HttpServletRequest req, String rest) throws UriBuilderException { UriBuilder builder = UriBuilder.fromUri(trackingUri); String queryString = req.getQueryString(); if (queryString != null) { List<NameValuePair> queryPairs = URLEncodedUtils.parse(queryString, null); for (NameValuePair ... | /**
* Return a URL based on the {@code trackingUri} that includes the
* user-provided path and query parameters.
*
* @param trackingUri the base tracking URI
* @param req the service request
* @param rest the user-provided path
* @return the new tracking URI
* @throws UriBuilderException if ther... | Return a URL based on the trackingUri that includes the user-provided path and query parameters | buildTrackingUrl | {
"repo_name": "ucare-uchicago/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java",
"license": "apache-2.0",
"size": 24728
} | [
"java.util.List",
"javax.servlet.http.HttpServletRequest",
"javax.ws.rs.core.UriBuilder",
"javax.ws.rs.core.UriBuilderException",
"org.apache.http.NameValuePair",
"org.apache.http.client.utils.URLEncodedUtils"
] | import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriBuilderException; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URLEncodedUtils; | import java.util.*; import javax.servlet.http.*; import javax.ws.rs.core.*; import org.apache.http.*; import org.apache.http.client.utils.*; | [
"java.util",
"javax.servlet",
"javax.ws",
"org.apache.http"
] | java.util; javax.servlet; javax.ws; org.apache.http; | 913,062 |
public Page<Type> list(int page, int size, Sort sort); | Page<Type> function(int page, int size, Sort sort); | /**
* List objects of {@code Type} in the database, limited to some specific page
*
* @param page the specific page to use
* @param size the size of the pages
* @param sort A {@link Sort} object for ordering the results
* @return a list of objects in the given range
*/ | List objects of Type in the database, limited to some specific page | list | {
"repo_name": "phac-nml/irida",
"path": "src/main/java/ca/corefacility/bioinformatics/irida/service/CRUDService.java",
"license": "apache-2.0",
"size": 8966
} | [
"org.springframework.data.domain.Page",
"org.springframework.data.domain.Sort"
] | import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; | import org.springframework.data.domain.*; | [
"org.springframework.data"
] | org.springframework.data; | 790,048 |
EClass getUiMinLengthValidator(); | EClass getUiMinLengthValidator(); | /**
* Returns the meta object for class '{@link org.lunifera.ecview.semantic.uimodel.UiMinLengthValidator <em>Ui Min Length Validator</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Ui Min Length Validator</em>'.
* @see org.lunifera.ecview.semantic.uimodel.Ui... | Returns the meta object for class '<code>org.lunifera.ecview.semantic.uimodel.UiMinLengthValidator Ui Min Length Validator</code>'. | getUiMinLengthValidator | {
"repo_name": "lunifera/lunifera-ecview-addons",
"path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java",
"license": "epl-1.0",
"size": 498897
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,419,419 |
public static boolean isBookmarkInMobileBookmarksBranch(Context context, long nodeId) {
Boolean result = chromeBrowserProviderCall(Boolean.class,
ChromeBrowserProvider.CLIENT_API_IS_BOOKMARK_IN_MOBILE_BOOKMARKS_BRANCH, context,
argsToBundle(nodeId));
return result != ... | static boolean function(Context context, long nodeId) { Boolean result = chromeBrowserProviderCall(Boolean.class, ChromeBrowserProvider.CLIENT_API_IS_BOOKMARK_IN_MOBILE_BOOKMARKS_BRANCH, context, argsToBundle(nodeId)); return result != null ? result.booleanValue() : false; } | /**
* Checks if a bookmark node is in the Mobile Bookmarks folder branch.
*
* @return True if the ID belongs to a node in the Mobile Bookmarks folder branch.
*/ | Checks if a bookmark node is in the Mobile Bookmarks folder branch | isBookmarkInMobileBookmarksBranch | {
"repo_name": "plxaye/chromium",
"path": "src/chrome/android/java/src/org/chromium/chrome/browser/ChromeBrowserProviderClient.java",
"license": "apache-2.0",
"size": 8129
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,522,286 |
private javax.swing.JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new javax.swing.JPanel();
jContentPane.setLayout(null);
jContentPane.add(getBAceptar(), null);
jContentPane.add(getBCancelar(), null);
jContentPane.setSize(192, 186);
jContentPane.setLocation(0, 0);
jCont... | javax.swing.JPanel function() { if (jContentPane == null) { jContentPane = new javax.swing.JPanel(); jContentPane.setLayout(null); jContentPane.add(getBAceptar(), null); jContentPane.add(getBCancelar(), null); jContentPane.setSize(192, 186); jContentPane.setLocation(0, 0); jContentPane.add(getPRotation(), null); } retu... | /**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/ | This method initializes jContentPane | getJContentPane | {
"repo_name": "iCarto/siga",
"path": "appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/gui/dialogs/FFrameGroupDialog.java",
"license": "gpl-3.0",
"size": 4726
} | [
"javax.swing.JPanel"
] | import javax.swing.JPanel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,750,471 |
@Test
public final void testListApplications() {
Response rs;
rs = target("/v1.0/applications").
request(Constants.INDIGOMIMETYPE).get();
Assert.assertEquals(Response.Status.OK.getStatusCode(), rs.getStatus());
Assert.assertNotNull(rs.getLinks());
Applicat... | final void function() { Response rs; rs = target(STR). request(Constants.INDIGOMIMETYPE).get(); Assert.assertEquals(Response.Status.OK.getStatusCode(), rs.getStatus()); Assert.assertNotNull(rs.getLinks()); ApplicationList lstAppEmpty = rs.readEntity(ApplicationList.class); Assert.assertNotNull(lstAppEmpty); Assert.asse... | /**
* Test the collection list.
*/ | Test the collection list | testListApplications | {
"repo_name": "FutureGateway/APIServer",
"path": "src/test/java/it/infn/ct/futuregateway/apiserver/v1/ApplicationCollectionServiceIT.java",
"license": "apache-2.0",
"size": 7021
} | [
"it.infn.ct.futuregateway.apiserver.resources.Application",
"it.infn.ct.futuregateway.apiserver.resources.ApplicationList",
"it.infn.ct.futuregateway.apiserver.utils.Constants",
"it.infn.ct.futuregateway.apiserver.utils.TestDataIT",
"java.util.LinkedList",
"java.util.List",
"javax.ws.rs.client.Entity",
... | import it.infn.ct.futuregateway.apiserver.resources.Application; import it.infn.ct.futuregateway.apiserver.resources.ApplicationList; import it.infn.ct.futuregateway.apiserver.utils.Constants; import it.infn.ct.futuregateway.apiserver.utils.TestDataIT; import java.util.LinkedList; import java.util.List; import javax.ws... | import it.infn.ct.futuregateway.apiserver.resources.*; import it.infn.ct.futuregateway.apiserver.utils.*; import java.util.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*; import org.junit.*; | [
"it.infn.ct",
"java.util",
"javax.ws",
"org.junit"
] | it.infn.ct; java.util; javax.ws; org.junit; | 1,835,012 |
private void playFirstBlood(double balance) {
if (utSounds) {
effectPlayer.play(EnumAudioTypes.UT_FIRST_BLOOD, balance);
} else {
effectPlayer.play(EnumAudioTypes.GLADOS_FIRSTBLOOD, balance);
}
} | void function(double balance) { if (utSounds) { effectPlayer.play(EnumAudioTypes.UT_FIRST_BLOOD, balance); } else { effectPlayer.play(EnumAudioTypes.GLADOS_FIRSTBLOOD, balance); } } | /**
* Play the first blood sound.
*
* @param balance the balance of the sound.
*/ | Play the first blood sound | playFirstBlood | {
"repo_name": "JoshCode/SEM",
"path": "src/main/java/nl/joshuaslik/tudelft/SEM/sound/observer/BubbleSoundObserver.java",
"license": "apache-2.0",
"size": 8384
} | [
"nl.joshuaslik.tudelft.SEM"
] | import nl.joshuaslik.tudelft.SEM; | import nl.joshuaslik.tudelft.*; | [
"nl.joshuaslik.tudelft"
] | nl.joshuaslik.tudelft; | 964,934 |
@Test
public void shouldNotLoadUsingGetAndPut() {
RecordingCacheLoader<String> cacheLoader = new RecordingCacheLoader<String>();
cacheLoaderServer.setCacheLoader(cacheLoader);
String key = "message";
assertThat(cache.containsKey(key), is(false));
String value = cache.getAndPut(key, key);
a... | void function() { RecordingCacheLoader<String> cacheLoader = new RecordingCacheLoader<String>(); cacheLoaderServer.setCacheLoader(cacheLoader); String key = STR; assertThat(cache.containsKey(key), is(false)); String value = cache.getAndPut(key, key); assertThat(cache.containsKey(key), is(true)); assertThat(value, is(nu... | /**
* Ensure that a {@link Cache#getAndPut(Object, Object)} does not cause
* an entry to be loaded.
*/ | Ensure that a <code>Cache#getAndPut(Object, Object)</code> does not cause an entry to be loaded | shouldNotLoadUsingGetAndPut | {
"repo_name": "headissue/cache2k",
"path": "cache2k-jcache-tests/src/test/java/org/jsr107/tck/integration/CacheLoaderWithoutReadThroughTest.java",
"license": "gpl-3.0",
"size": 27230
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 918,134 |
public void subscribeForNotifications(String notificationType) throws RWESmarthomeSessionExpiredException {
String sResponse = "";
final String NOTIFICATION_REQUEST = String.format(
"<BaseRequest xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"NotificationRequest\"... | void function(String notificationType) throws RWESmarthomeSessionExpiredException { String sResponse = STR<BaseRequest xmlns:xsi=\STR<Action>Subscribe</Action>STR<NotificationType>%s</NotificationType>STR</BaseRequest>STRREQ: STR/cmdSTRSubscribeForNotification-Response: " + sResponse); } | /**
* Subscribes for notifications.
*
* Should be called once before getNotifications(). Times out after a couple of hours. So make sure to
* test against LogoutNotification and resubscribe.
*
* @throws RWESmarthomeSessionExpiredException
*/ | Subscribes for notifications. Should be called once before getNotifications(). Times out after a couple of hours. So make sure to test against LogoutNotification and resubscribe | subscribeForNotifications | {
"repo_name": "cdjackson/openhab",
"path": "bundles/binding/org.openhab.binding.rwesmarthome/src/main/java/org/openhab/binding/rwesmarthome/internal/communicator/RWESmarthomeCommunicator.java",
"license": "epl-1.0",
"size": 41331
} | [
"org.openhab.binding.rwesmarthome.internal.communicator.exceptions.RWESmarthomeSessionExpiredException"
] | import org.openhab.binding.rwesmarthome.internal.communicator.exceptions.RWESmarthomeSessionExpiredException; | import org.openhab.binding.rwesmarthome.internal.communicator.exceptions.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 2,293,807 |
return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE);
} | return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE); } | /**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/ | Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin | toString | {
"repo_name": "fpompermaier/onvif",
"path": "onvif-ws-client/src/main/java/org/onvif/ver10/device/wsdl/GetStorageConfigurations.java",
"license": "apache-2.0",
"size": 1243
} | [
"org.apache.commons.lang3.builder.ToStringBuilder",
"org.apache.cxf.xjc.runtime.JAXBToStringStyle"
] | import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle; | import org.apache.commons.lang3.builder.*; import org.apache.cxf.xjc.runtime.*; | [
"org.apache.commons",
"org.apache.cxf"
] | org.apache.commons; org.apache.cxf; | 838,753 |
static public void importThis(final MWC.GUI.Layers layers, final java.io.InputStream is)
{
// create the new handler
final ASSETReaderWriter xr = new ASSETReaderWriter();
final MWCXMLReader handler = new MWC.Utilities.ReaderWriter.XML.LayersHandler(layers);
// import the datafile into this set of l... | static void function(final MWC.GUI.Layers layers, final java.io.InputStream is) { final ASSETReaderWriter xr = new ASSETReaderWriter(); final MWCXMLReader handler = new MWC.Utilities.ReaderWriter.XML.LayersHandler(layers); xr.doImport(new InputSource(is), handler); } static protected ASSET.ParticipantType _tempPart; | /**
* handle the import of XML data, creating a new session for it
*/ | handle the import of XML data, creating a new session for it | importThis | {
"repo_name": "theanuradha/debrief",
"path": "org.mwc.asset.legacy/src/ASSET/Util/XML/ASSETReaderWriter.java",
"license": "epl-1.0",
"size": 15975
} | [
"org.xml.sax.InputSource"
] | import org.xml.sax.InputSource; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 347,639 |
public List<T> getRecentItems() {
return new ArrayList(m_RecentItems);
} | List<T> function() { return new ArrayList(m_RecentItems); } | /**
* Returns the currently stored recent items.
*
* @return the items
*/ | Returns the currently stored recent items | getRecentItems | {
"repo_name": "Waikato/meka",
"path": "src/main/java/meka/gui/core/AbstractRecentItemsHandler.java",
"license": "gpl-3.0",
"size": 12582
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,238,313 |
void setLeft( Vector3f left ); | void setLeft( Vector3f left ); | /**
* <code>setLeft</code> sets the left axis of the camera.
*
* @param left the new left axis of the camera.
*/ | <code>setLeft</code> sets the left axis of the camera | setLeft | {
"repo_name": "tectronics/xenogeddon",
"path": "src/com/jme/renderer/Camera.java",
"license": "gpl-2.0",
"size": 16017
} | [
"com.jme.math.Vector3f"
] | import com.jme.math.Vector3f; | import com.jme.math.*; | [
"com.jme.math"
] | com.jme.math; | 182,588 |
public void setName(String name) {
if ((this.name == null)) {
if ((name == null)) {
return;
}
this.name = new Name();
}
this.name.setValue(name);
}
| void function(String name) { if ((this.name == null)) { if ((name == null)) { return; } this.name = new Name(); } this.name.setValue(name); } | /**
* The name of the location.
*
* @param name the String.
*/ | The name of the location | setName | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/business/training/Location.java",
"license": "epl-1.0",
"size": 9721
} | [
"org.nabucco.framework.base.facade.datatype.Name"
] | import org.nabucco.framework.base.facade.datatype.Name; | import org.nabucco.framework.base.facade.datatype.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,279,918 |
public Observable<ServiceResponse<Page<VirtualHubInner>>> listSinglePageAsync() {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
} | Observable<ServiceResponse<Page<VirtualHubInner>>> function() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } | /**
* Lists all the VirtualHubs in a subscription.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<VirtualHubInner> object wrapped in {@link ServiceResponse} if successful.
*/ | Lists all the VirtualHubs in a subscription | listSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualHubsInner.java",
"license": "mit",
"size": 72294
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 906,732 |
public void setModified(final DateTime modified) {
this.modified = new DateTime(modified);
} | void function(final DateTime modified) { this.modified = new DateTime(modified); } | /**
* Sets the Employer latest modification DateTime. Note, this field is
* controlled by the IWS, and cannot be altered by users.
*
* @param modified DateTime of latest modification
*/ | Sets the Employer latest modification DateTime. Note, this field is controlled by the IWS, and cannot be altered by users | setModified | {
"repo_name": "IWSDevelopers/iws",
"path": "iws-api/src/main/java/net/iaeste/iws/api/dtos/exchange/Employer.java",
"license": "apache-2.0",
"size": 15840
} | [
"net.iaeste.iws.api.util.DateTime"
] | import net.iaeste.iws.api.util.DateTime; | import net.iaeste.iws.api.util.*; | [
"net.iaeste.iws"
] | net.iaeste.iws; | 1,203,041 |
public void testAggregationNoFiles() {
File[] inputFiles = prepareSourceIndex(new String[] {});
TestIndex testIndex = new TestIndex();
testIndex.addIndexesFromFiles(inputFiles);
aggregator.sortAndMergeFiles(inputFiles, AggregationWorker.TEMP_FILE_INDEX);
assertTrue ("temp ... | void function() { File[] inputFiles = prepareSourceIndex(new String[] {}); TestIndex testIndex = new TestIndex(); testIndex.addIndexesFromFiles(inputFiles); aggregator.sortAndMergeFiles(inputFiles, AggregationWorker.TEMP_FILE_INDEX); assertTrue (STR, !AggregationWorker.TEMP_FILE_INDEX.exists()); } | /**
* The <code>IndexAggregator</code> should be able to handle situations with
* no index files. No index files should be created in this case
*/ | The <code>IndexAggregator</code> should be able to handle situations with no index files. No index files should be created in this case | testAggregationNoFiles | {
"repo_name": "netarchivesuite/netarchivesuite-svngit-migration",
"path": "tests/dk/netarkivet/wayback/aggregator/IndexAggregatorTest.java",
"license": "lgpl-2.1",
"size": 4008
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,625,002 |
@ApiModelProperty(example = "null", required = true, value = "type_id integer")
public Integer getTypeId() {
return typeId;
} | @ApiModelProperty(example = "null", required = true, value = STR) Integer function() { return typeId; } | /**
* type_id integer
* @return typeId
**/ | type_id integer | getTypeId | {
"repo_name": "Tmin10/EVE-Security-Service",
"path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/model/GetUniversePlanetsPlanetIdOk.java",
"license": "gpl-3.0",
"size": 4822
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,105,350 |
@Test
public void testProcessingTimeOrdered() throws Exception {
testProcessingTime(AsyncDataStream.OutputMode.ORDERED);
} | void function() throws Exception { testProcessingTime(AsyncDataStream.OutputMode.ORDERED); } | /**
* Test the AsyncWaitOperator with ordered mode and processing time.
*/ | Test the AsyncWaitOperator with ordered mode and processing time | testProcessingTimeOrdered | {
"repo_name": "shaoxuan-wang/flink",
"path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/async/AsyncWaitOperatorTest.java",
"license": "apache-2.0",
"size": 38289
} | [
"org.apache.flink.streaming.api.datastream.AsyncDataStream"
] | import org.apache.flink.streaming.api.datastream.AsyncDataStream; | import org.apache.flink.streaming.api.datastream.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,529,731 |
public boolean peekSample(SampleHolder holder) {
return infoQueue.peekSample(holder, dataOffsetHolder);
} | boolean function(SampleHolder holder) { return infoQueue.peekSample(holder, dataOffsetHolder); } | /**
* Fills {@code holder} with information about the current sample, but does not write its data.
* <p>
* The fields set are {SampleHolder#size}, {SampleHolder#timeUs} and {SampleHolder#flags}.
*
* @param holder The holder into which the current sample information should be written.
* @return True if... | Fills holder with information about the current sample, but does not write its data. The fields set are {SampleHolder#size}, {SampleHolder#timeUs} and {SampleHolder#flags} | peekSample | {
"repo_name": "Octavianus/Close-Loop-Visual-Stimulus-Display-System",
"path": "library/src/main/java/com/google/android/exoplayer/hls/parser/RollingSampleBuffer.java",
"license": "apache-2.0",
"size": 10702
} | [
"com.google.android.exoplayer.SampleHolder"
] | import com.google.android.exoplayer.SampleHolder; | import com.google.android.exoplayer.*; | [
"com.google.android"
] | com.google.android; | 2,594,965 |
@ReportableProperty(order = 41, value = "JVM vendor.")
public String getJVMVendor() {
return this.jvmVendor;
}
| @ReportableProperty(order = 41, value = STR) String function() { return this.jvmVendor; } | /**
* Get JVM vendor.
*
* @return JVM vendor
*/ | Get JVM vendor | getJVMVendor | {
"repo_name": "opf-labs/jhove2",
"path": "src/main/java/org/jhove2/core/Installation.java",
"license": "bsd-2-clause",
"size": 7590
} | [
"org.jhove2.annotation.ReportableProperty"
] | import org.jhove2.annotation.ReportableProperty; | import org.jhove2.annotation.*; | [
"org.jhove2.annotation"
] | org.jhove2.annotation; | 2,260,171 |
Runnable takeTask() {
BlockingQueue<Runnable> taskQueue = this.taskQueue;
for (;;) {
ScheduledFutureTask<?> scheduledTask = peekScheduledTask();
if (scheduledTask == null) {
Runnable task = null;
try {
task = taskQueue.take(... | Runnable takeTask() { BlockingQueue<Runnable> taskQueue = this.taskQueue; for (;;) { ScheduledFutureTask<?> scheduledTask = peekScheduledTask(); if (scheduledTask == null) { Runnable task = null; try { task = taskQueue.take(); } catch (InterruptedException e) { } return task; } else { long delayNanos = scheduledTask.de... | /**
* Take the next {@link Runnable} from the task queue and so will block if no task is currently present.
*
* @return {@code null} if the executor thread has been interrupted or waken up.
*/ | Take the next <code>Runnable</code> from the task queue and so will block if no task is currently present | takeTask | {
"repo_name": "deerwalk/voltdb",
"path": "third_party/java/src/io/netty_voltpatches/util/concurrent/GlobalEventExecutor.java",
"license": "agpl-3.0",
"size": 10457
} | [
"java.util.concurrent.BlockingQueue",
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 269,331 |
public void remove() {
ArmorStand am = this.getArmorStand();
if (am != null) am.remove();
} | void function() { ArmorStand am = this.getArmorStand(); if (am != null) am.remove(); } | /**
* Removes the Hologram
*/ | Removes the Hologram | remove | {
"repo_name": "j0ach1mmall3/JLib",
"path": "src/main/java/com/j0ach1mmall3/jlib/visual/Hologram.java",
"license": "gpl-3.0",
"size": 3192
} | [
"org.bukkit.entity.ArmorStand"
] | import org.bukkit.entity.ArmorStand; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 1,992,122 |
public static String textFileToString(String textFilePath) throws IOException {
String result;
FileInputStream fis = new FileInputStream(textFilePath);
byte[] b = new byte[fis.available()];
fis.read(b);
fis.close();
result = new String(b);
return result;
}
| static String function(String textFilePath) throws IOException { String result; FileInputStream fis = new FileInputStream(textFilePath); byte[] b = new byte[fis.available()]; fis.read(b); fis.close(); result = new String(b); return result; } | /**
* Puts the content of a text-based file into a String variable.
* @param textFilePath The path to the text-based file
* @return A String with the context of the file.
* @throws IOException
*/ | Puts the content of a text-based file into a String variable | textFileToString | {
"repo_name": "grycap/vmrc-client",
"path": "src/main/java/org/grycap/vmrc/client/utils/VMRCClientUtils.java",
"license": "apache-2.0",
"size": 1952
} | [
"java.io.FileInputStream",
"java.io.IOException"
] | import java.io.FileInputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 3,760 |
public void run() {
// Lock while we update our state so the add method above will finish adding
// any listeners before we start to run them.
synchronized (runnables) {
executed = true;
}
// At this point the runnable list will never be modified again, so we are
// safe runnin... | void function() { synchronized (runnables) { executed = true; } for (RunnableExecutorPair runnableAndExecutor : runnables) { runnableAndExecutor.execute(); } } static class RunnableExecutorPair { final Runnable functionnable; final Executor executor; RunnableExecutorPair(Runnable runnable, Executor executor) { this.run... | /**
* Runs this execution list, executing all pairs in the order they were
* added. Pairs added after this method has started executing the list will
* be executed immediately.
*/ | Runs this execution list, executing all pairs in the order they were added. Pairs added after this method has started executing the list will be executed immediately | run | {
"repo_name": "rowboat/external-guava",
"path": "src/com/google/common/util/concurrent/ExecutionList.java",
"license": "apache-2.0",
"size": 4572
} | [
"java.util.concurrent.Executor"
] | import java.util.concurrent.Executor; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 662,902 |
public Sku sku() {
return this.sku;
} | Sku function() { return this.sku; } | /**
* Get the sku value.
*
* @return the sku value
*/ | Get the sku value | sku | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-relay/src/main/java/com/microsoft/azure/management/relay/implementation/RelayNamespaceInner.java",
"license": "mit",
"size": 3076
} | [
"com.microsoft.azure.management.relay.Sku"
] | import com.microsoft.azure.management.relay.Sku; | import com.microsoft.azure.management.relay.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,874,700 |
@Override
public String toString() {
final ByteWriter writer = new ByteWriter(NUM_BYTES);
this.writeTo(writer);
final byte[] buf = writer.getBytes();
final char[] result = new char[NUM_BYTES * 2];
int off = 0;
for (byte b : buf) {
result[off++] = Chara... | String function() { final ByteWriter writer = new ByteWriter(NUM_BYTES); this.writeTo(writer); final byte[] buf = writer.getBytes(); final char[] result = new char[NUM_BYTES * 2]; int off = 0; for (byte b : buf) { result[off++] = Character.forDigit((b >> 4) & 0x0f, 16); result[off++] = Character.forDigit(b & 0x0f, 16);... | /**
* Encode this instance as a string.
*/ | Encode this instance as a string | toString | {
"repo_name": "permazen/permazen",
"path": "permazen-coreapi/src/main/java/io/permazen/core/ObjId.java",
"license": "apache-2.0",
"size": 8578
} | [
"io.permazen.util.ByteWriter"
] | import io.permazen.util.ByteWriter; | import io.permazen.util.*; | [
"io.permazen.util"
] | io.permazen.util; | 1,801,970 |
private static void createAndShowGUI() {
String[] columnNames = { "First Name", "Last Name", "Sport",
"# of Years", "Vegetarian" };
Object[][] data = {
{ "Mary", "Campione", "Snowboarding", new Integer(5),
new Boolean(false) },
{ "Alison", "Huml", "Rowing", new Integer(3), new Boolean(true) },... | static void function() { String[] columnNames = { STR, STR, "Sport", STR, STR }; Object[][] data = { { "Mary", STR, STR, new Integer(5), new Boolean(false) }, { STR, "Huml", STR, new Integer(3), new Boolean(true) }, { "Kathy", STR, STR, new Integer(2), new Boolean(false) }, { STR, STR, STR, new Integer(20), new Boolean... | /**
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event-dispatching thread.
*/ | Create the GUI and show it. For thread safety, this method should be invoked from the event-dispatching thread | createAndShowGUI | {
"repo_name": "halayudha/bearded-octo-bugfixes",
"path": "BestPeerDevelop/sg/edu/nus/gui/customcomponent/SimpleTablePanel.java",
"license": "gpl-3.0",
"size": 7500
} | [
"javax.swing.JFrame"
] | import javax.swing.JFrame; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,028,500 |
EAttribute getAttribute_Name(); | EAttribute getAttribute_Name(); | /**
* Returns the meta object for the attribute '{@link org.example.xbase.entities.entities.Attribute#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Name</em>'.
* @see org.example.xbase.entities.entities.Attribute#getName()
*... | Returns the meta object for the attribute '<code>org.example.xbase.entities.entities.Attribute#getName Name</code>'. | getAttribute_Name | {
"repo_name": "LorenzoBettini/packtpub-xtext-book-examples",
"path": "org.example.xbase.entities/src-gen/org/example/xbase/entities/entities/EntitiesPackage.java",
"license": "epl-1.0",
"size": 18910
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,887,037 |
public static
float [] convertFilterRes(Element filterElement, BridgeContext ctx) {
float [] filterRes = new float[2];
String s = getChainableAttributeNS
(filterElement, null, SVG_FILTER_RES_ATTRIBUTE, ctx);
Float [] vals = convertSVGNumberOptionalNumber
(fil... | static float [] function(Element filterElement, BridgeContext ctx) { float [] filterRes = new float[2]; String s = getChainableAttributeNS (filterElement, null, SVG_FILTER_RES_ATTRIBUTE, ctx); Float [] vals = convertSVGNumberOptionalNumber (filterElement, SVG_FILTER_RES_ATTRIBUTE, s, ctx); if (filterRes[0] < 0 filterRe... | /**
* Returns an array of 2 float numbers that describes the filter
* resolution of the specified filter element.
*
* @param filterElement the filter element
* @param ctx the bridge context
*/ | Returns an array of 2 float numbers that describes the filter resolution of the specified filter element | convertFilterRes | {
"repo_name": "apache/batik",
"path": "batik-bridge/src/main/java/org/apache/batik/bridge/SVGUtilities.java",
"license": "apache-2.0",
"size": 50128
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 305,527 |
public String getSystemVmTemplateUrl(HypervisorType hypervisor) {
switch (hypervisor) {
case XenServer:
case KVM:
return constructSystemVmTemplateUrl(hypervisor);
default:
throw new CloudRuntimeException(String.format("We do not have a Autonomiccs System VM te... | String function(HypervisorType hypervisor) { switch (hypervisor) { case XenServer: case KVM: return constructSystemVmTemplateUrl(hypervisor); default: throw new CloudRuntimeException(String.format(STR, hypervisor)); } } | /**
* Retrieves the URL to download the System VM template for the given hypervisor type.
* If the hypervisor type is not supported a {@link RuntimeException} will be thrown.
*
* @param hypervisor
* @return URL to download the system VM
*/ | Retrieves the URL to download the System VM template for the given hypervisor type. If the hypervisor type is not supported a <code>RuntimeException</code> will be thrown | getSystemVmTemplateUrl | {
"repo_name": "rafaelweingartner/autonomiccs-platform",
"path": "autonomic-plugin-common/src/main/java/br/com/autonomiccs/autonomic/plugin/common/services/AutonomiccsSystemVmTemplateService.java",
"license": "apache-2.0",
"size": 6778
} | [
"com.cloud.hypervisor.Hypervisor",
"com.cloud.utils.exception.CloudRuntimeException"
] | import com.cloud.hypervisor.Hypervisor; import com.cloud.utils.exception.CloudRuntimeException; | import com.cloud.hypervisor.*; import com.cloud.utils.exception.*; | [
"com.cloud.hypervisor",
"com.cloud.utils"
] | com.cloud.hypervisor; com.cloud.utils; | 2,203,690 |
protected void setInputs(Iterable<Artifact> inputs) {
Preconditions.checkState(discoversInputs(), this);
this.inputs = CollectionUtils.makeImmutable(inputs);
} | void function(Iterable<Artifact> inputs) { Preconditions.checkState(discoversInputs(), this); this.inputs = CollectionUtils.makeImmutable(inputs); } | /**
* Set the inputs of the action. May only be used by an action that {@link #discoversInputs()}.
* The iterable passed in is automatically made immutable.
*/ | Set the inputs of the action. May only be used by an action that <code>#discoversInputs()</code>. The iterable passed in is automatically made immutable | setInputs | {
"repo_name": "joshua0pang/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java",
"license": "apache-2.0",
"size": 14741
} | [
"com.google.common.base.Preconditions",
"com.google.devtools.build.lib.collect.CollectionUtils"
] | import com.google.common.base.Preconditions; import com.google.devtools.build.lib.collect.CollectionUtils; | import com.google.common.base.*; import com.google.devtools.build.lib.collect.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 125,193 |
@javax.annotation.Nullable
@ApiModelProperty(
value = "leaseTransitions is the number of transitions of a lease between holders.")
public Integer getLeaseTransitions() {
return leaseTransitions;
} | @javax.annotation.Nullable @ApiModelProperty( value = STR) Integer function() { return leaseTransitions; } | /**
* leaseTransitions is the number of transitions of a lease between holders.
*
* @return leaseTransitions
*/ | leaseTransitions is the number of transitions of a lease between holders | getLeaseTransitions | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LeaseSpec.java",
"license": "apache-2.0",
"size": 6677
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 206,680 |
@Test
public void testGetIssueById() throws RedmineException {
String originalSubject = "Issue " + new Date();
Issue issue = IssueFactory.create(projectId, originalSubject);
Issue newIssue = issueManager.createIssue(issue);
Issue reloadedFromRedmineIssue = issueManager.getIssue... | void function() throws RedmineException { String originalSubject = STR + new Date(); Issue issue = IssueFactory.create(projectId, originalSubject); Issue newIssue = issueManager.createIssue(issue); Issue reloadedFromRedmineIssue = issueManager.getIssueById(newIssue.getId()); assertEquals( STR, originalSubject, reloaded... | /**
* Tests the retrieval of an {@link Issue} by its ID.
*
* @throws com.taskadapter.redmineapi.RedmineException
* thrown in case something went wrong in Redmine
* @throws RedmineAuthenticationException thrown in case something went wrong while trying to l... | Tests the retrieval of an <code>Issue</code> by its ID | testGetIssueById | {
"repo_name": "redminenb/redmine-java-api",
"path": "src/test/java/com/taskadapter/redmineapi/IssueManagerIT.java",
"license": "apache-2.0",
"size": 60932
} | [
"com.taskadapter.redmineapi.IssueHelper",
"com.taskadapter.redmineapi.bean.Issue",
"com.taskadapter.redmineapi.bean.IssueFactory",
"com.taskadapter.redmineapi.bean.Tracker",
"java.util.Date",
"org.junit.Assert"
] | import com.taskadapter.redmineapi.IssueHelper; import com.taskadapter.redmineapi.bean.Issue; import com.taskadapter.redmineapi.bean.IssueFactory; import com.taskadapter.redmineapi.bean.Tracker; import java.util.Date; import org.junit.Assert; | import com.taskadapter.redmineapi.*; import com.taskadapter.redmineapi.bean.*; import java.util.*; import org.junit.*; | [
"com.taskadapter.redmineapi",
"java.util",
"org.junit"
] | com.taskadapter.redmineapi; java.util; org.junit; | 1,571,976 |
private List getChildren(IPropertySheetEntry entry) {
// if the entry is the root and we are showing categories, and we have
// more than the
// defualt category, return the categories
if ((entry == rootEntry) && isShowingCategories) {
if ((categories.length > 1)
|| ((categories.... | List function(IPropertySheetEntry entry) { if ((entry == rootEntry) && isShowingCategories) { if ((categories.length > 1) ((categories.length == 1) &&!categories[0].getCategoryName().equals(MISCELLANEOUS_CATEGORY_NAME))) { return Arrays.asList(categories); } } return getSortedEntries(getFilteredEntries(entry.getChildEn... | /**
* Returns the child entries of the given entry
* @param entry The entry to search
*
* @return the children of the given entry (element type
* <code>IPropertySheetEntry</code>)
*/ | Returns the child entries of the given entry | getChildren | {
"repo_name": "appnativa/rare",
"path": "projects/eclipse/studio/src/com/appnativa/studio/properties/PropertySheetViewer.java",
"license": "gpl-3.0",
"size": 44362
} | [
"java.util.Arrays",
"java.util.List",
"org.eclipse.ui.views.properties.IPropertySheetEntry"
] | import java.util.Arrays; import java.util.List; import org.eclipse.ui.views.properties.IPropertySheetEntry; | import java.util.*; import org.eclipse.ui.views.properties.*; | [
"java.util",
"org.eclipse.ui"
] | java.util; org.eclipse.ui; | 1,479,247 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.