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 void deleteWorkspaceFolderContent(Long folderContentID) throws IOException {
WorkspaceFolderContent workspaceFolderContent = (WorkspaceFolderContent) baseDAO
.find(WorkspaceFolderContent.class, folderContentID);
if (workspaceFolderContent != null) {
baseDAO.delete(workspaceFolderContent);
}
} | void function(Long folderContentID) throws IOException { WorkspaceFolderContent workspaceFolderContent = (WorkspaceFolderContent) baseDAO .find(WorkspaceFolderContent.class, folderContentID); if (workspaceFolderContent != null) { baseDAO.delete(workspaceFolderContent); } } | /**
* This method deletes all versions of the given content (FILE/PACKAGE) fom the repository.
*
* @param folderContentID
* The content to be deleted
* @throws Exception
*/ | This method deletes all versions of the given content (FILE/PACKAGE) fom the repository | deleteWorkspaceFolderContent | {
"repo_name": "lamsfoundation/lams",
"path": "lams_central/src/java/org/lamsfoundation/lams/workspace/service/WorkspaceManagementService.java",
"license": "gpl-2.0",
"size": 42618
} | [
"java.io.IOException",
"org.lamsfoundation.lams.workspace.WorkspaceFolderContent"
] | import java.io.IOException; import org.lamsfoundation.lams.workspace.WorkspaceFolderContent; | import java.io.*; import org.lamsfoundation.lams.workspace.*; | [
"java.io",
"org.lamsfoundation.lams"
] | java.io; org.lamsfoundation.lams; | 409,721 |
public void setActionType(final ActionType actionType) {
this.actionType = actionType;
} | void function(final ActionType actionType) { this.actionType = actionType; } | /**
* Sets the actionType
*
* @param actionType
* Action type
*/ | Sets the actionType | setActionType | {
"repo_name": "eclipse/hawkbit",
"path": "hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/data/proxies/ProxyAssignmentWindow.java",
"license": "epl-1.0",
"size": 3693
} | [
"org.eclipse.hawkbit.repository.model.Action"
] | import org.eclipse.hawkbit.repository.model.Action; | import org.eclipse.hawkbit.repository.model.*; | [
"org.eclipse.hawkbit"
] | org.eclipse.hawkbit; | 2,708,898 |
@Test
@SmallTest
public void testGeolocationPermissionsBeforeCreateWebView() throws InterruptedException {
GeolocationPermissions.getInstance();
mActivity.createWebViewOnUiThread(TIMEOUT);
Assert.assertTrue(loadDataWebViewInUiThread(DATA));
} | void function() throws InterruptedException { GeolocationPermissions.getInstance(); mActivity.createWebViewOnUiThread(TIMEOUT); Assert.assertTrue(loadDataWebViewInUiThread(DATA)); } | /**
* Run GeolocationPermissions.getInstance on a non-ui thread before creating
* webview on ui thread
*/ | Run GeolocationPermissions.getInstance on a non-ui thread before creating webview on ui thread | testGeolocationPermissionsBeforeCreateWebView | {
"repo_name": "endlessm/chromium-browser",
"path": "android_webview/tools/system_webview_shell/layout_tests/src/org/chromium/webview_shell/test/WebViewThreadTest.java",
"license": "bsd-3-clause",
"size": 6047
} | [
"android.webkit.GeolocationPermissions",
"org.junit.Assert"
] | import android.webkit.GeolocationPermissions; import org.junit.Assert; | import android.webkit.*; import org.junit.*; | [
"android.webkit",
"org.junit"
] | android.webkit; org.junit; | 526,067 |
private boolean maybeAddInput(T value) {
if (maximumSize == 0) {
// Don't add anything.
return false;
}
// If asQueue == null, then this is the first add after the latest call to the
// constructor or asList().
if (asQueue == null) {
asQueue = new PriorityQueue... | boolean function(T value) { if (maximumSize == 0) { return false; } if (asQueue == null) { asQueue = new PriorityQueue<>(maximumSize, compareFn); for (T item : asList) { asQueue.add(item); } asList = null; } if (asQueue.size() < maximumSize) { asQueue.add(value); return true; } else if (compareFn.compare(value, asQueue... | /**
* Adds {@code value} to this heap if it is larger than any of the current elements.
* Returns {@code true} if {@code value} was added.
*/ | Adds value to this heap if it is larger than any of the current elements. Returns true if value was added | maybeAddInput | {
"repo_name": "tgroh/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Top.java",
"license": "apache-2.0",
"size": 23201
} | [
"java.util.PriorityQueue"
] | import java.util.PriorityQueue; | import java.util.*; | [
"java.util"
] | java.util; | 1,494,031 |
public void enableTtlCompactionFilter() {
enableTtlCompactionFilter = TernaryBoolean.TRUE;
}
// ------------------------------------------------------------------------
// Parametrize with RocksDB Options
// ------------------------------------------------------------------------ | void function() { enableTtlCompactionFilter = TernaryBoolean.TRUE; } | /**
* Enable compaction filter to cleanup state with TTL is enabled.
*
* <p>Note: User can still decide in state TTL configuration in state descriptor
* whether the filter is active for particular state or not.
*/ | Enable compaction filter to cleanup state with TTL is enabled. Note: User can still decide in state TTL configuration in state descriptor whether the filter is active for particular state or not | enableTtlCompactionFilter | {
"repo_name": "ueshin/apache-flink",
"path": "flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java",
"license": "apache-2.0",
"size": 35761
} | [
"org.apache.flink.util.TernaryBoolean"
] | import org.apache.flink.util.TernaryBoolean; | import org.apache.flink.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,758,629 |
private static String getErrorText(Operator operator) {
String opName;
if (operator != null) {
opName = operator.getName();
} else {
opName = "unnamed";
}
StringBuilder builder = new StringBuilder();
builder.append(
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.... | static String function(Operator operator) { String opName; if (operator != null) { opName = operator.getName(); } else { opName = STR; } StringBuilder builder = new StringBuilder(); builder.append( STR- builder.append(SwingTools.getIconPath(STR)); builder.append("\"/></td><td width=\"5\"></td><td>STRdocumentation.could... | /**
* Generates a HTML string which contains an error text for the case that an operator
* documentation was not found.
*
* @param operator
* The operator which documentation not was found
* @return An error HTML which says, that no documentation for the operator was found
*/ | Generates a HTML string which contains an error text for the case that an operator documentation was not found | getErrorText | {
"repo_name": "aborg0/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/OperatorDocLoader.java",
"license": "agpl-3.0",
"size": 12124
} | [
"com.rapidminer.gui.tools.SwingTools",
"com.rapidminer.operator.Operator"
] | import com.rapidminer.gui.tools.SwingTools; import com.rapidminer.operator.Operator; | import com.rapidminer.gui.tools.*; import com.rapidminer.operator.*; | [
"com.rapidminer.gui",
"com.rapidminer.operator"
] | com.rapidminer.gui; com.rapidminer.operator; | 594,650 |
public FinderReturn findByRafPermissionTypeLikeFR(RafPermissionType rafPermissionType,
JPQLAdvancedQueryCriteria criteria, int firstResult, int maxResults); | FinderReturn function(RafPermissionType rafPermissionType, JPQLAdvancedQueryCriteria criteria, int firstResult, int maxResults); | /**
* findByRafPermissionType>LikeFR - finds a list of RafPermissionType> Like with a finder return object
*
* @param rafPermissionType
* @return the list of RafPermissionType found
*/ | findByRafPermissionType>LikeFR - finds a list of RafPermissionType> Like with a finder return object | findByRafPermissionTypeLikeFR | {
"repo_name": "yauritux/venice-legacy",
"path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/RafPermissionTypeSessionEJBRemote.java",
"license": "apache-2.0",
"size": 2718
} | [
"com.djarum.raf.utilities.JPQLAdvancedQueryCriteria",
"com.gdn.venice.facade.finder.FinderReturn",
"com.gdn.venice.persistence.RafPermissionType"
] | import com.djarum.raf.utilities.JPQLAdvancedQueryCriteria; import com.gdn.venice.facade.finder.FinderReturn; import com.gdn.venice.persistence.RafPermissionType; | import com.djarum.raf.utilities.*; import com.gdn.venice.facade.finder.*; import com.gdn.venice.persistence.*; | [
"com.djarum.raf",
"com.gdn.venice"
] | com.djarum.raf; com.gdn.venice; | 1,094,265 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Flux<ByteBuffer>>> startWithResponseAsync(
String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.er... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String locationName, String vendorName, String serviceKey, String roleInstanceName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (locationName == null) { re... | /**
* Starts a role instance of a vendor network function.
*
* @param locationName The Azure region where the network function resource was created by customer.
* @param vendorName The name of the vendor.
* @param serviceKey The GUID for the vendor network function.
* @param roleInstanceNa... | Starts a role instance of a vendor network function | startWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesClientImpl.java",
"license": "mit",
"size": 72780
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"java.nio.ByteBuffer"
] | 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 java.nio.ByteBuffer; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*; | [
"com.azure.core",
"java.nio"
] | com.azure.core; java.nio; | 672,775 |
public static XmlSerializableAddressBook loadDataFromSaveFile(File file) throws DataConversionException,
FileNotFoundException {
try {
return XmlUtil.getDataFromFile(file, XmlSerializableAddressBook.class);
} cat... | static XmlSerializableAddressBook function(File file) throws DataConversionException, FileNotFoundException { try { return XmlUtil.getDataFromFile(file, XmlSerializableAddressBook.class); } catch (JAXBException e) { throw new DataConversionException(e); } } | /**
* Returns address book in the file or an empty address book
*/ | Returns address book in the file or an empty address book | loadDataFromSaveFile | {
"repo_name": "VeryLazyBoy/addressbook-level4",
"path": "src/main/java/seedu/address/storage/XmlFileStorage.java",
"license": "mit",
"size": 1214
} | [
"java.io.File",
"java.io.FileNotFoundException",
"javax.xml.bind.JAXBException"
] | import java.io.File; import java.io.FileNotFoundException; import javax.xml.bind.JAXBException; | import java.io.*; import javax.xml.bind.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 2,415,631 |
protected void showAlert(final String title, final String message) {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setTitle(title);
alertDialogBuilder.setMessage(message).setCancelable(false);
AlertDialog alertDialog = alertDialogBuilder.c... | void function(final String title, final String message) { AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this); alertDialogBuilder.setTitle(title); alertDialogBuilder.setMessage(message).setCancelable(false); AlertDialog alertDialog = alertDialogBuilder.create(); alertDialog.setButton(DialogInterface.... | /**
* Will display alert message with neutral button to dismiss.
* Use this in case of unrecoverable error, for instance server error.
* MUST be called from the UI thread!
*
* @param title
* @param message
*/ | Will display alert message with neutral button to dismiss. Use this in case of unrecoverable error, for instance server error. MUST be called from the UI thread | showAlert | {
"repo_name": "rsahlin/graphics-by-opengl",
"path": "graphics-by-opengl-android/src/main/java/com/nucleus/android/NucleusActivity.java",
"license": "apache-2.0",
"size": 19876
} | [
"android.app.AlertDialog",
"android.content.DialogInterface"
] | import android.app.AlertDialog; import android.content.DialogInterface; | import android.app.*; import android.content.*; | [
"android.app",
"android.content"
] | android.app; android.content; | 1,216,278 |
public void setTimestamp(final String parameterName, final Timestamp value, final Calendar cal)
throws SQLException {
for (final Integer i : preparedStatementConfig.getParameterIndexes(parameterName)) {
getDelegate().setTimestamp(i, value, cal);
}
} | void function(final String parameterName, final Timestamp value, final Calendar cal) throws SQLException { for (final Integer i : preparedStatementConfig.getParameterIndexes(parameterName)) { getDelegate().setTimestamp(i, value, cal); } } | /**
* {@link #setTimestamp(int, Timestamp, Calendar)}.
*
* @param parameterName the parameter name
* @param value the parameter value
* @param cal the <code>Calendar</code> object the driver will use
* to construct the timestamp
* @throws SQLExce... | <code>#setTimestamp(int, Timestamp, Calendar)</code> | setTimestamp | {
"repo_name": "dattack/jtoolbox",
"path": "jtoolbox-core/src/main/java/com/dattack/jtoolbox/jdbc/NamedParameterPreparedStatement.java",
"license": "apache-2.0",
"size": 45577
} | [
"java.sql.SQLException",
"java.sql.Timestamp",
"java.util.Calendar"
] | import java.sql.SQLException; import java.sql.Timestamp; import java.util.Calendar; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 803,305 |
@Override
public void write(int theByte) throws java.io.IOException
{
// Encoding suspended?
if (suspendEncoding)
{
super.out.write(theByte);
return;
} // end if: supsended
// Encode?
... | void function(int theByte) throws java.io.IOException { if (suspendEncoding) { super.out.write(theByte); return; } if (encode) { buffer[position++] = (byte) theByte; if (position >= bufferLength) { out.write(encode3to4(b4, buffer, bufferLength, options)); lineLength += 4; if (breakLines && lineLength >= MAX_LINE_LENGTH... | /**
* Writes the byte to the output stream after converting to/from Base64
* notation. When encoding, bytes are buffered three at a time before
* the output stream actually gets a write() call. When decoding, bytes
* are buffered four at a time.
*
* @param th... | Writes the byte to the output stream after converting to/from Base64 notation. When encoding, bytes are buffered three at a time before the output stream actually gets a write() call. When decoding, bytes are buffered four at a time | write | {
"repo_name": "AbleWen/wpd",
"path": "src/main/java/com/wlh/wpd/util/Base64.java",
"license": "apache-2.0",
"size": 79352
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,863,182 |
@Override
public INDArray valueArrayOf(int rows, int columns, double value) {
INDArray create = create(rows, columns);
create.assign(value);
return create;
} | INDArray function(int rows, int columns, double value) { INDArray create = create(rows, columns); create.assign(value); return create; } | /**
* Creates a row vector with the specified number of columns
*
* @param rows the number of rows in the matrix
* @param columns the columns of the ndarray
* @param value the value to assign
* @return the created ndarray
*/ | Creates a row vector with the specified number of columns | valueArrayOf | {
"repo_name": "rahulpalamuttam/nd4j",
"path": "nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java",
"license": "apache-2.0",
"size": 59439
} | [
"org.nd4j.linalg.api.ndarray.INDArray"
] | import org.nd4j.linalg.api.ndarray.INDArray; | import org.nd4j.linalg.api.ndarray.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 841,506 |
public static long setCooldown(Player player, String key, long delay) {
return calculateRemainder(
cooldowns.put(player.getName(), key, System.currentTimeMillis() + delay));
} | static long function(Player player, String key, long delay) { return calculateRemainder( cooldowns.put(player.getName(), key, System.currentTimeMillis() + delay)); } | /**
* Update a cooldown for the specified player.
* @param player - the player.
* @param key - cooldown to update.
* @param delay - number of milliseconds until the cooldown will expire again.
* @return The previous number of milliseconds until expiration.
*/ | Update a cooldown for the specified player | setCooldown | {
"repo_name": "frostythedev/ZombieEscape",
"path": "src/main/java/net/cosmosmc/mcze/utils/Cooldowns.java",
"license": "gpl-2.0",
"size": 2338
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 162,564 |
@Nonnull
public DriveItemRequestBuilder following(@Nonnull final String id) {
return new DriveItemRequestBuilder(getRequestUrlWithAdditionalSegment("following") + "/" + id, getClient(), null);
} | DriveItemRequestBuilder function(@Nonnull final String id) { return new DriveItemRequestBuilder(getRequestUrlWithAdditionalSegment(STR) + "/" + id, getClient(), null); } | /**
* Gets a request builder for the DriveItem item
*
* @return the request builder
* @param id the item identifier
*/ | Gets a request builder for the DriveItem item | following | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/DriveRequestBuilder.java",
"license": "mit",
"size": 7631
} | [
"com.microsoft.graph.requests.DriveItemRequestBuilder",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.DriveItemRequestBuilder; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,784,818 |
EAttribute getStringToStringMap_Value(); | EAttribute getStringToStringMap_Value(); | /**
* Returns the meta object for the attribute '{@link java.util.Map.Entry <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value</em>'.
* @see java.util.Map.Entry
* @see #getStringToStringMap()
* @generated
*/ | Returns the meta object for the attribute '<code>java.util.Map.Entry Value</code>'. | getStringToStringMap_Value | {
"repo_name": "turnus/turnus",
"path": "turnus.model/src/turnus/model/analysis/map/MapPackage.java",
"license": "gpl-3.0",
"size": 77072
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,534,013 |
public void setThursdayFrom(java.util.Date thursdayFrom) {
if ((this.thursdayFrom == null)) {
if ((thursdayFrom == null)) {
return;
}
this.thursdayFrom = new Time();
}
this.thursdayFrom.setValue(thursdayFrom);
}
| void function(java.util.Date thursdayFrom) { if ((this.thursdayFrom == null)) { if ((thursdayFrom == null)) { return; } this.thursdayFrom = new Time(); } this.thursdayFrom.setValue(thursdayFrom); } | /**
* Missing description at method setThursdayFrom.
*
* @param thursdayFrom the java.util.Date.
*/ | Missing description at method setThursdayFrom | setThursdayFrom | {
"repo_name": "NABUCCO/org.nabucco.business.organization",
"path": "org.nabucco.business.organization.facade.datatype/src/main/gen/org/nabucco/business/organization/facade/datatype/WorkingTime.java",
"license": "epl-1.0",
"size": 32593
} | [
"org.nabucco.framework.base.facade.datatype.date.Time"
] | import org.nabucco.framework.base.facade.datatype.date.Time; | import org.nabucco.framework.base.facade.datatype.date.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,854,023 |
public static List<Long> listManagerIdsForChannel(Org org, Long channelId) {
SelectMode m = ModeFactory.getMode("Channel_queries",
"managers_for_channel_in_org");
Map params = new HashMap();
params.put("org_id", org.getId());
params.put("channel_id", channelId);
... | static List<Long> function(Org org, Long channelId) { SelectMode m = ModeFactory.getMode(STR, STR); Map params = new HashMap(); params.put(STR, org.getId()); params.put(STR, channelId); DataResult<Map> dr = m.execute(params); List<Long> ids = new ArrayList<Long>(); for (Map row : dr) { ids.add((Long) row.get("id")); } ... | /**
* returns channel manager id for given channel
* @param org given organization
* @param channelId channel id
* @return list of channel managers
*/ | returns channel manager id for given channel | listManagerIdsForChannel | {
"repo_name": "dmacvicar/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java",
"license": "gpl-2.0",
"size": 41646
} | [
"com.redhat.rhn.common.db.datasource.DataResult",
"com.redhat.rhn.common.db.datasource.ModeFactory",
"com.redhat.rhn.common.db.datasource.SelectMode",
"com.redhat.rhn.domain.org.Org",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import com.redhat.rhn.domain.org.Org; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.domain.org.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 2,515,039 |
public E next() throws NoSuchElementException {
if (!hasNext()) {
throw new NoSuchElementException();
}
final E val = nextIterator.next();
lastReturned = nextIterator;
nextIterator = null;
return val;
} | E function() throws NoSuchElementException { if (!hasNext()) { throw new NoSuchElementException(); } final E val = nextIterator.next(); lastReturned = nextIterator; nextIterator = null; return val; } | /**
* Returns the next element from a child iterator.
*
* @return the next interleaved element
* @throws NoSuchElementException if no child iterator has any more elements
*/ | Returns the next element from a child iterator | next | {
"repo_name": "kaiyuanw/DS-TEST",
"path": "src/main/java/org/apache/commons/collections4/iterators/ZippingIterator.java",
"license": "apache-2.0",
"size": 5560
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 1,998,072 |
public ResourcePersistence getResourcePersistence() {
return resourcePersistence;
} | ResourcePersistence function() { return resourcePersistence; } | /**
* Returns the resource persistence.
*
* @return the resource persistence
*/ | Returns the resource persistence | getResourcePersistence | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/current_threat_assessment_catLocalServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 177041
} | [
"com.liferay.portal.service.persistence.ResourcePersistence"
] | import com.liferay.portal.service.persistence.ResourcePersistence; | import com.liferay.portal.service.persistence.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,214,906 |
public static void testScanForABundleActivatorMultipleMatches() throws Exception {
Builder a = new Builder();
try {
Properties p = new Properties();
p.put("Private-Package", "test.activator");
p.put("Bundle-Activator", "${classes;IMPLEMENTS;org.osgi.framework.BundleActivator}");
a.addClasspath(new Fi... | static void function() throws Exception { Builder a = new Builder(); try { Properties p = new Properties(); p.put(STR, STR); p.put(STR, STR); a.addClasspath(new File("bin")); a.setProperties(p); a.build(); Manifest manifest = a.getJar().getManifest(); assertEquals(a.getErrors().toString(), 1, a.getErrors().size()); ass... | /**
* Scan for a BundleActivator, but there are multiple matches!
*
* @throws Exception
*/ | Scan for a BundleActivator, but there are multiple matches | testScanForABundleActivatorMultipleMatches | {
"repo_name": "magnet/bnd",
"path": "biz.aQute.bndlib.tests/src/test/AnalyzerTest.java",
"license": "apache-2.0",
"size": 38688
} | [
"java.io.File",
"java.util.Properties",
"java.util.jar.Manifest"
] | import java.io.File; import java.util.Properties; import java.util.jar.Manifest; | import java.io.*; import java.util.*; import java.util.jar.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,627,951 |
@Test
public void whenSotingByNameLenghtThenMakeItAscening() {
List<User> list = new ArrayList<User>();
User user1 = new User(1, "Vitaly", 30, "SPB");
User user2 = new User(2, "Vital", 29, "SPB");
User user3 = new User(3, "Vitadfjklsg;", 28, "SPB");
list.add(user1);
... | void function() { List<User> list = new ArrayList<User>(); User user1 = new User(1, STR, 30, "SPB"); User user2 = new User(2, "Vital", 29, "SPB"); User user3 = new User(3, STR, 28, "SPB"); list.add(user1); list.add(user2); list.add(user3); List<User> result = new ArrayList<User>(); result.add(user2); result.add(user1);... | /**
* If sort users by their name lenght in ascening order.
*/ | If sort users by their name lenght in ascening order | whenSotingByNameLenghtThenMakeItAscening | {
"repo_name": "miracleman1984/vryazanov",
"path": "chapter_005lite/Tasks/src/test/java/ru/vryazanov/tasks/SortUserTest.java",
"license": "apache-2.0",
"size": 2313
} | [
"java.util.ArrayList",
"java.util.List",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import java.util.ArrayList; import java.util.List; import org.hamcrest.core.Is; import org.junit.Assert; | import java.util.*; import org.hamcrest.core.*; import org.junit.*; | [
"java.util",
"org.hamcrest.core",
"org.junit"
] | java.util; org.hamcrest.core; org.junit; | 148,693 |
public DateTime createdDateTime() {
return this.createdDateTime;
} | DateTime function() { return this.createdDateTime; } | /**
* Get the datetime when the topology was initially created for the resource group.
*
* @return the createdDateTime value
*/ | Get the datetime when the topology was initially created for the resource group | createdDateTime | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/TopologyInner.java",
"license": "mit",
"size": 2373
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 393,085 |
static ResponseBody readBodyToBytesIfNecessary(final ResponseBody body) throws IOException {
if (body == null) {
return null;
}
BufferedSource source = body.source();
Buffer buffer = new Buffer();
buffer.writeAll(source);
source.close();
return ResponseBody.create(body.contentType(... | static ResponseBody readBodyToBytesIfNecessary(final ResponseBody body) throws IOException { if (body == null) { return null; } BufferedSource source = body.source(); Buffer buffer = new Buffer(); buffer.writeAll(source); source.close(); return ResponseBody.create(body.contentType(), body.contentLength(), buffer); } | /**
* Replace a {@link Response} with an identical copy whose body is backed by a
* {@link Buffer} rather than a {@link Source}.
*/ | Replace a <code>Response</code> with an identical copy whose body is backed by a <code>Buffer</code> rather than a <code>Source</code> | readBodyToBytesIfNecessary | {
"repo_name": "deshion/retrofit",
"path": "retrofit/src/main/java/retrofit/Utils.java",
"license": "apache-2.0",
"size": 8110
} | [
"com.squareup.okhttp.ResponseBody",
"java.io.IOException"
] | import com.squareup.okhttp.ResponseBody; import java.io.IOException; | import com.squareup.okhttp.*; import java.io.*; | [
"com.squareup.okhttp",
"java.io"
] | com.squareup.okhttp; java.io; | 235,958 |
//
// Public methods
//
public void setInputSource(XMLInputSource inputSource)
throws XMLConfigurationException, IOException {
// REVISIT: this method used to reset all the components and
// construct the pipeline. Now reset() is called
// in p... | void function(XMLInputSource inputSource) throws XMLConfigurationException, IOException { fInputSource = inputSource; } | /**
* Sets the input source for the document to parse.
*
* @param inputSource The document's input source.
*
* @exception XMLConfigurationException Thrown if there is a
* configuration error when initializing the
* parser.
* ... | Sets the input source for the document to parse | setInputSource | {
"repo_name": "AaronZhangL/SplitCharater",
"path": "xerces-2_11_0/src/org/apache/xerces/parsers/XML11Configuration.java",
"license": "gpl-2.0",
"size": 63315
} | [
"java.io.IOException",
"org.apache.xerces.xni.parser.XMLConfigurationException",
"org.apache.xerces.xni.parser.XMLInputSource"
] | import java.io.IOException; import org.apache.xerces.xni.parser.XMLConfigurationException; import org.apache.xerces.xni.parser.XMLInputSource; | import java.io.*; import org.apache.xerces.xni.parser.*; | [
"java.io",
"org.apache.xerces"
] | java.io; org.apache.xerces; | 2,050,136 |
public void removeAndRecycleView(@NonNull View child, @NonNull Recycler recycler) {
removeView(child);
recycler.recycleView(child);
} | void function(@NonNull View child, @NonNull Recycler recycler) { removeView(child); recycler.recycleView(child); } | /**
* Remove a child view and recycle it using the given Recycler.
*
* @param child Child to remove and recycle
* @param recycler Recycler to use to recycle child
*/ | Remove a child view and recycle it using the given Recycler | removeAndRecycleView | {
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "v7/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java",
"license": "apache-2.0",
"size": 582575
} | [
"android.view.View",
"androidx.annotation.NonNull"
] | import android.view.View; import androidx.annotation.NonNull; | import android.view.*; import androidx.annotation.*; | [
"android.view",
"androidx.annotation"
] | android.view; androidx.annotation; | 1,942,993 |
public static void printOCDXML(MetaTypeProvider mtp,
String[] pids,
int maxOccurs,
PrintWriter out)
{
for (final String pid : pids) {
final ObjectClassDefinition ocd = mtp.getObjectClassDefinition(pid, null)... | static void function(MetaTypeProvider mtp, String[] pids, int maxOccurs, PrintWriter out) { for (final String pid : pids) { final ObjectClassDefinition ocd = mtp.getObjectClassDefinition(pid, null); if (ocd instanceof OCD) { maxOccurs = ((OCD) ocd).maxInstances; } final AttributeDefinition[] ads = ocd.getAttributeDefin... | /**
* Print a set of ObjectClassDefinitions as XML.
*
* @param mtp
* Metatype provider
* @param pids
* Set of String (PIDs)
* @param out
* writer to print to.
*/ | Print a set of ObjectClassDefinitions as XML | printOCDXML | {
"repo_name": "knopflerfish/knopflerfish.org",
"path": "osgi/bundles/metatype/kf_metatype/src/org/knopflerfish/util/metatype/Loader.java",
"license": "bsd-3-clause",
"size": 56633
} | [
"java.io.PrintWriter",
"org.osgi.service.metatype.AttributeDefinition",
"org.osgi.service.metatype.MetaTypeProvider",
"org.osgi.service.metatype.ObjectClassDefinition"
] | import java.io.PrintWriter; import org.osgi.service.metatype.AttributeDefinition; import org.osgi.service.metatype.MetaTypeProvider; import org.osgi.service.metatype.ObjectClassDefinition; | import java.io.*; import org.osgi.service.metatype.*; | [
"java.io",
"org.osgi.service"
] | java.io; org.osgi.service; | 2,396,290 |
public NoticeboardSession findNbSessionById(Long nbSessionId); | NoticeboardSession function(Long nbSessionId); | /**
* <p>
* Return the persistent instance of a NoticeboardSession with the given tool session id <code>nbSessionId</code>,
* returns null if not found.
* </p>
*
* @param nbSessionId
* The tool session id
* @return the persistent instance of a NoticeboardSession or nul... | Return the persistent instance of a NoticeboardSession with the given tool session id <code>nbSessionId</code>, returns null if not found. | findNbSessionById | {
"repo_name": "lamsfoundation/lams",
"path": "lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dao/INoticeboardSessionDAO.java",
"license": "gpl-2.0",
"size": 4110
} | [
"org.lamsfoundation.lams.tool.noticeboard.model.NoticeboardSession"
] | import org.lamsfoundation.lams.tool.noticeboard.model.NoticeboardSession; | import org.lamsfoundation.lams.tool.noticeboard.model.*; | [
"org.lamsfoundation.lams"
] | org.lamsfoundation.lams; | 1,738,515 |
public RowMetaInterface getMappedDataSetFieldsRowMeta( TransUnitTestSetLocation location ) throws KettlePluginException {
RowMetaInterface setRowMeta = getSetRowMeta( false );
RowMetaInterface rowMeta = new RowMeta();
for ( TransUnitTestFieldMapping fieldMapping : location.getFieldMappings() ) {
Va... | RowMetaInterface function( TransUnitTestSetLocation location ) throws KettlePluginException { RowMetaInterface setRowMeta = getSetRowMeta( false ); RowMetaInterface rowMeta = new RowMeta(); for ( TransUnitTestFieldMapping fieldMapping : location.getFieldMappings() ) { ValueMetaInterface valueMeta = setRowMeta.searchVal... | /**
* Calculate the row metadata for the data set fields needed for the given location.
*
* @param location
* @return The fields metadata for those fields that are mapped against a certain step (location)
*/ | Calculate the row metadata for the data set fields needed for the given location | getMappedDataSetFieldsRowMeta | {
"repo_name": "mattcasters/pentaho-pdi-dataset",
"path": "src/main/java/org/pentaho/di/dataset/DataSet.java",
"license": "apache-2.0",
"size": 6591
} | [
"org.pentaho.di.core.exception.KettlePluginException",
"org.pentaho.di.core.row.RowMeta",
"org.pentaho.di.core.row.RowMetaInterface",
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.exception.KettlePluginException; import org.pentaho.di.core.row.RowMeta; import org.pentaho.di.core.row.RowMetaInterface; import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.exception.*; import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,865,255 |
List<ProductAttribute> getProductAttributes(); | List<ProductAttribute> getProductAttributes(); | /**
* Returns the attributes of the {@link Product} of this {@link BasketItem}.
*
* @return
*/ | Returns the attributes of the <code>Product</code> of this <code>BasketItem</code> | getProductAttributes | {
"repo_name": "raphaelazzolini/mercurius",
"path": "mercurius/datatype/src/main/java/br/unicamp/ic/lsd/mercurius/datatype/BasketItem.java",
"license": "apache-2.0",
"size": 1648
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 29,190 |
public SecureVault getSecureVault() {
return secureVault;
} | SecureVault function() { return secureVault; } | /**
* Gives the secure vault instance if already set
*
* @return secureVault instance
*/ | Gives the secure vault instance if already set | getSecureVault | {
"repo_name": "Minoli/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/internal/ServiceReferenceHolder.java",
"license": "apache-2.0",
"size": 4947
} | [
"org.wso2.carbon.secvault.SecureVault"
] | import org.wso2.carbon.secvault.SecureVault; | import org.wso2.carbon.secvault.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,899,204 |
Map<Vector, Material> getRelativeLayout(); | Map<Vector, Material> getRelativeLayout(); | /**
* Gets a mapping of generic vector values and the materials to be applied
* to those relative locations
* @return The {@link Map} of {@link Vector}s to {@link Material}s
*/ | Gets a mapping of generic vector values and the materials to be applied to those relative locations | getRelativeLayout | {
"repo_name": "GoldRushMC/quick-game-framework",
"path": "src/main/java/framework/arena/Blueprintable.java",
"license": "gpl-2.0",
"size": 1979
} | [
"java.util.Map",
"org.bukkit.Material",
"org.bukkit.util.Vector"
] | import java.util.Map; import org.bukkit.Material; import org.bukkit.util.Vector; | import java.util.*; import org.bukkit.*; import org.bukkit.util.*; | [
"java.util",
"org.bukkit",
"org.bukkit.util"
] | java.util; org.bukkit; org.bukkit.util; | 1,738,472 |
Assert.notNull(lhsType, "Left-hand side type must not be null");
Assert.notNull(rhsType, "Right-hand side type must not be null");
// all types are assignable to themselves and to class Object
if (lhsType.equals(rhsType) || lhsType.equals(Object.class)) {
return true;
}
if (lhsType instanceof Class<?>)... | Assert.notNull(lhsType, STR); Assert.notNull(rhsType, STR); if (lhsType.equals(rhsType) lhsType.equals(Object.class)) { return true; } if (lhsType instanceof Class<?>) { Class<?> lhsClass = (Class<?>) lhsType; if (rhsType instanceof Class<?>) { return ClassUtils.isAssignable(lhsClass, (Class<?>) rhsType); } if (rhsType... | /**
* Check if the right-hand side type may be assigned to the left-hand side
* type following the Java generics rules.
* @param lhsType the target type
* @param rhsType the value type that should be assigned to the target type
* @return true if rhs is assignable to lhs
*/ | Check if the right-hand side type may be assigned to the left-hand side type following the Java generics rules | isAssignable | {
"repo_name": "DayS/spring-android",
"path": "spring-android-core/src/main/java/org/springframework/util/TypeUtils.java",
"license": "apache-2.0",
"size": 6332
} | [
"java.lang.reflect.GenericArrayType",
"java.lang.reflect.ParameterizedType",
"java.lang.reflect.Type",
"java.lang.reflect.WildcardType",
"org.springframework.util.ClassUtils"
] | import java.lang.reflect.GenericArrayType; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.WildcardType; import org.springframework.util.ClassUtils; | import java.lang.reflect.*; import org.springframework.util.*; | [
"java.lang",
"org.springframework.util"
] | java.lang; org.springframework.util; | 1,441,060 |
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
Object childFeature = feature;
Object childObject = child;
if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) {
FeatureMap.Entry e... | String function(Object owner, Object feature, Object child, Collection<?> selection) { Object childFeature = feature; Object childObject = child; if (childFeature instanceof EStructuralFeature && FeatureMapUtil.isFeatureMap((EStructuralFeature)childFeature)) { FeatureMap.Entry entry = (FeatureMap.Entry)childObject; chi... | /**
* This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for <code>org.eclipse.emf.edit.command.CreateChildCommand</code>. | getCreateChildText | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/citygml/building/provider/BoundarySurfacePropertyTypeItemProvider.java",
"license": "apache-2.0",
"size": 14585
} | [
"java.util.Collection",
"net.opengis.citygml.building.BuildingPackage",
"net.opengis.citygml.texturedsurface.TexturedsurfacePackage",
"net.opengis.citygml.transportation.TransportationPackage",
"net.opengis.citygml.vegetation.VegetationPackage",
"net.opengis.citygml.waterbody.WaterbodyPackage",
"net.ope... | import java.util.Collection; import net.opengis.citygml.building.BuildingPackage; import net.opengis.citygml.texturedsurface.TexturedsurfacePackage; import net.opengis.citygml.transportation.TransportationPackage; import net.opengis.citygml.vegetation.VegetationPackage; import net.opengis.citygml.waterbody.WaterbodyPac... | import java.util.*; import net.opengis.citygml.building.*; import net.opengis.citygml.texturedsurface.*; import net.opengis.citygml.transportation.*; import net.opengis.citygml.vegetation.*; import net.opengis.citygml.waterbody.*; import net.opengis.gml.*; import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.ut... | [
"java.util",
"net.opengis.citygml",
"net.opengis.gml",
"org.eclipse.emf"
] | java.util; net.opengis.citygml; net.opengis.gml; org.eclipse.emf; | 1,682,480 |
public void removePreference(long userID, long itemID) throws TasteException {
throw new UnsupportedOperationException();
} | void function(long userID, long itemID) throws TasteException { throw new UnsupportedOperationException(); } | /**
* <p>
* Removes a particular preference for a user.
* <b> Not implemented yet. </b>
* </p>
*
* @param userID user from which to remove preference
* @param itemID item to remove preference for
* @throws org.apache.mahout.cf.taste.common.NoSuchItemException
* ... | Removes a particular preference for a user. Not implemented yet. | removePreference | {
"repo_name": "feesa/easyrec-parent",
"path": "easyrec-mahout/src/main/java/org/easyrec/mahout/model/EasyrecDataModel.java",
"license": "apache-2.0",
"size": 11395
} | [
"org.apache.mahout.cf.taste.common.TasteException"
] | import org.apache.mahout.cf.taste.common.TasteException; | import org.apache.mahout.cf.taste.common.*; | [
"org.apache.mahout"
] | org.apache.mahout; | 1,634,812 |
public static Hirdeto loadByEmail(String email) {
Hirdeto hirdeto = null;
Query<Hirdeto> query = MongoUtils.getDatastore().createQuery(Hirdeto.class);
query.criteria("email").equal(email);
hirdeto = query.get();
return hirdeto;
}
| static Hirdeto function(String email) { Hirdeto hirdeto = null; Query<Hirdeto> query = MongoUtils.getDatastore().createQuery(Hirdeto.class); query.criteria("email").equal(email); hirdeto = query.get(); return hirdeto; } | /**
* Megkeresi a Hirdetot az email cim mezoje alapjan. FB belepesnel hasznaljuk.
* @param email Email cim
* @return Az azonositott Hirdeto, vagy null
*/ | Megkeresi a Hirdetot az email cim mezoje alapjan. FB belepesnel hasznaljuk | loadByEmail | {
"repo_name": "bvamos/aprocom-server",
"path": "src/main/java/com/aprohirdetes/model/HirdetoHelper.java",
"license": "gpl-3.0",
"size": 2755
} | [
"com.aprohirdetes.utils.MongoUtils",
"org.mongodb.morphia.query.Query"
] | import com.aprohirdetes.utils.MongoUtils; import org.mongodb.morphia.query.Query; | import com.aprohirdetes.utils.*; import org.mongodb.morphia.query.*; | [
"com.aprohirdetes.utils",
"org.mongodb.morphia"
] | com.aprohirdetes.utils; org.mongodb.morphia; | 473,581 |
public void updatePlayersHasInsurancesId(
PlayersHasInsurancesId playersHasInsurancesId); | void function( PlayersHasInsurancesId playersHasInsurancesId); | /**
* Update PlayersHasInsurancesId
*
* @param PlayersHasInsurancesId
* playersHasInsurancesId
*/ | Update PlayersHasInsurancesId | updatePlayersHasInsurancesId | {
"repo_name": "machadolucas/watchout",
"path": "src/main/java/com/riskvis/db/service/IPlayersHasInsurancesIdService.java",
"license": "apache-2.0",
"size": 1226
} | [
"com.riskvis.entity.PlayersHasInsurancesId"
] | import com.riskvis.entity.PlayersHasInsurancesId; | import com.riskvis.entity.*; | [
"com.riskvis.entity"
] | com.riskvis.entity; | 1,794,824 |
public Future<Void> into(@NonNull File file) {
final Bitmap croppedBitmap = cropView.crop();
return Utils.flushToFile(croppedBitmap, format, quality, file);
} | Future<Void> function(@NonNull File file) { final Bitmap croppedBitmap = cropView.crop(); return Utils.flushToFile(croppedBitmap, format, quality, file); } | /**
* Asynchronously flush cropped bitmap into provided file, creating parent directory if required. This is performed in another
* thread.
*
* @param file Must have permissions to write, will be created if doesn't exist or overwrite if it does.
* @return {@link Future} used... | Asynchronously flush cropped bitmap into provided file, creating parent directory if required. This is performed in another thread | into | {
"repo_name": "ErNaveen/Android-Iimage-Cropping-Library",
"path": "scissors/src/main/java/com/lyft/android/scissors/CropViewExtensions.java",
"license": "apache-2.0",
"size": 6430
} | [
"android.graphics.Bitmap",
"android.support.annotation.NonNull",
"java.io.File",
"java.util.concurrent.Future"
] | import android.graphics.Bitmap; import android.support.annotation.NonNull; import java.io.File; import java.util.concurrent.Future; | import android.graphics.*; import android.support.annotation.*; import java.io.*; import java.util.concurrent.*; | [
"android.graphics",
"android.support",
"java.io",
"java.util"
] | android.graphics; android.support; java.io; java.util; | 2,123,191 |
public static SCXML read(final Source scxmlSource, final Configuration configuration)
throws IOException, ModelException, XMLStreamException {
if (scxmlSource == null) {
throw new IllegalArgumentException(ERR_NULL_SRC);
}
SCXML scxml = readInternal(configuration, nul... | static SCXML function(final Source scxmlSource, final Configuration configuration) throws IOException, ModelException, XMLStreamException { if (scxmlSource == null) { throw new IllegalArgumentException(ERR_NULL_SRC); } SCXML scxml = readInternal(configuration, null, null, null, null, scxmlSource); if (scxml != null) { ... | /**
* Parse the SCXML document supplied by the given {@link Source} with the given {@link Configuration}.
*
* @param scxmlSource The {@link Source} supplying the SCXML document to parse.
* @param configuration The {@link Configuration} to use when parsing the SCXML document.
*
* @return Th... | Parse the SCXML document supplied by the given <code>Source</code> with the given <code>Configuration</code> | read | {
"repo_name": "wmudge/commons-scxml",
"path": "src/main/java/org/apache/commons/scxml2/io/SCXMLReader.java",
"license": "apache-2.0",
"size": 138470
} | [
"java.io.IOException",
"javax.xml.stream.XMLStreamException",
"javax.xml.transform.Source",
"org.apache.commons.scxml2.model.ModelException"
] | import java.io.IOException; import javax.xml.stream.XMLStreamException; import javax.xml.transform.Source; import org.apache.commons.scxml2.model.ModelException; | import java.io.*; import javax.xml.stream.*; import javax.xml.transform.*; import org.apache.commons.scxml2.model.*; | [
"java.io",
"javax.xml",
"org.apache.commons"
] | java.io; javax.xml; org.apache.commons; | 1,684,682 |
public TroubleshootingResultInner withEndTime(DateTime endTime) {
this.endTime = endTime;
return this;
} | TroubleshootingResultInner function(DateTime endTime) { this.endTime = endTime; return this; } | /**
* Set the end time of the troubleshooting.
*
* @param endTime the endTime value to set
* @return the TroubleshootingResultInner object itself.
*/ | Set the end time of the troubleshooting | withEndTime | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/implementation/TroubleshootingResultInner.java",
"license": "mit",
"size": 3099
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 312,933 |
protected void initWorkspace() {
mCurrentPage = mDefaultPage;
Launcher.setScreen(mCurrentPage);
LauncherAppState app = LauncherAppState.getInstance();
DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
mIconCache = app.getIconCache();
setWillNotDraw(false);... | void function() { mCurrentPage = mDefaultPage; Launcher.setScreen(mCurrentPage); LauncherAppState app = LauncherAppState.getInstance(); DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); mIconCache = app.getIconCache(); setWillNotDraw(false); setClipChildren(false); setClipToPadding(false); setChildrenDrawnW... | /**
* Initializes various states for this workspace.
*/ | Initializes various states for this workspace | initWorkspace | {
"repo_name": "trangnt57/Nhom7_CacVanDeHienDaiCNTT",
"path": "BlueSkyLauncher/launcher3/src/main/java/g7/bluesky/launcher3/Workspace.java",
"license": "apache-2.0",
"size": 208163
} | [
"android.view.Display"
] | import android.view.Display; | import android.view.*; | [
"android.view"
] | android.view; | 1,815,223 |
@Override
public long add(T value) throws IOException {
return printLine(getShardNum(value),
CoderUtils.encodeToByteArray(coder, value));
} | long function(T value) throws IOException { return printLine(getShardNum(value), CoderUtils.encodeToByteArray(coder, value)); } | /**
* Adds a value to the sink. Returns the size in bytes of the data written.
* The return value does -not- include header/footer size.
*/ | Adds a value to the sink. Returns the size in bytes of the data written. The return value does -not- include header/footer size | add | {
"repo_name": "chamikaramj/MyDataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/runners/worker/TextSink.java",
"license": "apache-2.0",
"size": 9090
} | [
"com.google.cloud.dataflow.sdk.util.CoderUtils",
"java.io.IOException"
] | import com.google.cloud.dataflow.sdk.util.CoderUtils; import java.io.IOException; | import com.google.cloud.dataflow.sdk.util.*; import java.io.*; | [
"com.google.cloud",
"java.io"
] | com.google.cloud; java.io; | 2,760,313 |
OffsetDateTime creationDate(); | OffsetDateTime creationDate(); | /**
* Gets the creationDate property: Creation Date for the Application Insights component, in ISO 8601 format.
*
* @return the creationDate value.
*/ | Gets the creationDate property: Creation Date for the Application Insights component, in ISO 8601 format | creationDate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java",
"license": "mit",
"size": 26069
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,275,351 |
public final void yyclose() throws java.io.IOException {
zzAtEOF = true;
zzEndRead = zzStartRead;
if (zzReader != null)
zzReader.close();
}
| final void function() throws java.io.IOException { zzAtEOF = true; zzEndRead = zzStartRead; if (zzReader != null) zzReader.close(); } | /**
* Closes the input stream.
*/ | Closes the input stream | yyclose | {
"repo_name": "vovagrechka/fucking-everything",
"path": "phizdets/phizdets-idea/eclipse-src/org.eclipse.php.core/src/org/eclipse/php/internal/core/ast/scanner/php53/PhpAstLexer.java",
"license": "apache-2.0",
"size": 104402
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,894,798 |
GetIndexRequestBuilder prepareGetIndex(); | GetIndexRequestBuilder prepareGetIndex(); | /**
* Get index metadata for particular indices.
*/ | Get index metadata for particular indices | prepareGetIndex | {
"repo_name": "robin13/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java",
"license": "apache-2.0",
"size": 26479
} | [
"org.elasticsearch.action.admin.indices.get.GetIndexRequestBuilder"
] | import org.elasticsearch.action.admin.indices.get.GetIndexRequestBuilder; | import org.elasticsearch.action.admin.indices.get.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 1,814,350 |
void add(ToCrawl todo) throws OnionCrawlerException; | void add(ToCrawl todo) throws OnionCrawlerException; | /**
* Add a ToCrawl object to crawl
* @param todo
* @throws OnionCrawlerException
*/ | Add a ToCrawl object to crawl | add | {
"repo_name": "Ueland/onioncrawler",
"path": "src/main/java/no/ueland/onionCrawler/services/crawl/CrawlService.java",
"license": "mit",
"size": 1225
} | [
"no.ueland.onionCrawler.objects.crawl.ToCrawl",
"no.ueland.onionCrawler.objects.exception.OnionCrawlerException"
] | import no.ueland.onionCrawler.objects.crawl.ToCrawl; import no.ueland.onionCrawler.objects.exception.OnionCrawlerException; | import no.ueland.*; | [
"no.ueland"
] | no.ueland; | 152,059 |
public static IScope findApplication(IScope from) {
IScope current = from;
while (current.hasParent() && !current.getType().equals(ScopeType.APPLICATION)) {
current = current.getParent();
}
return current;
} | static IScope function(IScope from) { IScope current = from; while (current.hasParent() && !current.getType().equals(ScopeType.APPLICATION)) { current = current.getParent(); } return current; } | /**
* Returns the application scope for specified scope. Application scope has depth of 1 and has no parent.
*
* See
*
* <pre>
* isApp
* </pre>
*
* method for details.
*
* @param from
* Scope to find application for
* @return Application scop... | Returns the application scope for specified scope. Application scope has depth of 1 and has no parent. See <code> isApp </code> method for details | findApplication | {
"repo_name": "Red5/red5-server-common",
"path": "src/main/java/org/red5/server/util/ScopeUtils.java",
"license": "apache-2.0",
"size": 11949
} | [
"org.red5.server.api.scope.IScope",
"org.red5.server.api.scope.ScopeType"
] | import org.red5.server.api.scope.IScope; import org.red5.server.api.scope.ScopeType; | import org.red5.server.api.scope.*; | [
"org.red5.server"
] | org.red5.server; | 2,268,824 |
public static String getStr(JsonObject jo, String key)
{
if (!jo.has(key))
return null;
JsonElement e = jo.get(key);
return e.isJsonPrimitive() ? e.getAsString() : null;
}
/**
* Get a JsonArray of String objects as an ArrayList of String objects.
*
* @param ja The source JsonArray
* @return Th... | static String function(JsonObject jo, String key) { if (!jo.has(key)) return null; JsonElement e = jo.get(key); return e.isJsonPrimitive() ? e.getAsString() : null; } /** * Get a JsonArray of String objects as an ArrayList of String objects. * * @param ja The source JsonArray * @return The ArrayList derived from {@code... | /**
* Get a String from a JsonObject. Returns null if a value for {@code key} was not found.
*
* @param jo The JsonObject to look for {@code key} in
* @param key The key to look for
* @return The value associated with {@code key} as a String, or null if the {@code key} could not be found.
*/ | Get a String from a JsonObject. Returns null if a value for key was not found | getStr | {
"repo_name": "fastily/jwiki",
"path": "src/main/java/org/fastily/jwiki/util/GSONP.java",
"license": "gpl-3.0",
"size": 5846
} | [
"com.google.gson.JsonArray",
"com.google.gson.JsonElement",
"com.google.gson.JsonObject",
"java.util.ArrayList"
] | import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import java.util.ArrayList; | import com.google.gson.*; import java.util.*; | [
"com.google.gson",
"java.util"
] | com.google.gson; java.util; | 489,611 |
public void delete(Long id) throws CantDeleteRecordDataBaseException {
if (id == null) {
throw new IllegalArgumentException("The id is required can not be null");
}
try {
DatabaseTransaction transaction = getDataBase().newTransaction();
//... | void function(Long id) throws CantDeleteRecordDataBaseException { if (id == null) { throw new IllegalArgumentException(STR); } try { DatabaseTransaction transaction = getDataBase().newTransaction(); getDataBase().executeTransaction(transaction); } catch (DatabaseTransactionFailedException databaseTransactionFailedExcep... | /**
* Method that delete a entity in the data base.
*
* @param id Long id.
* @throws CantDeleteRecordDataBaseException
*/ | Method that delete a entity in the data base | delete | {
"repo_name": "fvasquezjatar/fermat-unused",
"path": "CCP/plugin/network_service/fermat-ccp-plugin-network-service-crypto-transmission-bitdubai/src/main/java/com/bitdubai/fermat_ccp_plugin/layer/network_service/crypto_transmission/developer/bitdubai/version_1/database/communication/IncomingMessageDao.java",
"lic... | [
"com.bitdubai.fermat_api.layer.osa_android.database_system.DatabaseTransaction",
"com.bitdubai.fermat_api.layer.osa_android.database_system.exceptions.DatabaseTransactionFailedException",
"com.bitdubai.fermat_ccp_plugin.layer.network_service.crypto_transmission.developer.bitdubai.version_1.database.Comunication... | import com.bitdubai.fermat_api.layer.osa_android.database_system.DatabaseTransaction; import com.bitdubai.fermat_api.layer.osa_android.database_system.exceptions.DatabaseTransactionFailedException; import com.bitdubai.fermat_ccp_plugin.layer.network_service.crypto_transmission.developer.bitdubai.version_1.database.Comu... | import com.bitdubai.fermat_api.layer.osa_android.database_system.*; import com.bitdubai.fermat_api.layer.osa_android.database_system.exceptions.*; import com.bitdubai.fermat_ccp_plugin.layer.network_service.crypto_transmission.developer.bitdubai.version_1.database.*; import com.bitdubai.fermat_ccp_plugin.layer.network_... | [
"com.bitdubai.fermat_api",
"com.bitdubai.fermat_ccp_plugin"
] | com.bitdubai.fermat_api; com.bitdubai.fermat_ccp_plugin; | 310,990 |
@LayoutRes int provideEmptyLayout(); | @LayoutRes int provideEmptyLayout(); | /**
* Provide the layout resource for the EMPTY state
*
* @return layout resource for the EMPTY state
*/ | Provide the layout resource for the EMPTY state | provideEmptyLayout | {
"repo_name": "JamieCruwys/StatefulView",
"path": "statefulview/src/main/java/uk/co/jamiecruwys/contracts/ViewStateLayouts.java",
"license": "apache-2.0",
"size": 798
} | [
"android.support.annotation.LayoutRes"
] | import android.support.annotation.LayoutRes; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 2,536,741 |
void insertNewFiles(Collection<StoreFile> sfs) throws IOException; | void insertNewFiles(Collection<StoreFile> sfs) throws IOException; | /**
* Adds new files, either for from MemStore flush or bulk insert, into the structure.
* @param sfs New store files.
*/ | Adds new files, either for from MemStore flush or bulk insert, into the structure | insertNewFiles | {
"repo_name": "throughsky/lywebank",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileManager.java",
"license": "apache-2.0",
"size": 4830
} | [
"java.io.IOException",
"java.util.Collection"
] | import java.io.IOException; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,237,480 |
@SuppressWarnings("unchecked")
private <T> T checkAndConvert(Instruction instruction, Instruction.Type type, Class clazz) {
assertThat(instruction, is(notNullValue()));
assertThat(instruction.type(), is(equalTo(type)));
assertThat(instruction, instanceOf(clazz));
return (T) instr... | @SuppressWarnings(STR) <T> T function(Instruction instruction, Instruction.Type type, Class clazz) { assertThat(instruction, is(notNullValue())); assertThat(instruction.type(), is(equalTo(type))); assertThat(instruction, instanceOf(clazz)); return (T) instruction; } | /**
* Checks that an Instruction object has the proper type, and then converts
* it to the proper type.
*
* @param instruction Instruction object to convert
* @param type Enumerated type value for the Criterion class
* @param clazz Desired Criterion class
* @param <T> The type the cal... | Checks that an Instruction object has the proper type, and then converts it to the proper type | checkAndConvert | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java",
"license": "apache-2.0",
"size": 53514
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 2,252,361 |
IDynamicText getText(); | IDynamicText getText(); | /**
* Get the action bar text.
*/ | Get the action bar text | getText | {
"repo_name": "JCThePants/NucleusFramework",
"path": "src/com/jcwhatever/nucleus/managed/actionbar/IActionBar.java",
"license": "mit",
"size": 3474
} | [
"com.jcwhatever.nucleus.utils.text.dynamic.IDynamicText"
] | import com.jcwhatever.nucleus.utils.text.dynamic.IDynamicText; | import com.jcwhatever.nucleus.utils.text.dynamic.*; | [
"com.jcwhatever.nucleus"
] | com.jcwhatever.nucleus; | 315,208 |
public void setMaxCls(TString value) {
this.maxCls = value;
} | void function(TString value) { this.maxCls = value; } | /**
* Set the highest classification that can be used on the network. Note for
* the USA: The letter "R" MUST NOT be used in USA created datasets..
* <p>
* @param value the MaxCls value in a {@link TString} data type
* @since 3.1.0
*/ | Set the highest classification that can be used on the network. Note for | setMaxCls | {
"repo_name": "KeyBridge/lib-openssrf",
"path": "src/main/java/us/gov/dod/standard/ssrf/_3_1/contact/TelephoneFax.java",
"license": "apache-2.0",
"size": 10689
} | [
"us.gov.dod.standard.ssrf._3_1.metadata.domains.TString"
] | import us.gov.dod.standard.ssrf._3_1.metadata.domains.TString; | import us.gov.dod.standard.ssrf.*; | [
"us.gov.dod"
] | us.gov.dod; | 740,924 |
@Override
public Locale getLocale() {
return this.request.getLocale();
} | Locale function() { return this.request.getLocale(); } | /**
* The default behavior of this method is to return getLocale() on the
* wrapped request object.
*/ | The default behavior of this method is to return getLocale() on the wrapped request object | getLocale | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/javax/servlet/ServletRequestWrapper.java",
"license": "apache-2.0",
"size": 13891
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,607,647 |
public ServiceFuture<Void> updateAsync(String resourceGroupName, String serviceName, String ifMatch, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch), serviceCallback);
} | ServiceFuture<Void> function(String resourceGroupName, String serviceName, String ifMatch, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, ifMatch), serviceCallback); } | /**
* Update Sign-In settings.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param ifMatch ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * ... | Update Sign-In settings | updateAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/apimanagement/mgmt-v2019_12_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_12_01/implementation/SignInSettingsInner.java",
"license": "mit",
"size": 36152
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,930,730 |
public void showFilteredResult(List<R> filteredResult, F usedFilter);
| void function(List<R> filteredResult, F usedFilter); | /**
* update gui
* executed in JavaFX Application Thread
*/ | update gui executed in JavaFX Application Thread | showFilteredResult | {
"repo_name": "benfortuna/copper-engine",
"path": "projects/copper-monitoring/copper-monitoring-client/src/main/java/org/copperengine/monitoring/client/form/filter/FilterResultController.java",
"license": "apache-2.0",
"size": 1419
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,473,484 |
public static NormalIborCapletFloorletExpiryStrikeVolatilities createNormalVolatilities(
ZonedDateTime valuationDate,
IborIndex index) {
return NormalIborCapletFloorletExpiryStrikeVolatilities.of(index, valuationDate, NORMAL_SURFACE_EXP_STR);
} | static NormalIborCapletFloorletExpiryStrikeVolatilities function( ZonedDateTime valuationDate, IborIndex index) { return NormalIborCapletFloorletExpiryStrikeVolatilities.of(index, valuationDate, NORMAL_SURFACE_EXP_STR); } | /**
* Creates volatilities provider with specified date and index.
*
* @param valuationDate the valuation date
* @param index the index
* @return the volatilities provider
*/ | Creates volatilities provider with specified date and index | createNormalVolatilities | {
"repo_name": "jmptrader/Strata",
"path": "modules/pricer/src/test/java/com/opengamma/strata/pricer/capfloor/IborCapletFloorletDataSet.java",
"license": "apache-2.0",
"size": 6937
} | [
"com.opengamma.strata.basics.index.IborIndex",
"java.time.ZonedDateTime"
] | import com.opengamma.strata.basics.index.IborIndex; import java.time.ZonedDateTime; | import com.opengamma.strata.basics.index.*; import java.time.*; | [
"com.opengamma.strata",
"java.time"
] | com.opengamma.strata; java.time; | 1,358,552 |
private static String whoIsLookUp(String ip) {
String[] serverList = { "whois.ripe.net", "whois.lacnic.net", "whois.registro.br", "whois.nic.ac",
"whois.aeda.net.ae", "whois.aero", "whois.nic.af", "whois.nic.ag", "whois.ripe.net", "whois.amnic.net",
"whois.nic.as", "whois.nic.asia", "whois.nic.at", "whois.... | static String function(String ip) { String[] serverList = { STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, ... | /**
* Whois look up.
*
* @param ip
* the ip
* @return the string
*/ | Whois look up | whoIsLookUp | {
"repo_name": "Herschdorfer/jAbuseReport",
"path": "src/main/java/at/tlphotography/jAbuseReport/Reporter.java",
"license": "gpl-3.0",
"size": 11191
} | [
"org.apache.commons.net.whois.WhoisClient"
] | import org.apache.commons.net.whois.WhoisClient; | import org.apache.commons.net.whois.*; | [
"org.apache.commons"
] | org.apache.commons; | 267,112 |
@JsonSetter(value = "sha256")
public FileReference setSha256(final String sha256) {
this.sha256 = sha256;
return this;
} | @JsonSetter(value = STR) FileReference function(final String sha256) { this.sha256 = sha256; return this; } | /**
* Set the SHA-256 hash of the file.
*
* @param sha256 String with the SHA-256 hash of the file.
* @return This object.
*/ | Set the SHA-256 hash of the file | setSha256 | {
"repo_name": "CitrineInformatics/jpif",
"path": "src/main/java/io/citrine/jpif/obj/common/FileReference.java",
"license": "apache-2.0",
"size": 7249
} | [
"com.fasterxml.jackson.annotation.JsonSetter"
] | import com.fasterxml.jackson.annotation.JsonSetter; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 647,939 |
public void comment(XMLString text, Augmentations augs) throws XNIException {
// call handlers
if (fDocumentHandler != null) {
fDocumentHandler.comment(text, augs);
}
} // comment(XMLString) | void function(XMLString text, Augmentations augs) throws XNIException { if (fDocumentHandler != null) { fDocumentHandler.comment(text, augs); } } | /**
* A comment.
*
* @param text The text in the comment.
* @param augs Additional information that may include infoset augmentations
*
* @throws XNIException Thrown by application to signal an error.
*/ | A comment | comment | {
"repo_name": "openjdk-mirror/jdk7u-jaxp",
"path": "src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java",
"license": "gpl-2.0",
"size": 177865
} | [
"com.sun.org.apache.xerces.internal.xni.Augmentations",
"com.sun.org.apache.xerces.internal.xni.XMLString",
"com.sun.org.apache.xerces.internal.xni.XNIException"
] | import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XMLString; import com.sun.org.apache.xerces.internal.xni.XNIException; | import com.sun.org.apache.xerces.internal.xni.*; | [
"com.sun.org"
] | com.sun.org; | 2,288,136 |
public static Calendar addYears(Calendar origin, int value) {
Calendar cal = sync((Calendar) origin.clone());
cal.add(Calendar.YEAR, value);
return sync(cal);
} | static Calendar function(Calendar origin, int value) { Calendar cal = sync((Calendar) origin.clone()); cal.add(Calendar.YEAR, value); return sync(cal); } | /**
* Add/Subtract the specified amount of years to the given {@link Calendar}.
*
* <p>
* The returned {@link Calendar} has its fields synced.
* </p>
*
* @param origin
* @param value
* @return
* @since 0.9.2
*/ | Add/Subtract the specified amount of years to the given <code>Calendar</code>. The returned <code>Calendar</code> has its fields synced. | addYears | {
"repo_name": "DDTH/ddth-commons",
"path": "ddth-commons-core/src/main/java/com/github/ddth/commons/utils/DateTimeUtils.java",
"license": "mit",
"size": 25648
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,230,285 |
public boolean misfire(LivingEntity entity, Bullet bulletType, ItemStack item, Map<String, Object> gunData,
EquipmentSlot hand) {
if (entity == null || !enabled)
return true;
Integer health = (Integer) gunData.get("health"); // gunhealth!
double misfireChance = 1.0d - sigmoid((double) health, (double... | boolean function(LivingEntity entity, Bullet bulletType, ItemStack item, Map<String, Object> gunData, EquipmentSlot hand) { if (entity == null !enabled) return true; Integer health = (Integer) gunData.get(STR); double misfireChance = 1.0d - sigmoid((double) health, (double) this.middleRisk,0.5d, (double) this.riskSprea... | /**
* Computes chance that the gun misfires! Yikes.
*
* Misfire is based on when you last repaired the gun. A misfire has a chance of causing a gun to explode (handled in another function)
*
*
*
* @param entity the entity shooting the gun
* @param bulletType the type of bullet
* @param item the gu... | Computes chance that the gun misfires! Yikes. Misfire is based on when you last repaired the gun. A misfire has a chance of causing a gun to explode (handled in another function) | misfire | {
"repo_name": "ProgrammerDan/AddGun",
"path": "src/main/java/com/programmerdan/minecraft/addgun/guns/StandardGun.java",
"license": "bsd-3-clause",
"size": 63913
} | [
"com.programmerdan.minecraft.addgun.AddGun",
"com.programmerdan.minecraft.addgun.ammo.Bullet",
"com.programmerdan.minecraft.addgun.guns.Utilities",
"java.util.Map",
"org.bukkit.entity.LivingEntity",
"org.bukkit.inventory.EquipmentSlot",
"org.bukkit.inventory.ItemStack"
] | import com.programmerdan.minecraft.addgun.AddGun; import com.programmerdan.minecraft.addgun.ammo.Bullet; import com.programmerdan.minecraft.addgun.guns.Utilities; import java.util.Map; import org.bukkit.entity.LivingEntity; import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; | import com.programmerdan.minecraft.addgun.*; import com.programmerdan.minecraft.addgun.ammo.*; import com.programmerdan.minecraft.addgun.guns.*; import java.util.*; import org.bukkit.entity.*; import org.bukkit.inventory.*; | [
"com.programmerdan.minecraft",
"java.util",
"org.bukkit.entity",
"org.bukkit.inventory"
] | com.programmerdan.minecraft; java.util; org.bukkit.entity; org.bukkit.inventory; | 2,064,910 |
private void _clean(long sizeToDel ) {
log.info( "Free disk space for "+( this==singletonWADO ? "WADO":"RID" )+" cache!");
FileToDelContainer ftd = new FileToDelContainer( new File( getAbsCacheRoot(), defaultSubdir ), sizeToDel );
if ( this == singletonWADO) {
File[] files = getAbsCacheRoot().listFiles();
... | void function(long sizeToDel ) { log.info( STR+( this==singletonWADO ? "WADO":"RID" )+STR); FileToDelContainer ftd = new FileToDelContainer( new File( getAbsCacheRoot(), defaultSubdir ), sizeToDel ); if ( this == singletonWADO) { File[] files = getAbsCacheRoot().listFiles(); if ( files != null ) { for ( int i = 0, len ... | /**
* Deletes old files to free the given amount of disk space.
* <p>
* If a directory is empty after deleting a file, the directory will also be deleted.
*/ | Deletes old files to free the given amount of disk space. If a directory is empty after deleting a file, the directory will also be deleted | _clean | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4CHEE_2_10_9/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/cache/WADOCacheImpl.java",
"license": "apache-2.0",
"size": 25588
} | [
"java.io.File",
"java.util.Iterator"
] | import java.io.File; import java.util.Iterator; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,719,196 |
SimpleQueryBuilder select( ValueExpression... expressions ); | SimpleQueryBuilder select( ValueExpression... expressions ); | /**
* Adds the specified column expressions to the {@code SELECT} list.
*
* @param expressions The value expressions for columns.
* @return This builder.
*/ | Adds the specified column expressions to the SELECT list | select | {
"repo_name": "apache/zest-qi4j",
"path": "libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/builders/query/SimpleQueryBuilder.java",
"license": "apache-2.0",
"size": 4345
} | [
"org.apache.polygene.library.sql.generator.grammar.common.ValueExpression"
] | import org.apache.polygene.library.sql.generator.grammar.common.ValueExpression; | import org.apache.polygene.library.sql.generator.grammar.common.*; | [
"org.apache.polygene"
] | org.apache.polygene; | 1,413,236 |
public void index(@NotNull String id) {
StudyDataset dataset = findById(id);
prepareForIndex(dataset);
eventBus.post(new DatasetUpdatedEvent(dataset));
} | void function(@NotNull String id) { StudyDataset dataset = findById(id); prepareForIndex(dataset); eventBus.post(new DatasetUpdatedEvent(dataset)); } | /**
* Index the dataset
*
* @param id
*/ | Index the dataset | index | {
"repo_name": "Rima-B/mica2",
"path": "mica-core/src/main/java/org/obiba/mica/dataset/service/CollectedDatasetService.java",
"license": "gpl-3.0",
"size": 18224
} | [
"javax.validation.constraints.NotNull",
"org.obiba.mica.dataset.domain.StudyDataset",
"org.obiba.mica.dataset.event.DatasetUpdatedEvent"
] | import javax.validation.constraints.NotNull; import org.obiba.mica.dataset.domain.StudyDataset; import org.obiba.mica.dataset.event.DatasetUpdatedEvent; | import javax.validation.constraints.*; import org.obiba.mica.dataset.domain.*; import org.obiba.mica.dataset.event.*; | [
"javax.validation",
"org.obiba.mica"
] | javax.validation; org.obiba.mica; | 2,323,200 |
public boolean request(final Player player, final String id, final String description, final String... buttons) {
return false;
}
| boolean function(final Player player, final String id, final String description, final String... buttons) { return false; } | /**
* Pop up a requester for the player.
* @param player the Player to ask
* @param description the question to ask them
* @param buttons a list of buttons to display
* @return if the request could be shown
*/ | Pop up a requester for the player | request | {
"repo_name": "mmoMinecraftDev/mmoCore",
"path": "src/main/java/mmo/Core/MMOPlugin.java",
"license": "gpl-3.0",
"size": 28206
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 1,529,220 |
public User createUser(String username, final String password, final String name, final String email)
throws UserAlreadyExistsException
{
if (provider.isReadOnly()) {
throw new UnsupportedOperationException("User provider is read-only.");
}
if (username == null ||... | User function(String username, final String password, final String name, final String email) throws UserAlreadyExistsException { if (provider.isReadOnly()) { throw new UnsupportedOperationException(STR); } if (username == null username.isEmpty()) { throw new IllegalArgumentException(STR); } if (password == null passwor... | /**
* Creates a new User. Required values are username and password. The email address
* and name can optionally be {@code null}, unless the UserProvider deems that
* either of them are required.
*
* @param username the new and unique username for the account.
* @param password the passwor... | Creates a new User. Required values are username and password. The email address and name can optionally be null, unless the UserProvider deems that either of them are required | createUser | {
"repo_name": "akrherz/Openfire",
"path": "xmppserver/src/main/java/org/jivesoftware/openfire/user/UserManager.java",
"license": "apache-2.0",
"size": 25408
} | [
"gnu.inet.encoding.Stringprep",
"gnu.inet.encoding.StringprepException",
"java.util.Collections",
"java.util.Map",
"org.jivesoftware.openfire.event.UserEventDispatcher",
"org.jivesoftware.util.StringUtils"
] | import gnu.inet.encoding.Stringprep; import gnu.inet.encoding.StringprepException; import java.util.Collections; import java.util.Map; import org.jivesoftware.openfire.event.UserEventDispatcher; import org.jivesoftware.util.StringUtils; | import gnu.inet.encoding.*; import java.util.*; import org.jivesoftware.openfire.event.*; import org.jivesoftware.util.*; | [
"gnu.inet.encoding",
"java.util",
"org.jivesoftware.openfire",
"org.jivesoftware.util"
] | gnu.inet.encoding; java.util; org.jivesoftware.openfire; org.jivesoftware.util; | 1,495,686 |
private void adjustMemberVisibility(final IMember member, final IProgressMonitor monitor) throws JavaModelException {
if (member instanceof IType) {
// recursively check accessibility of member type's members
final IJavaElement[] typeMembers= ((IType) member).getChildren();
for (int i= 0; i < typeMembers... | void function(final IMember member, final IProgressMonitor monitor) throws JavaModelException { if (member instanceof IType) { final IJavaElement[] typeMembers= ((IType) member).getChildren(); for (int i= 0; i < typeMembers.length; i++) { if (! (typeMembers[i] instanceof IInitializer)) adjustMemberVisibility((IMember) ... | /**
* Check whether anyone accesses the members of the moved type from the
* outside. Those may need to have their visibility adjusted.
* @param member the member
* @param monitor the progress monitor to use
* @throws JavaModelException if an error occurs
*/ | Check whether anyone accesses the members of the moved type from the outside. Those may need to have their visibility adjusted | adjustMemberVisibility | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java",
"license": "epl-1.0",
"size": 56703
} | [
"org.eclipse.core.runtime.IProgressMonitor",
"org.eclipse.core.runtime.SubProgressMonitor",
"org.eclipse.jdt.core.IInitializer",
"org.eclipse.jdt.core.IJavaElement",
"org.eclipse.jdt.core.IMember",
"org.eclipse.jdt.core.IType",
"org.eclipse.jdt.core.JavaModelException",
"org.eclipse.jdt.core.dom.Modif... | import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jdt.core.IInitializer; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; import org.ecl... | import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.core.search.*; import org.eclipse.jdt.internal.corext.refactoring.*; | [
"org.eclipse.core",
"org.eclipse.jdt"
] | org.eclipse.core; org.eclipse.jdt; | 1,683,910 |
public final static Context retrieveJNDIContext( XQueryContext context, long ctxID )
{
Context jndiContext = null;
// get the existing connections map from the context
HashMap contexts = (HashMap)context.getAttribute( JNDIModule.JNDICONTEXTS_VARIABLE );
if( contexts != null ) {
jndiContext = (Co... | final static Context function( XQueryContext context, long ctxID ) { Context jndiContext = null; HashMap contexts = (HashMap)context.getAttribute( JNDIModule.JNDICONTEXTS_VARIABLE ); if( contexts != null ) { jndiContext = (Context)contexts.get(ctxID); } return( jndiContext ); } | /**
* Retrieves a previously stored Connection from the Context of an XQuery
*
* @param context The Context of the XQuery containing the JNDI Context
* @param ctxID The ID of the JNDI Context to retrieve from the Context of the XQuery
*
* @return the JNDI context
*/ | Retrieves a previously stored Connection from the Context of an XQuery | retrieveJNDIContext | {
"repo_name": "windauer/exist",
"path": "extensions/modules/jndi/src/main/java/org/exist/xquery/modules/jndi/JNDIModule.java",
"license": "lgpl-2.1",
"size": 9257
} | [
"java.util.HashMap",
"javax.naming.Context",
"org.exist.xquery.XQueryContext"
] | import java.util.HashMap; import javax.naming.Context; import org.exist.xquery.XQueryContext; | import java.util.*; import javax.naming.*; import org.exist.xquery.*; | [
"java.util",
"javax.naming",
"org.exist.xquery"
] | java.util; javax.naming; org.exist.xquery; | 1,915,043 |
public BatchClassFieldDTO getBatchClassFieldByName(final String name) {
final Collection<BatchClassFieldDTO> batchClassFields = batchClassFieldMap.values();
BatchClassFieldDTO batchClassFieldDto = null;
if (batchClassFields != null) {
for (final BatchClassFieldDTO batchClassFieldDTO : batchClassFields) {
... | BatchClassFieldDTO function(final String name) { final Collection<BatchClassFieldDTO> batchClassFields = batchClassFieldMap.values(); BatchClassFieldDTO batchClassFieldDto = null; if (batchClassFields != null) { for (final BatchClassFieldDTO batchClassFieldDTO : batchClassFields) { if (batchClassFieldDTO.getName().equa... | /**
* Returns the batch class field based on name
*
* @param name the name of the document
* @return batch class field DTO based on provided name
*/ | Returns the batch class field based on name | getBatchClassFieldByName | {
"repo_name": "kuzavas/ephesoft",
"path": "dcma-gwt/dcma-gwt-core/src/main/java/com/ephesoft/dcma/gwt/core/shared/BatchClassDTO.java",
"license": "agpl-3.0",
"size": 23222
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,280,307 |
public void setTestOut(PrintStream testOut) {
this.testOut = testOut;
} | void function(PrintStream testOut) { this.testOut = testOut; } | /**
* Set test out stream.
* @param testOut the testOut to set
*/ | Set test out stream | setTestOut | {
"repo_name": "Distrotech/fop",
"path": "src/java/org/apache/fop/hyphenation/PatternParser.java",
"license": "apache-2.0",
"size": 15665
} | [
"java.io.PrintStream"
] | import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,000,606 |
private void retrieveXmlConfiguration(Context context, AttributeSet attrs) {
if (attrs != null) {
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.HorizontalListView);
// Get the provided drawable from the XML
final Drawable d = a.getDrawable(R.styleable.... | void function(Context context, AttributeSet attrs) { if (attrs != null) { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.HorizontalListView); final Drawable d = a.getDrawable(R.styleable.HorizontalListView_android_divider); if (d != null) { setDivider(d); } final int dividerWidth = a.getDimensionPixel... | /**
* Parse the XML configuration for this widget
*
* @param context Context used for extracting attributes
* @param attrs The Attribute Set containing the ColumnView attributes
*/ | Parse the XML configuration for this widget | retrieveXmlConfiguration | {
"repo_name": "zhuangzaiku/NiuwaClient",
"path": "androidHorizontalListView/src/main/java/tv/meetme/android/horizontallistview/HorizontalListView.java",
"license": "apache-2.0",
"size": 52632
} | [
"android.content.Context",
"android.content.res.TypedArray",
"android.graphics.drawable.Drawable",
"android.util.AttributeSet"
] | import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; import android.util.AttributeSet; | import android.content.*; import android.content.res.*; import android.graphics.drawable.*; import android.util.*; | [
"android.content",
"android.graphics",
"android.util"
] | android.content; android.graphics; android.util; | 2,893,783 |
public void relocated(
final String reason, final Consumer<GlobalCheckpointTracker.PrimaryContext> consumer) throws IllegalIndexShardStateException, InterruptedException {
assert shardRouting.primary() : "only primaries can be marked as relocated: " + shardRouting;
try {
inde... | void function( final String reason, final Consumer<GlobalCheckpointTracker.PrimaryContext> consumer) throws IllegalIndexShardStateException, InterruptedException { assert shardRouting.primary() : STR + shardRouting; try { indexShardOperationPermits.blockOperations(30, TimeUnit.MINUTES, () -> { assert indexShardOperatio... | /**
* Completes the relocation. Operations are blocked and current operations are drained before changing state to relocated. The provided
* {@link Runnable} is executed after all operations are successfully blocked.
*
* @param reason the reason for the relocation
* @param consumer a {@link ... | Completes the relocation. Operations are blocked and current operations are drained before changing state to relocated. The provided <code>Runnable</code> is executed after all operations are successfully blocked | relocated | {
"repo_name": "sneivandt/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 117724
} | [
"java.util.concurrent.TimeUnit",
"java.util.concurrent.TimeoutException",
"java.util.function.Consumer",
"org.elasticsearch.index.seqno.GlobalCheckpointTracker"
] | import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Consumer; import org.elasticsearch.index.seqno.GlobalCheckpointTracker; | import java.util.concurrent.*; import java.util.function.*; import org.elasticsearch.index.seqno.*; | [
"java.util",
"org.elasticsearch.index"
] | java.util; org.elasticsearch.index; | 1,936,341 |
@Override
public void remove( String cacheName, K key )
throws IOException
{
remove( cacheName, key, 0 );
} | void function( String cacheName, K key ) throws IOException { remove( cacheName, key, 0 ); } | /**
* Removes the given key from the specified remote cache. Defaults the listener id to 0.
* <p>
* @param cacheName
* @param key
* @throws IOException
*/ | Removes the given key from the specified remote cache. Defaults the listener id to 0. | remove | {
"repo_name": "mohanaraosv/commons-jcs",
"path": "commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java",
"license": "apache-2.0",
"size": 57963
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 251,061 |
public boolean addCustomer(String inIDNumber, String inName) {
try {
Customer customer = new Customer(inIDNumber, inName);
database.update("INSERT INTO " + CUSTOMER_TABLE
+ " (custName,custID) VALUES('" + customer.getName()
+ "','" + customer.getIdNumber() + "');");
return true;
} catch... | boolean function(String inIDNumber, String inName) { try { Customer customer = new Customer(inIDNumber, inName); database.update(STR + CUSTOMER_TABLE + STR + customer.getName() + "','" + customer.getIdNumber() + "');"); return true; } catch (IOException e) { return false; } catch (SQLException e) { return false; } } | /**
* Add a customer to the customer list
*
* @param inIDNumber
* Customer's ID
* @param inName
* Customer's name
* @return Whether the customer was added successfully
*/ | Add a customer to the customer list | addCustomer | {
"repo_name": "reneoctavio/contas",
"path": "contas/src/model/CheckRegister.java",
"license": "mit",
"size": 16711
} | [
"java.io.IOException",
"java.sql.SQLException"
] | import java.io.IOException; import java.sql.SQLException; | import java.io.*; import java.sql.*; | [
"java.io",
"java.sql"
] | java.io; java.sql; | 306,210 |
public static MessageContainer getMessageContainer(String registredKey) {
return CacheServiceFactory.getApplicationCacheService()
.get(registredKey, MessageContainer.class);
} | static MessageContainer function(String registredKey) { return CacheServiceFactory.getApplicationCacheService() .get(registredKey, MessageContainer.class); } | /**
* Gets the message container.
* @return
*/ | Gets the message container | getMessageContainer | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "lib-core/src/main/java/org/silverpeas/notification/message/MessageManager.java",
"license": "agpl-3.0",
"size": 11245
} | [
"org.silverpeas.cache.service.CacheServiceFactory"
] | import org.silverpeas.cache.service.CacheServiceFactory; | import org.silverpeas.cache.service.*; | [
"org.silverpeas.cache"
] | org.silverpeas.cache; | 698,167 |
@Test
public void testRenewTicket() throws Exception
{
KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
String serverPassword = "randomKey";
Tick... | void function() throws Exception { KerberosPrincipal clientPrincipal = new KerberosPrincipal( STR ); KerberosPrincipal serverPrincipal = new KerberosPrincipal( STR ); String serverPassword = STR; Ticket tgt = getTgt( clientPrincipal, serverPrincipal, serverPassword ); KdcReqBody kdcReqBody = new KdcReqBody(); kdcReqBod... | /**
* "The TGS exchange between a client and the Kerberos TGS is initiated by a
* client when ... it seeks to renew an existing ticket."
*
* @throws Exception
*/ | "The TGS exchange between a client and the Kerberos TGS is initiated by a client when ... it seeks to renew an existing ticket." | testRenewTicket | {
"repo_name": "drankye/directory-server",
"path": "protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java",
"license": "apache-2.0",
"size": 81600
} | [
"javax.security.auth.kerberos.KerberosPrincipal",
"org.apache.directory.shared.kerberos.KerberosTime",
"org.apache.directory.shared.kerberos.codec.options.KdcOptions",
"org.apache.directory.shared.kerberos.components.KdcReq",
"org.apache.directory.shared.kerberos.components.KdcReqBody",
"org.apache.direct... | import javax.security.auth.kerberos.KerberosPrincipal; import org.apache.directory.shared.kerberos.KerberosTime; import org.apache.directory.shared.kerberos.codec.options.KdcOptions; import org.apache.directory.shared.kerberos.components.KdcReq; import org.apache.directory.shared.kerberos.components.KdcReqBody; import ... | import javax.security.auth.kerberos.*; import org.apache.directory.shared.kerberos.*; import org.apache.directory.shared.kerberos.codec.options.*; import org.apache.directory.shared.kerberos.components.*; import org.apache.directory.shared.kerberos.messages.*; import org.junit.*; | [
"javax.security",
"org.apache.directory",
"org.junit"
] | javax.security; org.apache.directory; org.junit; | 894,493 |
public GameRules getGameRulesInstance()
{
return this.theWorldInfo.getGameRulesInstance();
} | GameRules function() { return this.theWorldInfo.getGameRulesInstance(); } | /**
* Gets the GameRules class Instance.
*/ | Gets the GameRules class Instance | getGameRulesInstance | {
"repo_name": "SkidJava/BaseClient",
"path": "new_1.8.8/net/minecraft/world/storage/DerivedWorldInfo.java",
"license": "gpl-2.0",
"size": 6161
} | [
"net.minecraft.world.GameRules"
] | import net.minecraft.world.GameRules; | import net.minecraft.world.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 2,116,420 |
@Deprecated
public Properties getProperties() {
return getSys();
} | Properties function() { return getSys(); } | /**
* Returns the current JVM's system properties.
*
* @return the current JVM's system properties
*
* @deprecated use {@link #getSys()} instead
*/ | Returns the current JVM's system properties | getProperties | {
"repo_name": "siordache/spock",
"path": "spock-core/src/main/java/org/spockframework/runtime/extension/builtin/PreconditionContext.java",
"license": "apache-2.0",
"size": 2392
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 966,536 |
public static <T> UniformValueBinding<T> create(Uniform<T> uniform, Supplier<? extends T> supplier) {
return new UniformValueBinding<>(uniform, supplier);
}
public final Uniform<T> uniform;
public final Supplier<? extends T> supplier;
public UniformValueBinding(Uniform<T> uniform, Su... | static <T> UniformValueBinding<T> function(Uniform<T> uniform, Supplier<? extends T> supplier) { return new UniformValueBinding<>(uniform, supplier); } public final Uniform<T> uniform; public final Supplier<? extends T> supplier; public UniformValueBinding(Uniform<T> uniform, Supplier<? extends T> supplier) { this.unif... | /**
* Creates a uniform value binding for the given uniform and supplier.
*
* @param uniform the uniform to which the given supplier should be bound.
* @param supplier the supplier that should be bound to the given uniform.
* @param <T> the type of the uniform.
* @return the created ... | Creates a uniform value binding for the given uniform and supplier | create | {
"repo_name": "sgs-us/microtrafficsim",
"path": "microtrafficsim-core/src/main/java/microtrafficsim/core/vis/mesh/style/UniformValueBinding.java",
"license": "gpl-3.0",
"size": 3133
} | [
"java.util.function.Supplier"
] | import java.util.function.Supplier; | import java.util.function.*; | [
"java.util"
] | java.util; | 704,238 |
public void setAuditService(AuditService auditService)
{
this.auditService = auditService;
} | void function(AuditService auditService) { this.auditService = auditService; } | /**
* Sets the audit service.
*/ | Sets the audit service | setAuditService | {
"repo_name": "Kast0rTr0y/community-edition",
"path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java",
"license": "lgpl-3.0",
"size": 147090
} | [
"org.alfresco.service.cmr.audit.AuditService"
] | import org.alfresco.service.cmr.audit.AuditService; | import org.alfresco.service.cmr.audit.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 905,845 |
@Override
public GraphComputer compute() throws IllegalArgumentException {
throw Graph.Exceptions.graphComputerNotSupported();
} | GraphComputer function() throws IllegalArgumentException { throw Graph.Exceptions.graphComputerNotSupported(); } | /**
* GraphComputer not currently supported.
*
* TODO FIXME Implement GraphComputer over DASL API
*/ | GraphComputer not currently supported. TODO FIXME Implement GraphComputer over DASL API | compute | {
"repo_name": "blazegraph/tinkerpop3",
"path": "src/main/java/com/blazegraph/gremlin/structure/BlazeGraph.java",
"license": "gpl-2.0",
"size": 56488
} | [
"org.apache.tinkerpop.gremlin.process.computer.GraphComputer",
"org.apache.tinkerpop.gremlin.structure.Graph"
] | import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; import org.apache.tinkerpop.gremlin.structure.Graph; | import org.apache.tinkerpop.gremlin.process.computer.*; import org.apache.tinkerpop.gremlin.structure.*; | [
"org.apache.tinkerpop"
] | org.apache.tinkerpop; | 395,734 |
@Override
protected int getDefaultMarginIndent(
UIXRenderingContext context,
UINode node
)
{
return _MARGIN_INDENT;
}
// # of pixels to use for the margin
private static final int _BASE_MARGIN_INDENT = 12;
private static final int _IE_DEFAULT_MARGIN = 10;
private static final ... | int function( UIXRenderingContext context, UINode node ) { return _MARGIN_INDENT; } private static final int _BASE_MARGIN_INDENT = 12; private static final int _IE_DEFAULT_MARGIN = 10; private static final int _MARGIN_INDENT = _BASE_MARGIN_INDENT - _IE_DEFAULT_MARGIN; | /**
* Returns the default marign indent to use if no CELL_PADDING_ATTR
* is specified
*/ | Returns the default marign indent to use if no CELL_PADDING_ATTR is specified | getDefaultMarginIndent | {
"repo_name": "adamrduffy/trinidad-1.0.x",
"path": "trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/BorderLayoutRenderer.java",
"license": "apache-2.0",
"size": 1999
} | [
"org.apache.myfaces.trinidadinternal.ui.UINode",
"org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext"
] | import org.apache.myfaces.trinidadinternal.ui.UINode; import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext; | import org.apache.myfaces.trinidadinternal.ui.*; | [
"org.apache.myfaces"
] | org.apache.myfaces; | 1,543,179 |
protected final void cleanupLocalCopyIfNecessary() throws IOException, AgentFailureException {
if (isHasToCleanup(agentHost)) {
cleanupLocalCopy();
}
} | final void function() throws IOException, AgentFailureException { if (isHasToCleanup(agentHost)) { cleanupLocalCopy(); } } | /**
* Deletes content of checkout directory if flag is set to
* true.
*/ | Deletes content of checkout directory if flag is set to true | cleanupLocalCopyIfNecessary | {
"repo_name": "simeshev/parabuild-ci",
"path": "src/org/parabuild/ci/versioncontrol/AbstractSourceControl.java",
"license": "lgpl-3.0",
"size": 17753
} | [
"java.io.IOException",
"org.parabuild.ci.build.AgentFailureException"
] | import java.io.IOException; import org.parabuild.ci.build.AgentFailureException; | import java.io.*; import org.parabuild.ci.build.*; | [
"java.io",
"org.parabuild.ci"
] | java.io; org.parabuild.ci; | 1,158,660 |
Document get( String key );
/**
* Loads a set of documents from the DB returning the corresponding schematic entries.
*
* <p>
* If this method is called within an existing transaction, it should <b>not take into account</b> the transient transactional
* context (i.e. any local but no... | Document get( String key ); /** * Loads a set of documents from the DB returning the corresponding schematic entries. * * <p> * If this method is called within an existing transaction, it should <b>not take into account</b> the transient transactional * context (i.e. any local but not yet committed changes) and should ... | /**
* Get the document with the supplied key. This will represent the full {@link SchematicEntry} document if one exists.
* <p>
* If this method is called within an existing transaction, it should take into account the transient transactional context
* (i.e. any local but not yet committed changes)... | Get the document with the supplied key. This will represent the full <code>SchematicEntry</code> document if one exists. If this method is called within an existing transaction, it should take into account the transient transactional context (i.e. any local but not yet committed changes) | get | {
"repo_name": "RobSis/modeshape",
"path": "modeshape-schematic/src/main/java/org/modeshape/schematic/SchematicDb.java",
"license": "apache-2.0",
"size": 7016
} | [
"java.util.Collection",
"java.util.List",
"org.modeshape.schematic.document.Document"
] | import java.util.Collection; import java.util.List; import org.modeshape.schematic.document.Document; | import java.util.*; import org.modeshape.schematic.document.*; | [
"java.util",
"org.modeshape.schematic"
] | java.util; org.modeshape.schematic; | 298,461 |
public CountDownLatch changeOrderPriceListAsync(String priceListCode, String orderId, String updateMode, String version, String responseFields, AsyncCallback<com.mozu.api.contracts.commerceruntime.orders.Order> callback) throws Exception
{
MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> client = c... | CountDownLatch function(String priceListCode, String orderId, String updateMode, String version, String responseFields, AsyncCallback<com.mozu.api.contracts.commerceruntime.orders.Order> callback) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> client = com.mozu.api.clients.commerce.O... | /**
* Changes the pricelist associated with an order. The desired price list code should be specified on the ApiContext.
* <p><pre><code>
* Order order = new Order();
* CountDownLatch latch = order.changeOrderPriceList( priceListCode, orderId, updateMode, version, responseFields, callback );
* latch.await... | Changes the pricelist associated with an order. The desired price list code should be specified on the ApiContext. <code><code> Order order = new Order(); CountDownLatch latch = order.changeOrderPriceList( priceListCode, orderId, updateMode, version, responseFields, callback ); latch.await() * </code></code> | changeOrderPriceListAsync | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/OrderResource.java",
"license": "mit",
"size": 51787
} | [
"com.mozu.api.AsyncCallback",
"com.mozu.api.MozuClient",
"java.util.concurrent.CountDownLatch"
] | import com.mozu.api.AsyncCallback; import com.mozu.api.MozuClient; import java.util.concurrent.CountDownLatch; | import com.mozu.api.*; import java.util.concurrent.*; | [
"com.mozu.api",
"java.util"
] | com.mozu.api; java.util; | 744,385 |
public void saveHistory() {
final IDialogSettings settings= fWizard.getDialogSettings();
if (settings != null) {
final LinkedList locations= new LinkedList();
final String[] items= fCombo.getItems();
for (int index= 0; index < items.length; index++)
locations.add(items[index]);
final String text=... | void function() { final IDialogSettings settings= fWizard.getDialogSettings(); if (settings != null) { final LinkedList locations= new LinkedList(); final String[] items= fCombo.getItems(); for (int index= 0; index < items.length; index++) locations.add(items[index]); final String text= fCombo.getText().trim(); if (!""... | /**
* Saves the history of this control.
*/ | Saves the history of this control | saveHistory | {
"repo_name": "maxeler/eclipse",
"path": "eclipse.jdt.ui/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/RefactoringLocationControl.java",
"license": "epl-1.0",
"size": 4222
} | [
"java.util.LinkedList",
"org.eclipse.jface.dialogs.IDialogSettings"
] | import java.util.LinkedList; import org.eclipse.jface.dialogs.IDialogSettings; | import java.util.*; import org.eclipse.jface.dialogs.*; | [
"java.util",
"org.eclipse.jface"
] | java.util; org.eclipse.jface; | 201,435 |
public void emote(EmotionalState state, Network memory) {
} | void function(EmotionalState state, Network memory) { } | /**
* Output the emotional state to the Avatar.
*/ | Output the emotional state to the Avatar | emote | {
"repo_name": "BOTlibre/BOTlibre",
"path": "micro-ai-engine/android/source/org/botlibre/avatar/BasicAvatar.java",
"license": "epl-1.0",
"size": 7278
} | [
"org.botlibre.api.knowledge.Network",
"org.botlibre.emotion.EmotionalState"
] | import org.botlibre.api.knowledge.Network; import org.botlibre.emotion.EmotionalState; | import org.botlibre.api.knowledge.*; import org.botlibre.emotion.*; | [
"org.botlibre.api",
"org.botlibre.emotion"
] | org.botlibre.api; org.botlibre.emotion; | 2,624,660 |
private boolean updateTimeline() {
CastTimeline oldTimeline = currentTimeline;
MediaStatus status = getMediaStatus();
currentTimeline =
status != null ? timelineTracker.getCastTimeline(status) : CastTimeline.EMPTY_CAST_TIMELINE;
return !oldTimeline.equals(currentTimeline);
} | boolean function() { CastTimeline oldTimeline = currentTimeline; MediaStatus status = getMediaStatus(); currentTimeline = status != null ? timelineTracker.getCastTimeline(status) : CastTimeline.EMPTY_CAST_TIMELINE; return !oldTimeline.equals(currentTimeline); } | /**
* Updates the current timeline and returns whether it has changed.
*/ | Updates the current timeline and returns whether it has changed | updateTimeline | {
"repo_name": "tntcrowd/ExoPlayer",
"path": "extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java",
"license": "apache-2.0",
"size": 30441
} | [
"com.google.android.gms.cast.MediaStatus"
] | import com.google.android.gms.cast.MediaStatus; | import com.google.android.gms.cast.*; | [
"com.google.android"
] | com.google.android; | 189,100 |
protected static Response buildResponse(Object result) {
return Response.ok(result)
.build();
} | static Response function(Object result) { return Response.ok(result) .build(); } | /**
* Build a success response
*
* @param result Result
* @return Response
*/ | Build a success response | buildResponse | {
"repo_name": "reneses/tela",
"path": "tela-server/src/main/java/io/reneses/tela/core/api/controllers/TelaController.java",
"license": "mit",
"size": 4747
} | [
"javax.ws.rs.core.Response"
] | import javax.ws.rs.core.Response; | import javax.ws.rs.core.*; | [
"javax.ws"
] | javax.ws; | 2,404,034 |
public static EndPortalFrameMat getEndPortalFrame(final BlockFace face, final boolean activated)
{
return getByID(combine(face, activated));
} | static EndPortalFrameMat function(final BlockFace face, final boolean activated) { return getByID(combine(face, activated)); } | /**
* Returns one of EndPortalFrame sub-type based on {@link BlockFace} and activated status.
* It will never return null;
*
* @param face face of block, unsupported face will cause using face from default type.
* @param activated if it have eye of ender in it.
*
* @return sub-ty... | Returns one of EndPortalFrame sub-type based on <code>BlockFace</code> and activated status. It will never return null | getEndPortalFrame | {
"repo_name": "marszczybrew/Diorite",
"path": "DioriteAPI/src/main/java/org/diorite/material/blocks/end/EndPortalFrameMat.java",
"license": "mit",
"size": 8067
} | [
"org.diorite.BlockFace"
] | import org.diorite.BlockFace; | import org.diorite.*; | [
"org.diorite"
] | org.diorite; | 1,865,561 |
private static boolean isInstantiatedDataSchema(final DataSchemaNode node) {
return node instanceof LeafSchemaNode || node instanceof LeafListSchemaNode
|| node instanceof ContainerSchemaNode || node instanceof ListSchemaNode
|| node instanceof AnyXmlSchemaNode;
} | static boolean function(final DataSchemaNode node) { return node instanceof LeafSchemaNode node instanceof LeafListSchemaNode node instanceof ContainerSchemaNode node instanceof ListSchemaNode node instanceof AnyXmlSchemaNode; } | /**
* Determines if the DataSchemaNode is one that is instantiated.
* @param node - DataSchemaNode
* @return true if the DataSchemaNode is one that is instantiated, false otherwise
*/ | Determines if the DataSchemaNode is one that is instantiated | isInstantiatedDataSchema | {
"repo_name": "sprintlabs/fpc",
"path": "impl/src/main/java/org/opendaylight/fpc/utils/NameResolver.java",
"license": "epl-1.0",
"size": 23780
} | [
"org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode",
"org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode",
"org.opendaylight.yangtools.yang.model.api.DataSchemaNode",
"org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode",
"org.opendaylight.yangtools.yang.model.api.LeafSchemaNode... | import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode; import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode; import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode; import org.opendaylight.yangtools.yang.model.api.... | import org.opendaylight.yangtools.yang.model.api.*; | [
"org.opendaylight.yangtools"
] | org.opendaylight.yangtools; | 16,130 |
public Date getUpdateTime() {
return updateTime;
} | Date function() { return updateTime; } | /**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pay_order.update_time
*
* @return the value of pay_order.update_time
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method returns the value of the database column pay_order.update_time | getUpdateTime | {
"repo_name": "wanghongfei/taolijie",
"path": "src/main/java/com/fh/taolijie/domain/order/PayOrderModel.java",
"license": "gpl-3.0",
"size": 7893
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,698,783 |
@Nonnull
public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() {
final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>();
if(this.skip != null) {
result.add(new com.microsoft.graph.options.FunctionOption("skip", skip));
... | java.util.List<com.microsoft.graph.options.FunctionOption> function() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); if(this.skip != null) { result.add(new com.microsoft.graph.options.FunctionOption("skip", skip)); } if(this.top != null) { result.add(new com.microsoft.graph.op... | /**
* Gets the functions options from the properties that have been set
* @return a list of function options for the request
*/ | Gets the functions options from the properties that have been set | getFunctionOptions | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/models/ReportRootManagedDeviceEnrollmentFailureDetailsParameterSet.java",
"license": "mit",
"size": 6083
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 206,089 |
HFileBlock nextBlockWithBlockType(BlockType blockType) throws IOException;
}
public interface FSReader { | HFileBlock nextBlockWithBlockType(BlockType blockType) throws IOException; } public interface FSReader { | /**
* Similar to {@link #nextBlock()} but checks block type, throws an
* exception if incorrect, and returns the HFile block
*/ | Similar to <code>#nextBlock()</code> but checks block type, throws an exception if incorrect, and returns the HFile block | nextBlockWithBlockType | {
"repo_name": "lshmouse/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java",
"license": "apache-2.0",
"size": 75316
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 796,624 |
private PaletteContainer createEd2nodes1Group() {
PaletteDrawer paletteContainer = new PaletteDrawer(
Messages.Ed2nodes1Group_title);
paletteContainer.setId("createEd2nodes1Group"); //$NON-NLS-1$
paletteContainer.setDescription(Messages.Ed2nodes1Group_desc);
paletteContainer.add(createED21CreationTo... | PaletteContainer function() { PaletteDrawer paletteContainer = new PaletteDrawer( Messages.Ed2nodes1Group_title); paletteContainer.setId(STR); paletteContainer.setDescription(Messages.Ed2nodes1Group_desc); paletteContainer.add(createED21CreationTool()); paletteContainer.add(createNode2CreationTool()); paletteContainer.... | /**
* Creates "ed2 nodes" palette tool group
* @generated
*/ | Creates "ed2 nodes" palette tool group | createEd2nodes1Group | {
"repo_name": "RubenM13/E-EDD-2.0",
"path": "es.ucm.fdi.ed2.emf.diagram/src/es/ucm/fdi/emf/model/ed2/diagram/part/Ed2PaletteFactory.java",
"license": "gpl-3.0",
"size": 5291
} | [
"org.eclipse.gef.palette.PaletteContainer",
"org.eclipse.gef.palette.PaletteDrawer"
] | import org.eclipse.gef.palette.PaletteContainer; import org.eclipse.gef.palette.PaletteDrawer; | import org.eclipse.gef.palette.*; | [
"org.eclipse.gef"
] | org.eclipse.gef; | 4,341 |
@Test
public void testGetGeometryGeojson() {
System.out.println(getTestTraceHead("[Utils.getLocation]")
+ "-------- When getting a geometry, a CartoDB geometry is obtained when passing an attribute "
+ "of type 'geo:json'");
String attrMetadataStr = "[]";
... | void function() { System.out.println(getTestTraceHead(STR) + STR + STR); String attrMetadataStr = "[]"; String attrValue = "{\"coordinates\STRtype\STRPoint\"}"; String attrType = STR; boolean swapCoordinates = false; ImmutablePair<String, Boolean> geometry = NGSIUtils.getGeometry( attrValue, attrType, attrMetadataStr, ... | /**
* [NGSIUtils.getGeometry] -------- When getting a geometry, a CartoDB geometry is obtained when passing
* an attribute of type 'geo:json'.
*/ | [NGSIUtils.getGeometry] -------- When getting a geometry, a CartoDB geometry is obtained when passing an attribute of type 'geo:json' | testGetGeometryGeojson | {
"repo_name": "Fiware/context.Cygnus",
"path": "cygnus-ngsi/src/test/java/com/telefonica/iot/cygnus/utils/NGSIUtilsTest.java",
"license": "agpl-3.0",
"size": 7950
} | [
"org.apache.commons.lang3.tuple.ImmutablePair",
"org.junit.Assert"
] | import org.apache.commons.lang3.tuple.ImmutablePair; import org.junit.Assert; | import org.apache.commons.lang3.tuple.*; import org.junit.*; | [
"org.apache.commons",
"org.junit"
] | org.apache.commons; org.junit; | 2,168,326 |
private RemotableAttributeField convertFieldDef(XMLSearchableAttributeContent.FieldDef field, Collection<SearchableAttributeValue> searchableAttributeValues) {
RemotableAttributeField.Builder fieldBuilder = RemotableAttributeField.Builder.create(field.name);
fieldBuilder.setLongLabel(field.title);
... | RemotableAttributeField function(XMLSearchableAttributeContent.FieldDef field, Collection<SearchableAttributeValue> searchableAttributeValues) { RemotableAttributeField.Builder fieldBuilder = RemotableAttributeField.Builder.create(field.name); fieldBuilder.setLongLabel(field.title); RemotableAttributeLookupSettings.Bui... | /**
* Converts a searchable attribute FieldDef to a RemotableAttributeField
*/ | Converts a searchable attribute FieldDef to a RemotableAttributeField | convertFieldDef | {
"repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua",
"path": "rice-middleware/impl/src/main/java/org/kuali/rice/kew/docsearch/xml/StandardGenericXMLSearchableAttribute.java",
"license": "apache-2.0",
"size": 37025
} | [
"java.util.Collection",
"java.util.Collections",
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.core.api.uif.DataType",
"org.kuali.rice.core.api.uif.RemotableAbstractControl",
"org.kuali.rice.core.api.uif.RemotableAttributeField",
"org.kuali.rice.core.api.uif.RemotableAttributeLookupSettings",
... | import java.util.Collection; import java.util.Collections; import org.apache.commons.lang.StringUtils; import org.kuali.rice.core.api.uif.DataType; import org.kuali.rice.core.api.uif.RemotableAbstractControl; import org.kuali.rice.core.api.uif.RemotableAttributeField; import org.kuali.rice.core.api.uif.RemotableAttribu... | import java.util.*; import org.apache.commons.lang.*; import org.kuali.rice.core.api.uif.*; import org.kuali.rice.core.web.format.*; import org.kuali.rice.kew.docsearch.*; import org.kuali.rice.kns.lookup.*; | [
"java.util",
"org.apache.commons",
"org.kuali.rice"
] | java.util; org.apache.commons; org.kuali.rice; | 1,833,431 |
protected void addLogLevelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_LogMediator_logLevel_feature"),
getString("_UI_PropertyDescriptor_... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), MediatorsPackage.Literals.LOG_MEDIATOR__LOG_LEVEL, true, false, false, ItemPropertyDescriptor.GEN... | /**
* This adds a property descriptor for the Log Level feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Log Level feature. | addLogLevelPropertyDescriptor | {
"repo_name": "harsha1979/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.esb.edit/src/org/wso2/developerstudio/eclipse/esb/mediators/provider/LogMediatorItemProvider.java",
"license": "apache-2.0",
"size": 8402
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.wso2.developerstudio.eclipse.esb.mediators.MediatorsPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.esb.mediators.MediatorsPackage; | import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.esb.mediators.*; | [
"org.eclipse.emf",
"org.wso2.developerstudio"
] | org.eclipse.emf; org.wso2.developerstudio; | 2,681,097 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.