method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static void logHttpResponse(HttpURLConnection conn, OperationContext opContext) throws IOException { if (Logger.shouldLog(opContext, Log.VERBOSE)) { try { StringBuilder bld = new StringBuilder(); // This map's null key will contain the response code an...
static void function(HttpURLConnection conn, OperationContext opContext) throws IOException { if (Logger.shouldLog(opContext, Log.VERBOSE)) { try { StringBuilder bld = new StringBuilder(); for (Map.Entry<String, List<String>> header : conn.getHeaderFields().entrySet()) { if (header.getKey() != null) { bld.append(header...
/** * Logs the HttpURLConnection response. If an exception is encountered, logs nothing. * * @param conn * The HttpURLConnection to serialize. * @param opContext * The operation context which provides the logger. */
Logs the HttpURLConnection response. If an exception is encountered, logs nothing
logHttpResponse
{ "repo_name": "Azure/azure-storage-android", "path": "microsoft-azure-storage/src/com/microsoft/azure/storage/core/Utility.java", "license": "apache-2.0", "size": 57440 }
[ "android.util.Log", "com.microsoft.azure.storage.OperationContext", "java.io.IOException", "java.net.HttpURLConnection", "java.util.List", "java.util.Map" ]
import android.util.Log; import com.microsoft.azure.storage.OperationContext; import java.io.IOException; import java.net.HttpURLConnection; import java.util.List; import java.util.Map;
import android.util.*; import com.microsoft.azure.storage.*; import java.io.*; import java.net.*; import java.util.*;
[ "android.util", "com.microsoft.azure", "java.io", "java.net", "java.util" ]
android.util; com.microsoft.azure; java.io; java.net; java.util;
2,004,686
public void extend(ChangeAttribute a, Change change) { a.lastUpdated = change.getLastUpdatedOn().getTime() / 1000L; a.sortKey = change.getSortKey(); a.open = change.getStatus().isOpen(); a.status = change.getStatus(); }
void function(ChangeAttribute a, Change change) { a.lastUpdated = change.getLastUpdatedOn().getTime() / 1000L; a.sortKey = change.getSortKey(); a.open = change.getStatus().isOpen(); a.status = change.getStatus(); }
/** * Extend the existing ChangeAttribute with additional fields. * * @param a * @param change */
Extend the existing ChangeAttribute with additional fields
extend
{ "repo_name": "austinchic/Gerrit", "path": "gerrit-server/src/main/java/com/google/gerrit/server/events/EventFactory.java", "license": "apache-2.0", "size": 7560 }
[ "com.google.gerrit.reviewdb.Change" ]
import com.google.gerrit.reviewdb.Change;
import com.google.gerrit.reviewdb.*;
[ "com.google.gerrit" ]
com.google.gerrit;
376,159
EventQueue.invokeLater(new Runnable() {
EventQueue.invokeLater(new Runnable() {
/** * Launch the application. */
Launch the application
UpdateFrame
{ "repo_name": "danielbitenco/UFSC", "path": "Programas/Java/Object-Oriented Programming - Programação Orientada a Objetos/TrabalhoFinalAgenda/src/UpdateFrame.java", "license": "mit", "size": 5593 }
[ "java.awt.EventQueue" ]
import java.awt.EventQueue;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,572,362
public boolean containsValue(CharSequence name, CharSequence value, boolean ignoreCase) { List<String> values = getAll(name); if (values.isEmpty()) { return false; } for (String v: values) { if (contains(v, value, ignoreCase)) { return true; ...
boolean function(CharSequence name, CharSequence value, boolean ignoreCase) { List<String> values = getAll(name); if (values.isEmpty()) { return false; } for (String v: values) { if (contains(v, value, ignoreCase)) { return true; } } return false; }
/** * Returns {@code true} if a header with the {@code name} and {@code value} exists, {@code false} otherwise. * This also handles multiple values that are seperated with a {@code ,}. * <p> * If {@code ignoreCase} is {@code true} then a case insensitive compare is done on the value. * @param n...
Returns true if a header with the name and value exists, false otherwise. This also handles multiple values that are seperated with a ,. If ignoreCase is true then a case insensitive compare is done on the value
containsValue
{ "repo_name": "Techcable/netty", "path": "codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java", "license": "apache-2.0", "size": 55793 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,137,666
public void doList_next(RunData runData, Context context) { // access the portlet element id to find our state String peid = ((JetspeedRunData) runData).getJs_peid(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid); // set the flag to go to the next page on the next list sta...
void function(RunData runData, Context context) { String peid = ((JetspeedRunData) runData).getJs_peid(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid); state.setAttribute(STATE_GO_NEXT_PAGE, ""); int page = ((Integer) state.getAttribute(STATE_CURRENT_PAGE)).intValue(); state.setAttribut...
/** * Handle a next-page (list) request. */
Handle a next-page (list) request
doList_next
{ "repo_name": "OpenCollabZA/sakai", "path": "velocity/tool/src/java/org/sakaiproject/cheftool/NewPagedResourceAction.java", "license": "apache-2.0", "size": 20873 }
[ "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.event.api.*;
[ "org.sakaiproject.event" ]
org.sakaiproject.event;
2,837,824
public static <I, O> Matcher<I> where(DescribablePredicate<? super I> booleanProperty) { return where(booleanProperty.getResultDescription(), booleanProperty); }
static <I, O> Matcher<I> function(DescribablePredicate<? super I> booleanProperty) { return where(booleanProperty.getResultDescription(), booleanProperty); }
/** * Match a {@code boolean} property of an object which should be {@code true}. * * @param booleanProperty the predicate resolving the {@code boolean} property from the object. */
Match a boolean property of an object which should be true
where
{ "repo_name": "unruly/java-8-matchers", "path": "src/main/java/co/unruly/matchers/Java8Matchers.java", "license": "mit", "size": 4832 }
[ "co.unruly.matchers.function.DescribablePredicate", "org.hamcrest.Matcher" ]
import co.unruly.matchers.function.DescribablePredicate; import org.hamcrest.Matcher;
import co.unruly.matchers.function.*; import org.hamcrest.*;
[ "co.unruly.matchers", "org.hamcrest" ]
co.unruly.matchers; org.hamcrest;
856,190
@Override protected String doExecute() { m_Queue.clear(); if (m_RegExp.isMatchAll()) { if (!m_Invert) m_Queue.addAll(System.getProperties().stringPropertyNames()); } else { for (String name: System.getProperties().stringPropertyNames()) { if (m_Invert && !m_RegExp.isMatch(name)) ...
String function() { m_Queue.clear(); if (m_RegExp.isMatchAll()) { if (!m_Invert) m_Queue.addAll(System.getProperties().stringPropertyNames()); } else { for (String name: System.getProperties().stringPropertyNames()) { if (m_Invert && !m_RegExp.isMatch(name)) m_Queue.add(name); else if (!m_Invert && m_RegExp.isMatch(nam...
/** * Executes the flow item. * * @return null if everything is fine, otherwise error message */
Executes the flow item
doExecute
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/flow/source/ListSystemProperties.java", "license": "gpl-3.0", "size": 6800 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
1,631,524
public boolean supportsArchitecture(List<String> reqArchs) { if (reqArchs.contains("*")) return true; for (String reqArch : reqArchs) if (supportsArchitecture(reqArch)) return true; return false; }
boolean function(List<String> reqArchs) { if (reqArchs.contains("*")) return true; for (String reqArch : reqArchs) if (supportsArchitecture(reqArch)) return true; return false; }
/** * Returns <b>true</b> if the library declares to support at least one of the * specified architectures. * * @param reqArchs A List of architectures to check * @return */
Returns true if the library declares to support at least one of the specified architectures
supportsArchitecture
{ "repo_name": "Chris--A/Arduino", "path": "arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java", "license": "lgpl-2.1", "size": 5136 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,484,793
public void notifyListeners(final Set<ResourceListener> listeners, final ResourceEvent event);
void function(final Set<ResourceListener> listeners, final ResourceEvent event);
/** * Ask the monitor to notify the given listeners of the given event. * * @param listeners Set of listeners of notify. * @param event Event to send to the listeners. */
Ask the monitor to notify the given listeners of the given event
notifyListeners
{ "repo_name": "charliemblack/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/control/ResourceMonitor.java", "license": "apache-2.0", "size": 1750 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,010,656
public Collection<DelegateUserResponse> updateDelegates(Mailbox mailbox, MeetingRequestsDeliveryScope meetingRequestsDeliveryScope, Iterable<DelegateUser> delegateUsers) throws Exception { EwsUtilities.validateParam(mailbox, "mailbox"); EwsUtilities.validateParamCollection(delegateUsers.iterator()...
Collection<DelegateUserResponse> function(Mailbox mailbox, MeetingRequestsDeliveryScope meetingRequestsDeliveryScope, Iterable<DelegateUser> delegateUsers) throws Exception { EwsUtilities.validateParam(mailbox, STR); EwsUtilities.validateParamCollection(delegateUsers.iterator(), STR); UpdateDelegateRequest request = ne...
/** * Updates delegates on a specific mailbox. Calling this method results in * a call to EWS. * * @param mailbox the mailbox * @param meetingRequestsDeliveryScope the meeting request delivery scope * @param delegateUsers the delegate users * @return A collection...
Updates delegates on a specific mailbox. Calling this method results in a call to EWS
updateDelegates
{ "repo_name": "candrews/ews-java-api", "path": "src/main/java/microsoft/exchange/webservices/data/core/ExchangeService.java", "license": "mit", "size": 161711 }
[ "java.util.ArrayList", "java.util.Collection" ]
import java.util.ArrayList; import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,373,993
@Test(expected = DecoderException.class) public void testEncAsRepPartEmpty() throws DecoderException { Asn1Decoder kerberosDecoder = new Asn1Decoder(); ByteBuffer stream = ByteBuffer.allocate( 0x02 ); stream.put( new byte[] { 0x79, 0x00 } ); stream.flip(); ...
@Test(expected = DecoderException.class) void function() throws DecoderException { Asn1Decoder kerberosDecoder = new Asn1Decoder(); ByteBuffer stream = ByteBuffer.allocate( 0x02 ); stream.put( new byte[] { 0x79, 0x00 } ); stream.flip(); Asn1Container encAsRepPartContainer = new EncAsRepPartContainer( stream ); kerberos...
/** * Test the decoding of a EncAsRepPart with nothing in it */
Test the decoding of a EncAsRepPart with nothing in it
testEncAsRepPartEmpty
{ "repo_name": "lucastheisen/apache-directory-server", "path": "kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/EncAsRepPartDecoderTest.java", "license": "apache-2.0", "size": 6275 }
[ "java.nio.ByteBuffer", "org.apache.directory.api.asn1.DecoderException", "org.apache.directory.api.asn1.ber.Asn1Container", "org.apache.directory.api.asn1.ber.Asn1Decoder", "org.apache.directory.shared.kerberos.codec.encAsRepPart.EncAsRepPartContainer", "org.junit.Assert", "org.junit.Test" ]
import java.nio.ByteBuffer; import org.apache.directory.api.asn1.DecoderException; import org.apache.directory.api.asn1.ber.Asn1Container; import org.apache.directory.api.asn1.ber.Asn1Decoder; import org.apache.directory.shared.kerberos.codec.encAsRepPart.EncAsRepPartContainer; import org.junit.Assert; import org.junit...
import java.nio.*; import org.apache.directory.api.asn1.*; import org.apache.directory.api.asn1.ber.*; import org.apache.directory.shared.kerberos.codec.*; import org.junit.*;
[ "java.nio", "org.apache.directory", "org.junit" ]
java.nio; org.apache.directory; org.junit;
93,778
public List<T> getAllElements() { return new ArrayList<>(this.elements); } public static class NoSelectionProvided extends Selection<Void> {}
List<T> function() { return new ArrayList<>(this.elements); } public static class NoSelectionProvided extends Selection<Void> {}
/** * Returns all the selected elements. * * @return all the selected elements. */
Returns all the selected elements
getAllElements
{ "repo_name": "akervern/che", "path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/selection/Selection.java", "license": "epl-1.0", "size": 3199 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,172,646
public static final FirestoreClient create(FirestoreSettings settings) throws IOException { return new FirestoreClient(settings); }
static final FirestoreClient function(FirestoreSettings settings) throws IOException { return new FirestoreClient(settings); }
/** * Constructs an instance of FirestoreClient, using the given settings. The channels are created * based on the settings passed in, or defaults for any settings that are not set. */
Constructs an instance of FirestoreClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set
create
{ "repo_name": "mbrukman/gcloud-java", "path": "google-cloud-firestore/src/main/java/com/google/cloud/firestore/v1beta1/FirestoreClient.java", "license": "apache-2.0", "size": 44307 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,898,348
public void beanPropertyChanged(BeanChangeEvent<Image> event) { Image img = event.getSource(); if (img == image) { if (event.getProperty() == BeanProperty.IMAGE_RATING) { display.setIcon(RatingRepresentation.getIcon(img.getRating())); } } else { img.removeListener(this); } }
void function(BeanChangeEvent<Image> event) { Image img = event.getSource(); if (img == image) { if (event.getProperty() == BeanProperty.IMAGE_RATING) { display.setIcon(RatingRepresentation.getIcon(img.getRating())); } } else { img.removeListener(this); } }
/** * Update display if value has changed * * @see org.jimcat.model.notification.BeanListener#beanPropertyChanged(org.jimcat.model.notification.BeanChangeEvent) */
Update display if value has changed
beanPropertyChanged
{ "repo_name": "HerbertJordan/JimCat", "path": "src/org/jimcat/gui/rating/RatingEditor.java", "license": "gpl-2.0", "size": 5250 }
[ "org.jimcat.model.Image", "org.jimcat.model.notification.BeanChangeEvent", "org.jimcat.model.notification.BeanProperty" ]
import org.jimcat.model.Image; import org.jimcat.model.notification.BeanChangeEvent; import org.jimcat.model.notification.BeanProperty;
import org.jimcat.model.*; import org.jimcat.model.notification.*;
[ "org.jimcat.model" ]
org.jimcat.model;
64,710
public Date getDateTime() { Annotation annotation = getBioAssay().getAnnotation(); if (annotation == null) return null; String date = annotation.getProperty(IMAGENE_RESULT_HEADER_DATE); try { return DATE_FORMAT.parse(date); } catch (ParseException e) { return null; } } ...
Date function() { Annotation annotation = getBioAssay().getAnnotation(); if (annotation == null) return null; String date = annotation.getProperty(IMAGENE_RESULT_HEADER_DATE); try { return DATE_FORMAT.parse(date); } catch (ParseException e) { return null; } } //
/** * Return the date of the creation of the data. * @return The creation date of the data */
Return the date of the creation of the data
getDateTime
{ "repo_name": "GenomicParisCentre/nividic", "path": "src/main/java/fr/ens/transcriptome/nividic/om/ImaGeneResult.java", "license": "lgpl-2.1", "size": 4288 }
[ "java.text.ParseException", "java.util.Date" ]
import java.text.ParseException; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,876,346
class ImageScrollListener implements ChangeListener { public void stateChanged(ChangeEvent e) { if (internalChange) return; float h = ((Number) hSpinner.getValue()).intValue() / 360f; float s = ((Number) sSpinner.getValue()).intValue() / 100f; float b = ((Number) bSpinner.getV...
class ImageScrollListener implements ChangeListener { void function(ChangeEvent e) { if (internalChange) return; float h = ((Number) hSpinner.getValue()).intValue() / 360f; float s = ((Number) sSpinner.getValue()).intValue() / 100f; float b = ((Number) bSpinner.getValue()).intValue() / 100f; spinnerTrigger = true; getC...
/** * This method is called whenever one of the JSpinner values change. The * JColorChooser should be updated with the new HSB values. * * @param e The ChangeEvent. */
This method is called whenever one of the JSpinner values change. The JColorChooser should be updated with the new HSB values
stateChanged
{ "repo_name": "unofficial-opensource-apple/gcc_40", "path": "libjava/javax/swing/colorchooser/DefaultHSBChooserPanel.java", "license": "gpl-2.0", "size": 23695 }
[ "java.awt.Color", "javax.swing.event.ChangeEvent", "javax.swing.event.ChangeListener" ]
import java.awt.Color; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener;
import java.awt.*; import javax.swing.event.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,562,692
EReference getDocumentRoot_AbstractReferenceBase();
EReference getDocumentRoot_AbstractReferenceBase();
/** * Returns the meta object for the containment reference '{@link net.opengis.ows11.DocumentRoot#getAbstractReferenceBase <em>Abstract Reference Base</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Abstract Reference Base</em>'. *...
Returns the meta object for the containment reference '<code>net.opengis.ows11.DocumentRoot#getAbstractReferenceBase Abstract Reference Base</code>'.
getDocumentRoot_AbstractReferenceBase
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.ows/src/net/opengis/ows11/Ows11Package.java", "license": "lgpl-2.1", "size": 292282 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,256,837
private void showErrorToUser(@StringRes final int resId, final Exception e) { final Resources resources = mServiceContext.getResources(); final String error = resources.getString(resId); showErrorToUser(error, e); }
void function(@StringRes final int resId, final Exception e) { final Resources resources = mServiceContext.getResources(); final String error = resources.getString(resId); showErrorToUser(error, e); }
/** * Reports the contents of an error string to the user via a Log and Toast. * * @param resId The resourceID of the translated string to show the user. * @param e The exception to go to the {@code Log}. */
Reports the contents of an error string to the user via a Log and Toast
showErrorToUser
{ "repo_name": "jcnoir/dmix", "path": "MPDroid/src/main/java/com/namelessdev/mpdroid/service/StreamHandler.java", "license": "apache-2.0", "size": 25147 }
[ "android.content.res.Resources", "android.support.annotation.StringRes" ]
import android.content.res.Resources; import android.support.annotation.StringRes;
import android.content.res.*; import android.support.annotation.*;
[ "android.content", "android.support" ]
android.content; android.support;
2,850,989
@Override protected String getResourceSuffix() { throw new UnsupportedOperationException( "AnnotationConfigWebContextLoader does not support the getResourceSuffix() method"); } // AbstractGenericWebContextLoader /** * Register classes in the supplied {@linkplain GenericWebApplicationContext context}
String function() { throw new UnsupportedOperationException( STR); } /** * Register classes in the supplied {@linkplain GenericWebApplicationContext context}
/** * {@code AnnotationConfigWebContextLoader} should be used as a * {@link org.springframework.test.context.SmartContextLoader SmartContextLoader}, * not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}. * Consequently, this method is not supported. * @throws UnsupportedOperat...
AnnotationConfigWebContextLoader should be used as a <code>org.springframework.test.context.SmartContextLoader SmartContextLoader</code>, not as a legacy <code>org.springframework.test.context.ContextLoader ContextLoader</code>. Consequently, this method is not supported
getResourceSuffix
{ "repo_name": "spring-projects/spring-framework", "path": "spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java", "license": "apache-2.0", "size": 8589 }
[ "org.springframework.web.context.support.GenericWebApplicationContext" ]
import org.springframework.web.context.support.GenericWebApplicationContext;
import org.springframework.web.context.support.*;
[ "org.springframework.web" ]
org.springframework.web;
1,033,303
public void enterQualified_join(SQLParser.Qualified_joinContext ctx) { }
public void enterQualified_join(SQLParser.Qualified_joinContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitCross_join
{ "repo_name": "HEIG-GAPS/slasher", "path": "slasher.corrector/src/main/java/ch/gaps/slasher/corrector/SQLParserBaseListener.java", "license": "mit", "size": 73849 }
[ "ch.gaps.slasher.corrector.SQLParser" ]
import ch.gaps.slasher.corrector.SQLParser;
import ch.gaps.slasher.corrector.*;
[ "ch.gaps.slasher" ]
ch.gaps.slasher;
761,238
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { out.println("<html>"); out.println("<head>"); out.pri...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); PrintWriter out = response.getWriter(); try { out.println(STR); out.println(STR); out.println(STR); out.println(STR); out.println(STR); String firstName = request.getParameter(STR...
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "ccsu-cs416F15/CS416ClassDemos", "path": "SecurityDemos/src/java/edu/ccsu/FindMyPatientsByNameServletSafe.java", "license": "mit", "size": 3775 }
[ "java.io.IOException", "java.io.PrintWriter", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.io.PrintWriter; 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;
2,256,295
//----------------------------------------------------------------------- public ZonedDateTime getExpiration() { return expiration; }
ZonedDateTime function() { return expiration; }
/** * Gets the expiration date-time of the option. * @return the value of the property, not null */
Gets the expiration date-time of the option
getExpiration
{ "repo_name": "nssales/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/sensitivity/IborFutureOptionSensitivity.java", "license": "apache-2.0", "size": 22765 }
[ "java.time.ZonedDateTime" ]
import java.time.ZonedDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,752,892
@Test(expected = NotFoundException.class) public void testAssertCanAccessNotOwnerInvalidScope() { ApplicationContext adminContext = getAdminContext().getBuilder() .bearerToken(Scope.APPLICATION) .build(); Mockito.doReturn(adminContext.getToken()) ...
@Test(expected = NotFoundException.class) void function() { ApplicationContext adminContext = getAdminContext().getBuilder() .bearerToken(Scope.APPLICATION) .build(); Mockito.doReturn(adminContext.getToken()) .when(mockContext).getUserPrincipal(); Mockito.doReturn(false).when(mockContext) .isUserInRole(Scope.APPLICATIO...
/** * Assert that a non owner of an entity cannot access it if they have the * incorrect scope. */
Assert that a non owner of an entity cannot access it if they have the incorrect scope
testAssertCanAccessNotOwnerInvalidScope
{ "repo_name": "kangaroo-server/kangaroo", "path": "kangaroo-server-authz/src/test/java/net/krotscheck/kangaroo/authz/admin/v1/resource/AbstractServiceTest.java", "license": "apache-2.0", "size": 26802 }
[ "javax.ws.rs.NotFoundException", "net.krotscheck.kangaroo.authz.admin.Scope", "net.krotscheck.kangaroo.authz.test.ApplicationBuilder", "org.junit.Test", "org.mockito.Mockito" ]
import javax.ws.rs.NotFoundException; import net.krotscheck.kangaroo.authz.admin.Scope; import net.krotscheck.kangaroo.authz.test.ApplicationBuilder; import org.junit.Test; import org.mockito.Mockito;
import javax.ws.rs.*; import net.krotscheck.kangaroo.authz.admin.*; import net.krotscheck.kangaroo.authz.test.*; import org.junit.*; import org.mockito.*;
[ "javax.ws", "net.krotscheck.kangaroo", "org.junit", "org.mockito" ]
javax.ws; net.krotscheck.kangaroo; org.junit; org.mockito;
583,359
private Graphics2D getGraphics(int layer) { Graphics2D graphics = layeredGraphics[layer]; if (graphics == null) { createImageAndGraphics(layer); graphics = layeredGraphics[layer]; } return graphics; }
Graphics2D function(int layer) { Graphics2D graphics = layeredGraphics[layer]; if (graphics == null) { createImageAndGraphics(layer); graphics = layeredGraphics[layer]; } return graphics; }
/** * Get the graphics for the layer index * * @param layer * layer index * @return graphics */
Get the graphics for the layer index
getGraphics
{ "repo_name": "ngageoint/geopackage-java", "path": "src/main/java/mil/nga/geopackage/tiles/features/FeatureTileGraphics.java", "license": "mit", "size": 4541 }
[ "java.awt.Graphics2D" ]
import java.awt.Graphics2D;
import java.awt.*;
[ "java.awt" ]
java.awt;
712,831
public void addView(View child, int index) { addViewInt(child, index, false); }
void function(View child, int index) { addViewInt(child, index, false); }
/** * Add a view to the currently attached RecyclerView if needed. LayoutManagers should * use this method to add views obtained from a {@link Recycler} using * {@link Recycler#getViewForPosition(int)}. * * @param child View to add * @param index Index to add child ...
Add a view to the currently attached RecyclerView if needed. LayoutManagers should use this method to add views obtained from a <code>Recycler</code> using <code>Recycler#getViewForPosition(int)</code>
addView
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "v7/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java", "license": "apache-2.0", "size": 582575 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,942,981
public Collection<TomcatConnectorCustomizer> getTomcatConnectorCustomizers() { return this.tomcatConnectorCustomizers; }
Collection<TomcatConnectorCustomizer> function() { return this.tomcatConnectorCustomizers; }
/** * Returns a mutable collection of the {@link TomcatConnectorCustomizer}s that will be * applied to the Tomcat {@link Connector}. * @return the customizers that will be applied */
Returns a mutable collection of the <code>TomcatConnectorCustomizer</code>s that will be applied to the Tomcat <code>Connector</code>
getTomcatConnectorCustomizers
{ "repo_name": "joshiste/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java", "license": "apache-2.0", "size": 30578 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
108,096
public OffsetDateTime lastCertificateIssuanceTime() { return this.lastCertificateIssuanceTime; }
OffsetDateTime function() { return this.lastCertificateIssuanceTime; }
/** * Get the lastCertificateIssuanceTime property: Certificate last issuance time. * * @return the lastCertificateIssuanceTime value. */
Get the lastCertificateIssuanceTime property: Certificate last issuance time
lastCertificateIssuanceTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/AppServiceCertificateOrderPatchResourceProperties.java", "license": "mit", "size": 13552 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,569,124
modCount++; int oldCapacity = elementData.length; if (size < oldCapacity) { elementData = Arrays.copyOf(elementData, size); } }
modCount++; int oldCapacity = elementData.length; if (size < oldCapacity) { elementData = Arrays.copyOf(elementData, size); } }
/** * Trims the capacity of this <tt>ArrayList</tt> instance to be the list current size. An application can use this * operation to minimize the storage of an <tt>ArrayList</tt> instance. */
Trims the capacity of this ArrayList instance to be the list current size. An application can use this operation to minimize the storage of an ArrayList instance
trimToSize
{ "repo_name": "lyrachord/FX3DAndroid", "path": "src/main/java/eu/mihosoft/vrl/v3d/ext/openjfx/importers/obj/IntegerArrayList.java", "license": "gpl-3.0", "size": 43755 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
761,750
public Serializable context_getEJBHome() throws RemoteException;
Serializable function() throws RemoteException;
/** * Insert the method's description here. * Creation date: (09/21/2000 4:07:00 PM) */
Insert the method's description here. Creation date: (09/21/2000 4:07:00 PM)
context_getEJBHome
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XSFRemoteSpecEJB.jar/src/com/ibm/ejb2x/base/spec/sfr/ejb/SFRa.java", "license": "epl-1.0", "size": 10102 }
[ "java.io.Serializable", "java.rmi.RemoteException" ]
import java.io.Serializable; import java.rmi.RemoteException;
import java.io.*; import java.rmi.*;
[ "java.io", "java.rmi" ]
java.io; java.rmi;
2,204,134
EOperation getServiceDeliveryPoint__CheckTypes_FWD__Match();
EOperation getServiceDeliveryPoint__CheckTypes_FWD__Match();
/** * Returns the meta object for the '{@link rgse.ttc17.emoflon.tgg.task2.Rules.ServiceDeliveryPoint#checkTypes_FWD(org.moflon.tgg.runtime.Match) <em>Check Types FWD</em>}' operation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the '<em>Check Types FWD</em>' operation. * @...
Returns the meta object for the '<code>rgse.ttc17.emoflon.tgg.task2.Rules.ServiceDeliveryPoint#checkTypes_FWD(org.moflon.tgg.runtime.Match) Check Types FWD</code>' operation.
getServiceDeliveryPoint__CheckTypes_FWD__Match
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.emoflon.tgg.task2/gen/rgse/ttc17/emoflon/tgg/task2/Rules/RulesPackage.java", "license": "mit", "size": 437406 }
[ "org.eclipse.emf.ecore.EOperation" ]
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,727,788
public void setInputStream(InputStream stream) { this.inputStream = stream; }
void function(InputStream stream) { this.inputStream = stream; }
/** * Sets the source input stream. */
Sets the source input stream
setInputStream
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/javax/xml/transform/stream/StreamSource.java", "license": "bsd-3-clause", "size": 5074 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,169,319
static UnitPatterns of(Locale lang) { if (lang == null) { throw new NullPointerException("Missing language."); } UnitPatterns p = CACHE.get(lang); if (p == null) { p = new UnitPatterns(lang); UnitPatterns old = CACHE.putIfAbsent(lang, p); ...
static UnitPatterns of(Locale lang) { if (lang == null) { throw new NullPointerException(STR); } UnitPatterns p = CACHE.get(lang); if (p == null) { p = new UnitPatterns(lang); UnitPatterns old = CACHE.putIfAbsent(lang, p); if (old != null) { p = old; } } return p; }
/** * <p>Factory method as constructor replacement. </p> * * @param lang language setting * @return chached instance */
Factory method as constructor replacement.
of
{ "repo_name": "MenoData/Time4J", "path": "base/src/main/java/net/time4j/UnitPatterns.java", "license": "lgpl-2.1", "size": 27573 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
1,218,792
@Test public void seek() throws Exception { String uniqPath = PathUtils.uniqPath(); for (int k = MIN_LEN + DELTA; k <= MAX_LEN; k += DELTA) { AlluxioURI uri = new AlluxioURI(uniqPath + "/file_" + k); FileSystemTestUtils.createByteFile(mFileSystem, uri, mWriteUnderStore, k); FileInStream i...
void function() throws Exception { String uniqPath = PathUtils.uniqPath(); for (int k = MIN_LEN + DELTA; k <= MAX_LEN; k += DELTA) { AlluxioURI uri = new AlluxioURI(uniqPath + STR + k); FileSystemTestUtils.createByteFile(mFileSystem, uri, mWriteUnderStore, k); FileInStream is = mFileSystem.openFile(uri, mReadCache); As...
/** * Tests seeking through files only in the underfs. */
Tests seeking through files only in the underfs
seek
{ "repo_name": "WilliamZapata/alluxio", "path": "tests/src/test/java/alluxio/client/UnderStorageReadIntegrationTest.java", "license": "apache-2.0", "size": 9493 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,521,268
public Set<Target> getTargets();
Set<Target> function();
/** * Returns Set of Commands linked to by this view * * @return a set of Targets */
Returns Set of Commands linked to by this view
getTargets
{ "repo_name": "Ile2/struts2-showcase-demo", "path": "src/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/View.java", "license": "apache-2.0", "size": 1338 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,355,831
@Test public void testSetStatus() { Assert.assertNull(this.c.getStatus()); this.c.setStatus(CommandStatus.ACTIVE); Assert.assertEquals(CommandStatus.ACTIVE, this.c.getStatus()); }
void function() { Assert.assertNull(this.c.getStatus()); this.c.setStatus(CommandStatus.ACTIVE); Assert.assertEquals(CommandStatus.ACTIVE, this.c.getStatus()); }
/** * Test setting the status. */
Test setting the status
testSetStatus
{ "repo_name": "ZhangboFrank/genie", "path": "genie-common/src/test/java/com/netflix/genie/common/model/TestCommand.java", "license": "apache-2.0", "size": 8186 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,337,223
public TimeValue getDeleteTime() { return new TimeValue(deleteTimeInMillis); }
public TimeValue getDeleteTime() { return new TimeValue(deleteTimeInMillis); }
/** * Gets the amount of time in a TimeValue that the index has been under merge throttling control */
Gets the amount of time in a TimeValue that the index has been under merge throttling control
getThrottleTime
{ "repo_name": "strahanjen/strahanjen.github.io", "path": "elasticsearch-master/core/src/main/java/org/elasticsearch/index/shard/IndexingStats.java", "license": "bsd-3-clause", "size": 11549 }
[ "org.elasticsearch.common.unit.TimeValue" ]
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,071,021
private Future<Void> interruptAfter(Duration interval) { final Thread targetThread = Thread.currentThread(); FutureTask<Void> killer = new FutureTask<>(() -> { try { Thread.sleep(interval.toMillis()); if (!isDone && targetThread.isAlive()) { synchronized (lock) { ...
Future<Void> function(Duration interval) { final Thread targetThread = Thread.currentThread(); FutureTask<Void> killer = new FutureTask<>(() -> { try { Thread.sleep(interval.toMillis()); if (!isDone && targetThread.isAlive()) { synchronized (lock) { if (isDone) { return; } isExpired = true; System.out.format(STR, testN...
/** * Starts a {@code Thread} to terminate the calling thread after a specified interval. * If the timeout expires, a thread dump is taken and the current thread interrupted. * * @param interval the amount of time to wait * * @return a {@code Future} that may be used to cancel the timeout....
Starts a Thread to terminate the calling thread after a specified interval. If the timeout expires, a thread dump is taken and the current thread interrupted
interruptAfter
{ "repo_name": "jhouserizer/ehcache3", "path": "clustered/integration-test/src/test/java/org/ehcache/clustered/TerminatedServerTest.java", "license": "apache-2.0", "size": 30563 }
[ "java.time.Duration", "java.util.concurrent.Future", "java.util.concurrent.FutureTask", "org.terracotta.utilities.test.Diagnostics" ]
import java.time.Duration; import java.util.concurrent.Future; import java.util.concurrent.FutureTask; import org.terracotta.utilities.test.Diagnostics;
import java.time.*; import java.util.concurrent.*; import org.terracotta.utilities.test.*;
[ "java.time", "java.util", "org.terracotta.utilities" ]
java.time; java.util; org.terracotta.utilities;
2,860,282
protected final boolean sinkSupportsFormat(Format format) { return audioSink.supportsFormat(format); }
final boolean function(Format format) { return audioSink.supportsFormat(format); }
/** * Returns whether the renderer's {@link AudioSink} supports a given {@link Format}. * * @see AudioSink#supportsFormat(Format) */
Returns whether the renderer's <code>AudioSink</code> supports a given <code>Format</code>
sinkSupportsFormat
{ "repo_name": "google/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java", "license": "apache-2.0", "size": 28997 }
[ "com.google.android.exoplayer2.Format" ]
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.*;
[ "com.google.android" ]
com.google.android;
75,275
public static class UnmodifiableMap <V> extends Double2ObjectFunctions.UnmodifiableFunction <V> implements Double2ObjectMap <V>, java.io.Serializable { private static final long serialVersionUID = -7046029254386353129L; protected final Double2ObjectMap <V> map; protected transient volatile ObjectSet<Double2Objec...
public static class UnmodifiableMap <V> extends Double2ObjectFunctions.UnmodifiableFunction <V> implements Double2ObjectMap <V>, java.io.Serializable { private static final long serialVersionUID = -7046029254386353129L; protected final Double2ObjectMap <V> map; protected transient volatile ObjectSet<Double2ObjectMap.En...
/** Returns a synchronized type-specific map backed by the given type-specific map, using an assigned object to synchronize. * * @param m the map to be wrapped in a synchronized map. * @param sync an object that will be used to synchronize the access to the map. * @return a synchronized view of the specified ma...
Returns a synchronized type-specific map backed by the given type-specific map, using an assigned object to synchronize
synchronize
{ "repo_name": "karussell/fastutil", "path": "src/it/unimi/dsi/fastutil/doubles/Double2ObjectMaps.java", "license": "apache-2.0", "size": 14248 }
[ "it.unimi.dsi.fastutil.objects.ObjectCollection", "it.unimi.dsi.fastutil.objects.ObjectSet" ]
import it.unimi.dsi.fastutil.objects.ObjectCollection; import it.unimi.dsi.fastutil.objects.ObjectSet;
import it.unimi.dsi.fastutil.objects.*;
[ "it.unimi.dsi" ]
it.unimi.dsi;
691,972
public void testValidateFormOk() { ActionErrors errors = timeEditorForm.validate(support.mapping, support.request); assertNoErrors(errors); }
void function() { ActionErrors errors = timeEditorForm.validate(support.mapping, support.request); assertNoErrors(errors); }
/** Test validate form ok. */
Test validate form ok
testValidateFormOk
{ "repo_name": "alarulrajan/CodeFest", "path": "test/com/technoetic/xplanner/forms/TestTimeEditorForm.java", "license": "gpl-2.0", "size": 11335 }
[ "org.apache.struts.action.ActionErrors" ]
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.*;
[ "org.apache.struts" ]
org.apache.struts;
1,183,962
return new EndpointRequestMatcher(true); } /** * Returns a matcher that includes the specified {@link Endpoint actuator endpoints}. * For example: <pre class="code"> * EndpointRequest.to(ShutdownEndpoint.class, HealthEndpoint.class) * </pre> * @param endpoints the endpoints to include * @return the con...
return new EndpointRequestMatcher(true); } /** * Returns a matcher that includes the specified {@link Endpoint actuator endpoints}. * For example: <pre class="code"> * EndpointRequest.to(ShutdownEndpoint.class, HealthEndpoint.class) * </pre> * @param endpoints the endpoints to include * @return the configured {@link Re...
/** * Returns a matcher that includes all {@link Endpoint actuator endpoints}. It also * includes the links endpoint which is present at the base path of the actuator * endpoints. The {@link EndpointRequestMatcher#excluding(Class...) excluding} method * can be used to further remove specific endpoints if requir...
Returns a matcher that includes all <code>Endpoint actuator endpoints</code>. It also includes the links endpoint which is present at the base path of the actuator endpoints. The <code>EndpointRequestMatcher#excluding(Class...) excluding</code> method can be used to further remove specific endpoints if required. For ex...
toAnyEndpoint
{ "repo_name": "jxblum/spring-boot", "path": "spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/security/servlet/EndpointRequest.java", "license": "apache-2.0", "size": 11547 }
[ "org.springframework.boot.actuate.endpoint.annotation.Endpoint", "org.springframework.security.web.util.matcher.RequestMatcher" ]
import org.springframework.boot.actuate.endpoint.annotation.Endpoint; import org.springframework.security.web.util.matcher.RequestMatcher;
import org.springframework.boot.actuate.endpoint.annotation.*; import org.springframework.security.web.util.matcher.*;
[ "org.springframework.boot", "org.springframework.security" ]
org.springframework.boot; org.springframework.security;
899,776
public OWLDataFactory getFactory() { return getManager().getOWLDataFactory(); }
OWLDataFactory function() { return getManager().getOWLDataFactory(); }
/** * Returns the data factory. * @return the data factory */
Returns the data factory
getFactory
{ "repo_name": "julianmendez/ontocomplib", "path": "ontocomplib/src/main/java/de/tudresden/inf/tcs/oclib/IndividualContext.java", "license": "gpl-3.0", "size": 32192 }
[ "org.semanticweb.owlapi.model.OWLDataFactory" ]
import org.semanticweb.owlapi.model.OWLDataFactory;
import org.semanticweb.owlapi.model.*;
[ "org.semanticweb.owlapi" ]
org.semanticweb.owlapi;
795,930
public void viewAccepted(View view) { this.coordinatorAddress = view.getCreator(); // The master address of the cluster boolean coordinator = coordinatorAddress.equals(localAddress); log.info("COordinator : " + coordinator + " localAddress : " + localAddress); if(coordinator) ...
void function(View view) { this.coordinatorAddress = view.getCreator(); boolean coordinator = coordinatorAddress.equals(localAddress); log.info(STR + coordinator + STR + localAddress); if(coordinator) log.info(STR); if (coordinator && !this.coordinator && journalIdGenerator!=null) { journalIdGenerator.shiftId(shift); }...
/** * ---------------- MEMBERSHIP LISTENER METHODS ------------------------------ **** */
---------------- MEMBERSHIP LISTENER METHODS ------------------------------
viewAccepted
{ "repo_name": "kingargyle/exist-1.4.x", "path": "src/org/exist/cluster/ClusterComunication.java", "license": "lgpl-2.1", "size": 18352 }
[ "java.util.Vector", "org.jgroups.View" ]
import java.util.Vector; import org.jgroups.View;
import java.util.*; import org.jgroups.*;
[ "java.util", "org.jgroups" ]
java.util; org.jgroups;
1,302,757
public void fillRect(int x, int y, int width, int height) { Shape shape = new Rectangle(x, y, width, height); draw(shape, "fill"); }
void function(int x, int y, int width, int height) { Shape shape = new Rectangle(x, y, width, height); draw(shape, "fill"); }
/** * Fills a rectangle with top-left corner placed at (x,y). */
Fills a rectangle with top-left corner placed at (x,y)
fillRect
{ "repo_name": "aletheia/jSOAM", "path": "modules/utils/src/main/java/soam/utils/EpsGraphics.java", "license": "gpl-3.0", "size": 42585 }
[ "java.awt.Rectangle", "java.awt.Shape" ]
import java.awt.Rectangle; import java.awt.Shape;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,172,243
Path apply( Path file );
Path apply( Path file );
/** * Applies the template on the specified replay file in the folder the file is in, and returns the result. The specified file is <b>NOT</b> renamed or * moved. * * @param file replay file to apply the template on * @return the new path after applying the template; or <code>null</code> if the specifie...
Applies the template on the specified replay file in the folder the file is in, and returns the result. The specified file is NOT renamed or moved
apply
{ "repo_name": "icza/scelight", "path": "src-ext-mod-api/hu/scelightapi/template/ITemplateEngine.java", "license": "apache-2.0", "size": 2174 }
[ "java.nio.file.Path" ]
import java.nio.file.Path;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
2,744,412
public Object getObject() throws SAXException { return typeCollection; }
Object function() throws SAXException { return typeCollection; }
/** * Returns the object for this element or null, if this element does not create an object. * * @return the object. * @throws org.xml.sax.SAXException * if an parser error occured. */
Returns the object for this element or null, if this element does not create an object
getObject
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/metadata/parser/ReportPreProcessorMetaDataReadHandler.java", "license": "lgpl-2.1", "size": 3264 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,464,210
public static RegistryEntry[] getValues(String branch, short type) throws RegistryException, IOException, InterruptedException { String[] cmd = new String[] { "reg", "query", branch }; return filter(executeQuery(cmd), cleanBrunch(branch), type); }
static RegistryEntry[] function(String branch, short type) throws RegistryException, IOException, InterruptedException { String[] cmd = new String[] { "reg", "query", branch }; return filter(executeQuery(cmd), cleanBrunch(branch), type); }
/** * gets all entries of one branch * * @param branch * @param type * @return * @throws RegistryException * @throws IOException * @throws InterruptedException */
gets all entries of one branch
getValues
{ "repo_name": "jzuijlek/Lucee", "path": "core/src/main/java/lucee/runtime/registry/RegistryQuery.java", "license": "lgpl-2.1", "size": 7071 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,356,802
public Stream<ConfigKey> allKeysRecursively() { Stream<ConfigKey> str = Stream.empty(); if (this.value != null) { str = Stream.of(ConfigKey.EMPTY); } str = Stream.concat(str, this.children.entrySet() .stream() ...
Stream<ConfigKey> function() { Stream<ConfigKey> str = Stream.empty(); if (this.value != null) { str = Stream.of(ConfigKey.EMPTY); } str = Stream.concat(str, this.children.entrySet() .stream() .flatMap((kv) -> { ConfigKey key = kv.getKey(); Object value = kv.getValue(); if (value instanceof ConfigNode) { return ((Confi...
/** * Retrieve all descendent keys. * * @return A stream of all descendent keys. */
Retrieve all descendent keys
allKeysRecursively
{ "repo_name": "wildfly-swarm/wildfly-swarm-core", "path": "core/container/src/main/java/org/wildfly/swarm/container/config/ConfigNode.java", "license": "apache-2.0", "size": 7680 }
[ "java.util.stream.Stream", "org.wildfly.swarm.spi.api.config.ConfigKey" ]
import java.util.stream.Stream; import org.wildfly.swarm.spi.api.config.ConfigKey;
import java.util.stream.*; import org.wildfly.swarm.spi.api.config.*;
[ "java.util", "org.wildfly.swarm" ]
java.util; org.wildfly.swarm;
2,081,741
private static boolean addDirectoryDigest(File file, MessageDigest digest, @Nullable IgniteLogger log) { assert file.isDirectory(); File[] files = file.listFiles(); if (files == null) return true; for (File visited : files) { if (visited.isFile()) { ...
static boolean function(File file, MessageDigest digest, @Nullable IgniteLogger log) { assert file.isDirectory(); File[] files = file.listFiles(); if (files == null) return true; for (File visited : files) { if (visited.isFile()) { if (!addFileDigest(visited, digest, log)) return false; } else if (visited.isDirectory()...
/** * Repulsively adds all files in the given directory to the given Digest object. * * @param file directory to start calculation from. * @param digest digest object where all available files should be applied. * @param log logger to report errors. * @return {@code true} if digest was add...
Repulsively adds all files in the given directory to the given Digest object
addDirectoryDigest
{ "repo_name": "dlnufox/ignite", "path": "modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessor.java", "license": "apache-2.0", "size": 15912 }
[ "java.io.File", "java.security.MessageDigest", "org.apache.ignite.IgniteLogger", "org.jetbrains.annotations.Nullable" ]
import java.io.File; import java.security.MessageDigest; import org.apache.ignite.IgniteLogger; import org.jetbrains.annotations.Nullable;
import java.io.*; import java.security.*; import org.apache.ignite.*; import org.jetbrains.annotations.*;
[ "java.io", "java.security", "org.apache.ignite", "org.jetbrains.annotations" ]
java.io; java.security; org.apache.ignite; org.jetbrains.annotations;
1,134,335
@Test public void testDisposer() throws Exception { log.info("starting testDisposer()"); ClientRequest request = new ClientRequest("http://localhost:8080/resteasy-cdi-ejb-test/rest/disposer/"); ClientResponse<?> response = request.get(); log.info("status: " + response.getStatus()); ...
void function() throws Exception { log.info(STR); ClientRequest request = new ClientRequest(STRstatus: " + response.getStatus()); Assert.assertEquals(200, response.getStatus()); response.releaseConnection(); }
/** * Verifies that ResourceProducer disposer method has been called for Queue. */
Verifies that ResourceProducer disposer method has been called for Queue
testDisposer
{ "repo_name": "psakar/Resteasy", "path": "arquillian/resteasy-cdi-ejb-test/src/test/java/org/jboss/resteasy/test/cdi/injection/InjectionTest.java", "license": "apache-2.0", "size": 14856 }
[ "org.jboss.resteasy.client.ClientRequest", "org.junit.Assert" ]
import org.jboss.resteasy.client.ClientRequest; import org.junit.Assert;
import org.jboss.resteasy.client.*; import org.junit.*;
[ "org.jboss.resteasy", "org.junit" ]
org.jboss.resteasy; org.junit;
1,026,246
public BusinessObjectEntry getExternalizableBusinessObjectDictionaryEntry(Class businessObjectInterfaceClass);
BusinessObjectEntry function(Class businessObjectInterfaceClass);
/** * This method gets the business object dictionary entry for the passed in externalizable business object class. * * @param businessObjectInterfaceClass * @return */
This method gets the business object dictionary entry for the passed in externalizable business object class
getExternalizableBusinessObjectDictionaryEntry
{ "repo_name": "sbower/kuali-rice-1", "path": "krad/krad-web-framework/src/main/java/org/kuali/rice/krad/service/ModuleService.java", "license": "apache-2.0", "size": 7248 }
[ "org.kuali.rice.krad.datadictionary.BusinessObjectEntry" ]
import org.kuali.rice.krad.datadictionary.BusinessObjectEntry;
import org.kuali.rice.krad.datadictionary.*;
[ "org.kuali.rice" ]
org.kuali.rice;
609,281
@NotNull PsiFile[] findFilesWithPlainTextWords(@NotNull String word);
PsiFile[] findFilesWithPlainTextWords(@NotNull String word);
/** * Returns the list of files which contain the specified word in "plain text" * context (for example, plain text files or attribute values in XML files). * * @param word the word to search. * @return the list of files containing the word. */
Returns the list of files which contain the specified word in "plain text" context (for example, plain text files or attribute values in XML files)
findFilesWithPlainTextWords
{ "repo_name": "asedunov/intellij-community", "path": "platform/indexing-api/src/com/intellij/psi/search/PsiSearchHelper.java", "license": "apache-2.0", "size": 8986 }
[ "com.intellij.psi.PsiFile", "org.jetbrains.annotations.NotNull" ]
import com.intellij.psi.PsiFile; import org.jetbrains.annotations.NotNull;
import com.intellij.psi.*; import org.jetbrains.annotations.*;
[ "com.intellij.psi", "org.jetbrains.annotations" ]
com.intellij.psi; org.jetbrains.annotations;
2,073,110
private EnumSet<FieldInfo.Attribute> getAttributes(FieldInfo.Type type) { // // Everything's saved. EnumSet<FieldInfo.Attribute> ret = EnumSet.of(FieldInfo.Attribute.SAVED); // // Strings get indexed. if(type == FieldInfo.Type.STRING) { ret.addAll(FieldInf...
EnumSet<FieldInfo.Attribute> function(FieldInfo.Type type) { EnumSet<FieldInfo.Attribute> ret = EnumSet.of(FieldInfo.Attribute.SAVED); if(type == FieldInfo.Type.STRING) { ret.addAll(FieldInfo.getIndexedAttributes()); } return ret; }
/** * Gets a set of attributes suitable for a given field type. */
Gets a set of attributes suitable for a given field type
getAttributes
{ "repo_name": "SunLabsAST/AURA", "path": "aura/src/com/sun/labs/aura/datastore/impl/store/ItemSearchEngine.java", "license": "gpl-2.0", "size": 40087 }
[ "com.sun.labs.minion.FieldInfo", "java.util.EnumSet" ]
import com.sun.labs.minion.FieldInfo; import java.util.EnumSet;
import com.sun.labs.minion.*; import java.util.*;
[ "com.sun.labs", "java.util" ]
com.sun.labs; java.util;
2,303,781
@ApiModelProperty(example = "admin", value = "If the provider value is not given, the user invoking the API will be used as the provider. ") public String getProvider() { return provider; }
@ApiModelProperty(example = "admin", value = STR) String function() { return provider; }
/** * If the provider value is not given, the user invoking the API will be used as the provider. * @return provider **/
If the provider value is not given, the user invoking the API will be used as the provider
getProvider
{ "repo_name": "jaadds/product-apim", "path": "modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/dto/APIProductSearchResultDTO.java", "license": "apache-2.0", "size": 5766 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,755,033
int handleTimeouts(Collection<Call> calls, String msg) { int numTimedOut = 0; for (Iterator<Call> iter = calls.iterator(); iter.hasNext(); ) { Call call = iter.next(); int remainingMs = calcTimeoutMsRemainingAsInt(now, call.deadlineMs); if ...
int handleTimeouts(Collection<Call> calls, String msg) { int numTimedOut = 0; for (Iterator<Call> iter = calls.iterator(); iter.hasNext(); ) { Call call = iter.next(); int remainingMs = calcTimeoutMsRemainingAsInt(now, call.deadlineMs); if (remainingMs < 0) { call.fail(now, new TimeoutException(msg)); iter.remove(); nu...
/** * Check for calls which have timed out. * Timed out calls will be removed and failed. * The remaining milliseconds until the next timeout will be updated. * * @param calls The collection of calls. * * @return The number of calls whi...
Check for calls which have timed out. Timed out calls will be removed and failed. The remaining milliseconds until the next timeout will be updated
handleTimeouts
{ "repo_name": "Ishiihara/kafka", "path": "clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java", "license": "apache-2.0", "size": 129537 }
[ "java.util.Collection", "java.util.Iterator", "org.apache.kafka.common.errors.TimeoutException" ]
import java.util.Collection; import java.util.Iterator; import org.apache.kafka.common.errors.TimeoutException;
import java.util.*; import org.apache.kafka.common.errors.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
46,938
private void generatePrologue() { if (inDirectCallFunction) { int directParameterCount = scriptOrFn.getParamCount(); // 0 is reserved for function Object 'this' // 1 is reserved for context // 2 is reserved for parentScope // 3 is reserved for ...
void function() { if (inDirectCallFunction) { int directParameterCount = scriptOrFn.getParamCount(); if (firstFreeLocal != 4) Kit.codeBug(); for (int i = 0; i != directParameterCount; ++i) { varRegisters[i] = firstFreeLocal; firstFreeLocal += 3; } if (!fnCurrent.getParameterNumberContext()) { itsForcedObjectParameters ...
/** * Generate the prologue for a function or script. */
Generate the prologue for a function or script
generatePrologue
{ "repo_name": "killmag10/nodeschnaps", "path": "deps/rhino/src/org/mozilla/javascript/optimizer/Codegen.java", "license": "lgpl-3.0", "size": 212857 }
[ "java.util.List", "org.mozilla.classfile.ByteCode", "org.mozilla.javascript.Kit", "org.mozilla.javascript.Node", "org.mozilla.javascript.ast.FunctionNode" ]
import java.util.List; import org.mozilla.classfile.ByteCode; import org.mozilla.javascript.Kit; import org.mozilla.javascript.Node; import org.mozilla.javascript.ast.FunctionNode;
import java.util.*; import org.mozilla.classfile.*; import org.mozilla.javascript.*; import org.mozilla.javascript.ast.*;
[ "java.util", "org.mozilla.classfile", "org.mozilla.javascript" ]
java.util; org.mozilla.classfile; org.mozilla.javascript;
1,638,515
//// POP FROM STACK AND STORE INTO LOCAL VARIABLE. private Instruction do_store(int index, Operand op1) { TypeReference type = op1.getType(); boolean Dual = (type.isLongType() || type.isDoubleType()); if (LOCALS_ON_STACK) { replaceLocalsOnStack(index, type); } if (ELIM_COPY_LOCALS) { ...
Instruction function(int index, Operand op1) { TypeReference type = op1.getType(); boolean Dual = (type.isLongType() type.isDoubleType()); if (LOCALS_ON_STACK) { replaceLocalsOnStack(index, type); } if (ELIM_COPY_LOCALS) { if (op1 instanceof RegisterOperand) { RegisterOperand rop1 = (RegisterOperand) op1; Register r1 =...
/** * Simulate a store into a given local variable of an int/long/double/float * Returns generated instruction (or null if no instruction generated.) * * @param index local variable number */
Simulate a store into a given local variable of an int/long/double/float Returns generated instruction (or null if no instruction generated.)
do_store
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java", "license": "epl-1.0", "size": 176758 }
[ "org.jikesrvm.classloader.TypeReference", "org.jikesrvm.compilers.opt.ir.IRTools", "org.jikesrvm.compilers.opt.ir.Instruction", "org.jikesrvm.compilers.opt.ir.Move", "org.jikesrvm.compilers.opt.ir.Register", "org.jikesrvm.compilers.opt.ir.ResultCarrier", "org.jikesrvm.compilers.opt.ir.operand.Operand", ...
import org.jikesrvm.classloader.TypeReference; import org.jikesrvm.compilers.opt.ir.IRTools; import org.jikesrvm.compilers.opt.ir.Instruction; import org.jikesrvm.compilers.opt.ir.Move; import org.jikesrvm.compilers.opt.ir.Register; import org.jikesrvm.compilers.opt.ir.ResultCarrier; import org.jikesrvm.compilers.opt.i...
import org.jikesrvm.classloader.*; import org.jikesrvm.compilers.opt.ir.*; import org.jikesrvm.compilers.opt.ir.operand.*;
[ "org.jikesrvm.classloader", "org.jikesrvm.compilers" ]
org.jikesrvm.classloader; org.jikesrvm.compilers;
730,928
public void startActivityWithResultHandler(@Nullable final Intent intent, final AbstractActivityResultListener cb) { int requestCode = mActivityListeners.put(cb); if (intent == null) { cb.start(requestCode); } else { mAct...
void function(@Nullable final Intent intent, final AbstractActivityResultListener cb) { int requestCode = mActivityListeners.put(cb); if (intent == null) { cb.start(requestCode); } else { mActivity.startActivityForResult(intent, requestCode); } }
/** * Allocates a new requestCode, puts handle() as a listener for it, and starts a new activity. * * @param intent parameter for startActivityForResult, or AbstractActivityResultListener.start() * @param cb executed in the UI thread */
Allocates a new requestCode, puts handle() as a listener for it, and starts a new activity
startActivityWithResultHandler
{ "repo_name": "dasfoo/rover-android-client", "path": "app/src/main/java/org/dasfoo/rover/android/client/util/ResultCallback.java", "license": "mit", "size": 8328 }
[ "android.content.Intent", "android.support.annotation.Nullable" ]
import android.content.Intent; import android.support.annotation.Nullable;
import android.content.*; import android.support.annotation.*;
[ "android.content", "android.support" ]
android.content; android.support;
686,819
@VisibleForTesting static OMAInfo parseDownloadDescriptor(InputStream is) { try { XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); factory.setNamespaceAware(true); XmlPullParser parser = factory.newPullParser(); parser.setInput(is, null);...
static OMAInfo parseDownloadDescriptor(InputStream is) { try { XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); factory.setNamespaceAware(true); XmlPullParser parser = factory.newPullParser(); parser.setInput(is, null); int eventType = parser.getEventType(); String currentAttribute = null; OMAInfo inf...
/** * Parses the input stream and returns the OMA information. * * @param is The input stream to the parser. * @return OMA information about the download content, or null if an error is found. */
Parses the input stream and returns the OMA information
parseDownloadDescriptor
{ "repo_name": "Pluto-tv/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java", "license": "bsd-3-clause", "size": 31680 }
[ "android.util.Log", "java.io.IOException", "java.io.InputStream", "java.util.ArrayList", "java.util.Arrays", "java.util.List", "org.xmlpull.v1.XmlPullParser", "org.xmlpull.v1.XmlPullParserException", "org.xmlpull.v1.XmlPullParserFactory" ]
import android.util.Log; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserFactory;
import android.util.*; import java.io.*; import java.util.*; import org.xmlpull.v1.*;
[ "android.util", "java.io", "java.util", "org.xmlpull.v1" ]
android.util; java.io; java.util; org.xmlpull.v1;
1,192,650
public Node appendChild(Node newChild) { if (newChild == null) { throw new IllegalArgumentException("newChild == null!"); } checkNode(newChild); // insertBefore will increment numChildren return insertBefore(newChild, null); }
Node function(Node newChild) { if (newChild == null) { throw new IllegalArgumentException(STR); } checkNode(newChild); return insertBefore(newChild, null); }
/** * Adds the node <code>newChild</code> to the end of the list of * children of this node. * * @param newChild the <code>Node</code> to insert. * * @return the node added. * * @exception IllegalArgumentException if <code>newChild</code> is * <code>null</code>. */
Adds the node <code>newChild</code> to the end of the list of children of this node
appendChild
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/javax/imageio/metadata/IIOMetadataNode.java", "license": "mit", "size": 33126 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,807,727
public void setClassifications(final Set<String> classifications) { JodaBeanUtils.notNull(classifications, "classifications"); if (!classifications.isEmpty()) { setUseClassificationName(true); } this._classifications = classifications; }
void function(final Set<String> classifications) { JodaBeanUtils.notNull(classifications, STR); if (!classifications.isEmpty()) { setUseClassificationName(true); } this._classifications = classifications; }
/** * Sets the agencies with which to filter ratings. This also sets the {@link LegalEntitySector#_useClassificationName} field to true. * * @param classifications The new value of the property, not null */
Sets the agencies with which to filter ratings. This also sets the <code>LegalEntitySector#_useClassificationName</code> field to true
setClassifications
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/legalentity/LegalEntitySector.java", "license": "apache-2.0", "size": 16255 }
[ "java.util.Set", "org.joda.beans.JodaBeanUtils" ]
import java.util.Set; import org.joda.beans.JodaBeanUtils;
import java.util.*; import org.joda.beans.*;
[ "java.util", "org.joda.beans" ]
java.util; org.joda.beans;
1,740,229
public static void copyFile(File src, File dst) throws BuildException { Copy cp = new Copy(); cp.setProject(new org.apache.tools.ant.Project()); cp.setTofile(dst); cp.setFile(src); cp.setOverwrite(true); cp.execute(); }
static void function(File src, File dst) throws BuildException { Copy cp = new Copy(); cp.setProject(new org.apache.tools.ant.Project()); cp.setTofile(dst); cp.setFile(src); cp.setOverwrite(true); cp.execute(); }
/** * Copies a single file by using Ant. */
Copies a single file by using Ant
copyFile
{ "repo_name": "sap-production/hudson-3.x", "path": "hudson-core/src/main/java/hudson/Util.java", "license": "apache-2.0", "size": 44299 }
[ "java.io.File", "org.apache.tools.ant.BuildException", "org.apache.tools.ant.Project", "org.apache.tools.ant.taskdefs.Copy" ]
import java.io.File; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Copy;
import java.io.*; import org.apache.tools.ant.*; import org.apache.tools.ant.taskdefs.*;
[ "java.io", "org.apache.tools" ]
java.io; org.apache.tools;
2,801,583
@Override public void exitInitializer(@NotNull FunctionParser.InitializerContext ctx) { }
@Override public void exitInitializer(@NotNull FunctionParser.InitializerContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterInitializer
{ "repo_name": "octopus-platform/joern", "path": "projects/extensions/joern-fuzzyc/src/main/java/antlr/FunctionBaseListener.java", "license": "lgpl-3.0", "size": 42232 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
647,361
public ArrayList<Convenio> getList(Integer numeroConvenio, Long idRecurso, Date fechaFormalizacionDesde, Date fechaFormalizacionHasta, Long idViaDeuda, Long idProcurador, Integer noLiquidables) { String queryString ="from Convenio t "; boolean flagAnd = false; // numero convenio if(numeroConvenio!=n...
ArrayList<Convenio> function(Integer numeroConvenio, Long idRecurso, Date fechaFormalizacionDesde, Date fechaFormalizacionHasta, Long idViaDeuda, Long idProcurador, Integer noLiquidables) { String queryString =STR; boolean flagAnd = false; if(numeroConvenio!=null && numeroConvenio>0){ queryString += flagAnd ? STR : STR...
/** * Cualquiera de los parametros, si es null o <0, no se tiene en cuenta * @param numeroConvenio * @param idRecurso * @param fechaFormalizacionDesde * @param fechaFormalizacionHasta * @param idViaDeuda * @param noLiquidables - valores posibles: null, 0 y 1 * @return */
Cualquiera de los parametros, si es null o <0, no se tiene en cuenta
getList
{ "repo_name": "avdata99/SIAT", "path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/gde/buss/dao/ConvenioDAO.java", "license": "gpl-3.0", "size": 53553 }
[ "ar.gov.rosario.siat.base.buss.dao.SiatHibernateUtil", "ar.gov.rosario.siat.gde.buss.bean.Convenio", "coop.tecso.demoda.iface.helper.DateUtil", "java.util.ArrayList", "java.util.Date", "org.hibernate.classic.Session" ]
import ar.gov.rosario.siat.base.buss.dao.SiatHibernateUtil; import ar.gov.rosario.siat.gde.buss.bean.Convenio; import coop.tecso.demoda.iface.helper.DateUtil; import java.util.ArrayList; import java.util.Date; import org.hibernate.classic.Session;
import ar.gov.rosario.siat.base.buss.dao.*; import ar.gov.rosario.siat.gde.buss.bean.*; import coop.tecso.demoda.iface.helper.*; import java.util.*; import org.hibernate.classic.*;
[ "ar.gov.rosario", "coop.tecso.demoda", "java.util", "org.hibernate.classic" ]
ar.gov.rosario; coop.tecso.demoda; java.util; org.hibernate.classic;
2,108,143
@Override public boolean next(List<Cell> outResult, ScannerContext scannerContext) throws IOException { if (scannerContext == null) { throw new IllegalArgumentException("Scanner context cannot be null"); } if (checkFlushed() && reopenAfterFlush()) { return scannerContext.setScannerState(Next...
boolean function(List<Cell> outResult, ScannerContext scannerContext) throws IOException { if (scannerContext == null) { throw new IllegalArgumentException(STR); } if (checkFlushed() && reopenAfterFlush()) { return scannerContext.setScannerState(NextState.MORE_VALUES).hasMoreValues(); } if (this.heap == null) { close(f...
/** * Get the next row of values from this Store. * @param outResult * @param scannerContext * @return true if there are more rows, false if scanner is done */
Get the next row of values from this Store
next
{ "repo_name": "ChinmaySKulkarni/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java", "license": "apache-2.0", "size": 48637 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.hbase.Cell", "org.apache.hadoop.hbase.PrivateCellUtil", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.hbase.filter.Filter", "org.apache.hadoop.hbase.regionserver.ScannerContext", "org.apache.hadoop.hbase.regionserver.querymatcher....
import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.PrivateCellUtil; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.filter.Filter; import org.apache.hadoop.hbase.regionserver.ScannerContext; import org.apache.hadoop.hbase.reg...
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.filter.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.regionserver.querymatcher.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,929,782
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<PolicyAssignmentInner>> deleteWithResponseAsync(String scope, String policyAssignmentName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<PolicyAssignmentInner>> function(String scope, String policyAssignmentName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (scope == null) { return Mono.error(new IllegalArgumentException(STR)); } if (pol...
/** * This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy * assignment is the part of its ID preceding * '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. * * @param scope The scope of the policy assignme...
This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'
deleteWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/PolicyAssignmentsClientImpl.java", "license": "mit", "size": 203866 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.resources.fluent.models.PolicyAssignmentInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.resources.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,537,605
public static String formatCourseNotStartedDate(String date) { try { SimpleDateFormat dateFormat = new SimpleDateFormat("MMMM dd, yyyy"); Date startDate = DateUtil.convertToDate(date); String formattedDate = dateFormat.format(startDate); return formattedDate;...
static String function(String date) { try { SimpleDateFormat dateFormat = new SimpleDateFormat(STR); Date startDate = DateUtil.convertToDate(date); String formattedDate = dateFormat.format(startDate); return formattedDate; } catch (Exception e) { logger.error(e); return null; } }
/** * This function returns course start date in the MMMM dd, yyyy format */
This function returns course start date in the MMMM dd, yyyy format
formatCourseNotStartedDate
{ "repo_name": "FDoubleman/wd-edx-android", "path": "VideoLocker/src/main/java/org/edx/mobile/util/DateUtil.java", "license": "apache-2.0", "size": 3476 }
[ "java.text.SimpleDateFormat", "java.util.Date" ]
import java.text.SimpleDateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,858,871
@Test public void itShouldBePossibleToAskToEditAccount() { itShouldBePossibleToSignin(); homeAppsPage.clickAccount(); accountPage.isAt(); assertTrue(accountPage.getEmail().equals(credentialEmail)); assertTrue(accountPage.getFirstName().equals(credentialFirst)); assertTrue(accountPage.getLastName().equal...
void function() { itShouldBePossibleToSignin(); homeAppsPage.clickAccount(); accountPage.isAt(); assertTrue(accountPage.getEmail().equals(credentialEmail)); assertTrue(accountPage.getFirstName().equals(credentialFirst)); assertTrue(accountPage.getLastName().equals(credentialLast)); }
/** * Test that it is possible to access the administration page to edit the account. */
Test that it is possible to access the administration page to edit the account
itShouldBePossibleToAskToEditAccount
{ "repo_name": "laurent-girod/Teaching-HEIGVD-AMT-2015-Project", "path": "GamyTests/src/test/java/ch/heigvd/amt/uat/fluentlenium/GamyFluentTest.java", "license": "mit", "size": 9565 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,301,136
Observable<ServiceResponseWithHeaders<Boolean, PoolExistsHeaders>> existsWithServiceResponseAsync(String poolId, PoolExistsOptions poolExistsOptions);
Observable<ServiceResponseWithHeaders<Boolean, PoolExistsHeaders>> existsWithServiceResponseAsync(String poolId, PoolExistsOptions poolExistsOptions);
/** * Gets basic properties of a Pool. * * @param poolId The ID of the Pool to get. * @param poolExistsOptions Additional parameters for the operation * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the boolean object */
Gets basic properties of a Pool
existsWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/batch/microsoft-azure-batch/src/main/java/com/microsoft/azure/batch/protocol/Pools.java", "license": "mit", "size": 116628 }
[ "com.microsoft.azure.batch.protocol.models.PoolExistsHeaders", "com.microsoft.azure.batch.protocol.models.PoolExistsOptions", "com.microsoft.rest.ServiceResponseWithHeaders" ]
import com.microsoft.azure.batch.protocol.models.PoolExistsHeaders; import com.microsoft.azure.batch.protocol.models.PoolExistsOptions; import com.microsoft.rest.ServiceResponseWithHeaders;
import com.microsoft.azure.batch.protocol.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,915,107
TransactionsLockWatchUpdate getUpdateForTransactions(Set<Long> startTimestamps, Optional<LockWatchVersion> version);
TransactionsLockWatchUpdate getUpdateForTransactions(Set<Long> startTimestamps, Optional<LockWatchVersion> version);
/** * Given a set of start timestamps, and a lock watch state version, returns a list of all events that occurred since * that version, and a map associating each start timestamp with its respective lock watch state version. */
Given a set of start timestamps, and a lock watch state version, returns a list of all events that occurred since that version, and a map associating each start timestamp with its respective lock watch state version
getUpdateForTransactions
{ "repo_name": "EvilMcJerkface/atlasdb", "path": "lock-api/src/main/java/com/palantir/lock/watch/LockWatchEventCache.java", "license": "apache-2.0", "size": 2549 }
[ "java.util.Optional", "java.util.Set" ]
import java.util.Optional; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
594,914
public synchronized void waitOnRegionToClearRegionsInTransition( final HRegionInfo hri) throws InterruptedException { if (!isRegionInTransition(hri)) return; while(!server.isStopped() && isRegionInTransition(hri)) { RegionState rs = getRegionState(hri); LOG.info("Waiting on " + rs + " to cl...
synchronized void function( final HRegionInfo hri) throws InterruptedException { if (!isRegionInTransition(hri)) return; while(!server.isStopped() && isRegionInTransition(hri)) { RegionState rs = getRegionState(hri); LOG.info(STR + rs + STR); waitForUpdate(100); } if (server.isStopped()) { LOG.info(STR + STR); } }
/** * Wait on region to clear regions-in-transition. * <p> * If the region isn't in transition, returns immediately. Otherwise, method * blocks until the region is out of transition. */
Wait on region to clear regions-in-transition. If the region isn't in transition, returns immediately. Otherwise, method blocks until the region is out of transition
waitOnRegionToClearRegionsInTransition
{ "repo_name": "intel-hadoop/hbase-rhino", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java", "license": "apache-2.0", "size": 32625 }
[ "org.apache.hadoop.hbase.HRegionInfo" ]
import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
975,220
public static Processor unwrap(Processor processor) { while (true) { if (processor instanceof DelegateProcessor) { processor = ((DelegateProcessor)processor).getProcessor(); } else if (processor instanceof DelegateAsyncProcessor) { processor = ((D...
static Processor function(Processor processor) { while (true) { if (processor instanceof DelegateProcessor) { processor = ((DelegateProcessor)processor).getProcessor(); } else if (processor instanceof DelegateAsyncProcessor) { processor = ((DelegateAsyncProcessor)processor).getProcessor(); } else { return processor; } ...
/** * If a processor is wrapped with a bunch of DelegateProcessor or DelegateAsyncProcessor objects * this call will drill through them and return the wrapped Processor. */
If a processor is wrapped with a bunch of DelegateProcessor or DelegateAsyncProcessor objects this call will drill through them and return the wrapped Processor
unwrap
{ "repo_name": "everttigchelaar/camel-svn", "path": "camel-core/src/test/java/org/apache/camel/TestSupport.java", "license": "apache-2.0", "size": 18582 }
[ "org.apache.camel.processor.DelegateAsyncProcessor", "org.apache.camel.processor.DelegateProcessor" ]
import org.apache.camel.processor.DelegateAsyncProcessor; import org.apache.camel.processor.DelegateProcessor;
import org.apache.camel.processor.*;
[ "org.apache.camel" ]
org.apache.camel;
2,717,784
public InetAddress getInetAddress () { return (_channel == null) ? null : _channel.socket().getInetAddress(); }
InetAddress function () { return (_channel == null) ? null : _channel.socket().getInetAddress(); }
/** * Returns the address associated with this connection or null if it has no underlying socket * channel. */
Returns the address associated with this connection or null if it has no underlying socket channel
getInetAddress
{ "repo_name": "threerings/narya", "path": "core/src/main/java/com/threerings/nio/conman/Connection.java", "license": "lgpl-2.1", "size": 5963 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
386,438
public java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.LessThanOrEqualHLAPI> getSubterm_integers_LessThanOrEqualHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.LessThanOrEqualHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.LessThanOrEqualHLAPI>(); for (Term elemnt : get...
java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.LessThanOrEqualHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.LessThanOrEqualHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.LessThanOrEqualHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.m...
/** * This accessor return a list of encapsulated subelement, only of LessThanOrEqualHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of LessThanOrEqualHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_integers_LessThanOrEqualHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/LessThanOrEqualHLAPI.java", "license": "epl-1.0", "size": 108661 }
[ "fr.lip6.move.pnml.hlpn.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
2,815,409
public List<com.mozu.api.contracts.commerceruntime.fulfillment.ShippingRate> getAvailableShipmentMethods(String orderId, Boolean draft) throws Exception { MozuClient<List<com.mozu.api.contracts.commerceruntime.fulfillment.ShippingRate>> client = com.mozu.api.clients.commerce.orders.ShipmentClient.getAvailableSh...
List<com.mozu.api.contracts.commerceruntime.fulfillment.ShippingRate> function(String orderId, Boolean draft) throws Exception { MozuClient<List<com.mozu.api.contracts.commerceruntime.fulfillment.ShippingRate>> client = com.mozu.api.clients.commerce.orders.ShipmentClient.getAvailableShipmentMethodsClient( orderId, draf...
/** * * <p><pre><code> * Shipment shipment = new Shipment(); * ShippingRate shippingRate = shipment.getAvailableShipmentMethods( orderId, draft); * </code></pre></p> * @param draft If true, retrieve the draft version of the order, which might include uncommitted changes to the order or its component...
<code><code> Shipment shipment = new Shipment(); ShippingRate shippingRate = shipment.getAvailableShipmentMethods( orderId, draft); </code></code>
getAvailableShipmentMethods
{ "repo_name": "Mozu/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/orders/ShipmentResource.java", "license": "mit", "size": 5927 }
[ "com.mozu.api.MozuClient", "java.util.List" ]
import com.mozu.api.MozuClient; import java.util.List;
import com.mozu.api.*; import java.util.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
107,048
public void testSiblingsV7PublishIssue() throws Exception { echo("Tests OpenCms v7 publish issue with siblings"); CmsObject cms = getCmsObject(); CmsProject offlineProject = cms.getRequestContext().getCurrentProject(); CmsProject onlineProject = cms.readProject(CmsProject.ONLINE_PR...
void function() throws Exception { echo(STR); CmsObject cms = getCmsObject(); CmsProject offlineProject = cms.getRequestContext().getCurrentProject(); CmsProject onlineProject = cms.readProject(CmsProject.ONLINE_PROJECT_ID); String folder = STR; cms.createResource(folder, CmsResourceTypeFolder.getStaticTypeId()); Strin...
/** * Tests an issue present in OpenCms 7 where online content was not replaced after publish.<p> * * @throws Exception if the test fails */
Tests an issue present in OpenCms 7 where online content was not replaced after publish
testSiblingsV7PublishIssue
{ "repo_name": "ggiudetti/opencms-core", "path": "test/org/opencms/file/TestSiblings.java", "license": "lgpl-2.1", "size": 42644 }
[ "java.util.ArrayList", "java.util.List", "org.opencms.db.CmsResourceState", "org.opencms.file.types.CmsResourceTypeFolder", "org.opencms.file.types.CmsResourceTypePlain", "org.opencms.main.OpenCms" ]
import java.util.ArrayList; import java.util.List; import org.opencms.db.CmsResourceState; import org.opencms.file.types.CmsResourceTypeFolder; import org.opencms.file.types.CmsResourceTypePlain; import org.opencms.main.OpenCms;
import java.util.*; import org.opencms.db.*; import org.opencms.file.types.*; import org.opencms.main.*;
[ "java.util", "org.opencms.db", "org.opencms.file", "org.opencms.main" ]
java.util; org.opencms.db; org.opencms.file; org.opencms.main;
801,544
public ArrayList<String> GetInstanceIDsSorted() { return ListUtilities.SortStringList(new ArrayList<String>(_instanceIDs)); }
ArrayList<String> function() { return ListUtilities.SortStringList(new ArrayList<String>(_instanceIDs)); }
/** Gets a list of data instance IDs for the instances in this collection. * * @return List of all data instance IDs in this collection */
Gets a list of data instance IDs for the instances in this collection
GetInstanceIDsSorted
{ "repo_name": "srp33/ShinyLearner", "path": "Archive/java/src/shinylearner/core/DataInstanceCollection.java", "license": "mit", "size": 7342 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,778,050
public void setPaymentStatus(PaymentStatus paymentStatus) { this.paymentStatus = paymentStatus; }
void function(PaymentStatus paymentStatus) { this.paymentStatus = paymentStatus; }
/** * Sets the payment status of filter. * @param paymentStatus * the payment status of filter. */
Sets the payment status of filter
setPaymentStatus
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/core/gov/opm/scrd/entities/application/PaymentSearchFilter.java", "license": "apache-2.0", "size": 10946 }
[ "gov.opm.scrd.entities.lookup.PaymentStatus" ]
import gov.opm.scrd.entities.lookup.PaymentStatus;
import gov.opm.scrd.entities.lookup.*;
[ "gov.opm.scrd" ]
gov.opm.scrd;
971,211
public CeylonConfig loadSystemConfig() throws IOException { File configFile = findSystemConfig(); if (configFile != null) { return loadConfigFromFile(configFile); } else { return new CeylonConfig(); } }
CeylonConfig function() throws IOException { File configFile = findSystemConfig(); if (configFile != null) { return loadConfigFromFile(configFile); } else { return new CeylonConfig(); } }
/** * Returns the system configuration. Depending on the operating system this is * normally "/etc/ceylon/{configName}" or "%ALLUSERSPROFILE%/ceylon/{configName}". * @return CeylonConfig object containing the system configuration. * If the file was not found the configuration will contain no values....
Returns the system configuration. Depending on the operating system this is normally "/etc/ceylon/{configName}" or "%ALLUSERSPROFILE%/ceylon/{configName}"
loadSystemConfig
{ "repo_name": "ceylon/ceylon-common", "path": "src/com/redhat/ceylon/common/config/ConfigFinder.java", "license": "apache-2.0", "size": 13030 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,848,261
@XmlElement(name = "operationId") @XmlJavaTypeAdapter(KapuaIdAdapter.class) KapuaId getOperationId();
@XmlElement(name = STR) @XmlJavaTypeAdapter(KapuaIdAdapter.class) KapuaId getOperationId();
/** * Gets the {@link DeviceManagementOperation#getId()}. * * @return The {@link DeviceManagementOperation#getId()}. * @since 1.0.0 */
Gets the <code>DeviceManagementOperation#getId()</code>
getOperationId
{ "repo_name": "stzilli/kapua", "path": "service/device/management/registry/api/src/main/java/org/eclipse/kapua/service/device/management/registry/operation/notification/ManagementOperationNotificationCreator.java", "license": "epl-1.0", "size": 4657 }
[ "javax.xml.bind.annotation.XmlElement", "javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter", "org.eclipse.kapua.model.id.KapuaId", "org.eclipse.kapua.model.id.KapuaIdAdapter" ]
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.eclipse.kapua.model.id.KapuaId; import org.eclipse.kapua.model.id.KapuaIdAdapter;
import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.*; import org.eclipse.kapua.model.id.*;
[ "javax.xml", "org.eclipse.kapua" ]
javax.xml; org.eclipse.kapua;
1,633,444
public void testDefaultCollation() throws SQLException { setAutoCommit(false); Statement s = createStatement(); PreparedStatement ps; ResultSet rs; setUpTable(s); //The collation should be UCS_BASIC for this database checkLangBasedQuery(s, "VALUES SYSCS_UTIL.S...
void function() throws SQLException { setAutoCommit(false); Statement s = createStatement(); PreparedStatement ps; ResultSet rs; setUpTable(s); checkLangBasedQuery(s, STR, new String[][] {{STR}}); checkLangBasedQuery(s, STR, new String[][] {{"4","Acorn"},{"0","Smith"},{"1","Zebra"}, {"6",STR}, {"2",STR},{"5",STR},{"3",...
/** * Test order by with default collation * * @throws SQLException */
Test order by with default collation
testDefaultCollation
{ "repo_name": "scnakandala/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java", "license": "apache-2.0", "size": 108089 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement", "org.apache.derbyTesting.junit.JDBC", "org.apache.derbyTesting.junit.XML" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC; import org.apache.derbyTesting.junit.XML;
import java.sql.*; import org.apache.*;
[ "java.sql", "org.apache" ]
java.sql; org.apache;
727,429
public static boolean dispatchEvent(Component component, String eventName, Object...args) { if (DEBUG) { Log.i("EventDispatcher", "Trying to dispatch event " + eventName); } boolean dispatched = false; HandlesEventDispatching dispatchDelegate = component.getDispatchDelegate(); if (disp...
static boolean function(Component component, String eventName, Object...args) { if (DEBUG) { Log.i(STR, STR + eventName); } boolean dispatched = false; HandlesEventDispatching dispatchDelegate = component.getDispatchDelegate(); if (dispatchDelegate.canDispatchEvent(component, eventName)) { EventRegistry er = getEventRe...
/** * Dispatches an event based on its name to any registered handlers. * * @param component the component raising the event * @param eventName name of event being raised * @param args arguments to the event handler */
Dispatches an event based on its name to any registered handlers
dispatchEvent
{ "repo_name": "ajhalbleib/aicg", "path": "appinventor/components/src/com/google/appinventor/components/runtime/EventDispatcher.java", "license": "mit", "size": 9045 }
[ "android.util.Log", "java.util.Set" ]
import android.util.Log; import java.util.Set;
import android.util.*; import java.util.*;
[ "android.util", "java.util" ]
android.util; java.util;
1,551,240
public T caseDiagramCreationDescription(DiagramCreationDescription object) { return null; }
T function(DiagramCreationDescription object) { return null; }
/** * Returns the result of interpreting the object as an instance of ' * <em>Diagram Creation Description</em>'. <!-- begin-user-doc --> This * implementation returns null; returning a non-null result will terminate * the switch. <!-- end-user-doc --> * * @param object * ...
Returns the result of interpreting the object as an instance of ' Diagram Creation Description'. This implementation returns null; returning a non-null result will terminate the switch.
caseDiagramCreationDescription
{ "repo_name": "FTSRG/iq-sirius-integration", "path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/tool/util/ToolSwitch.java", "license": "epl-1.0", "size": 49999 }
[ "org.eclipse.sirius.diagram.description.tool.DiagramCreationDescription" ]
import org.eclipse.sirius.diagram.description.tool.DiagramCreationDescription;
import org.eclipse.sirius.diagram.description.tool.*;
[ "org.eclipse.sirius" ]
org.eclipse.sirius;
2,258,920
ImageView.ScaleType getScaleType();
ImageView.ScaleType getScaleType();
/** * Return the current scale type in use by the ImageView. * * @return current ImageView.ScaleType */
Return the current scale type in use by the ImageView
getScaleType
{ "repo_name": "darlyhellen/oto", "path": "DLClent_A/src/com/darly/im/photoview/IPhotoView.java", "license": "apache-2.0", "size": 11360 }
[ "android.widget.ImageView" ]
import android.widget.ImageView;
import android.widget.*;
[ "android.widget" ]
android.widget;
581,555
public static String getISO8601Date(final Date date) { final SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss"); return sdf.format(date); }
static String function(final Date date) { final SimpleDateFormat sdf = new SimpleDateFormat( STR); return sdf.format(date); }
/** * get an ISO 8601 Date Format * * @param date * @return */
get an ISO 8601 Date Format
getISO8601Date
{ "repo_name": "TranscendComputing/TopStackCore", "path": "src/com/msi/tough/core/DateHelper.java", "license": "apache-2.0", "size": 2001 }
[ "java.text.SimpleDateFormat", "java.util.Date" ]
import java.text.SimpleDateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,049,357
public List<MType> build() { // Now that build has been called, we are required to dispatch // invalidations. isClean = true; if (!isMessagesListMutable && builders == null) { // We still have an immutable list and we never created a builder. return messages; } boolean allMessage...
List<MType> function() { isClean = true; if (!isMessagesListMutable && builders == null) { return messages; } boolean allMessagesInSync = true; if (!isMessagesListMutable) { for (int i = 0; i < messages.size(); i++) { Message message = messages.get(i); SingleFieldBuilderV3<MType, BType, IType> builder = builders.get(i)...
/** * Builds the list of messages from the builder and returns them. * * @return an immutable list of messages */
Builds the list of messages from the builder and returns them
build
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-protocol-shaded/src/main/java/org/apache/hadoop/hbase/shaded/com/google/protobuf/RepeatedFieldBuilderV3.java", "license": "apache-2.0", "size": 23037 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
65,923
public void removeAudioSpectrumListener(AudioSpectrumListener listener);
void function(AudioSpectrumListener listener);
/** * Removes a listener for audio spectrum events. * * @param listener * @throws IllegalArgumentException if <code>listener</code> is * <code>null</code>. */
Removes a listener for audio spectrum events
removeAudioSpectrumListener
{ "repo_name": "teamfx/openjfx-10-dev-rt", "path": "modules/javafx.media/src/main/java/com/sun/media/jfxmedia/MediaPlayer.java", "license": "gpl-2.0", "size": 10664 }
[ "com.sun.media.jfxmedia.events.AudioSpectrumListener" ]
import com.sun.media.jfxmedia.events.AudioSpectrumListener;
import com.sun.media.jfxmedia.events.*;
[ "com.sun.media" ]
com.sun.media;
2,430,803
List<CmsPropertyDefinition> readPropertyDefinitions(CmsDbContext dbc, CmsUUID projectId) throws CmsDataAccessException;
List<CmsPropertyDefinition> readPropertyDefinitions(CmsDbContext dbc, CmsUUID projectId) throws CmsDataAccessException;
/** * Reads all property definitions for the specified mapping type.<p> * * @param dbc the current database context * @param projectId the id of the project * * @return a list with the <code>{@link CmsPropertyDefinition}</code> objects (may be empty) * * @throws CmsDataAccessExce...
Reads all property definitions for the specified mapping type
readPropertyDefinitions
{ "repo_name": "victos/opencms-core", "path": "src/org/opencms/db/I_CmsVfsDriver.java", "license": "lgpl-2.1", "size": 41952 }
[ "java.util.List", "org.opencms.file.CmsDataAccessException", "org.opencms.file.CmsPropertyDefinition", "org.opencms.util.CmsUUID" ]
import java.util.List; import org.opencms.file.CmsDataAccessException; import org.opencms.file.CmsPropertyDefinition; import org.opencms.util.CmsUUID;
import java.util.*; import org.opencms.file.*; import org.opencms.util.*;
[ "java.util", "org.opencms.file", "org.opencms.util" ]
java.util; org.opencms.file; org.opencms.util;
1,173,383
public void setBackground(Color c) { return; }
void function(Color c) { return; }
/** * Overridden to do nothing. * * @param c the color. */
Overridden to do nothing
setBackground
{ "repo_name": "JSansalone/JFreeChart", "path": "swt/org/jfree/experimental/swt/SWTPaintCanvas.java", "license": "lgpl-2.1", "size": 3859 }
[ "org.eclipse.swt.graphics.Color" ]
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,794,542
public SelectorBuilder doesNotContainIgnoreCase(String field, String propertyValue) { return this.singleValuePredicate(field, propertyValue, PredicateOperator.DOES_NOT_CONTAIN_IGNORE_CASE); }
SelectorBuilder function(String field, String propertyValue) { return this.singleValuePredicate(field, propertyValue, PredicateOperator.DOES_NOT_CONTAIN_IGNORE_CASE); }
/** * Adds the predicate <b>does not contain ignore case</b> to the selector for the given field and * value. * * @param propertyValue the property value as a String independently of the field type. The caller * should take care of the formatting if it is necessary */
Adds the predicate does not contain ignore case to the selector for the given field and value
doesNotContainIgnoreCase
{ "repo_name": "andyj24/googleads-java-lib", "path": "modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/utils/v201502/SelectorBuilder.java", "license": "apache-2.0", "size": 23287 }
[ "com.google.api.ads.adwords.axis.v201502.cm.PredicateOperator" ]
import com.google.api.ads.adwords.axis.v201502.cm.PredicateOperator;
import com.google.api.ads.adwords.axis.v201502.cm.*;
[ "com.google.api" ]
com.google.api;
2,105,092
private void unpersist () { SharedPreferences.Editor editor = getPrefs().edit(); editor.remove(options.getIdStr()); if (Build.VERSION.SDK_INT < 9) { editor.commit(); } else { editor.apply(); } }
void function () { SharedPreferences.Editor editor = getPrefs().edit(); editor.remove(options.getIdStr()); if (Build.VERSION.SDK_INT < 9) { editor.commit(); } else { editor.apply(); } }
/** * Remove the notification from the Android shared Preferences. */
Remove the notification from the Android shared Preferences
unpersist
{ "repo_name": "rastreabilidadebrasil/cordova-plugin-local-notifications", "path": "src/android/notification/Notification.java", "license": "apache-2.0", "size": 9500 }
[ "android.content.SharedPreferences", "android.os.Build" ]
import android.content.SharedPreferences; import android.os.Build;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
883,712
public ListIterator listIterator() { return listIterator(0); }
ListIterator function() { return listIterator(0); }
/** * Returns an iterator over the children of this graphics node. */
Returns an iterator over the children of this graphics node
listIterator
{ "repo_name": "Uni-Sol/batik", "path": "sources/org/apache/batik/gvt/CompositeGraphicsNode.java", "license": "apache-2.0", "size": 34701 }
[ "java.util.ListIterator" ]
import java.util.ListIterator;
import java.util.*;
[ "java.util" ]
java.util;
1,915,324
@Override public int doWrite(ByteChunk chunk, Response res) throws IOException { int len = chunk.getLength(); int start = chunk.getStart(); byte[] b = chunk.getBuffer(); addToBB(b, start, len); byteCount += chunk.getLength(); retur...
int function(ByteChunk chunk, Response res) throws IOException { int len = chunk.getLength(); int start = chunk.getStart(); byte[] b = chunk.getBuffer(); addToBB(b, start, len); byteCount += chunk.getLength(); return chunk.getLength(); }
/** * Write chunk. */
Write chunk
doWrite
{ "repo_name": "plumer/codana", "path": "tomcat_files/8.0.0/InternalAprOutputBuffer.java", "license": "mit", "size": 10396 }
[ "java.io.IOException", "org.apache.coyote.Response", "org.apache.tomcat.util.buf.ByteChunk" ]
import java.io.IOException; import org.apache.coyote.Response; import org.apache.tomcat.util.buf.ByteChunk;
import java.io.*; import org.apache.coyote.*; import org.apache.tomcat.util.buf.*;
[ "java.io", "org.apache.coyote", "org.apache.tomcat" ]
java.io; org.apache.coyote; org.apache.tomcat;
752,655
protected void initJobCredentialsAndUGI(Configuration conf) { try { this.currentUser = UserGroupInformation.getCurrentUser(); this.jobCredentials = ((JobConf)conf).getCredentials(); if (CryptoUtils.isEncryptedSpillEnabled(conf)) { int keyLen = conf.getInt( MRJobConfig.MR...
void function(Configuration conf) { try { this.currentUser = UserGroupInformation.getCurrentUser(); this.jobCredentials = ((JobConf)conf).getCredentials(); if (CryptoUtils.isEncryptedSpillEnabled(conf)) { int keyLen = conf.getInt( MRJobConfig.MR_ENCRYPTED_INTERMEDIATE_DATA_KEY_SIZE_BITS, MRJobConfig .DEFAULT_MR_ENCRYPT...
/** * Obtain the tokens needed by the job and put them in the UGI * @param conf */
Obtain the tokens needed by the job and put them in the UGI
initJobCredentialsAndUGI
{ "repo_name": "gilv/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java", "license": "apache-2.0", "size": 64844 }
[ "java.io.IOException", "java.security.NoSuchAlgorithmException", "javax.crypto.KeyGenerator", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.mapred.JobConf", "org.apache.hadoop.mapreduce.CryptoUtils", "org.apache.hadoop.mapreduce.MRJobConfig", "org.apache.hadoop.security.UserGroupInformati...
import java.io.IOException; import java.security.NoSuchAlgorithmException; import javax.crypto.KeyGenerator; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapreduce.CryptoUtils; import org.apache.hadoop.mapreduce.MRJobConfig; import org.apache.hadoop.secu...
import java.io.*; import java.security.*; import javax.crypto.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.security.*; import org.apache.hadoop.yarn.exceptions.*;
[ "java.io", "java.security", "javax.crypto", "org.apache.hadoop" ]
java.io; java.security; javax.crypto; org.apache.hadoop;
893,836
@RestrictTo(LIBRARY_GROUP) public static void resetCache() { sTypefaceCache.evictAll(); }
@RestrictTo(LIBRARY_GROUP) static void function() { sTypefaceCache.evictAll(); }
/** * Used for tests, should not be used otherwise. * @hide **/
Used for tests, should not be used otherwise
resetCache
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "compat/src/main/java/androidx/core/provider/FontsContractCompat.java", "license": "apache-2.0", "size": 38904 }
[ "androidx.annotation.RestrictTo" ]
import androidx.annotation.RestrictTo;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
576,628
protected void addShunt_1PropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Triplex_node_shunt_1_feature"), getString("_UI_PropertyDescriptor_d...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VisGridPackage.eINSTANCE.getTriplex_node_Shunt_1(), true, false, false, ItemPropertyDescriptor.GE...
/** * This adds a property descriptor for the Shunt 1 feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Shunt 1 feature.
addShunt_1PropertyDescriptor
{ "repo_name": "mikesligo/visGrid", "path": "ie.tcd.gmf.visGrid.edit/src/visGrid/provider/Triplex_nodeItemProvider.java", "license": "gpl-3.0", "size": 50747 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,261,524
interface WithSubnet { Update withSubnet(SubnetInner subnet); } }
interface WithSubnet { Update withSubnet(SubnetInner subnet); } }
/** * Specifies subnet. * @param subnet The reference to the subnet resource * @return the next update stage */
Specifies subnet
withSubnet
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/HubIpConfiguration.java", "license": "mit", "size": 9047 }
[ "com.microsoft.azure.management.network.v2020_05_01.implementation.SubnetInner" ]
import com.microsoft.azure.management.network.v2020_05_01.implementation.SubnetInner;
import com.microsoft.azure.management.network.v2020_05_01.implementation.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,628,720
@Test public void testGetMaximumParameters() { final WhoAction action = new WhoAction(); assertThat(action.getMaximumParameters(), is(0)); }
void function() { final WhoAction action = new WhoAction(); assertThat(action.getMaximumParameters(), is(0)); }
/** * Tests for getMaximumParameters(). */
Tests for getMaximumParameters()
testGetMaximumParameters
{ "repo_name": "nhnb/stendhal", "path": "tests/games/stendhal/client/actions/WhoActionTest.java", "license": "gpl-2.0", "size": 2153 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
1,081,150
private static String exec(final String[] cmd) throws IOException, InterruptedException { ByteArrayOutputStream bout = new ByteArrayOutputStream(); Process p = Runtime.getRuntime().exec(cmd); int c; InputStream in; in = p.getInputStream(); while ((c = i...
static String function(final String[] cmd) throws IOException, InterruptedException { ByteArrayOutputStream bout = new ByteArrayOutputStream(); Process p = Runtime.getRuntime().exec(cmd); int c; InputStream in; in = p.getInputStream(); while ((c = in.read()) != -1) { bout.write(c); } in = p.getErrorStream(); while ((c ...
/** * Execute the specified command and return the output * (both stdout and stderr). */
Execute the specified command and return the output (both stdout and stderr)
exec
{ "repo_name": "pixonic/ctop", "path": "src/main/java/com/pixonic/ctop/SttySupport.java", "license": "mit", "size": 7776 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
468,556
public Enumeration getMatchingHeaderLines(String[] names) { return new HeaderLineEnumeration(getMatchingHeaders(names)); }
Enumeration function(String[] names) { return new HeaderLineEnumeration(getMatchingHeaders(names)); }
/** * Return all matching header lines as an Enumeration of Strings. */
Return all matching header lines as an Enumeration of Strings
getMatchingHeaderLines
{ "repo_name": "salyh/javamailspec", "path": "geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/InternetHeaders.java", "license": "apache-2.0", "size": 23836 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,718,845