method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public final void initialize() { fPropertyNamesColor= getTokenProperties(); int length= fPropertyNamesColor.length; fPropertyNamesBold= new String[length]; fPropertyNamesItalic= new String[length]; fPropertyNamesStrikethrough= new String[length]; fPropertyNamesUnderline= new String[length]; for (int ...
final void function() { fPropertyNamesColor= getTokenProperties(); int length= fPropertyNamesColor.length; fPropertyNamesBold= new String[length]; fPropertyNamesItalic= new String[length]; fPropertyNamesStrikethrough= new String[length]; fPropertyNamesUnderline= new String[length]; for (int i= 0; i < length; i++) { fPr...
/** * Must be called after the constructor has been called. */
Must be called after the constructor has been called
initialize
{ "repo_name": "boniatillo-com/PhaserEditor", "path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/AbstractJavaScanner.java", "license": "epl-1.0", "size": 12312 }
[ "org.eclipse.swt.widgets.Display" ]
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,333,593
static public ObjectName register(String serviceName, String nameName, Object theMbean) { return register(serviceName, nameName, Collections.emptyMap(), theMbean); }
static ObjectName function(String serviceName, String nameName, Object theMbean) { return register(serviceName, nameName, Collections.emptyMap(), theMbean); }
/** * Register the MBean using our standard MBeanName format * "hadoop:service={@literal <serviceName>,name=<nameName>}" * Where the {@literal <serviceName> and <nameName>} are the supplied * parameters. * * @param serviceName * @param nameName * @param theMbean - the MBean to register * @ret...
Register the MBean using our standard MBeanName format "hadoop:service=,name=" Where the and are the supplied parameters
register
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/MBeans.java", "license": "apache-2.0", "size": 6134 }
[ "java.util.Collections", "javax.management.ObjectName" ]
import java.util.Collections; import javax.management.ObjectName;
import java.util.*; import javax.management.*;
[ "java.util", "javax.management" ]
java.util; javax.management;
726,124
void addKeyReadInCommand(Object key, InternalGMUCacheEntry entry);
void addKeyReadInCommand(Object key, InternalGMUCacheEntry entry);
/** * add the key to a map between key and {@link InternalGMUCacheEntry}. This entry has all the information needed to calculate * the new transaction version. This is a temporary map and should be clear before (or after) each command * * @param entry the entry read */
add the key to a map between key and <code>InternalGMUCacheEntry</code>. This entry has all the information needed to calculate the new transaction version. This is a temporary map and should be clear before (or after) each command
addKeyReadInCommand
{ "repo_name": "nmldiegues/stibt", "path": "infinispan/core/src/main/java/org/infinispan/context/InvocationContext.java", "license": "apache-2.0", "size": 5788 }
[ "org.infinispan.container.entries.gmu.InternalGMUCacheEntry" ]
import org.infinispan.container.entries.gmu.InternalGMUCacheEntry;
import org.infinispan.container.entries.gmu.*;
[ "org.infinispan.container" ]
org.infinispan.container;
2,133,159
public Observable<ServiceResponse<VolumeInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName, VolumeInner body) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subsc...
Observable<ServiceResponse<VolumeInner>> function(String resourceGroupName, String accountName, String poolName, String volumeName, VolumeInner body) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (a...
/** * Create or update a volume. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param body Volume object supplied in the body...
Create or update a volume
createOrUpdateWithServiceResponseAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/netapp/mgmt-v2017_08_15/src/main/java/com/microsoft/azure/management/netapp/v2017_08_15/implementation/VolumesInner.java", "license": "mit", "size": 44578 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponse", "com.microsoft.rest.Validator" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
316,189
void addIdentity(JSch jsch) throws JSchException;
void addIdentity(JSch jsch) throws JSchException;
/** * Add this identity to the given JSch. * * @param jsch Target JSch. * @throws JSchException If I/O error occurs. */
Add this identity to the given JSch
addIdentity
{ "repo_name": "apache/commons-vfs", "path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/IdentityProvider.java", "license": "apache-2.0", "size": 1228 }
[ "com.jcraft.jsch.JSch", "com.jcraft.jsch.JSchException" ]
import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.*;
[ "com.jcraft.jsch" ]
com.jcraft.jsch;
1,260,809
protected void addPreferencePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WorkstepSkill_preference_feature"), getString("_UI_PropertyDescr...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), StaffPackage.Literals.WORKSTEP_SKILL__PREFERENCE, true, false, false, ItemPropertyDescriptor.GENE...
/** * This adds a property descriptor for the Preference feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Preference feature.
addPreferencePropertyDescriptor
{ "repo_name": "BaSys-PC1/models", "path": "de.dfki.iui.basys.model.domain.edit/src/de/dfki/iui/basys/model/domain/staff/provider/WorkstepSkillItemProvider.java", "license": "epl-1.0", "size": 5897 }
[ "de.dfki.iui.basys.model.domain.staff.StaffPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import de.dfki.iui.basys.model.domain.staff.StaffPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import de.dfki.iui.basys.model.domain.staff.*; import org.eclipse.emf.edit.provider.*;
[ "de.dfki.iui", "org.eclipse.emf" ]
de.dfki.iui; org.eclipse.emf;
2,075,831
private PyStatement prepareStatement(PyObject sql, PyObject maxRows, boolean prepared) { PyStatement stmt = null; if (sql == Py.None) { return null; } try { if (sql instanceof PyStatement) { stmt = (PyStatement)sql; } else { ...
PyStatement function(PyObject sql, PyObject maxRows, boolean prepared) { PyStatement stmt = null; if (sql == Py.None) { return null; } try { if (sql instanceof PyStatement) { stmt = (PyStatement)sql; } else { Statement sqlStatement = null; String sqlString = sql instanceof PyUnicode ? sql.toString() : sql.__str__().toS...
/** * Prepare a statement ready for executing. * * @param sql the sql to execute or a prepared statement * @param maxRows max number of rows to be returned * @param prepared if true, prepare the statement, otherwise create a normal statement * * @return PyStatement */
Prepare a statement ready for executing
prepareStatement
{ "repo_name": "alvin319/CarnotKE", "path": "jyhton/src/com/ziclix/python/sql/PyCursor.java", "license": "apache-2.0", "size": 36242 }
[ "java.sql.Statement", "org.python.core.Py", "org.python.core.PyException", "org.python.core.PyObject", "org.python.core.PyUnicode" ]
import java.sql.Statement; import org.python.core.Py; import org.python.core.PyException; import org.python.core.PyObject; import org.python.core.PyUnicode;
import java.sql.*; import org.python.core.*;
[ "java.sql", "org.python.core" ]
java.sql; org.python.core;
111,556
void setClasses(List<Classes> classes) { this.classes = classes; }
void setClasses(List<Classes> classes) { this.classes = classes; }
/** * set the list of classes * @param classes */
set the list of classes
setClasses
{ "repo_name": "semanticchess/semanticchess", "path": "src/main/java/de/daug/semanticchess/Parser/Parser.java", "license": "gpl-3.0", "size": 40047 }
[ "de.daug.semanticchess.Parser", "java.util.List" ]
import de.daug.semanticchess.Parser; import java.util.List;
import de.daug.semanticchess.*; import java.util.*;
[ "de.daug.semanticchess", "java.util" ]
de.daug.semanticchess; java.util;
516,313
public ServiceFuture<TroubleshootingResultInner> getTroubleshootingAsync(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters, final ServiceCallback<TroubleshootingResultInner> serviceCallback) { return ServiceFuture.fromResponse(getTroubleshootingWithServiceResponseAsyn...
ServiceFuture<TroubleshootingResultInner> function(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters, final ServiceCallback<TroubleshootingResultInner> serviceCallback) { return ServiceFuture.fromResponse(getTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatche...
/** * Initiate troubleshooting on a specified resource. * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that define the resource to troubleshoot. * @param serviceCallback the a...
Initiate troubleshooting on a specified resource
getTroubleshootingAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java", "license": "mit", "size": 171166 }
[ "com.microsoft.azure.management.network.v2017_10_01.TroubleshootingParameters", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.network.v2017_10_01.TroubleshootingParameters; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.network.v2017_10_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,168,627
public Result hasNoInfoMessage() { return hasNoFeedbackMessage(FeedbackMessage.INFO); }
Result function() { return hasNoFeedbackMessage(FeedbackMessage.INFO); }
/** * Asserts no info-level feedback messages. * * @return a <code>Result</code> * @see #hasNoFeedbackMessage(int) */
Asserts no info-level feedback messages
hasNoInfoMessage
{ "repo_name": "AlienQueen/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java", "license": "apache-2.0", "size": 83429 }
[ "org.apache.wicket.feedback.FeedbackMessage" ]
import org.apache.wicket.feedback.FeedbackMessage;
import org.apache.wicket.feedback.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,281,170
public void disableResponder(ResponderCallback callback) { if (callback == null) { throw new IllegalArgumentException("callback cannot be null"); } validateChannel(); int key = removeListener(callback); if (key == INVALID_KEY) { Log.e(TAG, "responder n...
void function(ResponderCallback callback) { if (callback == null) { throw new IllegalArgumentException(STR); } validateChannel(); int key = removeListener(callback); if (key == INVALID_KEY) { Log.e(TAG, STR); return; } mAsyncChannel.sendMessage(CMD_OP_DISABLE_RESPONDER, 0, key); } public static class ResponderConfig im...
/** * Disable Wi-Fi RTT responder mode on the device. The {@code callback} needs to be the * same one used in {@link #enableResponder(ResponderCallback)}. * <p> * Calling this method when responder isn't enabled won't have any effect. The callback can be * reused for enabling responder after th...
Disable Wi-Fi RTT responder mode on the device. The callback needs to be the same one used in <code>#enableResponder(ResponderCallback)</code>. Calling this method when responder isn't enabled won't have any effect. The callback can be reused for enabling responder after this method is called
disableResponder
{ "repo_name": "xorware/android_frameworks_base", "path": "wifi/java/android/net/wifi/RttManager.java", "license": "apache-2.0", "size": 50089 }
[ "android.os.Parcelable", "android.util.Log" ]
import android.os.Parcelable; import android.util.Log;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
641,836
private void savePicture(){ FileOutputStream out; try { out = new FileOutputStream( String.format("/sdcard/%d.jpg", System.currentTimeMillis())); tempBM.compress(Bitmap.CompressFormat.JPEG, 90, out); if (tempBM != null) { tempBM.re...
void function(){ FileOutputStream out; try { out = new FileOutputStream( String.format(STR, System.currentTimeMillis())); tempBM.compress(Bitmap.CompressFormat.JPEG, 90, out); if (tempBM != null) { tempBM.recycle(); tempBM = null; } } catch (FileNotFoundException e) { e.printStackTrace(); } resetPictureStatus(); }
/** * Saves the picture into the SD card. * @param byte[] (picture data) * @return void * @author ajuarez@tanukiteam.com */
Saves the picture into the SD card
savePicture
{ "repo_name": "agustinjuarez/android-camera-api", "path": "Camera API/src/com/tanukiteam/camera/CameraAPIActivity.java", "license": "unlicense", "size": 39614 }
[ "android.graphics.Bitmap", "java.io.FileNotFoundException", "java.io.FileOutputStream" ]
import android.graphics.Bitmap; import java.io.FileNotFoundException; import java.io.FileOutputStream;
import android.graphics.*; import java.io.*;
[ "android.graphics", "java.io" ]
android.graphics; java.io;
569,242
private Area getWorldMapClipArea(Rectangle baseRectangle) { final Widget overview = client.getWidget(WidgetInfo.WORLD_MAP_OVERVIEW_MAP); final Widget surfaceSelector = client.getWidget(WidgetInfo.WORLD_MAP_SURFACE_SELECTOR); Area clipArea = new Area(baseRectangle); if (overview != null && !overview.isHidd...
Area function(Rectangle baseRectangle) { final Widget overview = client.getWidget(WidgetInfo.WORLD_MAP_OVERVIEW_MAP); final Widget surfaceSelector = client.getWidget(WidgetInfo.WORLD_MAP_SURFACE_SELECTOR); Area clipArea = new Area(baseRectangle); if (overview != null && !overview.isHidden()) { clipArea.subtract(new Are...
/** * Gets a clip area which excludes the area of widgets which overlay the world map. * * @param baseRectangle The base area to clip from * @return An {@link Area} representing <code>baseRectangle</code>, with the area * of visible widgets overlaying the world map clipped fr...
Gets a clip area which excludes the area of widgets which overlay the world map
getWorldMapClipArea
{ "repo_name": "abelbriggs1/runelite", "path": "runelite-client/src/main/java/net/runelite/client/ui/overlay/worldmap/WorldMapOverlay.java", "license": "bsd-2-clause", "size": 10213 }
[ "java.awt.Rectangle", "java.awt.geom.Area", "net.runelite.api.widgets.Widget", "net.runelite.api.widgets.WidgetInfo" ]
import java.awt.Rectangle; import java.awt.geom.Area; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetInfo;
import java.awt.*; import java.awt.geom.*; import net.runelite.api.widgets.*;
[ "java.awt", "net.runelite.api" ]
java.awt; net.runelite.api;
564,911
private ContainerState checkContainer(ContainerAccessType accessType) throws StorageException, AzureException { synchronized (containerStateLock) { if (isOkContainerState(accessType)) { return currentKnownContainerState; } if (currentKnownContainerState == ContainerState.ExistsAtWr...
ContainerState function(ContainerAccessType accessType) throws StorageException, AzureException { synchronized (containerStateLock) { if (isOkContainerState(accessType)) { return currentKnownContainerState; } if (currentKnownContainerState == ContainerState.ExistsAtWrongVersion) { String containerVersion = retrieveVers...
/** * This should be called from any method that does any modifications to the * underlying container: it makes sure to put the WASB current version in the * container's metadata if it's not already there. */
This should be called from any method that does any modifications to the underlying container: it makes sure to put the WASB current version in the container's metadata if it's not already there
checkContainer
{ "repo_name": "NJUJYB/disYarn", "path": "hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java", "license": "apache-2.0", "size": 103496 }
[ "com.microsoft.azure.storage.StorageErrorCode", "com.microsoft.azure.storage.StorageException" ]
import com.microsoft.azure.storage.StorageErrorCode; import com.microsoft.azure.storage.StorageException;
import com.microsoft.azure.storage.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,920,103
checkColumnBounds(columnIndex); String fieldEncoding = this.fields[columnIndex - 1].getCharacterSet(); if (fieldEncoding == null || !fieldEncoding.equals("UTF-8")) { throw new SQLException( "Can not call getNCharacterStream() when field's charset isn't UTF-8"); } return getCharacterStream(co...
checkColumnBounds(columnIndex); String fieldEncoding = this.fields[columnIndex - 1].getCharacterSet(); if (fieldEncoding == null !fieldEncoding.equals("UTF-8")) { throw new SQLException( STR); } return getCharacterStream(columnIndex); }
/** * JDBC 4.0 * * <p> * Get the value of a column in the current row as a java.io.Reader. * </p> * * @param columnIndex * the column to get the value from * * @return the value in the column as a java.io.Reader. * * @throws SQLException * if an error oc...
JDBC 4.0 Get the value of a column in the current row as a java.io.Reader.
getNCharacterStream
{ "repo_name": "google-code/blufeedme", "path": "material/BDs/mysql-connector-java-5.1.13/src/com/mysql/jdbc/JDBC4ResultSet.java", "license": "gpl-3.0", "size": 17141 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,810,195
public void onRecordAfterUpdate(final ORecord iRecord) { }
void function(final ORecord iRecord) { }
/** * It's called just after the iRecord is updated. * * @param iRecord * The iRecord just updated */
It's called just after the iRecord is updated
onRecordAfterUpdate
{ "repo_name": "sanyaade-g2g-repos/orientdb", "path": "core/src/main/java/com/orientechnologies/orient/core/hook/ORecordHookAbstract.java", "license": "apache-2.0", "size": 6282 }
[ "com.orientechnologies.orient.core.record.ORecord" ]
import com.orientechnologies.orient.core.record.ORecord;
import com.orientechnologies.orient.core.record.*;
[ "com.orientechnologies.orient" ]
com.orientechnologies.orient;
573,273
public static void startActivityForResult(@NonNull final Fragment fragment, @NonNull final Intent intent, final int requestCode, @AnimRes final int enterAnim, ...
static void function(@NonNull final Fragment fragment, @NonNull final Intent intent, final int requestCode, @AnimRes final int enterAnim, @AnimRes final int exitAnim) { startActivityForResult(intent, fragment, requestCode, getOptionsBundle(fragment, enterAnim, exitAnim)); }
/** * Start the activity for result. * * @param fragment The fragment. * @param intent The description of the activity to start. * @param requestCode if &gt;= 0, this code will be returned in * onActivityResult() when the activity exits. * @param enterAnim ...
Start the activity for result
startActivityForResult
{ "repo_name": "didi/DoraemonKit", "path": "Android/dokit-util/src/main/java/com/didichuxing/doraemonkit/util/ActivityUtils.java", "license": "apache-2.0", "size": 90700 }
[ "android.app.Fragment", "android.content.Intent", "androidx.annotation.AnimRes", "androidx.annotation.NonNull", "androidx.fragment.app.Fragment" ]
import android.app.Fragment; import android.content.Intent; import androidx.annotation.AnimRes; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment;
import android.app.*; import android.content.*; import androidx.annotation.*; import androidx.fragment.app.*;
[ "android.app", "android.content", "androidx.annotation", "androidx.fragment" ]
android.app; android.content; androidx.annotation; androidx.fragment;
2,638,896
public List<FakeTrackSelection> getSelectedTrackSelections() { return selectedTrackSelections; }
List<FakeTrackSelection> function() { return selectedTrackSelections; }
/** * Returns list of all {@link FakeTrackSelection}s that this track selector has made so far. */
Returns list of all <code>FakeTrackSelection</code>s that this track selector has made so far
getSelectedTrackSelections
{ "repo_name": "KiminRyu/ExoPlayer", "path": "testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeTrackSelector.java", "license": "apache-2.0", "size": 3340 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
133,493
public UpdateResponse addBeans(Collection<?> beans ) throws SolrServerException, IOException { return addBeans(beans, -1); }
UpdateResponse function(Collection<?> beans ) throws SolrServerException, IOException { return addBeans(beans, -1); }
/** * Adds a collection of beans * @param beans the collection of beans * @throws SolrServerException * @throws IOException */
Adds a collection of beans
addBeans
{ "repo_name": "Lythimus/lptv", "path": "apache-solr-3.6.0/solr/solrj/src/java/org/apache/solr/client/solrj/SolrServer.java", "license": "gpl-2.0", "size": 12363 }
[ "java.io.IOException", "java.util.Collection", "org.apache.solr.client.solrj.response.UpdateResponse" ]
import java.io.IOException; import java.util.Collection; import org.apache.solr.client.solrj.response.UpdateResponse;
import java.io.*; import java.util.*; import org.apache.solr.client.solrj.response.*;
[ "java.io", "java.util", "org.apache.solr" ]
java.io; java.util; org.apache.solr;
698,022
public static final void extractJAR(File zFile, String extractDir) throws IOException { File extractFile = new File(extractDir); if ( !extractFile.exists() ) { extractFile.mkdirs(); } if ( !zFile.exists() ) { throw new IOException(zFile + " does not exist."); } ZipFile zipFile = new ZipFile(zFile);...
static final void function(File zFile, String extractDir) throws IOException { File extractFile = new File(extractDir); if ( !extractFile.exists() ) { extractFile.mkdirs(); } if ( !zFile.exists() ) { throw new IOException(zFile + STR); } ZipFile zipFile = new ZipFile(zFile); try { Enumeration<? extends ZipEntry> entrie...
/** * Extract the jar file content from given stream to the extract dir. * @param jarStream * @param extractDir */
Extract the jar file content from given stream to the extract dir
extractJAR
{ "repo_name": "wangqi/gameserver", "path": "bootstrap/src/main/java/com/xinqihd/sns/gameserver/util/IOUtil.java", "license": "apache-2.0", "size": 11737 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.util.Enumeration", "java.util.zip.ZipEntry", "java.util.zip.ZipFile" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile;
import java.io.*; import java.util.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,330,165
void setHoursViewHeaderFormat(DateTimeFormat hoursViewHeaderFormat);
void setHoursViewHeaderFormat(DateTimeFormat hoursViewHeaderFormat);
/** * Set format of header on hours view. * * @param hoursViewHeaderFormat format of header on hours view. */
Set format of header on hours view
setHoursViewHeaderFormat
{ "repo_name": "gwt-DateTimeBox/gwt-DateTimeBox", "path": "datetimepicker/src/main/java/com/github/gwt/user/client/ui/DateTimePickerSpecification.java", "license": "apache-2.0", "size": 3558 }
[ "com.google.gwt.i18n.client.DateTimeFormat" ]
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.i18n.client.*;
[ "com.google.gwt" ]
com.google.gwt;
1,001,182
public static void assertContainerHasVolumes(InspectContainerResponse inspectContainerResponse, Volume ... expectedVolumes) { VolumeBind[] volumeBinds = inspectContainerResponse.getVolumes(); LOG.info("Inspect .Volumes = [{}]", Joiner.on(", ").join(volumeBinds)); List<Volume> volumes = new ArrayList<Volu...
static void function(InspectContainerResponse inspectContainerResponse, Volume ... expectedVolumes) { VolumeBind[] volumeBinds = inspectContainerResponse.getVolumes(); LOG.info(STR, Joiner.on(STR).join(volumeBinds)); List<Volume> volumes = new ArrayList<Volume>(); for (VolumeBind bind : volumeBinds) { volumes.add(new V...
/** * Asserts that {@link InspectContainerResponse#getVolumes()} (<code>.Volumes</code>) * has {@link VolumeBind}s for the given {@link Volume}s */
Asserts that <code>InspectContainerResponse#getVolumes()</code> (<code>.Volumes</code>) has <code>VolumeBind</code>s for the given <code>Volume</code>s
assertContainerHasVolumes
{ "repo_name": "hermeswaldemarin/docker-java", "path": "src/test/java/com/github/dockerjava/client/AbstractDockerClientTest.java", "license": "apache-2.0", "size": 5347 }
[ "com.github.dockerjava.api.command.InspectContainerResponse", "com.github.dockerjava.api.model.Volume", "com.github.dockerjava.api.model.VolumeBind", "com.google.common.base.Joiner", "java.util.ArrayList", "java.util.List", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import com.github.dockerjava.api.command.InspectContainerResponse; import com.github.dockerjava.api.model.Volume; import com.github.dockerjava.api.model.VolumeBind; import com.google.common.base.Joiner; import java.util.ArrayList; import java.util.List; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import com.github.dockerjava.api.command.*; import com.github.dockerjava.api.model.*; import com.google.common.base.*; import java.util.*; import org.hamcrest.*;
[ "com.github.dockerjava", "com.google.common", "java.util", "org.hamcrest" ]
com.github.dockerjava; com.google.common; java.util; org.hamcrest;
2,822,464
public IObjectStore getObjectStore() { return this.objectStore; }
IObjectStore function() { return this.objectStore; }
/** * Get the object store of the synchronised folder. * <b>Note</b>: This method may return null before the node is connected. * * @return The Object Store of the synchronised folder */
Get the object store of the synchronised folder. Note: This method may return null before the node is connected
getObjectStore
{ "repo_name": "p2p-sync/sync", "path": "src/main/java/org/rmatil/sync/core/Sync.java", "license": "apache-2.0", "size": 17999 }
[ "org.rmatil.sync.version.api.IObjectStore" ]
import org.rmatil.sync.version.api.IObjectStore;
import org.rmatil.sync.version.api.*;
[ "org.rmatil.sync" ]
org.rmatil.sync;
1,892,818
Optional<byte[]> getByteArray(String path);
Optional<byte[]> getByteArray(String path);
/** * Reads from the given path. If the path does not exist, or if the type at the path is not * compatible then {@link Optional#absent()} will be returned instead. * * @param path The path to read from * @return The data */
Reads from the given path. If the path does not exist, or if the type at the path is not compatible then <code>Optional#absent()</code> will be returned instead
getByteArray
{ "repo_name": "Featherblade/VoxelGunsmith", "path": "src/main/java/com/voxelplugineering/voxelsniper/service/persistence/DataView.java", "license": "mit", "size": 6642 }
[ "com.google.common.base.Optional" ]
import com.google.common.base.Optional;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,866,135
public static boolean isSameDay(final Date date1, final Date date2, final TimeZone timeZone) { final Calendar cal1 = new GregorianCalendar(timeZone); cal1.setTime(date1); final Calendar cal2 = new GregorianCalendar(timeZone); cal2.setTime(date2); return isSameDay(cal1, cal2); }
static boolean function(final Date date1, final Date date2, final TimeZone timeZone) { final Calendar cal1 = new GregorianCalendar(timeZone); cal1.setTime(date1); final Calendar cal2 = new GregorianCalendar(timeZone); cal2.setTime(date2); return isSameDay(cal1, cal2); }
/** * Check if two dates are in the same day in given time zone * * @param date1 * the first date * @param date2 * the first date * @param timeZone * the time zone * @return true if two dates are in the same day in given time zone */
Check if two dates are in the same day in given time zone
isSameDay
{ "repo_name": "thexman/commons", "path": "src/main/java/com/a9ski/utils/DateUtils.java", "license": "apache-2.0", "size": 24945 }
[ "java.util.Calendar", "java.util.Date", "java.util.GregorianCalendar", "java.util.TimeZone" ]
import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
2,412,203
private SetupNetworksParameters createParametersForBond(VdsNetworkInterface bond, List<VdsNetworkInterface> bondedIfaces) { SetupNetworksParameters parameters = new SetupNetworksParameters(); parameters.getInterfaces().add(bond); for (VdsNetworkInterface iface : bondedIfaces) { ...
SetupNetworksParameters function(VdsNetworkInterface bond, List<VdsNetworkInterface> bondedIfaces) { SetupNetworksParameters parameters = new SetupNetworksParameters(); parameters.getInterfaces().add(bond); for (VdsNetworkInterface iface : bondedIfaces) { parameters.getInterfaces().add(enslaveOrReleaseNIC(iface, bond.g...
/** * Create parameters for the given bond over the given interfaces. * * @param bond * The bond to use in parameters. * @param bondedIfaces * The interfaces to use as bond slaves. * @return Parameters that define a bond over 2 interfaces. */
Create parameters for the given bond over the given interfaces
createParametersForBond
{ "repo_name": "jbeecham/ovirt-engine", "path": "backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/SetupNetworksHelperTest.java", "license": "apache-2.0", "size": 50252 }
[ "java.util.List", "org.ovirt.engine.core.common.action.SetupNetworksParameters", "org.ovirt.engine.core.common.businessentities.VdsNetworkInterface" ]
import java.util.List; import org.ovirt.engine.core.common.action.SetupNetworksParameters; import org.ovirt.engine.core.common.businessentities.VdsNetworkInterface;
import java.util.*; import org.ovirt.engine.core.common.action.*; import org.ovirt.engine.core.common.businessentities.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
2,101,979
protected Color getDisabledTextColor() { return disabledTextColor; }
Color function() { return disabledTextColor; }
/** * Returns the color for the text label of disabled buttons. The value * is initialised in the {@link #installDefaults(AbstractButton)} method * by reading the <code>ToggleButton.disabledText</code> item from the UI * defaults. * * @return The color for the text label of disabled buttons. */
Returns the color for the text label of disabled buttons. The value is initialised in the <code>#installDefaults(AbstractButton)</code> method by reading the <code>ToggleButton.disabledText</code> item from the UI defaults
getDisabledTextColor
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/plaf/metal/MetalToggleButtonUI.java", "license": "gpl-2.0", "size": 7035 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,208,805
public OutputStream getOutputStream(String name) throws IOException { return this.getOutputStream(name, null); }
OutputStream function(String name) throws IOException { return this.getOutputStream(name, null); }
/** * Returns the output stream for the given configuration file in the given world. * * @param name The name of the configuration file. * @return The OutputStream to write data into. * @throws IOException If an IO-Operation fails. */
Returns the output stream for the given configuration file in the given world
getOutputStream
{ "repo_name": "StuxSoftware/SimpleDev", "path": "Configuration/src/main/java/net/stuxcrystal/simpledev/configuration/storage/ModuleConfigurationLoader.java", "license": "apache-2.0", "size": 14613 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,725,233
public static void generate(InterchangeWriter<InterchangeMasterSchedule> iWriter) { // InterchangeMasterSchedule interchange = new InterchangeMasterSchedule(); // List<ComplexObjectType> interchangeObjects = interchange.getCourseOfferingOrSectionOrBellSchedule(); writeEntitiesToInterchange(i...
static void function(InterchangeWriter<InterchangeMasterSchedule> iWriter) { writeEntitiesToInterchange(iWriter); }
/** * Sets up a new Master Schedule Interchange and populates it * * @return */
Sets up a new Master Schedule Interchange and populates it
generate
{ "repo_name": "inbloom/secure-data-service", "path": "tools/data-tools/src/org/slc/sli/test/generators/interchange/InterchangeMasterScheduleGenerator.java", "license": "apache-2.0", "size": 4319 }
[ "org.slc.sli.test.edfi.entities.InterchangeMasterSchedule", "org.slc.sli.test.utils.InterchangeWriter" ]
import org.slc.sli.test.edfi.entities.InterchangeMasterSchedule; import org.slc.sli.test.utils.InterchangeWriter;
import org.slc.sli.test.edfi.entities.*; import org.slc.sli.test.utils.*;
[ "org.slc.sli" ]
org.slc.sli;
908,392
public Class<? extends ResourceStateMachine> type() { return type; }
Class<? extends ResourceStateMachine> function() { return type; }
/** * Returns the resource state machine class. * * @return The resource state machine class. */
Returns the resource state machine class
type
{ "repo_name": "madjam/copycat", "path": "manager/src/main/java/io/atomix/manager/CreateResource.java", "license": "apache-2.0", "size": 2427 }
[ "io.atomix.resource.ResourceStateMachine" ]
import io.atomix.resource.ResourceStateMachine;
import io.atomix.resource.*;
[ "io.atomix.resource" ]
io.atomix.resource;
1,985,606
@Test public void whenDivFourDivideTwoThenTwo() { Calculator calc = new Calculator(); calc.add(4D, 2D); double result = calc.getResult(); double expected = 2D; assertThat(result, is(expected)); }
void function() { Calculator calc = new Calculator(); calc.add(4D, 2D); double result = calc.getResult(); double expected = 2D; assertThat(result, is(expected)); }
/** * Test Divide. */
Test Divide
whenDivFourDivideTwoThenTwo
{ "repo_name": "EvgeniyVinnitskiy/evinnitskiy", "path": "chapter_001/src/test/java/ru/job4j/calculator/CalculatorTest.java", "license": "apache-2.0", "size": 1396 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
1,148,924
protected void addIsAutonomousPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Module_isAutonomous_feature"), getString("_UI_PropertyDescript...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), DtmcPackage.Literals.MODULE__IS_AUTONOMOUS, true, false, false, ItemPropertyDescriptor.BOOLEAN_VA...
/** * This adds a property descriptor for the Is Autonomous feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Is Autonomous feature.
addIsAutonomousPropertyDescriptor
{ "repo_name": "aciancone/klapersuite", "path": "klapersuite.metamodel.dtmc.edit/src/dtmc/provider/ModuleItemProvider.java", "license": "epl-1.0", "size": 6254 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,914,669
public static void incr( final char[][] array, final long index ) { array[ segment( index ) ][ displacement( index ) ]++; }
static void function( final char[][] array, final long index ) { array[ segment( index ) ][ displacement( index ) ]++; }
/** Increments the element of the given big array of specified index. * * @param array a big array. * @param index a position in the big array. */
Increments the element of the given big array of specified index
incr
{ "repo_name": "karussell/fastutil", "path": "src/it/unimi/dsi/fastutil/chars/CharBigArrays.java", "license": "apache-2.0", "size": 50859 }
[ "it.unimi.dsi.fastutil.BigArrays" ]
import it.unimi.dsi.fastutil.BigArrays;
import it.unimi.dsi.fastutil.*;
[ "it.unimi.dsi" ]
it.unimi.dsi;
1,983,581
public static FileStatus[] listChildren(FileSystem fileSystem, Path path) throws IOException { FileStatus[] entries = fileSystem.listStatus(path); if (entries.length == 1 && path.equals(entries[0].getPath())) { // this is the path: ignore return new FileStatus[]{}; } else { return ...
static FileStatus[] function(FileSystem fileSystem, Path path) throws IOException { FileStatus[] entries = fileSystem.listStatus(path); if (entries.length == 1 && path.equals(entries[0].getPath())) { return new FileStatus[]{}; } else { return entries; } }
/** * List all children of a path, but not the path itself in the case * that the path refers to a file or empty directory. * @param fileSystem FS * @param path path * @return a list of children, and never the path itself. * @throws IOException problem in the list process */
List all children of a path, but not the path itself in the case that the path refers to a file or empty directory
listChildren
{ "repo_name": "huafengw/hadoop", "path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/ContractTestUtils.java", "license": "apache-2.0", "size": 54281 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,298,204
public void setEndpoint( Endpoint endpoint) { this.srEndpoint = endpoint; } }
void function( Endpoint endpoint) { this.srEndpoint = endpoint; } }
/** * Sets the endpoint. * @param endpoint the endpoint. */
Sets the endpoint
setEndpoint
{ "repo_name": "ChetnaChaudhari/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/BaseServiceRecordProcessor.java", "license": "apache-2.0", "size": 13749 }
[ "org.apache.hadoop.registry.client.types.Endpoint" ]
import org.apache.hadoop.registry.client.types.Endpoint;
import org.apache.hadoop.registry.client.types.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
970,826
protected boolean isSavedUserValid(HttpServletRequest request, Principal savedUser) { return true; }
boolean function(HttpServletRequest request, Principal savedUser) { return true; }
/** * Returns the non-authenticated principal for the user request */
Returns the non-authenticated principal for the user request
isSavedUserValid
{ "repo_name": "WelcomeHUME/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/security/AbstractLogin.java", "license": "gpl-2.0", "size": 20066 }
[ "java.security.Principal", "javax.servlet.http.HttpServletRequest" ]
import java.security.Principal; import javax.servlet.http.HttpServletRequest;
import java.security.*; import javax.servlet.http.*;
[ "java.security", "javax.servlet" ]
java.security; javax.servlet;
1,019,849
private boolean isEmbeddedDriverRegistered() { String clientDriverName = getClientDriverName(); for (Enumeration<Driver> e = DriverManager.getDrivers(); e.hasMoreElements(); ) { Driver d = e.nextElement(); String driverClass = d.getClass(...
boolean function() { String clientDriverName = getClientDriverName(); for (Enumeration<Driver> e = DriverManager.getDrivers(); e.hasMoreElements(); ) { Driver d = e.nextElement(); String driverClass = d.getClass().getName(); if (!driverClass.startsWith(STR)) continue; if (driverClass.equals( clientDriverName )) continu...
/** * Return true if there appears to be a Derby embedded * driver registered with the DriverManager. * @return true if there appears to be a Derby embedded driver registered */
Return true if there appears to be a Derby embedded driver registered with the DriverManager
isEmbeddedDriverRegistered
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java", "license": "apache-2.0", "size": 27219 }
[ "java.sql.Driver", "java.sql.DriverManager", "java.util.Enumeration" ]
import java.sql.Driver; import java.sql.DriverManager; import java.util.Enumeration;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
1,196,968
public static DB parseList( Ptg[] dbrange ) { int prevCol = -1; int nCols = 0; int nRows = 0; int maxRows = 0; // allocate the empty table for the dbrange for( Ptg aDbrange1 : dbrange ) { if( aDbrange1 instanceof PtgRef ) { PtgRef pref = (PtgRef) aDbrange1; int[] loc = pref.getIntLocati...
static DB function( Ptg[] dbrange ) { int prevCol = -1; int nCols = 0; int nRows = 0; int maxRows = 0; for( Ptg aDbrange1 : dbrange ) { if( aDbrange1 instanceof PtgRef ) { PtgRef pref = (PtgRef) aDbrange1; int[] loc = pref.getIntLocation(); if( loc[1] != prevCol ) { prevCol = loc[1]; nCols++; nRows = 0; } else { nRows+...
/** * Write some documentation here please... thanks! -jm * * @param dbrange * @return */
Write some documentation here please... thanks! -jm
parseList
{ "repo_name": "Maxels88/openxls", "path": "src/main/java/org/openxls/formats/XLS/formulas/DatabaseCalculator.java", "license": "gpl-3.0", "size": 36823 }
[ "org.slf4j.Logger", "org.slf4j.LoggerFactory" ]
import org.slf4j.Logger; import org.slf4j.LoggerFactory;
import org.slf4j.*;
[ "org.slf4j" ]
org.slf4j;
644,578
public boolean isRowData() { return token == TDS_ROW_TOKEN || token == TDS_ALTROW; } } private static class TableMetaData { String catalog; String schema; String name; } // // Package private constants // ...
boolean function() { return token == TDS_ROW_TOKEN token == TDS_ALTROW; } } private static class TableMetaData { String catalog; String schema; String name; } public static final int MIN_PKT_SIZE = 512; public static final int DEFAULT_MIN_PKT_SIZE_TDS70 = 4096; public static final int MAX_PKT_SIZE = 32768; public stati...
/** * Retrieve the row data status. * * @return * <code>true</code> if the current token is a result row. */
Retrieve the row data status
isRowData
{ "repo_name": "milesibastos/jTDS", "path": "src/main/net/sourceforge/jtds/jdbc/TdsCore.java", "license": "lgpl-2.1", "size": 168782 }
[ "java.util.HashMap", "net.sourceforge.jtds.util.SSPIJNIClient", "org.ietf.jgss.GSSContext" ]
import java.util.HashMap; import net.sourceforge.jtds.util.SSPIJNIClient; import org.ietf.jgss.GSSContext;
import java.util.*; import net.sourceforge.jtds.util.*; import org.ietf.jgss.*;
[ "java.util", "net.sourceforge.jtds", "org.ietf.jgss" ]
java.util; net.sourceforge.jtds; org.ietf.jgss;
2,294,514
public float getFloatProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getFloatProperty(" + name + ")"); } return message.getFloatProperty(name); }
float function(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace(STR + name + ")"); } return message.getFloatProperty(name); }
/** * Get property * * @param name The name * @return The value * @throws JMSException Thrown if an error occurs */
Get property
getFloatProperty
{ "repo_name": "jbertram/activemq-artemis-old", "path": "artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java", "license": "apache-2.0", "size": 21155 }
[ "javax.jms.JMSException" ]
import javax.jms.JMSException;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
1,917,925
public XSElementDeclaration getElementDeclaration() { return fDeclaration; }
XSElementDeclaration function() { return fDeclaration; }
/** * An item isomorphic to the element declaration used to validate * this element. * * @return an element declaration */
An item isomorphic to the element declaration used to validate this element
getElementDeclaration
{ "repo_name": "AaronZhangL/SplitCharater", "path": "xerces-2_11_0/src/org/apache/xerces/impl/xs/ElementPSVImpl.java", "license": "gpl-2.0", "size": 9772 }
[ "org.apache.xerces.xs.XSElementDeclaration" ]
import org.apache.xerces.xs.XSElementDeclaration;
import org.apache.xerces.xs.*;
[ "org.apache.xerces" ]
org.apache.xerces;
1,273,505
public void checkRightParen() throws MessagingException { Token token = next(); if (token.getType() != ')') { throw new ResponseFormatException("Missing ')' in response"); } }
void function() throws MessagingException { Token token = next(); if (token.getType() != ')') { throw new ResponseFormatException(STR); } }
/** * Ensure that the next token in the parsed response is a * ')' character. * * @exception ResponseFormatException */
Ensure that the next token in the parsed response is a ')' character
checkRightParen
{ "repo_name": "apache/geronimo-javamail", "path": "geronimo-javamail_1.6/geronimo-javamail_1.6_provider/src/main/java/org/apache/geronimo/javamail/store/imap/connection/IMAPResponseTokenizer.java", "license": "apache-2.0", "size": 48453 }
[ "javax.mail.MessagingException", "org.apache.geronimo.javamail.util.ResponseFormatException" ]
import javax.mail.MessagingException; import org.apache.geronimo.javamail.util.ResponseFormatException;
import javax.mail.*; import org.apache.geronimo.javamail.util.*;
[ "javax.mail", "org.apache.geronimo" ]
javax.mail; org.apache.geronimo;
1,185,952
public static RuntimeService getRuntimeService() { return getProcessEngine().getRuntimeService(); }
static RuntimeService function() { return getProcessEngine().getRuntimeService(); }
/** * Returns The process service. * * @return The process service */
Returns The process service
getRuntimeService
{ "repo_name": "adbrucker/SecureBPMN", "path": "runtime/src/modules/activiti-webapp-rest2/src/main/java/org/activiti/rest/api/ActivitiUtil.java", "license": "apache-2.0", "size": 2927 }
[ "org.activiti.engine.RuntimeService" ]
import org.activiti.engine.RuntimeService;
import org.activiti.engine.*;
[ "org.activiti.engine" ]
org.activiti.engine;
1,204,109
public void desactivar(){ if(!this.validateDesactivar()){ return; } this.setEstado(Estado.INACTIVO.getId()); GdeDAOFactory.getEtapaProcesalDAO().update(this); }
void function(){ if(!this.validateDesactivar()){ return; } this.setEstado(Estado.INACTIVO.getId()); GdeDAOFactory.getEtapaProcesalDAO().update(this); }
/** * Desactiva el EtapaProcesal. Previamente valida la desactivacion. * */
Desactiva el EtapaProcesal. Previamente valida la desactivacion
desactivar
{ "repo_name": "avdata99/SIAT", "path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/gde/buss/bean/EtapaProcesal.java", "license": "gpl-3.0", "size": 4101 }
[ "ar.gov.rosario.siat.gde.buss.dao.GdeDAOFactory", "coop.tecso.demoda.iface.model.Estado" ]
import ar.gov.rosario.siat.gde.buss.dao.GdeDAOFactory; import coop.tecso.demoda.iface.model.Estado;
import ar.gov.rosario.siat.gde.buss.dao.*; import coop.tecso.demoda.iface.model.*;
[ "ar.gov.rosario", "coop.tecso.demoda" ]
ar.gov.rosario; coop.tecso.demoda;
1,992,200
public static void close() { synchronized (INSTANCE_LOCK) { if (INSTANCE != null) { Logger innerLogger = INSTANCE.logger; // remove any existing handlers cleanupLogger(innerLogger); } // make singleton null INSTANCE = null; } }
static void function() { synchronized (INSTANCE_LOCK) { if (INSTANCE != null) { Logger innerLogger = INSTANCE.logger; cleanupLogger(innerLogger); } INSTANCE = null; } }
/** * Closes the current LogWrapper. */
Closes the current LogWrapper
close
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/management/internal/cli/LogWrapper.java", "license": "apache-2.0", "size": 11318 }
[ "java.util.logging.Logger" ]
import java.util.logging.Logger;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,639,533
public interface ExportSink { void write(SnapshotRecord... records) throws IOException; }
interface ExportSink { void function(SnapshotRecord... records) throws IOException; }
/** * Writes snapshot data to the destination sink. * * @param records the snapshot records * @throws IOException error writing records */
Writes snapshot data to the destination sink
write
{ "repo_name": "PurelyApplied/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/snapshot/RegionSnapshotServiceImpl.java", "license": "apache-2.0", "size": 20775 }
[ "java.io.IOException", "org.apache.geode.internal.cache.snapshot.SnapshotPacket" ]
import java.io.IOException; import org.apache.geode.internal.cache.snapshot.SnapshotPacket;
import java.io.*; import org.apache.geode.internal.cache.snapshot.*;
[ "java.io", "org.apache.geode" ]
java.io; org.apache.geode;
525,691
public void setDependencies(List<Dependency> dependencies) { this.dependencies = dependencies; }
void function(List<Dependency> dependencies) { this.dependencies = dependencies; }
/** * Sets the list of dependencies to scan. * * @param dependencies new value of dependencies */
Sets the list of dependencies to scan
setDependencies
{ "repo_name": "jeremylong/DependencyCheck", "path": "core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java", "license": "apache-2.0", "size": 33221 }
[ "java.util.List", "org.owasp.dependencycheck.dependency.Dependency" ]
import java.util.List; import org.owasp.dependencycheck.dependency.Dependency;
import java.util.*; import org.owasp.dependencycheck.dependency.*;
[ "java.util", "org.owasp.dependencycheck" ]
java.util; org.owasp.dependencycheck;
2,791,001
@Test public void testGetAddDifferent() throws Exception { //add load List<ListenableFuture<Integer>> futures = put(folder);
void function() throws Exception { List<ListenableFuture<Integer>> futures = put(folder);
/** * Put and retrieve different files concurrently. * @throws Exception */
Put and retrieve different files concurrently
testGetAddDifferent
{ "repo_name": "meggermo/jackrabbit-oak", "path": "oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCacheTest.java", "license": "apache-2.0", "size": 23563 }
[ "com.google.common.util.concurrent.ListenableFuture", "java.util.List" ]
import com.google.common.util.concurrent.ListenableFuture; import java.util.List;
import com.google.common.util.concurrent.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,942,888
public static String getSqlString(Query<?> query, Session session) { final QueryTranslatorFactory ast = new ASTQueryTranslatorFactory(); SessionFactory sessionFactory = session.getSessionFactory(); final QueryTranslatorImpl qt = (QueryTranslatorImpl) ast.createQueryTranslator("id", query.get...
static String function(Query<?> query, Session session) { final QueryTranslatorFactory ast = new ASTQueryTranslatorFactory(); SessionFactory sessionFactory = session.getSessionFactory(); final QueryTranslatorImpl qt = (QueryTranslatorImpl) ast.createQueryTranslator("id", query.getQueryString(), Maps.newHashMap(), (Sess...
/** * Get the SQL query string from HQL Query. * * @param query * HQL query to convert to SQL * @return SQL query string from HQL */
Get the SQL query string from HQL Query
getSqlString
{ "repo_name": "EHJ-52n/SOS", "path": "hibernate/session-factory/src/main/java/org/n52/sos/ds/hibernate/util/HibernateHelper.java", "license": "gpl-2.0", "size": 8364 }
[ "com.google.common.collect.Maps", "org.hibernate.Session", "org.hibernate.SessionFactory", "org.hibernate.engine.spi.SessionFactoryImplementor", "org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory", "org.hibernate.hql.internal.ast.QueryTranslatorImpl", "org.hibernate.hql.spi.QueryTranslatorFactory...
import com.google.common.collect.Maps; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory; import org.hibernate.hql.internal.ast.QueryTranslatorImpl; import org.hibernate.hql.spi.Qu...
import com.google.common.collect.*; import org.hibernate.*; import org.hibernate.engine.spi.*; import org.hibernate.hql.internal.ast.*; import org.hibernate.hql.spi.*; import org.hibernate.query.*;
[ "com.google.common", "org.hibernate", "org.hibernate.engine", "org.hibernate.hql", "org.hibernate.query" ]
com.google.common; org.hibernate; org.hibernate.engine; org.hibernate.hql; org.hibernate.query;
438,185
protected boolean checkDuplicateIncidentDate(AssetRepairHistory assetRepairHistory, Set<Date> incidentDateSet) { boolean success = true; if (!incidentDateSet.add(assetRepairHistory.getIncidentDate())) { GlobalVariables.getMessageMap().putError(CamsPropertyConstants.AssetRepairHistory.IN...
boolean function(AssetRepairHistory assetRepairHistory, Set<Date> incidentDateSet) { boolean success = true; if (!incidentDateSet.add(assetRepairHistory.getIncidentDate())) { GlobalVariables.getMessageMap().putError(CamsPropertyConstants.AssetRepairHistory.INCIDENT_DATE, CamsKeyConstants.AssetRepairHistory.ERROR_DUPLIC...
/** * Check for duplicate incident dates within the Repair History section * * @param assetRepairHistory * @param incidentDateSet * @return boolean */
Check for duplicate incident dates within the Repair History section
checkDuplicateIncidentDate
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/cam/document/validation/impl/AssetRule.java", "license": "apache-2.0", "size": 35816 }
[ "java.util.Date", "java.util.Set", "org.kuali.kfs.module.cam.CamsKeyConstants", "org.kuali.kfs.module.cam.CamsPropertyConstants", "org.kuali.kfs.module.cam.businessobject.AssetRepairHistory", "org.kuali.rice.krad.util.GlobalVariables" ]
import java.util.Date; import java.util.Set; import org.kuali.kfs.module.cam.CamsKeyConstants; import org.kuali.kfs.module.cam.CamsPropertyConstants; import org.kuali.kfs.module.cam.businessobject.AssetRepairHistory; import org.kuali.rice.krad.util.GlobalVariables;
import java.util.*; import org.kuali.kfs.module.cam.*; import org.kuali.kfs.module.cam.businessobject.*; import org.kuali.rice.krad.util.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
2,910,434
public static void main(String[] args) { // The following commented lines of code are for debugging purposes: //args = new String[]{"run", "SPADE", "C:\\Users\\ph\\Desktop\\SPMF\\test_files\\contextPrefixSpan.txt", "output.txt", "50%", "100"}; //C:\Users\ph\Desktop\SPMF\test_files // System.out.println...
static void function(String[] args) { if (args.length != 0) { processCommandLineArguments(args); } else { EventQueue.invokeLater(new Runnable() {
/** * Method to launch the software. If there are command line arguments, it * means that the software is launched from the command line. Otherwise, * this method launches the graphical user interface. * * @param args command line arguments. */
Method to launch the software. If there are command line arguments, it means that the software is launched from the command line. Otherwise, this method launches the graphical user interface
main
{ "repo_name": "pommedeterresautee/spmf", "path": "ca/pfv/spmf/gui/MainWindow.java", "license": "gpl-3.0", "size": 143042 }
[ "java.awt.EventQueue" ]
import java.awt.EventQueue;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,780,472
public IgniteConfiguration setClusterStateOnStart(ClusterState state) { this.clusterStateOnStart = state; return this; } /** * Gets flag indicating whether cache sanity check is enabled. If enabled, then Ignite * will perform the following checks and throw an exception if check f...
IgniteConfiguration function(ClusterState state) { this.clusterStateOnStart = state; return this; } /** * Gets flag indicating whether cache sanity check is enabled. If enabled, then Ignite * will perform the following checks and throw an exception if check fails: * <ul> * <li>Cache entry is not externally locked with ...
/** * Sets state of cluster on start. * * @param state New cluster state on start. * @return {@code this} for chaining. * @see #getClusterStateOnStart() */
Sets state of cluster on start
setClusterStateOnStart
{ "repo_name": "nizhikov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java", "license": "apache-2.0", "size": 125128 }
[ "org.apache.ignite.cluster.ClusterState" ]
import org.apache.ignite.cluster.ClusterState;
import org.apache.ignite.cluster.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,224,769
@CanIgnoreReturnValue public long writeFrom(InputStream input) throws IOException { checkNotNull(input); Closer closer = Closer.create(); try { OutputStream out = closer.register(openStream()); long written = ByteStreams.copy(input, out); out.flush(); // https://code.google.com/p/guav...
long function(InputStream input) throws IOException { checkNotNull(input); Closer closer = Closer.create(); try { OutputStream out = closer.register(openStream()); long written = ByteStreams.copy(input, out); out.flush(); return written; } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } } p...
/** * Writes all the bytes from the given {@code InputStream} to this sink. Does not close * {@code input}. * * @return the number of bytes written * @throws IOException if an I/O occurs in the process of reading from {@code input} or writing to * this sink */
Writes all the bytes from the given InputStream to this sink. Does not close input
writeFrom
{ "repo_name": "tli2/guava", "path": "guava/src/com/google/common/io/ByteSink.java", "license": "apache-2.0", "size": 5549 }
[ "com.google.common.base.Preconditions", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.nio.charset.Charset" ]
import com.google.common.base.Preconditions; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.Charset;
import com.google.common.base.*; import java.io.*; import java.nio.charset.*;
[ "com.google.common", "java.io", "java.nio" ]
com.google.common; java.io; java.nio;
2,275,895
public String putDocuments(DataBundle dataBundle) { // query the entity in db first to get the actual data and create document for actual entity Map<String, StudentAttributes> students = dataBundle.students; for (StudentAttributes student : students.values()) { StudentAttributes...
String function(DataBundle dataBundle) { Map<String, StudentAttributes> students = dataBundle.students; for (StudentAttributes student : students.values()) { StudentAttributes studentInDb = studentsDb.getStudentForEmail(student.course, student.email); studentsDb.putDocument(studentInDb); } Map<String, InstructorAttribu...
/** * create document for entities that have document--searchable * @param dataBundle * @return status of the request in the form 'status meassage'+'additional * info (if any)' e.g., "[BACKEND_STATUS_SUCCESS]" e.g., * "[BACKEND_STATUS_FAILURE]NullPointerException at ..." */
create document for entities that have document--searchable
putDocuments
{ "repo_name": "karthikaacharya/teammates", "path": "src/main/java/teammates/logic/backdoor/BackDoorLogic.java", "license": "gpl-2.0", "size": 20995 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,911,340
private void setChildAdditionalData(final IJsonBackedObject serializedObject, final JsonObject rawJson) { // Use reflection to iterate through fields for eligible Graph children if(rawJson != null) { for (java.lang.reflect.Field field : serializedObject.getClass().getFields()) { try { if(field != nul...
void function(final IJsonBackedObject serializedObject, final JsonObject rawJson) { if(rawJson != null) { for (java.lang.reflect.Field field : serializedObject.getClass().getFields()) { try { if(field != null) { final Object fieldObject = field.get(serializedObject); if (fieldObject instanceof HashMap) { @SuppressWarni...
/** * Recursively sets additional data for each child object * * @param serializedObject the parent object whose children will be iterated to set additional data * @param rawJson the raw json */
Recursively sets additional data for each child object
setChildAdditionalData
{ "repo_name": "microsoftgraph/msgraph-sdk-java-core", "path": "src/main/java/com/microsoft/graph/serializer/DefaultSerializer.java", "license": "mit", "size": 15641 }
[ "com.google.gson.JsonArray", "com.google.gson.JsonElement", "com.google.gson.JsonObject", "java.lang.reflect.Field", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import java.lang.reflect.Field; import java.util.HashMap; import java.util.List; import java.util.Map;
import com.google.gson.*; import java.lang.reflect.*; import java.util.*;
[ "com.google.gson", "java.lang", "java.util" ]
com.google.gson; java.lang; java.util;
2,211,832
public List<PDFCmd> getCommands() { return this.commands; }
List<PDFCmd> function() { return this.commands; }
/** * get all the commands in the current page */
get all the commands in the current page
getCommands
{ "repo_name": "oswetto/PDFrenderer", "path": "src/com/sun/pdfview/PDFPage.java", "license": "lgpl-2.1", "size": 28724 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,769,696
private FactType getDeclaredFactType(String packageName, String className) { try { return m_kieBase.getFactType(packageName, className); } catch (Exception e) { // Any objects that are not declared in drl will throw exception. } return null; }
FactType function(String packageName, String className) { try { return m_kieBase.getFactType(packageName, className); } catch (Exception e) { } return null; }
/** * This checks if fact is declared in drl. * Facts which are inserted in the session will throw exception. * Currently, there is no better way to find if the fact is a declared fact or not. */
This checks if fact is declared in drl. Facts which are inserted in the session will throw exception. Currently, there is no better way to find if the fact is a declared fact or not
getDeclaredFactType
{ "repo_name": "jeffgdotorg/opennms", "path": "opennms-correlation/drools-correlation-engine/src/main/java/org/opennms/netmgt/correlation/drools/DroolsCorrelationEngine.java", "license": "gpl-2.0", "size": 22078 }
[ "org.kie.api.definition.type.FactType" ]
import org.kie.api.definition.type.FactType;
import org.kie.api.definition.type.*;
[ "org.kie.api" ]
org.kie.api;
2,635,504
public static void createDownloadableExport(List<DSpaceObject> dsObjects, Context context, boolean migrate) throws Exception { EPerson eperson = context.getCurrentUser(); processDownloadableExport(dsObjects, context, eperson == null ? null : eperson.getEmail(), migrat...
static void function(List<DSpaceObject> dsObjects, Context context, boolean migrate) throws Exception { EPerson eperson = context.getCurrentUser(); processDownloadableExport(dsObjects, context, eperson == null ? null : eperson.getEmail(), migrate); }
/** * Convenience method to export a List of dspace objects (Community, * Collection or Item) * * @param dsObjects * - List containing dspace objects * @param context * - the dspace context * @throws Exception */
Convenience method to export a List of dspace objects (Community, Collection or Item)
createDownloadableExport
{ "repo_name": "mdiggory/dryad-repo", "path": "dspace-api/src/main/java/org/dspace/app/itemexport/ItemExport.java", "license": "bsd-3-clause", "size": 51938 }
[ "java.util.List", "org.dspace.content.DSpaceObject", "org.dspace.core.Context", "org.dspace.eperson.EPerson" ]
import java.util.List; import org.dspace.content.DSpaceObject; import org.dspace.core.Context; import org.dspace.eperson.EPerson;
import java.util.*; import org.dspace.content.*; import org.dspace.core.*; import org.dspace.eperson.*;
[ "java.util", "org.dspace.content", "org.dspace.core", "org.dspace.eperson" ]
java.util; org.dspace.content; org.dspace.core; org.dspace.eperson;
1,206,182
private ContentValues toValues() { ContentValues map = new ContentValues(); map.put(MediaStore.MediaColumns.DATA, mPath); map.put(MediaStore.MediaColumns.TITLE, mTitle); map.put(MediaStore.MediaColumns.DATE_MODIFIED, mLastModified); map.put(MediaStore...
ContentValues function() { ContentValues map = new ContentValues(); map.put(MediaStore.MediaColumns.DATA, mPath); map.put(MediaStore.MediaColumns.TITLE, mTitle); map.put(MediaStore.MediaColumns.DATE_MODIFIED, mLastModified); map.put(MediaStore.MediaColumns.SIZE, mFileSize); map.put(MediaStore.MediaColumns.MIME_TYPE, mM...
/** * Formats the data into a values array suitable for use with the Media * Content Provider. * * @return a map of values */
Formats the data into a values array suitable for use with the Media Content Provider
toValues
{ "repo_name": "haikuowuya/android_system_code", "path": "src/android/media/MediaScanner.java", "license": "apache-2.0", "size": 75181 }
[ "android.content.ContentValues", "android.provider.MediaStore" ]
import android.content.ContentValues; import android.provider.MediaStore;
import android.content.*; import android.provider.*;
[ "android.content", "android.provider" ]
android.content; android.provider;
1,379,379
protected Map<QName, Serializable> getDefaultProperties(ClassDefinition classDefinition) { PropertyMap properties = new PropertyMap(); for (Map.Entry<QName, Serializable> entry : classDefinition.getDefaultValues().entrySet()) { Serializable value = entry.getValue(); ...
Map<QName, Serializable> function(ClassDefinition classDefinition) { PropertyMap properties = new PropertyMap(); for (Map.Entry<QName, Serializable> entry : classDefinition.getDefaultValues().entrySet()) { Serializable value = entry.getValue(); PropertyDefinition prop = this.dictionaryService.getProperty(entry.getKey()...
/** * Sets the default property values * * @param classDefinition the model type definition for which to get defaults */
Sets the default property values
getDefaultProperties
{ "repo_name": "Kast0rTr0y/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/node/AbstractNodeServiceImpl.java", "license": "lgpl-3.0", "size": 35789 }
[ "java.io.Serializable", "java.util.Map", "org.alfresco.service.cmr.dictionary.ClassDefinition", "org.alfresco.service.cmr.dictionary.DataTypeDefinition", "org.alfresco.service.cmr.dictionary.PropertyDefinition", "org.alfresco.service.namespace.QName", "org.alfresco.util.PropertyMap" ]
import java.io.Serializable; import java.util.Map; import org.alfresco.service.cmr.dictionary.ClassDefinition; import org.alfresco.service.cmr.dictionary.DataTypeDefinition; import org.alfresco.service.cmr.dictionary.PropertyDefinition; import org.alfresco.service.namespace.QName; import org.alfresco.util.PropertyMap;
import java.io.*; import java.util.*; import org.alfresco.service.cmr.dictionary.*; import org.alfresco.service.namespace.*; import org.alfresco.util.*;
[ "java.io", "java.util", "org.alfresco.service", "org.alfresco.util" ]
java.io; java.util; org.alfresco.service; org.alfresco.util;
1,150,782
public byte[] getLsaBodyAsByteArray() throws Exception { List<Byte> bodyLst = new ArrayList<>(); if (this.opaqueId() == 1) { for (TopLevelTlv tlv : this.topLevelValues) { //Check the sub type of lsa and build bytes accordingly if (tlv instanceof RouterTlv)...
byte[] function() throws Exception { List<Byte> bodyLst = new ArrayList<>(); if (this.opaqueId() == 1) { for (TopLevelTlv tlv : this.topLevelValues) { if (tlv instanceof RouterTlv) { RouterTlv routerTlv = (RouterTlv) tlv; bodyLst.addAll(Bytes.asList(routerTlv.asBytes())); } else if (tlv instanceof LinkTlv) { LinkTlv li...
/** * Gets the LSA body as byte array. * * @return the lsa body as byte array * @throws Exception might throws exception while parsing packet */
Gets the LSA body as byte array
getLsaBodyAsByteArray
{ "repo_name": "sonu283304/onos", "path": "protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/types/OpaqueLsa10.java", "license": "apache-2.0", "size": 7558 }
[ "com.google.common.primitives.Bytes", "java.util.ArrayList", "java.util.List", "org.onosproject.ospf.protocol.lsa.tlvtypes.LinkTlv", "org.onosproject.ospf.protocol.lsa.tlvtypes.RouterTlv" ]
import com.google.common.primitives.Bytes; import java.util.ArrayList; import java.util.List; import org.onosproject.ospf.protocol.lsa.tlvtypes.LinkTlv; import org.onosproject.ospf.protocol.lsa.tlvtypes.RouterTlv;
import com.google.common.primitives.*; import java.util.*; import org.onosproject.ospf.protocol.lsa.tlvtypes.*;
[ "com.google.common", "java.util", "org.onosproject.ospf" ]
com.google.common; java.util; org.onosproject.ospf;
585,976
private void setScrollOffset(Object scroll, float yOffset) { //do not re-scroll the source if (scroll != null && yOffset >= 0) { scrollTo(scroll, yOffset); //save the current yOffset of the scrollable on the yOffsets hashmap yOffsets.put(scroll, (int) yOffset); ...
void function(Object scroll, float yOffset) { if (scroll != null && yOffset >= 0) { scrollTo(scroll, yOffset); yOffsets.put(scroll, (int) yOffset); } }
/** * When notified for scroll, dispatch it to all registered scrollables * * @param scroll * @param yOffset */
When notified for scroll, dispatch it to all registered scrollables
setScrollOffset
{ "repo_name": "farrywen/MaterialViewPager", "path": "materialviewpager/src/main/java/com/github/florent37/materialviewpager/MaterialViewPagerAnimator.java", "license": "apache-2.0", "size": 25090 }
[ "com.github.florent37.materialviewpager.Utils" ]
import com.github.florent37.materialviewpager.Utils;
import com.github.florent37.materialviewpager.*;
[ "com.github.florent37" ]
com.github.florent37;
2,450,275
private Api getApiInternal(String apiOrgId, String apiId, String apiVersion) { String key = getApiIndex(apiOrgId, apiId, apiVersion); Api api; synchronized (mutex) { api = (Api) getMap().get(key); } return api; }
Api function(String apiOrgId, String apiId, String apiVersion) { String key = getApiIndex(apiOrgId, apiId, apiVersion); Api api; synchronized (mutex) { api = (Api) getMap().get(key); } return api; }
/** * Gets an API by its unique identifying info (orgid, id, version). * @param apiOrgId * @param apiId * @param apiVersion * @return an Api or null if not found */
Gets an API by its unique identifying info (orgid, id, version)
getApiInternal
{ "repo_name": "msavy/apiman", "path": "gateway/engine/core/src/main/java/io/apiman/gateway/engine/impl/InMemoryRegistry.java", "license": "apache-2.0", "size": 14612 }
[ "io.apiman.gateway.engine.beans.Api" ]
import io.apiman.gateway.engine.beans.Api;
import io.apiman.gateway.engine.beans.*;
[ "io.apiman.gateway" ]
io.apiman.gateway;
629,946
public Builder addAllPhase(List<Phase> elements) { if (this.phases == null) { this.phases = new ArrayList<>(); } this.phases.addAll(elements); return this; }
Builder function(List<Phase> elements) { if (this.phases == null) { this.phases = new ArrayList<>(); } this.phases.addAll(elements); return this; }
/** * Add all elements to `phases` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link * SubscriptionScheduleCreateParams#phases} for the field documentation. */
Add all elements to `phases` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See <code>SubscriptionScheduleCreateParams#phases</code> for the field documentation
addAllPhase
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java", "license": "mit", "size": 107599 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
543,922
EventQueue.invokeLater(new Runnable() {
EventQueue.invokeLater(new Runnable() {
/** * Launch the application. */
Launch the application
main
{ "repo_name": "Mattie432/Batch-Regex-File-Renamer", "path": "JavaProject/src/About/AboutJava.java", "license": "mit", "size": 9466 }
[ "java.awt.EventQueue" ]
import java.awt.EventQueue;
import java.awt.*;
[ "java.awt" ]
java.awt;
359,445
private void resetStateForGridTop() { // Reset mItemTops and mItemBottoms final int colCount = mColCount; if (mItemTops == null || mItemTops.length != colCount) { mItemTops = new int[colCount]; mItemBottoms = new int[colCount]; } final int top = getPad...
void function() { final int colCount = mColCount; if (mItemTops == null mItemTops.length != colCount) { mItemTops = new int[colCount]; mItemBottoms = new int[colCount]; } final int top = getPaddingTop(); Arrays.fill(mItemTops, top); Arrays.fill(mItemBottoms, top); mFirstPosition = 0; if(mRestoreOffsets!=null) Arrays.fi...
/** * Reset all internal state to be at the top of the grid. */
Reset all internal state to be at the top of the grid
resetStateForGridTop
{ "repo_name": "GMAndroidTeam/Android-PullToRefresh", "path": "library/src/main/java/com/handmark/pulltorefresh/library/internal/StaggeredGridView.java", "license": "apache-2.0", "size": 92730 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,553,490
mBytes = bytes; invalidate(); } /** * Pass FFT data to the visualizer. Typically this will be obtained from the * Android Visualizer.OnDataCaptureListener call back. See * {@link Visualizer.OnDataCaptureListener#onFftDataCapture }
mBytes = bytes; invalidate(); } /** * Pass FFT data to the visualizer. Typically this will be obtained from the * Android Visualizer.OnDataCaptureListener call back. See * {@link Visualizer.OnDataCaptureListener#onFftDataCapture }
/** * Pass data to the visualizer. Typically this will be obtained from the * Android Visualizer.OnDataCaptureListener call back. See * {@link Visualizer.OnDataCaptureListener#onWaveFormDataCapture } * @param bytes */
Pass data to the visualizer. Typically this will be obtained from the Android Visualizer.OnDataCaptureListener call back. See <code>Visualizer.OnDataCaptureListener#onWaveFormDataCapture </code>
updateVisualizer
{ "repo_name": "liufeiit/itmarry", "path": "source/Apollo/Apollo/src/com/andrew/apolloMod/ui/widgets/VisualizerView.java", "license": "mit", "size": 3900 }
[ "android.media.audiofx.Visualizer" ]
import android.media.audiofx.Visualizer;
import android.media.audiofx.*;
[ "android.media" ]
android.media;
2,797,144
@Cacheable(value = "listHonorRoll") public List<HonorRoll> listHonorRollByZoneWithCache(Zone zone, LocalDate bucket, int limit) { final String sql = "" + " SELECT * " + " FROM HonorRoll " + " WHERE zone = ? " + " AND bucket = ? " + " ORDER BY (articleUpVoted + deba...
@Cacheable(value = STR) List<HonorRoll> function(Zone zone, LocalDate bucket, int limit) { final String sql = STR SELECT * STR FROM HonorRoll STR WHERE zone = ? STR AND bucket = ? STR ORDER BY (articleUpVoted + debateUpVoted - debateDownVoted) DESC, username ASC STR LIMIT ? "; return jdbc().query(sql, honorRollRowMappe...
/** * see {@link #listHonorRollWithCache(java.time.LocalDate, int)} for why leak bucket to outside */
see <code>#listHonorRollWithCache(java.time.LocalDate, int)</code> for why leak bucket to outside
listHonorRollByZoneWithCache
{ "repo_name": "kaif-open/kaif", "path": "kaif-web/src/main/java/io/kaif/model/vote/HonorRollDao.java", "license": "apache-2.0", "size": 5656 }
[ "io.kaif.model.zone.Zone", "java.time.LocalDate", "java.util.List", "org.springframework.cache.annotation.Cacheable" ]
import io.kaif.model.zone.Zone; import java.time.LocalDate; import java.util.List; import org.springframework.cache.annotation.Cacheable;
import io.kaif.model.zone.*; import java.time.*; import java.util.*; import org.springframework.cache.annotation.*;
[ "io.kaif.model", "java.time", "java.util", "org.springframework.cache" ]
io.kaif.model; java.time; java.util; org.springframework.cache;
236,969
private void readTrailer(final GZIPArchive.ReadEntry entry) throws IOException { // CRC32 entry.crc32 = readLEInt(input); if (LOGGER.isTraceEnabled()) LOGGER.trace("CRC read from stream {}", Integer.valueOf(entry.crc32)); // ISIZE final int iSize = readLEInt(input); if (entry.uncompressedSkipLength !...
void function(final GZIPArchive.ReadEntry entry) throws IOException { entry.crc32 = readLEInt(input); if (LOGGER.isTraceEnabled()) LOGGER.trace(STR, Integer.valueOf(entry.crc32)); final int iSize = readLEInt(input); if (entry.uncompressedSkipLength != iSize) throw new GZIPArchive.FormatException(STR + entry.uncompresse...
/** Reads the GZIP entry trailer (populating the entry CRC metadata). * * @param entry the entry where to store the CRC of the entry. * */
Reads the GZIP entry trailer (populating the entry CRC metadata)
readTrailer
{ "repo_name": "LAW-Unimi/BUbiNG", "path": "src/it/unimi/di/law/warc/io/gzarc/GZIPArchiveReader.java", "license": "apache-2.0", "size": 9088 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
423,881
private boolean checkConnection() { boolean flag = true; try { flag = this.connection.isClosed(); } catch (SQLException e) { logger.error(e.getMessage(), e); } return flag; }
boolean function() { boolean flag = true; try { flag = this.connection.isClosed(); } catch (SQLException e) { logger.error(e.getMessage(), e); } return flag; }
/** * * Check connection for available * * @return connection status */
Check connection for available
checkConnection
{ "repo_name": "kgobunov/Java", "path": "SMTP/src/main/java/db/dataBaseHelper.java", "license": "gpl-2.0", "size": 7062 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,638,064
private void setLastTargetQuery(final String tenant, final long currentTimeMillis, final List<String> chunk) { final Map<String, String> paramMapping = Maps.newHashMapWithExpectedSize(chunk.size()); for (int i = 0; i < chunk.size(); i++) { paramMapping.put("cid" + i, chunk.get(i)); ...
void function(final String tenant, final long currentTimeMillis, final List<String> chunk) { final Map<String, String> paramMapping = Maps.newHashMapWithExpectedSize(chunk.size()); for (int i = 0; i < chunk.size(); i++) { paramMapping.put("cid" + i, chunk.get(i)); } final Query updateQuery = entityManager.createNativeQ...
/** * Sets {@link Target#getLastTargetQuery()} by native SQL in order to avoid * raising opt lock revision as this update is not mission critical and in * fact only written by {@link ControllerManagement}, i.e. the target * itself. */
Sets <code>Target#getLastTargetQuery()</code> by native SQL in order to avoid raising opt lock revision as this update is not mission critical and in fact only written by <code>ControllerManagement</code>, i.e. the target itself
setLastTargetQuery
{ "repo_name": "stormc/hawkbit", "path": "hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaControllerManagement.java", "license": "epl-1.0", "size": 31273 }
[ "com.google.common.collect.Maps", "java.util.List", "java.util.Map", "javax.persistence.Query" ]
import com.google.common.collect.Maps; import java.util.List; import java.util.Map; import javax.persistence.Query;
import com.google.common.collect.*; import java.util.*; import javax.persistence.*;
[ "com.google.common", "java.util", "javax.persistence" ]
com.google.common; java.util; javax.persistence;
1,117,270
private boolean isOnlyNotificationWithGroupKey(final StatusBarNotification notification, final List<StatusBarNotification> allNotifications) { if (TextUtils.isEmpty(notification.getGroupKey())) { return true; } for (final StatusBarNotification singleNotification : allNotification...
boolean function(final StatusBarNotification notification, final List<StatusBarNotification> allNotifications) { if (TextUtils.isEmpty(notification.getGroupKey())) { return true; } for (final StatusBarNotification singleNotification : allNotifications) { if (!notification.equals(singleNotification) && notification.getG...
/** * Check if there isn't a public notification with the same group key * * @param notification The notification to find a public version for * @param allNotifications The list of all notifications * @return True if there is no public version of the notification */
Check if there isn't a public notification with the same group key
isOnlyNotificationWithGroupKey
{ "repo_name": "tobsinger/dreamy", "path": "app/src/main/java/de/dreamy/DreamyDaydream.java", "license": "mit", "size": 14060 }
[ "android.app.Notification", "android.service.notification.StatusBarNotification", "android.text.TextUtils", "java.util.List" ]
import android.app.Notification; import android.service.notification.StatusBarNotification; import android.text.TextUtils; import java.util.List;
import android.app.*; import android.service.notification.*; import android.text.*; import java.util.*;
[ "android.app", "android.service", "android.text", "java.util" ]
android.app; android.service; android.text; java.util;
1,299,216
protected String toJSONFragment() { StringBuffer json = new StringBuffer(); boolean first = true; if (isSetType()) { if (!first) json.append(", "); json.append("\"Type\" : ["); java.util.List<String> typeList = getType(); for (String type : t...
String function() { StringBuffer json = new StringBuffer(); boolean first = true; if (isSetType()) { if (!first) json.append(STR); json.append("\"Type\STR); java.util.List<String> typeList = getType(); for (String type : typeList) { if (typeList.indexOf(type) > 0) json.append(STR); json.append(quoteJSON(type)); } json....
/** * * JSON fragment representation of this object * * @return JSON fragment for this object. Name for outer * object expected to be set by calling method. This fragment * returns inner properties representation only * */
JSON fragment representation of this object
toJSONFragment
{ "repo_name": "VDuda/SyncRunner-Pub", "path": "src/API/amazon/mws/feeds/model/TypeList.java", "license": "mit", "size": 6265 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
299,411
public void requestSetFailedNode(int nodeId) { this.enqueue(new ReplaceFailedNodeMessageClass().doRequest(nodeId)); }
void function(int nodeId) { this.enqueue(new ReplaceFailedNodeMessageClass().doRequest(nodeId)); }
/** * Marks a node as failed * * @param nodeId * The address of the node to set failed */
Marks a node as failed
requestSetFailedNode
{ "repo_name": "mickey4u/new_mart", "path": "addons/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java", "license": "epl-1.0", "size": 56021 }
[ "org.openhab.binding.zwave.internal.protocol.serialmessage.ReplaceFailedNodeMessageClass" ]
import org.openhab.binding.zwave.internal.protocol.serialmessage.ReplaceFailedNodeMessageClass;
import org.openhab.binding.zwave.internal.protocol.serialmessage.*;
[ "org.openhab.binding" ]
org.openhab.binding;
238,602
private void renderEntityOnFire(Entity entity, double x, double y, double z, float partialTicks) { GlStateManager.disableLighting(); TextureMap texturemap = Minecraft.getMinecraft().getTextureMapBlocks(); TextureAtlasSprite textureatlassprite = texturemap.getAtlasSprite("minecraft:blocks/fire_layer_0"); Text...
void function(Entity entity, double x, double y, double z, float partialTicks) { GlStateManager.disableLighting(); TextureMap texturemap = Minecraft.getMinecraft().getTextureMapBlocks(); TextureAtlasSprite textureatlassprite = texturemap.getAtlasSprite(STR); TextureAtlasSprite textureatlassprite1 = texturemap.getAtlasS...
/** * Renders fire on top of the entity. Args: entity, x, y, z, partialTickTime */
Renders fire on top of the entity. Args: entity, x, y, z, partialTickTime
renderEntityOnFire
{ "repo_name": "SkidJava/BaseClient", "path": "new_1.8.8/net/minecraft/client/renderer/entity/Render.java", "license": "gpl-2.0", "size": 16967 }
[ "net.minecraft.client.Minecraft", "net.minecraft.client.renderer.GlStateManager", "net.minecraft.client.renderer.Tessellator", "net.minecraft.client.renderer.WorldRenderer", "net.minecraft.client.renderer.texture.TextureAtlasSprite", "net.minecraft.client.renderer.texture.TextureMap", "net.minecraft.cli...
import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; impo...
import net.minecraft.client.*; import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.texture.*; import net.minecraft.client.renderer.vertex.*; import net.minecraft.entity.*;
[ "net.minecraft.client", "net.minecraft.entity" ]
net.minecraft.client; net.minecraft.entity;
2,873,961
private Vector parseRawEntry(String target, String raw){ if(target == null){ return null; } return null; }
Vector function(String target, String raw){ if(target == null){ return null; } return null; }
/** * This method parses the given html tagged line from * www.wordweb.com to remove all the unnecessary tags and * return a vector of either thesaurus of dictionaryentry * objects * * @param target - String target word * @param raw - String raw html tagged line * @return - Vector of thesaurus / dicti...
This method parses the given html tagged line from www.wordweb.com to remove all the unnecessary tags and return a vector of either thesaurus of dictionaryentry objects
parseRawEntry
{ "repo_name": "ssomnath/GRE_WordLookup", "path": "AutoWordLookup5.5/src/dictionaries/Longman.java", "license": "gpl-2.0", "size": 5204 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,376,017
SCMRegisteredCmdResponseProto register(DatanodeDetailsProto datanodeDetails, String[] scmAddresses) throws IOException;
SCMRegisteredCmdResponseProto register(DatanodeDetailsProto datanodeDetails, String[] scmAddresses) throws IOException;
/** * Register Datanode. * @param datanodeDetails - Datanode Details. * @param scmAddresses - List of SCMs this datanode is configured to * communicate. * @return SCM Command. */
Register Datanode
register
{ "repo_name": "ChetnaChaudhari/hadoop", "path": "hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/protocol/StorageContainerDatanodeProtocol.java", "license": "apache-2.0", "size": 3919 }
[ "java.io.IOException", "org.apache.hadoop.hdds.protocol.proto.HddsProtos" ]
import java.io.IOException; import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
import java.io.*; import org.apache.hadoop.hdds.protocol.proto.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,300,061
public void add(Number value, Paint paint) { add(value.doubleValue(), paint); }
void function(Number value, Paint paint) { add(value.doubleValue(), paint); }
/** * Adds an entry to the lookup table. Any values from <code>n</code> up * to but not including the next value in the table take on the specified * <code>paint</code>. * * @param value the data value (<code>null</code> not permitted). * @param paint the paint. * * @d...
Adds an entry to the lookup table. Any values from <code>n</code> up to but not including the next value in the table take on the specified <code>paint</code>
add
{ "repo_name": "apetresc/JFreeChart", "path": "src/main/java/org/jfree/chart/renderer/LookupPaintScale.java", "license": "lgpl-2.1", "size": 11827 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,739,619
public void setAsynchronous( boolean async ) throws IOException;
void function( boolean async ) throws IOException;
/** * For a non-blocking tracker the construction of the response can be completed asynchronously * by setting async=true and then, when complete, setting it to false * @param async */
For a non-blocking tracker the construction of the response can be completed asynchronously by setting async=true and then, when complete, setting it to false
setAsynchronous
{ "repo_name": "BiglySoftware/BiglyBT", "path": "core/src/com/biglybt/pif/tracker/web/TrackerWebPageResponse.java", "license": "gpl-2.0", "size": 2665 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,529,436
boolean trackMotionScroll( int deltaX, int incrementalDeltaX ) { final int childCount = getChildCount(); if ( childCount == 0 ) { return true; } final int firstLeft = getChildAt( 0 ).getLeft(); final int lastRight = getChildAt( childCount - 1 ).getRight(); final Rect listPadding = mListPadding; /...
boolean trackMotionScroll( int deltaX, int incrementalDeltaX ) { final int childCount = getChildCount(); if ( childCount == 0 ) { return true; } final int firstLeft = getChildAt( 0 ).getLeft(); final int lastRight = getChildAt( childCount - 1 ).getRight(); final Rect listPadding = mListPadding; int effectivePaddingLeft...
/** * Track a motion scroll * * @param deltaY * Amount to offset mMotionView. This is the accumulated delta since the motion began. Positive numbers mean the user's * finger is moving down the screen. * @param incrementalDeltaY * Change in deltaY from the previous event. *...
Track a motion scroll
trackMotionScroll
{ "repo_name": "jonathangerbaud/Klyph", "path": "Klyph/libs_ext/HorizontalVariableListView-master/HorizontalVariableListView/src/it/sephiroth/android/library/widget/AbsHListView.java", "license": "mit", "size": 175073 }
[ "android.graphics.Rect", "android.view.View" ]
import android.graphics.Rect; import android.view.View;
import android.graphics.*; import android.view.*;
[ "android.graphics", "android.view" ]
android.graphics; android.view;
2,072,800
public ContentPackage getContentPackageByResourceId(String resourceId) throws ResourceStorageException;
ContentPackage function(String resourceId) throws ResourceStorageException;
/** * Gets the content package by the resource its represents * @param resourceId * @return * @throws ResourceStorageException */
Gets the content package by the resource its represents
getContentPackageByResourceId
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "scorm/scorm-api/src/java/org/sakaiproject/scorm/service/api/ScormContentService.java", "license": "apache-2.0", "size": 3435 }
[ "org.sakaiproject.scorm.exceptions.ResourceStorageException", "org.sakaiproject.scorm.model.api.ContentPackage" ]
import org.sakaiproject.scorm.exceptions.ResourceStorageException; import org.sakaiproject.scorm.model.api.ContentPackage;
import org.sakaiproject.scorm.exceptions.*; import org.sakaiproject.scorm.model.api.*;
[ "org.sakaiproject.scorm" ]
org.sakaiproject.scorm;
813,061
@Override protected IdmScriptType toType(IdmScriptDto dto) { IdmScriptType type = new IdmScriptType(); if (dto == null) { return type; } // transform DTO to type type.setCode(dto.getCode()); type.setName(dto.getName()); // parameter isn't implemented yet // type.setParameters(dto.getParameter());...
IdmScriptType function(IdmScriptDto dto) { IdmScriptType type = new IdmScriptType(); if (dto == null) { return type; } type.setCode(dto.getCode()); type.setName(dto.getName()); type.setBody(dto.getScript()); type.setCategory(dto.getCategory()); type.setDescription(dto.getDescription()); type.setType(SCRIPT_DEFAULT_TYPE...
/** * Transform dto to type. * * @param dto * @return */
Transform dto to type
toType
{ "repo_name": "bcvsolutions/CzechIdMng", "path": "Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/model/service/impl/DefaultIdmScriptService.java", "license": "mit", "size": 16823 }
[ "eu.bcvsolutions.idm.core.api.domain.ScriptAuthorityType", "eu.bcvsolutions.idm.core.api.dto.IdmScriptAuthorityDto", "eu.bcvsolutions.idm.core.api.dto.IdmScriptDto", "eu.bcvsolutions.idm.core.api.dto.filter.IdmScriptAuthorityFilter", "eu.bcvsolutions.idm.core.model.jaxb.IdmScriptAllowClassType", "eu.bcvso...
import eu.bcvsolutions.idm.core.api.domain.ScriptAuthorityType; import eu.bcvsolutions.idm.core.api.dto.IdmScriptAuthorityDto; import eu.bcvsolutions.idm.core.api.dto.IdmScriptDto; import eu.bcvsolutions.idm.core.api.dto.filter.IdmScriptAuthorityFilter; import eu.bcvsolutions.idm.core.model.jaxb.IdmScriptAllowClassType...
import eu.bcvsolutions.idm.core.api.domain.*; import eu.bcvsolutions.idm.core.api.dto.*; import eu.bcvsolutions.idm.core.api.dto.filter.*; import eu.bcvsolutions.idm.core.model.jaxb.*; import java.util.*; import org.springframework.data.domain.*;
[ "eu.bcvsolutions.idm", "java.util", "org.springframework.data" ]
eu.bcvsolutions.idm; java.util; org.springframework.data;
770,327
public static SecurityPolicyResolver makeStaticSecurityPolicyResolver( SecurityPolicyRule... rules) { return makeStaticSecurityPolicyResolver(makeBasicSecurityPolicy(rules)); }
static SecurityPolicyResolver function( SecurityPolicyRule... rules) { return makeStaticSecurityPolicyResolver(makeBasicSecurityPolicy(rules)); }
/** * Make a static security-policy resolver that resolves to a given policy. * * @param rules The policy rules that comprise the returned policy. * @return A security-policy resolver that resolves to the given policy. */
Make a static security-policy resolver that resolves to a given policy
makeStaticSecurityPolicyResolver
{ "repo_name": "dweidenfeld/library", "path": "src/com/google/enterprise/adaptor/secmgr/saml/OpenSamlUtil.java", "license": "apache-2.0", "size": 43010 }
[ "org.opensaml.ws.security.SecurityPolicyResolver", "org.opensaml.ws.security.SecurityPolicyRule" ]
import org.opensaml.ws.security.SecurityPolicyResolver; import org.opensaml.ws.security.SecurityPolicyRule;
import org.opensaml.ws.security.*;
[ "org.opensaml.ws" ]
org.opensaml.ws;
2,398,052
public void requestStillImage() { if (gpsLogger.isTracking()) { File imageFile = pushImageFile(); if (null != imageFile) { Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); startActivityForResult(cameraInten...
void function() { if (gpsLogger.isTracking()) { File imageFile = pushImageFile(); if (null != imageFile) { Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); startActivityForResult(cameraIntent, TrackLogger.REQCODE_IMAGE_CAPTURE); ...
/** * Request a still picture from the camera application, saving the file in * the current track directory */
Request a still picture from the camera application, saving the file in the current track directory
requestStillImage
{ "repo_name": "janastu/BaaApp", "path": "src/janastu/android/followsheep/activity/TrackLogger.java", "license": "gpl-3.0", "size": 16990 }
[ "android.content.Intent", "android.net.Uri", "android.provider.MediaStore", "android.widget.Toast", "java.io.File" ]
import android.content.Intent; import android.net.Uri; import android.provider.MediaStore; import android.widget.Toast; import java.io.File;
import android.content.*; import android.net.*; import android.provider.*; import android.widget.*; import java.io.*;
[ "android.content", "android.net", "android.provider", "android.widget", "java.io" ]
android.content; android.net; android.provider; android.widget; java.io;
128,548
public void setDbStoredFunctionReturnType(DatabaseType dbStoredFunctionReturnType) { this.dbStoredFunctionReturnType = dbStoredFunctionReturnType; }
void function(DatabaseType dbStoredFunctionReturnType) { this.dbStoredFunctionReturnType = dbStoredFunctionReturnType; }
/** * Set the DatabaseType of the stored function's return argument. * * @param dbStoredFunctionReturnType */
Set the DatabaseType of the stored function's return argument
setDbStoredFunctionReturnType
{ "repo_name": "gameduell/eclipselink.runtime", "path": "utils/org.eclipse.persistence.dbws.builder/src/org/eclipse/persistence/tools/dbws/ProcedureOperationModel.java", "license": "epl-1.0", "size": 6884 }
[ "org.eclipse.persistence.internal.helper.DatabaseType" ]
import org.eclipse.persistence.internal.helper.DatabaseType;
import org.eclipse.persistence.internal.helper.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
1,233,029
public IBasicExpression createExpression (Element element) throws BadQueryException { IBasicExpression result = null; if (element == null) { result = new EmptyExpression(getRequestedResourcePool()); } else { String namespace = element.getNamespace().getURI();...
IBasicExpression function (Element element) throws BadQueryException { IBasicExpression result = null; if (element == null) { result = new EmptyExpression(getRequestedResourcePool()); } else { String namespace = element.getNamespace().getURI(); String name = element.getName(); if (namespace.equals (NamespaceCache.DEFAU...
/** * Creates a (non-merge) expression (compare...) for the given Element. * * @param element an Element describing the expression. * * @return an IBasicExpression * * @throws BadQueryException * */
Creates a (non-merge) expression (compare...) for the given Element
createExpression
{ "repo_name": "integrated/jakarta-slide-server", "path": "maven/jakarta-slide-kernel/src/main/java/org/apache/slide/search/basic/BasicExpressionFactory.java", "license": "apache-2.0", "size": 11988 }
[ "org.apache.slide.content.NodeProperty", "org.apache.slide.search.BadQueryException", "org.apache.slide.search.InvalidQueryException", "org.apache.slide.search.basic.expression.EmptyExpression", "org.jdom.Element" ]
import org.apache.slide.content.NodeProperty; import org.apache.slide.search.BadQueryException; import org.apache.slide.search.InvalidQueryException; import org.apache.slide.search.basic.expression.EmptyExpression; import org.jdom.Element;
import org.apache.slide.content.*; import org.apache.slide.search.*; import org.apache.slide.search.basic.expression.*; import org.jdom.*;
[ "org.apache.slide", "org.jdom" ]
org.apache.slide; org.jdom;
2,673,660
public void display() { Iterator i = getKeys(); while (i.hasNext()) { String key = (String) i.next(); Object value = get(key); System.out.println(key + " => " + value); } }
void function() { Iterator i = getKeys(); while (i.hasNext()) { String key = (String) i.next(); Object value = get(key); System.out.println(key + STR + value); } }
/** * Display the configuration for debugging purposes to System.out. */
Display the configuration for debugging purposes to System.out
display
{ "repo_name": "sabob/ratel", "path": "ratel/src/org/apache/commons/collections/ExtendedProperties.java", "license": "apache-2.0", "size": 58798 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,517,763
private void clearLogTable( int index ) { TransHistoryLogTab model = models[index]; LogTableInterface logTable = model.logTable; if ( logTable.isDefined() ) { String schemaTable = logTable.getQuotedSchemaTableCombination(); DatabaseMeta databaseMeta = logTable.getDatabaseMeta(); Messag...
void function( int index ) { TransHistoryLogTab model = models[index]; LogTableInterface logTable = model.logTable; if ( logTable.isDefined() ) { String schemaTable = logTable.getQuotedSchemaTableCombination(); DatabaseMeta databaseMeta = logTable.getDatabaseMeta(); MessageBox mb = new MessageBox( transGraph.getShell()...
/** * User requested to clear the log table.<br> * Better ask confirmation */
User requested to clear the log table. Better ask confirmation
clearLogTable
{ "repo_name": "emartin-pentaho/pentaho-kettle", "path": "ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransHistoryDelegate.java", "license": "apache-2.0", "size": 27926 }
[ "org.eclipse.swt.widgets.MessageBox", "org.pentaho.di.core.database.Database", "org.pentaho.di.core.database.DatabaseMeta", "org.pentaho.di.core.logging.LogTableInterface", "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.ui.core.dialog.ErrorDialog" ]
import org.eclipse.swt.widgets.MessageBox; import org.pentaho.di.core.database.Database; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.logging.LogTableInterface; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.ui.core.dialog.ErrorDialog;
import org.eclipse.swt.widgets.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.logging.*; import org.pentaho.di.i18n.*; import org.pentaho.di.ui.core.dialog.*;
[ "org.eclipse.swt", "org.pentaho.di" ]
org.eclipse.swt; org.pentaho.di;
399,811
public void CheckLinks(AgentModel am) { ListIterator<Plan> li; li = _planConstruction.listIterator(); while(li.hasNext()) { ((Plan) li.next()).UpdatePlan(am); } if(this._subIntention != null) { this._subIntention.CheckLinks(am); } }
void function(AgentModel am) { ListIterator<Plan> li; li = _planConstruction.listIterator(); while(li.hasNext()) { ((Plan) li.next()).UpdatePlan(am); } if(this._subIntention != null) { this._subIntention.CheckLinks(am); } }
/** * Updates all the plans for the intention according to the new * state of the world. Supports continuous planning. */
Updates all the plans for the intention according to the new state of the world. Supports continuous planning
CheckLinks
{ "repo_name": "nurv/lirec", "path": "AgentMind/trunk/AgentMind/FAtiMA/src/FAtiMA/deliberativeLayer/Intention.java", "license": "gpl-3.0", "size": 13555 }
[ "java.util.ListIterator" ]
import java.util.ListIterator;
import java.util.*;
[ "java.util" ]
java.util;
1,427,497
@Override public void Execute(QueryContext queryContext, Predicate nextPredicate) throws GeneralFailureException, OperationFailedException, CacheException { java.util.ArrayList keyList = null; pattern = (String) generator.Evaluate(((MemberFunction) functor).getMemberName(), queryContext.getAttri...
void function(QueryContext queryContext, Predicate nextPredicate) throws GeneralFailureException, OperationFailedException, CacheException { java.util.ArrayList keyList = null; pattern = (String) generator.Evaluate(((MemberFunction) functor).getMemberName(), queryContext.getAttributeValues()); pattern = tangible.DotNet...
/** * See attribute-level indexes can't be used in this predicate. * * @param queryContext */
See attribute-level indexes can't be used in this predicate
Execute
{ "repo_name": "Alachisoft/TayzGrid", "path": "src/tgcache/src/com/alachisoft/tayzgrid/caching/queries/filters/FunctorLikePatternPredicate.java", "license": "apache-2.0", "size": 5089 }
[ "com.alachisoft.tayzgrid.caching.queries.AttributeIndex", "com.alachisoft.tayzgrid.caching.queries.ComparisonType", "com.alachisoft.tayzgrid.caching.queries.IIndexStore", "com.alachisoft.tayzgrid.caching.queries.QueryContext", "com.alachisoft.tayzgrid.parser.AttributeIndexNotDefined", "com.alachisoft.tayz...
import com.alachisoft.tayzgrid.caching.queries.AttributeIndex; import com.alachisoft.tayzgrid.caching.queries.ComparisonType; import com.alachisoft.tayzgrid.caching.queries.IIndexStore; import com.alachisoft.tayzgrid.caching.queries.QueryContext; import com.alachisoft.tayzgrid.parser.AttributeIndexNotDefined; import co...
import com.alachisoft.tayzgrid.caching.queries.*; import com.alachisoft.tayzgrid.parser.*; import com.alachisoft.tayzgrid.runtime.exceptions.*;
[ "com.alachisoft.tayzgrid" ]
com.alachisoft.tayzgrid;
1,033,716
long timeNanos = System.nanoTime() - mStartTimeNanos; return Time.of(timeNanos, TimeUnit.NANOSECONDS); }
long timeNanos = System.nanoTime() - mStartTimeNanos; return Time.of(timeNanos, TimeUnit.NANOSECONDS); }
/** * {@inheritDoc} * <p> * The returned timestamp is a time difference between the current time and the time at which the * current instance was created. * </p> */
The returned timestamp is a time difference between the current time and the time at which the current instance was created.
currentTime
{ "repo_name": "Flash3388/FlashLib", "path": "flashlib.core/src/main/java/com/flash3388/flashlib/time/SystemNanoClock.java", "license": "bsd-3-clause", "size": 735 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,325,990
private void assertNoWebContents() { Assert.assertNull(getPanelWebContents()); }
void function() { Assert.assertNull(getPanelWebContents()); }
/** * Asserts that the Panel's WebContents is not created. */
Asserts that the Panel's WebContents is not created
assertNoWebContents
{ "repo_name": "chromium/chromium", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java", "license": "bsd-3-clause", "size": 109454 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,314,884
@SuppressWarnings("deprecation") public void createWithPermissions(Path dir, FsPermission clusterPerms) throws IOException, BadClusterStateException { if (fileSystem.isFile(dir)) { // HADOOP-9361 shows some filesystems don't correctly fail here throw new BadClusterStateException(...
@SuppressWarnings(STR) void function(Path dir, FsPermission clusterPerms) throws IOException, BadClusterStateException { if (fileSystem.isFile(dir)) { throw new BadClusterStateException( STR, dir); } log.debug(STR, dir, clusterPerms); fileSystem.getConf().set(CommonConfigurationKeys.FS_PERMISSIONS_UMASK_KEY, "000"); fi...
/** * Create a directory with the given permissions. * * @param dir directory * @param clusterPerms cluster permissions * @throws IOException IO problem * @throws BadClusterStateException any cluster state problem */
Create a directory with the given permissions
createWithPermissions
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/utils/CoreFileSystem.java", "license": "apache-2.0", "size": 19228 }
[ "java.io.IOException", "org.apache.hadoop.fs.CommonConfigurationKeys", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.permission.FsPermission", "org.apache.hadoop.yarn.service.exceptions.BadClusterStateException" ]
import java.io.IOException; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.yarn.service.exceptions.BadClusterStateException;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.yarn.service.exceptions.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,452,882
public Timestamp getItemServiceDate() { return itemServiceDate; }
Timestamp function() { return itemServiceDate; }
/** * Gets the itemServiceDate attribute. * * @return Returns the itemServiceDate. */
Gets the itemServiceDate attribute
getItemServiceDate
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/businessobject/InternalBillingItem.java", "license": "agpl-3.0", "size": 5793 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,402,405
private void CheckVersionCollection(String expectedVersionLabel, long beforeVersionTime, Collection<Version> versions) { for (Version version : versions) { // Get the frozen id from the version String frozenNodeId = null; // Switch VersionS...
void function(String expectedVersionLabel, long beforeVersionTime, Collection<Version> versions) { for (Version version : versions) { String frozenNodeId = null; if (versionService.getVersionStoreReference().getIdentifier().equals(Version2Model.STORE_ID)) { frozenNodeId = ((NodeRef)version.getVersionProperty(Version2Mo...
/** * Helper method to check the validity of the list of newly created versions. * * @param beforeVersionTime the time before the versions where created * @param versions the collection of version objects */
Helper method to check the validity of the list of newly created versions
CheckVersionCollection
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/test-java/org/alfresco/repo/version/VersionServiceImplTest.java", "license": "lgpl-3.0", "size": 117920 }
[ "java.util.Collection", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.service.cmr.version.Version" ]
import java.util.Collection; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.version.Version;
import java.util.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.cmr.version.*;
[ "java.util", "org.alfresco.service" ]
java.util; org.alfresco.service;
1,425,232
public Map<Double, Double> getPercentiles() { return percentiles; }
Map<Double, Double> function() { return percentiles; }
/** * Gets the Map of percentile values for each given in query percentage of sample. * @return Map of percentile values for each given in query percentage of sample. */
Gets the Map of percentile values for each given in query percentage of sample
getPercentiles
{ "repo_name": "RBMHTechnology/vind", "path": "api/src/main/java/com/rbmhtechnology/vind/api/result/facet/StatsFacetResult.java", "license": "apache-2.0", "size": 5615 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
273,731
@Test public void verifyNexusReportsAsHealthyAndCorrect() { final NexusStatus nexusStatus = client().getStatus(); assertThat(nexusStatus, is(notNullValue())); assertThat(nexusStatus.isFirstStart(), is(true)); // should be true assertThat(nexusStatus.isInstanceUpgraded(), is(false)); // should be fal...
void function() { final NexusStatus nexusStatus = client().getStatus(); assertThat(nexusStatus, is(notNullValue())); assertThat(nexusStatus.isFirstStart(), is(true)); assertThat(nexusStatus.isInstanceUpgraded(), is(false)); assertThat(nexusStatus.getEditionShort(), equalTo("OSS")); }
/** * Test that only verifies that Nexus reports itself (the status resource actually, used by {@link NexusClient}) as * expected. */
Test that only verifies that Nexus reports itself (the status resource actually, used by <code>NexusClient</code>) as expected
verifyNexusReportsAsHealthyAndCorrect
{ "repo_name": "scmod/nexus-public", "path": "testsuite/modern-testsuite/src/test/java/org/sonatype/nexus/testsuite/SmokeIT.java", "license": "epl-1.0", "size": 2630 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.sonatype.nexus.client.core.NexusStatus" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.sonatype.nexus.client.core.NexusStatus;
import org.hamcrest.*; import org.sonatype.nexus.client.core.*;
[ "org.hamcrest", "org.sonatype.nexus" ]
org.hamcrest; org.sonatype.nexus;
831,005
public synchronized final Map<K, V> snapshot() { return new LinkedHashMap<K, V>(map); }
synchronized final Map<K, V> function() { return new LinkedHashMap<K, V>(map); }
/** * Returns a copy of the current contents of the cache, ordered from least * recently accessed to most recently accessed. */
Returns a copy of the current contents of the cache, ordered from least recently accessed to most recently accessed
snapshot
{ "repo_name": "jdkoren/squidb", "path": "squidb-ios/src/com/yahoo/android/sqlite/LruCache.java", "license": "apache-2.0", "size": 12620 }
[ "java.util.LinkedHashMap", "java.util.Map" ]
import java.util.LinkedHashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,770,269
public short getShort(String parameterName) throws SQLException { throw Util.notImplemented(); }
short function(String parameterName) throws SQLException { throw Util.notImplemented(); }
/** * JDBC 3.0 * * Retrieves the value of a JDBC SMALLINT parameter as a short in the Java * programming language. * * @param parameterName - the name of the parameter * @return the parameter value. If the value is SQL NULL, the result is 0. * @exception SQLException Feature not implemen...
JDBC 3.0 Retrieves the value of a JDBC SMALLINT parameter as a short in the Java programming language
getShort
{ "repo_name": "splicemachine/spliceengine", "path": "db-engine/src/main/java/com/splicemachine/db/impl/jdbc/EmbedCallableStatement20.java", "license": "agpl-3.0", "size": 37363 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,798,986
public String shortDesc(){ String res = "" + myIndex; return res; } public LinkedList getBindings(){ return bindings; }
String function(){ String res = "" + myIndex; return res; } public LinkedList getBindings(){ return bindings; }
/** * Returns a shorter description that toSting(). * Actually, it returns the unique index in String form. */
Returns a shorter description that toSting(). Actually, it returns the unique index in String form
shortDesc
{ "repo_name": "liuhongchao/GATE_Developer_7.0", "path": "src/gate/fsm/Transition.java", "license": "lgpl-3.0", "size": 6464 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
19,284