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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@UiThread
private static void initializeStrictModeWatch(
ThreadStrictModeInterceptor.Builder threadInterceptor) {
threadInterceptor.setCustomPenalty(violation -> {
if (Math.random() < UPLOAD_PROBABILITY) {
// Ensure that we do not upload too many StrictMode violat... | static void function( ThreadStrictModeInterceptor.Builder threadInterceptor) { threadInterceptor.setCustomPenalty(violation -> { if (Math.random() < UPLOAD_PROBABILITY) { if (sNumUploads.getAndAdd(1) < MAX_UPLOADS_PER_SESSION) { sCachedViolations.add(violation); } } }); sNumUploads.set(0); Looper.myQueue().addIdleHandl... | /**
* Add custom {@link ThreadStrictModeInterceptor} penalty which records strict mode violations.
* Set up an idle handler so StrictMode violations that occur on startup are not ignored.
*/ | Add custom <code>ThreadStrictModeInterceptor</code> penalty which records strict mode violations. Set up an idle handler so StrictMode violations that occur on startup are not ignored | initializeStrictModeWatch | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/ChromeStrictMode.java",
"license": "bsd-3-clause",
"size": 11984
} | [
"android.os.Looper",
"org.chromium.base.library_loader.LibraryLoader",
"org.chromium.components.strictmode.ThreadStrictModeInterceptor"
] | import android.os.Looper; import org.chromium.base.library_loader.LibraryLoader; import org.chromium.components.strictmode.ThreadStrictModeInterceptor; | import android.os.*; import org.chromium.base.library_loader.*; import org.chromium.components.strictmode.*; | [
"android.os",
"org.chromium.base",
"org.chromium.components"
] | android.os; org.chromium.base; org.chromium.components; | 514,999 |
return methodParameter.getParameterType().equals(UserRole.class) && null != methodParameter.getParameterAnnotation(
ActiveRole.class);
} | return methodParameter.getParameterType().equals(UserRole.class) && null != methodParameter.getParameterAnnotation( ActiveRole.class); } | /**
* Returns TRUE if method argument is {@link UserRole} and annotated by
* {@link ActiveRole} annotation
*/ | Returns TRUE if method argument is <code>UserRole</code> and annotated by <code>ActiveRole</code> annotation | supportsParameter | {
"repo_name": "reportportal/service-api",
"path": "src/main/java/com/epam/ta/reportportal/ws/resolver/ActiveUserWebArgumentResolver.java",
"license": "apache-2.0",
"size": 2815
} | [
"com.epam.ta.reportportal.entity.user.UserRole"
] | import com.epam.ta.reportportal.entity.user.UserRole; | import com.epam.ta.reportportal.entity.user.*; | [
"com.epam.ta"
] | com.epam.ta; | 166,268 |
private JMenu createFileMenu()
{
JMenu file = new JMenu("File");
file.setMnemonic(KeyEvent.VK_F);
file.add(buttons[EXIT_MI]);
return file;
}
| JMenu function() { JMenu file = new JMenu("File"); file.setMnemonic(KeyEvent.VK_F); file.add(buttons[EXIT_MI]); return file; } | /**
* Helper method to create the file menu.
*
* @return The file menu.
*/ | Helper method to create the file menu | createFileMenu | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/ui/TaskBarView.java",
"license": "gpl-2.0",
"size": 20703
} | [
"java.awt.event.KeyEvent",
"javax.swing.JMenu"
] | import java.awt.event.KeyEvent; import javax.swing.JMenu; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,883,056 |
@Override
public CloudServiceOperationStatusResponse getOperationStatus(String requestId) throws IOException, ServiceException, ParserConfigurationException, SAXException {
// Validate
if (requestId == null) {
throw new NullPointerException("requestId");
}
//... | CloudServiceOperationStatusResponse function(String requestId) throws IOException, ServiceException, ParserConfigurationException, SAXException { if (requestId == null) { throw new NullPointerException(STR); } boolean shouldTrace = CloudTracing.getIsEnabled(); String invocationId = null; if (shouldTrace) { invocationId... | /**
* The Get Operation Status operation returns the status of thespecified
* operation. After calling an asynchronous operation, you can call Get
* Operation Status to determine whether the operation has succeeded,
* failed, or is still in progress. (see
* http://msdn.microsoft.com/en-us/library/w... | The Get Operation Status operation returns the status of thespecified operation. After calling an asynchronous operation, you can call Get Operation Status to determine whether the operation has succeeded, failed, or is still in progress. (see HREF for more information) | getOperationStatus | {
"repo_name": "manikandan-palaniappan/azure-sdk-for-java",
"path": "management-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/CloudServiceManagementClientImpl.java",
"license": "apache-2.0",
"size": 27187
} | [
"com.microsoft.windowsazure.core.utils.XmlUtility",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.management.scheduler.models.CloudServiceOperationStatus",
"com.microsoft.windowsazure.management.scheduler.models.CloudServiceOperationStatusResponse",
"com.microsoft.wind... | import com.microsoft.windowsazure.core.utils.XmlUtility; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.scheduler.models.CloudServiceOperationStatus; import com.microsoft.windowsazure.management.scheduler.models.CloudServiceOperationStatusResponse; import com.... | import com.microsoft.windowsazure.core.utils.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.management.scheduler.models.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"com.microsoft.windowsazure",
"java.io",
"java.util",
"javax.xml",
"org.w3c.dom",
"org.xml.sax"
] | com.microsoft.windowsazure; java.io; java.util; javax.xml; org.w3c.dom; org.xml.sax; | 1,877,311 |
public String beginGenerateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) {
return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body();
} | String function(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); } | /**
* Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayName The name of the virtual network gateway.
* @... | Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication | beginGenerateVpnProfile | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualNetworkGatewaysInner.java",
"license": "mit",
"size": 230879
} | [
"com.microsoft.azure.management.network.v2018_08_01.VpnClientParameters"
] | import com.microsoft.azure.management.network.v2018_08_01.VpnClientParameters; | import com.microsoft.azure.management.network.v2018_08_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,578,482 |
public CategoryItemRendererState initialise(Graphics2D g2,
Rectangle2D dataArea,
CategoryPlot plot,
int rendererIndex,
P... | CategoryItemRendererState function(Graphics2D g2, Rectangle2D dataArea, CategoryPlot plot, int rendererIndex, PlotRenderingInfo info) { Rectangle2D adjusted = new Rectangle2D.Double(dataArea.getX(), dataArea.getY() + getYOffset(), dataArea.getWidth() - getXOffset(), dataArea.getHeight() - getYOffset()); CategoryItemRen... | /**
* Initialises the renderer and returns a state object that will be passed
* to subsequent calls to the drawItem method. This method gets called
* once at the start of the process of drawing a chart.
*
* @param g2 the graphics device.
* @param dataArea the area in which the dat... | Initialises the renderer and returns a state object that will be passed to subsequent calls to the drawItem method. This method gets called once at the start of the process of drawing a chart | initialise | {
"repo_name": "SOCR/HTML5_WebSite",
"path": "SOCR2.8/src/jfreechart/org/jfree/chart/renderer/category/BarRenderer3D.java",
"license": "lgpl-3.0",
"size": 29511
} | [
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.plot.CategoryPlot",
"org.jfree.chart.plot.PlotRenderingInfo"
] | import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.PlotRenderingInfo; | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.plot.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 1,322,891 |
protected void addRepresentsPropertyDescriptorGen(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Lifeline_... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), RamPackage.Literals.LIFELINE__REPRESENTS, true, false, true, null, null, null)); } | /**
* This adds a property descriptor for the Represents feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Represents feature. | addRepresentsPropertyDescriptorGen | {
"repo_name": "sacooper/ECSE-429-Project-Group1",
"path": "ca.mcgill.sel.ram.edit/src/ca/mcgill/sel/ram/provider/LifelineItemProvider.java",
"license": "gpl-2.0",
"size": 24611
} | [
"ca.mcgill.sel.ram.RamPackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory"
] | import ca.mcgill.sel.ram.RamPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; | import ca.mcgill.sel.ram.*; import org.eclipse.emf.edit.provider.*; | [
"ca.mcgill.sel",
"org.eclipse.emf"
] | ca.mcgill.sel; org.eclipse.emf; | 2,348,426 |
public boolean registrarIncidencia(){
// crear el mapa
HashMap<String,Object> datos = new HashMap<String,Object>();
// llenar los datos
datos.put("tipo", tipo);
datos.put("importancia", importancia);
datos.put("descripcion", descripcion);
datos.put("idusuario"... | boolean function(){ HashMap<String,Object> datos = new HashMap<String,Object>(); datos.put("tipo", tipo); datos.put(STR, importancia); datos.put(STR, descripcion); datos.put(STR, idUsuario); datos.put(STR, nombreCliente); datos.put(STR,apellido); datos.put(STR, direccion); datos.put("edad", edad); datos.put(STR, telefo... | /**
* registra una incidencia con los atributos de esta clase
* @return true si la operacion fue correcta
*/ | registra una incidencia con los atributos de esta clase | registrarIncidencia | {
"repo_name": "lokiteitor/ProyectosUPSLP",
"path": "CallCenterClient/src/main/java/mx/edu/upslp/callcenterclient/gui/datos/Incidencia.java",
"license": "gpl-3.0",
"size": 11995
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,406,802 |
Artifact createDependencyArtifact( String groupId, String artifactId, VersionRange version, String type,
String classifier, String scope, boolean optional ); | Artifact createDependencyArtifact( String groupId, String artifactId, VersionRange version, String type, String classifier, String scope, boolean optional ); | /**
* Shorthand method for <code>getArtifactFactory().createDependencyArtifact(...)</code>.
*
* @param groupId The group id.
* @param artifactId The artifact id.
* @param version The version (possibly a range)
* @param type The type.
* @param classifier The classifier.
* @param s... | Shorthand method for <code>getArtifactFactory().createDependencyArtifact(...)</code> | createDependencyArtifact | {
"repo_name": "prostagma/versions-maven-plugin",
"path": "src/main/java/org/codehaus/mojo/versions/api/VersionsHelper.java",
"license": "apache-2.0",
"size": 11691
} | [
"org.apache.maven.artifact.Artifact",
"org.apache.maven.artifact.versioning.VersionRange"
] | import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.versioning.VersionRange; | import org.apache.maven.artifact.*; import org.apache.maven.artifact.versioning.*; | [
"org.apache.maven"
] | org.apache.maven; | 1,961,962 |
private BufferedImage readImage()
throws IOException {
BufferedImage bi = null;
if ( source.getClass() == File.class ) {
String s = ( (File) source ).getName();
String tmp = s.toLowerCase();
if ( tmp.startsWith( "file:" ) ) {
... | BufferedImage function() throws IOException { BufferedImage bi = null; if ( source.getClass() == File.class ) { String s = ( (File) source ).getName(); String tmp = s.toLowerCase(); if ( tmp.startsWith( "file:" ) ) { tmp = s.substring( 6, s.length() ); bi = ImageUtils.loadImage( new java.io.File( tmp ) ); } else if ( t... | /**
* reads an image from its source
*
* @throws IOException
*/ | reads an image from its source | readImage | {
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/model/coverage/grid/ImageGridCoverageReader.java",
"license": "lgpl-2.1",
"size": 16015
} | [
"java.awt.image.BufferedImage",
"java.io.IOException",
"java.io.InputStream",
"org.deegree.framework.util.ImageUtils",
"org.deegree.ogcwebservices.wcs.configuration.File"
] | import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import org.deegree.framework.util.ImageUtils; import org.deegree.ogcwebservices.wcs.configuration.File; | import java.awt.image.*; import java.io.*; import org.deegree.framework.util.*; import org.deegree.ogcwebservices.wcs.configuration.*; | [
"java.awt",
"java.io",
"org.deegree.framework",
"org.deegree.ogcwebservices"
] | java.awt; java.io; org.deegree.framework; org.deegree.ogcwebservices; | 1,257,056 |
public void setPropertiesPersister(PropertiesPersister propertiesPersister) {
this.propertiesPersister =
(propertiesPersister != null ? propertiesPersister : new DefaultPropertiesPersister());
} | void function(PropertiesPersister propertiesPersister) { this.propertiesPersister = (propertiesPersister != null ? propertiesPersister : new DefaultPropertiesPersister()); } | /**
* Set the PropertiesPersister to use for parsing properties files.
* <p>The default is a DefaultPropertiesPersister.
* @see org.springframework.util.DefaultPropertiesPersister
*/ | Set the PropertiesPersister to use for parsing properties files. The default is a DefaultPropertiesPersister | setPropertiesPersister | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/spring/org/springframework/context/support/ReloadableResourceBundleMessageSource.java",
"license": "gpl-2.0",
"size": 22006
} | [
"org.springframework.util.DefaultPropertiesPersister",
"org.springframework.util.PropertiesPersister"
] | import org.springframework.util.DefaultPropertiesPersister; import org.springframework.util.PropertiesPersister; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 1,266,588 |
public static void writeClass(String fileName, byte[] bytes) throws IOException {
try (BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(fileName))) {
out.write(bytes);
}
} | static void function(String fileName, byte[] bytes) throws IOException { try (BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(fileName))) { out.write(bytes); } } | /**
* Write all class bytes to a file.
*
* @param fileName file where the bytes will be written
* @param bytes bytes representing the class
* @throws IOException if we fail to write the class
*/ | Write all class bytes to a file | writeClass | {
"repo_name": "easymock/objenesis",
"path": "exotic/src/main/java/org/objenesis/instantiator/exotic/util/ClassDefinitionUtils.java",
"license": "apache-2.0",
"size": 5921
} | [
"java.io.BufferedOutputStream",
"java.io.FileOutputStream",
"java.io.IOException"
] | import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 706,914 |
public PrivacyState getTradePrivacy() {
return tradePrivacy;
} | PrivacyState function() { return tradePrivacy; } | /**
* Gets the trade {@link PrivacyState}.
*
* @return The privacy state.
*/ | Gets the trade <code>PrivacyState</code> | getTradePrivacy | {
"repo_name": "Major-/apollo",
"path": "game/src/main/org/apollo/game/message/impl/PrivacyOptionMessage.java",
"license": "isc",
"size": 1692
} | [
"org.apollo.game.model.entity.setting.PrivacyState"
] | import org.apollo.game.model.entity.setting.PrivacyState; | import org.apollo.game.model.entity.setting.*; | [
"org.apollo.game"
] | org.apollo.game; | 1,480,781 |
public void addParam(Property p) {
params.add(p);
} | void function(Property p) { params.add(p); } | /**
* Corresponds to <code><antcall></code>'s nested
* <code><param></code> element.
*
* @param p Property
*/ | Corresponds to <code><antcall></code>'s nested <code><param></code> element | addParam | {
"repo_name": "antlibs/ant-contrib",
"path": "src/main/java/net/sf/antcontrib/logic/ForEach.java",
"license": "apache-2.0",
"size": 12912
} | [
"org.apache.tools.ant.taskdefs.Property"
] | import org.apache.tools.ant.taskdefs.Property; | import org.apache.tools.ant.taskdefs.*; | [
"org.apache.tools"
] | org.apache.tools; | 1,005,055 |
public void setAppSearchData(Bundle appSearchData) {
mAppSearchData = appSearchData;
} | void function(Bundle appSearchData) { mAppSearchData = appSearchData; } | /**
* Sets the APP_DATA for legacy SearchDialog use.
* @param appSearchData bundle provided by the app when launching the search dialog
* @hide
*/ | Sets the APP_DATA for legacy SearchDialog use | setAppSearchData | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/android/support/v7/widget/SearchView.java",
"license": "apache-2.0",
"size": 68684
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,833,939 |
public List<League> getLeagueEntryBySummonerId(Long summonerId) {
return getLeagueEntryBySummonerId(new Long[]{summonerId}).get(summonerId.toString());
}
/**
* Queries for leagues of each team ID provided. A maximum of 10 team IDs can be provided.
*
* @param teamIds the IDs of the ... | List<League> function(Long summonerId) { return getLeagueEntryBySummonerId(new Long[]{summonerId}).get(summonerId.toString()); } /** * Queries for leagues of each team ID provided. A maximum of 10 team IDs can be provided. * * @param teamIds the IDs of the teams to lookup * @return a {@link java.util.Map} containing a ... | /**
* Helper function for the {@link #getLeagueEntryBySummonerId(Long...) getLeagueEntryBySummonerId} method when
* only a single summoner ID is provided.
*
* @param summonerId the ID of the summoner to lookup
* @return a {@link java.util.List} of each {@link dto.league.League} the summoner ... | Helper function for the <code>#getLeagueEntryBySummonerId(Long...) getLeagueEntryBySummonerId</code> method when only a single summoner ID is provided | getLeagueEntryBySummonerId | {
"repo_name": "a64adam/ulti",
"path": "src/main/java/api/Ulti.java",
"license": "mit",
"size": 36883
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 715,315 |
public static Boolean getStereo(final Intent request) {
return parseBoolean(request, PARAM_STEREO);
} | static Boolean function(final Intent request) { return parseBoolean(request, PARAM_STEREO); } | /**
* Gets flag of Stereo mode from the specified request.
* @param request Request data
* @return flag of Stereo mode
*/ | Gets flag of Stereo mode from the specified request | getStereo | {
"repo_name": "Onuzimoyr/dAndroid",
"path": "dConnectDevicePlugin/dConnectDeviceTheta/app/src/main/java/org/deviceconnect/android/profile/OmnidirectionalImageProfile.java",
"license": "mit",
"size": 10705
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 785,703 |
Optional<SimpleStockTransaction> stockTransaction();
| Optional<SimpleStockTransaction> stockTransaction(); | /**
* An optional stockTransaction, if the unit is in motion.
*
* @return the optional stock transaction.
*/ | An optional stockTransaction, if the unit is in motion | stockTransaction | {
"repo_name": "gg-net/dwoss",
"path": "api/stock/src/main/java/eu/ggnet/dwoss/stock/api/SimpleStockUnit.java",
"license": "gpl-3.0",
"size": 2126
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 306,742 |
@Override
public boolean hasNewUnorderedItem(LineItemReceivingDocument rlDoc){
boolean itemAdded = false;
for(LineItemReceivingItem rlItem: (List<LineItemReceivingItem>)rlDoc.getItems()){
if( PurapConstants.ItemTypeCodes.ITEM_TYPE_UNORDERED_ITEM_CODE.equals(rlItem.getItemType... | boolean function(LineItemReceivingDocument rlDoc){ boolean itemAdded = false; for(LineItemReceivingItem rlItem: (List<LineItemReceivingItem>)rlDoc.getItems()){ if( PurapConstants.ItemTypeCodes.ITEM_TYPE_UNORDERED_ITEM_CODE.equals(rlItem.getItemTypeCode()) && !StringUtils.isEmpty(rlItem.getItemReasonAddedCode()) ){ item... | /**
* Checks the item list for newly added items.
*
* @param rlDoc
* @return
*/ | Checks the item list for newly added items | hasNewUnorderedItem | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/purap/document/service/impl/ReceivingServiceImpl.java",
"license": "apache-2.0",
"size": 45711
} | [
"java.util.List",
"org.apache.commons.lang.StringUtils",
"org.kuali.kfs.module.purap.PurapConstants",
"org.kuali.kfs.module.purap.businessobject.LineItemReceivingItem",
"org.kuali.kfs.module.purap.document.LineItemReceivingDocument"
] | import java.util.List; import org.apache.commons.lang.StringUtils; import org.kuali.kfs.module.purap.PurapConstants; import org.kuali.kfs.module.purap.businessobject.LineItemReceivingItem; import org.kuali.kfs.module.purap.document.LineItemReceivingDocument; | import java.util.*; import org.apache.commons.lang.*; import org.kuali.kfs.module.purap.*; import org.kuali.kfs.module.purap.businessobject.*; import org.kuali.kfs.module.purap.document.*; | [
"java.util",
"org.apache.commons",
"org.kuali.kfs"
] | java.util; org.apache.commons; org.kuali.kfs; | 2,610,548 |
@SystemApi
public void removeBlockedRating(TvContentRating rating) {
if (rating == null) {
throw new IllegalArgumentException("rating cannot be null");
}
try {
mService.removeBlockedRating(rating.flattenToString(), mUserId);
} catch (RemoteException e) {
... | void function(TvContentRating rating) { if (rating == null) { throw new IllegalArgumentException(STR); } try { mService.removeBlockedRating(rating.flattenToString(), mUserId); } catch (RemoteException e) { throw new RuntimeException(e); } } | /**
* Removes a user blocked content rating.
*
* @param rating The content rating to unblock.
* @see #isRatingBlocked
* @see #addBlockedRating
* @hide
*/ | Removes a user blocked content rating | removeBlockedRating | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/media/java/android/media/tv/TvInputManager.java",
"license": "gpl-3.0",
"size": 72558
} | [
"android.os.RemoteException"
] | import android.os.RemoteException; | import android.os.*; | [
"android.os"
] | android.os; | 1,604,179 |
@Override
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
MessagePull info = (MessagePull) o;
super.looseMarshal(wireFormat, o, dataOut);
looseMarshalCachedObject(wireFormat, info.getConsumerId(), dataOut);
looseMarshalCache... | void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { MessagePull info = (MessagePull) o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, info.getConsumerId(), dataOut); looseMarshalCachedObject(wireFormat, info.getDestination(), dataOut); looseMars... | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | looseMarshal | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/MessagePullMarshaller.java",
"license": "apache-2.0",
"size": 5862
} | [
"java.io.DataOutput",
"java.io.IOException",
"org.apache.activemq.openwire.codec.OpenWireFormat",
"org.apache.activemq.openwire.commands.MessagePull"
] | import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.MessagePull; | import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 380,657 |
public static void show(
final Activity activity,
final String groupId) {
new JoinAppGroupDialog(activity).show(groupId);
} | static void function( final Activity activity, final String groupId) { new JoinAppGroupDialog(activity).show(groupId); } | /**
* Shows an {@link JoinAppGroupDialog} to join a group with the passed in Id, using
* the passed in activity. No callback will be invoked.
*
* @param activity Activity hosting the dialog
* @param groupId Id of the group to join
*/ | Shows an <code>JoinAppGroupDialog</code> to join a group with the passed in Id, using the passed in activity. No callback will be invoked | show | {
"repo_name": "carlesls2/sitappandroidv1",
"path": "prova/facebook/src/com/facebook/share/widget/JoinAppGroupDialog.java",
"license": "lgpl-3.0",
"size": 5970
} | [
"android.app.Activity"
] | import android.app.Activity; | import android.app.*; | [
"android.app"
] | android.app; | 1,188,420 |
public void doData(StaplerResponse rsp) throws IOException {
rsp.setContentType("application/javascript");
rsp.getWriter().println("downloadService.post('test',{'hello':"+hashCode()+"})");
} | void function(StaplerResponse rsp) throws IOException { rsp.setContentType(STR); rsp.getWriter().println(STR+hashCode()+"})"); } | /**
* This is where the browser should hit to retrieve data.
*/ | This is where the browser should hit to retrieve data | doData | {
"repo_name": "ErikVerheul/jenkins",
"path": "test/src/test/java/hudson/model/DownloadServiceTest.java",
"license": "mit",
"size": 8245
} | [
"java.io.IOException",
"org.kohsuke.stapler.StaplerResponse"
] | import java.io.IOException; import org.kohsuke.stapler.StaplerResponse; | import java.io.*; import org.kohsuke.stapler.*; | [
"java.io",
"org.kohsuke.stapler"
] | java.io; org.kohsuke.stapler; | 2,085,675 |
public final void enforceAutoCommit(boolean autoCommit) throws SQLException {
final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
if (isTraceOn && tc.isEntryEnabled())
Tr.entry(this, tc, "enforceAutoCommit", autoCommit);
// Only set values if the requested value ... | final void function(boolean autoCommit) throws SQLException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(this, tc, STR, autoCommit); if (autoCommit != currentAutoCommit helper.alwaysSetAutoCommit()) { if (isTraceOn && tc.isDebugEnabled()) Tr.debug(this... | /**
* Enforce the autoCommit setting in the underlying database and update the current value
* on the MC. This method must be invoked by the Connection handle before doing any work
* on the database.
*
* @param autoCommit Indicates if the autoCommit is true or false.
*
* @throws SQ... | Enforce the autoCommit setting in the underlying database and update the current value on the MC. This method must be invoked by the Connection handle before doing any work on the database | enforceAutoCommit | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java",
"license": "epl-1.0",
"size": 206781
} | [
"com.ibm.websphere.ras.Tr",
"com.ibm.websphere.ras.TraceComponent",
"java.sql.SQLException"
] | import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import java.sql.SQLException; | import com.ibm.websphere.ras.*; import java.sql.*; | [
"com.ibm.websphere",
"java.sql"
] | com.ibm.websphere; java.sql; | 991,663 |
final int NUM_MASTERS = 3;
final int NUM_RS = 3;
// Create config to use for this cluster
Configuration conf = HBaseConfiguration.create();
// Start the cluster
HBaseTestingUtility htu = new HBaseTestingUtility(conf);
htu.startMiniCluster(NUM_MASTERS, NUM_RS);
MiniHBaseCluster cluster = ht... | final int NUM_MASTERS = 3; final int NUM_RS = 3; Configuration conf = HBaseConfiguration.create(); HBaseTestingUtility htu = new HBaseTestingUtility(conf); htu.startMiniCluster(NUM_MASTERS, NUM_RS); MiniHBaseCluster cluster = htu.getHBaseCluster(); List<MasterThread> masterThreads = cluster.getMasterThreads(); for (Mas... | /**
* Simple test of shutdown.
* <p>
* Starts with three masters. Tells the active master to shutdown the cluster.
* Verifies that all masters are properly shutdown.
* @throws Exception
*/ | Simple test of shutdown. Starts with three masters. Tells the active master to shutdown the cluster. Verifies that all masters are properly shutdown | testMasterShutdown | {
"repo_name": "juwi/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterShutdown.java",
"license": "apache-2.0",
"size": 5509
} | [
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.ClusterStatus",
"org.apache.hadoop.hbase.HBaseConfiguration",
"org.apache.hadoop.hbase.HBaseTestingUtility",
"org.apache.hadoop.hbase.MiniHBaseCluster",
"org.apache.hadoop.hbase.util.JVMClusterUtil",
"org.junit.Assert"
... | import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.ClusterStatus; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.MiniHBaseCluster; import org.apache.hadoop.hbase.util.JVMClusterUtil; im... | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.util; org.apache.hadoop; org.junit; | 1,972,627 |
public void deleteComment(WorkflowComment comment) throws DotDataException; | void function(WorkflowComment comment) throws DotDataException; | /**
* deletes a specific comment on a workflow item
*
* @param comment
* @throws DotDataException
*/ | deletes a specific comment on a workflow item | deleteComment | {
"repo_name": "zhiqinghuang/core",
"path": "src/com/dotmarketing/portlets/workflows/business/WorkflowAPI.java",
"license": "gpl-3.0",
"size": 9608
} | [
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.portlets.workflows.model.WorkflowComment"
] | import com.dotmarketing.exception.DotDataException; import com.dotmarketing.portlets.workflows.model.WorkflowComment; | import com.dotmarketing.exception.*; import com.dotmarketing.portlets.workflows.model.*; | [
"com.dotmarketing.exception",
"com.dotmarketing.portlets"
] | com.dotmarketing.exception; com.dotmarketing.portlets; | 1,164,238 |
private boolean isContextual(Method method) {
Class[] list = method.getParameterTypes();
if(list.length == 1) {
return Map.class.equals(list[0]);
}
return false;
} | boolean function(Method method) { Class[] list = method.getParameterTypes(); if(list.length == 1) { return Map.class.equals(list[0]); } return false; } | /**
* This is used to determine whether the annotated method takes a
* contextual object. If the method takes a <code>Map</code> then
* this returns true, otherwise it returns false.
*
* @param method this is the method to check the parameters of
*
* @return this returns true if the method t... | This is used to determine whether the annotated method takes a contextual object. If the method takes a <code>Map</code> then this returns true, otherwise it returns false | isContextual | {
"repo_name": "glorycloud/GloryMail",
"path": "CloudyMail/lib_src/org/simpleframework/xml/core/ClassScanner.java",
"license": "apache-2.0",
"size": 19862
} | [
"java.lang.reflect.Method",
"java.util.Map"
] | import java.lang.reflect.Method; import java.util.Map; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,500,515 |
public static Intent createIntent(final Repository repository,
final String base, final String head) {
Builder builder = new Builder("commits.compare.VIEW");
builder.add(EXTRA_BASE, base);
builder.add(EXTRA_HEAD, head);
builder.repo(repository);
return builder.toI... | static Intent function(final Repository repository, final String base, final String head) { Builder builder = new Builder(STR); builder.add(EXTRA_BASE, base); builder.add(EXTRA_HEAD, head); builder.repo(repository); return builder.toIntent(); } private Repository repository; private AvatarLoader avatars; private Fragme... | /**
* Create intent for this activity
*
* @param repository
* @param base
* @param head
* @return intent
*/ | Create intent for this activity | createIntent | {
"repo_name": "Yifei0727/GitHub-Client-md",
"path": "app/src/main/java/com/github/mobile/ui/commit/CommitCompareViewActivity.java",
"license": "apache-2.0",
"size": 3525
} | [
"android.content.Intent",
"android.support.v4.app.Fragment",
"com.github.mobile.Intents",
"com.github.mobile.util.AvatarLoader",
"org.eclipse.egit.github.core.Repository"
] | import android.content.Intent; import android.support.v4.app.Fragment; import com.github.mobile.Intents; import com.github.mobile.util.AvatarLoader; import org.eclipse.egit.github.core.Repository; | import android.content.*; import android.support.v4.app.*; import com.github.mobile.*; import com.github.mobile.util.*; import org.eclipse.egit.github.core.*; | [
"android.content",
"android.support",
"com.github.mobile",
"org.eclipse.egit"
] | android.content; android.support; com.github.mobile; org.eclipse.egit; | 1,012,050 |
public String encrypt() throws BlobCrypterException {
Map<String, String> values = buildValuesMap();
return container + ':' + crypter.wrap(values);
} | String function() throws BlobCrypterException { Map<String, String> values = buildValuesMap(); return container + ':' + crypter.wrap(values); } | /**
* Encrypt and sign the token. The returned value is *not* web safe, it should be URL
* encoded before being used as a form parameter.
*/ | Encrypt and sign the token. The returned value is *not* web safe, it should be URL encoded before being used as a form parameter | encrypt | {
"repo_name": "inevo/shindig-1.1-BETA5-incubating",
"path": "java/common/src/main/java/org/apache/shindig/auth/BlobCrypterSecurityToken.java",
"license": "apache-2.0",
"size": 6211
} | [
"java.util.Map",
"org.apache.shindig.common.crypto.BlobCrypterException"
] | import java.util.Map; import org.apache.shindig.common.crypto.BlobCrypterException; | import java.util.*; import org.apache.shindig.common.crypto.*; | [
"java.util",
"org.apache.shindig"
] | java.util; org.apache.shindig; | 1,895,388 |
public static void appendStringToFile(final String text, final String fileName,
final int bufSize, final Charset charset) {
checkFileName(fileName);
final File file = new File(fileName);
if (!file.isFile()) { // does not exist
try {
file.createNewFile();
} catch (final Exception ... | static void function(final String text, final String fileName, final int bufSize, final Charset charset) { checkFileName(fileName); final File file = new File(fileName); if (!file.isFile()) { try { file.createNewFile(); } catch (final Exception e) { throw new RuntimeException(STR + fileName + LS + e); } } try (Buffered... | /**
* Appends a String to a file using a BufferedWriter, bufSize and Charset. If
* fileName does not exist, this creates a new empty file of that name. This
* closes the file after appending.
*
* @param text is the source String.
* @param fileName the given fileName
* @param bufSize if less than 81... | Appends a String to a file using a BufferedWriter, bufSize and Charset. If fileName does not exist, this creates a new empty file of that name. This closes the file after appending | appendStringToFile | {
"repo_name": "DataSketches/DataSketches.github.io",
"path": "src/main/java/org/apache/datasketches/Files.java",
"license": "apache-2.0",
"size": 37488
} | [
"java.io.BufferedWriter",
"java.io.File",
"java.io.IOException",
"java.io.PrintWriter",
"java.nio.charset.Charset"
] | import java.io.BufferedWriter; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,832,602 |
public List<CoordinatePair> placeShip(int x, int y, Ship s, Direction dir) {
boolean placementOK = true;
x = x+1;
y = y+1;
List<CoordinatePair> liste = new ArrayList<CoordinatePair>();
System.out.println("placing ship");
if (dir == Direction.HORIZONTAL) // Left to Right
{
for (int i = x; i < x+s.getF... | List<CoordinatePair> function(int x, int y, Ship s, Direction dir) { boolean placementOK = true; x = x+1; y = y+1; List<CoordinatePair> liste = new ArrayList<CoordinatePair>(); System.out.println(STR); if (dir == Direction.HORIZONTAL) { for (int i = x; i < x+s.getFields(); i++) { if (!checkSurrounding(i, y)) System.out... | /**
* Places a Ship on the Board
* Returns false if not placeable
* @param x
* @param y
* @param s
* @param dir
* @return
*/ | Places a Ship on the Board Returns false if not placeable | placeShip | {
"repo_name": "guusdk/Spark",
"path": "plugins/battleships/src/main/java/battleship/logic/GameBoard.java",
"license": "apache-2.0",
"size": 3831
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,494,653 |
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
{
this.fontRendererObj.drawString(this.inventory.getInventoryName(), this.xSize / 3 - this.fontRendererObj.getStringWidth(this.inventory.getInventoryName()) / 2, 4, 4210752);
this.fontRendererObj.drawString(I18n.for... | void function(int p_146979_1_, int p_146979_2_) { this.fontRendererObj.drawString(this.inventory.getInventoryName(), this.xSize / 3 - this.fontRendererObj.getStringWidth(this.inventory.getInventoryName()) / 2, 4, 4210752); this.fontRendererObj.drawString(I18n.format(STR, new Object[0]), 8, this.ySize - 96 + 2, 4210752)... | /**
* Draw the foreground layer for the GuiContainer (everything in front of the items)
*/ | Draw the foreground layer for the GuiContainer (everything in front of the items) | drawGuiContainerForegroundLayer | {
"repo_name": "Sudwood/AdvancedUtilities",
"path": "java/com/sudwood/advancedutilities/client/gui/GuiBag.java",
"license": "mit",
"size": 2430
} | [
"net.minecraft.client.resources.I18n"
] | import net.minecraft.client.resources.I18n; | import net.minecraft.client.resources.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 635,213 |
@Test(enabled = true, dataProvider = "QueryTests", groups = { "api","noproxy" })
@QueryFile(list = {})
public void testRESTExternalPUT(String query) throws YADAResponseException, YADAQueryConfigurationException, YADAExecutionException
{
Service svc = prepareTest(query);
YADARequest yadaReq = svc.getYADA... | @Test(enabled = true, dataProvider = STR, groups = { "api",STR }) @QueryFile(list = {}) void function(String query) throws YADAResponseException, YADAQueryConfigurationException, YADAExecutionException { Service svc = prepareTest(query); YADARequest yadaReq = svc.getYADARequest(); yadaReq.setMethod(new String[] {YADARe... | /**
* Tests execution of a REST query using YADA as a proxy, and using HTTP PUT
*
* @param query the query to execute
* @throws YADAQueryConfigurationException when request creation fails
* @throws JSONException when the result does not conform
* @throws YADAResponseException when the test result is i... | Tests execution of a REST query using YADA as a proxy, and using HTTP PUT | testRESTExternalPUT | {
"repo_name": "Novartis/YADA",
"path": "yada-api/src/test/java/com/novartis/opensource/yada/test/ServiceTest.java",
"license": "apache-2.0",
"size": 90877
} | [
"com.novartis.opensource.yada.Service",
"com.novartis.opensource.yada.YADAExecutionException",
"com.novartis.opensource.yada.YADAQueryConfigurationException",
"com.novartis.opensource.yada.YADARequest",
"com.novartis.opensource.yada.format.YADAResponseException",
"org.testng.Assert",
"org.testng.annotat... | import com.novartis.opensource.yada.Service; import com.novartis.opensource.yada.YADAExecutionException; import com.novartis.opensource.yada.YADAQueryConfigurationException; import com.novartis.opensource.yada.YADARequest; import com.novartis.opensource.yada.format.YADAResponseException; import org.testng.Assert; impor... | import com.novartis.opensource.yada.*; import com.novartis.opensource.yada.format.*; import org.testng.*; import org.testng.annotations.*; | [
"com.novartis.opensource",
"org.testng",
"org.testng.annotations"
] | com.novartis.opensource; org.testng; org.testng.annotations; | 1,976,986 |
public void init(ApplicationConnection connection,
PushConfigurationState pushConfigurationState,
CommunicationErrorHandler errorHandler); | void function(ApplicationConnection connection, PushConfigurationState pushConfigurationState, CommunicationErrorHandler errorHandler); | /**
* Two-phase construction to allow using GWT.create().
*
* @param connection
* The ApplicationConnection
*/ | Two-phase construction to allow using GWT.create() | init | {
"repo_name": "Flamenco/vaadin",
"path": "client/src/com/vaadin/client/communication/PushConnection.java",
"license": "apache-2.0",
"size": 3923
} | [
"com.vaadin.client.ApplicationConnection",
"com.vaadin.shared.ui.ui.UIState"
] | import com.vaadin.client.ApplicationConnection; import com.vaadin.shared.ui.ui.UIState; | import com.vaadin.client.*; import com.vaadin.shared.ui.ui.*; | [
"com.vaadin.client",
"com.vaadin.shared"
] | com.vaadin.client; com.vaadin.shared; | 2,158,341 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<ResourceSkuInner> listAsync(String filter) {
return new PagedFlux<>(() -> listSinglePageAsync(filter), nextLink -> listNextSinglePageAsync(nextLink));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ResourceSkuInner> function(String filter) { return new PagedFlux<>(() -> listSinglePageAsync(filter), nextLink -> listNextSinglePageAsync(nextLink)); } | /**
* Gets the list of Microsoft.Compute SKUs available for your Subscription.
*
* @param filter The filter to apply on the operation. Only **location** filter is supported currently.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thro... | Gets the list of Microsoft.Compute SKUs available for your Subscription | listAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ResourceSkusClientImpl.java",
"license": "mit",
"size": 14877
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.compute.fluent.models.ResourceSkuInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.compute.fluent.models.ResourceSkuInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 379,062 |
protected PlanningSet getFragmentsHelper(Collection<DrillbitEndpoint> activeEndpoints, Fragment rootFragment) throws ExecutionSetupException {
PlanningSet planningSet = new PlanningSet();
initFragmentWrappers(rootFragment, planningSet);
final Set<Wrapper> leafFragments = constructFragmentDependencyGrap... | PlanningSet function(Collection<DrillbitEndpoint> activeEndpoints, Fragment rootFragment) throws ExecutionSetupException { PlanningSet planningSet = new PlanningSet(); initFragmentWrappers(rootFragment, planningSet); final Set<Wrapper> leafFragments = constructFragmentDependencyGraph(planningSet); for (Wrapper wrapper ... | /**
* Helper method to reuse the code for QueryWorkUnit(s) generation
* @param activeEndpoints
* @param rootFragment
* @return
* @throws ExecutionSetupException
*/ | Helper method to reuse the code for QueryWorkUnit(s) generation | getFragmentsHelper | {
"repo_name": "shakamunyi/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/SimpleParallelizer.java",
"license": "apache-2.0",
"size": 16028
} | [
"java.util.Collection",
"java.util.Set",
"org.apache.drill.common.exceptions.ExecutionSetupException",
"org.apache.drill.exec.proto.CoordinationProtos"
] | import java.util.Collection; import java.util.Set; import org.apache.drill.common.exceptions.ExecutionSetupException; import org.apache.drill.exec.proto.CoordinationProtos; | import java.util.*; import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.proto.*; | [
"java.util",
"org.apache.drill"
] | java.util; org.apache.drill; | 1,170,961 |
public static String getPathForBranch(State state, String path, int numBranches, int branchId) {
Preconditions.checkNotNull(state);
Preconditions.checkNotNull(path);
Preconditions.checkArgument(numBranches >= 0, "The number of branches is expected to be non-negative");
Preconditions.checkArgument(bran... | static String function(State state, String path, int numBranches, int branchId) { Preconditions.checkNotNull(state); Preconditions.checkNotNull(path); Preconditions.checkArgument(numBranches >= 0, STR); Preconditions.checkArgument(branchId >= 0, STR); return numBranches > 1 ? path + Path.SEPARATOR + state.getProp(Confi... | /**
* Get a new path with the given branch name as a sub directory.
*
* @param numBranches number of branches (non-negative)
* @param branchId branch id (non-negative)
* @return a new path
*/ | Get a new path with the given branch name as a sub directory | getPathForBranch | {
"repo_name": "liyinan926/gobblin",
"path": "gobblin-utility/src/main/java/gobblin/util/ForkOperatorUtils.java",
"license": "apache-2.0",
"size": 4342
} | [
"com.google.common.base.Preconditions",
"org.apache.hadoop.fs.Path"
] | import com.google.common.base.Preconditions; import org.apache.hadoop.fs.Path; | import com.google.common.base.*; import org.apache.hadoop.fs.*; | [
"com.google.common",
"org.apache.hadoop"
] | com.google.common; org.apache.hadoop; | 2,078,906 |
protected void processLog() throws IOException {
final List tempFiles = new LinkedList();
try {
// check if it's a directory
if (!super.agent.pathIsFile(fullyQualifiedResultPath)) {
reportLogPathIsNotFile();
return;
}
// get log and make an archive copy
final St... | void function() throws IOException { final List tempFiles = new LinkedList(); try { if (!super.agent.pathIsFile(fullyQualifiedResultPath)) { reportLogPathIsNotFile(); return; } final String archiveFileName = archiveManager.makeNewLogFileNameOnly(); final File archiveFile = archiveManager.fileNameToLogPath(archiveFileNa... | /**
* Concrete processing.
*
* @throws IOException
*/ | Concrete processing | processLog | {
"repo_name": "simeshev/parabuild-ci",
"path": "src/org/parabuild/ci/build/log/CheckstyleLogHandler.java",
"license": "lgpl-3.0",
"size": 5298
} | [
"java.io.File",
"java.io.IOException",
"java.util.LinkedList",
"java.util.List",
"org.dom4j.Document",
"org.dom4j.io.SAXReader",
"org.parabuild.ci.common.IoUtils",
"org.parabuild.ci.common.StringUtils",
"org.parabuild.ci.common.XMLUtils",
"org.parabuild.ci.object.BuildRunAttribute",
"org.parabui... | import java.io.File; import java.io.IOException; import java.util.LinkedList; import java.util.List; import org.dom4j.Document; import org.dom4j.io.SAXReader; import org.parabuild.ci.common.IoUtils; import org.parabuild.ci.common.StringUtils; import org.parabuild.ci.common.XMLUtils; import org.parabuild.ci.object.Build... | import java.io.*; import java.util.*; import org.dom4j.*; import org.dom4j.io.*; import org.parabuild.ci.common.*; import org.parabuild.ci.object.*; | [
"java.io",
"java.util",
"org.dom4j",
"org.dom4j.io",
"org.parabuild.ci"
] | java.io; java.util; org.dom4j; org.dom4j.io; org.parabuild.ci; | 251,296 |
public static void privateEndpointConnectionsList(
com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager manager) {
manager
.iotDpsResources()
.listPrivateEndpointConnectionsWithResponse("myResourceGroup", "myFirstProvisioningService", Context.NONE);
} | static void function( com.azure.resourcemanager.deviceprovisioningservices.IotDpsManager manager) { manager .iotDpsResources() .listPrivateEndpointConnectionsWithResponse(STR, STR, Context.NONE); } | /**
* Sample code: PrivateEndpointConnections_List.
*
* @param manager Entry point to IotDpsManager.
*/ | Sample code: PrivateEndpointConnections_List | privateEndpointConnectionsList | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/src/samples/java/com/azure/resourcemanager/deviceprovisioningservices/generated/IotDpsResourceListPrivateEndpointConnectionsSamples.java",
"license": "mit",
"size": 1034
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 175,340 |
private void putTimePropertiesInContext(Context context, SessionState state, String timeName,
String month, String day, String year, String hour, String min) {
// get the submission level of close date setting
context.put("name_" + timeName + "Month", month);
context.put("name_" + timeName + "Day"... | void function(Context context, SessionState state, String timeName, String month, String day, String year, String hour, String min) { context.put("name_" + timeName + "Month", month); context.put("name_" + timeName + "Day", day); context.put("name_" + timeName + "Year", year); context.put("name_" + timeName + "Hour", h... | /**
* put related time information into context variable
* @param context
* @param state
* @param timeName
* @param month
* @param day
* @param year
* @param hour
* @param min
*/ | put related time information into context variable | putTimePropertiesInContext | {
"repo_name": "lorenamgUMU/sakai",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 677150
} | [
"org.sakaiproject.cheftool.Context",
"org.sakaiproject.event.api.SessionState"
] | import org.sakaiproject.cheftool.Context; import org.sakaiproject.event.api.SessionState; | import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event"
] | org.sakaiproject.cheftool; org.sakaiproject.event; | 868,536 |
Call<ResponseBody> patch302Async(Boolean booleanValue, final ServiceCallback<Void> serviceCallback); | Call<ResponseBody> patch302Async(Boolean booleanValue, final ServiceCallback<Void> serviceCallback); | /**
* Patch true Boolean value in request returns 302. This request should not be automatically redirected, but should return the received 302 to the caller for evaluation
*
* @param booleanValue Simple boolean value true
* @param serviceCallback the async ServiceCallback to handle successful and f... | Patch true Boolean value in request returns 302. This request should not be automatically redirected, but should return the received 302 to the caller for evaluation | patch302Async | {
"repo_name": "BretJohnson/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/http/HttpRedirects.java",
"license": "mit",
"size": 11914
} | [
"com.microsoft.rest.ServiceCallback",
"com.squareup.okhttp.ResponseBody"
] | import com.microsoft.rest.ServiceCallback; import com.squareup.okhttp.ResponseBody; | import com.microsoft.rest.*; import com.squareup.okhttp.*; | [
"com.microsoft.rest",
"com.squareup.okhttp"
] | com.microsoft.rest; com.squareup.okhttp; | 1,907,920 |
public TrimResult trimFields(
LogicalTableFunctionScan tabFun,
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields) {
final RelDataType rowType = tabFun.getRowType();
final int fieldCount = rowType.getFieldCount();
final List<RelNode> newInputs = new ArrayList<>();
for (Re... | TrimResult function( LogicalTableFunctionScan tabFun, ImmutableBitSet fieldsUsed, Set<RelDataTypeField> extraFields) { final RelDataType rowType = tabFun.getRowType(); final int fieldCount = rowType.getFieldCount(); final List<RelNode> newInputs = new ArrayList<>(); for (RelNode input : tabFun.getInputs()) { final int ... | /**
* Variant of {@link #trimFields(RelNode, ImmutableBitSet, Set)} for
* {@link org.apache.calcite.rel.logical.LogicalTableFunctionScan}.
*/ | Variant of <code>#trimFields(RelNode, ImmutableBitSet, Set)</code> for <code>org.apache.calcite.rel.logical.LogicalTableFunctionScan</code> | trimFields | {
"repo_name": "apache/calcite",
"path": "core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java",
"license": "apache-2.0",
"size": 50751
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.Set",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.logical.LogicalTableFunctionScan",
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.rel.type.RelDataTypeField",
"org.apache.calcite.util.Immutabl... | import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.logical.LogicalTableFunctionScan; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeField; import org.ap... | import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.logical.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.util.*; import org.apache.calcite.util.mapping.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 91,276 |
public void verifyAndCreateRemoteLogDir() {
boolean logPermError = true;
// Checking the existence of the TLD
FileSystem remoteFS = null;
try {
remoteFS = getFileSystem(conf);
} catch (IOException e) {
throw new YarnRuntimeException(
"Unable to get Remote FileSystem instance"... | void function() { boolean logPermError = true; FileSystem remoteFS = null; try { remoteFS = getFileSystem(conf); } catch (IOException e) { throw new YarnRuntimeException( STR, e); } boolean remoteExists = true; Path remoteRootLogDir = getRemoteRootLogDir(); try { FsPermission perms = remoteFS.getFileStatus(remoteRootLo... | /**
* Verify and create the remote log directory.
*/ | Verify and create the remote log directory | verifyAndCreateRemoteLogDir | {
"repo_name": "szegedim/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/filecontroller/LogAggregationFileController.java",
"license": "apache-2.0",
"size": 18253
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.permission.FsPermission",
"org.apache.hadoop.security.UserGroupInformation",
"org.apache.hadoop.yarn.exceptions.YarnRuntimeException"
] | import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.yarn.exceptions.YarnRuntimeException; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.security.*; import org.apache.hadoop.yarn.exceptions.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,313,764 |
public static boolean isForServiceNamespace(Service s, Operation op) {
return s.hasOption(ServiceOption.URI_NAMESPACE_OWNER)
&& !op.getUri().getPath().equals(s.getSelfLink());
} | static boolean function(Service s, Operation op) { return s.hasOption(ServiceOption.URI_NAMESPACE_OWNER) && !op.getUri().getPath().equals(s.getSelfLink()); } | /**
* Returns value indicating whether the request targets the service itself,
* or, if ServiceOption.URI_NAMESPACE_OWNER is set, and does not match the self link,
* targets portion the name space
*/ | Returns value indicating whether the request targets the service itself, or, if ServiceOption.URI_NAMESPACE_OWNER is set, and does not match the self link, targets portion the name space | isForServiceNamespace | {
"repo_name": "toliaqat/xenon",
"path": "xenon-common/src/main/java/com/vmware/xenon/common/ServiceHost.java",
"license": "apache-2.0",
"size": 246752
} | [
"com.vmware.xenon.common.Service"
] | import com.vmware.xenon.common.Service; | import com.vmware.xenon.common.*; | [
"com.vmware.xenon"
] | com.vmware.xenon; | 2,030,968 |
@Adaptive
ObjectInput deserialize(URL url, InputStream input) throws IOException; | ObjectInput deserialize(URL url, InputStream input) throws IOException; | /**
* create deserializer
* @param url
* @param input
* @return deserializer
* @throws IOException
*/ | create deserializer | deserialize | {
"repo_name": "nince-wyj/jahhan",
"path": "frameworkx/dubbo-common/src/main/java/net/jahhan/spi/Serialization.java",
"license": "apache-2.0",
"size": 1812
} | [
"java.io.IOException",
"java.io.InputStream",
"net.jahhan.com.alibaba.dubbo.common.serialize.ObjectInput"
] | import java.io.IOException; import java.io.InputStream; import net.jahhan.com.alibaba.dubbo.common.serialize.ObjectInput; | import java.io.*; import net.jahhan.com.alibaba.dubbo.common.serialize.*; | [
"java.io",
"net.jahhan.com"
] | java.io; net.jahhan.com; | 1,045,008 |
public Scheduler getScheduler() throws SchedulerException {
if (cfg == null) {
initialize();
}
SchedulerRepository schedRep = SchedulerRepository.getInstance();
Scheduler sched = schedRep.lookup(getSchedulerName());
if (sched != null) {
if (sched.is... | Scheduler function() throws SchedulerException { if (cfg == null) { initialize(); } SchedulerRepository schedRep = SchedulerRepository.getInstance(); Scheduler sched = schedRep.lookup(getSchedulerName()); if (sched != null) { if (sched.isShutdown()) { schedRep.remove(getSchedulerName()); } else { return sched; } } sche... | /**
* <p>
* Returns a handle to the Scheduler produced by this factory.
* </p>
*
* <p>
* If one of the <code>initialize</code> methods has not be previously
* called, then the default (no-arg) <code>initialize()</code> method
* will be called by this method.
* </p>
*/ | Returns a handle to the Scheduler produced by this factory. If one of the <code>initialize</code> methods has not be previously called, then the default (no-arg) <code>initialize()</code> method will be called by this method. | getScheduler | {
"repo_name": "zhongfuhua/tsp-quartz",
"path": "tsp-quartz-parent/tsp-quartz-core/src/main/java/org/quartz/impl/StdSchedulerFactory.java",
"license": "apache-2.0",
"size": 65309
} | [
"org.quartz.Scheduler",
"org.quartz.SchedulerException"
] | import org.quartz.Scheduler; import org.quartz.SchedulerException; | import org.quartz.*; | [
"org.quartz"
] | org.quartz; | 1,618,978 |
private void setupEventBusCommandPublisher(String topic) {
if (StringUtils.isBlank(topic)) {
logger.trace("No topic defined for Event Bus Command Publisher");
return;
}
try {
logger.debug("Setting up Event Bus Command Publisher for topic {}", topic);
... | void function(String topic) { if (StringUtils.isBlank(topic)) { logger.trace(STR); return; } try { logger.debug(STR, topic); commandPublisher = new MqttMessagePublisher(brokerName + ":" + topic + STR); mqttService.registerMessageProducer(brokerName, commandPublisher); } catch (Exception e) { logger.warn(STR, e.getMessa... | /**
* Initialize publisher which publishes all openHAB commands to the given
* MQTT topic.
*
* @param topic
* to subscribe to
*/ | Initialize publisher which publishes all openHAB commands to the given MQTT topic | setupEventBusCommandPublisher | {
"repo_name": "falkena/openhab",
"path": "bundles/binding/org.openhab.binding.mqtt/src/main/java/org/openhab/binding/mqtt/internal/MqttEventBusBinding.java",
"license": "epl-1.0",
"size": 12842
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 145,746 |
private XrefType createXRef(String database, String id) {
XrefType xref = new XrefType();
DbReferenceType primaryRef = new DbReferenceType();
primaryRef.setDb(database);
primaryRef.setId(id);
xref.setPrimaryRef(primaryRef);
return xref;
} | XrefType function(String database, String id) { XrefType xref = new XrefType(); DbReferenceType primaryRef = new DbReferenceType(); primaryRef.setDb(database); primaryRef.setId(id); xref.setPrimaryRef(primaryRef); return xref; } | /**
* Creates a Primary Reference.
*
* @param database Database.
* @param id ID String.
* @return Castor XRef object
*/ | Creates a Primary Reference | createXRef | {
"repo_name": "cytoscape/psi-mi",
"path": "impl/src/main/java/org/cytoscape/psi_mi/internal/data_mapper/MapInteractionsToPsiOne.java",
"license": "lgpl-2.1",
"size": 15359
} | [
"org.cytoscape.psi_mi.internal.schema.mi1.DbReferenceType",
"org.cytoscape.psi_mi.internal.schema.mi1.XrefType"
] | import org.cytoscape.psi_mi.internal.schema.mi1.DbReferenceType; import org.cytoscape.psi_mi.internal.schema.mi1.XrefType; | import org.cytoscape.psi_mi.internal.schema.mi1.*; | [
"org.cytoscape.psi_mi"
] | org.cytoscape.psi_mi; | 2,218,870 |
public static void exit(int errorCode) {
boolean testMode = Boolean.getBoolean(PropertiesConfig.TEST_MODE);
if (testMode)
addErrorCode(errorCode);
else
System.exit(errorCode);
} | static void function(int errorCode) { boolean testMode = Boolean.getBoolean(PropertiesConfig.TEST_MODE); if (testMode) addErrorCode(errorCode); else System.exit(errorCode); } | /**
* Wrapper to call system exit making class easier to test.
* @param errorCode
*/ | Wrapper to call system exit making class easier to test | exit | {
"repo_name": "afshinhm-ericsson/eiffel-remrem-generate",
"path": "src/main/java/com/ericsson/eiffel/remrem/generate/cli/CLIOptions.java",
"license": "apache-2.0",
"size": 6404
} | [
"com.ericsson.eiffel.remrem.generate.config.PropertiesConfig"
] | import com.ericsson.eiffel.remrem.generate.config.PropertiesConfig; | import com.ericsson.eiffel.remrem.generate.config.*; | [
"com.ericsson.eiffel"
] | com.ericsson.eiffel; | 676,207 |
public static FormulaAst op(String opName, List<FormulaAst> children) {
return new FormulaAst(Type.OP, children, opName);
} | static FormulaAst function(String opName, List<FormulaAst> children) { return new FormulaAst(Type.OP, children, opName); } | /**
* An OP node representing the given operator/function with the given
* arguments.
*
* @param opName the name of the operator/function
* @param children the node children
* @return the new node
*/ | An OP node representing the given operator/function with the given arguments | op | {
"repo_name": "diirt/diirt",
"path": "pvmanager/datasource-formula/src/main/java/org/diirt/datasource/formula/FormulaAst.java",
"license": "mit",
"size": 12231
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 780,953 |
public AccountInfo getAccountInfo() throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException; | AccountInfo function() throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException; | /**
* Get account info
*
* @return the AccountInfo object, null if some sort of error occurred. Implementers should log the error.
* @throws ExchangeException - Indication that the exchange reported some kind of error with the request or response
* @throws NotAvailableFromExchangeException - Indication ... | Get account info | getAccountInfo | {
"repo_name": "sutra/XChange",
"path": "xchange-core/src/main/java/com/xeiam/xchange/service/polling/account/PollingAccountService.java",
"license": "mit",
"size": 3852
} | [
"com.xeiam.xchange.dto.account.AccountInfo",
"com.xeiam.xchange.exceptions.ExchangeException",
"com.xeiam.xchange.exceptions.NotAvailableFromExchangeException",
"com.xeiam.xchange.exceptions.NotYetImplementedForExchangeException",
"java.io.IOException"
] | import com.xeiam.xchange.dto.account.AccountInfo; import com.xeiam.xchange.exceptions.ExchangeException; import com.xeiam.xchange.exceptions.NotAvailableFromExchangeException; import com.xeiam.xchange.exceptions.NotYetImplementedForExchangeException; import java.io.IOException; | import com.xeiam.xchange.dto.account.*; import com.xeiam.xchange.exceptions.*; import java.io.*; | [
"com.xeiam.xchange",
"java.io"
] | com.xeiam.xchange; java.io; | 2,456,382 |
public boolean hasLinksTo() {
return Base.has(this.model, this.getResource(), LINKSTO);
} | boolean function() { return Base.has(this.model, this.getResource(), LINKSTO); } | /**
* Check if org.ontoware.rdfreactor.generator.java.JProperty@3764253e has at
* least one value set
*
* @return true if this property has at least one value
*
* [Generated from RDFReactor template rule #get0has-dynamic]
*/ | Check if org.ontoware.rdfreactor.generator.java.JProperty@3764253e has at least one value set | hasLinksTo | {
"repo_name": "m0ep/master-thesis",
"path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java",
"license": "mit",
"size": 317844
} | [
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdfreactor"
] | org.ontoware.rdfreactor; | 1,083,783 |
TeleportType getTeleportType();
interface TeleporterCauseBuilder<T extends TeleportCause, B extends TeleporterCauseBuilder<T, B>> extends ResettableBuilder<T, B> { | TeleportType getTeleportType(); interface TeleporterCauseBuilder<T extends TeleportCause, B extends TeleporterCauseBuilder<T, B>> extends ResettableBuilder<T, B> { | /**
* Gets the type of the teleport.
*
* @return The type of teleport
*/ | Gets the type of the teleport | getTeleportType | {
"repo_name": "JBYoshi/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/cause/entity/teleport/TeleportCause.java",
"license": "mit",
"size": 2577
} | [
"org.spongepowered.api.util.ResettableBuilder"
] | import org.spongepowered.api.util.ResettableBuilder; | import org.spongepowered.api.util.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 1,802,740 |
private String editProfileFilterCli(ControlApiCliThriftClient cli, String profileFilterId, String profileSchemaId, String applicationName, String tenantName, String endpointGroupId, boolean createOut) throws UnsupportedEncodingException {
cliOut.reset();
boolean create = strIsEmpty(profileFilterId);... | String function(ControlApiCliThriftClient cli, String profileFilterId, String profileSchemaId, String applicationName, String tenantName, String endpointGroupId, boolean createOut) throws UnsupportedEncodingException { cliOut.reset(); boolean create = strIsEmpty(profileFilterId); int result = -1; if (create) { if (strI... | /**
* Edits/Creates the profile filter from cli.
*
* @param cli the control cli client
* @param profileFilterId the profile filter id (if null new profile filter will be created)
* @param profileSchemaId the profile schema id
* @param endpointGroupId the endpoint group Id
* @param cre... | Edits/Creates the profile filter from cli | editProfileFilterCli | {
"repo_name": "vzhukovskyi/kaa",
"path": "server/control/src/test/java/org/kaaproject/kaa/server/control/cli/ControlServerCliIT.java",
"license": "apache-2.0",
"size": 86146
} | [
"java.io.UnsupportedEncodingException",
"org.junit.Assert"
] | import java.io.UnsupportedEncodingException; import org.junit.Assert; | import java.io.*; import org.junit.*; | [
"java.io",
"org.junit"
] | java.io; org.junit; | 1,356,434 |
public Observable<ServiceResponse<Page<ProductInner>>> getOdataMultiplePagesNextSinglePageAsync(final String nextPageLink, final String clientRequestId, final PagingGetOdataMultiplePagesOptionsInner pagingGetOdataMultiplePagesOptions) {
if (nextPageLink == null) {
throw new IllegalArgumentExcept... | Observable<ServiceResponse<Page<ProductInner>>> function(final String nextPageLink, final String clientRequestId, final PagingGetOdataMultiplePagesOptionsInner pagingGetOdataMultiplePagesOptions) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } Validator.validate(pagingGetOdataMultiplePagesOptio... | /**
* A paging operation that includes a nextLink in odata format that has 10 pages.
*
ServiceResponse<PageImpl1<ProductInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
ServiceResponse<PageImpl1<ProductInner>> * @param clientRequestId the String value
... | A paging operation that includes a nextLink in odata format that has 10 pages | getOdataMultiplePagesNextSinglePageAsync | {
"repo_name": "tbombach/autorest",
"path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/paging/implementation/PagingsInner.java",
"license": "mit",
"size": 168428
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse",
"com.microsoft.rest.Validator"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,192,935 |
public List getOOXMLObjects()
{
return ooxmlObjects;
} | List function() { return ooxmlObjects; } | /**
* returns the list of OOXML objects which are external or auxillary to the main workbook
* e.g. theme, doc properties
*
* @return
*/ | returns the list of OOXML objects which are external or auxillary to the main workbook e.g. theme, doc properties | getOOXMLObjects | {
"repo_name": "Maxels88/openxls",
"path": "src/main/java/org/openxls/formats/XLS/WorkBook.java",
"license": "gpl-3.0",
"size": 107715
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 14,060 |
public Future<CommandResult> getApsTxUcastSuccessAsync() {
return read(attributes.get(ATTR_APSTXUCASTSUCCESS));
} | Future<CommandResult> function() { return read(attributes.get(ATTR_APSTXUCASTSUCCESS)); } | /**
* Get the <i>APSTxUcastSuccess</i> attribute [attribute ID <b>265</b>].
* <p>
* The attribute is of type {@link Integer}.
* <p>
* The implementation of this attribute by a device is MANDATORY
*
* @return the {@link Future<CommandResult>} command result future
*/ | Get the APSTxUcastSuccess attribute [attribute ID 265]. The attribute is of type <code>Integer</code>. The implementation of this attribute by a device is MANDATORY | getApsTxUcastSuccessAsync | {
"repo_name": "cschwer/com.zsmartsystems.zigbee",
"path": "com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/ZclDiagnosticsCluster.java",
"license": "epl-1.0",
"size": 61548
} | [
"com.zsmartsystems.zigbee.CommandResult",
"java.util.concurrent.Future"
] | import com.zsmartsystems.zigbee.CommandResult; import java.util.concurrent.Future; | import com.zsmartsystems.zigbee.*; import java.util.concurrent.*; | [
"com.zsmartsystems.zigbee",
"java.util"
] | com.zsmartsystems.zigbee; java.util; | 2,554,922 |
public LayoutAnimationController getLayoutAnimation() {
return mLayoutAnimationController;
} | LayoutAnimationController function() { return mLayoutAnimationController; } | /**
* Returns the layout animation controller used to animate the group's
* children.
*
* @return the current animation controller
*/ | Returns the layout animation controller used to animate the group's children | getLayoutAnimation | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/core/java/android/view/ViewGroup.java",
"license": "gpl-3.0",
"size": 275692
} | [
"android.view.animation.LayoutAnimationController"
] | import android.view.animation.LayoutAnimationController; | import android.view.animation.*; | [
"android.view"
] | android.view; | 729,374 |
static PropertyType fromRawValue(int rawValue) {
for (PropertyType type : PropertyType.values()) {
if (type.m_rawValue == rawValue) {
return type;
}
}
throw new IllegalArgumentException("unexptected raw value: " +
... | static PropertyType fromRawValue(int rawValue) { for (PropertyType type : PropertyType.values()) { if (type.m_rawValue == rawValue) { return type; } } throw new IllegalArgumentException(STR + rawValue); } private PropertyType(int rawValue) { m_rawValue = rawValue; } private final int m_rawValue; } public static final c... | /**
* Utility method for converting from c/c++ based integer enums to java
* enums.<p>
*
* This method is intended to be used from JNI and my change based on
* implementation needs.
*
* @param rawValue an integer based enum value (as defined by assimp)
... | Utility method for converting from c/c++ based integer enums to java enums. This method is intended to be used from JNI and my change based on implementation needs | fromRawValue | {
"repo_name": "ivansoban/ILEngine",
"path": "thirdparty/assimp/port/jassimp/jassimp/src/jassimp/AiMaterial.java",
"license": "mit",
"size": 33891
} | [
"java.nio.ByteBuffer",
"java.nio.ByteOrder"
] | import java.nio.ByteBuffer; import java.nio.ByteOrder; | import java.nio.*; | [
"java.nio"
] | java.nio; | 907,537 |
public Constructor getConstructor() {
return ctor;
} | Constructor function() { return ctor; } | /**
* The constructor
* @return
*/ | The constructor | getConstructor | {
"repo_name": "gijsleussink/ceylon",
"path": "compiler-java/src/com/redhat/ceylon/compiler/java/codegen/CtorDelegation.java",
"license": "apache-2.0",
"size": 4731
} | [
"com.redhat.ceylon.model.typechecker.model.Constructor"
] | import com.redhat.ceylon.model.typechecker.model.Constructor; | import com.redhat.ceylon.model.typechecker.model.*; | [
"com.redhat.ceylon"
] | com.redhat.ceylon; | 2,057,493 |
@Test
public void structured_extra_end() throws Exception {
//@formatter:off
String string =
"BEGIN:COMP1\r\n" +
"PROP:value\r\n" +
"END:COMP2\r\n" +
"END:COMP1\r\n";
//@formatter:on
for (SyntaxStyle style : SyntaxStyle.values()) {
VObjectReader reader = reader(string, style);
VObjectDataList... | void function() throws Exception { String string = STR + STR + STR + STR; for (SyntaxStyle style : SyntaxStyle.values()) { VObjectReader reader = reader(string, style); VObjectDataListenerMock listener = spy(new VObjectDataListenerMock()); reader.parse(listener); InOrder inorder = inOrder(listener); inorder.verify(list... | /**
* Asserts that a warning should be thrown when an unmatched END property is
* found.
*/ | Asserts that a warning should be thrown when an unmatched END property is found | structured_extra_end | {
"repo_name": "mangstadt/vinnie",
"path": "src/test/java/com/github/mangstadt/vinnie/io/VObjectReaderTest.java",
"license": "apache-2.0",
"size": 58280
} | [
"com.github.mangstadt.vinnie.SyntaxStyle",
"com.github.mangstadt.vinnie.VObjectProperty",
"org.mockito.InOrder",
"org.mockito.Matchers",
"org.mockito.Mockito"
] | import com.github.mangstadt.vinnie.SyntaxStyle; import com.github.mangstadt.vinnie.VObjectProperty; import org.mockito.InOrder; import org.mockito.Matchers; import org.mockito.Mockito; | import com.github.mangstadt.vinnie.*; import org.mockito.*; | [
"com.github.mangstadt",
"org.mockito"
] | com.github.mangstadt; org.mockito; | 1,910,950 |
public static DataCastManager getInstance() throws CastException {
if (null == sInstance) {
LOGE(TAG, "No DataCastManager instance was initialized, you need to " +
"call initialize() first");
throw new CastException();
}
return sInstance;
}
... | static DataCastManager function() throws CastException { if (null == sInstance) { LOGE(TAG, STR + STR); throw new CastException(); } return sInstance; } /** * Returns the initialized instance of this class. If it is not initialized yet, a * {@link CastException} will be thrown. The {@link Context} that is passed as the... | /**
* Returns the initialized instance of this class. If it is not initialized yet, a
* {@link CastException} will be thrown.
*
* @see initialze()
* @return
* @throws CastException
*/ | Returns the initialized instance of this class. If it is not initialized yet, a <code>CastException</code> will be thrown | getInstance | {
"repo_name": "leonelfolmer/CastAndroid",
"path": "CastCompanionLibrary/src/com/google/sample/castcompanionlibrary/cast/DataCastManager.java",
"license": "mit",
"size": 23539
} | [
"android.content.Context",
"com.google.sample.castcompanionlibrary.cast.exceptions.CastException"
] | import android.content.Context; import com.google.sample.castcompanionlibrary.cast.exceptions.CastException; | import android.content.*; import com.google.sample.castcompanionlibrary.cast.exceptions.*; | [
"android.content",
"com.google.sample"
] | android.content; com.google.sample; | 373,824 |
public Model createAndSetModel() {
Model newValue = new Model();
this.setModel(newValue);
return newValue;
} | Model function() { Model newValue = new Model(); this.setModel(newValue); return newValue; } | /**
* Creates a new instance of {@link Model} and set it to model.
*
* This method is a short version for:
* <code>
* Model model = new Model();
* this.setModel(model); </code>
*
*
*/ | Creates a new instance of <code>Model</code> and set it to model. This method is a short version for: <code> Model model = new Model(); this.setModel(model); </code> | createAndSetModel | {
"repo_name": "micromata/javaapiforkml",
"path": "src/main/java/de/micromata/opengis/kml/v_2_2_0/gx/Track.java",
"license": "bsd-3-clause",
"size": 18468
} | [
"de.micromata.opengis.kml.v_2_2_0.Model"
] | import de.micromata.opengis.kml.v_2_2_0.Model; | import de.micromata.opengis.kml.v_2_2_0.*; | [
"de.micromata.opengis"
] | de.micromata.opengis; | 529,132 |
@Override
protected List<T> readData() {
List<T> result;
Properties props;
result = new ArrayList<>();
// loads properties
try {
props = new Properties();
props.load(m_Input.getAbsolutePath());
}
catch (Exception e) {
getLogger().log(Level.SEVERE, "Failed to read d... | List<T> function() { List<T> result; Properties props; result = new ArrayList<>(); try { props = new Properties(); props.load(m_Input.getAbsolutePath()); } catch (Exception e) { getLogger().log(Level.SEVERE, STR + m_Input, e); props = new Properties(); } result.add((T) Report.parseProperties(props)); return result; } | /**
* Performs the actual reading.
*
* @return the reports that were read
*/ | Performs the actual reading | readData | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/data/io/input/AbstractSimpleReportReader.java",
"license": "gpl-3.0",
"size": 3200
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.logging.Level"
] | import java.util.ArrayList; import java.util.List; import java.util.logging.Level; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 2,385,866 |
public String getKeyForNode(MemcachedNode node, int repetition) {
// Carrried over from the DefaultKetamaNodeLocatorConfiguration:
// Internal Using the internal map retrieve the socket addresses
// for given nodes.
// I'm aware that this code is inherently thread-unsafe as
/... | String function(MemcachedNode node, int repetition) { String nodeKey = nodeKeys.get(node); if (nodeKey == null) { switch(this.format) { case LIBMEMCACHED: InetSocketAddress address = (InetSocketAddress)node.getSocketAddress(); nodeKey = address.getHostName(); if (address.getPort() != 11211) { nodeKey += ":" + address.g... | /**
* Returns a uniquely identifying key, suitable for hashing by the
* KetamaNodeLocator algorithm.
*
* @param node The MemcachedNode to use to form the unique identifier
* @param repetition The repetition number for the particular node in question
* (0 is the first repetition)
... | Returns a uniquely identifying key, suitable for hashing by the KetamaNodeLocator algorithm | getKeyForNode | {
"repo_name": "HubSpot/java-memcached-client",
"path": "src/main/java/net/spy/memcached/KetamaNodeKeyFormatter.java",
"license": "mit",
"size": 5167
} | [
"java.net.InetSocketAddress"
] | import java.net.InetSocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 937,129 |
InsnList pushReturnValue(); | InsnList pushReturnValue(); | /**
* Generate code to capture the current stack as a return value into the thread. Expects thread on the stack.
*/ | Generate code to capture the current stack as a return value into the thread. Expects thread on the stack | pushReturnValue | {
"repo_name": "markusheiden/serialthreads",
"path": "src/main/java/org/serialthreads/transformer/code/IValueCode.java",
"license": "gpl-3.0",
"size": 3921
} | [
"org.objectweb.asm.tree.InsnList"
] | import org.objectweb.asm.tree.InsnList; | import org.objectweb.asm.tree.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 1,313,391 |
public final int doFinal(byte[] input, int inOff, int inLen, byte[] output,
int outOff) throws ShortBufferException, IllegalBlockSizeException,
BadPaddingException {
if (output.length < getOutputSize(inLen)) {
throw new ShortBufferException("Output buffer too short.");
}
byte[] out = doFinal(inp... | final int function(byte[] input, int inOff, int inLen, byte[] output, int outOff) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException { if (output.length < getOutputSize(inLen)) { throw new ShortBufferException(STR); } byte[] out = doFinal(input, inOff, inLen); System.arraycopy(out, 0, output, o... | /**
* Finish a multiple-part encryption or decryption operation (depending on
* how this cipher was initialized).
*
* @param input
* the input buffer
* @param inOff
* the offset where the input starts
* @param inLen
* the input l... | Finish a multiple-part encryption or decryption operation (depending on how this cipher was initialized) | doFinal | {
"repo_name": "sharebookproject/AndroidPQCrypto",
"path": "MCElieceProject/Flexiprovider/src/main/java/de/flexiprovider/api/AsymmetricBlockCipher.java",
"license": "gpl-3.0",
"size": 21203
} | [
"de.flexiprovider.api.exceptions.BadPaddingException",
"de.flexiprovider.api.exceptions.IllegalBlockSizeException",
"de.flexiprovider.api.exceptions.ShortBufferException"
] | import de.flexiprovider.api.exceptions.BadPaddingException; import de.flexiprovider.api.exceptions.IllegalBlockSizeException; import de.flexiprovider.api.exceptions.ShortBufferException; | import de.flexiprovider.api.exceptions.*; | [
"de.flexiprovider.api"
] | de.flexiprovider.api; | 2,617,095 |
public Set<String> getPlannedNodes() {
return plannedNodes;
} | Set<String> function() { return plannedNodes; } | /**
* Get cluster nodes to include in job planning. Services not in the set should not be included in job planning,
* with a null value indicating that all nodes should be included in planning.
*
* @return Cluster nodes to be included in job planning.
*/ | Get cluster nodes to include in job planning. Services not in the set should not be included in job planning, with a null value indicating that all nodes should be included in planning | getPlannedNodes | {
"repo_name": "awholegunch/loom",
"path": "server/src/main/java/com/continuuity/loom/scheduler/task/ClusterJob.java",
"license": "apache-2.0",
"size": 8823
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 179,831 |
public static String lookupConstantFieldValue(Class<?> clazz, String name) {
if (clazz == null) {
return null;
}
// remove leading dots
if (name.startsWith(",")) {
name = name.substring(1);
}
for (Field field : clazz.getFields()) {
... | static String function(Class<?> clazz, String name) { if (clazz == null) { return null; } if (name.startsWith(",")) { name = name.substring(1); } for (Field field : clazz.getFields()) { if (field.getName().equals(name)) { try { Object v = field.get(null); return v.toString(); } catch (IllegalAccessException e) { return... | /**
* Lookup the constant field on the given class with the given name
*
* @param clazz the class
* @param name the name of the field to lookup
* @return the value of the constant field, or <tt>null</tt> if not found
*/ | Lookup the constant field on the given class with the given name | lookupConstantFieldValue | {
"repo_name": "RohanHart/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java",
"license": "apache-2.0",
"size": 73945
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,675,506 |
public static KeyValue createFirstOnRow(final byte [] row,
final int roffset, final int rlength, final byte [] family,
final int foffset, final int flength, final byte [] qualifier,
final int qoffset, final int qlength) {
return new KeyValue(row, roffset, rlength, family,
foffset, flengt... | static KeyValue function(final byte [] row, final int roffset, final int rlength, final byte [] family, final int foffset, final int flength, final byte [] qualifier, final int qoffset, final int qlength) { return new KeyValue(row, roffset, rlength, family, foffset, flength, qualifier, qoffset, qlength, HConstants.LATE... | /**
* Create a KeyValue for the specified row, family and qualifier that would be
* smaller than all other possible KeyValues that have the same row,
* family, qualifier.
* Used for seeking.
* @param row row key
* @param roffset row offset
* @param rlength row length
* @param family family name
... | Create a KeyValue for the specified row, family and qualifier that would be smaller than all other possible KeyValues that have the same row, family, qualifier. Used for seeking | createFirstOnRow | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java",
"license": "apache-2.0",
"size": 25785
} | [
"org.apache.hadoop.hbase.KeyValue"
] | import org.apache.hadoop.hbase.KeyValue; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,825,188 |
public String getSubject()
{
return annot.getString( COSName.SUBJ );
} | String function() { return annot.getString( COSName.SUBJ ); } | /**
* Get the description of the annotation.
*
* @return The subject of the annotation.
*/ | Get the description of the annotation | getSubject | {
"repo_name": "myrridin/qz-print",
"path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/fdf/FDFAnnotation.java",
"license": "lgpl-2.1",
"size": 15414
} | [
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 992,228 |
public void setLogWriter(PrintWriter out) throws ResourceException
{
logwriter = out;
} | void function(PrintWriter out) throws ResourceException { logwriter = out; } | /**
* Sets the log writer for this ManagedConnection instance.
*
* @param out Character Output stream to be associated
* @throws ResourceException generic exception if operation fails
*/ | Sets the log writer for this ManagedConnection instance | setLogWriter | {
"repo_name": "jandsu/ironjacamar",
"path": "testsuite/src/test/java/org/ironjacamar/rars/txlog/TxLogManagedConnection.java",
"license": "epl-1.0",
"size": 15134
} | [
"java.io.PrintWriter",
"javax.resource.ResourceException"
] | import java.io.PrintWriter; import javax.resource.ResourceException; | import java.io.*; import javax.resource.*; | [
"java.io",
"javax.resource"
] | java.io; javax.resource; | 2,725,689 |
@Test void testAliasUnnestMultipleArrays() {
// for accessing a field in STRUCT type unnested from array
sql("select e.ENAME\n"
+ "from dept_nested_expanded as d CROSS JOIN\n"
+ " UNNEST(d.employees) as t(e)")
.withConformance(SqlConformanceEnum.PRESTO).columnType("VARCHAR(10) NOT NULL... | @Test void testAliasUnnestMultipleArrays() { sql(STR + STR + STR) .withConformance(SqlConformanceEnum.PRESTO).columnType(STR); sql(STRunit\STRX\STRY\"\n" + STR + STR) .withConformance(SqlConformanceEnum.PRESTO).ok(); sql(STR + STR + STR) .withConformance(SqlConformanceEnum.PRESTO) .fails(STR); sql(STR + STR + STR) .wit... | /**
* Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-3789">[CALCITE-3789]
* Support validation of UNNEST multiple array columns like Presto</a>.
*/ | Test case for [CALCITE-3789] Support validation of UNNEST multiple array columns like Presto | testAliasUnnestMultipleArrays | {
"repo_name": "apache/calcite",
"path": "core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java",
"license": "apache-2.0",
"size": 521238
} | [
"org.apache.calcite.sql.validate.SqlConformanceEnum",
"org.junit.jupiter.api.Test"
] | import org.apache.calcite.sql.validate.SqlConformanceEnum; import org.junit.jupiter.api.Test; | import org.apache.calcite.sql.validate.*; import org.junit.jupiter.api.*; | [
"org.apache.calcite",
"org.junit.jupiter"
] | org.apache.calcite; org.junit.jupiter; | 196,453 |
public boolean putAndMoveToFirst( final K k, final boolean v ) {
final K key[] = this.key;
final boolean used[] = this.used;
final int mask = this.mask;
// The starting point.
int pos = ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( strategy.hashCode( (K) (k)) ) ) & mask;
// There's always an unused entry... | boolean function( final K k, final boolean v ) { final K key[] = this.key; final boolean used[] = this.used; final int mask = this.mask; int pos = ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( strategy.hashCode( (K) (k)) ) ) & mask; while( used[ pos ] ) { if ( ( strategy.equals( (k), (K) (key[ pos ]) ) ) ) { final bo... | /** Adds a pair to the map; if the key is already present, it is moved to the first position of the iteration order.
*
* @param k the key.
* @param v the value.
* @return the old value, or the {@linkplain #defaultReturnValue() default return value} if no value was present for the given key.
*/ | Adds a pair to the map; if the key is already present, it is moved to the first position of the iteration order | putAndMoveToFirst | {
"repo_name": "karussell/fastutil",
"path": "src/it/unimi/dsi/fastutil/objects/Object2BooleanLinkedOpenCustomHashMap.java",
"license": "apache-2.0",
"size": 48113
} | [
"it.unimi.dsi.fastutil.HashCommon"
] | import it.unimi.dsi.fastutil.HashCommon; | import it.unimi.dsi.fastutil.*; | [
"it.unimi.dsi"
] | it.unimi.dsi; | 2,116,109 |
void saveReport( ModuleHandle moduleHandle, Object element,
IProgressMonitor monitor ); | void saveReport( ModuleHandle moduleHandle, Object element, IProgressMonitor monitor ); | /**
* Save moduleHandle to the orginal input.
*
* @param moduleHandle
* @param element
* input element.
* @param monitor
*/ | Save moduleHandle to the orginal input | saveReport | {
"repo_name": "Charling-Huang/birt",
"path": "UI/org.eclipse.birt.report.designer.ui.editors/src/org/eclipse/birt/report/designer/ui/editors/IReportProvider.java",
"license": "epl-1.0",
"size": 3069
} | [
"org.eclipse.birt.report.model.api.ModuleHandle",
"org.eclipse.core.runtime.IProgressMonitor"
] | import org.eclipse.birt.report.model.api.ModuleHandle; import org.eclipse.core.runtime.IProgressMonitor; | import org.eclipse.birt.report.model.api.*; import org.eclipse.core.runtime.*; | [
"org.eclipse.birt",
"org.eclipse.core"
] | org.eclipse.birt; org.eclipse.core; | 2,234,714 |
public void sendImageToAllClients(BufferedImage img) {
Debug.out(Type.INFO, CLASS, "Everyone is trying to download a level!");
for(int i = 0; i < connectedPlayers.size() - 1; i++) {
try{
if(imageSocketServer == null) {
imageSocketServer = new ServerSocket(9714);
}
... | void function(BufferedImage img) { Debug.out(Type.INFO, CLASS, STR); for(int i = 0; i < connectedPlayers.size() - 1; i++) { try{ if(imageSocketServer == null) { imageSocketServer = new ServerSocket(9714); } imageSocket = imageSocketServer.accept(); ImageIO.write(img, "PNG", imageSocket.getOutputStream()); } catch(Excep... | /**
* Image sent to all the clients.
* @param img BufferedImage image.
*/ | Image sent to all the clients | sendImageToAllClients | {
"repo_name": "RedInquisitive/Project-Tanks",
"path": "Project Shields/Client/game/net/GameServer.java",
"license": "gpl-3.0",
"size": 24516
} | [
"java.awt.image.BufferedImage",
"java.net.ServerSocket",
"javax.imageio.ImageIO"
] | import java.awt.image.BufferedImage; import java.net.ServerSocket; import javax.imageio.ImageIO; | import java.awt.image.*; import java.net.*; import javax.imageio.*; | [
"java.awt",
"java.net",
"javax.imageio"
] | java.awt; java.net; javax.imageio; | 1,814,881 |
private void buildUpdateMap() {
DSCAlarmBindingConfig config;
for (DSCAlarmBindingProvider prov : providers) {
if (!prov.getItemNames().isEmpty()) {
itemCount = prov.getItemNames().size();
dscAlarmUpdateMap.clear();
for (String iName : pro... | void function() { DSCAlarmBindingConfig config; for (DSCAlarmBindingProvider prov : providers) { if (!prov.getItemNames().isEmpty()) { itemCount = prov.getItemNames().size(); dscAlarmUpdateMap.clear(); for (String iName : prov.getItemNames()) { config = prov.getDSCAlarmBindingConfig(iName); if (config != null) { dscAla... | /**
* Build the Update Items Map
*/ | Build the Update Items Map | buildUpdateMap | {
"repo_name": "mvolaart/openhab",
"path": "bundles/binding/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/internal/DSCAlarmActiveBinding.java",
"license": "epl-1.0",
"size": 49642
} | [
"org.openhab.binding.dscalarm.DSCAlarmBindingConfig",
"org.openhab.binding.dscalarm.DSCAlarmBindingProvider"
] | import org.openhab.binding.dscalarm.DSCAlarmBindingConfig; import org.openhab.binding.dscalarm.DSCAlarmBindingProvider; | import org.openhab.binding.dscalarm.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 1,442,192 |
public void rollback(final Set<String> graphSourceNamesToCloseTxOn); | void function(final Set<String> graphSourceNamesToCloseTxOn); | /**
* Selectively rollback transactions on the specified graphs or the graphs of traversal sources.
*/ | Selectively rollback transactions on the specified graphs or the graphs of traversal sources | rollback | {
"repo_name": "apache/tinkerpop",
"path": "gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GraphManager.java",
"license": "apache-2.0",
"size": 4870
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,541,866 |
Optional<Long> getLong(String path); | Optional<Long> getLong(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 | getLong | {
"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,138 |
public DocumentPropertiesResponse GetDocumentProperties (String name, String storage, String folder) {
Object postBody = null;
// verify required params are set
if(name == null ) {
throw new ApiException(400, "missing required params");
}
// create path and map variables
String resource... | DocumentPropertiesResponse function (String name, String storage, String folder) { Object postBody = null; if(name == null ) { throw new ApiException(400, STR); } String resourcePath = STR; resourcePath = resourcePath.replaceAll("\\*", STR&STR&STR/?STR?STRtoFormat={toFormat}STRformat={format}STR{STRnameSTR}STR[&?]n... | /**
* GetDocumentProperties
* Read document properties.
* @param name String The document name.
* @param storage String The document storage.
* @param folder String The document folder.
* @return DocumentPropertiesResponse
*/ | GetDocumentProperties Read document properties | GetDocumentProperties | {
"repo_name": "asposetaskscloud/Aspose.Tasks_Cloud_SDK_For_Java",
"path": "src/main/java/com/aspose/tasks/api/TasksApi.java",
"license": "mit",
"size": 107115
} | [
"com.aspose.tasks.client.ApiException",
"com.aspose.tasks.model.DocumentPropertiesResponse"
] | import com.aspose.tasks.client.ApiException; import com.aspose.tasks.model.DocumentPropertiesResponse; | import com.aspose.tasks.client.*; import com.aspose.tasks.model.*; | [
"com.aspose.tasks"
] | com.aspose.tasks; | 1,379,784 |
private static void exists() {
if(!newVersion()) return;
Logger.getLogger(Config.class.getName()).log(Level.INFO, "Creando nueva configuración");
f = new File(basePath);
FileManager.deleteFolder(f);
//Crea todos los ficheros base
create(basePath);
... | static void function() { if(!newVersion()) return; Logger.getLogger(Config.class.getName()).log(Level.INFO, STR); f = new File(basePath); FileManager.deleteFolder(f); create(basePath); create(pathAllDTD); create(pathTemp); create(pathShortCuts.replace(STR, STRBOPASTRDSPASTRDSCASTRDSCBSTRDSSASTR.dtdSTR.cssSTR.xslSTR_con... | /**
* Comprueba que existen todos los ficheros y directorios necesarios para el
* uso del programa y los crea en caso contrario.
*/ | Comprueba que existen todos los ficheros y directorios necesarios para el uso del programa y los crea en caso contrario | exists | {
"repo_name": "Elirova/TranscriptorPA",
"path": "source/Config/Config.java",
"license": "gpl-3.0",
"size": 12254
} | [
"java.io.File",
"java.nio.file.Paths",
"java.util.logging.Level",
"java.util.logging.Logger"
] | import java.io.File; import java.nio.file.Paths; import java.util.logging.Level; import java.util.logging.Logger; | import java.io.*; import java.nio.file.*; import java.util.logging.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 1,130,165 |
public Vector<RecordElement> getRecordElements() {
return this.records;
} | Vector<RecordElement> function() { return this.records; } | /**
* Return INTERNAL Vector containing RecordElements. To get a copy of the actual LogRecords use
* getRecordArray().
*
* @return
*/ | Return INTERNAL Vector containing RecordElements. To get a copy of the actual LogRecords use getRecordArray() | getRecordElements | {
"repo_name": "NLeSC/Platinum",
"path": "ptk-core/src/main/java/nl/esciencecenter/ptk/util/logging/RecordingLogHandler.java",
"license": "apache-2.0",
"size": 7834
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,883,566 |
public static StringValue chr(Env env, long value)
{
if (! env.isUnicodeSemantics())
value = value & 0xFF;
StringValue sb = env.createUnicodeBuilder();
sb.append((char) value);
return sb;
} | static StringValue function(Env env, long value) { if (! env.isUnicodeSemantics()) value = value & 0xFF; StringValue sb = env.createUnicodeBuilder(); sb.append((char) value); return sb; } | /**
* converts a number to its character equivalent
*
* @param value the integer value
*
* @return the string equivalent
*/ | converts a number to its character equivalent | chr | {
"repo_name": "TheApacheCats/quercus",
"path": "com/caucho/quercus/lib/string/StringModule.java",
"license": "gpl-2.0",
"size": 152070
} | [
"com.caucho.quercus.env.Env",
"com.caucho.quercus.env.StringValue"
] | import com.caucho.quercus.env.Env; import com.caucho.quercus.env.StringValue; | import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 1,275,556 |
public void DISABLEDtestCompressFull() throws Exception {
assertEquals(339, testTrailerComp.length);
assertEquals(632, testTrailerDecomp.length);
// Compress it using our engine
HDGFLZW lzw = new HDGFLZW();
byte[] comp = lzw.compress(new ByteArrayInputStream(testTrailerDecomp));
... | void function() throws Exception { assertEquals(339, testTrailerComp.length); assertEquals(632, testTrailerDecomp.length); HDGFLZW lzw = new HDGFLZW(); byte[] comp = lzw.compress(new ByteArrayInputStream(testTrailerDecomp)); byte[] decomp = lzw.decompress(new ByteArrayInputStream(comp)); for(int i=0; i<decomp.length; i... | /**
* Gets 160 bytes through then starts going wrong...
* TODO Fix this
*/ | Gets 160 bytes through then starts going wrong... TODO Fix this | DISABLEDtestCompressFull | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/scratchpad/testcases/org/apache/poi/hdgf/TestHDGFLZW.java",
"license": "apache-2.0",
"size": 10520
} | [
"java.io.ByteArrayInputStream"
] | import java.io.ByteArrayInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 608,873 |
public static void setVmType( SearchResultRow row ) throws EucalyptusServiceException {
VmType input = deserializeVmType( row );
if ( input == null ) {
throw new EucalyptusServiceException( "Invalid input" );
}
Set<VmType> newVms = Sets.newTreeSet( );
for ( VmType v : VmTypes.list( ) ) {
... | static void function( SearchResultRow row ) throws EucalyptusServiceException { VmType input = deserializeVmType( row ); if ( input == null ) { throw new EucalyptusServiceException( STR ); } Set<VmType> newVms = Sets.newTreeSet( ); for ( VmType v : VmTypes.list( ) ) { if ( v.getName( ).equals( input.getName( ) ) ) { ne... | /**
* Update VmType by UI input.
*
* @param row
* @throws EucalyptusServiceException
*/ | Update VmType by UI input | setVmType | {
"repo_name": "grze/parentheses",
"path": "clc/modules/www/src/main/java/com/eucalyptus/webui/server/VmTypeWebBackend.java",
"license": "gpl-3.0",
"size": 7988
} | [
"com.eucalyptus.cloud.util.NoSuchMetadataException",
"com.eucalyptus.vmtypes.VmType",
"com.eucalyptus.vmtypes.VmTypes",
"com.eucalyptus.webui.client.service.EucalyptusServiceException",
"com.eucalyptus.webui.client.service.SearchResultRow",
"com.google.common.collect.Sets",
"java.util.Set"
] | import com.eucalyptus.cloud.util.NoSuchMetadataException; import com.eucalyptus.vmtypes.VmType; import com.eucalyptus.vmtypes.VmTypes; import com.eucalyptus.webui.client.service.EucalyptusServiceException; import com.eucalyptus.webui.client.service.SearchResultRow; import com.google.common.collect.Sets; import java.uti... | import com.eucalyptus.cloud.util.*; import com.eucalyptus.vmtypes.*; import com.eucalyptus.webui.client.service.*; import com.google.common.collect.*; import java.util.*; | [
"com.eucalyptus.cloud",
"com.eucalyptus.vmtypes",
"com.eucalyptus.webui",
"com.google.common",
"java.util"
] | com.eucalyptus.cloud; com.eucalyptus.vmtypes; com.eucalyptus.webui; com.google.common; java.util; | 379,553 |
private void sendNotification(String errorResp, String status, String message,
String acUrl, HttpServletRequest req,
HttpServletResponse resp) throws ServletException, IOException {
String redirectURL = IdentityUtil.getServerURL(SAMLSSOCon... | void function(String errorResp, String status, String message, String acUrl, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String redirectURL = IdentityUtil.getServerURL(SAMLSSOConstants.NOTIFICATION_ENDPOINT); String queryParams = "?" + SAMLSSOConstants.STATUS + "=" + URLEnco... | /**
* Prompts user a notification with the status and message
*
* @param req
* @param resp
* @throws ServletException
* @throws IOException
*/ | Prompts user a notification with the status and message | sendNotification | {
"repo_name": "kasungayan/carbon-identity",
"path": "components/sso-saml/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java",
"license": "apache-2.0",
"size": 44994
} | [
"java.io.IOException",
"java.net.URLEncoder",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.wso2.carbon.identity.core.util.IdentityUtil",
"org.wso2.carbon.identity.sso.saml.SAMLSSOConstants"
] | import java.io.IOException; import java.net.URLEncoder; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.wso2.carbon.identity.core.util.IdentityUtil; import org.wso2.carbon.identity.sso.saml.SAMLSSOConstants; | import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import org.wso2.carbon.identity.core.util.*; import org.wso2.carbon.identity.sso.saml.*; | [
"java.io",
"java.net",
"javax.servlet",
"org.wso2.carbon"
] | java.io; java.net; javax.servlet; org.wso2.carbon; | 1,475,834 |
static byte[] toIntegerBytes(BigInteger bigInt) {
int bitlen = bigInt.bitLength();
// round bitlen
bitlen = ((bitlen + 7) >> 3) << 3;
byte[] bigBytes = bigInt.toByteArray();
if (((bigInt.bitLength() % 8) != 0) && (((bigInt.bitLength() / 8) + 1) == (bitlen / 8))) {
... | static byte[] toIntegerBytes(BigInteger bigInt) { int bitlen = bigInt.bitLength(); bitlen = ((bitlen + 7) >> 3) << 3; byte[] bigBytes = bigInt.toByteArray(); if (((bigInt.bitLength() % 8) != 0) && (((bigInt.bitLength() / 8) + 1) == (bitlen / 8))) { return bigBytes; } int startSrc = 0; int len = bigBytes.length; if ((bi... | /**
* Returns a byte-array representation of a <code>BigInteger</code> without sign bit.
*
* @param bigInt
* <code>BigInteger</code> to be converted
* @return a byte array representation of the BigInteger parameter
*/ | Returns a byte-array representation of a <code>BigInteger</code> without sign bit | toIntegerBytes | {
"repo_name": "pperboires/PocDrools",
"path": "drools-core/src/main/java/org/drools/util/codec/Base64.java",
"license": "apache-2.0",
"size": 40495
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 2,277,277 |
public TreeNode parseXMLDocument(String uri, InputSource is)
throws AraneaRuntimeException {
Document document = null;
// Perform an XML parse of this document, via JAXP
try {
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();... | TreeNode function(String uri, InputSource is) throws AraneaRuntimeException { Document document = null; try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); factory.setValidating(validating); DocumentBuilder builder = factory.newDocumentBuilder(); builder.setEnti... | /**
* Parse the specified XML document, and return a <code>TreeNode</code>
* that corresponds to the root node of the document tree.
*
* @param uri URI of the XML document being parsed
* @param is Input source containing the deployment descriptor
*
* @exception AraneaRuntimeExc... | Parse the specified XML document, and return a <code>TreeNode</code> that corresponds to the root node of the document tree | parseXMLDocument | {
"repo_name": "nortal/araneaframework",
"path": "src/org/araneaframework/http/support/ParserUtils.java",
"license": "apache-2.0",
"size": 7102
} | [
"java.io.IOException",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException",
"org.araneaframework.core.AraneaRuntimeException",
"org.w3c.dom.Document",
"org.xml.sax.InputSource",
"org.xml.sax.SAXException",
"org.xml.sax.SAX... | import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.araneaframework.core.AraneaRuntimeException; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXExcepti... | import java.io.*; import javax.xml.parsers.*; import org.araneaframework.core.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.araneaframework.core",
"org.w3c.dom",
"org.xml.sax"
] | java.io; javax.xml; org.araneaframework.core; org.w3c.dom; org.xml.sax; | 2,646,373 |
@Test
public void testMountTableEntriesCacheUpdatedAfterUpdateAPICall()
throws IOException {
// add
String srcPath = "/updatePathSrc";
String dstPath = "/updatePathDest";
String nameServiceId = "ns0";
MountTable newEntry = MountTable.newInstance(srcPath,
Collections.singletonMap("n... | void function() throws IOException { String srcPath = STR; String dstPath = STR; String nameServiceId = "ns0"; MountTable newEntry = MountTable.newInstance(srcPath, Collections.singletonMap("ns0", STR), Time.now(), Time.now()); addMountTableEntry(mountTableManager, newEntry); List<RouterContext> routers = getRouters();... | /**
* updateMountTableEntry API should internally update the cache on all the
* routers.
*/ | updateMountTableEntry API should internally update the cache on all the routers | testMountTableEntriesCacheUpdatedAfterUpdateAPICall | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterMountTableCacheRefreshSecure.java",
"license": "apache-2.0",
"size": 13680
} | [
"java.io.IOException",
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.hdfs.server.federation.MiniRouterDFSCluster",
"org.apache.hadoop.hdfs.server.federation.store.protocol.UpdateMountTableEntryRequest",
"org.apache.hadoop.hdfs.server.federation.store.protocol.UpdateMountTableEntryResponse"... | import java.io.IOException; import java.util.Collections; import java.util.List; import org.apache.hadoop.hdfs.server.federation.MiniRouterDFSCluster; import org.apache.hadoop.hdfs.server.federation.store.protocol.UpdateMountTableEntryRequest; import org.apache.hadoop.hdfs.server.federation.store.protocol.UpdateMountTa... | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.server.federation.*; import org.apache.hadoop.hdfs.server.federation.store.protocol.*; import org.apache.hadoop.hdfs.server.federation.store.records.*; import org.apache.hadoop.util.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.junit; | 1,222,797 |
public ServletRegistration.Dynamic dynamicServletAdded(Wrapper wrapper) {
Servlet s = wrapper.getServlet();
if (s != null && createdServlets.contains(s)) {
// Mark the wrapper to indicate annotations need to be scanned
wrapper.setServletSecurityAnnotationScanRequired(true);
... | ServletRegistration.Dynamic function(Wrapper wrapper) { Servlet s = wrapper.getServlet(); if (s != null && createdServlets.contains(s)) { wrapper.setServletSecurityAnnotationScanRequired(true); } return new ApplicationServletRegistration(wrapper, this); } | /**
* hook to register that we need to scan for security annotations.
* @param wrapper The wrapper for the Servlet that was added
*/ | hook to register that we need to scan for security annotations | dynamicServletAdded | {
"repo_name": "WhiteBearSolutions/WBSAirback",
"path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/catalina/core/StandardContext.java",
"license": "apache-2.0",
"size": 198551
} | [
"javax.servlet.Servlet",
"javax.servlet.ServletRegistration",
"org.apache.catalina.Wrapper"
] | import javax.servlet.Servlet; import javax.servlet.ServletRegistration; import org.apache.catalina.Wrapper; | import javax.servlet.*; import org.apache.catalina.*; | [
"javax.servlet",
"org.apache.catalina"
] | javax.servlet; org.apache.catalina; | 1,555,199 |
public PaddingCallback getPaddingCallback() {
return paddingCallback;
}
| PaddingCallback function() { return paddingCallback; } | /**
* Returns the padding callback, if set, otherwise <code>null</code>.
*
* @return the padding callback, if set, otherwise <code>null</code>.
*/ | Returns the padding callback, if set, otherwise <code>null</code> | getPaddingCallback | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/sankey/SankeyDataset.java",
"license": "apache-2.0",
"size": 34482
} | [
"org.pepstock.charba.client.sankey.callbacks.PaddingCallback"
] | import org.pepstock.charba.client.sankey.callbacks.PaddingCallback; | import org.pepstock.charba.client.sankey.callbacks.*; | [
"org.pepstock.charba"
] | org.pepstock.charba; | 1,529,762 |
protected void doTestStartupWithOldVersion(String igniteVer, boolean compactFooter) throws Exception {
boolean prev = this.compactFooter;
try {
this.compactFooter = compactFooter;
startGrid(1, igniteVer, new ConfigurationClosure(compactFooter), new PostStartupClosure());
... | void function(String igniteVer, boolean compactFooter) throws Exception { boolean prev = this.compactFooter; try { this.compactFooter = compactFooter; startGrid(1, igniteVer, new ConfigurationClosure(compactFooter), new PostStartupClosure()); stopAllGrids(); IgniteEx ignite = startGrid(0); assertEquals(1, ignite.contex... | /**
* Tests opportunity to read data from previous Ignite DB version.
*
* @param igniteVer 3-digits version of ignite
* @throws Exception If failed.
*/ | Tests opportunity to read data from previous Ignite DB version | doTestStartupWithOldVersion | {
"repo_name": "nizhikov/ignite",
"path": "modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/PersistenceBasicCompatibilityTest.java",
"license": "apache-2.0",
"size": 13663
} | [
"org.apache.ignite.internal.IgniteEx"
] | import org.apache.ignite.internal.IgniteEx; | import org.apache.ignite.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,522,115 |
public SortedSet<Pair<T, Integer>> sorted() {
// TODO (jon) change to use an array and Arrays.sort(); | SortedSet<Pair<T, Integer>> function() { | /**
* Returns the histogram in frequency sorted order
*
* @return
*/ | Returns the histogram in frequency sorted order | sorted | {
"repo_name": "anuragphadke/Flume-Hive",
"path": "src/java/com/cloudera/util/Histogram.java",
"license": "apache-2.0",
"size": 3817
} | [
"java.util.SortedSet"
] | import java.util.SortedSet; | import java.util.*; | [
"java.util"
] | java.util; | 548,806 |
public final List listOfImplementedFields(
final IFirstClassEntity firstClassEntity) {
final List results = new ArrayList();
final Iterator iterator =
firstClassEntity.getIteratorOnConstituents(IField.class);
while (iterator.hasNext()) {
final IField field = (IField) iterator.next();
results.... | final List function( final IFirstClassEntity firstClassEntity) { final List results = new ArrayList(); final Iterator iterator = firstClassEntity.getIteratorOnConstituents(IField.class); while (iterator.hasNext()) { final IField field = (IField) iterator.next(); results.add(field); } return results; } | /**
* Returns the attributes defined directly in the class body
*
* @param firstClassEntity
* @return the attributes defined directly in the class body
*/ | Returns the attributes defined directly in the class body | listOfImplementedFields | {
"repo_name": "ptidej/SmellDetectionCaller",
"path": "POM/src/pom/primitives/ClassPrimitives.java",
"license": "gpl-2.0",
"size": 15595
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,119,242 |
void removeInputPort(Port port); | void removeInputPort(Port port); | /**
* Removes a {@link Port} from this ProcessGroup's list of Input Ports.
*
* @param port the Port to remove
* @throws NullPointerException if <code>port</code> is null
* @throws IllegalStateException if port is not an Input Port for this
* ProcessGroup
*/ | Removes a <code>Port</code> from this ProcessGroup's list of Input Ports | removeInputPort | {
"repo_name": "InspurUSA/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java",
"license": "apache-2.0",
"size": 33748
} | [
"org.apache.nifi.connectable.Port"
] | import org.apache.nifi.connectable.Port; | import org.apache.nifi.connectable.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 2,821,265 |
public Observable<ServiceResponse<DiagnosticAnalysisInner>> getSiteAnalysisWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is req... | Observable<ServiceResponse<DiagnosticAnalysisInner>> function(String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (siteName == null) { throw new IllegalArgumentException(STR); } if (diagnosticCategory... | /**
* Get Site Analysis.
* Get Site Analysis.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param siteName Site Name
* @param diagnosticCategory Diagnostic Category
* @param analysisName Analysis Name
* @throws IllegalArgumentException ... | Get Site Analysis. Get Site Analysis | getSiteAnalysisWithServiceResponseAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java",
"license": "mit",
"size": 295384
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,904,760 |
public void handleSetSlot(S2FPacketSetSlot packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
EntityPlayer entityplayer = this.gameController.thePlayer;
if (packetIn.func_149175_c() == -1)
{
entityplayer.inventory.setItemStack(pa... | void function(S2FPacketSetSlot packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); EntityPlayer entityplayer = this.gameController.thePlayer; if (packetIn.func_149175_c() == -1) { entityplayer.inventory.setItemStack(packetIn.func_149174_e()); } else { boolean flag = false; if (this.... | /**
* Handles pickin up an ItemStack or dropping one in your inventory or an open (non-creative) container
*/ | Handles pickin up an ItemStack or dropping one in your inventory or an open (non-creative) container | handleSetSlot | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/client/network/NetHandlerPlayClient.java",
"license": "gpl-3.0",
"size": 95487
} | [
"net.minecraft.client.gui.inventory.GuiContainerCreative",
"net.minecraft.creativetab.CreativeTabs",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack",
"net.minecraft.network.PacketThreadUtil",
"net.minecraft.network.play.server.S2FPacketSetSlot"
] | import net.minecraft.client.gui.inventory.GuiContainerCreative; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.network.PacketThreadUtil; import net.minecraft.network.play.server.S2FPacketSetSlot; | import net.minecraft.client.gui.inventory.*; import net.minecraft.creativetab.*; import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.network.*; import net.minecraft.network.play.server.*; | [
"net.minecraft.client",
"net.minecraft.creativetab",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.network"
] | net.minecraft.client; net.minecraft.creativetab; net.minecraft.entity; net.minecraft.item; net.minecraft.network; | 2,106,806 |
public List<TPstateBean> loadByProjectTypeAndIssueTypes(Integer projectType, List<Integer> issueTypes);
| List<TPstateBean> function(Integer projectType, List<Integer> issueTypes); | /**
* Load TPstateBeans by project types and issueTypes
* @param projectType
* @param issueTypes
* issueTypes
*/ | Load TPstateBeans by project types and issueTypes | loadByProjectTypeAndIssueTypes | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/dao/PStatusDAO.java",
"license": "gpl-3.0",
"size": 2517
} | [
"com.aurel.track.beans.TPstateBean",
"java.util.List"
] | import com.aurel.track.beans.TPstateBean; import java.util.List; | import com.aurel.track.beans.*; import java.util.*; | [
"com.aurel.track",
"java.util"
] | com.aurel.track; java.util; | 2,105,967 |
public boolean getVerbose() {
return verbose;
}
public ClassEnhancer(Set<String> packageNames) {
if (packageNames != null) {
packagePrefixes = new HashSet<String>();
for (String name : packageNames) {
packagePrefixes.add(name + '.');
... | boolean function() { return verbose; } public ClassEnhancer(Set<String> packageNames) { if (packageNames != null) { packagePrefixes = new HashSet<String>(); for (String name : packageNames) { packagePrefixes.add(name + '.'); } } } | /**
* Gets verbose mode.
*
* @see #setVerbose
*/ | Gets verbose mode | getVerbose | {
"repo_name": "djsedulous/namecoind",
"path": "libs/db-4.7.25.NC/java/src/com/sleepycat/persist/model/ClassEnhancer.java",
"license": "mit",
"size": 10812
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,260,463 |
public final Charset charset() {
return cs;
}
/**
* This is a facade method for the decoding operation.
* <p>
* This method decodes the remaining byte sequence of the given byte buffer
* into a new character buffer. This method performs a complete decoding
* operation, rese... | final Charset function() { return cs; } /** * This is a facade method for the decoding operation. * <p> * This method decodes the remaining byte sequence of the given byte buffer * into a new character buffer. This method performs a complete decoding * operation, resets at first, then decodes, and flushes at last. * <p... | /**
* Returns the {@link Charset} which this decoder uses.
*/ | Returns the <code>Charset</code> which this decoder uses | charset | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "libcore/luni/src/main/java/java/nio/charset/CharsetDecoder.java",
"license": "gpl-2.0",
"size": 28393
} | [
"java.nio.CharBuffer"
] | import java.nio.CharBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,855,273 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.