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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
short readShort() throws IOException; | short readShort() throws IOException; | /**
* Reads two bytes from the stream, and (conceptually)
* concatenates them according to the current byte order, and
* returns the result as a <code>short</code> value.
*
* <p> The bit offset within the stream is reset to zero before
* the read occurs.
*
* @return a signed shor... | Reads two bytes from the stream, and (conceptually) concatenates them according to the current byte order, and returns the result as a <code>short</code> value. The bit offset within the stream is reset to zero before the read occurs | readShort | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/javax/imageio/stream/ImageInputStream.java",
"license": "gpl-2.0",
"size": 40251
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,714,493 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<RuleInner> listBySubscriptions(
String resourceGroupName, String namespaceName, String topicName, String subscriptionName) {
final Integer skip = null;
final Integer top = null;
return new PagedIterable<>(
... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<RuleInner> function( String resourceGroupName, String namespaceName, String topicName, String subscriptionName) { final Integer skip = null; final Integer top = null; return new PagedIterable<>( listBySubscriptionsAsync(resourceGroupName, namespaceName, topi... | /**
* List all the rules within given topic-subscription.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param namespaceName The namespace name.
* @param topicName The topic name.
* @param subscriptionName The subscription name.
* @throws Ill... | List all the rules within given topic-subscription | listBySubscriptions | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/RulesClientImpl.java",
"license": "mit",
"size": 53634
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.servicebus.fluent.models.RuleInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.servicebus.fluent.models.RuleInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.servicebus.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 735,352 |
private void alertsProfilesShouldBeProperlyDeleted() throws Exception {
// user1 deletes their profile
this.mockMvc.perform(delete(alertUrl + "/profile/user1").with(httpBasic(admin, password)))
.andExpect(status().isOk());
// user1 should get a 404 when trying to delete an alerts profi... | void function() throws Exception { this.mockMvc.perform(delete(alertUrl + STR).with(httpBasic(admin, password))) .andExpect(status().isOk()); this.mockMvc.perform(delete(alertUrl + STR).with(httpBasic(admin, password))) .andExpect(status().isNotFound()); this.mockMvc.perform(get(alertUrl + STR).with(httpBasic(user1, pa... | /** Ensures users can delete their profiles independently of other users. When user1 deletes an
* alerts profile, alerts profile for user2 should not be deleted. This tests depends on alerts
* profiles existing for user1 and user2.
*
* @throws Exception
*/ | Ensures users can delete their profiles independently of other users. When user1 deletes an alerts profile, alerts profile for user2 should not be deleted. This tests depends on alerts profiles existing for user1 and user2 | alertsProfilesShouldBeProperlyDeleted | {
"repo_name": "mattf-horton/incubator-metron",
"path": "metron-interface/metron-rest/src/test/java/org/apache/metron/rest/controller/AlertControllerIntegrationTest.java",
"license": "apache-2.0",
"size": 14809
} | [
"org.hamcrest.Matchers",
"org.springframework.http.MediaType",
"org.springframework.test.web.servlet.result.MockMvcResultMatchers"
] | import org.hamcrest.Matchers; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; | import org.hamcrest.*; import org.springframework.http.*; import org.springframework.test.web.servlet.result.*; | [
"org.hamcrest",
"org.springframework.http",
"org.springframework.test"
] | org.hamcrest; org.springframework.http; org.springframework.test; | 167,522 |
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>GET</code> method | doGet | {
"repo_name": "Navneet-Bedi/BookStoreApplication",
"path": "src/UpdateBookServlet.java",
"license": "gpl-3.0",
"size": 2985
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 1,794,351 |
public TxContext getContext() throws UnknownTransactionException
{
if (context != null) {
return context;
} else {
throw new UnknownTransactionException();
}
} | TxContext function() throws UnknownTransactionException { if (context != null) { return context; } else { throw new UnknownTransactionException(); } } | /**
* obtain a resumable transaction context for the bridged-to transaction
* @return a resumable transaction context
* @throws UnknownTransactionException if this transaction has been recovered from the log and hence
* has no associated transaction context.
*/ | obtain a resumable transaction context for the bridged-to transaction | getContext | {
"repo_name": "nmcl/scratch",
"path": "graalvm/transactions/fork/narayana/XTS/bridge/src/org/jboss/jbossts/xts/bridge/at/BridgeWrapper.java",
"license": "apache-2.0",
"size": 9456
} | [
"com.arjuna.mw.wst.TxContext",
"com.arjuna.wst.UnknownTransactionException"
] | import com.arjuna.mw.wst.TxContext; import com.arjuna.wst.UnknownTransactionException; | import com.arjuna.mw.wst.*; import com.arjuna.wst.*; | [
"com.arjuna.mw",
"com.arjuna.wst"
] | com.arjuna.mw; com.arjuna.wst; | 1,125,071 |
public void register( )
{
ResourceType rt = new ResourceType( );
rt.setResourceIdServiceClass( PortletResourceIdService.class.getName( ) );
rt.setResourceTypeKey( PortletType.RESOURCE_TYPE );
rt.setResourceTypeLabelKey( PROPERTY_LABEL_RESOURCE_TYPE );
Permission p = new ... | void function( ) { ResourceType rt = new ResourceType( ); rt.setResourceIdServiceClass( PortletResourceIdService.class.getName( ) ); rt.setResourceTypeKey( PortletType.RESOURCE_TYPE ); rt.setResourceTypeLabelKey( PROPERTY_LABEL_RESOURCE_TYPE ); Permission p = new Permission( ); p.setPermissionKey( PERMISSION_CREATE ); ... | /**
* Initializes the service
*/ | Initializes the service | register | {
"repo_name": "lutece-platform/lutece-core",
"path": "src/java/fr/paris/lutece/portal/service/portlet/PortletResourceIdService.java",
"license": "bsd-3-clause",
"size": 4229
} | [
"fr.paris.lutece.portal.business.portlet.PortletType",
"fr.paris.lutece.portal.service.rbac.Permission",
"fr.paris.lutece.portal.service.rbac.ResourceType",
"fr.paris.lutece.portal.service.rbac.ResourceTypeManager"
] | import fr.paris.lutece.portal.business.portlet.PortletType; import fr.paris.lutece.portal.service.rbac.Permission; import fr.paris.lutece.portal.service.rbac.ResourceType; import fr.paris.lutece.portal.service.rbac.ResourceTypeManager; | import fr.paris.lutece.portal.business.portlet.*; import fr.paris.lutece.portal.service.rbac.*; | [
"fr.paris.lutece"
] | fr.paris.lutece; | 2,210,900 |
private static boolean mappingCompatible(EntitySchema oldSchema,
EntitySchema newSchema) {
for (FieldMapping oldFieldMapping : oldSchema.getColumnMappingDescriptor()
.getFieldMappings()) {
FieldMapping newFieldMapping = newSchema.getColumnMappingDescriptor()
.getFieldMapping(oldField... | static boolean function(EntitySchema oldSchema, EntitySchema newSchema) { for (FieldMapping oldFieldMapping : oldSchema.getColumnMappingDescriptor() .getFieldMappings()) { FieldMapping newFieldMapping = newSchema.getColumnMappingDescriptor() .getFieldMapping(oldFieldMapping.getFieldName()); if (newFieldMapping != null)... | /**
* Ensure that the column mappings for the shared fields between the old and
* new schema haven't changed.
*
* @param oldSchema
* @param newSchema
* @return true if the mappings are compatible, false if not.
*/ | Ensure that the column mappings for the shared fields between the old and new schema haven't changed | mappingCompatible | {
"repo_name": "dlanza1/kite",
"path": "kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/AvroEntitySchema.java",
"license": "apache-2.0",
"size": 5309
} | [
"org.kitesdk.data.FieldMapping",
"org.kitesdk.data.hbase.impl.EntitySchema"
] | import org.kitesdk.data.FieldMapping; import org.kitesdk.data.hbase.impl.EntitySchema; | import org.kitesdk.data.*; import org.kitesdk.data.hbase.impl.*; | [
"org.kitesdk.data"
] | org.kitesdk.data; | 653,572 |
private void paintScoreNote(TGLayout layout,TGPainter painter, float fromX, float fromY, float spacing) {
if((layout.getStyle() & TGLayout.DISPLAY_SCORE) != 0 ){
float scale = layout.getScoreLineSpacing();
float layoutScale = layout.getScale();
int direction = getVoiceImpl().getBeatGroup().getDirection();... | void function(TGLayout layout,TGPainter painter, float fromX, float fromY, float spacing) { if((layout.getStyle() & TGLayout.DISPLAY_SCORE) != 0 ){ float scale = layout.getScoreLineSpacing(); float layoutScale = layout.getScale(); int direction = getVoiceImpl().getBeatGroup().getDirection(); int key = getMeasureImpl().... | /**
* Pinta la nota en la partitura
*/ | Pinta la nota en la partitura | paintScoreNote | {
"repo_name": "bluenote10/TuxguitarParser",
"path": "tuxguitar-src/TuxGuitar-lib/src/org/herac/tuxguitar/graphics/control/TGNoteImpl.java",
"license": "lgpl-2.1",
"size": 26434
} | [
"org.herac.tuxguitar.graphics.TGPainter",
"org.herac.tuxguitar.graphics.control.painters.TGKeySignaturePainter",
"org.herac.tuxguitar.graphics.control.painters.TGNotePainter",
"org.herac.tuxguitar.song.models.TGDuration"
] | import org.herac.tuxguitar.graphics.TGPainter; import org.herac.tuxguitar.graphics.control.painters.TGKeySignaturePainter; import org.herac.tuxguitar.graphics.control.painters.TGNotePainter; import org.herac.tuxguitar.song.models.TGDuration; | import org.herac.tuxguitar.graphics.*; import org.herac.tuxguitar.graphics.control.painters.*; import org.herac.tuxguitar.song.models.*; | [
"org.herac.tuxguitar"
] | org.herac.tuxguitar; | 521,979 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<HybridConnectionInner> listByNamespace(String resourceGroupName, String namespaceName) {
return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<HybridConnectionInner> function(String resourceGroupName, String namespaceName) { return new PagedIterable<>(listByNamespaceAsync(resourceGroupName, namespaceName)); } | /**
* Lists the hybrid connection within the namespace.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param namespaceName The namespace name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementExcepti... | Lists the hybrid connection within the namespace | listByNamespace | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/relay/azure-resourcemanager-relay/src/main/java/com/azure/resourcemanager/relay/implementation/HybridConnectionsClientImpl.java",
"license": "mit",
"size": 113527
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.relay.fluent.models.HybridConnectionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.relay.fluent.models.HybridConnectionInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.relay.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,728,990 |
public static Identity domain(String domain) {
return new Identity(Type.DOMAIN, checkNotNull(domain));
} | static Identity function(String domain) { return new Identity(Type.DOMAIN, checkNotNull(domain)); } | /**
* Returns a new domain identity.
*
* @param domain A Google Apps domain name that represents all the users of that domain. For
* example, <I>google.com</I> or <I>example.com</I>.
*/ | Returns a new domain identity | domain | {
"repo_name": "jabubake/google-cloud-java",
"path": "google-cloud-core/src/main/java/com/google/cloud/Identity.java",
"license": "apache-2.0",
"size": 6869
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,452,054 |
public boolean isGettingChild(LifeEventProbability lifeEventProbability,
Random probability, int numberOfChild) {
if (this.getHouseholdRelationship() == HouseholdRelationship.Visitor) {
return false;
}
double reproductionProbability = lifeEventProbability
.getReproductionProbabilityByAgeSex... | boolean function(LifeEventProbability lifeEventProbability, Random probability, int numberOfChild) { if (this.getHouseholdRelationship() == HouseholdRelationship.Visitor) { return false; } double reproductionProbability = lifeEventProbability .getReproductionProbabilityByAgeSex(getAge(), numberOfChild); double randomPr... | /**
* determines whether this individual get new babies.
*
* @param lifeEventProbability
* @param probability
* @param numberOfChild
* @return
*/ | determines whether this individual get new babies | isGettingChild | {
"repo_name": "smart-facility/TransMob",
"path": "model/src/main/java/core/synthetic/individual/Individual.java",
"license": "lgpl-3.0",
"size": 29828
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 1,091,521 |
// *****************************************************
// Package private methods
// *****************************************************
int lGetAdornedPreferredWidth(int height) {
if (height > 2 * ScreenSkin.PAD_FORM_ITEMS) {
height -= 2 * ScreenSkin.PAD_FORM_ITEMS;
} ... | int lGetAdornedPreferredWidth(int height) { if (height > 2 * ScreenSkin.PAD_FORM_ITEMS) { height -= 2 * ScreenSkin.PAD_FORM_ITEMS; } else { height = -1; } return lGetPreferredWidth(height) + 2 * ScreenSkin.PAD_FORM_ITEMS; } | /**
* Used by the Form Layout to set the size of this Item
*
* @param height the tentative content height in pixels
* @return the preferred width
*/ | Used by the Form Layout to set the size of this Item | lGetAdornedPreferredWidth | {
"repo_name": "tommythorn/yari",
"path": "shared/cacao-related/phoneme_feature/midp/src/highlevelui/lcdlf/lfjava/classes/javax/microedition/lcdui/ItemLFImpl.java",
"license": "gpl-2.0",
"size": 47456
} | [
"com.sun.midp.chameleon.skins.ScreenSkin"
] | import com.sun.midp.chameleon.skins.ScreenSkin; | import com.sun.midp.chameleon.skins.*; | [
"com.sun.midp"
] | com.sun.midp; | 183,682 |
public ByteBuffer getBuffer() {
return buff;
} | ByteBuffer function() { return buff; } | /**
* Get the byte buffer.
*
* @return the byte buffer
*/ | Get the byte buffer | getBuffer | {
"repo_name": "miloszpiglas/h2mod",
"path": "src/main/org/h2/mvstore/WriteBuffer.java",
"license": "mpl-2.0",
"size": 6874
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,360,986 |
ResultsStream.QueryBuilder<String> findAllDeviceTokenForVariantIDByCriteria(String variantID, List<String> categories, List<String> aliases, List<String> deviceTypes, int maxResults, String lastTokenFromPreviousBatch); | ResultsStream.QueryBuilder<String> findAllDeviceTokenForVariantIDByCriteria(String variantID, List<String> categories, List<String> aliases, List<String> deviceTypes, int maxResults, String lastTokenFromPreviousBatch); | /**
* Used for (Android/iOS) Sender API. Queries the available device-tokens for a given variant, based on provided criteria.
*
* @param variantID the variantID for the filter
* @param categories applied categories for the filter
* @param aliases applied aliases for the filter
* @param dev... | Used for (Android/iOS) Sender API. Queries the available device-tokens for a given variant, based on provided criteria | findAllDeviceTokenForVariantIDByCriteria | {
"repo_name": "edewit/aerogear-unifiedpush-server",
"path": "service/src/main/java/org/jboss/aerogear/unifiedpush/service/ClientInstallationService.java",
"license": "apache-2.0",
"size": 5766
} | [
"java.util.List",
"org.jboss.aerogear.unifiedpush.dao.ResultsStream"
] | import java.util.List; import org.jboss.aerogear.unifiedpush.dao.ResultsStream; | import java.util.*; import org.jboss.aerogear.unifiedpush.dao.*; | [
"java.util",
"org.jboss.aerogear"
] | java.util; org.jboss.aerogear; | 2,768,337 |
public boolean protect(DatagramSocket socket) {
return protect(socket.getFileDescriptor$().getInt$());
}
/**
* Return the communication interface to the service. This method returns
* {@code null} on {@link Intent}s other than {@link #SERVICE_INTERFACE} | boolean function(DatagramSocket socket) { return protect(socket.getFileDescriptor$().getInt$()); } /** * Return the communication interface to the service. This method returns * {@code null} on {@link Intent}s other than {@link #SERVICE_INTERFACE} | /**
* Convenience method to protect a {@link DatagramSocket} from VPN
* connections.
*
* @return {@code true} on success.
* @see #protect(int)
*/ | Convenience method to protect a <code>DatagramSocket</code> from VPN connections | protect | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/android/net/VpnService.java",
"license": "apache-2.0",
"size": 19458
} | [
"android.content.Intent",
"java.net.DatagramSocket"
] | import android.content.Intent; import java.net.DatagramSocket; | import android.content.*; import java.net.*; | [
"android.content",
"java.net"
] | android.content; java.net; | 2,851,107 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginRestart(String resourceGroupName, String vmName, Context context) {
return beginRestartAsync(resourceGroupName, vmName, context).getSyncPoller();
} | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> function(String resourceGroupName, String vmName, Context context) { return beginRestartAsync(resourceGroupName, vmName, context).getSyncPoller(); } | /**
* The operation to restart a virtual machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the va... | The operation to restart a virtual machine | beginRestart | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java",
"license": "mit",
"size": 333925
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 902,683 |
public boolean checkPrefs(List lst) {
HashMap map = new HashMap();
for(int i=0; i<lst.size(); i++) {
String value = ((String) lst.get(i));
// No selection made - ignore
if( value==null || value.trim().equals(Preference.BLANK_PREF_VALUE)) {
... | boolean function(List lst) { HashMap map = new HashMap(); for(int i=0; i<lst.size(); i++) { String value = ((String) lst.get(i)); if( value==null value.trim().equals(Preference.BLANK_PREF_VALUE)) { continue; } if(map.get(value.trim())!=null) { lst.set(i, Preference.BLANK_PREF_VALUE); return false; } map.put(value, valu... | /**
* Checks that there are no duplicates and that all prior prefs have a value
* @param lst List of values
* @return true if checks ok, false otherwise
*/ | Checks that there are no duplicates and that all prior prefs have a value | checkPrefs | {
"repo_name": "nikeshmhr/unitime",
"path": "JavaSource/org/unitime/timetable/form/PreferencesForm.java",
"license": "apache-2.0",
"size": 24481
} | [
"java.util.HashMap",
"java.util.List",
"org.unitime.timetable.model.Preference"
] | import java.util.HashMap; import java.util.List; import org.unitime.timetable.model.Preference; | import java.util.*; import org.unitime.timetable.model.*; | [
"java.util",
"org.unitime.timetable"
] | java.util; org.unitime.timetable; | 1,951,280 |
public static final Component findChild (Container c, String name) {
Component child[] = c.getComponents();
int num_children = child.length;
for (int i = 0; i < num_children; i++) {
if (name.equals(child[i].getName())) {
return (child[i]);
}
}
for (int i = 0; i < num_children; i... | static final Component function (Container c, String name) { Component child[] = c.getComponents(); int num_children = child.length; for (int i = 0; i < num_children; i++) { if (name.equals(child[i].getName())) { return (child[i]); } } for (int i = 0; i < num_children; i++) { if (child[i] instanceof Container) { Compon... | /**
* Find the child Component specified by name.
*
* @param c the container of the child
* @param name the name of the child
*
* @return the child Component with the specified name
* or null if not found
*/ | Find the child Component specified by name | findChild | {
"repo_name": "gmessner/ajf",
"path": "src/main/java/com/messners/ajf/ui/Utilities.java",
"license": "mit",
"size": 18142
} | [
"java.awt.Component",
"java.awt.Container",
"javax.swing.JMenu"
] | import java.awt.Component; import java.awt.Container; import javax.swing.JMenu; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,308,298 |
@Override
public java.util.Date getModifiedDate() {
return _dictCollection.getModifiedDate();
} | java.util.Date function() { return _dictCollection.getModifiedDate(); } | /**
* Returns the modified date of this dict collection.
*
* @return the modified date of this dict collection
*/ | Returns the modified date of this dict collection | getModifiedDate | {
"repo_name": "hltn/opencps",
"path": "portlets/opencps-portlet/docroot/WEB-INF/service/org/opencps/datamgt/model/DictCollectionWrapper.java",
"license": "agpl-3.0",
"size": 16794
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 566,692 |
@Override
public Verb getVerb() {
return verb;
} | Verb function() { return verb; } | /**
* Get the value of verb
*
* @return the value of verb
*/ | Get the value of verb | getVerb | {
"repo_name": "rometools/rome",
"path": "rome-modules/src/main/java/com/rometools/modules/activitystreams/ActivityStreamModuleImpl.java",
"license": "apache-2.0",
"size": 2248
} | [
"com.rometools.modules.activitystreams.types.Verb"
] | import com.rometools.modules.activitystreams.types.Verb; | import com.rometools.modules.activitystreams.types.*; | [
"com.rometools.modules"
] | com.rometools.modules; | 1,966,089 |
private void verifySegmentGranularity(List<DataSegment> segments)
{
final Granularity granularityFromSegments = AbstractBatchIndexTask.findGranularityFromSegments(segments);
if (granularityFromSegments != null) {
if (knownSegmentGranularity == null) {
knownSegmentGranularity = granularityFromS... | void function(List<DataSegment> segments) { final Granularity granularityFromSegments = AbstractBatchIndexTask.findGranularityFromSegments(segments); if (granularityFromSegments != null) { if (knownSegmentGranularity == null) { knownSegmentGranularity = granularityFromSegments; } else { if (!knownSegmentGranularity.equ... | /**
* Check if segmentGranularity has changed.
*/ | Check if segmentGranularity has changed | verifySegmentGranularity | {
"repo_name": "pjain1/druid",
"path": "indexing-service/src/main/java/org/apache/druid/indexing/common/task/TaskLockHelper.java",
"license": "apache-2.0",
"size": 11871
} | [
"java.util.List",
"java.util.stream.Collectors",
"org.apache.druid.java.util.common.granularity.Granularity",
"org.apache.druid.segment.SegmentUtils",
"org.apache.druid.timeline.DataSegment"
] | import java.util.List; import java.util.stream.Collectors; import org.apache.druid.java.util.common.granularity.Granularity; import org.apache.druid.segment.SegmentUtils; import org.apache.druid.timeline.DataSegment; | import java.util.*; import java.util.stream.*; import org.apache.druid.java.util.common.granularity.*; import org.apache.druid.segment.*; import org.apache.druid.timeline.*; | [
"java.util",
"org.apache.druid"
] | java.util; org.apache.druid; | 834,592 |
public void takeSnapshotOfNode(String snapShotName) throws
ClusterDataAdminException {
SnapshotHandler snapshot=new SnapshotHandler(snapShotName);
OperationsThreadPool.getInstance().runOperation(snapshot);
} | void function(String snapShotName) throws ClusterDataAdminException { SnapshotHandler snapshot=new SnapshotHandler(snapShotName); OperationsThreadPool.getInstance().runOperation(snapshot); } | /**
* This create a backup of entire node
* @param snapShotName Name of the snapshot directory
* @throws org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException for unable to take snapshot of the node due to exception
*/ | This create a backup of entire node | takeSnapshotOfNode | {
"repo_name": "lankavitharana/carbon-storage-management",
"path": "components/cassandra/org.wso2.carbon.cassandra.cluster.mgt/src/main/java/org/wso2/carbon/cassandra/cluster/mgt/service/ClusterOperationAdmin.java",
"license": "apache-2.0",
"size": 23939
} | [
"org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException",
"org.wso2.carbon.cassandra.cluster.mgt.operation.OperationsThreadPool",
"org.wso2.carbon.cassandra.cluster.mgt.operation.SnapshotHandler"
] | import org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException; import org.wso2.carbon.cassandra.cluster.mgt.operation.OperationsThreadPool; import org.wso2.carbon.cassandra.cluster.mgt.operation.SnapshotHandler; | import org.wso2.carbon.cassandra.cluster.mgt.exception.*; import org.wso2.carbon.cassandra.cluster.mgt.operation.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 857,909 |
public BasicMatrix calculateAssetReturns(final BasicMatrix assetWeights) {
final BasicMatrix tmpAssetWeights = myRiskAversion.compareTo(DEFAULT_RISK_AVERSION) == 0 ? assetWeights : assetWeights.multiply(myRiskAversion);
return myCovariances.multiply(tmpAssetWeights);
} | BasicMatrix function(final BasicMatrix assetWeights) { final BasicMatrix tmpAssetWeights = myRiskAversion.compareTo(DEFAULT_RISK_AVERSION) == 0 ? assetWeights : assetWeights.multiply(myRiskAversion); return myCovariances.multiply(tmpAssetWeights); } | /**
* If the input vector of asset weights are the weights of the market portfolio, then the ouput is the
* equilibrium excess returns.
*/ | If the input vector of asset weights are the weights of the market portfolio, then the ouput is the equilibrium excess returns | calculateAssetReturns | {
"repo_name": "jpalves/ojAlgo",
"path": "src/org/ojalgo/finance/portfolio/MarketEquilibrium.java",
"license": "mit",
"size": 9474
} | [
"org.ojalgo.matrix.BasicMatrix"
] | import org.ojalgo.matrix.BasicMatrix; | import org.ojalgo.matrix.*; | [
"org.ojalgo.matrix"
] | org.ojalgo.matrix; | 2,551,967 |
public void setCloseButtonDrawable(Drawable drawable) {
mToolbar.setCloseButtonImageResource(drawable);
} | void function(Drawable drawable) { mToolbar.setCloseButtonImageResource(drawable); } | /**
* Sets the drawable that the close button shows.
*/ | Sets the drawable that the close button shows | setCloseButtonDrawable | {
"repo_name": "CapOM/ChromiumGStreamerBackend",
"path": "chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java",
"license": "bsd-3-clause",
"size": 43036
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 2,234,694 |
@GET
@Path("ticker")
LunoTicker ticker(@QueryParam("pair") String pair) throws IOException, LunoException; | @Path(STR) LunoTicker ticker(@QueryParam("pair") String pair) throws IOException, LunoException; | /**
* Market data API calls can be accessed by anyone without authentication.
*
* @param pair required - Currency pair e.g. XBTZAR
* @return
* @throws IOException
* @throws LunoException
*/ | Market data API calls can be accessed by anyone without authentication | ticker | {
"repo_name": "gaborkolozsy/XChange",
"path": "xchange-luno/src/main/java/org/knowm/xchange/luno/Luno.java",
"license": "mit",
"size": 2150
} | [
"java.io.IOException",
"javax.ws.rs.Path",
"javax.ws.rs.QueryParam",
"org.knowm.xchange.luno.dto.LunoException",
"org.knowm.xchange.luno.dto.marketdata.LunoTicker"
] | import java.io.IOException; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; import org.knowm.xchange.luno.dto.LunoException; import org.knowm.xchange.luno.dto.marketdata.LunoTicker; | import java.io.*; import javax.ws.rs.*; import org.knowm.xchange.luno.dto.*; import org.knowm.xchange.luno.dto.marketdata.*; | [
"java.io",
"javax.ws",
"org.knowm.xchange"
] | java.io; javax.ws; org.knowm.xchange; | 904,122 |
public Component parameterGraphic() {
return parameterPanel;
} | Component function() { return parameterPanel; } | /**
* Returns the panel that contains the parameter sliders. You probably
* don't want this unless you have horizontal layout for the parameters.
*/ | Returns the panel that contains the parameter sliders. You probably don't want this unless you have horizontal layout for the parameters | parameterGraphic | {
"repo_name": "etomica/etomica",
"path": "etomica-core/src/main/java/etomica/graphics/DevicePlotPoints.java",
"license": "mpl-2.0",
"size": 20537
} | [
"java.awt.Component"
] | import java.awt.Component; | import java.awt.*; | [
"java.awt"
] | java.awt; | 537,265 |
private static long calculateBrokerCapacity(ResourceQuota defaultQuota, double usableCPU, double usableMem,
double usableBandwidthOut, double usableBandwidthIn) {
// estimate capacity with usable CPU
double cpuCapacity = (usableCPU / cpuUsageByMsgRate)
/ (defaultQuota.get... | static long function(ResourceQuota defaultQuota, double usableCPU, double usableMem, double usableBandwidthOut, double usableBandwidthIn) { double cpuCapacity = (usableCPU / cpuUsageByMsgRate) / (defaultQuota.getMsgRateIn() + defaultQuota.getMsgRateOut()); double memCapacity = usableMem / defaultQuota.getMemory(); doub... | /**
* Calculate how many bundles could be handle with the specified resources
*/ | Calculate how many bundles could be handle with the specified resources | calculateBrokerCapacity | {
"repo_name": "rdhabalia/pulsar",
"path": "pulsar-broker/src/main/java/com/yahoo/pulsar/broker/loadbalance/data/ResourceUnitRanking.java",
"license": "apache-2.0",
"size": 12991
} | [
"com.yahoo.pulsar.common.policies.data.ResourceQuota"
] | import com.yahoo.pulsar.common.policies.data.ResourceQuota; | import com.yahoo.pulsar.common.policies.data.*; | [
"com.yahoo.pulsar"
] | com.yahoo.pulsar; | 1,009,687 |
public static BufferedImage createRGBImageFromCMYK(Raster cmykRaster, ICC_Profile cmykProfile) {
BufferedImage image;
int w = cmykRaster.getWidth();
int h = cmykRaster.getHeight();
if (cmykProfile != null) {
ColorSpace cmykCS = new ICC_ColorSpace(cmykProfile);
image = new BufferedImage(w,... | static BufferedImage function(Raster cmykRaster, ICC_Profile cmykProfile) { BufferedImage image; int w = cmykRaster.getWidth(); int h = cmykRaster.getHeight(); if (cmykProfile != null) { ColorSpace cmykCS = new ICC_ColorSpace(cmykProfile); image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); WritableRaster rgbR... | /**
* Creates a buffered image from a raster in the CMYK color space, converting the colors to RGB
* using the provided CMYK ICC_Profile.
*
* As seen from a comment made by 'phelps' at
* http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4799903
*
* @param cmykRaster A raster with (at least) 4 band... | Creates a buffered image from a raster in the CMYK color space, converting the colors to RGB using the provided CMYK ICC_Profile. As seen from a comment made by 'phelps' at HREF | createRGBImageFromCMYK | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "lib-core/src/main/java/org/monte/media/jpeg/CMYKJPEGImageReader.java",
"license": "agpl-3.0",
"size": 27607
} | [
"java.awt.color.ColorSpace",
"java.awt.image.BufferedImage",
"java.awt.image.ColorConvertOp",
"java.awt.image.ColorModel",
"java.awt.image.DataBuffer",
"java.awt.image.DataBufferInt",
"java.awt.image.DirectColorModel",
"java.awt.image.Raster",
"java.awt.image.WritableRaster"
] | import java.awt.color.ColorSpace; import java.awt.image.BufferedImage; import java.awt.image.ColorConvertOp; import java.awt.image.ColorModel; import java.awt.image.DataBuffer; import java.awt.image.DataBufferInt; import java.awt.image.DirectColorModel; import java.awt.image.Raster; import java.awt.image.WritableRaster... | import java.awt.color.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,023,035 |
private void validateVectors(Vector3D[] mp, Vector2D[] tp)
throws VectorException
{
if (mp.length != 3) throw new VectorException("When creating a ViewObjTri, the " +
"Vector3D array does not have 3 elements");
if (tp.length != 3) throw new VectorException("When crea... | void function(Vector3D[] mp, Vector2D[] tp) throws VectorException { if (mp.length != 3) throw new VectorException(STR + STR); if (tp.length != 3) throw new VectorException(STR + STR); for (int i = 0; i < 3; ++i) { if (mp[i].getX() > 1.0f mp[i].getX() < 0.0f) throw new VectorException(STR + i + STR); if (mp[i].getY() >... | /**
* Validates Vectors to make sure that the arrays are the right length and that
* all the values are between 0.0f and 1.0f including
*
* @param mp - meshPoints to check
* @param tp - imagePoints to check
* @throws VectorException - If there is a problem with the amount in the array... | Validates Vectors to make sure that the arrays are the right length and that all the values are between 0.0f and 1.0f including | validateVectors | {
"repo_name": "KLaschinger/SpeedAR",
"path": "speedar/src/main/java/com/kurtlaschinger/speedar/viewobj/ViewObjTri.java",
"license": "apache-2.0",
"size": 4065
} | [
"com.kurtlaschinger.speedar.util.Vector2D",
"com.kurtlaschinger.speedar.util.Vector3D",
"com.kurtlaschinger.speedar.util.VectorException"
] | import com.kurtlaschinger.speedar.util.Vector2D; import com.kurtlaschinger.speedar.util.Vector3D; import com.kurtlaschinger.speedar.util.VectorException; | import com.kurtlaschinger.speedar.util.*; | [
"com.kurtlaschinger.speedar"
] | com.kurtlaschinger.speedar; | 1,126,874 |
private Record[] parseRecordData(LocalIOFB iofb,
BytesWithOffset data)
throws UnsupportedEncodingException
{
int numberOfRecords = iofb.getNumberOfRecordsReturned();
Record[] records = new Record[numberOfRecords];
// Determine the null byte fiel... | Record[] function(LocalIOFB iofb, BytesWithOffset data) throws UnsupportedEncodingException { int numberOfRecords = iofb.getNumberOfRecordsReturned(); Record[] records = new Record[numberOfRecords]; int nullFieldMapOffset = openFeedback_.getNullFieldByteMapOffset(); int numFields = recordFormat_.getNumberOfFields(); bo... | /**
*Parse the record data into records.
*@param iofb I/O feedback data
*@param data record data and offset.
*@return the records contained in the record data
**/ | Parse the record data into records | parseRecordData | {
"repo_name": "piguangming/jt400",
"path": "src/com/ibm/as400/access/AS400FileImplNative.java",
"license": "epl-1.0",
"size": 99561
} | [
"java.beans.PropertyVetoException",
"java.io.UnsupportedEncodingException"
] | import java.beans.PropertyVetoException; import java.io.UnsupportedEncodingException; | import java.beans.*; import java.io.*; | [
"java.beans",
"java.io"
] | java.beans; java.io; | 889,045 |
public final AuthenticationConfiguration useMechanismProperties(Map<String, String> mechanismProperties) {
return mechanismProperties == null || mechanismProperties.isEmpty() ? this : new SetMechanismPropertiesConfiguration(this, mechanismProperties);
} | final AuthenticationConfiguration function(Map<String, String> mechanismProperties) { return mechanismProperties == null mechanismProperties.isEmpty() ? this : new SetMechanismPropertiesConfiguration(this, mechanismProperties); } | /**
* Create a new configuration which is the same as this configuration, but which sets the properties that will be passed to
* the {@code SaslClientFactory} when the mechanism is created.
*
* @param mechanismProperties the properties to be passed to the {@code SaslClientFactory} to create the mech... | Create a new configuration which is the same as this configuration, but which sets the properties that will be passed to the SaslClientFactory when the mechanism is created | useMechanismProperties | {
"repo_name": "sguilhen/wildfly-elytron",
"path": "src/main/java/org/wildfly/security/auth/client/AuthenticationConfiguration.java",
"license": "apache-2.0",
"size": 36415
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 14,395 |
public static Garden getGarden(String sql) {
Garden garden= new Garden();
try {
Connection con = DiaDBConnector.getConnection();
ResultSet resultSet = sqlQuery(con, sql);
if (resultSet.next()) {
garden.setId(resultSet.getInt("id"));
... | static Garden function(String sql) { Garden garden= new Garden(); try { Connection con = DiaDBConnector.getConnection(); ResultSet resultSet = sqlQuery(con, sql); if (resultSet.next()) { garden.setId(resultSet.getInt("id")); garden.setGardenName(resultSet.getString(STR)); garden.setPassword(resultSet.getString(STR)); }... | /**
* Create Garden instance by device resultSet on current index.
*
* @param sql SQL String
* @return Garden with positive id if successful, or id 0.
*/ | Create Garden instance by device resultSet on current index | getGarden | {
"repo_name": "Yarl-IT-Hub/DIA",
"path": "web-controller/DiaWebApp/src/main/java/org/yarlithub/dia/repo/DiaDBUtil.java",
"license": "gpl-3.0",
"size": 8601
} | [
"com.mysql.jdbc.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.logging.Level",
"org.yarlithub.dia.repo.object.Garden"
] | import com.mysql.jdbc.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import org.yarlithub.dia.repo.object.Garden; | import com.mysql.jdbc.*; import java.sql.*; import java.util.logging.*; import org.yarlithub.dia.repo.object.*; | [
"com.mysql.jdbc",
"java.sql",
"java.util",
"org.yarlithub.dia"
] | com.mysql.jdbc; java.sql; java.util; org.yarlithub.dia; | 935,598 |
return timeZone;
}
/**
* Get observation time
*
* @return {Calendar} | return timeZone; } /** * Get observation time * * @return {Calendar} | /**
* Get Time zone from the JSON Response
* in following format: "+0100"
*
* @return {String}
*/ | Get Time zone from the JSON Response in following format: "+0100" | getTimeZone | {
"repo_name": "georgeerhan/openhab2-addons",
"path": "addons/binding/org.openhab.binding.airquality/src/main/java/org/openhab/binding/airquality/internal/json/AirQualityJsonTime.java",
"license": "epl-1.0",
"size": 1466
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,144,997 |
public void closeTablePool(final String tableName) throws IOException {
Collection<HTableInterface> tables = this.tables.values(tableName);
if (tables != null) {
for (HTableInterface table : tables) {
this.tableFactory.releaseHTableInterface(table);
}
}
this.tables.remove(tableName... | void function(final String tableName) throws IOException { Collection<HTableInterface> tables = this.tables.values(tableName); if (tables != null) { for (HTableInterface table : tables) { this.tableFactory.releaseHTableInterface(table); } } this.tables.remove(tableName); } | /**
* Closes all the HTable instances , belonging to the given table, in the
* table pool.
* <p>
* Note: this is a 'shutdown' of the given table pool and different from
* {@link #putTable(HTableInterface)}, that is used to return the table
* instance to the pool for future re-use.
*
* @param ta... | Closes all the HTable instances , belonging to the given table, in the table pool. Note: this is a 'shutdown' of the given table pool and different from <code>#putTable(HTableInterface)</code>, that is used to return the table instance to the pool for future re-use | closeTablePool | {
"repo_name": "indi60/hbase-pmc",
"path": "target/hbase-0.94.1/hbase-0.94.1/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java",
"license": "apache-2.0",
"size": 15537
} | [
"java.io.IOException",
"java.util.Collection"
] | import java.io.IOException; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 109,104 |
public Map<String, Class<?>> getAuthenticationProviders() {
Map<String, Class<?>> authenticationProviders = new HashMap<String, Class<?>>();
authenticationProviders.put("simple", SimpleAuthenticationProvider.class);
return authenticationProviders;
} | Map<String, Class<?>> function() { Map<String, Class<?>> authenticationProviders = new HashMap<String, Class<?>>(); authenticationProviders.put(STR, SimpleAuthenticationProvider.class); return authenticationProviders; } | /** Returns the authentication providers implemented by this plugin.
*
* @return The authentication providers implemented by this plugin
*/ | Returns the authentication providers implemented by this plugin | getAuthenticationProviders | {
"repo_name": "otavanopisto/pyramus",
"path": "simple-plugin/src/main/java/fi/pyramus/plugin/simple/SimplePluginDescriptor.java",
"license": "gpl-3.0",
"size": 2815
} | [
"fi.otavanopisto.pyramus.plugin.simple.auth.SimpleAuthenticationProvider",
"java.util.HashMap",
"java.util.Map"
] | import fi.otavanopisto.pyramus.plugin.simple.auth.SimpleAuthenticationProvider; import java.util.HashMap; import java.util.Map; | import fi.otavanopisto.pyramus.plugin.simple.auth.*; import java.util.*; | [
"fi.otavanopisto.pyramus",
"java.util"
] | fi.otavanopisto.pyramus; java.util; | 722,381 |
@Test
public void testAppendRestart() throws Exception {
final Configuration conf = new HdfsConfiguration();
// Turn off persistent IPC, so that the DFSClient can survive NN restart
conf.setInt(
CommonConfigurationKeysPublic.IPC_CLIENT_CONNECTION_MAXIDLETIME_KEY,
0);
MiniDFSCluster c... | void function() throws Exception { final Configuration conf = new HdfsConfiguration(); conf.setInt( CommonConfigurationKeysPublic.IPC_CLIENT_CONNECTION_MAXIDLETIME_KEY, 0); MiniDFSCluster cluster = null; FSDataOutputStream stream = null; try { cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).build(); FileSyst... | /**
* Regression test for HDFS-2991. Creates and appends to files
* where blocks start/end on block boundaries.
*/ | Regression test for HDFS-2991. Creates and appends to files where blocks start/end on block boundaries | testAppendRestart | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileAppendRestart.java",
"license": "apache-2.0",
"size": 8062
} | [
"java.io.File",
"java.util.EnumMap",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.CommonConfigurationKeysPublic",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.server.namenode.FSEditLogOpCodes",
"or... | import java.io.File; import java.util.EnumMap; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.CommonConfigurationKeysPublic; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.server.namenode.F... | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.hdfs.util.*; import org.apache.hadoop.io.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.junit; | 2,707,439 |
public static String getPluginName(Context context) {
if (context == null) return null;
try {
PackageManager packageManager = context.getPackageManager();
ApplicationInfo applicationInfo = packageManager.getApplicationInfo(context.getPackageName(),
Packag... | static String function(Context context) { if (context == null) return null; try { PackageManager packageManager = context.getPackageManager(); ApplicationInfo applicationInfo = packageManager.getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA); return applicationInfo.metaData.getString(STR); } ca... | /**
* Function that returns loaded plugin name or null if no plugin is used
* @param context Android Context
* @return the name of the plugin e.g. admob, mopub
*/ | Function that returns loaded plugin name or null if no plugin is used | getPluginName | {
"repo_name": "SuperAwesomeLTD/sa-mobile-sdk-android",
"path": "superawesome-base/src/main/java/tv/superawesome/lib/sautils/SAUtils.java",
"license": "lgpl-3.0",
"size": 18852
} | [
"android.content.Context",
"android.content.pm.ApplicationInfo",
"android.content.pm.PackageManager"
] | import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; | import android.content.*; import android.content.pm.*; | [
"android.content"
] | android.content; | 2,905,064 |
protected void dispatchMousePressed(final MouseEvent e) {
if (!isDynamicDocument) {
super.dispatchMousePressed(e);
return;
} | void function(final MouseEvent e) { if (!isDynamicDocument) { super.dispatchMousePressed(e); return; } | /**
* Dispatches the event to the GVT tree.
*/ | Dispatches the event to the GVT tree | dispatchMousePressed | {
"repo_name": "apache/batik",
"path": "batik-swing/src/main/java/org/apache/batik/swing/svg/JSVGComponent.java",
"license": "apache-2.0",
"size": 126403
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,158,831 |
public PieData findStageData() {
//Create lists
ArrayList<Entry> entries = new ArrayList<>();
ArrayList<String> labels = new ArrayList<>();
//Retrieve stage numbers
int numbers[] = {0, 0, 0, 0, 0, 0};
int totalNumber = 0;
for (int i = 0; i <= 5; i++) {
... | PieData function() { ArrayList<Entry> entries = new ArrayList<>(); ArrayList<String> labels = new ArrayList<>(); int numbers[] = {0, 0, 0, 0, 0, 0}; int totalNumber = 0; for (int i = 0; i <= 5; i++) { numbers[i] = mCompletionDataSource.findByUserAndStageAndCategory(mUser, i + 1, mCategoryId).size(); totalNumber += numb... | /**
* Creates a PieData object containing entries with the numbers of challenges in each stage
*
* @return PieData object containing the numbers of the challenges in each stage
*/ | Creates a PieData object containing entries with the numbers of challenges in each stage | findStageData | {
"repo_name": "tope018/CSC439_Project",
"path": "app/src/main/java/de/fhdw/ergoholics/brainphaser/logic/statistics/ChartDataLogic.java",
"license": "gpl-3.0",
"size": 12096
} | [
"com.github.mikephil.charting.data.Entry",
"com.github.mikephil.charting.data.PieData",
"java.util.ArrayList"
] | import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.PieData; import java.util.ArrayList; | import com.github.mikephil.charting.data.*; import java.util.*; | [
"com.github.mikephil",
"java.util"
] | com.github.mikephil; java.util; | 152,556 |
private byte[] createMessage(String value) throws Exception {
if (getTransformationServiceName() != null && getTransformationService() == null) {
logger.debug("Sending message before transformation service '{}' was initialized.");
initTransformService();
}
String co... | byte[] function(String value) throws Exception { if (getTransformationServiceName() != null && getTransformationService() == null) { logger.debug(STR); initTransformService(); } String content = value; if (getTransformationService() != null) { content = getTransformationService().transform(getTransformationServiceParam... | /**
* Compose the message to be sent. When a transformation is defined, this
* will be applied to the message content. After the transformation is
* performed, the default parameters are replaced in the content string.
*
* @param value
* command or state in string representatio... | Compose the message to be sent. When a transformation is defined, this will be applied to the message content. After the transformation is performed, the default parameters are replaced in the content string | createMessage | {
"repo_name": "theoweiss/openhab",
"path": "bundles/binding/org.openhab.binding.mqtt/src/main/java/org/openhab/binding/mqtt/internal/MqttMessagePublisher.java",
"license": "epl-1.0",
"size": 6934
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 815,750 |
public void persist(Account account) throws Exception; | void function(Account account) throws Exception; | /**
* Grava uma {@link Account} no banco.
*
* @param account
* conta a gravar
* @throws Exception
*/ | Grava uma <code>Account</code> no banco | persist | {
"repo_name": "rvarago/sd_bank_system",
"path": "src/br/edu/ufabc/sd/Controller/AccountDAO.java",
"license": "apache-2.0",
"size": 993
} | [
"br.edu.ufabc.sd.bank.account.Account"
] | import br.edu.ufabc.sd.bank.account.Account; | import br.edu.ufabc.sd.bank.account.*; | [
"br.edu.ufabc"
] | br.edu.ufabc; | 1,772,197 |
private void removeTimer(Rule rule) throws SchedulerException {
Set<JobKey> jobKeys = scheduler.getJobKeys(GroupMatcher.jobGroupEquals(Scheduler.DEFAULT_GROUP));
for (JobKey jobKey : jobKeys) {
String jobIdentityString = getJobIdentityString(rule, null);
if (jobKey.getName().startsWith(jobIdentityString)) ... | void function(Rule rule) throws SchedulerException { Set<JobKey> jobKeys = scheduler.getJobKeys(GroupMatcher.jobGroupEquals(Scheduler.DEFAULT_GROUP)); for (JobKey jobKey : jobKeys) { String jobIdentityString = getJobIdentityString(rule, null); if (jobKey.getName().startsWith(jobIdentityString)) { boolean success = sche... | /**
* Delete all {@link Job}s of the DEFAULT group whose name starts with <code>rule.getName()</code>.
*
* @throws SchedulerException
* if there is an internal Scheduler error.
*/ | Delete all <code>Job</code>s of the DEFAULT group whose name starts with <code>rule.getName()</code> | removeTimer | {
"repo_name": "cschneider/openhab",
"path": "bundles/core/org.openhab.core.jsr223/src/main/java/org/openhab/core/jsr223/internal/engine/RuleTriggerManager.java",
"license": "epl-1.0",
"size": 14029
} | [
"java.util.Set",
"org.openhab.core.jsr223.internal.shared.Rule",
"org.quartz.JobKey",
"org.quartz.Scheduler",
"org.quartz.SchedulerException",
"org.quartz.impl.matchers.GroupMatcher"
] | import java.util.Set; import org.openhab.core.jsr223.internal.shared.Rule; import org.quartz.JobKey; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.impl.matchers.GroupMatcher; | import java.util.*; import org.openhab.core.jsr223.internal.shared.*; import org.quartz.*; import org.quartz.impl.matchers.*; | [
"java.util",
"org.openhab.core",
"org.quartz",
"org.quartz.impl"
] | java.util; org.openhab.core; org.quartz; org.quartz.impl; | 1,805,203 |
private void generateExternalReports(Engine engine, File outDirectory) {
DatabaseProperties prop = null;
CveDB cve = null;
try {
cve = new CveDB();
cve.open();
prop = cve.getDatabaseProperties();
} catch (DatabaseException ex) {
LOGGER.... | void function(Engine engine, File outDirectory) { DatabaseProperties prop = null; CveDB cve = null; try { cve = new CveDB(); cve.open(); prop = cve.getDatabaseProperties(); } catch (DatabaseException ex) { LOGGER.debug(STR, ex); } finally { if (cve != null) { cve.close(); } } final ReportGenerator r = new ReportGenerat... | /**
* Generates the reports for a given dependency-check engine.
*
* @param engine a dependency-check engine
* @param outDirectory the directory to write the reports to
*/ | Generates the reports for a given dependency-check engine | generateExternalReports | {
"repo_name": "adilakhter/DependencyCheck",
"path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java",
"license": "apache-2.0",
"size": 31316
} | [
"java.io.File",
"java.io.IOException",
"org.owasp.dependencycheck.Engine",
"org.owasp.dependencycheck.data.nvdcve.CveDB",
"org.owasp.dependencycheck.data.nvdcve.DatabaseException",
"org.owasp.dependencycheck.data.nvdcve.DatabaseProperties",
"org.owasp.dependencycheck.reporting.ReportGenerator"
] | import java.io.File; import java.io.IOException; import org.owasp.dependencycheck.Engine; import org.owasp.dependencycheck.data.nvdcve.CveDB; import org.owasp.dependencycheck.data.nvdcve.DatabaseException; import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties; import org.owasp.dependencycheck.reporting.Report... | import java.io.*; import org.owasp.dependencycheck.*; import org.owasp.dependencycheck.data.nvdcve.*; import org.owasp.dependencycheck.reporting.*; | [
"java.io",
"org.owasp.dependencycheck"
] | java.io; org.owasp.dependencycheck; | 627,815 |
@Test
public void test1170825() {
XYSeries s1 = new XYSeries("Series1");
XYSeriesCollection dataset = new XYSeriesCollection();
dataset.addSeries(s1);
try {
dataset.getSeries(1);
}
catch (IllegalArgumentException e) {
// correct o... | void function() { XYSeries s1 = new XYSeries(STR); XYSeriesCollection dataset = new XYSeriesCollection(); dataset.addSeries(s1); try { dataset.getSeries(1); } catch (IllegalArgumentException e) { } catch (IndexOutOfBoundsException e) { assertTrue(false); } } | /**
* A test for bug report 1170825.
*/ | A test for bug report 1170825 | test1170825 | {
"repo_name": "greearb/jfreechart-fse-ct",
"path": "src/test/java/org/jfree/data/xy/XYSeriesCollectionTest.java",
"license": "lgpl-2.1",
"size": 15116
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 315,583 |
private void deleteRoomSummaryFile(String roomId) {
// states list
File statesFile = new File(mStoreRoomsSummaryFolderFile, roomId);
// remove the files
if (statesFile.exists()) {
try {
statesFile.delete();
} catch (Exception e) {
... | void function(String roomId) { File statesFile = new File(mStoreRoomsSummaryFolderFile, roomId); if (statesFile.exists()) { try { statesFile.delete(); } catch (Exception e) { Log.e(LOG_TAG, STR + e.getMessage()); } } } | /**
* Delete the room summary file.
* @param roomId the room id.
*/ | Delete the room summary file | deleteRoomSummaryFile | {
"repo_name": "Nehasing/Nehachat",
"path": "matrix-sdk/src/main/java/org/matrix/androidsdk/data/MXFileStore.java",
"license": "apache-2.0",
"size": 44971
} | [
"android.util.Log",
"java.io.File"
] | import android.util.Log; import java.io.File; | import android.util.*; import java.io.*; | [
"android.util",
"java.io"
] | android.util; java.io; | 1,512,397 |
void removeAllAttributes(PerunSession sess, Resource resource, Member member) throws InternalErrorException; | void removeAllAttributes(PerunSession sess, Resource resource, Member member) throws InternalErrorException; | /**
* Unset all (member-resource) attributes for the member on the resource.
*
* @param sess perun session
* @param member remove attributes from this member
*
* @throws InternalErrorException if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
*/ | Unset all (member-resource) attributes for the member on the resource | removeAllAttributes | {
"repo_name": "Simcsa/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/AttributesManagerImplApi.java",
"license": "bsd-2-clause",
"size": 98325
} | [
"cz.metacentrum.perun.core.api.Member",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.Resource",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException"
] | import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Resource; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 2,424,694 |
@Override
public void setCamelContext(CamelContext camelContext) {
this.camelContext = camelContext;
} | void function(CamelContext camelContext) { this.camelContext = camelContext; } | /**
* Sets Camel context.
*
* @param camelContext the Camel context
*/ | Sets Camel context | setCamelContext | {
"repo_name": "OpenWiseSolutions/openhub-framework",
"path": "core/src/main/java/org/openhubframework/openhub/core/common/extension/AbstractExtensionConfigurationLoader.java",
"license": "apache-2.0",
"size": 6360
} | [
"org.apache.camel.CamelContext"
] | import org.apache.camel.CamelContext; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 277,902 |
AuxLiqComProDeu auxLiqComProDeu;
String queryString = "from AuxLiqComProDeu t where t.codAuxLiqComProDeu = :codigo";
Session session = SiatHibernateUtil.currentSession();
Query query = session.createQuery(queryString).setString("codigo", codigo);
auxLiqComProDeu = (AuxLiqComProDeu) query.uniqueResult();
... | AuxLiqComProDeu auxLiqComProDeu; String queryString = STR; Session session = SiatHibernateUtil.currentSession(); Query query = session.createQuery(queryString).setString(STR, codigo); auxLiqComProDeu = (AuxLiqComProDeu) query.uniqueResult(); return auxLiqComProDeu; } | /**
* Obtiene un AuxLiqComProDeu por su codigo
*/ | Obtiene un AuxLiqComProDeu por su codigo | getByCodigo | {
"repo_name": "avdata99/SIAT",
"path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/gde/buss/dao/AuxLiqComProDeuDAO.java",
"license": "gpl-3.0",
"size": 2257
} | [
"ar.gov.rosario.siat.base.buss.dao.SiatHibernateUtil",
"ar.gov.rosario.siat.gde.buss.bean.AuxLiqComProDeu",
"org.hibernate.Query",
"org.hibernate.classic.Session"
] | import ar.gov.rosario.siat.base.buss.dao.SiatHibernateUtil; import ar.gov.rosario.siat.gde.buss.bean.AuxLiqComProDeu; import org.hibernate.Query; import org.hibernate.classic.Session; | import ar.gov.rosario.siat.base.buss.dao.*; import ar.gov.rosario.siat.gde.buss.bean.*; import org.hibernate.*; import org.hibernate.classic.*; | [
"ar.gov.rosario",
"org.hibernate",
"org.hibernate.classic"
] | ar.gov.rosario; org.hibernate; org.hibernate.classic; | 1,409,306 |
@Test
public void test_setAccountBalance() {
BigDecimal value = new BigDecimal(1);
instance.setAccountBalance(value);
assertSame("'setAccountBalance' should be correct.",
value, TestsHelper.getField(instance, "accountBalance"));
} | void function() { BigDecimal value = new BigDecimal(1); instance.setAccountBalance(value); assertSame(STR, value, TestsHelper.getField(instance, STR)); } | /**
* <p>
* Accuracy test for the method <code>setAccountBalance(BigDecimal accountBalance)</code>.<br>
* The value should be properly set.
* </p>
*/ | Accuracy test for the method <code>setAccountBalance(BigDecimal accountBalance)</code>. The value should be properly set. | test_setAccountBalance | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/Data_Migration/src/java/tests/gov/opm/scrd/entities/application/BatchDailyPaymentsUnitTests.java",
"license": "apache-2.0",
"size": 19516
} | [
"gov.opm.scrd.TestsHelper",
"java.math.BigDecimal",
"org.junit.Assert"
] | import gov.opm.scrd.TestsHelper; import java.math.BigDecimal; import org.junit.Assert; | import gov.opm.scrd.*; import java.math.*; import org.junit.*; | [
"gov.opm.scrd",
"java.math",
"org.junit"
] | gov.opm.scrd; java.math; org.junit; | 1,694,524 |
private static boolean processFtypAtom(ParsableByteArray atomData) {
atomData.setPosition(Atom.HEADER_SIZE);
int majorBrand = atomData.readInt();
if (majorBrand == BRAND_QUICKTIME) {
return true;
}
atomData.skipBytes(4); // minor_version
while (atomData.bytesLeft() > 0) {
if (atomD... | static boolean function(ParsableByteArray atomData) { atomData.setPosition(Atom.HEADER_SIZE); int majorBrand = atomData.readInt(); if (majorBrand == BRAND_QUICKTIME) { return true; } atomData.skipBytes(4); while (atomData.bytesLeft() > 0) { if (atomData.readInt() == BRAND_QUICKTIME) { return true; } } return false; } | /**
* Process an ftyp atom to determine whether the media is QuickTime.
*
* @param atomData The ftyp atom data.
* @return Whether the media is QuickTime.
*/ | Process an ftyp atom to determine whether the media is QuickTime | processFtypAtom | {
"repo_name": "tntcrowd/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java",
"license": "apache-2.0",
"size": 28906
} | [
"com.google.android.exoplayer2.util.ParsableByteArray"
] | import com.google.android.exoplayer2.util.ParsableByteArray; | import com.google.android.exoplayer2.util.*; | [
"com.google.android"
] | com.google.android; | 19,958 |
public void clear(long startIndex, long endIndex) {
if (endIndex <= startIndex) return;
int startWord = (int)(startIndex>>6);
if (startWord >= wlen) return;
// since endIndex is one past the end, this is index of the last
// word to be changed.
int endWord = (int)((endIndex-1)>>6);
lo... | void function(long startIndex, long endIndex) { if (endIndex <= startIndex) return; int startWord = (int)(startIndex>>6); if (startWord >= wlen) return; int endWord = (int)((endIndex-1)>>6); long startmask = -1L << startIndex; long endmask = -1L >>> -endIndex; startmask = ~startmask; endmask = ~endmask; if (startWord =... | /** Clears a range of bits. Clearing past the end does not change the size of the set.
*
* @param startIndex lower index
* @param endIndex one-past the last bit to clear
*/ | Clears a range of bits. Clearing past the end does not change the size of the set | clear | {
"repo_name": "lalithsuresh/cassandra-c3",
"path": "src/java/org/apache/cassandra/utils/obs/OpenBitSet.java",
"license": "apache-2.0",
"size": 13959
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 622,034 |
private void attemptLogin() {
if (mAuthTask != null) {
return;
}
// Reset errors.
mEmailView.setError(null);
mPasswordView.setError(null);
// Store values at the time of the login attempt.
String email = mEmailView.getText().toString();... | void function() { if (mAuthTask != null) { return; } mEmailView.setError(null); mPasswordView.setError(null); String email = mEmailView.getText().toString(); String password = mPasswordView.getText().toString(); String password2 = mPasswordView2.getText().toString(); boolean cancel = false; View focusView = null; if (!... | /**
* Attempts to sign in or register the account specified by the login form.
* If there are form errors (invalid email, missing fields, etc.), the
* errors are presented and no actual login attempt is made.
*/ | Attempts to sign in or register the account specified by the login form. If there are form errors (invalid email, missing fields, etc.), the errors are presented and no actual login attempt is made | attemptLogin | {
"repo_name": "yeseg11/Let-it-know",
"path": "Android src/app/src/main/java/com/jerusalem_open_house/let_it_know/letitknow/add_user.java",
"license": "mit",
"size": 15853
} | [
"android.text.TextUtils",
"android.view.View"
] | import android.text.TextUtils; import android.view.View; | import android.text.*; import android.view.*; | [
"android.text",
"android.view"
] | android.text; android.view; | 2,726,120 |
public ExtractedChecksumResultSet getSingleChecksumResultSet(String fileID, String collectionID,
XMLGregorianCalendar minTimestamp, XMLGregorianCalendar maxTimestamp, ChecksumSpecTYPE csSpec)
throws RequestHandlerException {
ExtractedChecksumResultSet res = new ExtractedChe... | ExtractedChecksumResultSet function(String fileID, String collectionID, XMLGregorianCalendar minTimestamp, XMLGregorianCalendar maxTimestamp, ChecksumSpecTYPE csSpec) throws RequestHandlerException { ExtractedChecksumResultSet res = new ExtractedChecksumResultSet(); ChecksumEntry entry = getChecksumEntryForFile(fileID,... | /**
* Extracts the results set for a given checksum entry.
* If it has the file, but its calculation date is not within the timestamp restrictions, then an empty
* resultset is returned.
* @param fileID The ID of the file.
* @param collectionID The id of the collection.
* @param minTimest... | Extracts the results set for a given checksum entry. If it has the file, but its calculation date is not within the timestamp restrictions, then an empty resultset is returned | getSingleChecksumResultSet | {
"repo_name": "bitrepository/reference",
"path": "bitrepository-reference-pillar/src/main/java/org/bitrepository/pillar/store/StorageModel.java",
"license": "lgpl-2.1",
"size": 21409
} | [
"javax.xml.datatype.XMLGregorianCalendar",
"org.bitrepository.bitrepositoryelements.ChecksumSpecTYPE",
"org.bitrepository.common.utils.CalendarUtils",
"org.bitrepository.pillar.store.checksumdatabase.ChecksumEntry",
"org.bitrepository.pillar.store.checksumdatabase.ExtractedChecksumResultSet",
"org.bitrepo... | import javax.xml.datatype.XMLGregorianCalendar; import org.bitrepository.bitrepositoryelements.ChecksumSpecTYPE; import org.bitrepository.common.utils.CalendarUtils; import org.bitrepository.pillar.store.checksumdatabase.ChecksumEntry; import org.bitrepository.pillar.store.checksumdatabase.ExtractedChecksumResultSet; i... | import javax.xml.datatype.*; import org.bitrepository.bitrepositoryelements.*; import org.bitrepository.common.utils.*; import org.bitrepository.pillar.store.checksumdatabase.*; import org.bitrepository.service.exception.*; | [
"javax.xml",
"org.bitrepository.bitrepositoryelements",
"org.bitrepository.common",
"org.bitrepository.pillar",
"org.bitrepository.service"
] | javax.xml; org.bitrepository.bitrepositoryelements; org.bitrepository.common; org.bitrepository.pillar; org.bitrepository.service; | 720,433 |
public RowLocation getRowLocation() throws StandardException
{
if (! isOpen) return null;
if ( ! hashtableBuilt)
return null;
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(currentRow != null,
"There must be a current row when fetching the row location");
Object rlCandidate = currentRow... | RowLocation function() throws StandardException { if (! isOpen) return null; if ( ! hashtableBuilt) return null; if (SanityManager.DEBUG) { SanityManager.ASSERT(currentRow != null, STR); Object rlCandidate = currentRow.getColumn( currentRow.nColumns()); if (! (rlCandidate instanceof RowLocation)) { SanityManager.THROWA... | /**
* This result set has its row location from
* the last fetch done. If the cursor is closed,
* a null is returned.
*
* @see CursorResultSet
*
* @return the row location of the current cursor row.
* @exception StandardException thrown on failure to get row location
*/ | This result set has its row location from the last fetch done. If the cursor is closed, a null is returned | getRowLocation | {
"repo_name": "scnakandala/derby",
"path": "java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java",
"license": "apache-2.0",
"size": 21767
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.types.RowLocation",
"org.apache.derby.shared.common.sanity.SanityManager"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.types.RowLocation; import org.apache.derby.shared.common.sanity.SanityManager; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.types.*; import org.apache.derby.shared.common.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 2,704,650 |
public BeamFrequency getBeamFrequency() {
return mBeamFreq;
} | BeamFrequency function() { return mBeamFreq; } | /**
* The frequency at which beam weapons are to be tuned.
* Unspecified: null
*/ | The frequency at which beam weapons are to be tuned. Unspecified: null | getBeamFrequency | {
"repo_name": "rjwut/ian",
"path": "src/main/java/com/walkertribe/ian/world/ArtemisPlayer.java",
"license": "mit",
"size": 34779
} | [
"com.walkertribe.ian.enums.BeamFrequency"
] | import com.walkertribe.ian.enums.BeamFrequency; | import com.walkertribe.ian.enums.*; | [
"com.walkertribe.ian"
] | com.walkertribe.ian; | 506,547 |
@Test
public void rejectSingleTask() {
MaxPerRule rule = new TestMaxPerRule(
1,
Arrays.asList("key0"),
Arrays.asList("key0"),
AnyMatcher.create());
assertFalse(rule.filter(offer, podInstance, Arrays.asList(taskInfo)).isPassing());
... | void function() { MaxPerRule rule = new TestMaxPerRule( 1, Arrays.asList("key0"), Arrays.asList("key0"), AnyMatcher.create()); assertFalse(rule.filter(offer, podInstance, Arrays.asList(taskInfo)).isPassing()); } | /**
* A task has been launched using "key0". The offer contains this key, so the offer should be rejected.
*/ | A task has been launched using "key0". The offer contains this key, so the offer should be rejected | rejectSingleTask | {
"repo_name": "mesosphere/dcos-commons",
"path": "sdk/scheduler/src/test/java/com/mesosphere/sdk/offer/evaluate/placement/MaxPerTest.java",
"license": "apache-2.0",
"size": 9464
} | [
"java.util.Arrays",
"org.junit.Assert"
] | import java.util.Arrays; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 2,104,049 |
protected boolean allowConnection(Socket s)
{
if (!paranoid)
{
return true;
}
int l = deny.size();
byte address[] = s.getInetAddress().getAddress();
for (int i = 0; i < l; i++)
{
AddressMatcher match = (AddressMatcher)deny.elementA... | boolean function(Socket s) { if (!paranoid) { return true; } int l = deny.size(); byte address[] = s.getInetAddress().getAddress(); for (int i = 0; i < l; i++) { AddressMatcher match = (AddressMatcher)deny.elementAt(i); if (match.matches(address)) { return false; } } l = accept.size(); for (int i = 0; i < l; i++) { Add... | /**
* Checks incoming connections to see if they should be allowed.
* If not in paranoid mode, always returns true.
*
* @param s The socket to inspect.
* @return Whether the connection should be allowed.
*/ | Checks incoming connections to see if they should be allowed. If not in paranoid mode, always returns true | allowConnection | {
"repo_name": "mmohan01/ReFactory",
"path": "data/apachexmlrpc/apachexmlrpc-2.0/java/org/apache/xmlrpc/WebServer.java",
"license": "mit",
"size": 28369
} | [
"java.net.Socket"
] | import java.net.Socket; | import java.net.*; | [
"java.net"
] | java.net; | 1,075,534 |
protected void mergeOutputFile(T stitchedFileMetaData) throws IOException
{
mergeBlocks(stitchedFileMetaData);
successfulFiles.add(stitchedFileMetaData);
LOG.debug("Completed processing file: {} ", stitchedFileMetaData.getStitchedFileRelativePath());
} | void function(T stitchedFileMetaData) throws IOException { mergeBlocks(stitchedFileMetaData); successfulFiles.add(stitchedFileMetaData); LOG.debug(STR, stitchedFileMetaData.getStitchedFileRelativePath()); } | /**
* Read data from block files and write to output file. Information about
* which block files should be read is specified in outFileMetadata
*
* @param stitchedFileMetaData
* @throws IOException
*/ | Read data from block files and write to output file. Information about which block files should be read is specified in outFileMetadata | mergeOutputFile | {
"repo_name": "yogidevendra/incubator-apex-malhar",
"path": "library/src/main/java/com/datatorrent/lib/io/fs/FileStitcher.java",
"license": "apache-2.0",
"size": 12974
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,951,558 |
public ElkDataAllValuesFrom getDataAllValuesFrom(ElkDataRange dataRange,
List<? extends ElkDataPropertyExpression> dpList); | ElkDataAllValuesFrom function(ElkDataRange dataRange, List<? extends ElkDataPropertyExpression> dpList); | /**
* Create an {@link ElkDataAllValuesFrom}.
*
* @param dataRange
* the {@link ElkDataRange} for which the object should be
* created
* @param dpList
* the {@link ElkDataPropertyExpression}s for which the object
* should be created
* @return an {@link ElkD... | Create an <code>ElkDataAllValuesFrom</code> | getDataAllValuesFrom | {
"repo_name": "sesuncedu/elk-reasoner",
"path": "elk-owl-parent/elk-owl-model/src/main/java/org/semanticweb/elk/owl/interfaces/ElkObjectFactory.java",
"license": "apache-2.0",
"size": 52558
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,533,096 |
protected void addValidatorConfiguration(Map<String, Object> params) {
// <bean id="templateValidator" class="com.ideyatech.veeui.validator.TemplateValidator"/>
String xmlFilename = (new File(".")).getAbsolutePath() + contextPath + controllerContextFile;
Element bean = DocumentHelper.createElement("bean");
... | void function(Map<String, Object> params) { String xmlFilename = (new File(".")).getAbsolutePath() + contextPath + controllerContextFile; Element bean = DocumentHelper.createElement("bean"); bean.addAttribute("id", params.get(STR)+STR); bean.addAttribute("class", params.get(STR)+"."+params.get(STR)+STR); SpringXMLUtil.... | /**
* Adds validator bean to spring config
* @param params
*/ | Adds validator bean to spring config | addValidatorConfiguration | {
"repo_name": "Letractively/open-tides",
"path": "src/org/hightides/annotations/processor/SpringConfigProcessor.java",
"license": "apache-2.0",
"size": 7887
} | [
"java.io.File",
"java.util.Map",
"org.dom4j.DocumentHelper",
"org.dom4j.Element",
"org.hightides.annotations.util.SpringXMLUtil"
] | import java.io.File; import java.util.Map; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.hightides.annotations.util.SpringXMLUtil; | import java.io.*; import java.util.*; import org.dom4j.*; import org.hightides.annotations.util.*; | [
"java.io",
"java.util",
"org.dom4j",
"org.hightides.annotations"
] | java.io; java.util; org.dom4j; org.hightides.annotations; | 1,565,977 |
public static GetServerInfoRequest buildGetServerInfoRequest() {
return GET_SERVER_INFO_REQUEST;
} | static GetServerInfoRequest function() { return GET_SERVER_INFO_REQUEST; } | /**
* Create a new GetServerInfoRequest
*
* @return a GetServerInfoRequest
*/ | Create a new GetServerInfoRequest | buildGetServerInfoRequest | {
"repo_name": "lilonglai/hbase-0.96.2",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java",
"license": "apache-2.0",
"size": 57605
} | [
"org.apache.hadoop.hbase.protobuf.generated.AdminProtos"
] | import org.apache.hadoop.hbase.protobuf.generated.AdminProtos; | import org.apache.hadoop.hbase.protobuf.generated.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,842,534 |
public void deleteProductInCatalog(String productCode, Integer catalogId) throws Exception
{
MozuClient client = com.mozu.api.clients.commerce.catalog.admin.ProductClient.deleteProductInCatalogClient(_dataViewMode, productCode, catalogId);
client.setContext(_apiContext);
client.executeRequest();
clie... | void function(String productCode, Integer catalogId) throws Exception { MozuClient client = com.mozu.api.clients.commerce.catalog.admin.ProductClient.deleteProductInCatalogClient(_dataViewMode, productCode, catalogId); client.setContext(_apiContext); client.executeRequest(); client.cleanupHttpConnection(); } | /**
*
* <p><pre><code>
* Product product = new Product();
* product.deleteProductInCatalog( productCode, catalogId);
* </code></pre></p>
* @param catalogId Unique identifier for a catalog.
* @param productCode The unique, user-defined product code of a product, used throughout to reference and a... | <code><code> Product product = new Product(); product.deleteProductInCatalog( productCode, catalogId); </code></code> | deleteProductInCatalog | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/ProductResource.java",
"license": "mit",
"size": 41573
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,088,888 |
@Test
public void pickUpEPartnerTest() {
gh.pickUpEPartner(null);
verify(bot).pickUpEPartner(null);
} | void function() { gh.pickUpEPartner(null); verify(bot).pickUpEPartner(null); } | /**
* Test for pick up e partner
*/ | Test for pick up e partner | pickUpEPartnerTest | {
"repo_name": "eishub/BW4T",
"path": "bw4t-server/src/test/java/nl/tudelft/bw4t/server/model/robots/handicap/RobotDecoratorTest.java",
"license": "gpl-3.0",
"size": 6909
} | [
"org.mockito.Mockito"
] | import org.mockito.Mockito; | import org.mockito.*; | [
"org.mockito"
] | org.mockito; | 704,089 |
private void sendEndEventOnUiThread(final String utteranceId) {
PostTask.runOrPostTask(UiThreadTaskTraits.DEFAULT, () -> {
if (mNativeTtsPlatformImplAndroid != 0) {
TtsPlatformImplJni.get().onEndEvent(
mNativeTtsPlatformImplAndroid, Integer.parseInt(uttera... | void function(final String utteranceId) { PostTask.runOrPostTask(UiThreadTaskTraits.DEFAULT, () -> { if (mNativeTtsPlatformImplAndroid != 0) { TtsPlatformImplJni.get().onEndEvent( mNativeTtsPlatformImplAndroid, Integer.parseInt(utteranceId)); } }); } | /**
* Post a task to the UI thread to send the TTS "end" event.
*/ | Post a task to the UI thread to send the TTS "end" event | sendEndEventOnUiThread | {
"repo_name": "scheib/chromium",
"path": "content/public/android/java/src/org/chromium/content/browser/TtsPlatformImpl.java",
"license": "bsd-3-clause",
"size": 15997
} | [
"org.chromium.base.task.PostTask",
"org.chromium.content_public.browser.UiThreadTaskTraits"
] | import org.chromium.base.task.PostTask; import org.chromium.content_public.browser.UiThreadTaskTraits; | import org.chromium.base.task.*; import org.chromium.content_public.browser.*; | [
"org.chromium.base",
"org.chromium.content_public"
] | org.chromium.base; org.chromium.content_public; | 2,431,483 |
@Override
public final void parse(String systemId) throws IOException, SAXException
{
parse(new InputSource(systemId));
} | final void function(String systemId) throws IOException, SAXException { parse(new InputSource(systemId)); } | /**
* Parses the input source specified by the given system identifier.
* <p>
* This method is equivalent to the following:
*
* <pre>
* parse(new InputSource(systemId));
* </pre>
*
* @param systemId - the system identifier (URI).
*
* @exception org.xml.sax.SAXException Thr... | Parses the input source specified by the given system identifier. This method is equivalent to the following: <code> parse(new InputSource(systemId)); </code> | parse | {
"repo_name": "selfbus/tools-libraries",
"path": "sbtools-vdio/src/main/java/org/selfbus/sbtools/vdio/internal/AbstractXmlReader.java",
"license": "gpl-3.0",
"size": 6012
} | [
"java.io.IOException",
"org.xml.sax.InputSource",
"org.xml.sax.SAXException"
] | import java.io.IOException; import org.xml.sax.InputSource; import org.xml.sax.SAXException; | import java.io.*; import org.xml.sax.*; | [
"java.io",
"org.xml.sax"
] | java.io; org.xml.sax; | 2,622,527 |
@Test
public void getGroupSecurityNameWithInvalidGroup() throws Exception {
String group = "cn=invalid,ou=users,dc=rtp,dc=raleigh,dc=ibm,dc=com";
Log.info(c, "getGroupSecurityNameWithInvalidGroup", "Checking with an invalid group.");
expectedException.expect(EntryNotFoundException.class... | void function() throws Exception { String group = STR; Log.info(c, STR, STR); expectedException.expect(EntryNotFoundException.class); expectedException.expectMessage(STR); servlet.getGroupSecurityName(group); } | /**
* Hit the test servlet to see if getGroupSecurityName works when supplied with an invalid group
* This verifies the various required bundles got installed and are working.
*/ | Hit the test servlet to see if getGroupSecurityName works when supplied with an invalid group This verifies the various required bundles got installed and are working | getGroupSecurityNameWithInvalidGroup | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.wim.adapter.ldap_fat/fat/src/com/ibm/ws/security/wim/adapter/ldap/fat/URAPIs_SUNLDAPTest.java",
"license": "epl-1.0",
"size": 33239
} | [
"com.ibm.websphere.simplicity.log.Log",
"com.ibm.ws.security.registry.EntryNotFoundException"
] | import com.ibm.websphere.simplicity.log.Log; import com.ibm.ws.security.registry.EntryNotFoundException; | import com.ibm.websphere.simplicity.log.*; import com.ibm.ws.security.registry.*; | [
"com.ibm.websphere",
"com.ibm.ws"
] | com.ibm.websphere; com.ibm.ws; | 2,537,388 |
protected final void encodeProcessingInstruction(String target, String data) throws IOException {
write(EncodingConstants.PROCESSING_INSTRUCTION);
// Target
encodeIdentifyingNonEmptyStringOnFirstBit(target, _v.otherNCName);
// Data
boolean addToTable = isCharacterContentChu... | final void function(String target, String data) throws IOException { write(EncodingConstants.PROCESSING_INSTRUCTION); encodeIdentifyingNonEmptyStringOnFirstBit(target, _v.otherNCName); boolean addToTable = isCharacterContentChunkLengthMatchesLimit(data.length()); encodeNonIdentifyingStringOnFirstBit(data, _v.otherStrin... | /**
* Encode a Processing Instruction Information Item.
*
* @param target the target of the processing instruction.
* @param data the data of the processing instruction.
*/ | Encode a Processing Instruction Information Item | encodeProcessingInstruction | {
"repo_name": "aadamowski/fi.java.net",
"path": "code/fastinfoset/src/main/java/com/sun/xml/fastinfoset/Encoder.java",
"license": "apache-2.0",
"size": 103614
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,869,689 |
public Processor wrapProcessor(RouteContext routeContext, Processor processor) throws Exception {
// dont double wrap
if (processor instanceof Channel) {
return processor;
}
return wrapChannel(routeContext, processor, null);
} | Processor function(RouteContext routeContext, Processor processor) throws Exception { if (processor instanceof Channel) { return processor; } return wrapChannel(routeContext, processor, null); } | /**
* Wraps the child processor in whatever necessary interceptors and error handlers
*/ | Wraps the child processor in whatever necessary interceptors and error handlers | wrapProcessor | {
"repo_name": "Thopap/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 169760
} | [
"org.apache.camel.Channel",
"org.apache.camel.Processor",
"org.apache.camel.spi.RouteContext"
] | import org.apache.camel.Channel; import org.apache.camel.Processor; import org.apache.camel.spi.RouteContext; | import org.apache.camel.*; import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,040,919 |
@XmlElement(name = "offset")
@UML(identifier="offset", obligation=OPTIONAL, specification=ISO_19115)
public Double getOffset() {
return offset;
} | @XmlElement(name = STR) @UML(identifier=STR, obligation=OPTIONAL, specification=ISO_19115) Double function() { return offset; } | /**
* Returns the physical value corresponding to a cell value of zero.
*
* @return the physical value corresponding to a cell value of zero, or {@code null} if none.
*/ | Returns the physical value corresponding to a cell value of zero | getOffset | {
"repo_name": "apache/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java",
"license": "apache-2.0",
"size": 21765
} | [
"javax.xml.bind.annotation.XmlElement"
] | import javax.xml.bind.annotation.XmlElement; | import javax.xml.bind.annotation.*; | [
"javax.xml"
] | javax.xml; | 460,182 |
private void rimuoviFileShaRicomponibili(List<Path> shaPathList, List<Path> tempPathList) {
List<String> nomiFilePartiString = new ArrayList<String>();
if(tempPathList==null) {
return;
}
for(Path tempPath : tempPathList) {
nomiFilePartiString.add(tempPath.getFileName().toString().split(".part")[0]);... | void function(List<Path> shaPathList, List<Path> tempPathList) { List<String> nomiFilePartiString = new ArrayList<String>(); if(tempPathList==null) { return; } for(Path tempPath : tempPathList) { nomiFilePartiString.add(tempPath.getFileName().toString().split(".part")[0]); } for(Path path : shaPathList) { if(Files.exis... | /**
* Metodo che rimuove i file .sha che possono essere facilmente ricreati ripartendo dai .part. Questo metodo non si
* assicura che ci siano tutte e 4, semplicemente un metodo prima rimuove dalla listaFileTemp quelli che non hanno
* 4 parti e poi viene passato a questo metodo solo quelli validi.
* @param shaP... | Metodo che rimuove i file .sha che possono essere facilmente ricreati ripartendo dai .part. Questo metodo non si assicura che ci siano tutte e 4, semplicemente un metodo prima rimuove dalla listaFileTemp quelli che non hanno 4 parti e poi viene passato a questo metodo solo quelli validi | rimuoviFileShaRicomponibili | {
"repo_name": "Ks89/BYAManager",
"path": "src/main/java/it/stefanocappa/logic/Restorer.java",
"license": "apache-2.0",
"size": 10840
} | [
"java.nio.file.Files",
"java.nio.file.Path",
"java.util.ArrayList",
"java.util.List"
] | import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; | import java.nio.file.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 2,015,797 |
public static boolean isSameMetaClass(MetaClass mc, Object receiver) {
//TODO: remove this method if possible by switchpoint usage
return receiver instanceof GroovyObject && mc==((GroovyObject)receiver).getMetaClass();
} | static boolean function(MetaClass mc, Object receiver) { return receiver instanceof GroovyObject && mc==((GroovyObject)receiver).getMetaClass(); } | /**
* called by handle
*/ | called by handle | isSameMetaClass | {
"repo_name": "avafanasiev/groovy",
"path": "src/main/org/codehaus/groovy/vmplugin/v7/IndyGuardsFiltersAndSignatures.java",
"license": "apache-2.0",
"size": 10590
} | [
"groovy.lang.GroovyObject",
"groovy.lang.MetaClass"
] | import groovy.lang.GroovyObject; import groovy.lang.MetaClass; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 302,392 |
protected RelaxException error(String msg)
{
return new RelaxException(msg);
}
static {
EMPTY_ITEM_ITERATOR =
new Iterator<Item>() {
public boolean hasNext()
{
return false;
}
public Item next()
{
throw new NoSuchElementException();
... | RelaxException function(String msg) { return new RelaxException(msg); } static { EMPTY_ITEM_ITERATOR = new Iterator<Item>() { public boolean hasNext() { return false; } public Item next() { throw new NoSuchElementException(); } public void remove() { throw new UnsupportedOperationException(); } }; } | /**
* Throws an error.
*/ | Throws an error | error | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/relaxng/program/Item.java",
"license": "gpl-2.0",
"size": 6037
} | [
"com.caucho.relaxng.RelaxException",
"java.util.Iterator",
"java.util.NoSuchElementException"
] | import com.caucho.relaxng.RelaxException; import java.util.Iterator; import java.util.NoSuchElementException; | import com.caucho.relaxng.*; import java.util.*; | [
"com.caucho.relaxng",
"java.util"
] | com.caucho.relaxng; java.util; | 1,716,924 |
public Error execute(Command cmd) throws IOException {
// Cria o arquivo de comando batch
logger.debug("creating the batch file");
StringBuffer cmdFile = new StringBuffer();
cmdFile.append(cmd);
cmdFile.append("\n");
// Envia o arquivo
oxeConnection.putFile(cmdFile.toString(), "cmd.txt", ".");
/... | Error function(Command cmd) throws IOException { logger.debug(STR); StringBuffer cmdFile = new StringBuffer(); cmdFile.append(cmd); cmdFile.append("\n"); oxeConnection.putFile(cmdFile.toString(), STR, "."); logger.debug(STR); oxeConnection.execCommand(STR); logger.debug(STR); return readError(); } | /**
* Executa a lista de comandos.
*
* @param cmds a lista de comandos a ser executado.
* @return uma lista de erros.
* @throws IOException se houve algum erro de escrita ou leitura nos streams.
*/ | Executa a lista de comandos | execute | {
"repo_name": "sombrabr/oxeprov",
"path": "src/main/java/br/eng/etech/oxeprov/Mgr.java",
"license": "gpl-3.0",
"size": 15138
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,178,791 |
public void onCheckboxClicked(View view) {
TextView terms_error = (TextView) findViewById(R.id.terms_text);
terms_error.setError(null);
} | void function(View view) { TextView terms_error = (TextView) findViewById(R.id.terms_text); terms_error.setError(null); } | /**
* Eliminate the error on terms and conditions {@link TextView} if the terms and conditions
* {@link CheckBox} is clicked.
*
* @param view
* @see TextView#setError(CharSequence)
*/ | Eliminate the error on terms and conditions <code>TextView</code> if the terms and conditions <code>CheckBox</code> is clicked | onCheckboxClicked | {
"repo_name": "Ana06/medical-data-android",
"path": "app/src/main/java/com/example/ana/exampleapp/RegisterActivity.java",
"license": "gpl-3.0",
"size": 10896
} | [
"android.view.View",
"android.widget.TextView"
] | import android.view.View; import android.widget.TextView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 2,275,397 |
public void setThumbColor(int thumbColor, int indicatorColor) {
mThumb.setColorStateList(ColorStateList.valueOf(thumbColor));
mIndicator.setColors(indicatorColor, thumbColor);
} | void function(int thumbColor, int indicatorColor) { mThumb.setColorStateList(ColorStateList.valueOf(thumbColor)); mIndicator.setColors(indicatorColor, thumbColor); } | /**
* Sets the color of the seek thumb, as well as the color of the popup indicator.
*
* @param thumbColor The color the seek thumb will be changed to
* @param indicatorColor The color the popup indicator will be changed to
* The indicator will animate from thumbColor ... | Sets the color of the seek thumb, as well as the color of the popup indicator | setThumbColor | {
"repo_name": "AnderWeb/discreteSeekBar",
"path": "library/src/main/java/org/adw/library/widgets/discreteseekbar/DiscreteSeekBar.java",
"license": "apache-2.0",
"size": 38288
} | [
"android.content.res.ColorStateList"
] | import android.content.res.ColorStateList; | import android.content.res.*; | [
"android.content"
] | android.content; | 2,118,341 |
private int fillComplexDimensionChildBlockIndex(int blockOrdinal, CarbonDimension dimension) {
for (int i = 0; i < dimension.numberOfChild(); i++) {
dimensionOrdinalToBlockMapping
.put(dimension.getListOfChildDimensions().get(i).getOrdinal(), ++blockOrdinal);
if (dimension.getListOfChildDime... | int function(int blockOrdinal, CarbonDimension dimension) { for (int i = 0; i < dimension.numberOfChild(); i++) { dimensionOrdinalToBlockMapping .put(dimension.getListOfChildDimensions().get(i).getOrdinal(), ++blockOrdinal); if (dimension.getListOfChildDimensions().get(i).numberOfChild() > 0) { blockOrdinal = fillCompl... | /**
* Below method will be used to add the complex dimension child
* block index.It is a recursive method which will be get the children
* add the block index
*
* @param blockOrdinal start block ordinal
* @param dimension parent dimension
* @return last block index
*/ | Below method will be used to add the complex dimension child block index.It is a recursive method which will be get the children add the block index | fillComplexDimensionChildBlockIndex | {
"repo_name": "ashokblend/incubator-carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/carbon/datastore/block/SegmentProperties.java",
"license": "apache-2.0",
"size": 29002
} | [
"org.apache.carbondata.core.carbon.metadata.schema.table.column.CarbonDimension"
] | import org.apache.carbondata.core.carbon.metadata.schema.table.column.CarbonDimension; | import org.apache.carbondata.core.carbon.metadata.schema.table.column.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 2,769,631 |
public void testHarnessMethods()
{
System.out.println( "Harness Methods" );
Distribution<ObservationType> conditional =
this.createConditionalDistribution();
assertNotNull( conditional );
Collection<? extends ObservationType> data = this.createData( conditional );
... | void function() { System.out.println( STR ); Distribution<ObservationType> conditional = this.createConditionalDistribution(); assertNotNull( conditional ); Collection<? extends ObservationType> data = this.createData( conditional ); assertEquals( NUM_SAMPLES, data.size() ); RecursiveBayesianEstimator<ObservationType,P... | /**
* Harness methods
*/ | Harness methods | testHarnessMethods | {
"repo_name": "codeaudit/Foundry",
"path": "Components/LearningCore/Test/gov/sandia/cognition/statistics/bayesian/RecursiveBayesianEstimatorTestHarness.java",
"license": "bsd-3-clause",
"size": 9286
} | [
"gov.sandia.cognition.statistics.Distribution",
"java.util.Collection"
] | import gov.sandia.cognition.statistics.Distribution; import java.util.Collection; | import gov.sandia.cognition.statistics.*; import java.util.*; | [
"gov.sandia.cognition",
"java.util"
] | gov.sandia.cognition; java.util; | 2,121,626 |
public void addScale(int index, DialScale scale) {
ParamChecks.nullNotPermitted(scale, "scale");
DialScale existing = (DialScale) this.scales.get(index);
if (existing != null) {
removeLayer(existing);
}
this.layers.add(scale);
this.scales.set(index, scale)... | void function(int index, DialScale scale) { ParamChecks.nullNotPermitted(scale, "scale"); DialScale existing = (DialScale) this.scales.get(index); if (existing != null) { removeLayer(existing); } this.layers.add(scale); this.scales.set(index, scale); scale.addChangeListener(this); fireChangeEvent(); } | /**
* Adds a dial scale to the plot and sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param index the scale index.
* @param scale the scale (<code>null</code> not permitted).
*/ | Adds a dial scale to the plot and sends a <code>PlotChangeEvent</code> to all registered listeners | addScale | {
"repo_name": "hongliangpan/manydesigns.cn",
"path": "trunk/portofino-chart/jfreechat.src/org/jfree/chart/plot/dial/DialPlot.java",
"license": "lgpl-3.0",
"size": 24742
} | [
"org.jfree.chart.util.ParamChecks"
] | import org.jfree.chart.util.ParamChecks; | import org.jfree.chart.util.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,015,210 |
public Include withType(String theResourceType) {
StringBuilder b = new StringBuilder();
String paramType = getParamType();
String paramName = getParamName();
if (isBlank(paramType) || isBlank(paramName)) {
throw new IllegalStateException("This include does not contain a value in the format [ResourceTy... | Include function(String theResourceType) { StringBuilder b = new StringBuilder(); String paramType = getParamType(); String paramName = getParamName(); if (isBlank(paramType) isBlank(paramName)) { throw new IllegalStateException(STR); } b.append(paramType); b.append(":"); b.append(paramName); if (isNotBlank(theResource... | /**
* Creates and returns a new copy of this Include with the given type. The following table shows what will be
* returned:
* <table>
* <tr>
* <th>Initial Contents</th>
* <th>theResourceType</th>
* <th>Output</th>
* </tr>
* <tr>
* <td>Patient:careProvider</th>
* <th>Organization</th>
* <th>Pati... | Creates and returns a new copy of this Include with the given type. The following table shows what will be returned: Initial Contents theResourceType Output Patient:careProvider Organization Patient:careProvider:Organization Patient:careProvider:Practitioner Organization Patient:careProvider:Organization Patient (any) ... | withType | {
"repo_name": "jamesagnew/hapi-fhir",
"path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Include.java",
"license": "apache-2.0",
"size": 7059
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 829,492 |
public Predicate<RuleClass> getAllowedRuleClassesWarningPredicate() {
return allowedRuleClassesForLabelsWarning.asPredicateOfRuleClass();
} | Predicate<RuleClass> function() { return allowedRuleClassesForLabelsWarning.asPredicateOfRuleClass(); } | /**
* Returns a predicate that evaluates to true for rule classes that are
* allowed labels in this attribute with warning. If this is not a label or label-list
* attribute, the returned predicate always evaluates to true.
*/ | Returns a predicate that evaluates to true for rule classes that are allowed labels in this attribute with warning. If this is not a label or label-list attribute, the returned predicate always evaluates to true | getAllowedRuleClassesWarningPredicate | {
"repo_name": "dslomov/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/Attribute.java",
"license": "apache-2.0",
"size": 96421
} | [
"com.google.common.base.Predicate"
] | import com.google.common.base.Predicate; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,825,741 |
protected void updatePeriodicStatus() {
byte[] data = new byte[8];
int dataSize;
// Check if a new bus voltage/output voltage/current/temperature message
// has arrived and unpack the values into the cached member variables
try {
getMessage(CANJNI.LM_API_PSTAT_DATA_S0, CANJNI.CAN_MSGID_FULL_M, data);
... | void function() { byte[] data = new byte[8]; int dataSize; try { getMessage(CANJNI.LM_API_PSTAT_DATA_S0, CANJNI.CAN_MSGID_FULL_M, data); m_busVoltage = unpackFXP8_8(new byte[] { data[0], data[1] }); m_outputVoltage = unpackPercentage(new byte[] { data[2], data[3] }) * m_busVoltage; m_outputCurrent = unpackFXP8_8(new by... | /**
* Check for new periodic status updates and unpack them into local variables.
*/ | Check for new periodic status updates and unpack them into local variables | updatePeriodicStatus | {
"repo_name": "trc492/Frc2015RecycleRush",
"path": "code/WPILibJ/CANJaguar.java",
"license": "mit",
"size": 66590
} | [
"edu.wpi.first.wpilibj.can.CANMessageNotFoundException"
] | import edu.wpi.first.wpilibj.can.CANMessageNotFoundException; | import edu.wpi.first.wpilibj.can.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 2,789,945 |
public void setHeaderBackground(ImageHolder imageHolder) {
ImageHolder.applyTo(imageHolder, mAccountHeaderBuilder.mAccountHeaderBackground);
} | void function(ImageHolder imageHolder) { ImageHolder.applyTo(imageHolder, mAccountHeaderBuilder.mAccountHeaderBackground); } | /**
* set the background for the header via the ImageHolder class
*
* @param imageHolder
*/ | set the background for the header via the ImageHolder class | setHeaderBackground | {
"repo_name": "McUsaVsUrss/MaterialDrawer",
"path": "library/src/main/java/com/mikepenz/materialdrawer/AccountHeader.java",
"license": "apache-2.0",
"size": 12758
} | [
"com.mikepenz.materialdrawer.holder.ImageHolder"
] | import com.mikepenz.materialdrawer.holder.ImageHolder; | import com.mikepenz.materialdrawer.holder.*; | [
"com.mikepenz.materialdrawer"
] | com.mikepenz.materialdrawer; | 2,583,035 |
public static String getContainerEntryLabel(IPath containerPath, IJavaProject project) throws JavaModelException {
IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, project);
if (container != null) {
return Strings.markLTR(container.getDescription());
}
ClasspathContainerInitial... | static String function(IPath containerPath, IJavaProject project) throws JavaModelException { IClasspathContainer container= JavaCore.getClasspathContainer(containerPath, project); if (container != null) { return Strings.markLTR(container.getDescription()); } ClasspathContainerInitializer initializer= JavaCore.getClass... | /**
* Returns the label of a classpath container.
* The returned label is BiDi-processed with {@link TextProcessor#process(String, String)}.
*
* @param containerPath the path of the container
* @param project the project the container is resolved in
* @return the label of the classpath container
* @throws... | Returns the label of a classpath container. The returned label is BiDi-processed with <code>TextProcessor#process(String, String)</code> | getContainerEntryLabel | {
"repo_name": "evidolob/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/ui/JavaElementLabels.java",
"license": "epl-1.0",
"size": 30641
} | [
"org.eclipse.core.runtime.IPath",
"org.eclipse.jdt.core.ClasspathContainerInitializer",
"org.eclipse.jdt.core.IClasspathContainer",
"org.eclipse.jdt.core.IJavaProject",
"org.eclipse.jdt.core.JavaCore",
"org.eclipse.jdt.core.JavaModelException",
"org.eclipse.jdt.internal.corext.util.Strings",
"org.ecli... | import org.eclipse.core.runtime.IPath; import org.eclipse.jdt.core.ClasspathContainerInitializer; import org.eclipse.jdt.core.IClasspathContainer; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.internal.corext.util.S... | import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.internal.corext.util.*; import org.eclipse.jdt.internal.ui.viewsupport.*; | [
"org.eclipse.core",
"org.eclipse.jdt"
] | org.eclipse.core; org.eclipse.jdt; | 2,102,975 |
@Test
public void invalidArkIdsAreIdentifiedAsInvalid() throws Exception {
idService.setIdPrefix("ark:/12345/");
idService.setReplaceString("id: ");
idService.setIdLength(21);
idService.setIdRegex("ark:\\/\\d{5}\\/[a-z0-9]{10}");
URI invalidID1 = new URI("rmp:fj29dk93jf"... | void function() throws Exception { idService.setIdPrefix(STR); idService.setReplaceString(STR); idService.setIdLength(21); idService.setIdRegex(STR); URI invalidID1 = new URI(STR); URI invalidID2 = new URI(STR); URI invalidID3 = new URI(STR); URI invalidID4 = new URI(STR); URI invalidID5 = new URI(STR); assertFalse(idS... | /**
* Tests invalid IDs using properties set in http-idservice.properties.
*/ | Tests invalid IDs using properties set in http-idservice.properties | invalidArkIdsAreIdentifiedAsInvalid | {
"repo_name": "rmap-project/rmap",
"path": "idservice-http/src/test/java/info/rmapproject/core/idservice/HttpUrlIdServiceTest.java",
"license": "apache-2.0",
"size": 9533
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,783,572 |
public ACData[] selectDECfromPROP(ACData prop_[])
{
String select = "(select 's', 1, 'dec', dec.dec_idseq as id, dec.version, dec.dec_id, dec.long_name, dec.conte_idseq as cid, "
+ "dec.date_modified, dec.date_created, dec.modified_by, dec.created_by, dec.change_note, c.name, prop.prop_idseq... | ACData[] function(ACData prop_[]) { String select = STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR; return selectAC(select, prop_); } | /**
* Select the Data Element Concepts affected by the Properties provided.
*
* @param prop_
* The property list.
* @return The array of related data element concepts.
*/ | Select the Data Element Concepts affected by the Properties provided | selectDECfromPROP | {
"repo_name": "NCIP/cadsr-sentinel",
"path": "software/src/java/gov/nih/nci/cadsr/sentinel/database/DBAlertOracle.java",
"license": "bsd-3-clause",
"size": 324316
} | [
"gov.nih.nci.cadsr.sentinel.tool.ACData"
] | import gov.nih.nci.cadsr.sentinel.tool.ACData; | import gov.nih.nci.cadsr.sentinel.tool.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 777,579 |
public void listProducts(
com.google.cloud.vision.v1.ListProductsRequest request,
io.grpc.stub.StreamObserver<com.google.cloud.vision.v1.ListProductsResponse>
responseObserver) {
asyncUnimplementedUnaryCall(getListProductsMethodHelper(), responseObserver);
} | void function( com.google.cloud.vision.v1.ListProductsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.vision.v1.ListProductsResponse> responseObserver) { asyncUnimplementedUnaryCall(getListProductsMethodHelper(), responseObserver); } | /**
*
*
* <pre>
* Lists products in an unspecified order.
* Possible errors:
* * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
* </pre>
*/ | <code> Lists products in an unspecified order. Possible errors: Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. </code> | listProducts | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-api-grpc/grpc-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchGrpc.java",
"license": "apache-2.0",
"size": 124636
} | [
"io.grpc.stub.ServerCalls"
] | import io.grpc.stub.ServerCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 2,490,115 |
public void signRequest(TwitterAuthToken accessToken, HttpURLConnection request) {
OAuth1aService.signRequest(this, accessToken, request, null);
} | void function(TwitterAuthToken accessToken, HttpURLConnection request) { OAuth1aService.signRequest(this, accessToken, request, null); } | /**
* Signs the {@code HttpURLConnection} request using the specified access token.
*
* @param accessToken The access token to use to sign the request.
* @param request The request to sign.
*/ | Signs the HttpURLConnection request using the specified access token | signRequest | {
"repo_name": "rcastro78/twitter-kit-android",
"path": "twitter-core/src/main/java/com/twitter/sdk/android/core/TwitterAuthConfig.java",
"license": "apache-2.0",
"size": 4255
} | [
"com.twitter.sdk.android.core.internal.oauth.OAuth1aService",
"java.net.HttpURLConnection"
] | import com.twitter.sdk.android.core.internal.oauth.OAuth1aService; import java.net.HttpURLConnection; | import com.twitter.sdk.android.core.internal.oauth.*; import java.net.*; | [
"com.twitter.sdk",
"java.net"
] | com.twitter.sdk; java.net; | 1,828,694 |
public static ForumController getStandardForumController(UserRequest ureq, WindowControl wControl, Forum forum, ForumCallback forumCallback) {
return new ForumController(forum, forumCallback, ureq, wControl);
} | static ForumController function(UserRequest ureq, WindowControl wControl, Forum forum, ForumCallback forumCallback) { return new ForumController(forum, forumCallback, ureq, wControl); } | /**
* Provides a standard forum controller without a title element
* @param ureq
* @param wControl
* @param forum
* @param forumCallback
* @return
*/ | Provides a standard forum controller without a title element | getStandardForumController | {
"repo_name": "stevenhva/InfoLearn_OpenOLAT",
"path": "src/main/java/org/olat/modules/fo/ForumUIFactory.java",
"license": "apache-2.0",
"size": 4417
} | [
"org.olat.core.gui.UserRequest",
"org.olat.core.gui.control.WindowControl"
] | import org.olat.core.gui.UserRequest; import org.olat.core.gui.control.WindowControl; | import org.olat.core.gui.*; import org.olat.core.gui.control.*; | [
"org.olat.core"
] | org.olat.core; | 1,900,008 |
public void onAppSettingsClick(View view) {
startActivity(new Intent(Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS));
} | void function(View view) { startActivity(new Intent(Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS)); } | /**
* Click handler for app settings button
*
* @param view The button that was clicked
*/ | Click handler for app settings button | onAppSettingsClick | {
"repo_name": "adstro/show-settings",
"path": "app/src/main/java/com/adstrosoftware/showsettings/MainActivity.java",
"license": "apache-2.0",
"size": 1793
} | [
"android.content.Intent",
"android.provider.Settings",
"android.view.View"
] | import android.content.Intent; import android.provider.Settings; import android.view.View; | import android.content.*; import android.provider.*; import android.view.*; | [
"android.content",
"android.provider",
"android.view"
] | android.content; android.provider; android.view; | 396,403 |
@SuppressWarnings("deprecation")
void createSymlink(String target, String link,
PermissionStatus dirPerms, boolean createParent)
throws IOException, UnresolvedLinkException {
if (!FileSystem.areSymlinksEnabled()) {
throw new UnsupportedOperationException("Symlinks not supported");
}
i... | @SuppressWarnings(STR) void createSymlink(String target, String link, PermissionStatus dirPerms, boolean createParent) throws IOException, UnresolvedLinkException { if (!FileSystem.areSymlinksEnabled()) { throw new UnsupportedOperationException(STR); } if (!DFSUtil.isValidName(link)) { throw new InvalidPathException(ST... | /**
* Create a symbolic link.
*/ | Create a symbolic link | createSymlink | {
"repo_name": "yncxcw/Yarn-SBlock",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 338725
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.InvalidPathException",
"org.apache.hadoop.fs.UnresolvedLinkException",
"org.apache.hadoop.fs.permission.PermissionStatus",
"org.apache.hadoop.hdfs.DFSUtil",
"org.apache.hadoop.ipc.RetryCache",
"org.apache.hadoop.security.A... | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.InvalidPathException; import org.apache.hadoop.fs.UnresolvedLinkException; import org.apache.hadoop.fs.permission.PermissionStatus; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.ipc.RetryCache; import org.a... | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,318,632 |
public RecordTemplate getViewTemplate() throws PublicationTemplateException {
return viewTemplate;
} | RecordTemplate function() throws PublicationTemplateException { return viewTemplate; } | /**
* Returns the RecordTemplate of the publication view item.
*/ | Returns the RecordTemplate of the publication view item | getViewTemplate | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Core",
"path": "lib-core/src/main/java/com/silverpeas/publicationTemplate/PublicationTemplateImpl.java",
"license": "agpl-3.0",
"size": 22573
} | [
"com.silverpeas.form.RecordTemplate"
] | import com.silverpeas.form.RecordTemplate; | import com.silverpeas.form.*; | [
"com.silverpeas.form"
] | com.silverpeas.form; | 465,822 |
@Test
public void test_CUToExistingTU_create_mixed_TU_completeCU()
{
final BigDecimal four = new BigDecimal("4");
final I_M_HU cu1 = mkRealCUWithTUToSplit("5");
final I_M_HU tuWithMixedCUs = handlingUnitsDAO.retrieveParent(cu1);
// create a standalone-CU
final HUProducerDestination producer = HUProduce... | void function() { final BigDecimal four = new BigDecimal("4"); final I_M_HU cu1 = mkRealCUWithTUToSplit("5"); final I_M_HU tuWithMixedCUs = handlingUnitsDAO.retrieveParent(cu1); final HUProducerDestination producer = HUProducerDestination.ofVirtualPI(); data.helper.load(producer, data.helper.pSalad, four, data.helper.u... | /**
* Similar to {@link #test_CUToExistingTU_create_mixed_TU_partialCU()}, but move all the salad
*/ | Similar to <code>#test_CUToExistingTU_create_mixed_TU_partialCU()</code>, but move all the salad | test_CUToExistingTU_create_mixed_TU_completeCU | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.handlingunits.base/src/test/java/de/metas/handlingunits/allocation/transfer/HUTransferServiceTests.java",
"license": "gpl-2.0",
"size": 50793
} | [
"de.metas.handlingunits.HUXmlConverter",
"de.metas.handlingunits.allocation.impl.HUProducerDestination",
"java.math.BigDecimal",
"org.hamcrest.Matchers",
"org.junit.Assert",
"org.w3c.dom.Node"
] | import de.metas.handlingunits.HUXmlConverter; import de.metas.handlingunits.allocation.impl.HUProducerDestination; import java.math.BigDecimal; import org.hamcrest.Matchers; import org.junit.Assert; import org.w3c.dom.Node; | import de.metas.handlingunits.*; import de.metas.handlingunits.allocation.impl.*; import java.math.*; import org.hamcrest.*; import org.junit.*; import org.w3c.dom.*; | [
"de.metas.handlingunits",
"java.math",
"org.hamcrest",
"org.junit",
"org.w3c.dom"
] | de.metas.handlingunits; java.math; org.hamcrest; org.junit; org.w3c.dom; | 2,380,709 |
public final static Function<Double, Double> pow(int power) {
return new Pow(power);
}
/**
* <p>
* It performs the operation target<sup>power</sup> and returns its value. The result
* precision and rounding mode is specified by the given {@link MathContext}
* </p>
*
* @param pow... | final static Function<Double, Double> function(int power) { return new Pow(power); } /** * <p> * It performs the operation target<sup>power</sup> and returns its value. The result * precision and rounding mode is specified by the given {@link MathContext} * </p> * * @param power the power to raise the target to * @para... | /**
* <p>
* It performs the operation target<sup>power</sup> and returns its value
* </p>
*
* @param power the power to raise the target to
* @return the result of target<sup>power</sup>
*/ | It performs the operation targetpower and returns its value | pow | {
"repo_name": "op4j/op4j",
"path": "src/main/java/org/op4j/functions/FnDouble.java",
"license": "apache-2.0",
"size": 111187
} | [
"java.math.MathContext",
"java.math.RoundingMode"
] | import java.math.MathContext; import java.math.RoundingMode; | import java.math.*; | [
"java.math"
] | java.math; | 200,287 |
@Path(RESET_CREDENTIALS_PATH)
@GET
public Response resetCredentialsGET(@QueryParam("code") String code,
@QueryParam("execution") String execution) {
// we allow applications to link to reset credentials without going through OAuth or SAML handshakes
/... | @Path(RESET_CREDENTIALS_PATH) Response function(@QueryParam("code") String code, @QueryParam(STR) String execution) { if (!realm.isResetPasswordAllowed()) { event.event(EventType.RESET_PASSWORD); event.error(Errors.NOT_ALLOWED); return ErrorPage.error(session, Messages.RESET_CREDENTIAL_NOT_ALLOWED); } ClientModel clien... | /**
* Endpoint for executing reset credentials flow. If code is null, a client session is created with the account
* service as the client. Successful reset sends you to the account page. Note, account service must be enabled.
*
* @param code
* @param execution
* @return
*/ | Endpoint for executing reset credentials flow. If code is null, a client session is created with the account service as the client. Successful reset sends you to the account page. Note, account service must be enabled | resetCredentialsGET | {
"repo_name": "wildfly-security-incubator/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/LoginActionsService.java",
"license": "apache-2.0",
"size": 41848
} | [
"javax.ws.rs.Path",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.Response",
"org.keycloak.OAuth2Constants",
"org.keycloak.events.Errors",
"org.keycloak.events.EventType",
"org.keycloak.models.ClientModel",
"org.keycloak.models.ClientSessionModel",
"org.keycloak.models.Constants",
"org.keycloak.prot... | import javax.ws.rs.Path; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import org.keycloak.OAuth2Constants; import org.keycloak.events.Errors; import org.keycloak.events.EventType; import org.keycloak.models.ClientModel; import org.keycloak.models.ClientSessionModel; import org.keycloak.models.Consta... | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.keycloak.*; import org.keycloak.events.*; import org.keycloak.models.*; import org.keycloak.protocol.oidc.*; import org.keycloak.services.*; import org.keycloak.services.messages.*; | [
"javax.ws",
"org.keycloak",
"org.keycloak.events",
"org.keycloak.models",
"org.keycloak.protocol",
"org.keycloak.services"
] | javax.ws; org.keycloak; org.keycloak.events; org.keycloak.models; org.keycloak.protocol; org.keycloak.services; | 2,157,862 |
@Override
public void deleteAll(Collection<Long> keys) {
for (Long key : keys) {
store.remove(key);
}
} | void function(Collection<Long> keys) { for (Long key : keys) { store.remove(key); } } | /**
* Deletes multiple entries from the store.
*
* @param keys keys of the entries to delete.
*/ | Deletes multiple entries from the store | deleteAll | {
"repo_name": "lmjacksoniii/hazelcast",
"path": "hazelcast/src/test/java/com/hazelcast/collection/impl/queue/QueueStoreTest.java",
"license": "apache-2.0",
"size": 21080
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,997,267 |
@Override
public Response getMonitoringCreationHostGroup( String adapterType,
HostGroupMonitoringCreateRequest hostGroupMonitoringCreateRequest) throws Exception {
UpdatedPaasGroup resultgroupID = new UpdatedPaasGroup();
String errorMessage;
switch (adapterType) {
case "zabbix":
int z;
try {
... | Response function( String adapterType, HostGroupMonitoringCreateRequest hostGroupMonitoringCreateRequest) throws Exception { UpdatedPaasGroup resultgroupID = new UpdatedPaasGroup(); String errorMessage; switch (adapterType) { case STR: int z; try { @SuppressWarnings(STR) ArrayList<JSONRPCResponse<HostGroupResponse>> ho... | /*****************************************
* CREATE GROUP INTO PAAS PLATFORM
* @param adapterType
* @param hostGroupMonitoringCreateRequest
* @return
* @throws Exception
*/ | CREATE GROUP INTO PAAS PLATFORM | getMonitoringCreationHostGroup | {
"repo_name": "pon-prisma/PrismaDemo",
"path": "MonitoringPillar/src/main/java/it/monitoringpillar/MonitoringPillarWSImpl.java",
"license": "apache-2.0",
"size": 61615
} | [
"it.prisma.domain.dsl.monitoring.businesslayer.paas.request.HostGroupMonitoringCreateRequest",
"it.prisma.domain.dsl.monitoring.pillar.protocol.MonitoringErrorCode",
"it.prisma.domain.dsl.monitoring.pillar.protocol.MonitoringResponse",
"it.prisma.domain.dsl.monitoring.pillar.wrapper.paas.UpdatedPaasGroup",
... | import it.prisma.domain.dsl.monitoring.businesslayer.paas.request.HostGroupMonitoringCreateRequest; import it.prisma.domain.dsl.monitoring.pillar.protocol.MonitoringErrorCode; import it.prisma.domain.dsl.monitoring.pillar.protocol.MonitoringResponse; import it.prisma.domain.dsl.monitoring.pillar.wrapper.paas.UpdatedPaa... | import it.prisma.domain.dsl.monitoring.businesslayer.paas.request.*; import it.prisma.domain.dsl.monitoring.pillar.protocol.*; import it.prisma.domain.dsl.monitoring.pillar.wrapper.paas.*; import it.prisma.domain.dsl.monitoring.pillar.zabbix.response.*; import it.prisma.utils.misc.*; import it.prisma.utils.web.ws.rest.... | [
"it.prisma.domain",
"it.prisma.utils",
"java.util",
"javax.ws"
] | it.prisma.domain; it.prisma.utils; java.util; javax.ws; | 595,155 |
@Override
public void resetTX(Transaction transaction) {
this.tx = transaction;
this.autoCommitAcks = transaction == null;
this.autoCommitSends = transaction == null;
} | void function(Transaction transaction) { this.tx = transaction; this.autoCommitAcks = transaction == null; this.autoCommitSends = transaction == null; } | /**
* Some protocols may chose to hold their transactions outside of the ServerSession.
* This can be used to replace the transaction.
* Notice that we set autoCommitACK and autoCommitSends to true if tx == null
*/ | Some protocols may chose to hold their transactions outside of the ServerSession. This can be used to replace the transaction. Notice that we set autoCommitACK and autoCommitSends to true if tx == null | resetTX | {
"repo_name": "paulgallagher75/activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java",
"license": "apache-2.0",
"size": 55850
} | [
"org.apache.activemq.artemis.core.transaction.Transaction"
] | import org.apache.activemq.artemis.core.transaction.Transaction; | import org.apache.activemq.artemis.core.transaction.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 405,793 |
private BinaryReaderExImpl reader(@Nullable BinaryReaderHandles rCtx, boolean forUnmarshal) {
BinaryOffheapInputStream stream = new BinaryOffheapInputStream(ptr, size, false);
stream.position(start);
return new BinaryReaderExImpl(ctx,
stream,
ctx.configuration().get... | BinaryReaderExImpl function(@Nullable BinaryReaderHandles rCtx, boolean forUnmarshal) { BinaryOffheapInputStream stream = new BinaryOffheapInputStream(ptr, size, false); stream.position(start); return new BinaryReaderExImpl(ctx, stream, ctx.configuration().getClassLoader(), rCtx, forUnmarshal); } | /**
* Create new reader for this object.
*
* @param rCtx Reader context.
* @param forUnmarshal {@code True} if reader is needed to unmarshal object.
* @return Reader.
*/ | Create new reader for this object | reader | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryObjectOffheapImpl.java",
"license": "apache-2.0",
"size": 16828
} | [
"org.apache.ignite.internal.binary.streams.BinaryOffheapInputStream",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.internal.binary.streams.BinaryOffheapInputStream; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.internal.binary.streams.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 873,786 |
private static QueryNode processNewQueryNode(AST ast, Query q, String modelPackage,
Iterator<?> iterator) {
Object retval = processNewQueryNodeOrReference(ast, q, false, modelPackage, iterator);
if (retval instanceof QueryObjectReference) {
QueryObjectReference qor = (QueryOb... | static QueryNode function(AST ast, Query q, String modelPackage, Iterator<?> iterator) { Object retval = processNewQueryNodeOrReference(ast, q, false, modelPackage, iterator); if (retval instanceof QueryObjectReference) { QueryObjectReference qor = (QueryObjectReference) retval; throw new IllegalArgumentException(STR +... | /**
* Processes an AST node that describes a QueryNode.
*
* @param ast an AST node to process
* @param q the Query to build
* @param modelPackage the package for unqualified class names
* @param iterator an iterator through the list of parameters of the IqlQuery
* @return a QueryNode ... | Processes an AST node that describes a QueryNode | processNewQueryNode | {
"repo_name": "drhee/toxoMine",
"path": "intermine/objectstore/main/src/org/intermine/objectstore/query/iql/IqlQueryParser.java",
"license": "lgpl-2.1",
"size": 72368
} | [
"java.util.Iterator",
"org.intermine.objectstore.query.Query",
"org.intermine.objectstore.query.QueryNode",
"org.intermine.objectstore.query.QueryObjectReference"
] | import java.util.Iterator; import org.intermine.objectstore.query.Query; import org.intermine.objectstore.query.QueryNode; import org.intermine.objectstore.query.QueryObjectReference; | import java.util.*; import org.intermine.objectstore.query.*; | [
"java.util",
"org.intermine.objectstore"
] | java.util; org.intermine.objectstore; | 1,018,501 |
public void load(final String resourceName)
{
final InputStream in = ObjectUtilities.getResourceRelativeAsStream
(resourceName, PropertyFileConfiguration.class);
if (in != null)
{
load(in);
}
else
{
Log.debug ("Configuration file not found in the classpath: ... | void function(final String resourceName) { final InputStream in = ObjectUtilities.getResourceRelativeAsStream (resourceName, PropertyFileConfiguration.class); if (in != null) { load(in); } else { Log.debug (STR + resourceName); } } | /**
* Loads the properties stored in the given file. This method does nothing if
* the file does not exist or is unreadable. Appends the contents of the loaded
* properties to the already stored contents.
*
* @param resourceName the file name of the stored properties.
*/ | Loads the properties stored in the given file. This method does nothing if the file does not exist or is unreadable. Appends the contents of the loaded properties to the already stored contents | load | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jcommon-1.0.10/source/org/jfree/base/config/PropertyFileConfiguration.java",
"license": "gpl-2.0",
"size": 3649
} | [
"java.io.InputStream",
"org.jfree.util.Log",
"org.jfree.util.ObjectUtilities"
] | import java.io.InputStream; import org.jfree.util.Log; import org.jfree.util.ObjectUtilities; | import java.io.*; import org.jfree.util.*; | [
"java.io",
"org.jfree.util"
] | java.io; org.jfree.util; | 292,896 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.