method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private boolean invokeCall(RTMPConnection conn, IServiceCall call, Object service) { final IScope scope = conn.getScope(); final IContext context = scope.getContext(); if (isTrace) { log.trace("Scope: {} context: {} service: {}", scope, context, service); } return...
boolean function(RTMPConnection conn, IServiceCall call, Object service) { final IScope scope = conn.getScope(); final IContext context = scope.getContext(); if (isTrace) { log.trace(STR, scope, context, service); } return context.getServiceInvoker().invoke(call, service); }
/** * Remoting call invocation handler. * * @param conn * RTMP connection * @param call * Service call * @param service * Server-side service object * @return true if the call was performed, otherwise false */
Remoting call invocation handler
invokeCall
{ "repo_name": "Red5/red5-server-common", "path": "src/main/java/org/red5/server/net/rtmp/RTMPHandler.java", "license": "apache-2.0", "size": 31024 }
[ "org.red5.server.api.IContext", "org.red5.server.api.scope.IScope", "org.red5.server.api.service.IServiceCall" ]
import org.red5.server.api.IContext; import org.red5.server.api.scope.IScope; import org.red5.server.api.service.IServiceCall;
import org.red5.server.api.*; import org.red5.server.api.scope.*; import org.red5.server.api.service.*;
[ "org.red5.server" ]
org.red5.server;
232,680
@Override public final boolean addMatches(SymbolTable entries, List<SymbolTableEntry> matches, SearchContext l) { boolean result = entries.containsKey(mySearchString); if (result) { SymbolTableEntry e = entries.get(mySearchString); // Parameters of imported modules or f...
final boolean function(SymbolTable entries, List<SymbolTableEntry> matches, SearchContext l) { boolean result = entries.containsKey(mySearchString); if (result) { SymbolTableEntry e = entries.get(mySearchString); if (l.equals(SearchContext.SOURCE_MODULE) !(e instanceof ProgramParameterEntry)) { matches.add(entries.get(...
/** * <p> * Refines {@link TableSearcher#addMatches(SymbolTable, List, SearchContext)}} to guarantee that it will not throw a * {@link DuplicateSymbolException}. Otherwise, behaves identically. * </p> * * @param entries * The set of symbol table entries to consider. * ...
Refines <code>TableSearcher#addMatches(SymbolTable, List, SearchContext)</code>} to guarantee that it will not throw a <code>DuplicateSymbolException</code>. Otherwise, behaves identically.
addMatches
{ "repo_name": "ClemsonRSRG/RESOLVE", "path": "src/java/edu/clemson/rsrg/typeandpopulate/query/searcher/NameSearcher.java", "license": "bsd-3-clause", "size": 4053 }
[ "edu.clemson.rsrg.typeandpopulate.entry.ProgramParameterEntry", "edu.clemson.rsrg.typeandpopulate.entry.SymbolTableEntry", "edu.clemson.rsrg.typeandpopulate.symboltables.SymbolTable", "java.util.List" ]
import edu.clemson.rsrg.typeandpopulate.entry.ProgramParameterEntry; import edu.clemson.rsrg.typeandpopulate.entry.SymbolTableEntry; import edu.clemson.rsrg.typeandpopulate.symboltables.SymbolTable; import java.util.List;
import edu.clemson.rsrg.typeandpopulate.entry.*; import edu.clemson.rsrg.typeandpopulate.symboltables.*; import java.util.*;
[ "edu.clemson.rsrg", "java.util" ]
edu.clemson.rsrg; java.util;
1,630,591
public void setStartTime(Date startTime) { this.startTime = startTime; }
void function(Date startTime) { this.startTime = startTime; }
/** * Sets the startTime attribute value. * * @param startTime The startTime to set. */
Sets the startTime attribute value
setStartTime
{ "repo_name": "ua-eas/kfs-devops-automation-fork", "path": "kfs-core/src/main/java/org/kuali/kfs/sys/batch/SimpleTriggerDescriptor.java", "license": "agpl-3.0", "size": 2710 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
959,546
public StoragePoolIsoMapDAO getStoragePoolIsoMapDao() { return getDao(StoragePoolIsoMapDAO.class); }
StoragePoolIsoMapDAO function() { return getDao(StoragePoolIsoMapDAO.class); }
/** * Retrieves the singleton instance of {@link StoragePoolIsoMapDAO}. * * @return the dao */
Retrieves the singleton instance of <code>StoragePoolIsoMapDAO</code>
getStoragePoolIsoMapDao
{ "repo_name": "jtux270/translate", "path": "ovirt/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/DbFacade.java", "license": "gpl-3.0", "size": 35845 }
[ "org.ovirt.engine.core.dao.StoragePoolIsoMapDAO" ]
import org.ovirt.engine.core.dao.StoragePoolIsoMapDAO;
import org.ovirt.engine.core.dao.*;
[ "org.ovirt.engine" ]
org.ovirt.engine;
1,903
public static Message checkUniversityFiscalPeriodCode(LaborTransaction transaction) { String fiscalPeriodCode = transaction.getUniversityFiscalPeriodCode(); if (StringUtils.isBlank(fiscalPeriodCode)) { return MessageBuilder.buildMessage(KFSKeyConstants.ERROR_ACCOUNTING_PERIOD_NOT_FOUND, ...
static Message function(LaborTransaction transaction) { String fiscalPeriodCode = transaction.getUniversityFiscalPeriodCode(); if (StringUtils.isBlank(fiscalPeriodCode)) { return MessageBuilder.buildMessage(KFSKeyConstants.ERROR_ACCOUNTING_PERIOD_NOT_FOUND, fiscalPeriodCode, Message.TYPE_FATAL); } return null; }
/** * Checks if the given transaction contains university fiscal period code * * @param transaction the given transaction * @return null if the university fiscal period code is valid; otherwise, return error message */
Checks if the given transaction contains university fiscal period code
checkUniversityFiscalPeriodCode
{ "repo_name": "ua-eas/kfs-devops-automation-fork", "path": "kfs-ld/src/main/java/org/kuali/kfs/module/ld/document/validation/impl/TransactionFieldValidator.java", "license": "agpl-3.0", "size": 21303 }
[ "org.apache.commons.lang.StringUtils", "org.kuali.kfs.module.ld.businessobject.LaborTransaction", "org.kuali.kfs.sys.KFSKeyConstants", "org.kuali.kfs.sys.Message", "org.kuali.kfs.sys.MessageBuilder" ]
import org.apache.commons.lang.StringUtils; import org.kuali.kfs.module.ld.businessobject.LaborTransaction; import org.kuali.kfs.sys.KFSKeyConstants; import org.kuali.kfs.sys.Message; import org.kuali.kfs.sys.MessageBuilder;
import org.apache.commons.lang.*; import org.kuali.kfs.module.ld.businessobject.*; import org.kuali.kfs.sys.*;
[ "org.apache.commons", "org.kuali.kfs" ]
org.apache.commons; org.kuali.kfs;
511,079
public void testRemoveAll() { for (int i = 1; i < SIZE; ++i) { NavigableSet q = populatedSet(SIZE); NavigableSet p = populatedSet(i); assertTrue(q.removeAll(p)); assertEquals(SIZE - i, q.size()); for (int j = 0; j < i; ++j) { Intege...
void function() { for (int i = 1; i < SIZE; ++i) { NavigableSet q = populatedSet(SIZE); NavigableSet p = populatedSet(i); assertTrue(q.removeAll(p)); assertEquals(SIZE - i, q.size()); for (int j = 0; j < i; ++j) { Integer x = (Integer)(p.pollFirst()); assertFalse(q.contains(x)); } } }
/** * removeAll(c) removes only those elements of c and reports true if changed */
removeAll(c) removes only those elements of c and reports true if changed
testRemoveAll
{ "repo_name": "life-beam/j2objc", "path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/TreeSubSetTest.java", "license": "apache-2.0", "size": 31113 }
[ "java.util.NavigableSet" ]
import java.util.NavigableSet;
import java.util.*;
[ "java.util" ]
java.util;
2,187,901
public String getICalFormat(){ String result = "RRULE:FREQ="; result.concat(this.freq); if (count!=0) result.concat(";COUNT="+String.valueOf(count)); if (until!=null) result.concat(";UNTIL="+DateUtils.dateToStringCalendarDate(until, "yyyyMMdd'T'HHmmss'Z'")); if (interval!=0) result.concat(";...
String function(){ String result = STR; result.concat(this.freq); if (count!=0) result.concat(STR+String.valueOf(count)); if (until!=null) result.concat(STR+DateUtils.dateToStringCalendarDate(until, STR)); if (interval!=0) result.concat(STR+String.valueOf(count)); if (bySeconds!=null){ result.concat(STR); result.concat...
/** * Writes the Rule object as String with the rfc2445 ietf format * for the RRULE label in ICal spec format * @return result String with rfc2445 format */
Writes the Rule object as String with the rfc2445 ietf format for the RRULE label in ICal spec format
getICalFormat
{ "repo_name": "dcheng/PhoneGap-Calendar-Plugin", "path": "phoneGapCalendarAPI/CalendarLib/src/main/java/com/phonegap/calendar/android/adapters/Rule.java", "license": "apache-2.0", "size": 11212 }
[ "com.phonegap.calendar.android.utils.DateUtils" ]
import com.phonegap.calendar.android.utils.DateUtils;
import com.phonegap.calendar.android.utils.*;
[ "com.phonegap.calendar" ]
com.phonegap.calendar;
260,343
public Adapter createEObjectAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for the default case. * <!-- begin-user-doc --> * This default implementation returns null. * <!-- end-user-doc --> * @return the new adapter. * @generated */
Creates a new adapter for the default case. This default implementation returns null.
createEObjectAdapter
{ "repo_name": "gaborbsd/ProtoKit2", "path": "hu.bme.aut.protokit.meta/src/hu/bme/aut/protokit/model/ModelAdapterFactory.java", "license": "bsd-2-clause", "size": 10469 }
[ "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;
479,047
private void buildSpecialLabel(LimeQuestion question, Builder builder, String specialLabel) { for(Attribute attr : question.getImplicitLabel().get(specialLabel).toMagmaAttributes(true)) { builder.addAttribute(attr); } }
void function(LimeQuestion question, Builder builder, String specialLabel) { for(Attribute attr : question.getImplicitLabel().get(specialLabel).toMagmaAttributes(true)) { builder.addAttribute(attr); } }
/** * Special label are "other" or "comment" * * @param question * @param builder * @param specialLabel */
Special label are "other" or "comment"
buildSpecialLabel
{ "repo_name": "apruden/magma", "path": "magma-datasource-limesurvey/src/main/java/org/obiba/magma/datasource/limesurvey/LimesurveyValueTable.java", "license": "gpl-3.0", "size": 20407 }
[ "org.obiba.magma.Attribute", "org.obiba.magma.Variable" ]
import org.obiba.magma.Attribute; import org.obiba.magma.Variable;
import org.obiba.magma.*;
[ "org.obiba.magma" ]
org.obiba.magma;
910,251
protected void sanityCheckRight(byte[] right, Cell cell) throws IOException { if (!Arrays.equals(StripeStoreFileManager.OPEN_KEY, right) && comparator.compareRows(cell, right, 0, right.length) >= 0) { String error = "The last row is higher or equal than the right boundary of [" + Bytes.toS...
void function(byte[] right, Cell cell) throws IOException { if (!Arrays.equals(StripeStoreFileManager.OPEN_KEY, right) && comparator.compareRows(cell, right, 0, right.length) >= 0) { String error = STR + Bytes.toString(right) + STR + Bytes.toString(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()) + "]"; LO...
/** * Subclasses can call this method to make sure the last KV is within multi-writer range. * @param right The right boundary of the writer. */
Subclasses can call this method to make sure the last KV is within multi-writer range
sanityCheckRight
{ "repo_name": "ultratendency/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeMultiFileWriter.java", "license": "apache-2.0", "size": 15468 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Arrays", "java.util.Collections", "java.util.List", "org.apache.hadoop.hbase.Cell", "org.apache.hadoop.hbase.CellComparator", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellComparator; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
823,593
public void addBindings(Map bindings) { log.info("Adding bindings {}", bindings); getBindings().putAll(bindings); }
void function(Map bindings) { log.info(STR, bindings); getBindings().putAll(bindings); }
/** * adds additional bindings (global variables to use in child pipes expressions) * @param bindings */
adds additional bindings (global variables to use in child pipes expressions)
addBindings
{ "repo_name": "Nimco/sling", "path": "contrib/extensions/sling-pipes/src/main/java/org/apache/sling/pipes/PipeBindings.java", "license": "apache-2.0", "size": 8902 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,843,387
Objects.requireNonNull(l); Objects.requireNonNull(r); if (l.length != 9) throw new IllegalArgumentException("l isn't matrix 3 by 3"); if (r.length != 9) throw new IllegalArgumentException("r isn't matrix 3 by 3"); // calculate result of the matrix multiplication ...
Objects.requireNonNull(l); Objects.requireNonNull(r); if (l.length != 9) throw new IllegalArgumentException(STR); if (r.length != 9) throw new IllegalArgumentException(STR); double[] res = new double[9]; for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) { double a = 0; for (int k = 0; k < 3; k++) a += l[i * 3 + k...
/** * Calculates the matrix multiplication. * <p> * {@code res} = {@code l} * {code r} * * @param l left argument * @param r right argument * @return result of the multiplication * @throws NullPointerException if l or r is null */
Calculates the matrix multiplication. res = l * {code r}
matrixMul
{ "repo_name": "vznncv/ComplexFractal", "path": "src/local/complexfractal/util/Point2DTransformer.java", "license": "mit", "size": 6908 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
672,869
public RetryHistory withError(ManagementError error) { this.error = error; return this; }
RetryHistory function(ManagementError error) { this.error = error; return this; }
/** * Set the error property: Gets the error response. * * @param error the error value to set. * @return the RetryHistory object itself. */
Set the error property: Gets the error response
withError
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/logic/azure-resourcemanager-logic/src/main/java/com/azure/resourcemanager/logic/models/RetryHistory.java", "license": "mit", "size": 4566 }
[ "com.azure.core.management.exception.ManagementError" ]
import com.azure.core.management.exception.ManagementError;
import com.azure.core.management.exception.*;
[ "com.azure.core" ]
com.azure.core;
1,167,082
public String getDomain() { return domain; } } public static final class SearchCompleteEvent { private final Map<GroupKey, Integer> groupMap; private final List<AbstractFilter> searchFilters; private final DiscoveryAttributes.AttributeType groupingAttri...
String function() { return domain; } } public static final class SearchCompleteEvent { private final Map<GroupKey, Integer> groupMap; private final List<AbstractFilter> searchFilters; private final DiscoveryAttributes.AttributeType groupingAttribute; private final Group.GroupSortingAlgorithm groupSort; private final Re...
/** * Get the domain for the details area. * * @return The the domain for the details area. */
Get the domain for the details area
getDomain
{ "repo_name": "eugene7646/autopsy", "path": "Core/src/org/sleuthkit/autopsy/discovery/search/DiscoveryEventUtils.java", "license": "apache-2.0", "size": 16041 }
[ "java.util.List", "java.util.Map", "org.sleuthkit.autopsy.discovery.search.DiscoveryKeyUtils" ]
import java.util.List; import java.util.Map; import org.sleuthkit.autopsy.discovery.search.DiscoveryKeyUtils;
import java.util.*; import org.sleuthkit.autopsy.discovery.search.*;
[ "java.util", "org.sleuthkit.autopsy" ]
java.util; org.sleuthkit.autopsy;
12,135
@Test public void getPrice() { Assert.assertEquals(1.00, this.transactionTest.getPrice(), 0.01); }
void function() { Assert.assertEquals(1.00, this.transactionTest.getPrice(), 0.01); }
/** * Tests to see if the price of the event involved in the transaction is accessible */
Tests to see if the price of the event involved in the transaction is accessible
getPrice
{ "repo_name": "dataBaseError/FirstVu", "path": "back_end/src/testSuite/EventTransactionTest.java", "license": "mit", "size": 1771 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
817,253
@Message(id = 195, value = "EjbJarConfiguration not found as an attachment in deployment unit: %s") DeploymentUnitProcessingException ejbJarConfigNotFound(DeploymentUnit deploymentUnit);
@Message(id = 195, value = STR) DeploymentUnitProcessingException ejbJarConfigNotFound(DeploymentUnit deploymentUnit);
/** * Creates an exception indicating that the EjbJarConfiguration was not found as an attachment in deployment unit * * @return a {@link DeploymentUnitProcessingException} for the error. */
Creates an exception indicating that the EjbJarConfiguration was not found as an attachment in deployment unit
ejbJarConfigNotFound
{ "repo_name": "xasx/wildfly", "path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java", "license": "lgpl-2.1", "size": 147231 }
[ "org.jboss.as.server.deployment.DeploymentUnit", "org.jboss.as.server.deployment.DeploymentUnitProcessingException", "org.jboss.logging.annotations.Message" ]
import org.jboss.as.server.deployment.DeploymentUnit; import org.jboss.as.server.deployment.DeploymentUnitProcessingException; import org.jboss.logging.annotations.Message;
import org.jboss.as.server.deployment.*; import org.jboss.logging.annotations.*;
[ "org.jboss.as", "org.jboss.logging" ]
org.jboss.as; org.jboss.logging;
49,777
public static byte[] marshal(Marshaller marsh, Object obj) throws IgniteCheckedException { assert marsh != null; try { return marsh.marshal(obj); } catch (IgniteCheckedException e) { throw e; } catch (Exception e) { throw new Ignit...
static byte[] function(Marshaller marsh, Object obj) throws IgniteCheckedException { assert marsh != null; try { return marsh.marshal(obj); } catch (IgniteCheckedException e) { throw e; } catch (Exception e) { throw new IgniteCheckedException(e); } }
/** * Marshals object to byte array. * <p/> * This method wraps marshaller invocations and guaranty throws {@link IgniteCheckedException} in fail case. * * @param marsh Marshaller. * @param obj Object to marshal. * @return Byte array. * @throws IgniteCheckedException If marshalli...
Marshals object to byte array. This method wraps marshaller invocations and guaranty throws <code>IgniteCheckedException</code> in fail case
marshal
{ "repo_name": "mcherkasov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 316648 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.marshaller.Marshaller" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.marshaller.Marshaller;
import org.apache.ignite.*; import org.apache.ignite.marshaller.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,321,866
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(MappedStructure.class)) { case MapperPackage.MAPPED_STRUCTURE__NAME: case MapperPackage.MAPPED_STRUCTURE__UML_MODEL_URL: case MapperPackage.MAPPED_STRUCTURE__STRUCTUR...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(MappedStructure.class)) { case MapperPackage.MAPPED_STRUCTURE__NAME: case MapperPackage.MAPPED_STRUCTURE__UML_MODEL_URL: case MapperPackage.MAPPED_STRUCTURE__STRUCTURE_TYPE: case MapperPackage.MAPPED_STRUCTURE__ST...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "openmapsoftware/mappingtools", "path": "openmap-mapper-edit/src/main/java/com/openMap1/mapper/provider/MappedStructureItemProvider.java", "license": "epl-1.0", "size": 12696 }
[ "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
770,583
public void writeDataToXML(Platform platform, Database model, List tableList, String outPath) { Table[] tables = model.getTables(); for (int idx = 0; idx < tables.length; idx++) { Table table = tables[idx]; if(tableList.contains("*") || tableList.contains(table.getName())){ ...
void function(Platform platform, Database model, List tableList, String outPath) { Table[] tables = model.getTables(); for (int idx = 0; idx < tables.length; idx++) { Table table = tables[idx]; if(tableList.contains("*") tableList.contains(table.getName())){ Iterator beans = getDataForTable(platform, model, table); wri...
/** * writes all data out. one file for each table. * * @param platform The platform; needs to be connected to a live database * @param model The model for which to retrieve and write the data * @param writer The data writer * @param reader The data reader */
writes all data out. one file for each table
writeDataToXML
{ "repo_name": "9ci/ddlutils", "path": "src/main/java/org/apache/ddlutils/io/DatabaseDataDiffIO.java", "license": "apache-2.0", "size": 6936 }
[ "java.util.Iterator", "java.util.List", "org.apache.ddlutils.Platform", "org.apache.ddlutils.model.Database", "org.apache.ddlutils.model.Table" ]
import java.util.Iterator; import java.util.List; import org.apache.ddlutils.Platform; import org.apache.ddlutils.model.Database; import org.apache.ddlutils.model.Table;
import java.util.*; import org.apache.ddlutils.*; import org.apache.ddlutils.model.*;
[ "java.util", "org.apache.ddlutils" ]
java.util; org.apache.ddlutils;
2,273,794
@Override public void showMessage(String message) { ((BaseActivity) getActivity()).showToast(message); } /** * Updates {@code recentTransactionsListAdapter} with {@code recentTransactionList} fetched from * server * * @param recentTransactionList List of {@link Transaction}
void function(String message) { ((BaseActivity) getActivity()).showToast(message); } /** * Updates {@code recentTransactionsListAdapter} with {@code recentTransactionList} fetched from * server * * @param recentTransactionList List of {@link Transaction}
/** * Shows a Toast */
Shows a Toast
showMessage
{ "repo_name": "openMF/self-service-app", "path": "app/src/main/java/org/mifos/mobile/ui/fragments/RecentTransactionsFragment.java", "license": "mpl-2.0", "size": 8348 }
[ "java.util.List", "org.mifos.mobile.models.Transaction", "org.mifos.mobile.ui.activities.base.BaseActivity" ]
import java.util.List; import org.mifos.mobile.models.Transaction; import org.mifos.mobile.ui.activities.base.BaseActivity;
import java.util.*; import org.mifos.mobile.models.*; import org.mifos.mobile.ui.activities.base.*;
[ "java.util", "org.mifos.mobile" ]
java.util; org.mifos.mobile;
2,871,847
public static byte[] buildAddUsingAllNotes () { PacketBuilder sendbyte = new PacketBuilder( 2 ); sendbyte.setCommand( CMD20.REQ_UsingNoteNotify ); sendbyte.write( ByteConverter.shortTobyte( (short) 0xffff ) ); NLog.d( "[ProtocolParser20] REQ buildAddUsingAllNotes" + "Packet:" + se...
static byte[] function () { PacketBuilder sendbyte = new PacketBuilder( 2 ); sendbyte.setCommand( CMD20.REQ_UsingNoteNotify ); sendbyte.write( ByteConverter.shortTobyte( (short) 0xffff ) ); NLog.d( STR + STR + sendbyte.showPacket() ); return sendbyte.getPacket(); }
/** * Build add using all notes byte [ ]. * * @return the byte [ ] */
Build add using all notes byte [ ]
buildAddUsingAllNotes
{ "repo_name": "NeoSmartpen/AndroidSDK2.0", "path": "NASDK2.0_Studio/app/src/main/java/kr/neolab/sdk/pen/bluetooth/lib/ProtocolParser20.java", "license": "gpl-3.0", "size": 53433 }
[ "kr.neolab.sdk.util.NLog" ]
import kr.neolab.sdk.util.NLog;
import kr.neolab.sdk.util.*;
[ "kr.neolab.sdk" ]
kr.neolab.sdk;
2,900,287
public final Record readRecord(int index) throws IOException { return readRecord(index, null); }
final Record function(int index) throws IOException { return readRecord(index, null); }
/** * Reads the record with the given zero-based index from the product file. * <p/> * <p>Note that the method creates a new record instance each time it is called. * * @param index the record index, must be <code>&gt;=0</code> and <code>&lt;getDSD().getDatasetOffset()</code> * @throws jav...
Reads the record with the given zero-based index from the product file. Note that the method creates a new record instance each time it is called
readRecord
{ "repo_name": "lveci/nest", "path": "beam/beam-envisat-reader/src/main/java/org/esa/beam/dataio/envisat/RecordReader.java", "license": "gpl-3.0", "size": 8285 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
440,512
@WebMethod @Path("/disallowAllFunctionsForRole") @Produces("text/plain") @GET public String disallowAllFunctionsForRole( @WebParam(name = "sessionid", partName = "sessionid") @QueryParam("sessionid") String sessionid, @WebParam(name = "authzgroupid", partName = "authzgroupid"...
@Path(STR) @Produces(STR) String function( @WebParam(name = STR, partName = STR) @QueryParam(STR) String sessionid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String authzgroupid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String roleid) { Session session = establishSession(sessionid); try { Aut...
/** * Remove all functions from a role in an authzgroup (realm) * * @param sessionid the id of a valid session * @param authzgroupid the id of the authzgroup that the role is in * @param roleid the id of the role to remove the functions from * @return success or exception message ...
Remove all functions from a role in an authzgroup (realm)
disallowAllFunctionsForRole
{ "repo_name": "pushyamig/sakai", "path": "webservices/cxf/src/java/org/sakaiproject/webservices/SakaiScript.java", "license": "apache-2.0", "size": 209455 }
[ "javax.jws.WebParam", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "org.sakaiproject.authz.api.AuthzGroup", "org.sakaiproject.authz.api.Role", "org.sakaiproject.tool.api.Session" ]
import javax.jws.WebParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import org.sakaiproject.authz.api.AuthzGroup; import org.sakaiproject.authz.api.Role; import org.sakaiproject.tool.api.Session;
import javax.jws.*; import javax.ws.rs.*; import org.sakaiproject.authz.api.*; import org.sakaiproject.tool.api.*;
[ "javax.jws", "javax.ws", "org.sakaiproject.authz", "org.sakaiproject.tool" ]
javax.jws; javax.ws; org.sakaiproject.authz; org.sakaiproject.tool;
1,446,562
private void merge(int middle) { if (array[middle - 1] < array[middle]) { return; // the arrays are already correctly sorted, so we can skip the merge } int[] copy = new int[high - low]; System.arraycopy(array, low, copy, 0, copy.length); ...
void function(int middle) { if (array[middle - 1] < array[middle]) { return; } int[] copy = new int[high - low]; System.arraycopy(array, low, copy, 0, copy.length); int copyLow = 0; int copyHigh = high - low; int copyMiddle = middle - low; for (int i = low, p = copyLow, q = copyMiddle; i < high; i++) { if (q >= copyHig...
/** * Merges the two sorted arrays this.low, middle - 1 and middle, this.high - 1 * @param middle the index in the array where the second sorted list begins */
Merges the two sorted arrays this.low, middle - 1 and middle, this.high - 1
merge
{ "repo_name": "codefollower/Cassandra-Research", "path": "my-test/my/test/MergeSort.java", "license": "apache-2.0", "size": 5649 }
[ "java.util.concurrent.ForkJoinPool" ]
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
622,469
public void update() { for (final GenericStats gs : this) { for (final StatValue sValue : gs.getAllValues()) { updateValue((XStatValue) sValue); } } } /** * @param attribute * {@link MBeanAttributeInfo} * @return {...
void function() { for (final GenericStats gs : this) { for (final StatValue sValue : gs.getAllValues()) { updateValue((XStatValue) sValue); } } } /** * @param attribute * {@link MBeanAttributeInfo} * @return {@link StatValue}
/** * Updates all the internal values. */
Updates all the internal values
update
{ "repo_name": "bolbat/moskito", "path": "moskito-core/java/net/anotheria/moskito/core/predefined/MBeanStatsList.java", "license": "mit", "size": 16596 }
[ "javax.management.MBeanAttributeInfo", "net.anotheria.moskito.core.producers.GenericStats", "net.anotheria.moskito.core.stats.StatValue" ]
import javax.management.MBeanAttributeInfo; import net.anotheria.moskito.core.producers.GenericStats; import net.anotheria.moskito.core.stats.StatValue;
import javax.management.*; import net.anotheria.moskito.core.producers.*; import net.anotheria.moskito.core.stats.*;
[ "javax.management", "net.anotheria.moskito" ]
javax.management; net.anotheria.moskito;
147,746
protected static Object buildObject(ResultSet sqlResults, String alias, ObjectStoreInterMineImpl os, Class<?> type, Set<String> noObjectClassColumns) throws SQLException { //long time1 = System.currentTimeMillis(); @SuppressWarnings("unchecked") Set<Class<?>> classes = (Set) Coll...
static Object function(ResultSet sqlResults, String alias, ObjectStoreInterMineImpl os, Class<?> type, Set<String> noObjectClassColumns) throws SQLException { @SuppressWarnings(STR) Set<Class<?>> classes = (Set) Collections.singleton(type); if (!noObjectClassColumns.contains(alias)) { String objectClass = null; try { o...
/** * Builds an object from separate fields in flat mode. * * @param sqlResults the SQL ResultSet * @param alias the name of the column being built * @param os the ObjectStore * @param type a Class matching the QueryClass that is this column * @param noObjectClassColumns a Set used in...
Builds an object from separate fields in flat mode
buildObject
{ "repo_name": "joshkh/intermine", "path": "intermine/objectstore/main/src/org/intermine/objectstore/intermine/ResultsConverter.java", "license": "lgpl-2.1", "size": 32160 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.util.Collection", "java.util.Collections", "java.util.Date", "java.util.HashSet", "java.util.Map", "java.util.Set", "org.intermine.metadata.AttributeDescriptor", "org.intermine.metadata.CollectionDescriptor", "org.intermine.metadata.FieldDescr...
import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.intermine.metadata.AttributeDescriptor; import org.intermine.metadata.CollectionDescriptor; import o...
import java.sql.*; import java.util.*; import org.intermine.metadata.*; import org.intermine.model.*; import org.intermine.objectstore.proxy.*; import org.intermine.sql.*; import org.intermine.util.*;
[ "java.sql", "java.util", "org.intermine.metadata", "org.intermine.model", "org.intermine.objectstore", "org.intermine.sql", "org.intermine.util" ]
java.sql; java.util; org.intermine.metadata; org.intermine.model; org.intermine.objectstore; org.intermine.sql; org.intermine.util;
2,868,479
public ApplicationGatewayPropertiesFormat withAuthenticationCertificates( List<ApplicationGatewayAuthenticationCertificateInner> authenticationCertificates) { this.authenticationCertificates = authenticationCertificates; return this; }
ApplicationGatewayPropertiesFormat function( List<ApplicationGatewayAuthenticationCertificateInner> authenticationCertificates) { this.authenticationCertificates = authenticationCertificates; return this; }
/** * Set the authenticationCertificates property: Authentication certificates of the application gateway resource. For * default limits, see [Application Gateway * limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). * * @param authenticationC...
Set the authenticationCertificates property: Authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](HREF)
withAuthenticationCertificates
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayPropertiesFormat.java", "license": "mit", "size": 40780 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
121,000
public NamedOperatorHLAPI getContainerNamedOperatorHLAPI() { if (item.getContainerNamedOperator() == null) return null; return new NamedOperatorHLAPI(item.getContainerNamedOperator()); }
NamedOperatorHLAPI function() { if (item.getContainerNamedOperator() == null) return null; return new NamedOperatorHLAPI(item.getContainerNamedOperator()); }
/** * This accessor automatically encapsulate an element of the current object. * WARNING : this creates a new object in memory. * * @return : null if the element is null */
This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory
getContainerNamedOperatorHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/integers/hlapi/GreaterThanHLAPI.java", "license": "epl-1.0", "size": 69869 }
[ "fr.lip6.move.pnml.pthlpng.terms.hlapi.NamedOperatorHLAPI" ]
import fr.lip6.move.pnml.pthlpng.terms.hlapi.NamedOperatorHLAPI;
import fr.lip6.move.pnml.pthlpng.terms.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
2,833,679
public static <T> Collection<T> intersection( Collection<T> c1, Collection<T> c2 ) { Set<T> set1 = new HashSet<>( c1 ); set1.retainAll( new HashSet<>( c2 ) ); return set1; }
static <T> Collection<T> function( Collection<T> c1, Collection<T> c2 ) { Set<T> set1 = new HashSet<>( c1 ); set1.retainAll( new HashSet<>( c2 ) ); return set1; }
/** * Returns the intersection of the given Collections. * * @param c1 the first Collection. * @param c2 the second Collection. * @param <T> the type. * @return the intersection of the Collections. */
Returns the intersection of the given Collections
intersection
{ "repo_name": "steffeli/inf5750-tracker-capture", "path": "dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/CollectionUtils.java", "license": "bsd-3-clause", "size": 3087 }
[ "java.util.Collection", "java.util.HashSet", "java.util.Set" ]
import java.util.Collection; import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,440,678
public RecordType withFields(DataType... fields) { return withFields(Arrays.asList(fields)); }
RecordType function(DataType... fields) { return withFields(Arrays.asList(fields)); }
/** * Adds new fields. Replaces an already existing field that has the same name. * * @param fields the fields. * @return this type. */
Adds new fields. Replaces an already existing field that has the same name
withFields
{ "repo_name": "softelnet/sponge", "path": "sponge-api/src/main/java/org/openksavi/sponge/type/RecordType.java", "license": "apache-2.0", "size": 6626 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,505,561
public Actions keyDown(Keys theKey) { return this.keyDown(null, theKey); }
Actions function(Keys theKey) { return this.keyDown(null, theKey); }
/** * Performs a modifier key press. Does not release the modifier key - subsequent interactions * may assume it's kept pressed. * Note that the modifier key is <b>never</b> released implicitly - either * <i>keyUp(theKey)</i> or <i>sendKeys(Keys.NULL)</i> * must be called to release the modifier. * @p...
Performs a modifier key press. Does not release the modifier key - subsequent interactions may assume it's kept pressed. Note that the modifier key is never released implicitly - either keyUp(theKey) or sendKeys(Keys.NULL) must be called to release the modifier
keyDown
{ "repo_name": "gurayinan/selenium", "path": "java/client/src/org/openqa/selenium/interactions/Actions.java", "license": "apache-2.0", "size": 12909 }
[ "org.openqa.selenium.Keys" ]
import org.openqa.selenium.Keys;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,615,775
public void setA_Effective_Date (Timestamp A_Effective_Date) { set_Value (COLUMNNAME_A_Effective_Date, A_Effective_Date); }
void function (Timestamp A_Effective_Date) { set_Value (COLUMNNAME_A_Effective_Date, A_Effective_Date); }
/** Set A_Effective_Date. @param A_Effective_Date A_Effective_Date */
Set A_Effective_Date
setA_Effective_Date
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_A_Asset_Reval_Index.java", "license": "gpl-2.0", "size": 5924 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,901,362
public void assignMeasureToLeaf(final Measure measure, Leaf leaf) { Measure oldMeasure = leaf.getMeasure(); if ((oldMeasure == null) || (!oldMeasure.getUri().equals(measure.getUri()))) { // schedule removal of old measure if (oldMeasure != null) { measuresToDe...
void function(final Measure measure, Leaf leaf) { Measure oldMeasure = leaf.getMeasure(); if ((oldMeasure == null) (!oldMeasure.getUri().equals(measure.getUri()))) { if (oldMeasure != null) { measuresToDelete.add(oldMeasure); } leaf.applyMeasure(measure); } }
/** * Assigns the values of the given measure to the leaf. For this a copy of * the measure is created, the original measure is left unchanged. * * @param measure * @param leaf */
Assigns the values of the given measure to the leaf. For this a copy of the measure is created, the original measure is left unchanged
assignMeasureToLeaf
{ "repo_name": "openpreserve/plato", "path": "plato/src/main/java/eu/scape_project/planning/plato/wf/IdentifyRequirements.java", "license": "apache-2.0", "size": 13202 }
[ "eu.scape_project.planning.model.measurement.Measure", "eu.scape_project.planning.model.tree.Leaf" ]
import eu.scape_project.planning.model.measurement.Measure; import eu.scape_project.planning.model.tree.Leaf;
import eu.scape_project.planning.model.measurement.*; import eu.scape_project.planning.model.tree.*;
[ "eu.scape_project.planning" ]
eu.scape_project.planning;
255,627
@Test public void shouldGetNeighborsReturnFourNeighborsCase2() { int rows = 1 ; int columns = 2 ; L5<IntegerSolution> neighborhood = new L5<IntegerSolution>(rows, columns) ; List<IntegerSolution> list = new ArrayList<>(rows*columns) ; for (int i = 0 ; i < rows*columns; i++) { list.add(moc...
void function() { int rows = 1 ; int columns = 2 ; L5<IntegerSolution> neighborhood = new L5<IntegerSolution>(rows, columns) ; List<IntegerSolution> list = new ArrayList<>(rows*columns) ; for (int i = 0 ; i < rows*columns; i++) { list.add(mock(IntegerSolution.class)) ; } List<IntegerSolution> result = neighborhood.getN...
/** * Case 2 * * Solution list: * 0 1 * * The solution location is 0, the neighborhood is 0, 1 */
Case 2 Solution list: 0 1 The solution location is 0, the neighborhood is 0, 1
shouldGetNeighborsReturnFourNeighborsCase2
{ "repo_name": "tarunchhabra26/fss16dst", "path": "project/jMetal/jmetal-core/src/test/java/org/uma/jmetal/util/neighborhood/impl/L5Test.java", "license": "apache-2.0", "size": 7479 }
[ "java.util.ArrayList", "java.util.List", "org.hamcrest.CoreMatchers", "org.hamcrest.MatcherAssert", "org.junit.Assert", "org.uma.jmetal.solution.IntegerSolution" ]
import java.util.ArrayList; import java.util.List; import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.junit.Assert; import org.uma.jmetal.solution.IntegerSolution;
import java.util.*; import org.hamcrest.*; import org.junit.*; import org.uma.jmetal.solution.*;
[ "java.util", "org.hamcrest", "org.junit", "org.uma.jmetal" ]
java.util; org.hamcrest; org.junit; org.uma.jmetal;
408,144
@Override public String biosketchFileNameRule(DevelopmentProposal developmentProposal) { for (ProposalPersonBiography ppb : developmentProposal.getPropPersonBios()) { if (StringUtils.equalsIgnoreCase(ppb.getPropPerDocType().getDescription(), "Biosketch")) { if (StringUtils.eq...
String function(DevelopmentProposal developmentProposal) { for (ProposalPersonBiography ppb : developmentProposal.getPropPersonBios()) { if (StringUtils.equalsIgnoreCase(ppb.getPropPerDocType().getDescription(), STR)) { if (StringUtils.equals(FALSE, specialCharacterRule(ppb.getName()))) { return FALSE; } } } return TRU...
/** * * This method checks to see if the biosketch file names contain any restricted special characters. * See fn_prop_pers_att_name_rule * @return 'true' if no special characters are found. */
This method checks to see if the biosketch file names contain any restricted special characters. See fn_prop_pers_att_name_rule
biosketchFileNameRule
{ "repo_name": "jwillia/kc-old1", "path": "coeus-impl/src/main/java/org/kuali/coeus/propdev/impl/krms/PropDevJavaFunctionKrmsTermServiceImpl.java", "license": "agpl-3.0", "size": 46897 }
[ "org.apache.commons.lang3.StringUtils", "org.kuali.coeus.propdev.impl.core.DevelopmentProposal", "org.kuali.coeus.propdev.impl.person.attachment.ProposalPersonBiography" ]
import org.apache.commons.lang3.StringUtils; import org.kuali.coeus.propdev.impl.core.DevelopmentProposal; import org.kuali.coeus.propdev.impl.person.attachment.ProposalPersonBiography;
import org.apache.commons.lang3.*; import org.kuali.coeus.propdev.impl.core.*; import org.kuali.coeus.propdev.impl.person.attachment.*;
[ "org.apache.commons", "org.kuali.coeus" ]
org.apache.commons; org.kuali.coeus;
1,846,962
public static InputStream wrap(RemoteInputStream remoteIn) throws IOException { return wrap(remoteIn, RemoteClient.DEFAULT_RETRY); }
static InputStream function(RemoteInputStream remoteIn) throws IOException { return wrap(remoteIn, RemoteClient.DEFAULT_RETRY); }
/** * Wraps a RemoteInputStream as an InputStream using the * {@link RemoteClient#DEFAULT_RETRY} retry policy. * * @param remoteIn a remote input stream interface * @return an InputStream which will read from the given RemoteInputStream */
Wraps a RemoteInputStream as an InputStream using the <code>RemoteClient#DEFAULT_RETRY</code> retry policy
wrap
{ "repo_name": "kmizumar/rmiio-slf4j", "path": "src/main/java/com/healthmarketscience/rmiio/RemoteInputStreamClient.java", "license": "lgpl-2.1", "size": 8053 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
102,331
public static String getDetailedInstalledVersion(Context context, String mainVersion) { // TODO: This must be faster return new PythonInterpreter(context, mainVersion).getPythonVersion(); }
static String function(Context context, String mainVersion) { return new PythonInterpreter(context, mainVersion).getPythonVersion(); }
/** * Returns the detailed version string of the main Python version which is currently installed. * * @param context The current Application context * @param mainVersion The version which detailed version should be checked. * @return The detailed version string. */
Returns the detailed version string of the main Python version which is currently installed
getDetailedInstalledVersion
{ "repo_name": "Abestanis/APython", "path": "app/src/main/java/com/apython/python/pythonhost/PackageManager.java", "license": "mit", "size": 15077 }
[ "android.content.Context", "com.apython.python.pythonhost.interpreter.PythonInterpreter" ]
import android.content.Context; import com.apython.python.pythonhost.interpreter.PythonInterpreter;
import android.content.*; import com.apython.python.pythonhost.interpreter.*;
[ "android.content", "com.apython.python" ]
android.content; com.apython.python;
460,893
public void add(Item item) { this.addNS(item); Collections.sort(this.items); this.saveQ(); }
void function(Item item) { this.addNS(item); Collections.sort(this.items); this.saveQ(); }
/** * Adds an item to the list and sorts it * * @param item The item to be added */
Adds an item to the list and sorts it
add
{ "repo_name": "Thomaash/TV-EET", "path": "app/src/main/java/tomas_vycital/eet/android_app/items/Items.java", "license": "apache-2.0", "size": 6914 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
711,735
public static double parseDouble(String text, int type) { String txt = UNDERSCORE_PATTERN.matcher(text).replaceAll(""); double result = 0; switch (type) { case TokenTypes.NUM_FLOAT: case TokenTypes.NUM_DOUBLE: result = Double.parseDouble(txt); ...
static double function(String text, int type) { String txt = UNDERSCORE_PATTERN.matcher(text).replaceAll(STR0xSTR0X")) { radix = BASE_16; txt = txt.substring(2); } else if (txt.charAt(0) == '0') { radix = BASE_8; txt = txt.substring(1); } if (CommonUtils.endsWithChar(txt, 'L') CommonUtils.endsWithChar(txt, 'l')) { txt ...
/** * Returns the value represented by the specified string of the specified * type. Returns 0 for types other than float, double, int, and long. * @param text the string to be parsed. * @param type the token type of the text. Should be a constant of * {@link TokenTypes}. * @return the dou...
Returns the value represented by the specified string of the specified type. Returns 0 for types other than float, double, int, and long
parseDouble
{ "repo_name": "rmswimkktt/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtils.java", "license": "lgpl-2.1", "size": 15926 }
[ "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
2,844,342
public V1alpha1CSIStorageCapacityList listNamespacedCSIStorageCapacity( String namespace, String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, ...
V1alpha1CSIStorageCapacityList function( String namespace, String pretty, Boolean allowWatchBookmarks, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, String resourceVersionMatch, Integer timeoutSeconds, Boolean watch) throws ApiException { ApiResponse<V1alpha1CSISto...
/** * list or watch objects of kind CSIStorageCapacity * * @param namespace object name and auth scope, such as for teams and projects (required) * @param pretty If &#39;true&#39;, then the output is pretty printed. (optional) * @param allowWatchBookmarks allowWatchBookmarks requests watch events with ty...
list or watch objects of kind CSIStorageCapacity
listNamespacedCSIStorageCapacity
{ "repo_name": "kubernetes-client/java", "path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/StorageV1alpha1Api.java", "license": "apache-2.0", "size": 165216 }
[ "io.kubernetes.client.openapi.ApiException", "io.kubernetes.client.openapi.ApiResponse", "io.kubernetes.client.openapi.models.V1alpha1CSIStorageCapacityList" ]
import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.ApiResponse; import io.kubernetes.client.openapi.models.V1alpha1CSIStorageCapacityList;
import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*;
[ "io.kubernetes.client" ]
io.kubernetes.client;
1,093,882
synchronized public void processSync(LearnerSyncRequest r){ if(outstandingProposals.isEmpty()){ sendSync(r); } else { List<LearnerSyncRequest> l = pendingSyncs.get(lastProposed); if (l == null) { l = new ArrayList<LearnerSyncRequest>(); } ...
synchronized void function(LearnerSyncRequest r){ if(outstandingProposals.isEmpty()){ sendSync(r); } else { List<LearnerSyncRequest> l = pendingSyncs.get(lastProposed); if (l == null) { l = new ArrayList<LearnerSyncRequest>(); } l.add(r); pendingSyncs.put(lastProposed, l); } }
/** * Process sync requests * * @param r the request */
Process sync requests
processSync
{ "repo_name": "woggle/mesos-old", "path": "third_party/zookeeper-3.3.1/src/java/main/org/apache/zookeeper/server/quorum/Leader.java", "license": "apache-2.0", "size": 23978 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,437,745
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<SourceControlSyncJobByIdInner>> getWithResponseAsync( String resourceGroupName, String automationAccountName, String sourceControlName, UUID sourceControlSyncJobId, Context context) { if (this.clien...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<SourceControlSyncJobByIdInner>> function( String resourceGroupName, String automationAccountName, String sourceControlName, UUID sourceControlSyncJobId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException(...
/** * Retrieve the source control sync job identified by job id. * * @param resourceGroupName Name of an Azure Resource group. * @param automationAccountName The name of the automation account. * @param sourceControlName The source control name. * @param sourceControlSyncJobId The source c...
Retrieve the source control sync job identified by job id
getWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/automation/azure-resourcemanager-automation/src/main/java/com/azure/resourcemanager/automation/implementation/SourceControlSyncJobsClientImpl.java", "license": "mit", "size": 42758 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.automation.fluent.models.SourceControlSyncJobByIdInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.automation.fluent.models.SourceControlSyncJobByIdInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.automation.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
34,842
public Builder timestamp(Instant timestamp) { this.timestamp = timestamp; return this; }
Builder function(Instant timestamp) { this.timestamp = timestamp; return this; }
/** * Sets the UTC timestamp specifying the moment when the reading was taken. * * @param timestamp The timestamp. * @return The builder. */
Sets the UTC timestamp specifying the moment when the reading was taken
timestamp
{ "repo_name": "jeozey/XmppServerTester", "path": "xmpp-extensions/src/main/java/rocks/xmpp/extensions/geoloc/model/GeoLocation.java", "license": "mit", "size": 22356 }
[ "java.time.Instant" ]
import java.time.Instant;
import java.time.*;
[ "java.time" ]
java.time;
1,232,859
public Register index() { return index; }
Register function() { return index; }
/** * Returns the index register. * * @return the index register */
Returns the index register
index
{ "repo_name": "iitc/x86", "path": "src/main/java/com/iancaffey/x86/operand/Offset.java", "license": "mit", "size": 9405 }
[ "com.iancaffey.x86.Register" ]
import com.iancaffey.x86.Register;
import com.iancaffey.x86.*;
[ "com.iancaffey.x86" ]
com.iancaffey.x86;
681,957
private void init() throws IOException { _inflater.reset(); _crc.reset(); _inputSize = 0; _readBufferSize = 0; byte flg; int length = _in.read(_tbuffer, 0, 10); if (length < 0) { _isGzip = false; return; } else if (length != 10) { _isGzip = false; _...
void function() throws IOException { _inflater.reset(); _crc.reset(); _inputSize = 0; _readBufferSize = 0; byte flg; int length = _in.read(_tbuffer, 0, 10); if (length < 0) { _isGzip = false; return; } else if (length != 10) { _isGzip = false; _in.unread(_tbuffer, 0, length); return; } if (_tbuffer[0] != (byte)0x1f _tb...
/** * Inits/resets this class to be ready to read the start of a gzip stream. */
Inits/resets this class to be ready to read the start of a gzip stream
init
{ "repo_name": "moriyoshi/quercus-gae", "path": "src/main/java/com/caucho/quercus/lib/zlib/GZInputStream.java", "license": "gpl-2.0", "size": 8367 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,829,420
Observable<ServiceResponse<Void>> getDefaultNone200NoneAsync();
Observable<ServiceResponse<Void>> getDefaultNone200NoneAsync();
/** * Send a 200 response with no payload. * * @return the {@link ServiceResponse} object if successful. */
Send a 200 response with no payload
getDefaultNone200NoneAsync
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/MultipleResponses.java", "license": "mit", "size": 33841 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
905,182
public int realReadBytes(byte cbuf[], int off, int len) throws IOException; }
int function(byte cbuf[], int off, int len) throws IOException; }
/** * Read new bytes ( usually the internal conversion buffer ). * The implementation is allowed to ignore the parameters, * and mutate the chunk if it wishes to implement its own buffering. */
Read new bytes ( usually the internal conversion buffer ). The implementation is allowed to ignore the parameters, and mutate the chunk if it wishes to implement its own buffering
realReadBytes
{ "repo_name": "plumer/codana", "path": "tomcat_files/6.0.0/ByteChunk.java", "license": "mit", "size": 20962 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,419,133
@GetMapping("/{id:.+}") public ResponseEntity<AuditEvent> get(@PathVariable String id) { return ResponseUtil.wrapOrNotFound(auditEventService.find(id)); }
@GetMapping(STR) ResponseEntity<AuditEvent> function(@PathVariable String id) { return ResponseUtil.wrapOrNotFound(auditEventService.find(id)); }
/** * GET /audits/:id : get an AuditEvent by id. * * @param id * the id of the entity to get * @return the ResponseEntity with status 200 (OK) and the AuditEvent in * body, or status 404 (Not Found) */
GET /audits/:id : get an AuditEvent by id
get
{ "repo_name": "dads-software-brotherhood/sekc", "path": "src/main/java/mx/infotec/dads/sekc/web/rest/AuditResource.java", "license": "apache-2.0", "size": 3382 }
[ "io.github.jhipster.web.util.ResponseUtil", "org.springframework.boot.actuate.audit.AuditEvent", "org.springframework.http.ResponseEntity", "org.springframework.web.bind.annotation.GetMapping", "org.springframework.web.bind.annotation.PathVariable" ]
import io.github.jhipster.web.util.ResponseUtil; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable;
import io.github.jhipster.web.util.*; import org.springframework.boot.actuate.audit.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "io.github.jhipster", "org.springframework.boot", "org.springframework.http", "org.springframework.web" ]
io.github.jhipster; org.springframework.boot; org.springframework.http; org.springframework.web;
2,064,184
@Path("/removeOSPFArea") @Consumes(MediaType.APPLICATION_XML) @POST public void removeOSPFArea(OSPFAreaConfiguration ospfAreaConfiguration) throws CapabilityException;
@Path(STR) @Consumes(MediaType.APPLICATION_XML) void function(OSPFAreaConfiguration ospfAreaConfiguration) throws CapabilityException;
/** * Remove an OSPF area. * * @param ospfAreaConfiguration * @throws CapabilityException */
Remove an OSPF area
removeOSPFArea
{ "repo_name": "dana-i2cat/opennaas-routing-nfv", "path": "extensions/bundles/router.capability.ospf/src/main/java/org/opennaas/extensions/router/capability/ospf/IOSPFCapability.java", "license": "lgpl-3.0", "size": 4868 }
[ "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.core.MediaType", "org.opennaas.core.resources.capability.CapabilityException", "org.opennaas.extensions.router.model.OSPFAreaConfiguration" ]
import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.core.MediaType; import org.opennaas.core.resources.capability.CapabilityException; import org.opennaas.extensions.router.model.OSPFAreaConfiguration;
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.opennaas.core.resources.capability.*; import org.opennaas.extensions.router.model.*;
[ "javax.ws", "org.opennaas.core", "org.opennaas.extensions" ]
javax.ws; org.opennaas.core; org.opennaas.extensions;
1,313,605
DescribeVolumeStatusResult describeStatus(DescribeVolumeStatusRequest request);
DescribeVolumeStatusResult describeStatus(DescribeVolumeStatusRequest request);
/** * Performs the <code>DescribeStatus</code> action. * * <p> * The following request parameters will be populated from the data of this * <code>Volume</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><co...
Performs the <code>DescribeStatus</code> action. The following request parameters will be populated from the data of this <code>Volume</code> resource, and any conflicting parameter value set in the request will be overridden: <code>VolumeIds.0</code> - mapped from the <code>Id</code> identifier.
describeStatus
{ "repo_name": "smartpcr/aws-sdk-java-resources", "path": "aws-resources-ec2/src/main/java/com/amazonaws/resources/ec2/Volume.java", "license": "apache-2.0", "size": 20944 }
[ "com.amazonaws.services.ec2.model.DescribeVolumeStatusRequest", "com.amazonaws.services.ec2.model.DescribeVolumeStatusResult" ]
import com.amazonaws.services.ec2.model.DescribeVolumeStatusRequest; import com.amazonaws.services.ec2.model.DescribeVolumeStatusResult;
import com.amazonaws.services.ec2.model.*;
[ "com.amazonaws.services" ]
com.amazonaws.services;
560,381
public void setDrawing(Drawing drawing){ this.drawing = drawing; }
void function(Drawing drawing){ this.drawing = drawing; }
/** * Set the shape that is drawing. * * @param drawing Which shape to drawing current. */
Set the shape that is drawing
setDrawing
{ "repo_name": "wada811/Android-Paint", "path": "library/src/main/java/com/wada811/android/paint/PaintView.java", "license": "apache-2.0", "size": 4296 }
[ "com.wada811.android.paint.drawings.Drawing" ]
import com.wada811.android.paint.drawings.Drawing;
import com.wada811.android.paint.drawings.*;
[ "com.wada811.android" ]
com.wada811.android;
639,273
private JLabel getLblCalcBaseHint() { if (lblCalcBaseHint == null) { lblCalcBaseHint = new JLabel(lblCalcBaseHintString); lblCalcBaseHint.setFont(new Font("Dialog", Font.BOLD, 12)); } return lblCalcBaseHint; }
JLabel function() { if (lblCalcBaseHint == null) { lblCalcBaseHint = new JLabel(lblCalcBaseHintString); lblCalcBaseHint.setFont(new Font(STR, Font.BOLD, 12)); } return lblCalcBaseHint; }
/** * Gets the button calculate metrics hint. * @return the button calculate metrics hint */
Gets the button calculate metrics hint
getLblCalcBaseHint
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/simulationService/load/threading/gui/ThreadMonitorMetricsTableTab.java", "license": "lgpl-2.1", "size": 16901 }
[ "java.awt.Font", "javax.swing.JLabel" ]
import java.awt.Font; import javax.swing.JLabel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
398,234
private static Process runAAPTCommandForExtractingResourcesAndValues(String aaptPath, String apkPath, String xmlFileName) throws IOException { // execute command: aapt.exe d --values resources <name>.apk <name>.xml String[] aaptCommand = new String[] { aaptPat...
static Process function(String aaptPath, String apkPath, String xmlFileName) throws IOException { String[] aaptCommand = new String[] { aaptPath, "d", STR, STR, apkPath, xmlFileName }; return Runtime.getRuntime().exec(aaptCommand); } /** * Put data from {@link Map}, created in method * {@link #retrieveLocalizationStrin...
/** * Execute the AAPT command: aapt d --values resources [ApkFile].apk > * [XMLFileName].xml. * * @param aaptPath * AAPT path. * @param apkPath * Target APK File path. * @param xmlFileName * XML file name which will be generated. * ...
Execute the AAPT command: aapt d --values resources [ApkFile].apk > [XMLFileName].xml
runAAPTCommandForExtractingResourcesAndValues
{ "repo_name": "rex-xxx/mt6572_x201", "path": "tools/motodev/src/plugins/preflighting.core/src/com/motorolamobility/preflighting/core/internal/utils/AaptUtils.java", "license": "gpl-2.0", "size": 55948 }
[ "java.io.IOException", "java.util.Map" ]
import java.io.IOException; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,357,391
private void initialize(String title, List<ImportErrorObject> toSubmit) { setTitle(title); initComponents(); buildGUI(toSubmit); setSize(DEFAULT_SIZE); } public MessengerDialog(JFrame parent, String title, String emailAddress) { super(parent); this.emailAddress = emailAddress; dialogType = COMM...
void function(String title, List<ImportErrorObject> toSubmit) { setTitle(title); initComponents(); buildGUI(toSubmit); setSize(DEFAULT_SIZE); } MessengerDialog(JFrame parent, String title, String emailAddress) { super(parent); this.emailAddress = emailAddress; dialogType = COMMENT_TYPE; function(title, null); } Messeng...
/** * Initializes the dialog. * * @param title The title of the dialog. * @param toSubmit The collection of files to send. */
Initializes the dialog
initialize
{ "repo_name": "dominikl/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/MessengerDialog.java", "license": "gpl-2.0", "size": 25977 }
[ "java.util.List", "javax.swing.JFrame", "org.openmicroscopy.shoola.util.file.ImportErrorObject" ]
import java.util.List; import javax.swing.JFrame; import org.openmicroscopy.shoola.util.file.ImportErrorObject;
import java.util.*; import javax.swing.*; import org.openmicroscopy.shoola.util.file.*;
[ "java.util", "javax.swing", "org.openmicroscopy.shoola" ]
java.util; javax.swing; org.openmicroscopy.shoola;
249,577
public static Date convertStringToDate(String strDate) throws ParseException { Date aDate = null; try { if (log.isDebugEnabled()) { log.debug("converting date with pattern: " + getDatePattern()); } aDate = convertStringToDate(getDatePattern(), strDate); } catch (ParseException pe) { log.error...
static Date function(String strDate) throws ParseException { Date aDate = null; try { if (log.isDebugEnabled()) { log.debug(STR + getDatePattern()); } aDate = convertStringToDate(getDatePattern(), strDate); } catch (ParseException pe) { log.error(STR + strDate + STR); pe.printStackTrace(); throw new ParseException(pe.g...
/** * This method converts a String to a date using the datePattern. * * @param strDate * the date to convert (in format MM/dd/yyyy) * @return a date object * @throws ParseException * the parse exception */
This method converts a String to a date using the datePattern
convertStringToDate
{ "repo_name": "8090boy/gomall.la", "path": "legendshop_util/src/java/com/legendshop/util/converter/ConvertDateUtil.java", "license": "apache-2.0", "size": 5448 }
[ "java.text.ParseException", "java.util.Date" ]
import java.text.ParseException; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
571,728
public void testModifyItem() { EntityManager em = createEntityManager(); beginTransaction(em); try { Item item = em.find(Item.class, itemId); item.setName("Willy Waller"); item.setDescription("For adults only!"); ...
void function() { EntityManager em = createEntityManager(); beginTransaction(em); try { Item item = em.find(Item.class, itemId); item.setName(STR); item.setDescription(STR); assertTrue(STR, item.getManufacturer() != null); assertTrue(STR, item.getManufacturer().getName().equals(STR)); Lego lego = new Lego(); lego.setNa...
/** * Read an item, verify it contents, modify it and commit. */
Read an item, verify it contents, modify it and commit
testModifyItem
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/relationships/RelationshipModelJUnitTestSuite.java", "license": "epl-1.0", "size": 38000 }
[ "javax.persistence.EntityManager", "org.eclipse.persistence.testing.models.jpa.relationships.Item", "org.eclipse.persistence.testing.models.jpa.relationships.Lego", "org.eclipse.persistence.testing.models.jpa.relationships.MegaBrands" ]
import javax.persistence.EntityManager; import org.eclipse.persistence.testing.models.jpa.relationships.Item; import org.eclipse.persistence.testing.models.jpa.relationships.Lego; import org.eclipse.persistence.testing.models.jpa.relationships.MegaBrands;
import javax.persistence.*; import org.eclipse.persistence.testing.models.jpa.relationships.*;
[ "javax.persistence", "org.eclipse.persistence" ]
javax.persistence; org.eclipse.persistence;
301,625
public void setProxyConfiguration(ProxyConfiguration proxyConfiguration) { apiGatewayClientConfiguration.setProxyConfiguration(proxyConfiguration); }
void function(ProxyConfiguration proxyConfiguration) { apiGatewayClientConfiguration.setProxyConfiguration(proxyConfiguration); }
/** * Sets the optional proxy configuration of a client. * * @param proxyConfiguration The proxy configuration of the client. */
Sets the optional proxy configuration of a client
setProxyConfiguration
{ "repo_name": "jentfoo/aws-sdk-java", "path": "aws-java-sdk-opensdk/src/main/java/com/amazonaws/opensdk/protect/client/SdkSyncClientBuilder.java", "license": "apache-2.0", "size": 10847 }
[ "com.amazonaws.opensdk.config.ProxyConfiguration" ]
import com.amazonaws.opensdk.config.ProxyConfiguration;
import com.amazonaws.opensdk.config.*;
[ "com.amazonaws.opensdk" ]
com.amazonaws.opensdk;
2,525,664
public static Test suite() { return new TestSuite(ArrayRootMeanSquaredErrorTest.class); }
static Test function() { return new TestSuite(ArrayRootMeanSquaredErrorTest.class); }
/** * Returns a test suite. * * @return the test suite */
Returns a test suite
suite
{ "repo_name": "automenta/adams-core", "path": "src/test/java/adams/data/statistics/ArrayRootMeanSquaredErrorTest.java", "license": "gpl-3.0", "size": 2677 }
[ "junit.framework.Test", "junit.framework.TestSuite" ]
import junit.framework.Test; import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
2,783,003
private void initialize() { IBroadcastRouteControl broadcastRouteControl = null; broadcastRouteControl = mDtvManager.getBroadcastRouteControl(); ICommonRouteControl commonRouteControl = null; commonRouteControl = mDtvManager.getCommonRouteControl(); // Retrieve demux descript...
void function() { IBroadcastRouteControl broadcastRouteControl = null; broadcastRouteControl = mDtvManager.getBroadcastRouteControl(); ICommonRouteControl commonRouteControl = null; commonRouteControl = mDtvManager.getCommonRouteControl(); RouteDemuxDescriptor demuxDescriptor = null; demuxDescriptor = broadcastRouteCon...
/** * Initialize MW Routes */
Initialize MW Routes
initialize
{ "repo_name": "iWedia/iWediaSimpleTvInputService", "path": "app/src/main/java/com/iwedia/example/tvinput/engine/RouteManager.java", "license": "apache-2.0", "size": 12647 }
[ "com.iwedia.dtv.route.broadcast.IBroadcastRouteControl", "com.iwedia.dtv.route.broadcast.RouteDemuxDescriptor", "com.iwedia.dtv.route.broadcast.RouteFrontendDescriptor", "com.iwedia.dtv.route.broadcast.RouteFrontendType", "com.iwedia.dtv.route.common.ICommonRouteControl", "com.iwedia.dtv.route.common.Rout...
import com.iwedia.dtv.route.broadcast.IBroadcastRouteControl; import com.iwedia.dtv.route.broadcast.RouteDemuxDescriptor; import com.iwedia.dtv.route.broadcast.RouteFrontendDescriptor; import com.iwedia.dtv.route.broadcast.RouteFrontendType; import com.iwedia.dtv.route.common.ICommonRouteControl; import com.iwedia.dtv....
import com.iwedia.dtv.route.broadcast.*; import com.iwedia.dtv.route.common.*; import java.util.*;
[ "com.iwedia.dtv", "java.util" ]
com.iwedia.dtv; java.util;
1,177,039
public Adapter createPackageAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link org.nasdanika.cdo.security.Package <em>Package</em>}'. * <!-- begin-user-doc --> * 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. * <!-- end...
Creates a new adapter for an object of class '<code>org.nasdanika.cdo.security.Package Package</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.
createPackageAdapter
{ "repo_name": "Nasdanika/server", "path": "org.nasdanika.cdo.security/src/org/nasdanika/cdo/security/util/SecurityAdapterFactory.java", "license": "epl-1.0", "size": 13822 }
[ "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;
1,631,234
Iterator getAll(Iterator ids) throws NoSuchElementException;
Iterator getAll(Iterator ids) throws NoSuchElementException;
/** * Returns an iterator pointing to the Object of the given ids. It * should behave like a call of <tt>getAll(ids, true)</tt>. * * @param ids an iterator of object identifiers. * @return an iterator of objects. * @throws NoSuchElementException if one of the desired objects is not * found. */
Returns an iterator pointing to the Object of the given ids. It should behave like a call of getAll(ids, true)
getAll
{ "repo_name": "hannoman/xxl", "path": "src/xxl/core/collections/containers/Container.java", "license": "lgpl-3.0", "size": 17938 }
[ "java.util.Iterator", "java.util.NoSuchElementException" ]
import java.util.Iterator; import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,996,738
private LatLngBounds getLatLngBoundsOfCircle(LatLng center, double radius) { // See the stackoverflow post in the javadoc to understand what these constants really mean. LatLng southwest = SphericalUtil.computeOffset(center, radius * Math.sqrt(2.0), 225); LatLng northeast = SphericalUtil.com...
LatLngBounds function(LatLng center, double radius) { LatLng southwest = SphericalUtil.computeOffset(center, radius * Math.sqrt(2.0), 225); LatLng northeast = SphericalUtil.computeOffset(center, radius * Math.sqrt(2.0), 45); return new LatLngBounds(southwest, northeast); }
/** * Gets the LatLngBounds of a circle given the center and radius of the circle. * See <a href="http://stackoverflow.com/questions/15319431/how-to-convert-a-latlng-and-a-radius-to-a-latlngbounds-in-android-google-maps-ap">this</a> Stack Overflow post. * * @param center * @param radius * ...
Gets the LatLngBounds of a circle given the center and radius of the circle. See this Stack Overflow post
getLatLngBoundsOfCircle
{ "repo_name": "jvivanco28/PegCityTransit", "path": "app/src/main/java/jessevivanco/com/pegcitytransit/ui/fragments/TransitMapFragment.java", "license": "mit", "size": 19771 }
[ "com.google.android.gms.maps.model.LatLng", "com.google.android.gms.maps.model.LatLngBounds", "com.google.maps.android.SphericalUtil" ]
import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.LatLngBounds; import com.google.maps.android.SphericalUtil;
import com.google.android.gms.maps.model.*; import com.google.maps.android.*;
[ "com.google.android", "com.google.maps" ]
com.google.android; com.google.maps;
1,934,826
@Test public void test1playerMatching_ReturnEmpty() { setListWith1Player(); List<Match> actualMatchList = mCreator.createMatchList(mPlayerList); assertEquals("Result must be empty list;", mExpectedMatchList, actualMatchList); }
void function() { setListWith1Player(); List<Match> actualMatchList = mCreator.createMatchList(mPlayerList); assertEquals(STR, mExpectedMatchList, actualMatchList); }
/** * Tests attempt to pair list with one player. * Must returns empty match list. */
Tests attempt to pair list with one player. Must returns empty match list
test1playerMatching_ReturnEmpty
{ "repo_name": "floring/SwissManager", "path": "app/src/androidTest/java/com/arles/swissmanager/test/tournament/MatchesCreatorTest.java", "license": "apache-2.0", "size": 5640 }
[ "com.arles.swissmanager.tournament.Match", "java.util.List", "junit.framework.Assert" ]
import com.arles.swissmanager.tournament.Match; import java.util.List; import junit.framework.Assert;
import com.arles.swissmanager.tournament.*; import java.util.*; import junit.framework.*;
[ "com.arles.swissmanager", "java.util", "junit.framework" ]
com.arles.swissmanager; java.util; junit.framework;
2,629,365
@Test(expected = GenieNotFoundException.class) public void testGetJobNoJobExists() throws GenieException { this.service.getJob(UUID.randomUUID().toString()); }
@Test(expected = GenieNotFoundException.class) void function() throws GenieException { this.service.getJob(UUID.randomUUID().toString()); }
/** * Test the get job function. * * @throws GenieException */
Test the get job function
testGetJobNoJobExists
{ "repo_name": "gorcz/genie", "path": "genie-server/src/test/java/com/netflix/genie/server/services/impl/jpa/TestJobServiceJPAImpl.java", "license": "apache-2.0", "size": 36789 }
[ "com.netflix.genie.common.exceptions.GenieException", "com.netflix.genie.common.exceptions.GenieNotFoundException", "java.util.UUID", "org.junit.Test" ]
import com.netflix.genie.common.exceptions.GenieException; import com.netflix.genie.common.exceptions.GenieNotFoundException; import java.util.UUID; import org.junit.Test;
import com.netflix.genie.common.exceptions.*; import java.util.*; import org.junit.*;
[ "com.netflix.genie", "java.util", "org.junit" ]
com.netflix.genie; java.util; org.junit;
117,078
//@Provides //@Singleton public CredentialsMatcher provideCredentialsMatcher(){ HashedCredentialsMatcher matcher = new HashedCredentialsMatcher(); matcher.setHashAlgorithmName(CREDENTIALS_MATCHER_ALGORITHM_NAME); return matcher; }
HashedCredentialsMatcher matcher = new HashedCredentialsMatcher(); matcher.setHashAlgorithmName(CREDENTIALS_MATCHER_ALGORITHM_NAME); return matcher; }
/** * When annotations activated, you'll need to hash passwords in your configured Realm (i.e.: shiro.ini file) * @return credentialsMatcher singleton implementation for this application */
When annotations activated, you'll need to hash passwords in your configured Realm (i.e.: shiro.ini file)
provideCredentialsMatcher
{ "repo_name": "fabioaugustosl/crm-api", "path": "src/main/java/br/com/virtz/cfc/shiro/modules/BootstrapShiroModule.java", "license": "gpl-3.0", "size": 1909 }
[ "org.apache.shiro.authc.credential.HashedCredentialsMatcher" ]
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.authc.credential.*;
[ "org.apache.shiro" ]
org.apache.shiro;
2,869,352
Result decode(BinaryBitmap image) throws NotFoundException, ChecksumException, FormatException; /** * Locates and decodes a barcode in some format within an image. This method also accepts * hints, each possibly associated to some data, which may help the implementation decode. * * @param image image o...
Result decode(BinaryBitmap image) throws NotFoundException, ChecksumException, FormatException; /** * Locates and decodes a barcode in some format within an image. This method also accepts * hints, each possibly associated to some data, which may help the implementation decode. * * @param image image of barcode to deco...
/** * Locates and decodes a barcode in some format within an image. * * @param image image of barcode to decode * @return String which the barcode encodes * @throws com.google.zxing.NotFoundException if no potential barcode is found * @throws com.google.zxing.ChecksumException if a potential barcode i...
Locates and decodes a barcode in some format within an image
decode
{ "repo_name": "feluis23/LectorQR", "path": "app/src/main/java/com/google/zxing/Reader.java", "license": "mit", "size": 2872 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,758,057
private static String[] parseName(String name) throws UIException { String[] parts = new String[3]; String[] split = name.split("_"); if (split.length == 2) { parts[0] = split[0]; parts[1] = split[1]; parts[2] = null; } else if (split.length =...
static String[] function(String name) throws UIException { String[] parts = new String[3]; String[] split = name.split("_"); if (split.length == 2) { parts[0] = split[0]; parts[1] = split[1]; parts[2] = null; } else if (split.length == 3) { parts[0] = split[0]; parts[1] = split[1]; parts[2] = split[2]; } else { throw n...
/** * Parse the given name into three parts, divided by an _. Each part should represent the * schema, element, and qualifier. You are guaranteed that if no qualifier was supplied the * third entry is null. * * @param name The name to be parsed. * @return An array of name parts. */
Parse the given name into three parts, divided by an _. Each part should represent the schema, element, and qualifier. You are guaranteed that if no qualifier was supplied the third entry is null
parseName
{ "repo_name": "rnathanday/dryad-repo", "path": "dspace-xmlui/dspace-xmlui-api/src/main/java/org/dspace/app/xmlui/aspect/authority/FlowAuthorityMetadataValueUtils.java", "license": "bsd-3-clause", "size": 7614 }
[ "org.dspace.app.xmlui.utils.UIException" ]
import org.dspace.app.xmlui.utils.UIException;
import org.dspace.app.xmlui.utils.*;
[ "org.dspace.app" ]
org.dspace.app;
1,118,207
@Test public void setValueDate_givenNameOfColumn_updatesValue() { LocalDateTime value = LocalDateTime.of(1971, 1, 1, 1, 1); record.setValue(column3.getName(), value); LocalDateTime expected = value; LocalDateTime actual = record.getDateValue(column3.getName()); assertS...
void function() { LocalDateTime value = LocalDateTime.of(1971, 1, 1, 1, 1); record.setValue(column3.getName(), value); LocalDateTime expected = value; LocalDateTime actual = record.getDateValue(column3.getName()); assertSame(expected, actual); }
/** * Tests whether {@link Record#setValue(String, Object)} updates the value * of the correct column when given {@link LocalDate} value and the name of * a column that contains {@link LocalDate}s. */
Tests whether <code>Record#setValue(String, Object)</code> updates the value of the correct column when given <code>LocalDate</code> value and the name of a column that contains <code>LocalDate</code>s
setValueDate_givenNameOfColumn_updatesValue
{ "repo_name": "adamIqbal/Health", "path": "health/src/test/java/com/health/RecordTest.java", "license": "mit", "size": 18473 }
[ "java.time.LocalDateTime", "org.junit.Assert" ]
import java.time.LocalDateTime; import org.junit.Assert;
import java.time.*; import org.junit.*;
[ "java.time", "org.junit" ]
java.time; org.junit;
646,611
public static double getDecimalYear(Calendar calendar) { return calendar.get(Calendar.YEAR) + (double) calendar.get(Calendar.DAY_OF_YEAR) / calendar.getActualMaximum(Calendar.DAY_OF_YEAR); }
static double function(Calendar calendar) { return calendar.get(Calendar.YEAR) + (double) calendar.get(Calendar.DAY_OF_YEAR) / calendar.getActualMaximum(Calendar.DAY_OF_YEAR); }
/** * Returns the year of the calendar object as a decimal value. */
Returns the year of the calendar object as a decimal value
getDecimalYear
{ "repo_name": "georgeerhan/openhab2-addons", "path": "addons/binding/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/util/DateTimeUtils.java", "license": "epl-1.0", "size": 5714 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
168,090
private void startContentSynchronizations(List<SynchronizeFileOperation> filesToSyncContents) { RemoteOperationResult contentsResult; for (SynchronizeFileOperation op : filesToSyncContents) { contentsResult = op.execute(mStorageManager, mContext); // async if (!contentsResu...
void function(List<SynchronizeFileOperation> filesToSyncContents) { RemoteOperationResult contentsResult; for (SynchronizeFileOperation op : filesToSyncContents) { contentsResult = op.execute(mStorageManager, mContext); if (!contentsResult.isSuccess()) { if (contentsResult.getCode() == ResultCode.SYNC_CONFLICT) { mConf...
/** * Performs a list of synchronization operations, determining if a download or upload is needed * or if exists conflict due to changes both in local and remote contents of the each file. * * If download or upload is needed, request the operation to the corresponding service and goes * on. ...
Performs a list of synchronization operations, determining if a download or upload is needed or if exists conflict due to changes both in local and remote contents of the each file. If download or upload is needed, request the operation to the corresponding service and goes on
startContentSynchronizations
{ "repo_name": "jsargent7089/android", "path": "src/main/java/com/owncloud/android/operations/RefreshFolderOperation.java", "license": "gpl-2.0", "size": 27978 }
[ "android.util.Log", "com.owncloud.android.lib.common.operations.RemoteOperationResult", "java.util.List" ]
import android.util.Log; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import java.util.List;
import android.util.*; import com.owncloud.android.lib.common.operations.*; import java.util.*;
[ "android.util", "com.owncloud.android", "java.util" ]
android.util; com.owncloud.android; java.util;
199,493
private static void processFirstStopOfTrip(ArrivalDeparture arrDep) { // Only need to handle departure for first stop in trip if (arrDep.getStopPathIndex() != 0) return; // Should only process departures for the first stop, so make sure. // If not a departure then continue to the next stop if (arrDe...
static void function(ArrivalDeparture arrDep) { if (arrDep.getStopPathIndex() != 0) return; if (arrDep.isArrival()) return; int lateTimeMsec = (int) (arrDep.getTime() - arrDep.getScheduledTime()); if (Math.abs(lateTimeMsec) > MAX_SCHED_ADH_FOR_FIRST_STOP_TIME) return; if (shouldResetEarlyTerminalDepartures() && lateTim...
/** * For when the arrival/departure is for first stop of trip. If the schedule * adherence isn't too bad adds the stop time to the stop wait map. * * @param arrDep */
For when the arrival/departure is for first stop of trip. If the schedule adherence isn't too bad adds the stop time to the stop wait map
processFirstStopOfTrip
{ "repo_name": "goeuropa/transitime", "path": "transitime/src/main/java/org/transitime/core/travelTimes/TravelTimesProcessor.java", "license": "gpl-3.0", "size": 39792 }
[ "org.transitime.db.structs.ArrivalDeparture" ]
import org.transitime.db.structs.ArrivalDeparture;
import org.transitime.db.structs.*;
[ "org.transitime.db" ]
org.transitime.db;
791,561
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_ASSET, defaultValue = "") @SimpleProperty public void BackgroundImage(String path) { view.setBackgroundImage(path); } /** * Returns the currently specified paint color as an alpha-red-green-blue * integer, i.e., {@code 0xAARRG...
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_ASSET, defaultValue = "") void function(String path) { view.setBackgroundImage(path); } /** * Returns the currently specified paint color as an alpha-red-green-blue * integer, i.e., {@code 0xAARRGGBB}. An alpha of {@code 00}
/** * Specifies the path of the canvas background image. * * <p/>See {@link MediaUtil#determineMediaSource} for information about what * a path can be. * * @param path the path of the canvas background image */
Specifies the path of the canvas background image. See <code>MediaUtil#determineMediaSource</code> for information about what a path can be
BackgroundImage
{ "repo_name": "warren922/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Canvas.java", "license": "apache-2.0", "size": 56953 }
[ "com.google.appinventor.components.annotations.DesignerProperty", "com.google.appinventor.components.common.PropertyTypeConstants" ]
import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.common.PropertyTypeConstants;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*;
[ "com.google.appinventor" ]
com.google.appinventor;
1,443,463
@SideOnly(Side.CLIENT) public void setVelocity(double x, double y, double z) { this.motionX = x; this.motionY = y; this.motionZ = z; if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float f = MathHelper.sqrt_double(x * x + z * z); ...
@SideOnly(Side.CLIENT) void function(double x, double y, double z) { this.motionX = x; this.motionY = y; this.motionZ = z; if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float f = MathHelper.sqrt_double(x * x + z * z); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / ...
/** * Sets the velocity to the args. Args: x, y, z */
Sets the velocity to the args. Args: x, y, z
setVelocity
{ "repo_name": "trixmot/mod1", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/item/EntityFireworkRocket.java", "license": "lgpl-2.1", "size": 7245 }
[ "net.minecraft.util.MathHelper", "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraft.util.MathHelper; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.util.*; import net.minecraftforge.fml.relauncher.*;
[ "net.minecraft.util", "net.minecraftforge.fml" ]
net.minecraft.util; net.minecraftforge.fml;
884,520
private String sslExceptionBuilder(SSLException sslEx, HttpMessage httpMessage) { StringBuilder strBuilder = new StringBuilder(); strBuilder.append(Constant.messages.getString("network.ssl.error.connect")); strBuilder.append(httpMessage.getRequestHeader().getURI().toString()).append('\n'); ...
String function(SSLException sslEx, HttpMessage httpMessage) { StringBuilder strBuilder = new StringBuilder(); strBuilder.append(Constant.messages.getString(STR)); strBuilder.append(httpMessage.getRequestHeader().getURI().toString()).append('\n'); strBuilder .append(Constant.messages.getString(STR)) .append(sslEx.getMe...
/** * Build a descriptive exception message about SSLException * * @param sslEx the ssl exception * @param httpMessage message cause the exception * @return descriptive message */
Build a descriptive exception message about SSLException
sslExceptionBuilder
{ "repo_name": "kingthorin/zap-extensions", "path": "addOns/websocket/src/main/java/org/zaproxy/zap/extension/websocket/client/ServerConnectionEstablisher.java", "license": "apache-2.0", "size": 14478 }
[ "javax.net.ssl.SSLException", "org.apache.commons.lang.exception.ExceptionUtils", "org.parosproxy.paros.Constant", "org.parosproxy.paros.network.HttpMessage", "org.zaproxy.zap.network.HttpRedirectionValidator" ]
import javax.net.ssl.SSLException; import org.apache.commons.lang.exception.ExceptionUtils; import org.parosproxy.paros.Constant; import org.parosproxy.paros.network.HttpMessage; import org.zaproxy.zap.network.HttpRedirectionValidator;
import javax.net.ssl.*; import org.apache.commons.lang.exception.*; import org.parosproxy.paros.*; import org.parosproxy.paros.network.*; import org.zaproxy.zap.network.*;
[ "javax.net", "org.apache.commons", "org.parosproxy.paros", "org.zaproxy.zap" ]
javax.net; org.apache.commons; org.parosproxy.paros; org.zaproxy.zap;
2,358,136
String inputFolder = ResourceLoader.getResourcePath(LrrMu.class,"workload/planetlab"); String outputFolder = "output"; String workload = "20110303"; // PlanetLab workload String vmAllocationPolicy = "lrr"; // Local Regression Robust (LRR) VM allocation policy String vmSelectionPolicy = "mu"; // Minimum Utili...
String inputFolder = ResourceLoader.getResourcePath(LrrMu.class,STR); String outputFolder = STR; String workload = STR; String vmAllocationPolicy = "lrr"; String vmSelectionPolicy = "mu"; double safetyParameter = 1.2; new PlanetLabRunner( true, false, inputFolder, outputFolder, workload, vmAllocationPolicy, vmSelection...
/** * The main method. * * @param args the arguments * @throws IOException Signals that an I/O exception has occurred. */
The main method
main
{ "repo_name": "RaysaOliveira/cloudsim-plus", "path": "cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/power/planetlab/LrrMu.java", "license": "gpl-3.0", "size": 1885 }
[ "org.cloudbus.cloudsim.examples.power.util.PlanetLabRunner", "org.cloudbus.cloudsim.util.ResourceLoader" ]
import org.cloudbus.cloudsim.examples.power.util.PlanetLabRunner; import org.cloudbus.cloudsim.util.ResourceLoader;
import org.cloudbus.cloudsim.examples.power.util.*; import org.cloudbus.cloudsim.util.*;
[ "org.cloudbus.cloudsim" ]
org.cloudbus.cloudsim;
1,890,947
protected RuntimeManager createRuntimeManager(Strategy strategy, Map<String, ResourceType> resources, String identifier) { if (manager != null) { throw new IllegalStateException("There is already one RuntimeManager active"); } RuntimeEnvironmentBuilder builder = null; if...
RuntimeManager function(Strategy strategy, Map<String, ResourceType> resources, String identifier) { if (manager != null) { throw new IllegalStateException(STR); } RuntimeEnvironmentBuilder builder = null; if (!setupDataSource){ builder = RuntimeEnvironmentBuilder.Factory.get() .newEmptyBuilder() .addConfiguration(STR,...
/** * Creates default configuration of <code>RuntimeManager</code> with given <code>strategy</code> and all * <code>resources</code> being added to knowledge base. * <br/> * There should be only one <code>RuntimeManager</code> created during single test. * @param strategy - selected strategy of...
Creates default configuration of <code>RuntimeManager</code> with given <code>strategy</code> and all <code>resources</code> being added to knowledge base. There should be only one <code>RuntimeManager</code> created during single test
createRuntimeManager
{ "repo_name": "rabbitcount/jbpm", "path": "jbpm-test/src/main/java/org/jbpm/test/JbpmJUnitBaseTestCase.java", "license": "apache-2.0", "size": 40648 }
[ "java.util.Map", "org.jbpm.process.instance.event.DefaultSignalManagerFactory", "org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory", "org.jbpm.runtime.manager.impl.SimpleRegisterableItemsFactory", "org.kie.api.io.ResourceType", "org.kie.api.runtime.manager.RuntimeEnvironmentBuilder", "...
import java.util.Map; import org.jbpm.process.instance.event.DefaultSignalManagerFactory; import org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory; import org.jbpm.runtime.manager.impl.SimpleRegisterableItemsFactory; import org.kie.api.io.ResourceType; import org.kie.api.runtime.manager.RuntimeEnviron...
import java.util.*; import org.jbpm.process.instance.event.*; import org.jbpm.process.instance.impl.*; import org.jbpm.runtime.manager.impl.*; import org.kie.api.io.*; import org.kie.api.runtime.manager.*;
[ "java.util", "org.jbpm.process", "org.jbpm.runtime", "org.kie.api" ]
java.util; org.jbpm.process; org.jbpm.runtime; org.kie.api;
2,490,012
public static void shuffle(List<?> list, Random random) { @SuppressWarnings("unchecked") // we won't put foreign objects in final List<Object> objectList = (List<Object>) list; if (list instanceof RandomAccess) { for (int i = objectList.size() - 1; i > 0; i--) { ...
static void function(List<?> list, Random random) { @SuppressWarnings(STR) final List<Object> objectList = (List<Object>) list; if (list instanceof RandomAccess) { for (int i = objectList.size() - 1; i > 0; i--) { int index = random.nextInt(i + 1); objectList.set(index, objectList.set(i, objectList.get(index))); } } el...
/** * Moves every element of the list to a random new position in the list * using the specified random number generator. * * @param list * the list to shuffle. * @param random * the random number generator. * @throws UnsupportedOperationException * ...
Moves every element of the list to a random new position in the list using the specified random number generator
shuffle
{ "repo_name": "Programming-Systems-Lab/phosphor", "path": "Phosphor/src/main/java/edu/columbia/cs/psl/phosphor/struct/harmony/util/Collections.java", "license": "mit", "size": 108292 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,164,424
public char get1(Field field) { currentPos = field.start; return get1(); } // get1
char function(Field field) { currentPos = field.start; return get1(); }
/** Gets a character from the buffer, * @param field field to be read * @return the character */
Gets a character from the buffer
get1
{ "repo_name": "gfis/dbat", "path": "src/main/java/org/teherba/xtrans/CharRecord.java", "license": "apache-2.0", "size": 13714 }
[ "org.teherba.xtrans.Field" ]
import org.teherba.xtrans.Field;
import org.teherba.xtrans.*;
[ "org.teherba.xtrans" ]
org.teherba.xtrans;
1,388,504
public List<Role> findAllAssignableRoles(boolean showSystemRoles) throws DotDataException;
List<Role> function(boolean showSystemRoles) throws DotDataException;
/** * Will retrieve all roles. * @param showSystemRoles * @throws DotDataException * @return */
Will retrieve all roles
findAllAssignableRoles
{ "repo_name": "ggonzales/ksl", "path": "src/com/dotmarketing/business/RoleAPI.java", "license": "gpl-3.0", "size": 8907 }
[ "com.dotmarketing.exception.DotDataException", "java.util.List" ]
import com.dotmarketing.exception.DotDataException; import java.util.List;
import com.dotmarketing.exception.*; import java.util.*;
[ "com.dotmarketing.exception", "java.util" ]
com.dotmarketing.exception; java.util;
387,700
public String getContentTypeMIMEType(final String key) { final String str = ((key == null) ? null : map.get(key.toLowerCase(Locale.US))); return str; }
String function(final String key) { final String str = ((key == null) ? null : map.get(key.toLowerCase(Locale.US))); return str; }
/** * Return the MIME type for a file extension. * * @param key the file extension (e.g., "css") * @return the corresponding MIME type, or null if not found */
Return the MIME type for a file extension
getContentTypeMIMEType
{ "repo_name": "argonium/shortstop", "path": "src/io/miti/shortstop/util/ContentTypeCache.java", "license": "mit", "size": 3252 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,404,144
public File getLibrariesFile( String... parts ) { String[] newParts = new String[parts.length + 1]; newParts[0] = "libraries"; System.arraycopy( parts, 0, newParts, 1, parts.length ); return getFile( newParts ); }
File function( String... parts ) { String[] newParts = new String[parts.length + 1]; newParts[0] = STR; System.arraycopy( parts, 0, newParts, 1, parts.length ); return getFile( newParts ); }
/** * Constructs an absolute path from the "libraries" subdirectory. * * @param parts * The path parts * @return The absolute file */
Constructs an absolute path from the "libraries" subdirectory
getLibrariesFile
{ "repo_name": "tliron/sincerity", "path": "components/sincerity/source/com/threecrickets/sincerity/Container.java", "license": "lgpl-3.0", "size": 13334 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,162,762
public StackInteger stacks(StackInteger stack1, StackInteger stack2) { this.validateArgs(stack1, stack2); StackInteger result = new StackInteger(stack1.rows(), stack2.columns()); Iterator<PlateInteger> iter1 = stack1.iterator(); Iterator<PlateInteger> iter2 = stack2.iterator...
StackInteger function(StackInteger stack1, StackInteger stack2) { this.validateArgs(stack1, stack2); StackInteger result = new StackInteger(stack1.rows(), stack2.columns()); Iterator<PlateInteger> iter1 = stack1.iterator(); Iterator<PlateInteger> iter2 = stack2.iterator(); while(iter1.hasNext() && iter2.hasNext()) { Pl...
/** * Returns the result of the mathematical operation. Missing data points due * to data sets of unequal length are treated as zero values. * @param StackInteger the first stack * @param StackInteger the second stack * @return the result of the operation */
Returns the result of the mathematical operation. Missing data points due to data sets of unequal length are treated as zero values
stacks
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/integerflex/math/MathOperationIntegerBinary.java", "license": "apache-2.0", "size": 68307 }
[ "com.github.jessemull.microflex.integerflex.plate.PlateInteger", "com.github.jessemull.microflex.integerflex.plate.StackInteger", "java.util.Iterator" ]
import com.github.jessemull.microflex.integerflex.plate.PlateInteger; import com.github.jessemull.microflex.integerflex.plate.StackInteger; import java.util.Iterator;
import com.github.jessemull.microflex.integerflex.plate.*; import java.util.*;
[ "com.github.jessemull", "java.util" ]
com.github.jessemull; java.util;
31,633
public RestoreSnapshotRequest indexSettings(Settings settings) { this.indexSettings = settings; return this; }
RestoreSnapshotRequest function(Settings settings) { this.indexSettings = settings; return this; }
/** * Sets settings that should be added/changed in all restored indices */
Sets settings that should be added/changed in all restored indices
indexSettings
{ "repo_name": "ThalaivaStars/OrgRepo1", "path": "core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequest.java", "license": "apache-2.0", "size": 22767 }
[ "org.elasticsearch.common.settings.Settings" ]
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,464,709
public T hl7(Object parser) { HL7DataFormat hl7 = new HL7DataFormat(); hl7.setParser(parser); return dataFormat(hl7); }
T function(Object parser) { HL7DataFormat hl7 = new HL7DataFormat(); hl7.setParser(parser); return dataFormat(hl7); }
/** * Uses the HL7 data format */
Uses the HL7 data format
hl7
{ "repo_name": "kevinearls/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 46439 }
[ "org.apache.camel.model.dataformat.HL7DataFormat" ]
import org.apache.camel.model.dataformat.HL7DataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
1,990,626
@Nonnull public java.util.concurrent.CompletableFuture<IosVppEBookAssignment> deleteAsync() { return sendAsync(HttpMethod.DELETE, null); }
java.util.concurrent.CompletableFuture<IosVppEBookAssignment> function() { return sendAsync(HttpMethod.DELETE, null); }
/** * Delete this item from the service * * @return a future with the deletion result */
Delete this item from the service
deleteAsync
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/IosVppEBookAssignmentRequest.java", "license": "mit", "size": 6269 }
[ "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.IosVppEBookAssignment" ]
import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.IosVppEBookAssignment;
import com.microsoft.graph.http.*; import com.microsoft.graph.models.*;
[ "com.microsoft.graph" ]
com.microsoft.graph;
1,651,707
public void emitDirect(int taskId, String streamId, List<Object> tuple, Object messageId) { _delegate.emitDirect(taskId, streamId, tuple, messageId); }
void function(int taskId, String streamId, List<Object> tuple, Object messageId) { _delegate.emitDirect(taskId, streamId, tuple, messageId); }
/** * Emits a tuple to the specified task on the specified output stream. This output * stream must have been declared as a direct stream, and the specified task must * use a direct grouping on this stream to receive the message. */
Emits a tuple to the specified task on the specified output stream. This output stream must have been declared as a direct stream, and the specified task must use a direct grouping on this stream to receive the message
emitDirect
{ "repo_name": "javelinjs/storm", "path": "src/jvm/backtype/storm/spout/SpoutOutputCollector.java", "license": "epl-1.0", "size": 4692 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
809,510
public List<Identity> getVisibleIdentitiesByPowerSearch(String login, Map<String, String> userProperties, boolean userPropertiesAsIntersectionSearch, SecurityGroup[] groups, PermissionOnResourceable[] permissionOnResources, String[] authProviders, Date createdAfter, Date createdBefore);
List<Identity> function(String login, Map<String, String> userProperties, boolean userPropertiesAsIntersectionSearch, SecurityGroup[] groups, PermissionOnResourceable[] permissionOnResources, String[] authProviders, Date createdAfter, Date createdBefore);
/** * Get a list of identities that match the following conditions. All parameters are additive. NULL values mean "no constraints" (e.g. all parameters NULL would result * in a list with all identities of the entire system) * * @param login * @param userPropertyHandlers Map of user properties that needs to b...
Get a list of identities that match the following conditions. All parameters are additive. NULL values mean "no constraints" (e.g. all parameters NULL would result in a list with all identities of the entire system)
getVisibleIdentitiesByPowerSearch
{ "repo_name": "RLDevOps/Demo", "path": "src/main/java/org/olat/basesecurity/BaseSecurity.java", "license": "apache-2.0", "size": 15856 }
[ "java.util.Date", "java.util.List", "java.util.Map", "org.olat.core.id.Identity" ]
import java.util.Date; import java.util.List; import java.util.Map; import org.olat.core.id.Identity;
import java.util.*; import org.olat.core.id.*;
[ "java.util", "org.olat.core" ]
java.util; org.olat.core;
1,289,623
public UpdateRequestBuilder setDoc(IndexRequest indexRequest) { request.doc(indexRequest); return this; }
UpdateRequestBuilder function(IndexRequest indexRequest) { request.doc(indexRequest); return this; }
/** * Sets the doc to use for updates when a script is not specified. */
Sets the doc to use for updates when a script is not specified
setDoc
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/update/UpdateRequestBuilder.java", "license": "apache-2.0", "size": 12166 }
[ "org.elasticsearch.action.index.IndexRequest" ]
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
477,598
public static void storeKeyterms(JCas questionView, List<String> keyterms) { storeConcepts(questionView, keyterms, new ArrayList<String>(), new ArrayList<String>()); }
static void function(JCas questionView, List<String> keyterms) { storeConcepts(questionView, keyterms, new ArrayList<String>(), new ArrayList<String>()); }
/** * Store (overwrite) concepts (i.e. key terms) into a view * * @param questionView * @param keyterms */
Store (overwrite) concepts (i.e. key terms) into a view
storeKeyterms
{ "repo_name": "brmson/helloqa", "path": "src/main/java/edu/cmu/lti/oaqa/openqa/dso/framework/jcas/KeytermJCasManipulator.java", "license": "apache-2.0", "size": 4425 }
[ "java.util.ArrayList", "java.util.List", "org.apache.uima.jcas.JCas" ]
import java.util.ArrayList; import java.util.List; import org.apache.uima.jcas.JCas;
import java.util.*; import org.apache.uima.jcas.*;
[ "java.util", "org.apache.uima" ]
java.util; org.apache.uima;
2,247,805
public RuleConfiguredTargetBuilder addStarlarkTransitiveInfo( String name, Object value, Location loc) throws EvalException { providersBuilder.put(name, value); return this; }
RuleConfiguredTargetBuilder function( String name, Object value, Location loc) throws EvalException { providersBuilder.put(name, value); return this; }
/** * Add a Starlark transitive info. The provider value must be safe (i.e. a String, a Boolean, an * Integer, an Artifact, a Label, None, a Java TransitiveInfoProvider or something composed from * these in Starlark using lists, sets, structs or dicts). Otherwise an EvalException is thrown. */
Add a Starlark transitive info. The provider value must be safe (i.e. a String, a Boolean, an Integer, an Artifact, a Label, None, a Java TransitiveInfoProvider or something composed from these in Starlark using lists, sets, structs or dicts). Otherwise an EvalException is thrown
addStarlarkTransitiveInfo
{ "repo_name": "cushon/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/RuleConfiguredTargetBuilder.java", "license": "apache-2.0", "size": 28491 }
[ "net.starlark.java.eval.EvalException", "net.starlark.java.syntax.Location" ]
import net.starlark.java.eval.EvalException; import net.starlark.java.syntax.Location;
import net.starlark.java.eval.*; import net.starlark.java.syntax.*;
[ "net.starlark.java" ]
net.starlark.java;
1,765,072
public static final <T extends MessageNano> T mergeFrom(T msg, final byte[] data, final int off, final int len) throws InvalidProtocolBufferNanoException { try { final CodedInputByteBufferNano input = CodedInputByteBufferNano.newInstance(data, off, len); m...
static final <T extends MessageNano> T function(T msg, final byte[] data, final int off, final int len) throws InvalidProtocolBufferNanoException { try { final CodedInputByteBufferNano input = CodedInputByteBufferNano.newInstance(data, off, len); msg.mergeFrom(input); input.checkLastTagWas(0); return msg; } catch (Inva...
/** * Parse {@code data} as a message of this type and merge it with the * message being built. */
Parse data as a message of this type and merge it with the message being built
mergeFrom
{ "repo_name": "android-ia/platform_external_protobuf", "path": "java/src/main/java/com/google/protobuf/nano/MessageNano.java", "license": "bsd-3-clause", "size": 6427 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,477,208
@Test public void testReadPDMetadata() throws IOException, URISyntaxException, ParseException { List<BibEntry> entries = XmpUtilReader.readXmp(Paths.get(XmpUtilShared.class.getResource("PD_metadata.pdf").toURI()), xmpPreferences); String bibString = Resources.toString(XmpUtilShared.class.getRes...
void function() throws IOException, URISyntaxException, ParseException { List<BibEntry> entries = XmpUtilReader.readXmp(Paths.get(XmpUtilShared.class.getResource(STR).toURI()), xmpPreferences); String bibString = Resources.toString(XmpUtilShared.class.getResource(STR), StandardCharsets.UTF_8); Optional<BibEntry> entryF...
/** * Test non XMP metadata. Metadata are included in the PDInformation */
Test non XMP metadata. Metadata are included in the PDInformation
testReadPDMetadata
{ "repo_name": "tobiasdiez/jabref", "path": "src/test/java/org/jabref/logic/xmp/XmpUtilReaderTest.java", "license": "mit", "size": 4410 }
[ "com.google.common.io.Resources", "java.io.IOException", "java.net.URISyntaxException", "java.nio.charset.StandardCharsets", "java.nio.file.Paths", "java.util.List", "java.util.Optional", "org.jabref.logic.importer.ParseException", "org.jabref.model.entry.BibEntry", "org.junit.Assert" ]
import com.google.common.io.Resources; import java.io.IOException; import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; import java.util.List; import java.util.Optional; import org.jabref.logic.importer.ParseException; import org.jabref.model.entry.BibEntry; import o...
import com.google.common.io.*; import java.io.*; import java.net.*; import java.nio.charset.*; import java.nio.file.*; import java.util.*; import org.jabref.logic.importer.*; import org.jabref.model.entry.*; import org.junit.*;
[ "com.google.common", "java.io", "java.net", "java.nio", "java.util", "org.jabref.logic", "org.jabref.model", "org.junit" ]
com.google.common; java.io; java.net; java.nio; java.util; org.jabref.logic; org.jabref.model; org.junit;
531,961
public void resetStats() { mLifeHistory.clear(); mPoisonHistory.clear(); mLife = mDefaultLifeTotal; mPoison = 0; mCommanderCasting = 0; for (CommanderEntry entry : mCommanderDamage) { entry.mLife = 0; } if (mHistoryLifeAdapter != null) { ...
void function() { mLifeHistory.clear(); mPoisonHistory.clear(); mLife = mDefaultLifeTotal; mPoison = 0; mCommanderCasting = 0; for (CommanderEntry entry : mCommanderDamage) { entry.mLife = 0; } if (mHistoryLifeAdapter != null) { mHistoryLifeAdapter.notifyDataSetChanged(); } if (mHistoryPoisonAdapter != null) { mHistory...
/** * Reset the life, poison, and commander damage to default while preserving the name and default life */
Reset the life, poison, and commander damage to default while preserving the name and default life
resetStats
{ "repo_name": "fenfir/mtg-familiar", "path": "mobile/src/main/java/com/gelakinetic/mtgfam/helpers/LcPlayer.java", "license": "mit", "size": 38733 }
[ "com.gelakinetic.mtgfam.fragments.LifeCounterFragment" ]
import com.gelakinetic.mtgfam.fragments.LifeCounterFragment;
import com.gelakinetic.mtgfam.fragments.*;
[ "com.gelakinetic.mtgfam" ]
com.gelakinetic.mtgfam;
902,479
private boolean isLabelValid(String ksLabel) { if (ksLabel.length() < MIN_KS_LABEL_LENGTH) { return false; } Pattern pattern = Pattern.compile("[A-Za-z0-9_-]+", Pattern.CASE_INSENSITIVE); Matcher match = pattern.matcher(ksLabel); return match.matches(); }
boolean function(String ksLabel) { if (ksLabel.length() < MIN_KS_LABEL_LENGTH) { return false; } Pattern pattern = Pattern.compile(STR, Pattern.CASE_INSENSITIVE); Matcher match = pattern.matcher(ksLabel); return match.matches(); }
/** * Tests to see if a kickstart label is valid or not * @param ksLabel The label to test * @return true if it is valid, false otherwise */
Tests to see if a kickstart label is valid or not
isLabelValid
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/kickstart/builder/KickstartBuilder.java", "license": "gpl-2.0", "size": 29977 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
237,595
VirtualHost createVirtualHost(NetworkId networkId, HostId hostId, MacAddress mac, VlanId vlan, HostLocation location, Set<IpAddress> ips);
VirtualHost createVirtualHost(NetworkId networkId, HostId hostId, MacAddress mac, VlanId vlan, HostLocation location, Set<IpAddress> ips);
/** * Creates a new virtual host within the specified network. The host id * must be unique within the bounds of the network. * * @param networkId network identifier * @param hostId host identifier * @param mac mac address * @param vlan vlan identifier * @param loca...
Creates a new virtual host within the specified network. The host id must be unique within the bounds of the network
createVirtualHost
{ "repo_name": "osinstom/onos", "path": "incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkAdminService.java", "license": "apache-2.0", "size": 7102 }
[ "java.util.Set", "org.onlab.packet.IpAddress", "org.onlab.packet.MacAddress", "org.onlab.packet.VlanId", "org.onosproject.net.HostId", "org.onosproject.net.HostLocation" ]
import java.util.Set; import org.onlab.packet.IpAddress; import org.onlab.packet.MacAddress; import org.onlab.packet.VlanId; import org.onosproject.net.HostId; import org.onosproject.net.HostLocation;
import java.util.*; import org.onlab.packet.*; import org.onosproject.net.*;
[ "java.util", "org.onlab.packet", "org.onosproject.net" ]
java.util; org.onlab.packet; org.onosproject.net;
461,991
public void setTusURLStore(TusURLStore store) { tusURLStore = store; }
void function(TusURLStore store) { tusURLStore = store; }
/** * Set custom Url Storage. This should be an implementation of {@link TusURLStore}. * * @param store {@link TusURLStore} the storage instance. */
Set custom Url Storage. This should be an implementation of <code>TusURLStore</code>
setTusURLStore
{ "repo_name": "transloadit/java-sdk", "path": "src/main/java/com/transloadit/sdk/Assembly.java", "license": "mit", "size": 23922 }
[ "io.tus.java.client.TusURLStore" ]
import io.tus.java.client.TusURLStore;
import io.tus.java.client.*;
[ "io.tus.java" ]
io.tus.java;
1,046,505
@Override public void onRestoreInstanceState(Parcelable state) { d("onRestoreInstanceState"); if (state instanceof Bundle) { Bundle bundle = (Bundle) state; mOpen = bundle.getBoolean("mOpen"); // ... load everything state = bundle.getParcelable("in...
void function(Parcelable state) { d(STR); if (state instanceof Bundle) { Bundle bundle = (Bundle) state; mOpen = bundle.getBoolean("mOpen"); state = bundle.getParcelable(STR); } super.onRestoreInstanceState(state); }
/** * Restores the state of the FAM after a rotation. */
Restores the state of the FAM after a rotation
onRestoreInstanceState
{ "repo_name": "peterfuture/dttv-android", "path": "dttv/dttv-samples/src/main/java/dttv/app/widget/FloatingActionMenu.java", "license": "gpl-3.0", "size": 24947 }
[ "android.os.Bundle", "android.os.Parcelable" ]
import android.os.Bundle; import android.os.Parcelable;
import android.os.*;
[ "android.os" ]
android.os;
1,771,745
BinaryResource getResource(String resourceId, Object debugInfo) throws IOException;
BinaryResource getResource(String resourceId, Object debugInfo) throws IOException;
/** * Get the resource with the specified name * @param resourceId id of the resource * @param debugInfo helper object for debugging * @return the resource with the specified name. NULL if not found * @throws IOException for unexpected behavior. */
Get the resource with the specified name
getResource
{ "repo_name": "MaTriXy/fresco", "path": "imagepipeline-base/src/main/java/com/facebook/cache/disk/DiskStorage.java", "license": "bsd-3-clause", "size": 5980 }
[ "com.facebook.binaryresource.BinaryResource", "java.io.IOException" ]
import com.facebook.binaryresource.BinaryResource; import java.io.IOException;
import com.facebook.binaryresource.*; import java.io.*;
[ "com.facebook.binaryresource", "java.io" ]
com.facebook.binaryresource; java.io;
337,610
Set<Tier> getTiers(String tenantDomain) throws APIManagementException;
Set<Tier> getTiers(String tenantDomain) throws APIManagementException;
/** * Returns a list of pre-defined # {@link org.wso2.carbon.apimgt.api.model.Tier} in the system. * * @return Set<Tier> * @throws APIManagementException if failed to get the predefined tiers */
Returns a list of pre-defined # <code>org.wso2.carbon.apimgt.api.model.Tier</code> in the system
getTiers
{ "repo_name": "hevayo/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIManager.java", "license": "apache-2.0", "size": 25015 }
[ "java.util.Set", "org.wso2.carbon.apimgt.api.model.Tier" ]
import java.util.Set; import org.wso2.carbon.apimgt.api.model.Tier;
import java.util.*; import org.wso2.carbon.apimgt.api.model.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
873,582
public EcobeeActionProvider getEcobeeActionProvider() { return this.actionProvider; }
EcobeeActionProvider function() { return this.actionProvider; }
/** * Get the EcobeeActionProvider instance injected by OSGi. * * @return the Ecobee Action Provider associated with this Action Service. */
Get the EcobeeActionProvider instance injected by OSGi
getEcobeeActionProvider
{ "repo_name": "openhab/openhab", "path": "bundles/action/org.openhab.action.ecobee/src/main/java/org/openhab/action/ecobee/internal/EcobeeActionService.java", "license": "epl-1.0", "size": 2795 }
[ "org.openhab.binding.ecobee.EcobeeActionProvider" ]
import org.openhab.binding.ecobee.EcobeeActionProvider;
import org.openhab.binding.ecobee.*;
[ "org.openhab.binding" ]
org.openhab.binding;
2,022,663