method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public Observable<ServiceResponse<VirtualHubInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscript...
Observable<ServiceResponse<VirtualHubInner>> function(String resourceGroupName, String virtualHubName, VirtualHubInner virtualHubParameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (virtualHub...
/** * Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. * * @param resourceGroupName The resource group name of the VirtualHub. * @param virtualHubName The name of the VirtualHub. * @param virtualHubParameters Parameters supplied to create or update Virtual...
Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub
beginCreateOrUpdateWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_12_01/src/main/java/com/microsoft/azure/management/network/v2018_12_01/implementation/VirtualHubsInner.java", "license": "mit", "size": 72294 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,850,497
public int getCount(String token, String reln) { // System.out.println("getCount " + token + " -- " + reln); if( _counts != null ) { Map<String,Count> relnMap = _counts.get(token); if( relnMap != null ) { // System.out.println(" got relnMap size " + relnMap.size()); Count count...
int function(String token, String reln) { if( _counts != null ) { Map<String,Count> relnMap = _counts.get(token); if( relnMap != null ) { Count count = relnMap.get(reln); if( count == null ) return 0; else return count.occurrences; } else return 0; } else return 0; }
/** * Get the number of times a token and a relation were seen. * Returns zero if token-reln is not found. */
Get the number of times a token and a relation were seen. Returns zero if token-reln is not found
getCount
{ "repo_name": "nchambers/probschemas", "path": "src/main/java/nate/CountVerbDepCorefs.java", "license": "gpl-2.0", "size": 19422 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
547,005
@ServiceMethod(returns = ReturnType.SINGLE) Mono<WhatIfOperationResultInner> whatIfAtManagementGroupScopeAsync( String groupId, String deploymentName, ScopedDeploymentWhatIf parameters);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<WhatIfOperationResultInner> whatIfAtManagementGroupScopeAsync( String groupId, String deploymentName, ScopedDeploymentWhatIf parameters);
/** * Returns changes that will be made by the deployment if executed at the scope of the management group. * * @param groupId The management group ID. * @param deploymentName The name of the deployment. * @param parameters Deployment What-if operation parameters. * @throws IllegalArgument...
Returns changes that will be made by the deployment if executed at the scope of the management group
whatIfAtManagementGroupScopeAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/DeploymentsClient.java", "license": "mit", "size": 209954 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.resources.fluent.models.WhatIfOperationResultInner", "com.azure.resourcemanager.resources.models.ScopedDeploymentWhatIf" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.resources.fluent.models.WhatIfOperationResultInner; import com.azure.resourcemanager.resources.models.ScopedDeploymentWhatIf;
import com.azure.core.annotation.*; import com.azure.resourcemanager.resources.fluent.models.*; import com.azure.resourcemanager.resources.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,429,614
public List<Form> getForms() { return forms; }
List<Form> function() { return forms; }
/** * Get the forms of this Shipment. * * @return List of Form objects */
Get the forms of this Shipment
getForms
{ "repo_name": "EasyPost/easypost-java", "path": "src/main/java/com/easypost/model/Shipment.java", "license": "mit", "size": 29339 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
632,880
public int getTagsSize(long pk) throws SystemException { Object[] finderArgs = new Object[] { pk }; Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_GET_TAGS_SIZE, finderArgs, this); if (count == null) { Session session = null; try { session = openSession(); SQLQuery q = session.c...
int function(long pk) throws SystemException { Object[] finderArgs = new Object[] { pk }; Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_GET_TAGS_SIZE, finderArgs, this); if (count == null) { Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(_SQL_GETTAGSSIZE); q.addSca...
/** * Returns the number of Tags associated with the Question. * * @param pk the primary key of the Question * @return the number of Tags associated with the Question * @throws SystemException if a system exception occurred */
Returns the number of Tags associated with the Question
getTagsSize
{ "repo_name": "p-gebhard/QuickAnswer", "path": "docroot/WEB-INF/src/it/gebhard/qa/service/persistence/QuestionPersistenceImpl.java", "license": "gpl-3.0", "size": 68642 }
[ "com.liferay.portal.kernel.dao.orm.FinderCacheUtil", "com.liferay.portal.kernel.dao.orm.FinderPath", "com.liferay.portal.kernel.dao.orm.QueryPos", "com.liferay.portal.kernel.dao.orm.SQLQuery", "com.liferay.portal.kernel.dao.orm.Session", "com.liferay.portal.kernel.exception.SystemException", "it.gebhard...
import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; import com.liferay.portal.kernel.dao.orm.FinderPath; import com.liferay.portal.kernel.dao.orm.QueryPos; import com.liferay.portal.kernel.dao.orm.SQLQuery; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemExceptio...
import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import it.gebhard.qa.model.impl.*;
[ "com.liferay.portal", "it.gebhard.qa" ]
com.liferay.portal; it.gebhard.qa;
1,769,501
private JTable getMainPanel() { if (table == null) { model = new ScanProgressTableModel(); table = new JTable(); table.setModel(model); table.setRowSelectionAllowed(false); table.setColumnSelectionAllowed(false); ...
JTable function() { if (table == null) { model = new ScanProgressTableModel(); table = new JTable(); table.setModel(model); table.setRowSelectionAllowed(false); table.setColumnSelectionAllowed(false); table.setDoubleBuffered(true); table.getColumnModel().getColumn(0).setPreferredWidth(256); table.getColumnModel().getCo...
/** * Get the main content panel of the dialog * @return the main panel */
Get the main content panel of the dialog
getMainPanel
{ "repo_name": "gsavastano/zaproxy", "path": "src/org/zaproxy/zap/extension/ascan/ScanProgressDialog.java", "license": "apache-2.0", "size": 24834 }
[ "javax.swing.JLabel", "javax.swing.JTable", "javax.swing.table.DefaultTableCellRenderer" ]
import javax.swing.JLabel; import javax.swing.JTable; import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.*; import javax.swing.table.*;
[ "javax.swing" ]
javax.swing;
2,067,545
System.out.println("RecorderMIDlet: starting"); try (DoorSensor doorSensor = new DoorSensor(0, 17, 24, 23); BMP180TemperatureSensor tempSensor = new BMP180TemperatureSensor(); AdaFruitGPSUARTSensor gps = new AdaFruitGPSUARTSensor(); FilePersistentSto...
System.out.println(STR); try (DoorSensor doorSensor = new DoorSensor(0, 17, 24, 23); BMP180TemperatureSensor tempSensor = new BMP180TemperatureSensor(); AdaFruitGPSUARTSensor gps = new AdaFruitGPSUARTSensor(); FilePersistentStore fileStore = new FilePersistentStore(STR); RMSPerisistentStore rmsStore = new RMSPerisisten...
/** * MIDlet lifecycle start method */
MIDlet lifecycle start method
startApp
{ "repo_name": "rodrigorevuelta/raspberry", "path": "oracleCurso/hw4/DataRecorder/src/data/RecorderMidlet.java", "license": "gpl-2.0", "size": 4641 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,782,814
void checkRunExitCodeFail() { checkCompileOk(); checkRunState(RunState.FINISHED); checkExitCode(1); }
void checkRunExitCodeFail() { checkCompileOk(); checkRunState(RunState.FINISHED); checkExitCode(1); }
/** * Check that the program run and finished with a failed exit code */
Check that the program run and finished with a failed exit code
checkRunExitCodeFail
{ "repo_name": "leepc12/BigDataScript", "path": "src/org/bds/test/BdsTest.java", "license": "apache-2.0", "size": 11066 }
[ "org.bds.run.RunState" ]
import org.bds.run.RunState;
import org.bds.run.*;
[ "org.bds.run" ]
org.bds.run;
286,703
@Test public void testRenameMVAttributeKeepOldRdn() throws Exception { LdapConnection connection = IntegrationUtils.getAdminConnection( getService() ); String oldDn = "cn=test1,ou=system"; String newDn = "cn=test2,ou=system"; Dn dn = new Dn( oldDn ); Entry entry = n...
void function() throws Exception { LdapConnection connection = IntegrationUtils.getAdminConnection( getService() ); String oldDn = STR; String newDn = STR; Dn dn = new Dn( oldDn ); Entry entry = new DefaultEntry( getService().getSchemaManager(), dn, STR, STR, STR, STR ); connection.add( entry ); Entry original = connec...
/** * Check that when doing a rename, with a MV RDN, and the deleteOldRdn flag set to false, * we have the previous RDN in the entry. * * @throws Exception */
Check that when doing a rename, with a MV RDN, and the deleteOldRdn flag set to false, we have the previous RDN in the entry
testRenameMVAttributeKeepOldRdn
{ "repo_name": "apache/directory-server", "path": "core-integ/src/test/java/org/apache/directory/server/core/operations/rename/RenameIT.java", "license": "apache-2.0", "size": 13600 }
[ "org.apache.directory.api.ldap.model.entry.Attribute", "org.apache.directory.api.ldap.model.entry.DefaultEntry", "org.apache.directory.api.ldap.model.entry.Entry", "org.apache.directory.api.ldap.model.name.Dn", "org.apache.directory.ldap.client.api.LdapConnection", "org.apache.directory.server.core.integ....
import org.apache.directory.api.ldap.model.entry.Attribute; import org.apache.directory.api.ldap.model.entry.DefaultEntry; import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.name.Dn; import org.apache.directory.ldap.client.api.LdapConnection; import org.apache.directory.s...
import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.name.*; import org.apache.directory.ldap.client.api.*; import org.apache.directory.server.core.integ.*; import org.junit.jupiter.api.*;
[ "org.apache.directory", "org.junit.jupiter" ]
org.apache.directory; org.junit.jupiter;
2,274
public static String findDeviceOfCloudPath(String path) throws Exception { try { String device = null; String output = Command.systemCommand("losetup -a"); if (output != null && output.length()>0) { StringTokenizer _st = new StringTokenizer(output, "\n"); while (_st.hasMor...
static String function(String path) throws Exception { try { String device = null; String output = Command.systemCommand(STR); if (output != null && output.length()>0) { StringTokenizer _st = new StringTokenizer(output, "\n"); while (_st.hasMoreTokens()) { String line = _st.nextToken(); if (line.contains(path)){ device...
/** * Busca el dispositivo /dev/loop asociado a un path de cloud * @param path * @return * @throws Exception */
Busca el dispositivo /dev/loop asociado a un path de cloud
findDeviceOfCloudPath
{ "repo_name": "WhiteBearSolutions/WBSAirback", "path": "src/com/whitebearsolutions/imagine/wbsairback/disk/CloudManager.java", "license": "apache-2.0", "size": 32220 }
[ "com.whitebearsolutions.util.Command", "java.util.StringTokenizer" ]
import com.whitebearsolutions.util.Command; import java.util.StringTokenizer;
import com.whitebearsolutions.util.*; import java.util.*;
[ "com.whitebearsolutions.util", "java.util" ]
com.whitebearsolutions.util; java.util;
1,470,941
protected void setupNavDrawer() { mDrawerLayout = findViewById(R.id.drawer_layout); if (mDrawerLayout == null) { return; } mNavigationView = findViewById(R.id.nav_view); if (mNavigationView != null) { mNavigationView.setCheckedItem(R.id.nav_cocktails); mNavigationView.setNavigationItemSelectedLis...
void function() { mDrawerLayout = findViewById(R.id.drawer_layout); if (mDrawerLayout == null) { return; } mNavigationView = findViewById(R.id.nav_view); if (mNavigationView != null) { mNavigationView.setCheckedItem(R.id.nav_cocktails); mNavigationView.setNavigationItemSelectedListener( menuItem -> { mDrawerLayout.clos...
/** * Sets up the navigation drawer as appropriate. Note that the nav drawer will be * different depending on whether the attendee indicated that they are attending the * event on-site vs. attending remotely. */
Sets up the navigation drawer as appropriate. Note that the nav drawer will be different depending on whether the attendee indicated that they are attending the event on-site vs. attending remotely
setupNavDrawer
{ "repo_name": "Dimowner/TastyCocktails", "path": "app/src/main/java/com/dimowner/tastycocktails/NavigationActivity.java", "license": "apache-2.0", "size": 17513 }
[ "android.os.Build", "android.support.v4.view.GravityCompat", "android.support.v7.app.ActionBarDrawerToggle", "android.view.Gravity" ]
import android.os.Build; import android.support.v4.view.GravityCompat; import android.support.v7.app.ActionBarDrawerToggle; import android.view.Gravity;
import android.os.*; import android.support.v4.view.*; import android.support.v7.app.*; import android.view.*;
[ "android.os", "android.support", "android.view" ]
android.os; android.support; android.view;
1,611,875
public Object getHandle(int iHandleType) throws DBException { Object bookmark = this.getCurrentTable().getHandle(iHandleType); return bookmark; }
Object function(int iHandleType) throws DBException { Object bookmark = this.getCurrentTable().getHandle(iHandleType); return bookmark; }
/** * Get a unique key that can be used to reposition to this record. * @exception DBException File exception. */
Get a unique key that can be used to reposition to this record
getHandle
{ "repo_name": "jbundle/jbundle", "path": "base/base/src/main/java/org/jbundle/base/db/util/HierarchicalTable.java", "license": "gpl-3.0", "size": 14605 }
[ "org.jbundle.model.DBException" ]
import org.jbundle.model.DBException;
import org.jbundle.model.*;
[ "org.jbundle.model" ]
org.jbundle.model;
849,630
@Override public String getText(Object object) { Invoice invoice = (Invoice)object; return getString("_UI_Invoice_type") + " " + invoice.getId(); }
String function(Object object) { Invoice invoice = (Invoice)object; return getString(STR) + " " + invoice.getId(); }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the label text for the adapted class.
getText
{ "repo_name": "ecrit/pharmacy_at", "path": "at.medevit.ecrit.pharmacy_at.model.edit/src-gen/at/medevit/ecrit/pharmacy_at/model/provider/InvoiceItemProvider.java", "license": "epl-1.0", "size": 9659 }
[ "at.medevit.ecrit.pharmacy_at.model.Invoice" ]
import at.medevit.ecrit.pharmacy_at.model.Invoice;
import at.medevit.ecrit.pharmacy_at.model.*;
[ "at.medevit.ecrit" ]
at.medevit.ecrit;
2,570,062
void computeSecondDerivatives(double t, double[] y, double[] yDot, double[] yDDot) throws DerivativeException;
void computeSecondDerivatives(double t, double[] y, double[] yDot, double[] yDDot) throws DerivativeException;
/** Get the current time derivative of the state vector. * @param t current value of the independent <I>time</I> variable * @param y array containing the current value of the state vector * @param yDot array containing the current value of the first derivative * of the state vector * @param yDD...
Get the current time derivative of the state vector
computeSecondDerivatives
{ "repo_name": "haisamido/SFDaaS", "path": "src/org/apache/commons/math/ode/SecondOrderDifferentialEquations.java", "license": "lgpl-3.0", "size": 2947 }
[ "org.apache.commons.math.ode.DerivativeException" ]
import org.apache.commons.math.ode.DerivativeException;
import org.apache.commons.math.ode.*;
[ "org.apache.commons" ]
org.apache.commons;
1,833,362
String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationString.trim(); final String[] components = authorizationString.split("\\s"); if (components.length !...
String authorizationString = request.getHeaderString(STR); if (authorizationString != null && !STR\\s"); if (components.length != 2) { throw new NotAuthorizedException(authenticationType); } final String scheme = components[0]; if (!authenticationType.equalsIgnoreCase(scheme)) { throw new NotAuthorizedException(authent...
/** * Extract a Fernet token from an RFC6750 Authorization header. * * @param request a REST request which may or may not include an RFC6750 Authorization header. * @return a Fernet token or null if no RFC6750 Authorization header is provided. */
Extract a Fernet token from an RFC6750 Authorization header
getAuthorizationToken
{ "repo_name": "l0s/fernet-java8", "path": "fernet-jersey-auth/src/main/java/com/macasaet/fernet/jersey/TokenHeaderUtility.java", "license": "apache-2.0", "size": 2787 }
[ "com.macasaet.fernet.Token", "javax.ws.rs.NotAuthorizedException" ]
import com.macasaet.fernet.Token; import javax.ws.rs.NotAuthorizedException;
import com.macasaet.fernet.*; import javax.ws.rs.*;
[ "com.macasaet.fernet", "javax.ws" ]
com.macasaet.fernet; javax.ws;
549,816
public static String getServiceStatusString(Service svc) { Assert.notNull(svc, "svc argument cannot be null"); return getServiceStatusString(svc.getStatus()); }
static String function(Service svc) { Assert.notNull(svc, STR); return getServiceStatusString(svc.getStatus()); }
/** * Return the human-readable name for a service's status, may be null. * * @param svc a {@link org.opennms.web.element.Service} object. * @return a {@link java.lang.String} object. */
Return the human-readable name for a service's status, may be null
getServiceStatusString
{ "repo_name": "aihua/opennms", "path": "opennms-webapp/src/main/java/org/opennms/web/element/ElementUtil.java", "license": "agpl-3.0", "size": 36051 }
[ "org.springframework.util.Assert" ]
import org.springframework.util.Assert;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
2,055,930
public Set<Tier> getTiers(String tenantDomain) throws APIManagementException { Set<Tier> tiers = new TreeSet<Tier>(new TierNameComparator()); Map<String, Tier> tierMap; if (!APIUtil.isAdvanceThrottlingEnabled()) { PrivilegedCarbonContext.startTenantFlow(); Privileged...
Set<Tier> function(String tenantDomain) throws APIManagementException { Set<Tier> tiers = new TreeSet<Tier>(new TierNameComparator()); Map<String, Tier> tierMap; if (!APIUtil.isAdvanceThrottlingEnabled()) { PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(...
/** * Returns a list of pre-defined # {@link org.wso2.carbon.apimgt.api.model.Tier} in the system. * * @return Set<Tier> */
Returns a list of pre-defined # <code>org.wso2.carbon.apimgt.api.model.Tier</code> in the system
getTiers
{ "repo_name": "bhathiya/test", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/AbstractAPIManager.java", "license": "apache-2.0", "size": 110558 }
[ "java.util.Map", "java.util.Set", "java.util.TreeSet", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.Tier", "org.wso2.carbon.apimgt.api.model.policy.PolicyConstants", "org.wso2.carbon.apimgt.impl.utils.APIUtil", "org.wso2.carbon.apimgt.impl.utils.TierNameCompar...
import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.Tier; import org.wso2.carbon.apimgt.api.model.policy.PolicyConstants; import org.wso2.carbon.apimgt.impl.utils.APIUtil; import org.wso2.carbon.apimgt.im...
import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.api.model.policy.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.context.*; import org.wso2.carbon.utils.multitenancy.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
1,606,975
public ArrayList<IT24ViewItem> getInserts(IDocument document) { ArrayList<IT24ViewItem> itemsAList = new ArrayList<IT24ViewItem>(); if (document == null) { return itemsAList; } // Get the contents of the current active editor String editorText = document.get(); ...
ArrayList<IT24ViewItem> function(IDocument document) { ArrayList<IT24ViewItem> itemsAList = new ArrayList<IT24ViewItem>(); if (document == null) { return itemsAList; } String editorText = document.get(); if (!STR$INSERTSTR ", startLabelIdx); crIdx = editorText.indexOf('\r', startLabelIdx); lfIdx = editorText.indexOf('\...
/** * Finds all the INSERT elements within the current active document * * @param document - document whose text is being parsed * @return ArrayList - contains items. If none found, then it'll be empty. */
Finds all the INSERT elements within the current active document
getInserts
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/basic/ui/com.odcgroup.basic.ui/src/main/java/com/temenos/t24/tools/eclipse/basic/views/ViewManager.java", "license": "epl-1.0", "size": 40008 }
[ "com.temenos.t24.tools.eclipse.basic.utils.StringUtil", "java.util.ArrayList", "org.eclipse.jface.text.IDocument", "org.eclipse.jface.text.Position" ]
import com.temenos.t24.tools.eclipse.basic.utils.StringUtil; import java.util.ArrayList; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.Position;
import com.temenos.t24.tools.eclipse.basic.utils.*; import java.util.*; import org.eclipse.jface.text.*;
[ "com.temenos.t24", "java.util", "org.eclipse.jface" ]
com.temenos.t24; java.util; org.eclipse.jface;
708,762
public static Hashtable getParametersAsHashtable( URI uri ) { if ( uri.getQuery() != null ) { return getParametersAsHashtable( uri.getQuery() ); } return new Hashtable(); }
static Hashtable function( URI uri ) { if ( uri.getQuery() != null ) { return getParametersAsHashtable( uri.getQuery() ); } return new Hashtable(); }
/** * Returns a Hashtable of name-value pairs from the query portion of the * given URI. * * <p>This method will always return a hashtable even if the URI does not * contain a query string. In such cases, the Hashtable will be empty.</p> * * @param uri The HTTP query string to parse * ...
Returns a Hashtable of name-value pairs from the query portion of the given URI. This method will always return a hashtable even if the URI does not contain a query string. In such cases, the Hashtable will be empty
getParametersAsHashtable
{ "repo_name": "sdcote/loader", "path": "src/main/java/coyote/commons/UriUtil.java", "license": "mit", "size": 34504 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
907,655
this.testStore.add(this.testRole); boolean expectedValue = true; boolean resultValue = this.testStore.exist(this.testRole); assertThat(expectedValue, is(resultValue)); }
this.testStore.add(this.testRole); boolean expectedValue = true; boolean resultValue = this.testStore.exist(this.testRole); assertThat(expectedValue, is(resultValue)); }
/** * Tests if add() method adds the new instance in the RoleStore. */
Tests if add() method adds the new instance in the RoleStore
whenNewObjectIsAddedInTheStoreThenItIsInTheStore
{ "repo_name": "dionisius1976/java-a-to-z", "path": "chapter_005/2_generics/src/test/java/ru/dionisius/RoleStoreTest.java", "license": "apache-2.0", "size": 2735 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.core.Is" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is;
import org.hamcrest.*; import org.hamcrest.core.*;
[ "org.hamcrest", "org.hamcrest.core" ]
org.hamcrest; org.hamcrest.core;
1,366,130
default Optional<Method> findMethod(final Class<?> clazz, final String name) { return Arrays.stream(getPossibleMethodNames(name)) .map(methodName -> findMethod(clazz, methodName, new Class[0]).orElse(null)) .filter(Objects::nonNull) .findFirst(); }
default Optional<Method> findMethod(final Class<?> clazz, final String name) { return Arrays.stream(getPossibleMethodNames(name)) .map(methodName -> findMethod(clazz, methodName, new Class[0]).orElse(null)) .filter(Objects::nonNull) .findFirst(); }
/** * Find the method with the given name and no parameters of the specified class. * * @param clazz the class * @param name the method name * @return the method */
Find the method with the given name and no parameters of the specified class
findMethod
{ "repo_name": "bremersee/comparator", "path": "src/main/java/org/bremersee/comparator/ValueExtractor.java", "license": "apache-2.0", "size": 6007 }
[ "java.lang.reflect.Method", "java.util.Arrays", "java.util.Objects", "java.util.Optional" ]
import java.lang.reflect.Method; import java.util.Arrays; import java.util.Objects; import java.util.Optional;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,236,333
RuleBasedNumberFormat formatter = new RuleBasedNumberFormat(Locale.US, RuleBasedNumberFormat.SPELLOUT); formatter.setLenientScannerProvider(null); formatter.setLenientParseMode(true); String[][] lpTestData = { { "2 thousand six HUND...
RuleBasedNumberFormat formatter = new RuleBasedNumberFormat(Locale.US, RuleBasedNumberFormat.SPELLOUT); formatter.setLenientScannerProvider(null); formatter.setLenientParseMode(true); String[][] lpTestData = { { STR, "2,657" }, }; doLenientParseTest(formatter, lpTestData); }
/** * Ensure that the default provider is instantiated and used if none is set * and lenient parse is on. */
Ensure that the default provider is instantiated and used if none is set and lenient parse is on
TestDefaultProvider
{ "repo_name": "lukhnos/j2objc", "path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfLenientScannerTest.java", "license": "apache-2.0", "size": 8607 }
[ "android.icu.text.RuleBasedNumberFormat", "java.util.Locale" ]
import android.icu.text.RuleBasedNumberFormat; import java.util.Locale;
import android.icu.text.*; import java.util.*;
[ "android.icu", "java.util" ]
android.icu; java.util;
2,312,760
public synchronized void init(RequestInterceptor rootInterceptor, ApplicationAttemptId applicationAttemptId) { this.rootInterceptor = rootInterceptor; this.applicationAttemptId = applicationAttemptId; }
synchronized void function(RequestInterceptor rootInterceptor, ApplicationAttemptId applicationAttemptId) { this.rootInterceptor = rootInterceptor; this.applicationAttemptId = applicationAttemptId; }
/** * Initializes the wrapper with the specified parameters. * * @param rootInterceptor the root request intercepter * @param applicationAttemptId attempt id */
Initializes the wrapper with the specified parameters
init
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/AMRMProxyService.java", "license": "apache-2.0", "size": 31842 }
[ "org.apache.hadoop.yarn.api.records.ApplicationAttemptId" ]
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,835,309
public static iodType fromPerAligned(byte[] encodedBytes) { iodType result = new iodType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
static iodType function(byte[] encodedBytes) { iodType result = new iodType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new iodType from encoded stream. */
Creates a new iodType from encoded stream
fromPerAligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/lpp_ver12/GNSS_NavModelSatelliteElement.java", "license": "apache-2.0", "size": 26199 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
2,813,904
public ServiceResponse<A> get200Model204NoModelDefaultError200Valid() throws ErrorException, IOException { Call<ResponseBody> call = service.get200Model204NoModelDefaultError200Valid(); return get200Model204NoModelDefaultError200ValidDelegate(call.execute()); }
ServiceResponse<A> function() throws ErrorException, IOException { Call<ResponseBody> call = service.get200Model204NoModelDefaultError200Valid(); return get200Model204NoModelDefaultError200ValidDelegate(call.execute()); }
/** * Send a 200 response with valid payload: {'statusCode': '200'}. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the A object wrapped in {@link ServiceResponse} if successful. */
Send a 200 response with valid payload: {'statusCode': '200'}
get200Model204NoModelDefaultError200Valid
{ "repo_name": "John-Hart/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/implementation/MultipleResponsesImpl.java", "license": "mit", "size": 84047 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
120,816
@SimpleProperty( category = PropertyCategory.APPEARANCE) public String Image() { return imagePath; }
@SimpleProperty( category = PropertyCategory.APPEARANCE) String function() { return imagePath; }
/** * Returns the path of the button's image. * * @return the path of the button's image */
Returns the path of the button's image
Image
{ "repo_name": "rkipper/AppInventor_RK", "path": "appinventor/components/src/com/google/appinventor/components/runtime/ButtonBase.java", "license": "mit", "size": 18931 }
[ "com.google.appinventor.components.annotations.PropertyCategory", "com.google.appinventor.components.annotations.SimpleProperty" ]
import com.google.appinventor.components.annotations.PropertyCategory; import com.google.appinventor.components.annotations.SimpleProperty;
import com.google.appinventor.components.annotations.*;
[ "com.google.appinventor" ]
com.google.appinventor;
2,799,996
public List<ViewManager> createAllViewManagers( ReactApplicationContext catalystApplicationContext) { ReactMarker.logMarker(CREATE_VIEW_MANAGERS_START); Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "createAllViewManagers"); try { List<ViewManager> allViewManagers = new ArrayList<>(); ...
List<ViewManager> function( ReactApplicationContext catalystApplicationContext) { ReactMarker.logMarker(CREATE_VIEW_MANAGERS_START); Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, STR); try { List<ViewManager> allViewManagers = new ArrayList<>(); for (ReactPackage reactPackage : mPackages) { allViewManagers.addAll(...
/** * Uses configured {@link ReactPackage} instances to create all view managers. */
Uses configured <code>ReactPackage</code> instances to create all view managers
createAllViewManagers
{ "repo_name": "DanielMSchmidt/react-native", "path": "ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java", "license": "bsd-3-clause", "size": 38250 }
[ "com.facebook.react.bridge.ReactApplicationContext", "com.facebook.react.bridge.ReactMarker", "com.facebook.react.uimanager.ViewManager", "com.facebook.systrace.Systrace", "java.util.ArrayList", "java.util.List" ]
import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactMarker; import com.facebook.react.uimanager.ViewManager; import com.facebook.systrace.Systrace; import java.util.ArrayList; import java.util.List;
import com.facebook.react.bridge.*; import com.facebook.react.uimanager.*; import com.facebook.systrace.*; import java.util.*;
[ "com.facebook.react", "com.facebook.systrace", "java.util" ]
com.facebook.react; com.facebook.systrace; java.util;
2,868,051
public static File createTempDir() throws IOException { long stopTimeMs = System.currentTimeMillis() + waitDelay(); do { File tempDirFile = new File(System.getProperty("java.io.tmpdir"), getUniquePart()); if (tempDirFile.mkdir()) { return tempDirFile; ...
static File function() throws IOException { long stopTimeMs = System.currentTimeMillis() + waitDelay(); do { File tempDirFile = new File(System.getProperty(STR), getUniquePart()); if (tempDirFile.mkdir()) { return tempDirFile; } Thread.yield(); } while (System.currentTimeMillis() < stopTimeMs); throw new RuntimeExcepti...
/** * Create unique temp directory * * @return File objects which refers to the temp Dir, or throws an exception * if fails */
Create unique temp directory
createTempDir
{ "repo_name": "jrivets/jrivets-common", "path": "src/main/java/org/jrivets/util/FileUtils.java", "license": "apache-2.0", "size": 3212 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,002,103
public static KeyPair generate() { initBouncyCastleProvider(); try { KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(ALGORITHM_NAME, PROVIDER_NAME); ECNamedCurveParameterSpec curveParameterSpec = ECNamedCurveTable.getParameterSpec(SEC_CURVE_NAME); ...
static KeyPair function() { initBouncyCastleProvider(); try { KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(ALGORITHM_NAME, PROVIDER_NAME); ECNamedCurveParameterSpec curveParameterSpec = ECNamedCurveTable.getParameterSpec(SEC_CURVE_NAME); keyPairGenerator.initialize(curveParameterSpec, new SecureRand...
/** * Generates a new {@link KeyPair} for the ECC curve {@code secp384r1}. * * @return The key pair. */
Generates a new <code>KeyPair</code> for the ECC curve secp384r1
generate
{ "repo_name": "Beam-Project/beam-common", "path": "src/main/java/org/beamproject/common/crypto/EccKeyPairGenerator.java", "license": "gpl-3.0", "size": 4988 }
[ "java.security.InvalidAlgorithmParameterException", "java.security.KeyPair", "java.security.KeyPairGenerator", "java.security.NoSuchAlgorithmException", "java.security.NoSuchProviderException", "java.security.SecureRandom", "org.beamproject.common.crypto.BouncyCastleIntegrator", "org.bouncycastle.jce....
import java.security.InvalidAlgorithmParameterException; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.SecureRandom; import org.beamproject.common.crypto.BouncyCastleIntegrator; impor...
import java.security.*; import org.beamproject.common.crypto.*; import org.bouncycastle.jce.*; import org.bouncycastle.jce.spec.*;
[ "java.security", "org.beamproject.common", "org.bouncycastle.jce" ]
java.security; org.beamproject.common; org.bouncycastle.jce;
2,356,642
public void onOrphanDataObjectCreated(DataObject data) { view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); Browser browser = model.getSelectedBrowser(); if (browser != null) browser.onOrphanDataObjectCreated(data); setStatus(false, "", true); view.setCursor(Cursor.getPredefinedCursor(C...
void function(DataObject data) { view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); Browser browser = model.getSelectedBrowser(); if (browser != null) browser.onOrphanDataObjectCreated(data); setStatus(false, "", true); view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
/** * Implemented as specified by the {@link TreeViewer} interface. * @see TreeViewer#onOrphanDataObjectCreated(DataObject, int) */
Implemented as specified by the <code>TreeViewer</code> interface
onOrphanDataObjectCreated
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java", "license": "gpl-2.0", "size": 155452 }
[ "java.awt.Cursor", "org.openmicroscopy.shoola.agents.treeviewer.browser.Browser" ]
import java.awt.Cursor; import org.openmicroscopy.shoola.agents.treeviewer.browser.Browser;
import java.awt.*; import org.openmicroscopy.shoola.agents.treeviewer.browser.*;
[ "java.awt", "org.openmicroscopy.shoola" ]
java.awt; org.openmicroscopy.shoola;
702,681
public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); this.drawCenteredString(this.fontRendererObj, I18n.format("selectWorld.create", new Object[0]), this.width / 2, 20, -1); if (this.field_146344_y) { this.drawString(this...
void function(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); this.drawCenteredString(this.fontRendererObj, I18n.format(STR, new Object[0]), this.width / 2, 20, -1); if (this.field_146344_y) { this.drawString(this.fontRendererObj, I18n.format(STR, new Object[0]), this.width / 2 - 100, 47, -6...
/** * Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */
Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks
drawScreen
{ "repo_name": "tomtomtom09/CampCraft", "path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/GuiCreateWorld.java", "license": "gpl-3.0", "size": 19984 }
[ "net.minecraft.client.resources.I18n", "net.minecraft.world.WorldType" ]
import net.minecraft.client.resources.I18n; import net.minecraft.world.WorldType;
import net.minecraft.client.resources.*; import net.minecraft.world.*;
[ "net.minecraft.client", "net.minecraft.world" ]
net.minecraft.client; net.minecraft.world;
1,977,185
public static TemplateInvoker getInvoker(TemplateSource templateSource, InvokeOptions invokeOptions) throws TemplateException, IOException { return new TemplateInvoker(templateSource, invokeOptions, null); } // // public static TemplateInvoker getStringInvoker(TemplateSource templateSource, Invo...
static TemplateInvoker function(TemplateSource templateSource, InvokeOptions invokeOptions) throws TemplateException, IOException { return new TemplateInvoker(templateSource, invokeOptions, null); }
/** * Gets a standard template invoker. */
Gets a standard template invoker
getInvoker
{ "repo_name": "ilscipio/scipio-erp", "path": "framework/webapp/src/com/ilscipio/scipio/ce/webapp/ftl/template/TemplateInvoker.java", "license": "apache-2.0", "size": 19664 }
[ "freemarker.template.TemplateException", "java.io.IOException" ]
import freemarker.template.TemplateException; import java.io.IOException;
import freemarker.template.*; import java.io.*;
[ "freemarker.template", "java.io" ]
freemarker.template; java.io;
1,727,833
@Test public void testBean() { assertNotNull(RESOLVED.metaBean()); assertNotNull(RESOLVED.metaBean().value()); assertEquals(RESOLVED.metaBean().value().get(RESOLVED), SNAPSHOT); assertEquals(RESOLVED.property("value").get(), SNAPSHOT); }
void function() { assertNotNull(RESOLVED.metaBean()); assertNotNull(RESOLVED.metaBean().value()); assertEquals(RESOLVED.metaBean().value().get(RESOLVED), SNAPSHOT); assertEquals(RESOLVED.property("value").get(), SNAPSHOT); }
/** * Tests the bean. */
Tests the bean
testBean
{ "repo_name": "McLeodMoores/starling", "path": "projects/core/src/test/java/com/opengamma/core/link/ResolvedSnapshotLinkTest.java", "license": "apache-2.0", "size": 2231 }
[ "org.testng.Assert" ]
import org.testng.Assert;
import org.testng.*;
[ "org.testng" ]
org.testng;
2,330,318
private void obtainDataForJob(JobExecution je) throws UnexpectedDirectionException { Job job = je.getJob(); job.startTransfers(); for (int i = 0; i < job.getParams().length; i++) { je.obtainJobParameter(i); } je.obtainTargetObject(); }
void function(JobExecution je) throws UnexpectedDirectionException { Job job = je.getJob(); job.startTransfers(); for (int i = 0; i < job.getParams().length; i++) { je.obtainJobParameter(i); } je.obtainTargetObject(); }
/** * Obtains the input values required for running a task. * * If the data values are not present in the local node it asks for them to * the system. * * @param je JobExecution whose dependencies must be loaded * * @throws UnexpectedDirectionException */
Obtains the input values required for running a task. If the data values are not present in the local node it asks for them to the system
obtainDataForJob
{ "repo_name": "flordan/COMPSs-Mobile", "path": "code/runtime/commons/src/main/java/es/bsc/mobile/scheduler/BasicScheduler.java", "license": "apache-2.0", "size": 8193 }
[ "es.bsc.mobile.exceptions.UnexpectedDirectionException", "es.bsc.mobile.types.Job", "es.bsc.mobile.types.JobExecution" ]
import es.bsc.mobile.exceptions.UnexpectedDirectionException; import es.bsc.mobile.types.Job; import es.bsc.mobile.types.JobExecution;
import es.bsc.mobile.exceptions.*; import es.bsc.mobile.types.*;
[ "es.bsc.mobile" ]
es.bsc.mobile;
1,384,417
public String deleteUserToShareBag(String userName, String bagName) { HttpSession session = WebContextFactory.get().getSession(); final InterMineAPI im = SessionMethods.getInterMineAPI(session); Profile profile = SessionMethods.getProfile(session); BagManager bagManager = im.getBagMa...
String function(String userName, String bagName) { HttpSession session = WebContextFactory.get().getSession(); final InterMineAPI im = SessionMethods.getInterMineAPI(session); Profile profile = SessionMethods.getProfile(session); BagManager bagManager = im.getBagManager(); try { bagManager.unshareBagWithUser(bagName, p...
/** * Un-share the bag given in input with the user which userName is input * @param userName the user which the bag has to be un-shared with * @param bagName the bag name to un-share * @return 'ok' string if succeeded else error string */
Un-share the bag given in input with the user which userName is input
deleteUserToShareBag
{ "repo_name": "joshkh/intermine", "path": "intermine/web/main/src/org/intermine/dwr/AjaxServices.java", "license": "lgpl-2.1", "size": 62567 }
[ "javax.servlet.http.HttpSession", "org.directwebremoting.WebContextFactory", "org.intermine.api.InterMineAPI", "org.intermine.api.bag.BagManager", "org.intermine.api.profile.BagDoesNotExistException", "org.intermine.api.profile.Profile", "org.intermine.api.profile.UserNotFoundException", "org.intermin...
import javax.servlet.http.HttpSession; import org.directwebremoting.WebContextFactory; import org.intermine.api.InterMineAPI; import org.intermine.api.bag.BagManager; import org.intermine.api.profile.BagDoesNotExistException; import org.intermine.api.profile.Profile; import org.intermine.api.profile.UserNotFoundExcepti...
import javax.servlet.http.*; import org.directwebremoting.*; import org.intermine.api.*; import org.intermine.api.bag.*; import org.intermine.api.profile.*; import org.intermine.web.logic.session.*;
[ "javax.servlet", "org.directwebremoting", "org.intermine.api", "org.intermine.web" ]
javax.servlet; org.directwebremoting; org.intermine.api; org.intermine.web;
1,519,844
StringTokenizer st = new StringTokenizer(dateToConvert, DATE_DELIMITER); String[] tokenArr = new String[3]; int i = 0; while (st.hasMoreTokens()) { tokenArr[i] = st.nextToken(); i++; } int day = Integer.valueOf(tokenArr[0]); String monthStr = toke...
StringTokenizer st = new StringTokenizer(dateToConvert, DATE_DELIMITER); String[] tokenArr = new String[3]; int i = 0; while (st.hasMoreTokens()) { tokenArr[i] = st.nextToken(); i++; } int day = Integer.valueOf(tokenArr[0]); String monthStr = tokenArr[1]; int month; try { month = Integer.valueOf(tokenArr[1]); } catch (...
/** * Extract the different fields from taskDate having the format of * DAY-MONTH-YEAR, separated by DATE_DELIMITER * @throws DateTimeException * @throws IllegalValueException */
Extract the different fields from taskDate having the format of DAY-MONTH-YEAR, separated by DATE_DELIMITER
setDateGivenFullDate
{ "repo_name": "Mamtha3005/addressbook-level4", "path": "src/main/java/seedu/taskell/model/task/TaskDate.java", "license": "mit", "size": 21847 }
[ "java.util.StringTokenizer" ]
import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
2,821,901
if (UtilidadesUI.verificarWidgetInstalado(context)) { Intent intent = new Intent(); intent.setComponent(new ComponentName(UtilidadesUI.WIDGET_PACKAGE, UtilidadesUI.WIDGET_ACTIVITY)); // 24,2902;10,2902 intent.putExtra("datos_linea", busSeleccionado.getLinea() ...
if (UtilidadesUI.verificarWidgetInstalado(context)) { Intent intent = new Intent(); intent.setComponent(new ComponentName(UtilidadesUI.WIDGET_PACKAGE, UtilidadesUI.WIDGET_ACTIVITY)); intent.putExtra(STR, busSeleccionado.getLinea() + "," + paradaActual + "," + busSeleccionado.getDestino()); context.startActivity(intent)...
/** * Enviar la parada al widget */
Enviar la parada al widget
enviarAWidget
{ "repo_name": "alberapps/tiempobus", "path": "TiempoBus/src/alberapps/android/tiempobus/principal/GestionarWidget.java", "license": "gpl-3.0", "size": 3494 }
[ "android.content.ComponentName", "android.content.DialogInterface", "android.content.Intent", "androidx.appcompat.app.AlertDialog" ]
import android.content.ComponentName; import android.content.DialogInterface; import android.content.Intent; import androidx.appcompat.app.AlertDialog;
import android.content.*; import androidx.appcompat.app.*;
[ "android.content", "androidx.appcompat" ]
android.content; androidx.appcompat;
2,521,085
public final void init(Node nodeConf) throws XMLConfigException { logger.debug("BEGIN AccessRule init(Node node)"); accessRuleName = XMLConfig.get(nodeConf, "@name"); String action = XMLConfig.get(nodeConf, "@action"); actionAsBoolean = action.equalsIgnoreCase("GRANT"); ...
final void function(Node nodeConf) throws XMLConfigException { logger.debug(STR); accessRuleName = XMLConfig.get(nodeConf, "@name"); String action = XMLConfig.get(nodeConf, STR); actionAsBoolean = action.equalsIgnoreCase("GRANT"); NodeList confNodeList = XMLConfig.getNodeList(nodeConf, STR); if (confNodeList != null) {...
/** * The initialization method. * * @param nodeConf * the configuration node * @throws XMLConfigException * if a configuration error occurred */
The initialization method
init
{ "repo_name": "green-vulcano/gv-engine", "path": "gvengine/gvbase/src/main/java/it/greenvulcano/gvesb/security/AccessRule.java", "license": "lgpl-3.0", "size": 4885 }
[ "it.greenvulcano.configuration.XMLConfig", "it.greenvulcano.configuration.XMLConfigException", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import it.greenvulcano.configuration.XMLConfig; import it.greenvulcano.configuration.XMLConfigException; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import it.greenvulcano.configuration.*; import org.w3c.dom.*;
[ "it.greenvulcano.configuration", "org.w3c.dom" ]
it.greenvulcano.configuration; org.w3c.dom;
273,156
protected void appendFilters(Element root) { Element filter = root.getOwnerDocument().createElement("filter"); root.appendChild(filter); filter.setAttribute("name", "DerivedFiles"); filter.setAttribute("enabled", "true"); }
void function(Element root) { Element filter = root.getOwnerDocument().createElement(STR); root.appendChild(filter); filter.setAttribute("name", STR); filter.setAttribute(STR, "true"); }
/** * Add the 'filter' elements * * @param root Root element of configuration */
Add the 'filter' elements
appendFilters
{ "repo_name": "jochenseeber/gradle-project-config", "path": "src/main/java/me/seeber/gradle/validation/checkstyle/GenerateEclipseCheckstyle.java", "license": "bsd-2-clause", "size": 7851 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
467,524
void setExpires(DateTime expires);
void setExpires(DateTime expires);
/** * Update the expiration timestamp. * * @param expires */
Update the expiration timestamp
setExpires
{ "repo_name": "jhelmer-unicon/uPortal", "path": "uportal-war/src/main/java/org/apereo/portal/portlet/om/IPortalCookie.java", "license": "apache-2.0", "size": 1562 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
248,167
public void messageReceived(WonderlandClientSender sender, WonderlandClientID clientID, CellHierarchyMessage message) { switch(message.getActionType()) { case SET_VIEW : // TODO - should not assume this i...
void function(WonderlandClientSender sender, WonderlandClientID clientID, CellHierarchyMessage message) { switch(message.getActionType()) { case SET_VIEW : ViewCreateResponseMessage response = createAvatar(sender, clientID, message); sender.send(clientID, response); break; default : logger.severe(STR+message.getActionT...
/** * When a cell message is received, dispatch it to the appropriate cell. * If the cell does not exist, send back an error message. * @param message the cell message * @param sender the message sender to send responses to */
When a cell message is received, dispatch it to the appropriate cell. If the cell does not exist, send back an error message
messageReceived
{ "repo_name": "AsherBond/MondocosmOS", "path": "wonderland/core/src/classes/org/jdesktop/wonderland/server/cell/CellCacheConnectionHandler.java", "license": "agpl-3.0", "size": 6155 }
[ "org.jdesktop.wonderland.common.cell.messages.CellHierarchyMessage", "org.jdesktop.wonderland.common.cell.messages.ViewCreateResponseMessage", "org.jdesktop.wonderland.common.messages.ErrorMessage", "org.jdesktop.wonderland.server.comms.WonderlandClientID", "org.jdesktop.wonderland.server.comms.WonderlandCl...
import org.jdesktop.wonderland.common.cell.messages.CellHierarchyMessage; import org.jdesktop.wonderland.common.cell.messages.ViewCreateResponseMessage; import org.jdesktop.wonderland.common.messages.ErrorMessage; import org.jdesktop.wonderland.server.comms.WonderlandClientID; import org.jdesktop.wonderland.server.comm...
import org.jdesktop.wonderland.common.cell.messages.*; import org.jdesktop.wonderland.common.messages.*; import org.jdesktop.wonderland.server.comms.*;
[ "org.jdesktop.wonderland" ]
org.jdesktop.wonderland;
2,244,291
public void removePropertyChangeListener(PropertyChangeListener listener);
void function(PropertyChangeListener listener);
/** * Remove a property change listener from this component. * * @param listener The listener to remove */
Remove a property change listener from this component
removePropertyChangeListener
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Logger.java", "license": "apache-2.0", "size": 7842 }
[ "java.beans.PropertyChangeListener" ]
import java.beans.PropertyChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
73,314
protected Item parseSnapshot(DataSnapshot snapshot) { return snapshot.getValue(mModelClass); }
Item function(DataSnapshot snapshot) { return snapshot.getValue(mModelClass); }
/** * This method parses the DataSnapshot into the requested type. You can override it in subclasses * to do custom parsing. * * @param snapshot the DataSnapshot to extract the model from * @return the model extracted from the DataSnapshot */
This method parses the DataSnapshot into the requested type. You can override it in subclasses to do custom parsing
parseSnapshot
{ "repo_name": "weiwenqiang/GitHub", "path": "ListView/FastAdapter-develop/library-extensions-firebase/src/main/java/com/mikepenz/fastadapter_extensions/firebase/FirebaseItemAdapter.java", "license": "apache-2.0", "size": 8568 }
[ "com.google.firebase.database.DataSnapshot" ]
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.*;
[ "com.google.firebase" ]
com.google.firebase;
857,342
@Override protected void doProcess( ITemplateContext context, IModel model, AttributeName attributeName, String attributeValue, IElementModelStructureHandler structureHandler) { if (warned.compareAndSet(false, true)) { logger.warn( "The layout:include/data-layout-include processor is deprecated and wil...
void function( ITemplateContext context, IModel model, AttributeName attributeName, String attributeValue, IElementModelStructureHandler structureHandler) { if (warned.compareAndSet(false, true)) { logger.warn( STR + STR + "See https: ); } FragmentExpression fragmentExpression = new ExpressionProcessor(context).parseFr...
/** * Locates a page fragment and includes it in the current template. * * @param context * @param model * @param attributeName * @param attributeValue * @param structureHandler */
Locates a page fragment and includes it in the current template
doProcess
{ "repo_name": "zhanhb/thymeleaf-layout-dialect", "path": "thymeleaf-layout-dialect/source/nz/net/ultraq/thymeleaf/layoutdialect/includes/IncludeProcessor.java", "license": "apache-2.0", "size": 6366 }
[ "java.util.Iterator", "java.util.List", "java.util.Map", "nz.net.ultraq.thymeleaf.expressionprocessor.ExpressionProcessor", "nz.net.ultraq.thymeleaf.layoutdialect.fragments.FragmentFinder", "nz.net.ultraq.thymeleaf.layoutdialect.fragments.FragmentParameterNamesExtractor", "nz.net.ultraq.thymeleaf.layout...
import java.util.Iterator; import java.util.List; import java.util.Map; import nz.net.ultraq.thymeleaf.expressionprocessor.ExpressionProcessor; import nz.net.ultraq.thymeleaf.layoutdialect.fragments.FragmentFinder; import nz.net.ultraq.thymeleaf.layoutdialect.fragments.FragmentParameterNamesExtractor; import nz.net.ult...
import java.util.*; import nz.net.ultraq.thymeleaf.expressionprocessor.*; import nz.net.ultraq.thymeleaf.layoutdialect.fragments.*; import nz.net.ultraq.thymeleaf.layoutdialect.fragments.extensions.*; import nz.net.ultraq.thymeleaf.layoutdialect.models.*; import nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.*...
[ "java.util", "nz.net.ultraq", "org.thymeleaf.context", "org.thymeleaf.engine", "org.thymeleaf.model", "org.thymeleaf.processor", "org.thymeleaf.standard" ]
java.util; nz.net.ultraq; org.thymeleaf.context; org.thymeleaf.engine; org.thymeleaf.model; org.thymeleaf.processor; org.thymeleaf.standard;
866,499
public static QDataSet randu(int len0, int len1, int len2) { return randu(new int[]{len0, len1, len2}, random ); }
static QDataSet function(int len0, int len1, int len2) { return randu(new int[]{len0, len1, len2}, random ); }
/** * returns a rank 3 dataset of random uniform numbers from 0 to 1 but not including 1. * @param len0 the number of elements in the first index. * @param len1 the number of elements in the second index. * @param len2 the number of elements in the third index. * @return a rank 3 dataset of ran...
returns a rank 3 dataset of random uniform numbers from 0 to 1 but not including 1
randu
{ "repo_name": "autoplot/app", "path": "QDataSet/src/org/das2/qds/ops/Ops.java", "license": "gpl-2.0", "size": 492716 }
[ "org.das2.qds.QDataSet" ]
import org.das2.qds.QDataSet;
import org.das2.qds.*;
[ "org.das2.qds" ]
org.das2.qds;
524,935
public String formatRfc822Date(Date date) { synchronized (rfc822DateParser) { return rfc822DateParser.format(date); } }
String function(Date date) { synchronized (rfc822DateParser) { return rfc822DateParser.format(date); } }
/** * Formats the specified date as an RFC 822 string. * * @param date * The date to format. * * @return The RFC 822 string representing the specified date. */
Formats the specified date as an RFC 822 string
formatRfc822Date
{ "repo_name": "apetresc/aws-sdk-for-java-on-gae", "path": "src/main/java/com/amazonaws/util/DateUtils.java", "license": "apache-2.0", "size": 4204 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,905,794
public static void syncClientSideStateForComponent(Component component, Map<String, Object> clientSideState) { // find the map of state that was sent for component (if any) Map<String, Object> componentState = null; if (component instanceof View) { componentState = clientSideStat...
static void function(Component component, Map<String, Object> clientSideState) { Map<String, Object> componentState = null; if (component instanceof View) { componentState = clientSideState; } else { if (clientSideState.containsKey(component.getId())) { componentState = (Map<String, Object>) clientSideState.get(compone...
/** * Updates the properties of the given component instance with the value found from the * corresponding map of client state (if found) * * @param component component instance to update * @param clientSideState map of state to sync with */
Updates the properties of the given component instance with the value found from the corresponding map of client state (if found)
syncClientSideStateForComponent
{ "repo_name": "geothomasp/kualico-rice-kc", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/util/KRADUtils.java", "license": "apache-2.0", "size": 69178 }
[ "java.lang.annotation.Annotation", "java.util.Map", "org.apache.commons.lang.StringUtils", "org.kuali.rice.krad.uif.component.ClientSideState", "org.kuali.rice.krad.uif.component.Component", "org.kuali.rice.krad.uif.util.CopyUtils", "org.kuali.rice.krad.uif.util.ObjectPropertyUtils", "org.kuali.rice.k...
import java.lang.annotation.Annotation; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.kuali.rice.krad.uif.component.ClientSideState; import org.kuali.rice.krad.uif.component.Component; import org.kuali.rice.krad.uif.util.CopyUtils; import org.kuali.rice.krad.uif.util.ObjectPropertyUtils; ...
import java.lang.annotation.*; import java.util.*; import org.apache.commons.lang.*; import org.kuali.rice.krad.uif.component.*; import org.kuali.rice.krad.uif.util.*; import org.kuali.rice.krad.uif.view.*;
[ "java.lang", "java.util", "org.apache.commons", "org.kuali.rice" ]
java.lang; java.util; org.apache.commons; org.kuali.rice;
194,669
public final int getRxParameterInt(int prmIdx) { // Get the parameter block offset int pos = getRxParameterBlock(); // Get the required transact parameter word. pos += prmIdx * 2; // 16 bit words return DataPacker.getIntelInt(getBuffer(), pos); }
final int function(int prmIdx) { int pos = getRxParameterBlock(); pos += prmIdx * 2; return DataPacker.getIntelInt(getBuffer(), pos); }
/** * Get the required transact parameter int value (32-bit). * * @param prmIdx int * @return int */
Get the required transact parameter int value (32-bit)
getRxParameterInt
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/smb/server/SMBSrvTransPacket.java", "license": "lgpl-3.0", "size": 18714 }
[ "org.alfresco.jlan.util.DataPacker" ]
import org.alfresco.jlan.util.DataPacker;
import org.alfresco.jlan.util.*;
[ "org.alfresco.jlan" ]
org.alfresco.jlan;
2,373,829
@Override public Collection<PresentationForm> getPresentationForms() { return Collections.singleton(PresentationForm.DOCUMENT_DIGITAL); }
Collection<PresentationForm> function() { return Collections.singleton(PresentationForm.DOCUMENT_DIGITAL); }
/** * ISO 19115 metadata property fixed to {@link PresentationForm#DOCUMENT_DIGITAL}. * This is part of the properties returned by {@code getReferences()}. * * @return the presentation mode of the license. */
ISO 19115 metadata property fixed to <code>PresentationForm#DOCUMENT_DIGITAL</code>. This is part of the properties returned by getReferences()
getPresentationForms
{ "repo_name": "apache/sis", "path": "storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Copyright.java", "license": "apache-2.0", "size": 16279 }
[ "java.util.Collection", "java.util.Collections", "org.opengis.metadata.citation.PresentationForm" ]
import java.util.Collection; import java.util.Collections; import org.opengis.metadata.citation.PresentationForm;
import java.util.*; import org.opengis.metadata.citation.*;
[ "java.util", "org.opengis.metadata" ]
java.util; org.opengis.metadata;
271,572
@Override public long getItemId(int position) { for (ListAdapter piece : getPieces()) { int size=piece.getCount(); if (position < size) { return(piece.getItemId(position)); } position-=size; } return(-1); }
long function(int position) { for (ListAdapter piece : getPieces()) { int size=piece.getCount(); if (position < size) { return(piece.getItemId(position)); } position-=size; } return(-1); }
/** * Get the row id associated with the specified position * in the list. * * @param position * Position of the item whose data we want */
Get the row id associated with the specified position in the list
getItemId
{ "repo_name": "commonsguy/cwac-merge", "path": "merge/src/main/java/com/commonsware/cwac/merge/MergeAdapter.java", "license": "apache-2.0", "size": 11114 }
[ "android.widget.ListAdapter" ]
import android.widget.ListAdapter;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,490,988
public static String[] getCanonicalPathElements (File file) throws IOException { file = file.getCanonicalFile(); // If we were a file, get its parent if (!file.isDirectory()) { file = file.getParentFile(); } return file.getPath().split(File.separator...
static String[] function (File file) throws IOException { file = file.getCanonicalFile(); if (!file.isDirectory()) { file = file.getParentFile(); } return file.getPath().split(File.separator); }
/** * Gets the individual path elements building up the canonical path to the given file. */
Gets the individual path elements building up the canonical path to the given file
getCanonicalPathElements
{ "repo_name": "samskivert/samskivert", "path": "src/main/java/com/samskivert/net/PathUtil.java", "license": "lgpl-2.1", "size": 3627 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,810,862
public Timestamp getLastcontact() { return this.lastcontact; }
Timestamp function() { return this.lastcontact; }
/** * Getter for property lastcontact. * @return Value of property lastcontact. */
Getter for property lastcontact
getLastcontact
{ "repo_name": "ethanpeng/openacs", "path": "acs-war/src/java/org/openacs/web/HostsBean.java", "license": "gpl-3.0", "size": 50537 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,211,600
void expectSuperType(NodeTraversal t, Node n, ObjectType superObject, ObjectType subObject) { FunctionType subCtor = subObject.getConstructor(); ObjectType declaredSuper = subObject.getImplicitPrototype().getImplicitPrototype(); if (!declaredSuper.equals(superObject)) { if (declaredSup...
void expectSuperType(NodeTraversal t, Node n, ObjectType superObject, ObjectType subObject) { FunctionType subCtor = subObject.getConstructor(); ObjectType declaredSuper = subObject.getImplicitPrototype().getImplicitPrototype(); if (!declaredSuper.equals(superObject)) { if (declaredSuper.equals(getNativeType(OBJECT_TYP...
/** * Expect that the first type is the direct superclass of the second type. * * @param t The node traversal. * @param n The node where warnings should point to. * @param superObject The expected super instance type. * @param subObject The sub instance type. */
Expect that the first type is the direct superclass of the second type
expectSuperType
{ "repo_name": "dound/google-closure-compiler", "path": "src/com/google/javascript/jscomp/TypeValidator.java", "license": "apache-2.0", "size": 30417 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.FunctionType", "com.google.javascript.rhino.jstype.ObjectType" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.ObjectType;
import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
101,145
@Message(id = 221, value = "Business interface type cannot be null") IllegalStateException businessInterfaceIsNull();
@Message(id = 221, value = STR) IllegalStateException businessInterfaceIsNull();
/** * Creates an exception indicating business interface type cannot be null * * @return a {@link IllegalStateException} for the error. */
Creates an exception indicating business interface type cannot be null
businessInterfaceIsNull
{ "repo_name": "99sono/wildfly", "path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java", "license": "lgpl-2.1", "size": 144385 }
[ "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
2,045,623
public static void buildTag(Writer writer, String tagName, Integer tagValue) throws IOException { XMLUtil.buildTag(writer, tagName, tagValue.toString(), false); }
static void function(Writer writer, String tagName, Integer tagValue) throws IOException { XMLUtil.buildTag(writer, tagName, tagValue.toString(), false); }
/** * Utility method for building an XML tag of the form &lt;tagName&gt;value&lt;/tagName&gt;. * * @param writer The writer to write the XML tag output to. * @param tagName The name of the XML tag, such as &lt;tagName&gt;value&lt;/tagName&gt;. * @param tagValue The value of the XML tag, such as &lt;tagName&gt...
Utility method for building an XML tag of the form &lt;tagName&gt;value&lt;/tagName&gt;
buildTag
{ "repo_name": "opendatakraken/openbiwiki", "path": "openbiwiki-core/src/main/java/org/jamwiki/utils/XMLUtil.java", "license": "mit", "size": 14586 }
[ "java.io.IOException", "java.io.Writer" ]
import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
609,441
private List<LatLng> loadGpxData(XmlPullParser parser, InputStream gpxIn) throws XmlPullParserException, IOException { List<LatLng> latLngs = new ArrayList<>(); // List<> as we need subList for paging later parser.setInput(gpxIn, null); parser.nextTag(); while (parser....
List<LatLng> function(XmlPullParser parser, InputStream gpxIn) throws XmlPullParserException, IOException { List<LatLng> latLngs = new ArrayList<>(); parser.setInput(gpxIn, null); parser.nextTag(); while (parser.next() != XmlPullParser.END_DOCUMENT) { if (parser.getEventType() != XmlPullParser.START_TAG) { continue; } ...
/** * Parses the waypoint (wpt tags) data into native objects from a GPX stream. */
Parses the waypoint (wpt tags) data into native objects from a GPX stream
loadGpxData
{ "repo_name": "tommyputranto/roads-api-samples", "path": "app/src/main/java/com/google/example/maps/roadsapi/MainActivity.java", "license": "apache-2.0", "size": 16165 }
[ "com.google.maps.model.LatLng", "java.io.IOException", "java.io.InputStream", "java.util.ArrayList", "java.util.List", "org.xmlpull.v1.XmlPullParser", "org.xmlpull.v1.XmlPullParserException" ]
import com.google.maps.model.LatLng; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException;
import com.google.maps.model.*; import java.io.*; import java.util.*; import org.xmlpull.v1.*;
[ "com.google.maps", "java.io", "java.util", "org.xmlpull.v1" ]
com.google.maps; java.io; java.util; org.xmlpull.v1;
422,350
public static File getConfigurationDirectory() { if (configDir != null) { return new File(configDir); } // Windows Vista onwards: String localAppData = isWindows() ? System.getenv("LOCALAPPDATA") : null; // on every other platform String userDir = System.getProperty("user.home"); String parentDir = ...
static File function() { if (configDir != null) { return new File(configDir); } String localAppData = isWindows() ? System.getenv(STR) : null; String userDir = System.getProperty(STR); String parentDir = localAppData != null ? localAppData : userDir; return new File(parentDir, getConfigBaseName()); }
/** * Gets the configuration directory. * * @return the configuration directory */
Gets the configuration directory
getConfigurationDirectory
{ "repo_name": "ThULB/IBWUpdater-Server", "path": "src/main/java/ibw/updater/common/config/ConfigurationDir.java", "license": "gpl-3.0", "size": 4423 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
36,264
public void setAuditIntervalValue(YangUInt32 auditIntervalValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "audit-interval", auditIntervalValue, childrenNames()); }
void function(YangUInt32 auditIntervalValue) throws JNCException { setLeafValue(Epc.NAMESPACE, STR, auditIntervalValue, childrenNames()); }
/** * Sets the value for child leaf "audit-interval", * using instance of generated typedef class. * @param auditIntervalValue The value to set. * @param auditIntervalValue used during instantiation. */
Sets the value for child leaf "audit-interval", using instance of generated typedef class
setAuditIntervalValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/interface_/MmeM3ua.java", "license": "apache-2.0", "size": 44401 }
[ "com.tailf.jnc.YangUInt32" ]
import com.tailf.jnc.YangUInt32;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
2,677,887
@BeanTagAttribute(name = "defaultSortAscending") public boolean isDefaultSortAscending() { return this.defaultSortAscending; }
@BeanTagAttribute(name = STR) boolean function() { return this.defaultSortAscending; }
/** * Indicates whether the initial sort performed using {@link #getDefaultSortAttributeNames()} is done based * on ascending or descending order (default is true, ascending). * * @return boolean true if ascending sort should be performed, false if descending sort should be * perfo...
Indicates whether the initial sort performed using <code>#getDefaultSortAttributeNames()</code> is done based on ascending or descending order (default is true, ascending)
isDefaultSortAscending
{ "repo_name": "ewestfal/rice-svn2git-test", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/lookup/LookupView.java", "license": "apache-2.0", "size": 34327 }
[ "org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute" ]
import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
import org.kuali.rice.krad.datadictionary.parse.*;
[ "org.kuali.rice" ]
org.kuali.rice;
1,194,195
public void removeYAxis(String id) throws AxisNotFoundException { if(!yAxis_.isEmpty()) { Axis ax; for(Enumeration it = yAxis_.elements(); it.hasMoreElements();) { ax = (Axis)it.nextElement(); if(ax.getId() == id) yAxis_.removeElement(ax); } throw new AxisNotFoundException...
void function(String id) throws AxisNotFoundException { if(!yAxis_.isEmpty()) { Axis ax; for(Enumeration it = yAxis_.elements(); it.hasMoreElements();) { ax = (Axis)it.nextElement(); if(ax.getId() == id) yAxis_.removeElement(ax); } throw new AxisNotFoundException(); } else { throw new AxisNotFoundException(); } }
/** * Remove an Y axis from the graph. * * @param id axis identifier * @exception AxisNotFoundException An axis was not found with the correct identifier. * @see Axis * @see PlainAxis */
Remove an Y axis from the graph
removeYAxis
{ "repo_name": "luttero/Maud", "path": "src/gov/noaa/pmel/sgt/CartesianGraph.java", "license": "bsd-3-clause", "size": 28021 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,323,918
public static int printSomethingPerLanguage ( LanguageType native_lang, Map<LanguageType, Integer> m_lang_n) { int total = 0; // total number of translations. or quotations, or... // print header line //System.out.prin...
static int function ( LanguageType native_lang, Map<LanguageType, Integer> m_lang_n) { int total = 0; System.out.println(STRsortable prettytable\STR! Language nameSTR! NumberSTR! Language codeSTR! in STR! TemplateSTR -STR STR STR STRSTR STR {{STR}}STR }"); return total; }
/** Prints statistics about (translations, or quotes, ...) per language * in Wiktionary. * * @param m_lang_n map of maps with number of translations into * English, Russian etc. (lang -> count) */
Prints statistics about (translations, or quotes, ...) per language in Wiktionary
printSomethingPerLanguage
{ "repo_name": "componavt/wikokit", "path": "wikt_parser/src/wikt/stat/printer/CommonPrinter.java", "license": "apache-2.0", "size": 14579 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,041,396
String stringValueBase64Encoded; File file = new File(base64EncoderInputs.getFilePath()); if (file.exists()) { if (file.isFile()) { stringValueBase64Encoded = Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get(base64EncoderInputs.getFilePath()))); } e...
String stringValueBase64Encoded; File file = new File(base64EncoderInputs.getFilePath()); if (file.exists()) { if (file.isFile()) { stringValueBase64Encoded = Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get(base64EncoderInputs.getFilePath()))); } else { throw new Exception(Constants.ENCODE_IS_NO_FILE_EX...
/** * This method encodes the content of a file into base64 * * @param base64EncoderInputs - required input fot the @Action (filepath) * @return - the encoded value * @throws Exception - specific error in case the file does not exist in the provided path */
This method encodes the content of a file into base64
displayEncodedBytes
{ "repo_name": "CloudSlang/cs-actions", "path": "cs-utilities/src/main/java/io/cloudslang/content/utilities/services/base64coder/Base64EncoderToStringImpl.java", "license": "apache-2.0", "size": 2009 }
[ "io.cloudslang.content.utilities.util.Constants", "java.io.File", "java.nio.file.Files", "java.nio.file.Paths", "java.util.Base64" ]
import io.cloudslang.content.utilities.util.Constants; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Base64;
import io.cloudslang.content.utilities.util.*; import java.io.*; import java.nio.file.*; import java.util.*;
[ "io.cloudslang.content", "java.io", "java.nio", "java.util" ]
io.cloudslang.content; java.io; java.nio; java.util;
2,530,524
UiModeManager uiModeManager = (UiModeManager) activity.getSystemService(UI_MODE_SERVICE); return (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION); }
UiModeManager uiModeManager = (UiModeManager) activity.getSystemService(UI_MODE_SERVICE); return (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION); }
/** * Verifies if the current user interface (UI) mode is for television (Mostly if we're in * Android TV) * * @param activity the activity verifying the UI mode. * @return true if the application is running in Android TV. */
Verifies if the current user interface (UI) mode is for television (Mostly if we're in Android TV)
isTvMode
{ "repo_name": "zaclimon/xipl", "path": "library/src/main/java/com/zaclimon/xipl/util/ActivityUtil.java", "license": "apache-2.0", "size": 1923 }
[ "android.app.UiModeManager", "android.content.res.Configuration" ]
import android.app.UiModeManager; import android.content.res.Configuration;
import android.app.*; import android.content.res.*;
[ "android.app", "android.content" ]
android.app; android.content;
2,740,778
@SuppressWarnings("Duplicates") public static boolean unionOf(IntIterableRangeSet set1, IntIterableRangeSet set2) { boolean change = false; int s1 = set1.SIZE >> 1; int s2 = set2.SIZE >> 1; if (s1 > 0 && s2 > 0) { int i = 0, j = 0; int s = 0, c = 0; ...
@SuppressWarnings(STR) static boolean function(IntIterableRangeSet set1, IntIterableRangeSet set2) { boolean change = false; int s1 = set1.SIZE >> 1; int s2 = set2.SIZE >> 1; if (s1 > 0 && s2 > 0) { int i = 0, j = 0; int s = 0, c = 0; int[] e = new int[set1.SIZE]; int lbi, ubi, lbj, ubj, lb, ub; lb = lbi = set1.ELEMENT...
/** * Set <i>set1</i> to <i>set1</i> &cap; <i>set2</i> * * @param set1 a set of ints * @param set2 a set of ints * @return <tt>true</tt> if <i>set1</i> has changed */
Set set1 to set1 &cap; set2
unionOf
{ "repo_name": "chocoteam/choco3", "path": "src/main/java/org/chocosolver/util/objects/setDataStructures/iterable/IntIterableSetUtils.java", "license": "bsd-3-clause", "size": 27456 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,575,092
EReference getGeometry_VertexSources();
EReference getGeometry_VertexSources();
/** * Returns the meta object for the containment reference list '{@link org.eclipse.january.geometry.Geometry#getVertexSources <em>Vertex Sources</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Vertex Sources</em>'. * @see org.ecli...
Returns the meta object for the containment reference list '<code>org.eclipse.january.geometry.Geometry#getVertexSources Vertex Sources</code>'.
getGeometry_VertexSources
{ "repo_name": "jarrah42/eavp", "path": "org.eclipse.january.geometry/src/org/eclipse/january/geometry/GeometryPackage.java", "license": "epl-1.0", "size": 160105 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,591,336
private Map<String, String> readHeaderTags(HollowBlobInput in) throws IOException { int numHeaderTags = in.readShort(); Map<String, String> headerTags = new HashMap<String, String>(); for (int i = 0; i < numHeaderTags; i++) { headerTags.put(in.readUTF(), in.readUTF()); } ...
Map<String, String> function(HollowBlobInput in) throws IOException { int numHeaderTags = in.readShort(); Map<String, String> headerTags = new HashMap<String, String>(); for (int i = 0; i < numHeaderTags; i++) { headerTags.put(in.readUTF(), in.readUTF()); } return headerTags; }
/** * Map of string header tags reading. * * @param in the Hollow blob input * @throws IOException */
Map of string header tags reading
readHeaderTags
{ "repo_name": "Netflix/hollow", "path": "hollow/src/main/java/com/netflix/hollow/core/read/engine/HollowBlobHeaderReader.java", "license": "apache-2.0", "size": 4831 }
[ "com.netflix.hollow.core.read.HollowBlobInput", "java.io.IOException", "java.util.HashMap", "java.util.Map" ]
import com.netflix.hollow.core.read.HollowBlobInput; import java.io.IOException; import java.util.HashMap; import java.util.Map;
import com.netflix.hollow.core.read.*; import java.io.*; import java.util.*;
[ "com.netflix.hollow", "java.io", "java.util" ]
com.netflix.hollow; java.io; java.util;
218,895
private void addJWTClaimsCondition(JWTClaimsCondition jwtClaimsCondition, int pipelineId, Connection conn) throws SQLException { PreparedStatement psJWTClaimsCondition = null; try { String sqlQuery = SQLConstants.ThrottleSQLConstants.INSERT_JWT_CLAIM_CONDITION_SQL; ...
void function(JWTClaimsCondition jwtClaimsCondition, int pipelineId, Connection conn) throws SQLException { PreparedStatement psJWTClaimsCondition = null; try { String sqlQuery = SQLConstants.ThrottleSQLConstants.INSERT_JWT_CLAIM_CONDITION_SQL; psJWTClaimsCondition = conn.prepareStatement(sqlQuery); psJWTClaimsConditio...
/** * Add JWTCLAIMS throttling condition to AM_JWT_CLAIM_CONDITION table * * @param jwtClaimsCondition {@link JWTClaimsCondition} with claim url and claim attribute * @param pipelineId id of the pipeline which this condition belongs to * @param conn database connection. Th...
Add JWTCLAIMS throttling condition to AM_JWT_CLAIM_CONDITION table
addJWTClaimsCondition
{ "repo_name": "dhanuka84/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java", "license": "apache-2.0", "size": 461690 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "org.wso2.carbon.apimgt.api.model.policy.JWTClaimsCondition", "org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants", "org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.wso2.carbon.apimgt.api.model.policy.JWTClaimsCondition; import org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants; import org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil;
import java.sql.*; import org.wso2.carbon.apimgt.api.model.policy.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "java.sql", "org.wso2.carbon" ]
java.sql; org.wso2.carbon;
2,822,736
public void adjustNumReducers(MROperPlan plan, MapReduceOper mro, org.apache.hadoop.mapreduce.Job nwJob) throws IOException { int jobParallelism = calculateRuntimeReducers(mro, nwJob); if (mro.isSampler() && plan.getSuccessors(mro) != null) { // We need to calculate the fina...
void function(MROperPlan plan, MapReduceOper mro, org.apache.hadoop.mapreduce.Job nwJob) throws IOException { int jobParallelism = calculateRuntimeReducers(mro, nwJob); if (mro.isSampler() && plan.getSuccessors(mro) != null) { MapReduceOper nextMro = plan.getSuccessors(mro).get(0); int nPartitions = calculateRuntimeRed...
/** * Adjust the number of reducers based on the default_parallel, requested parallel and estimated * parallel. For sampler jobs, we also adjust the next job in advance to get its runtime parallel as * the number of partitions used in the sampler. * @param plan the MR plan * @param mro the MR o...
Adjust the number of reducers based on the default_parallel, requested parallel and estimated parallel. For sampler jobs, we also adjust the next job in advance to get its runtime parallel as the number of partitions used in the sampler
adjustNumReducers
{ "repo_name": "Altiscale/pig", "path": "src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java", "license": "apache-2.0", "size": 89965 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.mapred.jobcontrol.Job", "org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.plans.MROperPlan", "org.apache.pig.impl.PigImplConstants" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapred.jobcontrol.Job; import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.plans.MROperPlan; import org.apache.pig.impl.PigImplConstants;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.mapred.jobcontrol.*; import org.apache.pig.backend.hadoop.executionengine.*; import org.apache.pig.impl.*;
[ "java.io", "org.apache.hadoop", "org.apache.pig" ]
java.io; org.apache.hadoop; org.apache.pig;
1,788,364
@Test public void selectTracksPreferTrackWithinCapabilitiesOverSelectionFlagAndPreferredLanguage() throws Exception { Format.Builder formatBuilder = AUDIO_FORMAT.buildUpon(); Format exceededDefaultSelectionEnFormat = formatBuilder .setId("exceededFormat") .setSelectionF...
void function() throws Exception { Format.Builder formatBuilder = AUDIO_FORMAT.buildUpon(); Format exceededDefaultSelectionEnFormat = formatBuilder .setId(STR) .setSelectionFlags(C.SELECTION_FLAG_DEFAULT) .setLanguage("eng") .build(); Format supportedFrFormat = formatBuilder.setId(STR).setSelectionFlags(0).setLanguage(...
/** * Tests that track selector will prefer tracks that are within renderer's capabilities over track * that have both language matching preferred audio given by {@link Parameters} and {@link * C#SELECTION_FLAG_DEFAULT}, but exceed renderer's capabilities. */
Tests that track selector will prefer tracks that are within renderer's capabilities over track that have both language matching preferred audio given by <code>Parameters</code> and <code>C#SELECTION_FLAG_DEFAULT</code>, but exceed renderer's capabilities
selectTracksPreferTrackWithinCapabilitiesOverSelectionFlagAndPreferredLanguage
{ "repo_name": "google/ExoPlayer", "path": "library/core/src/test/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelectorTest.java", "license": "apache-2.0", "size": 116562 }
[ "com.google.android.exoplayer2.Format", "com.google.android.exoplayer2.RendererCapabilities", "com.google.android.exoplayer2.source.TrackGroupArray", "java.util.HashMap", "java.util.Map" ]
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.RendererCapabilities; import com.google.android.exoplayer2.source.TrackGroupArray; import java.util.HashMap; import java.util.Map;
import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.source.*; import java.util.*;
[ "com.google.android", "java.util" ]
com.google.android; java.util;
1,321,103
@Override public void schedule(Topologies topologies, Cluster cluster) { List<WorkerSlot> workerSlots = cluster.getAvailableSlots(); String info = ""; if (!workerSlots.isEmpty()) { info = "Scheduling the following worker slots from cluster.getAvailableSlots: "; List<String> workerSlotsStrin...
void function(Topologies topologies, Cluster cluster) { List<WorkerSlot> workerSlots = cluster.getAvailableSlots(); String info = STRScheduling the following worker slots from cluster.getAvailableSlots: STR[%s]STR, STRSchedule the per-topology slots:STR:STR {%s, [%s]}STR, STRNo slots found for topology {} while schedul...
/** * Schedule function looks in the "mesosWorkerSlotMap" to determine which topology owns the particular * WorkerSlot and assigns the executors accordingly. */
Schedule function looks in the "mesosWorkerSlotMap" to determine which topology owns the particular WorkerSlot and assigns the executors accordingly
schedule
{ "repo_name": "changreytang/storm-mesos", "path": "storm/src/main/storm/mesos/schedulers/StormSchedulerImpl.java", "license": "apache-2.0", "size": 20284 }
[ "java.util.List", "org.apache.storm.scheduler.Cluster", "org.apache.storm.scheduler.Topologies", "org.apache.storm.scheduler.WorkerSlot" ]
import java.util.List; import org.apache.storm.scheduler.Cluster; import org.apache.storm.scheduler.Topologies; import org.apache.storm.scheduler.WorkerSlot;
import java.util.*; import org.apache.storm.scheduler.*;
[ "java.util", "org.apache.storm" ]
java.util; org.apache.storm;
1,165,346
protected final XContentParser createParser(XContent xContent, InputStream data) throws IOException { return xContent.createParser(xContentRegistry(), data); }
final XContentParser function(XContent xContent, InputStream data) throws IOException { return xContent.createParser(xContentRegistry(), data); }
/** * Create a new {@link XContentParser}. */
Create a new <code>XContentParser</code>
createParser
{ "repo_name": "obourgain/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java", "license": "apache-2.0", "size": 48103 }
[ "java.io.IOException", "java.io.InputStream", "org.elasticsearch.common.xcontent.XContent", "org.elasticsearch.common.xcontent.XContentParser" ]
import java.io.IOException; import java.io.InputStream; import org.elasticsearch.common.xcontent.XContent; import org.elasticsearch.common.xcontent.XContentParser;
import java.io.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
990,981
@Override public ItemStack onItemRightClick(ItemStack is, World world, EntityPlayer player) { MovingObjectPosition objectMouseOver = Helper.getMouseOverObject(player, player.worldObj); if(objectMouseOver != null && world.getBlockId(objectMouseOver.blockX, objectMouseOver.blockY,...
ItemStack function(ItemStack is, World world, EntityPlayer player) { MovingObjectPosition objectMouseOver = Helper.getMouseOverObject(player, player.worldObj); if(objectMouseOver != null && world.getBlockId(objectMouseOver.blockX, objectMouseOver.blockY, objectMouseOver.blockZ) == TFCBlocks.ToolRack.blockID) return is;...
/** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */
Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
onItemRightClick
{ "repo_name": "Timeslice42/TFCraft", "path": "TFC_Shared/src/TFC/Items/Tools/ItemWeapon.java", "license": "gpl-3.0", "size": 5080 }
[ "net.minecraft.entity.player.EntityPlayer", "net.minecraft.item.ItemStack", "net.minecraft.util.MovingObjectPosition", "net.minecraft.world.World" ]
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World;
import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.item", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world;
1,857,624
public String readDataExpression(String dataProperty, String selectorProperty) { String data; String selector; // Try to read from layout item first, in case they are "common" to different control definitions. data = mItem.optStringProperty(dataProperty); selector = mItem.optStringProperty(selectorProper...
String function(String dataProperty, String selectorProperty) { String data; String selector; data = mItem.optStringProperty(dataProperty); selector = mItem.optStringProperty(selectorProperty); if (mItem.getControlInfo() != null) { if (!Services.Strings.hasValue(data)) data = mItem.getControlInfo().optStringProperty(da...
/** * Helper method to read a "data item" property from a control. Normally, this can * be an attribute or an SDT variable/SDT field combination; this method unifies them * and returns an expression that can be used to get the value. * @param dataProperty Name of the property with the "Data Attribute". * @par...
Helper method to read a "data item" property from a control. Normally, this can be an attribute or an SDT variable/SDT field combination; this method unifies them and returns an expression that can be used to get the value
readDataExpression
{ "repo_name": "pablanco/taskManager", "path": "Android/FlexibleClient/src/com/artech/controls/ControlPropertiesDefinition.java", "license": "gpl-2.0", "size": 3021 }
[ "com.artech.base.services.Services", "com.artech.base.utils.Strings" ]
import com.artech.base.services.Services; import com.artech.base.utils.Strings;
import com.artech.base.services.*; import com.artech.base.utils.*;
[ "com.artech.base" ]
com.artech.base;
1,635,755
private static Predicate<LibraryToLink> ccLibraryNotYetLinked( final HashSet<PathFragment> runfilesPaths) { return libraryToLink -> !checkIfLibraryIsInPaths(libraryToLink, runfilesPaths); }
static Predicate<LibraryToLink> function( final HashSet<PathFragment> runfilesPaths) { return libraryToLink -> !checkIfLibraryIsInPaths(libraryToLink, runfilesPaths); }
/** * Returns a predicate which returns true for a given {@link LibraryToLink} if the library's * runfiles path is not contained in the given set. * * @param runfilesPaths if a given library has runfiles path present in this set, the predicate * will return false */
Returns a predicate which returns true for a given <code>LibraryToLink</code> if the library's runfiles path is not contained in the given set
ccLibraryNotYetLinked
{ "repo_name": "cushon/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcProvider.java", "license": "apache-2.0", "size": 42252 }
[ "com.google.common.base.Predicate", "com.google.devtools.build.lib.rules.cpp.LibraryToLink", "com.google.devtools.build.lib.vfs.PathFragment", "java.util.HashSet" ]
import com.google.common.base.Predicate; import com.google.devtools.build.lib.rules.cpp.LibraryToLink; import com.google.devtools.build.lib.vfs.PathFragment; import java.util.HashSet;
import com.google.common.base.*; import com.google.devtools.build.lib.rules.cpp.*; import com.google.devtools.build.lib.vfs.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,026,492
public static DistributionConfigImpl produce(Properties props, boolean isConnected) { if (props != null) { Object o = props.get(DS_CONFIG_NAME); if (o instanceof DistributionConfigImpl) { return (DistributionConfigImpl) o; } } return new DistributionConfigImpl(props, false, isCon...
static DistributionConfigImpl function(Properties props, boolean isConnected) { if (props != null) { Object o = props.get(DS_CONFIG_NAME); if (o instanceof DistributionConfigImpl) { return (DistributionConfigImpl) o; } } return new DistributionConfigImpl(props, false, isConnected); }
/** * Produce a DistributionConfigImpl for the given properties and return it. */
Produce a DistributionConfigImpl for the given properties and return it
produce
{ "repo_name": "ysung-pivotal/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java", "license": "apache-2.0", "size": 136972 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,621,920
public void setDateReceived(Date dateReceived) { this.dateReceived = dateReceived; }
void function(Date dateReceived) { this.dateReceived = dateReceived; }
/** * Sets the point in time this response was received from the asterisk * server. */
Sets the point in time this response was received from the asterisk server
setDateReceived
{ "repo_name": "pk1057/asterisk-java", "path": "src/main/java/org/asteriskjava/manager/response/ManagerResponse.java", "license": "apache-2.0", "size": 8667 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,034,238
public final void configure( final Configuration configuration ) throws ConfigurationException { final Map shorts = new HashMap(); final Map classes = new HashMap(); final Map hintclasses = new HashMap(); final Configuration[] roles = configuration.getChildren( "role" );...
final void function( final Configuration configuration ) throws ConfigurationException { final Map shorts = new HashMap(); final Map classes = new HashMap(); final Map hintclasses = new HashMap(); final Configuration[] roles = configuration.getChildren( "role" ); for( int i = 0; i < roles.length; i++ ) { final String n...
/** * Reads a configuration object and creates the role, shorthand, * and class name mapping. * * @param configuration The configuration object. * @throws ConfigurationException if the configuration is malformed */
Reads a configuration object and creates the role, shorthand, and class name mapping
configure
{ "repo_name": "eva-xuyen/excalibur", "path": "deprecated/component/src/main/java/org/apache/avalon/excalibur/component/DefaultRoleManager.java", "license": "apache-2.0", "size": 8050 }
[ "java.util.Collections", "java.util.HashMap", "java.util.Map", "org.apache.avalon.framework.configuration.Configuration", "org.apache.avalon.framework.configuration.ConfigurationException" ]
import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.ConfigurationException;
import java.util.*; import org.apache.avalon.framework.configuration.*;
[ "java.util", "org.apache.avalon" ]
java.util; org.apache.avalon;
2,377,344
private SQLException newSQLException(int errorCode) throws SQLException { return newSQLException(errorCode, errmsg()); }
SQLException function(int errorCode) throws SQLException { return newSQLException(errorCode, errmsg()); }
/** * Throws SQL Exception with error code. * @param errorCode Error code to be passed. * @return SQLException with error code and message. * @throws SQLException */
Throws SQL Exception with error code
newSQLException
{ "repo_name": "angelLYK/sqlite-jdbc", "path": "src/main/java/org/sqlite/core/DB.java", "license": "apache-2.0", "size": 39712 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,838,441
private void defineSlot(Node name, Node parent, JSType type) { defineSlot(name, parent, type, type == null); }
void function(Node name, Node parent, JSType type) { defineSlot(name, parent, type, type == null); }
/** * Defines a typed variable. The defining node will be annotated with the * variable's type or {@code null} if its type is inferred. * @param name the defining node. It must be a {@link Token#NAME}. * @param parent the {@code name}'s parent. * @param type the variable's type. It may be {@cod...
Defines a typed variable. The defining node will be annotated with the variable's type or null if its type is inferred
defineSlot
{ "repo_name": "johan/closure-compiler", "path": "src/com/google/javascript/jscomp/TypedScopeCreator.java", "license": "apache-2.0", "size": 53823 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.JSType" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType;
import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
1,687,214
Collection<P> parseAll(Iterable<I> inputs, IProgress progress, ICancel cancel) throws ParseException, InterruptedException;
Collection<P> parseAll(Iterable<I> inputs, IProgress progress, ICancel cancel) throws ParseException, InterruptedException;
/** * Parses all given input units into a parse units. * * @param inputs * Input units to parse. * @return Parse units. * @throws ParseException * When parsing fails unexpectedly. * @throws InterruptedException * When parsing is cancelled....
Parses all given input units into a parse units
parseAll
{ "repo_name": "metaborg/spoofax", "path": "org.metaborg.core/src/main/java/org/metaborg/core/syntax/IParser.java", "license": "apache-2.0", "size": 1279 }
[ "java.util.Collection", "org.metaborg.util.task.ICancel", "org.metaborg.util.task.IProgress" ]
import java.util.Collection; import org.metaborg.util.task.ICancel; import org.metaborg.util.task.IProgress;
import java.util.*; import org.metaborg.util.task.*;
[ "java.util", "org.metaborg.util" ]
java.util; org.metaborg.util;
1,233,540
public void setImages(List<ImageResult> images) { this.images = images; }
void function(List<ImageResult> images) { this.images = images; }
/** * set images list */
set images list
setImages
{ "repo_name": "ViXiVTech/ViXiV-Instant-Browser", "path": "app/src/main/java/net/vixiv/instant/reading/JResult.java", "license": "mpl-2.0", "size": 6258 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,306,378
public void testNameSpaces_RFC2253() throws Exception { String dn = "CN=A,CN=B\\ "; X500Principal principal = new X500Principal(dn); String s = principal.getName(X500Principal.RFC2253); assertEquals("CN=A,CN=B\\ ", s); }
void function() throws Exception { String dn = STR; X500Principal principal = new X500Principal(dn); String s = principal.getName(X500Principal.RFC2253); assertEquals(STR, s); }
/** * Inits X500Principal with the string with special characters - B\'space' * gets Name in RFC2253 format * compares with expected value of name - B\'space' */
Inits X500Principal with the string with special characters - B\'space' gets Name in RFC2253 format compares with expected value of name - B\'space'
testNameSpaces_RFC2253
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java", "license": "gpl-2.0", "size": 127872 }
[ "javax.security.auth.x500.X500Principal" ]
import javax.security.auth.x500.X500Principal;
import javax.security.auth.x500.*;
[ "javax.security" ]
javax.security;
1,320,164
@Test public void testMapWrappedLambda() throws Exception { PCollection<Integer> output = pipeline .apply(Create.of(1, 2, 3)) .apply( MapElements .via(new SimpleFunction<Integer, Integer>((Integer i) -> i * 2) {})); PAssert.that(output).c...
void function() throws Exception { PCollection<Integer> output = pipeline .apply(Create.of(1, 2, 3)) .apply( MapElements .via(new SimpleFunction<Integer, Integer>((Integer i) -> i * 2) {})); PAssert.that(output).containsInAnyOrder(6, 2, 4); pipeline.run(); }
/** * Basic test of {@link MapElements} with a lambda wrapped into a {@link SimpleFunction} to * remember its type. */
Basic test of <code>MapElements</code> with a lambda wrapped into a <code>SimpleFunction</code> to remember its type
testMapWrappedLambda
{ "repo_name": "wtanaka/beam", "path": "sdks/java/java8tests/src/test/java/org/apache/beam/sdk/transforms/MapElementsJava8Test.java", "license": "apache-2.0", "size": 3016 }
[ "org.apache.beam.sdk.testing.PAssert", "org.apache.beam.sdk.values.PCollection" ]
import org.apache.beam.sdk.testing.PAssert; import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.testing.*; import org.apache.beam.sdk.values.*;
[ "org.apache.beam" ]
org.apache.beam;
1,404,066
private String[] getMissingProperties(List<PropertyDefinition> actualProperties, Map<String, NamedValue> searchProperties) { List<String> missingProps = new ArrayList<String>(); for(PropertyDefinition propDef : actualProperties) { System.out.print("Checking whether " + propDe...
String[] function(List<PropertyDefinition> actualProperties, Map<String, NamedValue> searchProperties) { List<String> missingProps = new ArrayList<String>(); for(PropertyDefinition propDef : actualProperties) { System.out.print(STR + propDef.getName() + STR); if(!searchProperties.containsKey(propDef.getName())) { Syste...
/** * Tests the query service call */
Tests the query service call
getMissingProperties
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/web-service-client/source/test-java/org/alfresco/webservice/test/RepositoryServiceSystemTest.java", "license": "lgpl-3.0", "size": 53853 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.alfresco.webservice.types.NamedValue", "org.alfresco.webservice.types.PropertyDefinition" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.alfresco.webservice.types.NamedValue; import org.alfresco.webservice.types.PropertyDefinition;
import java.util.*; import org.alfresco.webservice.types.*;
[ "java.util", "org.alfresco.webservice" ]
java.util; org.alfresco.webservice;
2,538,959
public void updateParameters(final List<org.yamcs.protobuf.Pvalue.ParameterValue> gpvList) { //first validate that the names are sofware parameters and the types match for(org.yamcs.protobuf.Pvalue.ParameterValue gpv: gpvList) { Parameter p = getParam(gpv.getId()); if(p==null...
void function(final List<org.yamcs.protobuf.Pvalue.ParameterValue> gpvList) { for(org.yamcs.protobuf.Pvalue.ParameterValue gpv: gpvList) { Parameter p = getParam(gpv.getId()); if(p==null) { throw new IllegalArgumentException(STR+gpv.getId()+"'"); } ParameterTypeProcessor.checkEngValueAssignment(p, ValueUtility.fromGpb(...
/** * update the list of parameters. * - resolves NamedObjectId -&gt; Parameter * - sends the result to PRM */
update the list of parameters. - resolves NamedObjectId -&gt; Parameter - sends the result to PRM
updateParameters
{ "repo_name": "bitblit11/yamcs", "path": "yamcs-core/src/main/java/org/yamcs/parameter/SoftwareParameterManager.java", "license": "agpl-3.0", "size": 6913 }
[ "java.util.List", "org.yamcs.utils.ValueUtility", "org.yamcs.xtce.Parameter", "org.yamcs.xtceproc.ParameterTypeProcessor" ]
import java.util.List; import org.yamcs.utils.ValueUtility; import org.yamcs.xtce.Parameter; import org.yamcs.xtceproc.ParameterTypeProcessor;
import java.util.*; import org.yamcs.utils.*; import org.yamcs.xtce.*; import org.yamcs.xtceproc.*;
[ "java.util", "org.yamcs.utils", "org.yamcs.xtce", "org.yamcs.xtceproc" ]
java.util; org.yamcs.utils; org.yamcs.xtce; org.yamcs.xtceproc;
1,082,089
@LogToResult(message = "sleep and do nothing for x seconds", logClassInstance = false) public Region sleep(Double seconds) { return typingUtil.sleep((long) (seconds * 1000L)); }
@LogToResult(message = STR, logClassInstance = false) Region function(Double seconds) { return typingUtil.sleep((long) (seconds * 1000L)); }
/** * Blocks the current testcase execution for x seconds * * @param seconds to sleep * @return this {@link Region} or NULL on errors. */
Blocks the current testcase execution for x seconds
sleep
{ "repo_name": "ConSol/sakuli", "path": "src/core/src/main/java/org/sakuli/actions/screenbased/Region.java", "license": "apache-2.0", "size": 20703 }
[ "org.sakuli.actions.logging.LogToResult" ]
import org.sakuli.actions.logging.LogToResult;
import org.sakuli.actions.logging.*;
[ "org.sakuli.actions" ]
org.sakuli.actions;
2,414,911
private void convertCurrentResultIntoObject(Map<Serializable, Acl> acls, ResultSet rs) throws SQLException { Long id = rs.getLong("acl_id"); // If we already have an ACL for this ID, just create the ACE Acl acl = acls.get(id); if (acl == null) { // Make an AclImpl and pop it into the Map ...
void function(Map<Serializable, Acl> acls, ResultSet rs) throws SQLException { Long id = rs.getLong(STR); Acl acl = acls.get(id); if (acl == null) { Serializable identifier = (Serializable) rs.getObject(STR); identifier = aclClassIdUtils.identifierFrom(identifier, rs); ObjectIdentity objectIdentity = new ObjectIdentity...
/** * Accepts the current <code>ResultSet</code> row, and converts it into an * <code>AclImpl</code> that contains a <code>StubAclParent</code> * * @param acls the Map we should add the converted Acl to * @param rs the ResultSet focused on a current row * * @throws SQLException if something goes wr...
Accepts the current <code>ResultSet</code> row, and converts it into an <code>AclImpl</code> that contains a <code>StubAclParent</code>
convertCurrentResultIntoObject
{ "repo_name": "eddumelendez/spring-security", "path": "acl/src/main/java/org/springframework/security/acls/jdbc/BasicLookupStrategy.java", "license": "apache-2.0", "size": 26516 }
[ "java.io.Serializable", "java.sql.ResultSet", "java.sql.SQLException", "java.util.List", "java.util.Map", "org.springframework.security.acls.domain.AccessControlEntryImpl", "org.springframework.security.acls.domain.AclImpl", "org.springframework.security.acls.domain.ObjectIdentityImpl", "org.springf...
import java.io.Serializable; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; import java.util.Map; import org.springframework.security.acls.domain.AccessControlEntryImpl; import org.springframework.security.acls.domain.AclImpl; import org.springframework.security.acls.domain.ObjectIdenti...
import java.io.*; import java.sql.*; import java.util.*; import org.springframework.security.acls.domain.*; import org.springframework.security.acls.model.*;
[ "java.io", "java.sql", "java.util", "org.springframework.security" ]
java.io; java.sql; java.util; org.springframework.security;
2,173,999
@Override public void onFinish(SimpleTaskQueueProgressFragment fragment, Exception exception) { if (mMessage != 0) fragment.showToast(mMessage); } }; // Get the fragment to display task progress SimpleTaskQueueProgressFragment.runTaskWithProgress(activity, R.string.connecting_to_w...
void function(SimpleTaskQueueProgressFragment fragment, Exception exception) { if (mMessage != 0) fragment.showToast(mMessage); } }; SimpleTaskQueueProgressFragment.runTaskWithProgress(activity, R.string.connecting_to_web_site, task, true, 0); }
/** * Display any error message */
Display any error message
onFinish
{ "repo_name": "Imkal/Book-Catalogue", "path": "src/com/eleybourn/bookcatalogue/goodreads/GoodreadsRegister.java", "license": "gpl-3.0", "size": 5346 }
[ "com.eleybourn.bookcatalogue.utils.SimpleTaskQueueProgressFragment" ]
import com.eleybourn.bookcatalogue.utils.SimpleTaskQueueProgressFragment;
import com.eleybourn.bookcatalogue.utils.*;
[ "com.eleybourn.bookcatalogue" ]
com.eleybourn.bookcatalogue;
221,782
public void setHorizontalAlignment(HorizontalAlignmentType alignType) { getStyleHandler().setHorizontalAlignment(alignType); }
void function(HorizontalAlignmentType alignType) { getStyleHandler().setHorizontalAlignment(alignType); }
/** * Set the horizontal alignment setting of this cell. If the alignment is * set as Default, the explicit horizontal alignment setting is removed. * * @param alignType * the horizontal alignment setting. */
Set the horizontal alignment setting of this cell. If the alignment is set as Default, the explicit horizontal alignment setting is removed
setHorizontalAlignment
{ "repo_name": "jbjonesjr/geoproponis", "path": "external/simple-odf-0.8.1-incubating-sources/org/odftoolkit/simple/table/Cell.java", "license": "gpl-2.0", "size": 87992 }
[ "org.odftoolkit.simple.style.StyleTypeDefinitions" ]
import org.odftoolkit.simple.style.StyleTypeDefinitions;
import org.odftoolkit.simple.style.*;
[ "org.odftoolkit.simple" ]
org.odftoolkit.simple;
571,373
@Test public void testSetBooleanMapProperty() { TestJsonObject testJsonObject = JsonObjectFactory.get().createJsonObject(TestJsonObject.class); JsonBooleanMap testBooleanMapProperty = JsonObjectFactory.get().createJsonObject(JsonBooleanMap.class); testJsonObject.setTestBooleanMapProperty(testBoolea...
void function() { TestJsonObject testJsonObject = JsonObjectFactory.get().createJsonObject(TestJsonObject.class); JsonBooleanMap testBooleanMapProperty = JsonObjectFactory.get().createJsonObject(JsonBooleanMap.class); testJsonObject.setTestBooleanMapProperty(testBooleanMapProperty); assertEquals(testBooleanMapProperty,...
/** * Test the setting of the boolean map value of a property. * <p> * This test asserts that the setting of the boolean map value of a property * changes the value of the corresponding property of the underlying JSON * object. */
Test the setting of the boolean map value of a property. This test asserts that the setting of the boolean map value of a property changes the value of the corresponding property of the underlying JSON object
testSetBooleanMapProperty
{ "repo_name": "kjots/json-toolkit", "path": "json-object.shared/src/test/java/org/kjots/json/object/shared/JsonObjectGeneratorBooleanTestBase.java", "license": "apache-2.0", "size": 19200 }
[ "junit.framework.Assert" ]
import junit.framework.Assert;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,278,337
protected void addIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Split_id_feature"), getString("_UI_PropertyDescriptor_description", "_UI...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), JBatchPackage.Literals.SPLIT__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,...
/** * This adds a property descriptor for the Id feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Id feature.
addIdPropertyDescriptor
{ "repo_name": "awltech/eclipse-jbatch-designer", "path": "com.worldline.jbatch.designer/com.worldline.jbatch.designer.model.edit/src/main/java/com/worldline/jbatch/designer/model/jbatch/provider/SplitItemProvider.java", "license": "lgpl-3.0", "size": 6669 }
[ "com.worldline.jbatch.designer.model.jbatch.JBatchPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import com.worldline.jbatch.designer.model.jbatch.JBatchPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import com.worldline.jbatch.designer.model.jbatch.*; import org.eclipse.emf.edit.provider.*;
[ "com.worldline.jbatch", "org.eclipse.emf" ]
com.worldline.jbatch; org.eclipse.emf;
252,924
public static Serializable read(InputStream input, BoxedValueHelper helper) { return (Serializable) read(input, null, helper); }
static Serializable function(InputStream input, BoxedValueHelper helper) { return (Serializable) read(input, null, helper); }
/** * Read using provided boxed value helper. This method expects the full value * type header, followed by contents, that are delegated to the provided * helper. It handles null. * * @param input the stream to read from. * @param helper the helper that reads the type-specific part of the content. ...
Read using provided boxed value helper. This method expects the full value type header, followed by contents, that are delegated to the provided helper. It handles null
read
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/CORBA/CDR/Vio.java", "license": "gpl-2.0", "size": 45273 }
[ "java.io.Serializable", "org.omg.CORBA" ]
import java.io.Serializable; import org.omg.CORBA;
import java.io.*; import org.omg.*;
[ "java.io", "org.omg" ]
java.io; org.omg;
1,322,123
if ((change == null || !change)) { removeProperty(OpenmrsConstants.USER_PROPERTY_CHANGE_PASSWORD); } else { addProperty(OpenmrsConstants.USER_PROPERTY_CHANGE_PASSWORD, String.valueOf(change)); } }
if ((change == null !change)) { removeProperty(OpenmrsConstants.USER_PROPERTY_CHANGE_PASSWORD); } else { addProperty(OpenmrsConstants.USER_PROPERTY_CHANGE_PASSWORD, String.valueOf(change)); } }
/** * Sets the user property which determines if a new user should change his password upon logging * in the first time. * * @param change decides if the user should be forced to change the password * @should add forcePassword property in user properties map when value is set to true * @should do not...
Sets the user property which determines if a new user should change his password upon logging in the first time
setSupposedToChangePassword
{ "repo_name": "Bhamni/openmrs-core", "path": "web/src/main/java/org/openmrs/web/user/UserProperties.java", "license": "mpl-2.0", "size": 2971 }
[ "org.openmrs.util.OpenmrsConstants" ]
import org.openmrs.util.OpenmrsConstants;
import org.openmrs.util.*;
[ "org.openmrs.util" ]
org.openmrs.util;
1,769,572
@Generated @Selector("displaceXWithNoise:yWithNoise:zWithNoise:") public native void displaceXWithNoiseYWithNoiseZWithNoise(GKNoise xDisplacementNoise, GKNoise yDisplacementNoise, GKNoise zDisplacementNoise);
@Selector(STR) native void function(GKNoise xDisplacementNoise, GKNoise yDisplacementNoise, GKNoise zDisplacementNoise);
/** * Displaces all noise values by the values at the same positions of the specified noises. * * @param xDisplacementNoise The noise from which to displace along the x-axis this noise's values at the same positions. * @param yDisplacementNoise The noise from which to displace along the y-axis this ...
Displaces all noise values by the values at the same positions of the specified noises
displaceXWithNoiseYWithNoiseZWithNoise
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/gameplaykit/GKNoise.java", "license": "apache-2.0", "size": 14043 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,636,363
public IDataset getFinal_beam_divergence();
IDataset function();
/** * Divergence FWHM of beam leaving this component * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_ANGLE * <b>Dimensions:</b> 1: 2; 2: j; * </p> * * @return the value. */
Divergence FWHM of beam leaving this component Type: NX_FLOAT Units: NX_ANGLE Dimensions: 1: 2; 2: j;
getFinal_beam_divergence
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXbeam.java", "license": "epl-1.0", "size": 17796 }
[ "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.january.dataset.IDataset;
import org.eclipse.january.dataset.*;
[ "org.eclipse.january" ]
org.eclipse.january;
2,568,084
private static void checkSnapshot( INode target, List<INodeDirectory> snapshottableDirs) throws SnapshotException { if (target.isDirectory()) { INodeDirectory targetDir = target.asDirectory(); DirectorySnapshottableFeature sf = targetDir .getDirectorySnapshottableFeature(); ...
static void function( INode target, List<INodeDirectory> snapshottableDirs) throws SnapshotException { if (target.isDirectory()) { INodeDirectory targetDir = target.asDirectory(); DirectorySnapshottableFeature sf = targetDir .getDirectorySnapshottableFeature(); if (sf != null) { if (sf.getNumSnapshots() > 0) { String f...
/** * Check if the given INode (or one of its descendants) is snapshottable and * already has snapshots. * * @param target The given INode * @param snapshottableDirs The list of directories that are snapshottable * but do not have snapshots yet */
Check if the given INode (or one of its descendants) is snapshottable and already has snapshots
checkSnapshot
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java", "license": "apache-2.0", "size": 12877 }
[ "java.util.List", "org.apache.hadoop.hdfs.protocol.SnapshotException", "org.apache.hadoop.hdfs.server.namenode.snapshot.DirectorySnapshottableFeature", "org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot" ]
import java.util.List; import org.apache.hadoop.hdfs.protocol.SnapshotException; import org.apache.hadoop.hdfs.server.namenode.snapshot.DirectorySnapshottableFeature; import org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot;
import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.snapshot.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,508,220
public void deleteSource(String peerZnode, boolean closeConnection) { try { ZKUtil.deleteNodeRecursively(this.zookeeper, ZKUtil.joinZNode(rsServerNameZnode, peerZnode)); if (closeConnection) { this.peerClusters.get(peerZnode).getZkw().close(); this.peerClusters.remove(peerZno...
void function(String peerZnode, boolean closeConnection) { try { ZKUtil.deleteNodeRecursively(this.zookeeper, ZKUtil.joinZNode(rsServerNameZnode, peerZnode)); if (closeConnection) { this.peerClusters.get(peerZnode).getZkw().close(); this.peerClusters.remove(peerZnode); } } catch (KeeperException e) { this.abortable.abo...
/** * Delete a complete queue of hlogs * @param peerZnode znode of the peer cluster queue of hlogs to delete */
Delete a complete queue of hlogs
deleteSource
{ "repo_name": "JichengSong/hbase", "path": "src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java", "license": "apache-2.0", "size": 34562 }
[ "org.apache.hadoop.hbase.zookeeper.ZKUtil", "org.apache.zookeeper.KeeperException" ]
import org.apache.hadoop.hbase.zookeeper.ZKUtil; import org.apache.zookeeper.KeeperException;
import org.apache.hadoop.hbase.zookeeper.*; import org.apache.zookeeper.*;
[ "org.apache.hadoop", "org.apache.zookeeper" ]
org.apache.hadoop; org.apache.zookeeper;
1,835,852
@POST @Path("/postJSONWithLIsta") @Consumes({MediaType.APPLICATION_JSON}) @Produces(MediaType.TEXT_PLAIN) public Response createNewCouplingParams(@MultipartForm LinkUploadForm form) { String taxonUUID = form.getTaxonUUID(); Link link = new Link(form.getTypeOfSystem(), taxonUUID, form...
@Path(STR) @Consumes({MediaType.APPLICATION_JSON}) @Produces(MediaType.TEXT_PLAIN) Response function(@MultipartForm LinkUploadForm form) { String taxonUUID = form.getTaxonUUID(); Link link = new Link(form.getTypeOfSystem(), taxonUUID, form.getNameOfSystem(), form.getSystemURL()); String[] mediaList = form.getMediaList(...
/** * Skyttner used this when importing media from NF to here: curl -i -X POST * -H 'Content-Type: application/json' -d * '{"typeOfSystem":"NF_TAXON","taxonUUID":"taxon-nr","nameOfSystem":"NF_SYSTEM","systemURL":"NF_URL","mediaList":["e4a3cf7d-add4-4949-a6ce-0f5594e61970","ebb45da5-bd25-45af-8a04-3470d38...
Skyttner used this when importing media from NF to here: curl -i -X POST -H 'Content-Type: application/json' -d '{"typeOfSystem":"NF_TAXON","taxonUUID":"taxon-nr","nameOfSystem":"NF_SYSTEM","systemURL":"NF_URL","mediaList":["e4a3cf7d-add4-4949-a6ce-0f5594e61970","ebb45da5-bd25-45af-8a04-3470d38523d1"]}' HREF Should be ...
createNewCouplingParams
{ "repo_name": "Inkimar/dina-mediaserver", "path": "MediaServerResteasy/src/main/java/se/nrm/mediaserver/resteasy/MediaResourceForm.java", "license": "gpl-3.0", "size": 24178 }
[ "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.jboss.resteasy.annotations.providers.multipart.MultipartForm", "se.nrm.mediaserver.media3.domain.Link", "se.nrm.mediaserver.resteasy.util.LinkUploadForm" ]
import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.jboss.resteasy.annotations.providers.multipart.MultipartForm; import se.nrm.mediaserver.media3.domain.Link; import se.nrm.mediaserver.resteasy.util.LinkUploa...
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jboss.resteasy.annotations.providers.multipart.*; import se.nrm.mediaserver.media3.domain.*; import se.nrm.mediaserver.resteasy.util.*;
[ "javax.ws", "org.jboss.resteasy", "se.nrm.mediaserver" ]
javax.ws; org.jboss.resteasy; se.nrm.mediaserver;
374,786
public void setMinute(NumberItemStyle style) { setValue(Property.MINUTE, style); }
void function(NumberItemStyle style) { setValue(Property.MINUTE, style); }
/** * Sets the representation of the Minute. * * @param style the representation of the Minute */
Sets the representation of the Minute
setMinute
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/intl/DateTimeFormatOptions.java", "license": "apache-2.0", "size": 13119 }
[ "org.pepstock.charba.client.intl.enums.NumberItemStyle" ]
import org.pepstock.charba.client.intl.enums.NumberItemStyle;
import org.pepstock.charba.client.intl.enums.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
2,905,318
@Override public void init() throws ServletException { super.init(); String casServiceHost = System.getProperty("cas.service.host", "localhost:8443"); targetUrl = "https://"+casServiceHost+"/cas-sample/secure/"; } private static final long serialVersionUID = -7720161771819727775...
void function() throws ServletException { super.init(); String casServiceHost = System.getProperty(STR, STR); targetUrl = "https: } private static final long serialVersionUID = -7720161771819727775L;
/** * Initialize the target URL. It allows for the host to change based upon * the "cas.service.host" system property. If the property is not set, the * default is "localhost:8443". */
Initialize the target URL. It allows for the host to change based upon the "cas.service.host" system property. If the property is not set, the default is "localhost:8443"
init
{ "repo_name": "dsyer/spring-security", "path": "samples/cas/sample/src/main/java/org/springframework/security/samples/cas/web/ProxyTicketSampleServlet.java", "license": "apache-2.0", "size": 3530 }
[ "javax.servlet.ServletException" ]
import javax.servlet.ServletException;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
1,102,461