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 void logOut() throws IOException { UserTO userTO = (UserTO) getAttribute( USER_ATTRIBUTE ); serviceSecurityIntegratorEJB.logOut( userTO ); FacesContext ctx = FacesContext.getCurrentInstance(); ctx.getExternalContext().invalidateSession(); removeAttribute( USER_ATTRIBUTE ); Configurabl...
void function() throws IOException { UserTO userTO = (UserTO) getAttribute( USER_ATTRIBUTE ); serviceSecurityIntegratorEJB.logOut( userTO ); FacesContext ctx = FacesContext.getCurrentInstance(); ctx.getExternalContext().invalidateSession(); removeAttribute( USER_ATTRIBUTE ); ConfigurableNavigationHandler nav = (Configu...
/** * Method that performs a logout from the system. * * @throws IOException if there is a problem concerning URL redirection */
Method that performs a logout from the system
logOut
{ "repo_name": "sidlors/digital-booking", "path": "digital-booking-web/src/main/java/mx/com/cinepolis/digital/booking/web/login/LoginBean.java", "license": "epl-1.0", "size": 3426 }
[ "java.io.IOException", "javax.faces.application.ConfigurableNavigationHandler", "javax.faces.context.FacesContext", "mx.com.cinepolis.digital.booking.commons.to.UserTO" ]
import java.io.IOException; import javax.faces.application.ConfigurableNavigationHandler; import javax.faces.context.FacesContext; import mx.com.cinepolis.digital.booking.commons.to.UserTO;
import java.io.*; import javax.faces.application.*; import javax.faces.context.*; import mx.com.cinepolis.digital.booking.commons.to.*;
[ "java.io", "javax.faces", "mx.com.cinepolis" ]
java.io; javax.faces; mx.com.cinepolis;
1,914,678
@DELETE @Path("ddl/database/{db}/table/{table}/partition/{partition}") @Produces(MediaType.APPLICATION_JSON) public Response dropPartition(@PathParam("db") String db, @PathParam("table") String table, @PathParam("partition") String partition, @QueryParam("if...
@Path(STR) @Produces(MediaType.APPLICATION_JSON) Response function(@PathParam("db") String db, @PathParam("table") String table, @PathParam(STR) String partition, @QueryParam(STR) boolean ifExists, @QueryParam("group") String group, @QueryParam(STR) String permissions) throws HcatException, NotAuthorizedException, Busy...
/** * Drop a partition in an hcat table. */
Drop a partition in an hcat table
dropPartition
{ "repo_name": "vergilchiu/hive", "path": "hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java", "license": "apache-2.0", "size": 44278 }
[ "java.io.IOException", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.apache.commons.exec.ExecuteException" ]
import java.io.IOException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.commons.exec.ExecuteException;
import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.commons.exec.*;
[ "java.io", "javax.ws", "org.apache.commons" ]
java.io; javax.ws; org.apache.commons;
2,015,521
protected void connect() throws IOException { JMXServiceURL jmxUrl = new JMXServiceURL(String.format(fmtUrl, host, port)); Map<String, Object> env = new HashMap<String, Object>(); if (username != null) { String[] creds = { username, password }; env.put(JMX...
void function() throws IOException { JMXServiceURL jmxUrl = new JMXServiceURL(String.format(fmtUrl, host, port)); Map<String, Object> env = new HashMap<String, Object>(); if (username != null) { String[] creds = { username, password }; env.put(JMXConnector.CREDENTIALS, creds); } env.put(STR, getRMIClientSocketFactory()...
/** * Create a connection to the JMX agent and setup the M[X]Bean proxies. * * @throws IOException on connection failures */
Create a connection to the JMX agent and setup the M[X]Bean proxies
connect
{ "repo_name": "belliottsmith/cassandra", "path": "src/java/org/apache/cassandra/tools/NodeProbe.java", "license": "apache-2.0", "size": 73035 }
[ "java.io.IOException", "java.lang.management.ManagementFactory", "java.lang.management.MemoryMXBean", "java.lang.management.RuntimeMXBean", "java.util.HashMap", "java.util.Map", "javax.management.JMX", "javax.management.MalformedObjectNameException", "javax.management.ObjectName", "javax.managemen...
import java.io.IOException; import java.lang.management.ManagementFactory; import java.lang.management.MemoryMXBean; import java.lang.management.RuntimeMXBean; import java.util.HashMap; import java.util.Map; import javax.management.JMX; import javax.management.MalformedObjectNameException; import javax.management.Objec...
import java.io.*; import java.lang.management.*; import java.util.*; import javax.management.*; import javax.management.remote.*; import org.apache.cassandra.audit.*; import org.apache.cassandra.auth.*; import org.apache.cassandra.auth.jmx.*; import org.apache.cassandra.batchlog.*; import org.apache.cassandra.db.compac...
[ "java.io", "java.lang", "java.util", "javax.management", "org.apache.cassandra" ]
java.io; java.lang; java.util; javax.management; org.apache.cassandra;
1,639,748
public void testQueryNoteIds() { final ContentResolver cr = getContext().getContentResolver(); // Query all available notes final Cursor allNotesCursor = cr.query(FlashCardsContract.Note.CONTENT_URI, null, "tag:" + TEST_TAG, null, null); assertNotNull(allNotesCursor); try { ...
void function() { final ContentResolver cr = getContext().getContentResolver(); final Cursor allNotesCursor = cr.query(FlashCardsContract.Note.CONTENT_URI, null, "tag:" + TEST_TAG, null, null); assertNotNull(allNotesCursor); try { assertEquals(STR, mCreatedNotes.size(), allNotesCursor.getCount()); while (allNotesCursor...
/** * Test that a query for all the notes added in setup() looks correct */
Test that a query for all the notes added in setup() looks correct
testQueryNoteIds
{ "repo_name": "John0079/Anki-Android-2.5.4", "path": "AnkiDroid/src/androidTest/java/com.ichi2.anki.tests/ContentProviderTest.java", "license": "gpl-3.0", "size": 34318 }
[ "android.content.ContentResolver", "android.database.Cursor", "android.net.Uri", "com.ichi2.anki.FlashCardsContract", "com.ichi2.libanki.Note" ]
import android.content.ContentResolver; import android.database.Cursor; import android.net.Uri; import com.ichi2.anki.FlashCardsContract; import com.ichi2.libanki.Note;
import android.content.*; import android.database.*; import android.net.*; import com.ichi2.anki.*; import com.ichi2.libanki.*;
[ "android.content", "android.database", "android.net", "com.ichi2.anki", "com.ichi2.libanki" ]
android.content; android.database; android.net; com.ichi2.anki; com.ichi2.libanki;
2,344,484
public static <T> Set<List<T>> permutations(Iterable<T> self) { Set<List<T>> ans = new HashSet<>(); PermutationGenerator<T> generator = new PermutationGenerator<>(self); while (generator.hasNext()) { ans.add(generator.next()); } return ans; } /** * F...
static <T> Set<List<T>> function(Iterable<T> self) { Set<List<T>> ans = new HashSet<>(); PermutationGenerator<T> generator = new PermutationGenerator<>(self); while (generator.hasNext()) { ans.add(generator.next()); } return ans; } /** * Finds all permutations of an iterable, applies a function to each permutation and ...
/** * Finds all permutations of an iterable. * <p> * Example usage: * <pre class="groovyTestCase">def result = [1, 2, 3].permutations() * assert result == [[3, 2, 1], [3, 1, 2], [1, 3, 2], [2, 3, 1], [2, 1, 3], [1, 2, 3]] as Set</pre> * * @param self the Iterable of items * @retu...
Finds all permutations of an iterable. Example usage: def result = [1, 2, 3].permutations() assert result == [[3, 2, 1], [3, 1, 2], [1, 3, 2], [2, 3, 1], [2, 1, 3], [1, 2, 3]] as Set</code>
permutations
{ "repo_name": "apache/incubator-groovy", "path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "apache-2.0", "size": 703151 }
[ "groovy.util.PermutationGenerator", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import groovy.util.PermutationGenerator; import java.util.HashSet; import java.util.List; import java.util.Set;
import groovy.util.*; import java.util.*;
[ "groovy.util", "java.util" ]
groovy.util; java.util;
2,620,551
public void getIndex() throws IOException{ Downloader.download(syncRoot, updateSite.getIndexURL(), "alamode.index"); }
void function() throws IOException{ Downloader.download(syncRoot, updateSite.getIndexURL(), STR); }
/** * Downloads the remote alamode.index. * */
Downloads the remote alamode.index
getIndex
{ "repo_name": "HitTheSticks/alamode", "path": "src/com/htssoft/alamode/UpdateService.java", "license": "bsd-2-clause", "size": 4821 }
[ "com.htssoft.alamode.network.Downloader", "java.io.IOException" ]
import com.htssoft.alamode.network.Downloader; import java.io.IOException;
import com.htssoft.alamode.network.*; import java.io.*;
[ "com.htssoft.alamode", "java.io" ]
com.htssoft.alamode; java.io;
981,929
public void setScope(Expression scope) { this.scope = scope; }
void function(Expression scope) { this.scope = scope; }
/** * Sets the scope. * * @param scope the new scope */
Sets the scope
setScope
{ "repo_name": "DigiArea/jse-model", "path": "com.digiarea.jse/src/com/digiarea/jse/FieldAccessExpr.java", "license": "epl-1.0", "size": 3206 }
[ "com.digiarea.jse.Expression" ]
import com.digiarea.jse.Expression;
import com.digiarea.jse.*;
[ "com.digiarea.jse" ]
com.digiarea.jse;
2,085,763
// [TARGET update(SinkInfo)] // [VARIABLE "my_sink_name"] // [VARIABLE "my_dataset"] public Sink updateSink(String sinkName, String datasetName) { // [START updateSink] SinkInfo sinkInfo = SinkInfo.newBuilder(sinkName, DatasetDestination.of(datasetName)) .setVersionFormat(SinkInfo.VersionFormat....
Sink function(String sinkName, String datasetName) { SinkInfo sinkInfo = SinkInfo.newBuilder(sinkName, DatasetDestination.of(datasetName)) .setVersionFormat(SinkInfo.VersionFormat.V2) .setFilter(STR) .build(); Sink sink = logging.update(sinkInfo); return sink; }
/** * Example of updating a sink. */
Example of updating a sink
updateSink
{ "repo_name": "mbrukman/gcloud-java", "path": "google-cloud-examples/src/main/java/com/google/cloud/examples/logging/snippets/LoggingSnippets.java", "license": "apache-2.0", "size": 15856 }
[ "com.google.cloud.logging.Sink", "com.google.cloud.logging.SinkInfo" ]
import com.google.cloud.logging.Sink; import com.google.cloud.logging.SinkInfo;
import com.google.cloud.logging.*;
[ "com.google.cloud" ]
com.google.cloud;
2,447,266
private static String PUBLISHER_ASSERTION_RESPONSE="<assertionStatusReport generic=\"2.0\" operator=\"jUDDI.org\" xmlns=\"urn:uddi-org:api_v2\"><assertionStatusItem completionStatus=\"status:fromKey_incomplete\"><fromKey>5173FA70-81E6-11DE-B7B9-A9A7A2431DC4</fromKey><toKey>517AD840-81E6-11DE-B7B9-C5758FAC28A0</toKey><...
static String PUBLISHER_ASSERTION_RESPONSE=STR2.0\STRjUDDI.org\STRurn:uddi-org:api_v2\STRstatus:fromKey_incomplete\STRConcept\STRImplements\STRUUID:DB77450D-9FA8-45D4-A7BC-04411D14E384\STR; private static String FROM_KEY=STR; public void function() { try { JAXBContext jaxbContext=JAXBContext.newInstance(STR); Unmarshal...
/** * Test handling of utf8 characters */
Test handling of utf8 characters
unmarshallUTF8
{ "repo_name": "apache/juddi-scout", "path": "src/test/java/org/apache/ws/scout/registry/JAXBTest.java", "license": "apache-2.0", "size": 2966 }
[ "java.io.StringReader", "java.util.List", "javax.xml.bind.JAXBContext", "javax.xml.bind.JAXBElement", "javax.xml.bind.JAXBException", "javax.xml.bind.Unmarshaller", "javax.xml.transform.stream.StreamSource", "junit.framework.Assert", "org.apache.ws.scout.model.uddi.v2.AssertionStatusReport", "org....
import java.io.StringReader; import java.util.List; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import javax.xml.transform.stream.StreamSource; import junit.framework.Assert; import org.apache.ws.scout.model.uddi.v2.Asser...
import java.io.*; import java.util.*; import javax.xml.bind.*; import javax.xml.transform.stream.*; import junit.framework.*; import org.apache.ws.scout.model.uddi.v2.*; import org.junit.*;
[ "java.io", "java.util", "javax.xml", "junit.framework", "org.apache.ws", "org.junit" ]
java.io; java.util; javax.xml; junit.framework; org.apache.ws; org.junit;
1,099,424
public static MUser get (Properties ctx) { return get(ctx, Env.getAD_User_ID(ctx)); } // get
static MUser function (Properties ctx) { return get(ctx, Env.getAD_User_ID(ctx)); }
/** * Get Current User (cached) * @param ctx context * @return user */
Get Current User (cached)
get
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/MUser.java", "license": "gpl-2.0", "size": 20750 }
[ "java.util.Properties", "org.compiere.util.Env" ]
import java.util.Properties; import org.compiere.util.Env;
import java.util.*; import org.compiere.util.*;
[ "java.util", "org.compiere.util" ]
java.util; org.compiere.util;
2,367,879
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(forsyde.System.class)) { case ForsydePackage.SYSTEM__PROCESS_NETWORKS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); re...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(forsyde.System.class)) { case ForsydePackage.SYSTEM__PROCESS_NETWORKS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification);...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "forsyde/ForSyDe-Eclipse", "path": "plugins/se.kth.ict.forsyde.edit/src-gen/forsyde/provider/SystemItemProvider.java", "license": "bsd-3-clause", "size": 4738 }
[ "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,571,795
@Test public void testErrorCodeForbidden() throws IOException { when(mockLowLevelRequest.execute()) .thenReturn(mockLowLevelResponse); when(mockLowLevelResponse.getStatusCode()) .thenReturn(403) // Non-retryable error. .thenReturn(200); // Shouldn't happen. try { Storage....
void function() throws IOException { when(mockLowLevelRequest.execute()) .thenReturn(mockLowLevelResponse); when(mockLowLevelResponse.getStatusCode()) .thenReturn(403) .thenReturn(200); try { Storage.Buckets.Get result = storage.buckets().get("test"); HttpResponse response = result.executeUnparsed(); assertNotNull(resp...
/** * Tests that a non-retriable error is not retried. */
Tests that a non-retriable error is not retried
testErrorCodeForbidden
{ "repo_name": "shakamunyi/beam", "path": "sdk/src/test/java/com/google/cloud/dataflow/sdk/util/RetryHttpRequestInitializerTest.java", "license": "apache-2.0", "size": 11491 }
[ "com.google.api.client.http.HttpRequest", "com.google.api.client.http.HttpResponse", "com.google.api.client.http.HttpResponseException", "com.google.api.services.storage.Storage", "java.io.IOException", "org.hamcrest.Matchers", "org.junit.Assert", "org.mockito.Matchers", "org.mockito.Mockito" ]
import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpResponse; import com.google.api.client.http.HttpResponseException; import com.google.api.services.storage.Storage; import java.io.IOException; import org.hamcrest.Matchers; import org.junit.Assert; import org.mockito.Matchers; import o...
import com.google.api.client.http.*; import com.google.api.services.storage.*; import java.io.*; import org.hamcrest.*; import org.junit.*; import org.mockito.*;
[ "com.google.api", "java.io", "org.hamcrest", "org.junit", "org.mockito" ]
com.google.api; java.io; org.hamcrest; org.junit; org.mockito;
2,583,769
if (mMatrix == null) { mMatrix = new Matrix(); } else { mMatrix.reset(); } mAlpha = 1.0f; mTransformationType = TYPE_BOTH; }
if (mMatrix == null) { mMatrix = new Matrix(); } else { mMatrix.reset(); } mAlpha = 1.0f; mTransformationType = TYPE_BOTH; }
/** * Reset the transformation to a state that leaves the object * being animated in an unmodified state. The transformation type is * {@link #TYPE_BOTH} by default. */
Reset the transformation to a state that leaves the object being animated in an unmodified state. The transformation type is <code>#TYPE_BOTH</code> by default
clear
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/view/animation/Transformation.java", "license": "gpl-3.0", "size": 4746 }
[ "android.graphics.Matrix" ]
import android.graphics.Matrix;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,102,519
public static int EncodedLengthString(String str) { if (str == null) return 3; try { return 3 + str.getBytes("UTF-8").length; } catch (UnsupportedEncodingException e) { e.printStackTrace(); System.exit(-1); } return 0; ...
static int function(String str) { if (str == null) return 3; try { return 3 + str.getBytes("UTF-8").length; } catch (UnsupportedEncodingException e) { e.printStackTrace(); System.exit(-1); } return 0; }
/** * Computes the encoded length of a c-style null-terminated string * * @param str string to encode * @return the encoded length of str */
Computes the encoded length of a c-style null-terminated string
EncodedLengthString
{ "repo_name": "sjhalaz/hypertable", "path": "src/java/Core/org/hypertable/AsyncComm/Serialization.java", "license": "gpl-2.0", "size": 4618 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
337,771
public void mousePressed(MouseEvent e) { double viewValue = modelToView(modelrange.getValue()); double viewExtent = modelToView(modelrange.getExtent()); if (e.getX()<viewValue || e.getX()>(viewExtent+viewValue)){ this.pressLocation = (int)(viewExtent/2); modelrange.setValue((int)viewToModel(e.getX())-mod...
void function(MouseEvent e) { double viewValue = modelToView(modelrange.getValue()); double viewExtent = modelToView(modelrange.getExtent()); if (e.getX()<viewValue e.getX()>(viewExtent+viewValue)){ this.pressLocation = (int)(viewExtent/2); modelrange.setValue((int)viewToModel(e.getX())-modelrange.getExtent()/2); this....
/** * MouseListener: Should either scroll by some drag distance * or, if the user presses outside the thumb, it should jump * directly to the location of the mouse press and THEN * scroll by some drag distance. */
MouseListener: Should either scroll by some drag distance or, if the user presses outside the thumb, it should jump directly to the location of the mouse press and THEN scroll by some drag distance
mousePressed
{ "repo_name": "boubre/BayouBot", "path": "Workspace/src/codeblockutil/CHoverScrollPane.java", "license": "mit", "size": 22817 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,941,874
public int readInt(byte []buf, int offset, int length) throws IOException { if (! _didGet) getConnInput(); if (_isRequestDone) return -1; try { int len = length; if (_isChunked) { if (_chunkLength == 0) { int ch; for (ch = _rs.read(); ...
int function(byte []buf, int offset, int length) throws IOException { if (! _didGet) getConnInput(); if (_isRequestDone) return -1; try { int len = length; if (_isChunked) { if (_chunkLength == 0) { int ch; for (ch = _rs.read(); ch >= 0 && (ch == '\r' ch == '\n' ch == ' '); ch = _rs.read()) { } for (; ch >= 0 && ch != ...
/** * Read data from the connection. If the request hasn't yet been sent * to the server, send it. */
Read data from the connection. If the request hasn't yet been sent to the server, send it
readInt
{ "repo_name": "moriyoshi/quercus-gae", "path": "src/main/java/com/caucho/vfs/HttpStream.java", "license": "gpl-2.0", "size": 21185 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,740,851
private boolean initialize() { if (implClassDef.isInterface()) { env.error(0, "rmic.cant.make.stubs.for.interface", implClassDef.getName()); return false; } try { defRemote = env.getClassDeclaration(...
boolean function() { if (implClassDef.isInterface()) { env.error(0, STR, implClassDef.getName()); return false; } try { defRemote = env.getClassDeclaration(idRemote).getClassDefinition(env); defException = env.getClassDeclaration(idJavaLangException). getClassDefinition(env); defRemoteException = env.getClassDeclaratio...
/** * Validate that the remote implementation class is properly formed * and fill in the data structures required by the public interface. */
Validate that the remote implementation class is properly formed and fill in the data structures required by the public interface
initialize
{ "repo_name": "openjdk/jdk7u", "path": "jdk/src/share/classes/sun/rmi/rmic/RemoteClass.java", "license": "gpl-2.0", "size": 35852 }
[ "java.util.Enumeration", "java.util.Hashtable", "java.util.Vector" ]
import java.util.Enumeration; import java.util.Hashtable; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,693,331
public boolean matches(String expr) { return Pattern.matches(expr, this); }
boolean function(String expr) { return Pattern.matches(expr, this); }
/** * Determines whether this string matches a given regular expression. * * @param expr the regular expression to be matched. * @return {@code true} if the expression matches, otherwise {@code false}. * @throws PatternSyntaxException if the syntax of the supplied regular expression is not vali...
Determines whether this string matches a given regular expression
matches
{ "repo_name": "wuyinxian124/netty", "path": "common/src/main/java/io/netty/util/AsciiString.java", "license": "apache-2.0", "size": 37398 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,367,566
void send(String connectionFactory, String queue, String content, String replyTo, String username, String password) throws MBeanException;
void send(String connectionFactory, String queue, String content, String replyTo, String username, String password) throws MBeanException;
/** * Send a JMS message to given queue. * * @param connectionFactory The JMS connection factory name. * @param queue The JMS queue name. * @param content The message content. * @param replyTo The message ReplyTo. * @param username The (optional) username to connect to the JMS broker....
Send a JMS message to given queue
send
{ "repo_name": "grgrzybek/karaf", "path": "jms/src/main/java/org/apache/karaf/jms/JmsMBean.java", "license": "apache-2.0", "size": 7275 }
[ "javax.management.MBeanException" ]
import javax.management.MBeanException;
import javax.management.*;
[ "javax.management" ]
javax.management;
1,448,571
public static ServiceDescriptor getLookup(String policy, String... lookupConfig) throws IOException { return (getLookup(policy, Booter.getPort(), lookupConfig)); }
static ServiceDescriptor function(String policy, String... lookupConfig) throws IOException { return (getLookup(policy, Booter.getPort(), lookupConfig)); }
/** * Get the {@link com.sun.jini.start.ServiceDescriptor} instance for the * Jini Lookup Service (Reggie), using the Webster port created by this * utility. * * @param policy * The security policy file to use * @param lookupConfig * The configuration file Reggie will use * @ret...
Get the <code>com.sun.jini.start.ServiceDescriptor</code> instance for the Jini Lookup Service (Reggie), using the Webster port created by this utility
getLookup
{ "repo_name": "dudzislaw/SORCER", "path": "tools/sorcer-boot/src/main/java/sorcer/provider/boot/SorcerDescriptorUtil.java", "license": "apache-2.0", "size": 51715 }
[ "com.sun.jini.start.ServiceDescriptor", "java.io.IOException" ]
import com.sun.jini.start.ServiceDescriptor; import java.io.IOException;
import com.sun.jini.start.*; import java.io.*;
[ "com.sun.jini", "java.io" ]
com.sun.jini; java.io;
1,603,245
Collection<AsteriskChannel> getChannels() throws ManagerCommunicationException;
Collection<AsteriskChannel> getChannels() throws ManagerCommunicationException;
/** * Returns the active channels of the Asterisk server. * * @return a Collection of active channels. * @throws ManagerCommunicationException if there is a problem communication * with Asterisk */
Returns the active channels of the Asterisk server
getChannels
{ "repo_name": "pk1057/asterisk-java", "path": "src/main/java/org/asteriskjava/live/AsteriskServer.java", "license": "apache-2.0", "size": 24290 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,078,667
public Map getAttributes() { return null; }
Map function() { return null; }
/** * Returns null. */
Returns null
getAttributes
{ "repo_name": "yawlfoundation/editor", "path": "source/org/jgraph/graph/DefaultGraphModel.java", "license": "lgpl-3.0", "size": 56297 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,689,191
public void insertRow(int row) { if (row > lastRow) { return; } if (row <= firstRow) { firstRow++; modified = true; } if (row <= lastRow) { lastRow++; modified = true; } } } public ConditionalFormatRangeRecord(Record t) { super(t); initialized = fals...
void function(int row) { if (row > lastRow) { return; } if (row <= firstRow) { firstRow++; modified = true; } if (row <= lastRow) { lastRow++; modified = true; } } } public ConditionalFormatRangeRecord(Record t) { super(t); initialized = false; modified = false; data = getRecord().getData(); }
/** * Inserts a blank row into this spreadsheet. If the row is out of range * of the rows in the sheet, then no action is taken * * @param row the row to insert */
Inserts a blank row into this spreadsheet. If the row is out of range of the rows in the sheet, then no action is taken
insertRow
{ "repo_name": "stefandmn/AREasy", "path": "src/java/org/areasy/common/parser/excel/biff/ConditionalFormatRangeRecord.java", "license": "lgpl-3.0", "size": 7426 }
[ "org.areasy.common.parser.excel.read.biff.Record" ]
import org.areasy.common.parser.excel.read.biff.Record;
import org.areasy.common.parser.excel.read.biff.*;
[ "org.areasy.common" ]
org.areasy.common;
2,273,301
@IgniteSpiConfiguration(optional = true) public TcpDiscoverySpi setAckTimeout(long ackTimeout) { this.ackTimeout = ackTimeout; failureDetectionTimeoutEnabled(false); return this; }
@IgniteSpiConfiguration(optional = true) TcpDiscoverySpi function(long ackTimeout) { this.ackTimeout = ackTimeout; failureDetectionTimeoutEnabled(false); return this; }
/** * Sets timeout for receiving acknowledgement for sent message. * <p> * If acknowledgement is not received within this timeout, sending is considered as failed * and SPI tries to repeat message sending. * <p> * If not specified, default is {@link #DFLT_ACK_TIMEOUT} or {@link #DFLT_ACK_T...
Sets timeout for receiving acknowledgement for sent message. If acknowledgement is not received within this timeout, sending is considered as failed and SPI tries to repeat message sending. If not specified, default is <code>#DFLT_ACK_TIMEOUT</code> or <code>#DFLT_ACK_TIMEOUT_CLIENT</code>. When this property is explic...
setAckTimeout
{ "repo_name": "vadopolski/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java", "license": "apache-2.0", "size": 76666 }
[ "org.apache.ignite.spi.IgniteSpiConfiguration" ]
import org.apache.ignite.spi.IgniteSpiConfiguration;
import org.apache.ignite.spi.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,260,288
public EnumDescriptor findEnumTypeByName (final String name) { final GenericDescriptor result = file.pool.findSymbol (fullName + '.' + name); if (result != null && result instanceof EnumDescriptor) { return (EnumDescriptor) result; } else {...
EnumDescriptor function (final String name) { final GenericDescriptor result = file.pool.findSymbol (fullName + '.' + name); if (result != null && result instanceof EnumDescriptor) { return (EnumDescriptor) result; } else { return null; } } private final int index; private DescriptorProto proto; private final String fu...
/** * Finds a nested enum type by name. * * @param name The unqualified name of the nested type (e.g. "Foo"). * * @return The types's descriptor, or {@code null} if not found. */
Finds a nested enum type by name
findEnumTypeByName
{ "repo_name": "CodeBrig/Beam", "path": "src/com/google/protobuf/Descriptors.java", "license": "mit", "size": 98982 }
[ "com.google.protobuf.DescriptorProtos" ]
import com.google.protobuf.DescriptorProtos;
import com.google.protobuf.*;
[ "com.google.protobuf" ]
com.google.protobuf;
2,567,984
public ServiceFuture<Void> patch500Async(Boolean booleanValue, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(patch500WithServiceResponseAsync(booleanValue), serviceCallback); }
ServiceFuture<Void> function(Boolean booleanValue, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(patch500WithServiceResponseAsync(booleanValue), serviceCallback); }
/** * Return 500 status code, then 200 after retry. * * @param booleanValue Simple boolean value true * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@li...
Return 500 status code, then 200 after retry
patch500Async
{ "repo_name": "veronicagg/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/implementation/HttpRetrysImpl.java", "license": "mit", "size": 42483 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
470,547
public void writeAll(List<String[]> allLines) { for (String[] line : allLines) { writeNext(line); } }
void function(List<String[]> allLines) { for (String[] line : allLines) { writeNext(line); } }
/** * Writes the entire list to a CSV file. The list is assumed to be a * String[] * * @param allLines * a List of String[], with each String[] representing a line of * the file. */
Writes the entire list to a CSV file. The list is assumed to be a String[]
writeAll
{ "repo_name": "CDSteer/cs235steera6", "path": "src/lib/opencsv/CSVWriter.java", "license": "mit", "size": 9085 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
302,716
double pointXMin = coordinates[0].x; double pointXMax = coordinates[0].x; double pointYMin = coordinates[0].y; double pointYMax = coordinates[0].y; for (Point immutablePoint : coordinates) { if (immutablePoint.x < pointXMin) { pointXMin = immutablePoint.x; } else if (immutablePoint.x > pointXMax) {...
double pointXMin = coordinates[0].x; double pointXMax = coordinates[0].x; double pointYMin = coordinates[0].y; double pointYMax = coordinates[0].y; for (Point immutablePoint : coordinates) { if (immutablePoint.x < pointXMin) { pointXMin = immutablePoint.x; } else if (immutablePoint.x > pointXMax) { pointXMax = immutabl...
/** * Calculates the center of the minimum bounding rectangle for the given coordinates. * * @param coordinates * the coordinates for which calculation should be done. * @return the center coordinates of the minimum bounding rectangle. */
Calculates the center of the minimum bounding rectangle for the given coordinates
calculateCenterOfBoundingBox
{ "repo_name": "lfern/mapsforge", "path": "mapsforge-map/src/main/java/org/mapsforge/map/layer/renderer/GeometryUtils.java", "license": "lgpl-3.0", "size": 1876 }
[ "org.mapsforge.core.model.Point" ]
import org.mapsforge.core.model.Point;
import org.mapsforge.core.model.*;
[ "org.mapsforge.core" ]
org.mapsforge.core;
1,131,997
@Override public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) { if (nextAnim != 0) { isAnimated = true; Animation anim = AnimationUtils.loadAnimation(getActivity(), nextAnim); anim.setAnimationListener(animationListener); } return super.onCreateAnimation(trans...
Animation function(int transit, boolean enter, int nextAnim) { if (nextAnim != 0) { isAnimated = true; Animation anim = AnimationUtils.loadAnimation(getActivity(), nextAnim); anim.setAnimationListener(animationListener); } return super.onCreateAnimation(transit, enter, nextAnim); } public Animation.AnimationListener an...
/** * If you animate this fragment, it will show the data when the animation is finished. */
If you animate this fragment, it will show the data when the animation is finished
onCreateAnimation
{ "repo_name": "xamoom/xamoom-android-sdk", "path": "xamoomsdk/src/main/java/com/xamoom/android/xamoomcontentblocks/XamoomContentFragment.java", "license": "mit", "size": 26726 }
[ "android.view.animation.Animation", "android.view.animation.AnimationUtils" ]
import android.view.animation.Animation; import android.view.animation.AnimationUtils;
import android.view.animation.*;
[ "android.view" ]
android.view;
402,608
@Test public void testWeekendType() { assertEquals(FRI_SAT.getWeekendType(), WeekendType.FRIDAY_SATURDAY); assertEquals(SAT_SUN.getWeekendType(), WeekendType.SATURDAY_SUNDAY); }
void function() { assertEquals(FRI_SAT.getWeekendType(), WeekendType.FRIDAY_SATURDAY); assertEquals(SAT_SUN.getWeekendType(), WeekendType.SATURDAY_SUNDAY); }
/** * Tests the weekend type. */
Tests the weekend type
testWeekendType
{ "repo_name": "McLeodMoores/starling", "path": "projects/core/src/test/java/com/opengamma/core/holiday/impl/HolidayWithWeekendAdapterTest.java", "license": "apache-2.0", "size": 6493 }
[ "com.opengamma.core.holiday.WeekendType", "org.testng.Assert" ]
import com.opengamma.core.holiday.WeekendType; import org.testng.Assert;
import com.opengamma.core.holiday.*; import org.testng.*;
[ "com.opengamma.core", "org.testng" ]
com.opengamma.core; org.testng;
757,318
public T elementAtOrDefault(int index, T defaultObject) { if (index >= count() || index < 0) { return defaultObject; } Iterator<T> iterator = iterator(); for (int i = 0; i < count(); i++) { if (i == index) { return iterator.next(); } iterator.next(); ...
T function(int index, T defaultObject) { if (index >= count() index < 0) { return defaultObject; } Iterator<T> iterator = iterator(); for (int i = 0; i < count(); i++) { if (i == index) { return iterator.next(); } iterator.next(); } return defaultObject; }
/** * Returns an element at an index or a default object. * * @param index * the index to get the element. * @param defaultObject * the default object to return if there is no object at the index. * @return an element at an index or a default object */
Returns an element at an index or a default object
elementAtOrDefault
{ "repo_name": "rtenney/jinq", "path": "src/main/java/com/fromnibly/jinq/Enumerable.java", "license": "mit", "size": 11357 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,342,029
void untrackClient(ClientSourceId clientId);
void untrackClient(ClientSourceId clientId);
/** * Deregister a client from being tracked. * * @param clientId a client id */
Deregister a client from being tracked
untrackClient
{ "repo_name": "Terracotta-OSS/terracotta-platform", "path": "client-message-tracker/src/main/java/org/terracotta/client/message/tracker/ClientTracker.java", "license": "apache-2.0", "size": 1183 }
[ "org.terracotta.entity.ClientSourceId" ]
import org.terracotta.entity.ClientSourceId;
import org.terracotta.entity.*;
[ "org.terracotta.entity" ]
org.terracotta.entity;
436,016
protected boolean isVersionNodeRef(NodeRef nodeRef) { return nodeRef.getStoreRef().getProtocol().equals(VersionModel.STORE_PROTOCOL) || nodeRef.getStoreRef().getIdentifier().equals(Version2Model.STORE_ID); }
boolean function(NodeRef nodeRef) { return nodeRef.getStoreRef().getProtocol().equals(VersionModel.STORE_PROTOCOL) nodeRef.getStoreRef().getIdentifier().equals(Version2Model.STORE_ID); }
/** * This methods checks whether the specified nodeRef instance is a version nodeRef (ie. in the 'version' store) * * @param nodeRef - version nodeRef * @return <b>true</b> if version nodeRef <b>false</b> otherwise */
This methods checks whether the specified nodeRef instance is a version nodeRef (ie. in the 'version' store)
isVersionNodeRef
{ "repo_name": "Kast0rTr0y/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/security/permissions/impl/PermissionServiceImpl.java", "license": "lgpl-3.0", "size": 102917 }
[ "org.alfresco.repo.version.Version2Model", "org.alfresco.repo.version.VersionModel", "org.alfresco.service.cmr.repository.NodeRef" ]
import org.alfresco.repo.version.Version2Model; import org.alfresco.repo.version.VersionModel; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.repo.version.*; import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.repo", "org.alfresco.service" ]
org.alfresco.repo; org.alfresco.service;
1,992,535
public static final CustomInterestServiceClient create(CustomInterestServiceSettings settings) throws IOException { return new CustomInterestServiceClient(settings); }
static final CustomInterestServiceClient function(CustomInterestServiceSettings settings) throws IOException { return new CustomInterestServiceClient(settings); }
/** * Constructs an instance of CustomInterestServiceClient, 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 CustomInterestServiceClient, 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": "googleads/google-ads-java", "path": "google-ads-stubs-v9/src/main/java/com/google/ads/googleads/v9/services/CustomInterestServiceClient.java", "license": "apache-2.0", "size": 15399 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,788,480
public static boolean contentHasVisibleContentChildren(Content c){ if (c != null) { try { if( ! c.hasChildren()) { return false; } } catch (TskCoreException ex) { logger.log(Level.SEVERE...
static boolean function(Content c){ if (c != null) { try { if( ! c.hasChildren()) { return false; } } catch (TskCoreException ex) { logger.log(Level.SEVERE, STR + c, ex); return false; } String query = STR + STR + c.getId() + STR + TskData.ObjectType.ARTIFACT.getObjectType() + STR + c.getId() + STR + ARTIFACT_TYPE.TSK_...
/** * Return true if the given content object has children. Useful for lazy * loading. * * @param c The content object to look for children on * @return true if has children */
Return true if the given content object has children. Useful for lazy loading
contentHasVisibleContentChildren
{ "repo_name": "millmanorama/autopsy", "path": "Core/src/org/sleuthkit/autopsy/datamodel/AbstractContentNode.java", "license": "apache-2.0", "size": 7963 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.util.logging.Level", "org.sleuthkit.autopsy.casemodule.Case", "org.sleuthkit.autopsy.casemodule.NoCurrentCaseException", "org.sleuthkit.datamodel.Content", "org.sleuthkit.datamodel.SleuthkitCase", "org.sleuthkit.datamodel.TskCoreException", "org.s...
import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TskC...
import java.sql.*; import java.util.logging.*; import org.sleuthkit.autopsy.casemodule.*; import org.sleuthkit.datamodel.*;
[ "java.sql", "java.util", "org.sleuthkit.autopsy", "org.sleuthkit.datamodel" ]
java.sql; java.util; org.sleuthkit.autopsy; org.sleuthkit.datamodel;
2,771,565
@Override public Pair<Long, Node> findByValue(Node node) { NodeRef nodeRef = node.getNodeRef(); node = selectNodeByNodeRef(nodeRef); if (node != null) { // Lock it to prevent 'accidental' modification node.lo...
Pair<Long, Node> function(Node node) { NodeRef nodeRef = node.getNodeRef(); node = selectNodeByNodeRef(nodeRef); if (node != null) { node.lock(); return new Pair<Long, Node>(node.getId(), node); } else { return null; } } }
/** * Looks the node up based on the NodeRef of the given node */
Looks the node up based on the NodeRef of the given node
findByValue
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java", "license": "lgpl-3.0", "size": 202094 }
[ "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.util.Pair" ]
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.util.Pair;
import org.alfresco.service.cmr.repository.*; import org.alfresco.util.*;
[ "org.alfresco.service", "org.alfresco.util" ]
org.alfresco.service; org.alfresco.util;
2,486,496
@HttpPost public String upload(@Named(FILE_RESPONSE_ID) String responseTag, @Named("file") FileUpload file);
@HttpPost String function(@Named(FILE_RESPONSE_ID) String responseTag, @Named("file") FileUpload file);
/** Upload a file. @param responseTag The identifier to use for notifications in the response for the iframeFormManager.js lib. @param file The file to store. @return A web page with a JS payload notifying the iframeFormManager.js lib that the file was uploaded successfully. */
Upload a file
upload
{ "repo_name": "emily-e/webframework", "path": "src/test/java/net/metanotion/multitenant/MultiTenantTestApp.java", "license": "apache-2.0", "size": 24313 }
[ "javax.inject.Named", "net.metanotion.web.FileUpload", "net.metanotion.web.HttpPost" ]
import javax.inject.Named; import net.metanotion.web.FileUpload; import net.metanotion.web.HttpPost;
import javax.inject.*; import net.metanotion.web.*;
[ "javax.inject", "net.metanotion.web" ]
javax.inject; net.metanotion.web;
28,948
public Observable<ServiceResponse<Page<VaultInner>>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { ...
Observable<ServiceResponse<Page<VaultInner>>> function() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException(STR); }
/** * Fetches all the resources of the specified type in the subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VaultInner&gt; object wrapped in {@link ServiceResponse} if successful. */
Fetches all the resources of the specified type in the subscription
listSinglePageAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultsInner.java", "license": "mit", "size": 50147 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,268,111
public static Optional<String> findMethodName(ASTNode node){ if (node.getNodeType() != ASTNode.METHOD_DECLARATION) return Optional.empty(); return findMethodDeclaration(node) .map(MethodDeclaration::getName) .map(CommonJdt::getSimpleNameIdentifier); }
static Optional<String> function(ASTNode node){ if (node.getNodeType() != ASTNode.METHOD_DECLARATION) return Optional.empty(); return findMethodDeclaration(node) .map(MethodDeclaration::getName) .map(CommonJdt::getSimpleNameIdentifier); }
/** * Returns the name of a method declaration. * * @param node the method declaration node. * @return method's name */
Returns the name of a method declaration
findMethodName
{ "repo_name": "vesperin/mix", "path": "src/main/java/com/vesperin/base/CommonJdt.java", "license": "apache-2.0", "size": 18450 }
[ "java.util.Optional", "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.MethodDeclaration" ]
import java.util.Optional; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.MethodDeclaration;
import java.util.*; import org.eclipse.jdt.core.dom.*;
[ "java.util", "org.eclipse.jdt" ]
java.util; org.eclipse.jdt;
2,342,791
@NonNull public EventId toEventId(@NonNull AccessibilityEvent event) { return new EventId(event.getEventTime(), EVENT_TYPE_ACCESSIBILITY, event.getEventType()); }
EventId function(@NonNull AccessibilityEvent event) { return new EventId(event.getEventTime(), EVENT_TYPE_ACCESSIBILITY, event.getEventType()); }
/** * Constructs an EventId without tracking the event's times. Useful for recreating an id from an * event that was tracked by onEventReceived(), when the event is available but id is not. Try to * use this as little as possible, and instead pass the EventId from onEventReceived(). * * @param event Even...
Constructs an EventId without tracking the event's times. Useful for recreating an id from an event that was tracked by onEventReceived(), when the event is available but id is not. Try to use this as little as possible, and instead pass the EventId from onEventReceived()
toEventId
{ "repo_name": "google/talkback", "path": "utils/src/main/java/com/google/android/accessibility/utils/Performance.java", "license": "apache-2.0", "size": 35910 }
[ "android.view.accessibility.AccessibilityEvent", "androidx.annotation.NonNull" ]
import android.view.accessibility.AccessibilityEvent; import androidx.annotation.NonNull;
import android.view.accessibility.*; import androidx.annotation.*;
[ "android.view", "androidx.annotation" ]
android.view; androidx.annotation;
864,440
@RequestMapping(method = RequestMethod.GET) public @ResponseBody CustomUserResponse getAll( ) { logger.debug("Received request to get all users"); // Retrieve all users from the service List<User> users = userService.getAll(); // Initialize our...
@RequestMapping(method = RequestMethod.GET) @ResponseBody CustomUserResponse function( ) { logger.debug(STR); List<User> users = userService.getAll(); CustomUserResponse response = new CustomUserResponse(); response.setRows(users); response.setRecords( String.valueOf(users.size()) ); response.setPage( "1" ); response.s...
/** * The default method when a request to /users is made. * This essentially retrieves all users, which are wrapped inside a CustomUserResponse object. * The object is automatically converted to JSON when returning back the response. * The @ResponseBody is responsible for this behavior. */
The default method when a request to /users is made. This essentially retrieves all users, which are wrapped inside a CustomUserResponse object. The object is automatically converted to JSON when returning back the response. The @ResponseBody is responsible for this behavior
getAll
{ "repo_name": "Kevin0117rc/Spring-MVC-JQGrid", "path": "src/main/java/com/kevin/controller/UserController.java", "license": "mit", "size": 7215 }
[ "com.kevin.domain.User", "com.kevin.json.CustomUserResponse", "java.util.List", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.springframework.web.bind.annotation.ResponseBody" ]
import com.kevin.domain.User; import com.kevin.json.CustomUserResponse; import java.util.List; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody;
import com.kevin.domain.*; import com.kevin.json.*; import java.util.*; import org.springframework.web.bind.annotation.*;
[ "com.kevin.domain", "com.kevin.json", "java.util", "org.springframework.web" ]
com.kevin.domain; com.kevin.json; java.util; org.springframework.web;
2,794,884
OutputStream saveUploadedFileDetails(final String name, final long size, final String mimeType, final SoftwareModule selectedSw) { File tempFile = null; try { tempFile = File.createTempFile("spUiArtifactUpload", null); // we return the outputstream so we cannot c...
OutputStream saveUploadedFileDetails(final String name, final long size, final String mimeType, final SoftwareModule selectedSw) { File tempFile = null; try { tempFile = File.createTempFile(STR, null); @SuppressWarnings(STR) final OutputStream out = new FileOutputStream(tempFile); final String currentBaseSoftwareModule...
/** * Save uploaded file details. * * @param stream * read from uploaded file * @param name * file name * @param size * file size * @param mimeType * the mimeType of the file * @param selectedSw * @throws IOException...
Save uploaded file details
saveUploadedFileDetails
{ "repo_name": "StBurcher/hawkbit", "path": "hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/upload/UploadLayout.java", "license": "epl-1.0", "size": 34785 }
[ "java.io.File", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStream", "org.eclipse.hawkbit.repository.exception.ArtifactUploadFailedException", "org.eclipse.hawkbit.repository.model.SoftwareModule", "org.eclipse.hawkbit.ui.artifacts.state.CustomFil...
import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import org.eclipse.hawkbit.repository.exception.ArtifactUploadFailedException; import org.eclipse.hawkbit.repository.model.SoftwareModule; import org.eclipse.hawkbit.ui.ar...
import java.io.*; import org.eclipse.hawkbit.repository.exception.*; import org.eclipse.hawkbit.repository.model.*; import org.eclipse.hawkbit.ui.artifacts.state.*; import org.eclipse.hawkbit.ui.utils.*;
[ "java.io", "org.eclipse.hawkbit" ]
java.io; org.eclipse.hawkbit;
294,813
public static void deleteContents(File dir) throws IOException { File[] files = dir.listFiles(); if (files == null) { throw new IOException("not a readable directory: " + dir); } for (File file : files) { if (file.isDirectory()) { deleteContent...
static void function(File dir) throws IOException { File[] files = dir.listFiles(); if (files == null) { throw new IOException(STR + dir); } for (File file : files) { if (file.isDirectory()) { deleteContents(file); } if (!file.delete()) { throw new IOException(STR + file); } } }
/** * Deletes the contents of {@code dir}. Throws an IOException if any file * could not be deleted, or if {@code dir} is not a readable directory. */
Deletes the contents of dir. Throws an IOException if any file could not be deleted, or if dir is not a readable directory
deleteContents
{ "repo_name": "small-dream/AndroidDemos", "path": "app/src/main/java/com/jx/androiddemos/diskCache/disklrucache/Util.java", "license": "apache-2.0", "size": 3328 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
173,623
private void testSpill(long maxMem, long numPartitions, long minBatches, int maxParallel, boolean fallback, boolean predict, String sql, long expectedRows, int cycle, int fromPart, int toPart) throws Exception { ClusterFixtureBuilder builder = ClusterFixture.builder(dirTestWatcher...
void function(long maxMem, long numPartitions, long minBatches, int maxParallel, boolean fallback, boolean predict, String sql, long expectedRows, int cycle, int fromPart, int toPart) throws Exception { ClusterFixtureBuilder builder = ClusterFixture.builder(dirTestWatcher) .sessionOption(ExecConstants.HASHAGG_MAX_MEMOR...
/** * A template for Hash Aggr spilling tests * * @throws Exception */
A template for Hash Aggr spilling tests
testSpill
{ "repo_name": "cchang738/drill", "path": "exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/agg/TestHashAggrSpill.java", "license": "apache-2.0", "size": 6954 }
[ "org.apache.drill.exec.ExecConstants", "org.apache.drill.exec.planner.physical.PlannerSettings", "org.apache.drill.test.ClientFixture", "org.apache.drill.test.ClusterFixture", "org.apache.drill.test.ClusterFixtureBuilder" ]
import org.apache.drill.exec.ExecConstants; import org.apache.drill.exec.planner.physical.PlannerSettings; import org.apache.drill.test.ClientFixture; import org.apache.drill.test.ClusterFixture; import org.apache.drill.test.ClusterFixtureBuilder;
import org.apache.drill.exec.*; import org.apache.drill.exec.planner.physical.*; import org.apache.drill.test.*;
[ "org.apache.drill" ]
org.apache.drill;
490,933
public Map<String, String> getPendingStateMap(String resourceName, Partition partition) { if (_pendingStateMap.containsKey(resourceName)) { Map<Partition, Map<String, String>> map = _pendingStateMap.get(resourceName); if (map.containsKey(partition)) { return map.get(partition); } } ...
Map<String, String> function(String resourceName, Partition partition) { if (_pendingStateMap.containsKey(resourceName)) { Map<Partition, Map<String, String>> map = _pendingStateMap.get(resourceName); if (map.containsKey(partition)) { return map.get(partition); } } return Collections.emptyMap(); }
/** * given (resource, partition), returns (instance->toState) map * @param resourceName * @param partition * @return */
given (resource, partition), returns (instance->toState) map
getPendingStateMap
{ "repo_name": "Teino1978-Corp/Teino1978-Corp-helix", "path": "helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateOutput.java", "license": "apache-2.0", "size": 5890 }
[ "java.util.Collections", "java.util.Map", "org.apache.helix.model.Partition" ]
import java.util.Collections; import java.util.Map; import org.apache.helix.model.Partition;
import java.util.*; import org.apache.helix.model.*;
[ "java.util", "org.apache.helix" ]
java.util; org.apache.helix;
2,021,268
public void runBenchmark() throws Exception { System.out.print(HORIZONTAL_RULE); System.out.println(" Setup & Initialization"); System.out.println(HORIZONTAL_RULE); // connect to one or more servers, loop until success connect(config.servers); // initialize using sy...
void function() throws Exception { System.out.print(HORIZONTAL_RULE); System.out.println(STR); System.out.println(HORIZONTAL_RULE); connect(config.servers); System.out.println(STR); final PreparedStatement initializeCS = client .prepareCall(STR); initializeCS.setInt(1, config.contestants); initializeCS.setString(2, CON...
/** * Core benchmark code. Connect. Initialize. Run the loop. Cleanup. Print * Results. * * @throws Exception * if anything unexpected happens. */
Core benchmark code. Connect. Initialize. Run the loop. Cleanup. Print Results
runBenchmark
{ "repo_name": "deerwalk/voltdb", "path": "examples/voter/client/voter/JDBCBenchmark.java", "license": "agpl-3.0", "size": 18374 }
[ "java.sql.PreparedStatement" ]
import java.sql.PreparedStatement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,500,308
public void executeAllTimerBehaviors(final MarkupContainer page) { // execute all timer behaviors for the page itself internalExecuteAllTimerBehaviors(page);
void function(final MarkupContainer page) { internalExecuteAllTimerBehaviors(page);
/** * Simulates the firing of all ajax timer behaviors on the page * * @param page * the page which timers will be executed */
Simulates the firing of all ajax timer behaviors on the page
executeAllTimerBehaviors
{ "repo_name": "Servoy/wicket", "path": "wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java", "license": "apache-2.0", "size": 48419 }
[ "org.apache.wicket.MarkupContainer" ]
import org.apache.wicket.MarkupContainer;
import org.apache.wicket.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,739,207
boolean addCustomEffect(PotionEffect effect, boolean overwrite);
boolean addCustomEffect(PotionEffect effect, boolean overwrite);
/** * Adds a custom potion effect to this potion. * * @param effect the potion effect to add * @param overwrite true if any existing effect of the same type should be overwritten * @return true if the potion meta changed as a result of this call */
Adds a custom potion effect to this potion
addCustomEffect
{ "repo_name": "XKnucklesX/Offit", "path": "src/org/Offit/inventory/meta/PotionMeta.java", "license": "gpl-2.0", "size": 2210 }
[ "org.bukkit.potion.PotionEffect" ]
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.*;
[ "org.bukkit.potion" ]
org.bukkit.potion;
2,087,337
@ApiModelProperty(example = "null", required = true, value = "") public SalesCalculatedTaxSummaryForService getCalculatedTaxSummary() { return calculatedTaxSummary; }
@ApiModelProperty(example = "null", required = true, value = "") SalesCalculatedTaxSummaryForService function() { return calculatedTaxSummary; }
/** * Get calculatedTaxSummary * @return calculatedTaxSummary **/
Get calculatedTaxSummary
getCalculatedTaxSummary
{ "repo_name": "Avalara/avataxbr-clients", "path": "java-client/src/main/java/io/swagger/client/model/TransactionForAbrasf.java", "license": "gpl-3.0", "size": 4784 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,931,158
public void setByte(int parameterIndex, byte x) throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_setByte].methodEntry(); if (JdbcDebugCfg.traceActive) debug[methodId_setByte].methodParameters(Integer .toString(parameterIndex) + "," + Byte.toString(x)); try { int dataType; ...
void function(int parameterIndex, byte x) throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_setByte].methodEntry(); if (JdbcDebugCfg.traceActive) debug[methodId_setByte].methodParameters(Integer .toString(parameterIndex) + "," + Byte.toString(x)); try { int dataType; validateSetInvocation(parameterInde...
/** * Set a parameter to a Java byte value. The driver converts this to a SQL * <tt>TINYINT</tt> value when it sends it to the database. * * @param parameterIndex * the first parameter is 1... * @param x * the parameter value * @exception java.sql.SQLException * in...
Set a parameter to a Java byte value. The driver converts this to a SQL TINYINT value when it sends it to the database
setByte
{ "repo_name": "apache/incubator-trafodion", "path": "core/conn/jdbc_type2/src/main/java/org/apache/trafodion/jdbc/t2/SQLMXPreparedStatement.java", "license": "apache-2.0", "size": 183561 }
[ "java.sql.SQLException", "java.sql.Types" ]
import java.sql.SQLException; import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
828,236
private void prepareSubSection(JCas jcas, JFSIndexRepository indexes, Set subSectionIndSet) throws Exception { List sortedSubSecInds = sortSubSectionInd(subSectionIndSet.toArray()); for (int i = 0, endBodyOffset = 0; i < sortedSubSecInds.size(); i++, endBodyOffset = 0) { SubSectionIndicator ssi = (Su...
void function(JCas jcas, JFSIndexRepository indexes, Set subSectionIndSet) throws Exception { List sortedSubSecInds = sortSubSectionInd(subSectionIndSet.toArray()); for (int i = 0, endBodyOffset = 0; i < sortedSubSecInds.size(); i++, endBodyOffset = 0) { SubSectionIndicator ssi = (SubSectionIndicator) sortedSubSecInds....
/** * Given the set of subSectionInds to parse (via SubSectionIndicatorFSM) * create SubSectionAnnotation This method created SubsectionAnnotation and * sets the header begin, end as well as body begin and end * * @param jcas * @param indexes * @param subSectionIndSet * @throws Exception */
Given the set of subSectionInds to parse (via SubSectionIndicatorFSM) create SubSectionAnnotation This method created SubsectionAnnotation and sets the header begin, end as well as body begin and end
prepareSubSection
{ "repo_name": "TCU-MI/ctakes", "path": "ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java", "license": "apache-2.0", "size": 144951 }
[ "java.util.List", "java.util.Set", "org.apache.ctakes.drugner.fsm.output.util.SubSectionIndicator", "org.apache.ctakes.drugner.type.SubSectionAnnotation", "org.apache.ctakes.typesystem.type.textspan.Segment", "org.apache.uima.jcas.JCas", "org.apache.uima.jcas.JFSIndexRepository" ]
import java.util.List; import java.util.Set; import org.apache.ctakes.drugner.fsm.output.util.SubSectionIndicator; import org.apache.ctakes.drugner.type.SubSectionAnnotation; import org.apache.ctakes.typesystem.type.textspan.Segment; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JFSIndexRepository;
import java.util.*; import org.apache.ctakes.drugner.fsm.output.util.*; import org.apache.ctakes.drugner.type.*; import org.apache.ctakes.typesystem.type.textspan.*; import org.apache.uima.jcas.*;
[ "java.util", "org.apache.ctakes", "org.apache.uima" ]
java.util; org.apache.ctakes; org.apache.uima;
1,825,390
public void setMarkedBySearch(boolean tagged) { if (this.markedBySearch == tagged) { return; } this.markedBySearch = tagged; List<JMeterTreeNode> nodesToParent = getPathToThreadGroup(); for (JMeterTreeNode jMeterTreeNode : nodesToParent) { // Ignore me...
void function(boolean tagged) { if (this.markedBySearch == tagged) { return; } this.markedBySearch = tagged; List<JMeterTreeNode> nodesToParent = getPathToThreadGroup(); for (JMeterTreeNode jMeterTreeNode : nodesToParent) { if(jMeterTreeNode != this) { jMeterTreeNode.setChildrenNodesHaveMatched(true); } } treeModel.ifP...
/** * Tag Node as result of a search * @param tagged The flag to be used for tagging */
Tag Node as result of a search
setMarkedBySearch
{ "repo_name": "ufctester/apache-jmeter", "path": "src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java", "license": "apache-2.0", "size": 7378 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,190,209
public void run() { this.lsnUpdate.iterationUpdate(this.cntIter, this.dblError, this.dblAlpha); } } private class MomentVectorBuffer extends HashMap<PHASEPLANE, LinearBuffer<Matrix>> { private static final long serialVersionUID =...
void function() { this.lsnUpdate.iterationUpdate(this.cntIter, this.dblError, this.dblAlpha); } } private class MomentVectorBuffer extends HashMap<PHASEPLANE, LinearBuffer<Matrix>> { private static final long serialVersionUID = 1L; public MomentVectorBuffer() { for ( PHASEPLANE plane : PHASEPLANE.values() ) { int cntSi...
/** * Calls the listener's update method. * * @see java.lang.Thread#run() * * @author Christopher K. Allen * @since Oct 22, 2014 */
Calls the listener's update method
run
{ "repo_name": "luxiaohan/openxal-csns-luxh", "path": "extensions/twissobserver/src/xal/extension/twissobserver/CsFixedPtEstimator.java", "license": "bsd-3-clause", "size": 29622 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,066,927
public Map<String, InventoryTO> getAdvicedAmount(Client c, Lot lot, ItemData idat, Map<String, InventoryTO> result, boolean consolidateLot) { String key; InventoryTO inv; List<AdviseLotResult> ads; ads = getAdviseLotInv(c, lot, idat); for (AdviseLotResult r : ads) { key = getKey(r.articl...
Map<String, InventoryTO> function(Client c, Lot lot, ItemData idat, Map<String, InventoryTO> result, boolean consolidateLot) { String key; InventoryTO inv; List<AdviseLotResult> ads; ads = getAdviseLotInv(c, lot, idat); for (AdviseLotResult r : ads) { key = getKey(r.articleRef, r.lotRef, consolidateLot); if ((inv = (In...
/** * Current Amount of adviced goods * * @param c * @param lot * @param idat * @return */
Current Amount of adviced goods
getAdvicedAmount
{ "repo_name": "tedvals/mywms", "path": "server.app/los.inventory-ejb/src/de/linogistix/los/inventory/businessservice/InventoryBusinessBean.java", "license": "gpl-3.0", "size": 19104 }
[ "java.math.BigDecimal", "java.util.List", "java.util.Map", "org.mywms.model.Client", "org.mywms.model.ItemData", "org.mywms.model.Lot" ]
import java.math.BigDecimal; import java.util.List; import java.util.Map; import org.mywms.model.Client; import org.mywms.model.ItemData; import org.mywms.model.Lot;
import java.math.*; import java.util.*; import org.mywms.model.*;
[ "java.math", "java.util", "org.mywms.model" ]
java.math; java.util; org.mywms.model;
2,018,105
@Override public Response apisCopyApiPost(String newVersion, String apiId) { URI newVersionedApiUri; APIDetailedDTO newVersionedApi; try { APIProvider apiProvider = RestApiUtil.getLoggedInUserProvider(); String tenantDomain = RestApiUtil.getLoggedInUserTenantDomai...
Response function(String newVersion, String apiId) { URI newVersionedApiUri; APIDetailedDTO newVersionedApi; try { APIProvider apiProvider = RestApiUtil.getLoggedInUserProvider(); String tenantDomain = RestApiUtil.getLoggedInUserTenantDomain(); API api = APIMappingUtil.getAPIFromApiIdOrUUID(apiId, tenantDomain); APIIde...
/** * Copy API and create a new version of the API * * @param apiId API Identifier * @param newVersion new version of the API to be created * @return API new version */
Copy API and create a new version of the API
apisCopyApiPost
{ "repo_name": "pubudu538/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/impl/ApisApiServiceImpl.java", "license": "apache-2.0", "size": 106588 }
[ "java.net.URISyntaxException", "javax.ws.rs.core.Response", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.APIProvider", "org.wso2.carbon.apimgt.api.model.APIIdentifier", "org.wso2.carbon.apimgt.api.model.DuplicateAPIException", "org.wso2.carbon.apimgt.rest.api.publishe...
import java.net.URISyntaxException; import javax.ws.rs.core.Response; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.api.model.DuplicateAPIException; import org.wso2.carbon.apim...
import java.net.*; import javax.ws.rs.core.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.rest.api.publisher.dto.*; import org.wso2.carbon.apimgt.rest.api.publisher.utils.mappings.*; import org.wso2.carbon.apimgt.rest.api.util.*; import org.wso2.carbon.a...
[ "java.net", "javax.ws", "org.wso2.carbon" ]
java.net; javax.ws; org.wso2.carbon;
685,286
@Test public void testExecution() throws UnsupportedEncodingException { // Input: -exec-run GdbMiParser parser = new GdbMiParser(); { String messageStr = "^running\r\n(gdb)\r\n"; parser.process(messageStr.getBytes("US-ASCII")); List<GdbMiRecord> records = parser.getRecords(); Assert.assertNotNul...
void function() throws UnsupportedEncodingException { GdbMiParser parser = new GdbMiParser(); { String messageStr = STR; parser.process(messageStr.getBytes(STR)); List<GdbMiRecord> records = parser.getRecords(); Assert.assertNotNull(records); Assert.assertEquals(records.size(), 1); GdbMiRecord record = records.get(0); ...
/** * Tests the handling of messages from a typical execution sequence. */
Tests the handling of messages from a typical execution sequence
testExecution
{ "repo_name": "consulo/consulo-gdb", "path": "src/test/java/uk/co/cwspencer/gdb/gdbmi/TestGdbMiParser.java", "license": "apache-2.0", "size": 23098 }
[ "java.io.UnsupportedEncodingException", "java.util.List", "org.junit.Assert" ]
import java.io.UnsupportedEncodingException; import java.util.List; import org.junit.Assert;
import java.io.*; import java.util.*; import org.junit.*;
[ "java.io", "java.util", "org.junit" ]
java.io; java.util; org.junit;
362,342
public void setOrientation(int orientation, Size screenSize) { this.orientation = orientation; this.sizeInPixels = screenSize; dotTargets = buildDotTargets(screenSize); // Cancel calibration. twoStepCalibrationState = NONE; }
void function(int orientation, Size screenSize) { this.orientation = orientation; this.sizeInPixels = screenSize; dotTargets = buildDotTargets(screenSize); twoStepCalibrationState = NONE; }
/** * Sets orientation of BrailleInputPlane * * @param orientation the orientation of the view * @param screenSize used as the height and width of the canvas */
Sets orientation of BrailleInputPlane
setOrientation
{ "repo_name": "google/talkback", "path": "brailleime/src/phone/java/com/google/android/accessibility/brailleime/input/BrailleInputPlane.java", "license": "apache-2.0", "size": 23377 }
[ "android.util.Size" ]
import android.util.Size;
import android.util.*;
[ "android.util" ]
android.util;
164,257
return SimpleListExtension.URI; }
return SimpleListExtension.URI; }
/** * Returns the namespace URI this generator handles. * <p> * * @return the namespace URI. */
Returns the namespace URI this generator handles.
getNamespaceUri
{ "repo_name": "IgnacioDomingo/rome-modules", "path": "src/main/java/com/rometools/modules/sle/io/ModuleGenerator.java", "license": "apache-2.0", "size": 4912 }
[ "com.rometools.modules.sle.SimpleListExtension" ]
import com.rometools.modules.sle.SimpleListExtension;
import com.rometools.modules.sle.*;
[ "com.rometools.modules" ]
com.rometools.modules;
762,994
private ResultPointsAndTransitions transitionsBetween(ResultPoint from, ResultPoint to) { // See QR Code Detector, sizeOfBlackWhiteBlackRun() int fromX = (int) from.getX(); int fromY = (int) from.getY(); int toX = (int) to.getX(); int toY = (int) to.getY(); boolean steep = Math.abs(toY - fromY...
ResultPointsAndTransitions function(ResultPoint from, ResultPoint to) { int fromX = (int) from.getX(); int fromY = (int) from.getY(); int toX = (int) to.getX(); int toY = (int) to.getY(); boolean steep = Math.abs(toY - fromY) > Math.abs(toX - fromX); if (steep) { int temp = fromX; fromX = fromY; fromY = temp; temp = to...
/** * Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. */
Counts the number of black/white transitions between two points, using something like Bresenham's algorithm
transitionsBetween
{ "repo_name": "tempredirect/zxing", "path": "core/src/com/google/zxing/datamatrix/detector/Detector.java", "license": "apache-2.0", "size": 16266 }
[ "com.google.zxing.ResultPoint" ]
import com.google.zxing.ResultPoint;
import com.google.zxing.*;
[ "com.google.zxing" ]
com.google.zxing;
2,065,449
// create a problematic file name in the workspace FreeStyleProject p = j.createFreeStyleProject(); if(Functions.isWindows()) p.getBuildersList().add(new BatchFile("echo > abc..def")); else p.getBuildersList().add(new Shell("touch abc..def")); p.scheduleBuild2(0)....
FreeStyleProject p = j.createFreeStyleProject(); if(Functions.isWindows()) p.getBuildersList().add(new BatchFile(STR)); else p.getBuildersList().add(new Shell(STR)); p.scheduleBuild2(0).get(); j.createWebClient().goTo("job/"+p.getName()+STR,STR); }
/** * Double dots that appear in file name is OK. */
Double dots that appear in file name is OK
doubleDots
{ "repo_name": "escoem/jenkins", "path": "test/src/test/java/hudson/model/DirectoryBrowserSupportTest.java", "license": "mit", "size": 9196 }
[ "hudson.tasks.BatchFile", "hudson.tasks.Shell" ]
import hudson.tasks.BatchFile; import hudson.tasks.Shell;
import hudson.tasks.*;
[ "hudson.tasks" ]
hudson.tasks;
316,773
public java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.NaturalHLAPI> getInput_integers_NaturalHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.NaturalHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.NaturalHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass(...
java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.NaturalHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.NaturalHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.NaturalHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.integers.imp...
/** * This accessor return a list of encapsulated subelement, only of NaturalHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of NaturalHLAPI kind. WARNING : this method can creates a lot of new object in memory
getInput_integers_NaturalHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/GreaterThanHLAPI.java", "license": "epl-1.0", "size": 108533 }
[ "fr.lip6.move.pnml.hlpn.terms.Sort", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Sort; 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;
1,394,619
public void setFetchSize(int rows) throws SQLException { try { setPoolable(false); _stmt.setFetchSize(rows); } catch (RuntimeException e) { killPool(); throw e; } catch (SQLException e) { killPool(); throw e; } }
void function(int rows) throws SQLException { try { setPoolable(false); _stmt.setFetchSize(rows); } catch (RuntimeException e) { killPool(); throw e; } catch (SQLException e) { killPool(); throw e; } }
/** * Sets the fetch size. */
Sets the fetch size
setFetchSize
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/sql/UserStatement.java", "license": "gpl-2.0", "size": 15664 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
870,256
private HttpRequest copy(HttpRequest original) { if (original instanceof DefaultFullHttpRequest) { ByteBuf content = ((DefaultFullHttpRequest) original).content(); return new DefaultFullHttpRequest(original.getProtocolVersion(), original.getMethod(), original...
HttpRequest function(HttpRequest original) { if (original instanceof DefaultFullHttpRequest) { ByteBuf content = ((DefaultFullHttpRequest) original).content(); return new DefaultFullHttpRequest(original.getProtocolVersion(), original.getMethod(), original.getUri(), content); } else { return new DefaultHttpRequest(origi...
/** * Copy the given {@link HttpRequest} verbatim. * * @param original * @return */
Copy the given <code>HttpRequest</code> verbatim
copy
{ "repo_name": "mwaylabs/LittleProxy", "path": "src/main/java/org/littleshoot/proxy/impl/ClientToProxyConnection.java", "license": "apache-2.0", "size": 55679 }
[ "io.netty.buffer.ByteBuf", "io.netty.handler.codec.http.DefaultFullHttpRequest", "io.netty.handler.codec.http.DefaultHttpRequest", "io.netty.handler.codec.http.HttpRequest" ]
import io.netty.buffer.ByteBuf; import io.netty.handler.codec.http.DefaultFullHttpRequest; import io.netty.handler.codec.http.DefaultHttpRequest; import io.netty.handler.codec.http.HttpRequest;
import io.netty.buffer.*; import io.netty.handler.codec.http.*;
[ "io.netty.buffer", "io.netty.handler" ]
io.netty.buffer; io.netty.handler;
1,393,384
public void dispatchFindRequest(int maxNum) { synchronized(desiredProviders) { desired = maxNum; desiredProviders.clear(); desiredProviders.addAll(providers); } for (ContentProvider provider : desiredProviders) { provider.findContentShares(ma...
void function(int maxNum) { synchronized(desiredProviders) { desired = maxNum; desiredProviders.clear(); desiredProviders.addAll(providers); } for (ContentProvider provider : desiredProviders) { provider.findContentShares(maxNum, this); } }
/** * Initiates a <code>findContentShares</code> call on each of the providers. * * @param maxNum maximum number of result shares to return */
Initiates a <code>findContentShares</code> call on each of the providers
dispatchFindRequest
{ "repo_name": "johnjianfang/jxse", "path": "src/main/java/net/jxta/impl/content/EventAggregator.java", "license": "apache-2.0", "size": 8850 }
[ "net.jxta.content.ContentProvider" ]
import net.jxta.content.ContentProvider;
import net.jxta.content.*;
[ "net.jxta.content" ]
net.jxta.content;
1,874,435
protected void rehash() { Entry[] oldTable = table; table = new Entry[oldTable.length * 2 + 1]; for (int i = oldTable.length-1; i >= 0; i--) { for (Entry old = oldTable[i]; old != null;) { Entry e = old; old = old.next; int index...
void function() { Entry[] oldTable = table; table = new Entry[oldTable.length * 2 + 1]; for (int i = oldTable.length-1; i >= 0; i--) { for (Entry old = oldTable[i]; old != null;) { Entry e = old; old = old.next; int index = e.hash % table.length; e.next = table[index]; table[index] = e; } } } protected static class Ent...
/** * Rehashes the table. */
Rehashes the table
rehash
{ "repo_name": "sflyphotobooks/crp-batik", "path": "sources/org/apache/batik/dom/util/IntTable.java", "license": "apache-2.0", "size": 7752 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
1,343,187
public void expireSession(ZKWatcher nodeZK, boolean checkStatus) throws Exception { Configuration c = new Configuration(this.conf); String quorumServers = ZKConfig.getZKQuorumServersString(c); ZooKeeper zk = nodeZK.getRecoverableZooKeeper().getZooKeeper(); byte[] password = zk.getSessionPasswd(); ...
void function(ZKWatcher nodeZK, boolean checkStatus) throws Exception { Configuration c = new Configuration(this.conf); String quorumServers = ZKConfig.getZKQuorumServersString(c); ZooKeeper zk = nodeZK.getRecoverableZooKeeper().getZooKeeper(); byte[] password = zk.getSessionPasswd(); long sessionID = zk.getSessionId()...
/** * Expire a ZooKeeper session as recommended in ZooKeeper documentation * http://hbase.apache.org/book.html#trouble.zookeeper * There are issues when doing this: * [1] http://www.mail-archive.com/dev@zookeeper.apache.org/msg01942.html * [2] https://issues.apache.org/jira/browse/ZOOKEEPER-1105 * ...
Expire a ZooKeeper session as recommended in ZooKeeper documentation HREF There are issues when doing this: [1] HREF [2] HREF
expireSession
{ "repo_name": "francisliu/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 169730 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.zookeeper.ZKConfig", "org.apache.hadoop.hbase.zookeeper.ZKWatcher", "org.apache.zookeeper.ZooKeeper" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.zookeeper.ZKConfig; import org.apache.hadoop.hbase.zookeeper.ZKWatcher; import org.apache.zookeeper.ZooKeeper;
import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.zookeeper.*; import org.apache.zookeeper.*;
[ "org.apache.hadoop", "org.apache.zookeeper" ]
org.apache.hadoop; org.apache.zookeeper;
1,283,449
@Override public List<Keyword> getExitKeywords(){ return exitKeywords; }
List<Keyword> function(){ return exitKeywords; }
/** * Returns the exit functions (the ones that signal we're ready to move on to the next stage). * * @return the exit functions (the ones that signal we're ready to move on to the next stage). */
Returns the exit functions (the ones that signal we're ready to move on to the next stage)
getExitKeywords
{ "repo_name": "ersh112356/ConversationEngine", "path": "src/engine/model/datamodel/impl/DataModel.java", "license": "gpl-3.0", "size": 4363 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,022,894
public ArrayList<JobMessage> getJobMessages( String jobId, long startTimestampMs) throws IOException { // TODO: Allow filtering messages by importance Instant startTimestamp = new Instant(startTimestampMs); ArrayList<JobMessage> allMessages = new ArrayList<>(); String pageToken = null; while...
ArrayList<JobMessage> function( String jobId, long startTimestampMs) throws IOException { Instant startTimestamp = new Instant(startTimestampMs); ArrayList<JobMessage> allMessages = new ArrayList<>(); String pageToken = null; while (true) { Messages.List listRequest = messagesClient.list(projectId, jobId); if (pageToke...
/** * Return job messages sorted in ascending order by timestamp. * @param jobId The id of the job to get the messages for. * @param startTimestampMs Return only those messages with a * timestamp greater than this value. * @return collection of messages * @throws IOException */
Return job messages sorted in ascending order by timestamp
getJobMessages
{ "repo_name": "nagachika/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/util/MonitoringUtil.java", "license": "apache-2.0", "size": 8081 }
[ "com.google.api.services.dataflow.Dataflow", "com.google.api.services.dataflow.model.JobMessage", "com.google.api.services.dataflow.model.ListJobMessagesResponse", "com.google.cloud.dataflow.sdk.util.TimeUtil", "java.io.IOException", "java.util.ArrayList", "java.util.Collections", "java.util.List", ...
import com.google.api.services.dataflow.Dataflow; import com.google.api.services.dataflow.model.JobMessage; import com.google.api.services.dataflow.model.ListJobMessagesResponse; import com.google.cloud.dataflow.sdk.util.TimeUtil; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; imp...
import com.google.api.services.dataflow.*; import com.google.api.services.dataflow.model.*; import com.google.cloud.dataflow.sdk.util.*; import java.io.*; import java.util.*; import javax.annotation.*; import org.joda.time.*;
[ "com.google.api", "com.google.cloud", "java.io", "java.util", "javax.annotation", "org.joda.time" ]
com.google.api; com.google.cloud; java.io; java.util; javax.annotation; org.joda.time;
2,139,375
public void addSecondLayoutFillerView(View child) { mFillerLayoutTwo.addView(child); }
void function(View child) { mFillerLayoutTwo.addView(child); }
/** * Adds a view to the second inner layout, below the first inner layout. * * @param child * The view to add to the second inner layout. */
Adds a view to the second inner layout, below the first inner layout
addSecondLayoutFillerView
{ "repo_name": "ValentinMinder/pocketcampus", "path": "platform/android/src/main/java/org/pocketcampus/platform/android/ui/layout/StandardTitledDoubleLayout.java", "license": "bsd-3-clause", "size": 3890 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,825,945
@Generated @Selector("fillWithBlendMode:alpha:") public native void fillWithBlendModeAlpha(int blendMode, @NFloat double alpha);
@Selector(STR) native void function(int blendMode, @NFloat double alpha);
/** * These methods do not affect the blend mode or alpha of the current graphics context */
These methods do not affect the blend mode or alpha of the current graphics context
fillWithBlendModeAlpha
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UIBezierPath.java", "license": "apache-2.0", "size": 12602 }
[ "org.moe.natj.general.ann.NFloat", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.NFloat; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,139,392
protected final List<String> generateDestinationFilenames(int numFiles) { List<String> destFilenames = new ArrayList<>(); String extension = getSink().extension; String baseOutputFilename = getSink().baseOutputFilename; String fileNamingTemplate = getSink().fileNamingTemplate; String ...
final List<String> function(int numFiles) { List<String> destFilenames = new ArrayList<>(); String extension = getSink().extension; String baseOutputFilename = getSink().baseOutputFilename; String fileNamingTemplate = getSink().fileNamingTemplate; String suffix = getFileExtension(extension); for (int i = 0; i < numFile...
/** * Generate output bundle filenames. */
Generate output bundle filenames
generateDestinationFilenames
{ "repo_name": "yafengguo/Apache-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileBasedSink.java", "license": "apache-2.0", "size": 25989 }
[ "com.google.common.base.Preconditions", "java.util.ArrayList", "java.util.HashSet", "java.util.List", "org.apache.beam.sdk.util.IOChannelUtils" ]
import com.google.common.base.Preconditions; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import org.apache.beam.sdk.util.IOChannelUtils;
import com.google.common.base.*; import java.util.*; import org.apache.beam.sdk.util.*;
[ "com.google.common", "java.util", "org.apache.beam" ]
com.google.common; java.util; org.apache.beam;
516,882
public int countSentences(int aid) throws SQLException { if (this.con_ == null) { log_.severe("Connetion object null"); throw new SQLException("Connection object not set."); } String sql = "select count(*) from T_Sentences where F_Article=?"; int result = 0; PreparedStatement stmt = null; Result...
int function(int aid) throws SQLException { if (this.con_ == null) { log_.severe(STR); throw new SQLException(STR); } String sql = STR; int result = 0; PreparedStatement stmt = null; ResultSet rs = null; try { stmt = con_.prepareStatement(sql); stmt.setInt(1,aid); rs = stmt.executeQuery(); if (rs.next()) { result = rs....
/** * Count the number of sentences for this article * * @param aid - int */
Count the number of sentences for this article
countSentences
{ "repo_name": "tedwen/transmem", "path": "src/com/transmem/data/db/Articles.java", "license": "apache-2.0", "size": 15798 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,557,707
public CmsAssetTemplate findByName(Delegator delegator, String name, String webSiteId, boolean webSiteIdOptional, boolean useCache, HttpServletRequest request) throws CmsException { boolean useGlobalCache = isUseGlobalObjCacheStatic(useCache); CmsObjectCache<CmsAssetTemplate> cache = nul...
CmsAssetTemplate function(Delegator delegator, String name, String webSiteId, boolean webSiteIdOptional, boolean useCache, HttpServletRequest request) throws CmsException { boolean useGlobalCache = isUseGlobalObjCacheStatic(useCache); CmsObjectCache<CmsAssetTemplate> cache = null; if (useGlobalCache) { cache = nameCach...
/** * Finds by name and optional webSiteId. * NOTE: if no webSiteId passed, it preferentially returns the records having no webSiteId. */
Finds by name and optional webSiteId
findByName
{ "repo_name": "ilscipio/scipio-erp", "path": "applications/cms/src/com/ilscipio/scipio/cms/template/CmsAssetTemplate.java", "license": "apache-2.0", "size": 29298 }
[ "com.ilscipio.scipio.cms.CmsException", "com.ilscipio.scipio.cms.control.CmsControlUtil", "com.ilscipio.scipio.cms.data.CmsObjectCache", "javax.servlet.http.HttpServletRequest", "org.ofbiz.entity.Delegator" ]
import com.ilscipio.scipio.cms.CmsException; import com.ilscipio.scipio.cms.control.CmsControlUtil; import com.ilscipio.scipio.cms.data.CmsObjectCache; import javax.servlet.http.HttpServletRequest; import org.ofbiz.entity.Delegator;
import com.ilscipio.scipio.cms.*; import com.ilscipio.scipio.cms.control.*; import com.ilscipio.scipio.cms.data.*; import javax.servlet.http.*; import org.ofbiz.entity.*;
[ "com.ilscipio.scipio", "javax.servlet", "org.ofbiz.entity" ]
com.ilscipio.scipio; javax.servlet; org.ofbiz.entity;
941,016
private static IData[] normalize(IData[] errors) { return normalize(errors, null); }
static IData[] function(IData[] errors) { return normalize(errors, null); }
/** * Normalize the errors array to include the key as well as the error message. * * @param errors The errors to normalize. * @return The normalized errors. */
Normalize the errors array to include the key as well as the error message
normalize
{ "repo_name": "Permafrost/Tundra.java", "path": "src/main/java/permafrost/tundra/content/ValidationHelper.java", "license": "mit", "size": 13233 }
[ "com.wm.data.IData" ]
import com.wm.data.IData;
import com.wm.data.*;
[ "com.wm.data" ]
com.wm.data;
2,489,164
EList<ModifyComponent<Component>> getComponentModifications();
EList<ModifyComponent<Component>> getComponentModifications();
/** * Returns the value of the '<em><b>Component Modifications</b></em>' containment reference list. * The list contents are of type {@link edu.kit.ipd.sdq.kamp4aps.model.KAMP4aPSModificationmarks.ModifyComponent}<code>&lt;edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository.Component&gt;</code>. * <!-- begi...
Returns the value of the 'Component Modifications' containment reference list. The list contents are of type <code>edu.kit.ipd.sdq.kamp4aps.model.KAMP4aPSModificationmarks.ModifyComponent</code><code>&lt;edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository.Component&gt;</code>. If the meaning of the 'Component Modifi...
getComponentModifications
{ "repo_name": "KAMP-Research/KAMP4APS", "path": "edu.kit.ipd.sdq.kamp4aps.model.modificationmarks/src/edu/kit/ipd/sdq/kamp4aps/model/KAMP4aPSModificationmarks/KAMP4aPSSeedModifications.java", "license": "apache-2.0", "size": 5276 }
[ "edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository", "org.eclipse.emf.common.util.EList" ]
import edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository; import org.eclipse.emf.common.util.EList;
import edu.kit.ipd.sdq.kamp4aps.model.*; import org.eclipse.emf.common.util.*;
[ "edu.kit.ipd", "org.eclipse.emf" ]
edu.kit.ipd; org.eclipse.emf;
2,208,150
@Path("{clusterName}/credentials") public CredentialService getCredentials( @Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) { hasPermission(Request.Type.valueOf(request.getMethod()), clusterName); return new CredentialService(clusterName); } // -----...
@Path(STR) CredentialService function( @Context javax.ws.rs.core.Request request, @PathParam(STR) String clusterName) { hasPermission(Request.Type.valueOf(request.getMethod()), clusterName); return new CredentialService(clusterName); }
/** * Gets the credentials service. * * @param request the request. * @param clusterName the cluster name. * @return the credentials service. */
Gets the credentials service
getCredentials
{ "repo_name": "zouzhberk/ambaridemo", "path": "demo-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java", "license": "apache-2.0", "size": 23921 }
[ "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.core.Context" ]
import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Context;
import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
2,841,110
public void postOpen(){ ObserverContext<RegionCoprocessorEnvironment> ctx = null; for (RegionEnvironment env: coprocessors) { if (env.getInstance() instanceof RegionObserver) { ctx = ObserverContext.createAndPrepare(env, ctx); try { ((RegionObserver)env.getInstance()).postOpen(...
void function(){ ObserverContext<RegionCoprocessorEnvironment> ctx = null; for (RegionEnvironment env: coprocessors) { if (env.getInstance() instanceof RegionObserver) { ctx = ObserverContext.createAndPrepare(env, ctx); try { ((RegionObserver)env.getInstance()).postOpen(ctx); } catch (Throwable e) { handleCoprocessorTh...
/** * Invoked after a region open */
Invoked after a region open
postOpen
{ "repo_name": "zqxjjj/NobidaBase", "path": "target/hbase-0.94.9/hbase-0.94.9/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java", "license": "apache-2.0", "size": 54179 }
[ "org.apache.hadoop.hbase.coprocessor.ObserverContext", "org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment", "org.apache.hadoop.hbase.coprocessor.RegionObserver" ]
import org.apache.hadoop.hbase.coprocessor.ObserverContext; import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment; import org.apache.hadoop.hbase.coprocessor.RegionObserver;
import org.apache.hadoop.hbase.coprocessor.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
240,285
@Override public void run() { Thread.currentThread().setName("Activity Execution"); enableAllButtons(false); try { Executor selectedExecutor = (Executor)executors.getSelectedItem(); selectedExecutor.execute(executingJob, status); } catch (Exception e) ...
void function() { Thread.currentThread().setName(STR); enableAllButtons(false); try { Executor selectedExecutor = (Executor)executors.getSelectedItem(); selectedExecutor.execute(executingJob, status); } catch (Exception e) { Logger.error(e); MainFrame.progress.stopBouncing(STR); status.setText(STR+e.getClass().getSimpl...
/** * Submits the job to the database */
Submits the job to the database
run
{ "repo_name": "cristal-ise/gui", "path": "src/main/java/org/cristalise/gui/tabs/execution/ActivityViewer.java", "license": "lgpl-3.0", "size": 13620 }
[ "org.cristalise.gui.MainFrame", "org.cristalise.kernel.utils.Logger" ]
import org.cristalise.gui.MainFrame; import org.cristalise.kernel.utils.Logger;
import org.cristalise.gui.*; import org.cristalise.kernel.utils.*;
[ "org.cristalise.gui", "org.cristalise.kernel" ]
org.cristalise.gui; org.cristalise.kernel;
814,425
public static void initTableReducerJob(String table, Class<? extends TableReducer> reducer, Job job, Class partitioner, String quorumAddress, String serverClass, String serverImpl, boolean addDependencyJars) throws IOException { Configuration conf = job.getConfiguration(); HBaseConfiguration.merg...
static void function(String table, Class<? extends TableReducer> reducer, Job job, Class partitioner, String quorumAddress, String serverClass, String serverImpl, boolean addDependencyJars) throws IOException { Configuration conf = job.getConfiguration(); HBaseConfiguration.merge(conf, HBaseConfiguration.create(conf));...
/** * Use this before submitting a TableReduce job. It will * appropriately set up the JobConf. * * @param table The output table. * @param reducer The reducer class to use. * @param job The current job to adjust. Make sure the passed job is * carrying all necessary HBase configuration. * @p...
Use this before submitting a TableReduce job. It will appropriately set up the JobConf
initTableReducerJob
{ "repo_name": "justintung/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java", "license": "apache-2.0", "size": 38925 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.HBaseConfiguration", "org.apache.hadoop.hbase.MetaTableAccessor", "org.apache.hadoop.hbase.TableName", "org.apache.hadoop.hbase.io.ImmutableBytesWritable", "org.apache.hadoop.hbase.zookeeper.ZKUtil", "org.apache.ha...
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.MetaTableAccessor; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.zookeeper.ZKUti...
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.hbase.zookeeper.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
96,313
public Chart getContinuationChartOfAccount() { return continuationChartOfAccount; }
Chart function() { return continuationChartOfAccount; }
/** * Gets the continuationChartOfAccount attribute. * * @return Returns the continuationChartOfAccount. */
Gets the continuationChartOfAccount attribute
getContinuationChartOfAccount
{ "repo_name": "bhutchinson/kfs", "path": "kfs-bc/src/main/java/org/kuali/kfs/module/bc/businessobject/BudgetConstructionAppointmentFundingLoad02Move.java", "license": "agpl-3.0", "size": 5369 }
[ "org.kuali.kfs.coa.businessobject.Chart" ]
import org.kuali.kfs.coa.businessobject.Chart;
import org.kuali.kfs.coa.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,206,156
@SuppressWarnings("unused") public void setOutFile(File outFile) { this.outFile = outFile; }
@SuppressWarnings(STR) void function(File outFile) { this.outFile = outFile; }
/** * Where the modified XML will be written. */
Where the modified XML will be written
setOutFile
{ "repo_name": "TWCable/gradle-plugin-cq-package", "path": "src/main/groovy/com/twcable/gradle/cqpackage/AddBundlesToFilterXmlTask.java", "license": "apache-2.0", "size": 6634 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,134,165
void configTest() { Double version = Config.getDouble("appHello", -1.0); Toast.makeText(this, String.valueOf(version), Toast.LENGTH_SHORT).show(); }
void configTest() { Double version = Config.getDouble(STR, -1.0); Toast.makeText(this, String.valueOf(version), Toast.LENGTH_SHORT).show(); }
/** * Get Config. */
Get Config
configTest
{ "repo_name": "haruio/haru-sdk-android", "path": "test/src/main/java/com/haru/test/MainActivity.java", "license": "mit", "size": 5228 }
[ "android.widget.Toast", "com.haru.Config" ]
import android.widget.Toast; import com.haru.Config;
import android.widget.*; import com.haru.*;
[ "android.widget", "com.haru" ]
android.widget; com.haru;
1,367,195
@Override public final List<DataSource> getDataSource() { return Collections.unmodifiableList(datasource); }
final List<DataSource> function() { return Collections.unmodifiableList(datasource); }
/** * Get the datasource. * * @return the datasource. */
Get the datasource
getDataSource
{ "repo_name": "darranl/ironjacamar", "path": "common/src/main/java/org/ironjacamar/common/metadata/ds/DatasourcesImpl.java", "license": "epl-1.0", "size": 6181 }
[ "java.util.Collections", "java.util.List", "org.ironjacamar.common.api.metadata.ds.DataSource" ]
import java.util.Collections; import java.util.List; import org.ironjacamar.common.api.metadata.ds.DataSource;
import java.util.*; import org.ironjacamar.common.api.metadata.ds.*;
[ "java.util", "org.ironjacamar.common" ]
java.util; org.ironjacamar.common;
1,795,749
@Test public void fetchesId() throws Exception { final int ident = 777; MatcherAssert.assertThat( new Status.Smart( new RtStatus( StatusTest.commit(), Json.createObjectBuilder().add("id", ident).build() ) ...
void function() throws Exception { final int ident = 777; MatcherAssert.assertThat( new Status.Smart( new RtStatus( StatusTest.commit(), Json.createObjectBuilder().add("id", ident).build() ) ).identifier(), Matchers.equalTo(ident) ); }
/** * Status.Smart can fetch its ID number. * @throws Exception If some problem inside */
Status.Smart can fetch its ID number
fetchesId
{ "repo_name": "cvrebert/typed-github", "path": "src/test/java/com/jcabi/github/StatusTest.java", "license": "bsd-3-clause", "size": 12100 }
[ "javax.json.Json", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import javax.json.Json; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import javax.json.*; import org.hamcrest.*;
[ "javax.json", "org.hamcrest" ]
javax.json; org.hamcrest;
274,825
EReference getPTOV_Op();
EReference getPTOV_Op();
/** * Returns the meta object for the reference '{@link gluemodel.substationStandard.LNNodes.LNGroupP.PTOV#getOp <em>Op</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Op</em>'. * @see gluemodel.substationStandard.LNNodes.LNGroupP.PTOV#getOp() * @se...
Returns the meta object for the reference '<code>gluemodel.substationStandard.LNNodes.LNGroupP.PTOV#getOp Op</code>'.
getPTOV_Op
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/substationStandard/LNNodes/LNGroupP/LNGroupPPackage.java", "license": "mit", "size": 291175 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
555,171
public TextAnchor getAnchor() { return this.anchor; }
TextAnchor function() { return this.anchor; }
/** * Returns the text anchor point that will be aligned to the position * specified by {@link #getAngle()} and {@link #getRadius()}. * * @return The anchor point. * * @see #setAnchor(TextAnchor) */
Returns the text anchor point that will be aligned to the position specified by <code>#getAngle()</code> and <code>#getRadius()</code>
getAnchor
{ "repo_name": "JSansalone/JFreeChart", "path": "source/org/jfree/chart/plot/dial/DialTextAnnotation.java", "license": "lgpl-2.1", "size": 12099 }
[ "org.jfree.ui.TextAnchor" ]
import org.jfree.ui.TextAnchor;
import org.jfree.ui.*;
[ "org.jfree.ui" ]
org.jfree.ui;
2,435,952
protected WebDriverWait getWait() { return wait; }
WebDriverWait function() { return wait; }
/** * Returns the webdriver wait. */
Returns the webdriver wait
getWait
{ "repo_name": "web-auto/wtf-core", "path": "src/main/java/org/wtf/core/WTFPage.java", "license": "mit", "size": 1066 }
[ "org.openqa.selenium.support.ui.WebDriverWait" ]
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.support.ui.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
737,913
@Override public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { refreshCamera(); }
void function(SurfaceHolder holder, int format, int w, int h) { refreshCamera(); }
/** * Override method - called when surface is changed. * @param holder is the surface holder * @param format capture format * @param w surface width * @param h surface height */
Override method - called when surface is changed
surfaceChanged
{ "repo_name": "Minitour/crofis-android-uikit", "path": "ui/src/main/java/net/crofis/ui/camera/CameraActivity.java", "license": "apache-2.0", "size": 86098 }
[ "android.view.SurfaceHolder" ]
import android.view.SurfaceHolder;
import android.view.*;
[ "android.view" ]
android.view;
617,776
@Nonnull public PedigreeBuilder addIndividual(@Nonnull String familyId, @Nonnull String individualId, @Nonnull Optional<String> fatherId, @Nonnull Optional<String> motherId, @Nonnull Sex sex, @Nonnull List<String> info) { // enforces imm...
PedigreeBuilder function(@Nonnull String familyId, @Nonnull String individualId, @Nonnull Optional<String> fatherId, @Nonnull Optional<String> motherId, @Nonnull Sex sex, @Nonnull List<String> info) { if (m_pedigree == null) { throw new IllegalStateException(STR); } if (m_individualIdsUsed.contains(individualId)) { thr...
/** * * Adds an individual. If inOrder in the constructor is true, this individual's parents, if any, must already have been added. * * Note that the sex of a parent must be correct: if A is the mother of B, then A must have {@link org.pharmgkb.parsers.pedigree.Sex} FEMALE (cannot be MALE or UNKNOWN). * * @...
Adds an individual. If inOrder in the constructor is true, this individual's parents, if any, must already have been added. Note that the sex of a parent must be correct: if A is the mother of B, then A must have <code>org.pharmgkb.parsers.pedigree.Sex</code> FEMALE (cannot be MALE or UNKNOWN)
addIndividual
{ "repo_name": "PharmGKB/genome-sequence-io", "path": "pedigree/src/main/java/org/pharmgkb/parsers/pedigree/PedigreeBuilder.java", "license": "mpl-2.0", "size": 7765 }
[ "java.util.List", "java.util.Optional", "javax.annotation.Nonnull" ]
import java.util.List; import java.util.Optional; import javax.annotation.Nonnull;
import java.util.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
2,754,675
@FIXVersion(introduced="4.2") @TagNumRef(tagNum=TagNum.Adjustment) public Adjustment getAdjustment() { return adjustment; }
@FIXVersion(introduced="4.2") @TagNumRef(tagNum=TagNum.Adjustment) Adjustment function() { return adjustment; }
/** * Message field getter. * @return field value */
Message field getter
getAdjustment
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/SecurityStatusMsg.java", "license": "gpl-3.0", "size": 64007 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.Adjustment", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.Adjustment; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
297,346
@RequestMapping(value = "", method = RequestMethod.GET, params = "name") @ResponseStatus(HttpStatus.OK) public PagedResources<TaskExecutionResource> retrieveTasksByName(@RequestParam("name") String taskName, Pageable pageable, PagedResourcesAssembler<TaskJobExecutionRel> assembler) { this.taskDefinitionReposi...
@RequestMapping(value = STRnameSTRname") String taskName, Pageable pageable, PagedResourcesAssembler<TaskJobExecutionRel> assembler) { this.taskDefinitionRepository.findById(taskName) .orElseThrow(() -> new NoSuchTaskDefinitionException(taskName)); Page<TaskExecution> taskExecutions = this.explorer.findTaskExecutionsBy...
/** * Retrieve all task executions with the task name specified * * @param taskName name of the task * @param pageable page-able collection of {@code TaskExecution}s. * @param assembler for the {@link TaskExecution}s * @return the paged list of task executions */
Retrieve all task executions with the task name specified
retrieveTasksByName
{ "repo_name": "jvalkeal/spring-cloud-data", "path": "spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/TaskExecutionController.java", "license": "apache-2.0", "size": 10991 }
[ "org.springframework.cloud.dataflow.rest.job.TaskJobExecutionRel", "org.springframework.cloud.dataflow.server.repository.NoSuchTaskDefinitionException", "org.springframework.cloud.task.repository.TaskExecution", "org.springframework.data.domain.Page", "org.springframework.data.domain.Pageable", "org.sprin...
import org.springframework.cloud.dataflow.rest.job.TaskJobExecutionRel; import org.springframework.cloud.dataflow.server.repository.NoSuchTaskDefinitionException; import org.springframework.cloud.task.repository.TaskExecution; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable;...
import org.springframework.cloud.dataflow.rest.job.*; import org.springframework.cloud.dataflow.server.repository.*; import org.springframework.cloud.task.repository.*; import org.springframework.data.domain.*; import org.springframework.data.web.*; import org.springframework.web.bind.annotation.*;
[ "org.springframework.cloud", "org.springframework.data", "org.springframework.web" ]
org.springframework.cloud; org.springframework.data; org.springframework.web;
186,932
public void clearAll() { classUtils.clear(); variables = new HashMap<>(); classUtils.addPackage("net.alantea.xlayer"); classUtils.addPackage("java.lang"); }
void function() { classUtils.clear(); variables = new HashMap<>(); classUtils.addPackage(STR); classUtils.addPackage(STR); }
/** * Clear all information. */
Clear all information
clearAll
{ "repo_name": "jrebillat/Xlayer", "path": "xlayer/src/net/alantea/xlayer/Manager.java", "license": "lgpl-3.0", "size": 12329 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
16,588
public IPermissionActivity getPermissionActivity(long ownerId, String activityFname);
IPermissionActivity function(long ownerId, String activityFname);
/** * Retrieve a permission activity under the specified permission owner with the provided * activity functional name. * * @param ownerId unique ID of the desired activity's owner * @param activityFname functional name of the desired activity * @return */
Retrieve a permission activity under the specified permission owner with the provided activity functional name
getPermissionActivity
{ "repo_name": "ChristianMurphy/uPortal", "path": "uPortal-security/uPortal-security-permissions/src/main/java/org/apereo/portal/permission/dao/IPermissionOwnerDao.java", "license": "apache-2.0", "size": 4101 }
[ "org.apereo.portal.permission.IPermissionActivity" ]
import org.apereo.portal.permission.IPermissionActivity;
import org.apereo.portal.permission.*;
[ "org.apereo.portal" ]
org.apereo.portal;
957,583
public static void close(URLConnection conn) { if (conn instanceof HttpURLConnection) { ((HttpURLConnection) conn).disconnect(); } } /** * Unconditionally close an <code>Reader</code>. * <p> * Equivalent to {@link Reader#close()}, except any exceptions will be ign...
static void function(URLConnection conn) { if (conn instanceof HttpURLConnection) { ((HttpURLConnection) conn).disconnect(); } } /** * Unconditionally close an <code>Reader</code>. * <p> * Equivalent to {@link Reader#close()}, except any exceptions will be ignored. * This is typically used in finally blocks. * <p> * Ex...
/** * Closes a URLConnection. * * @param conn the connection to close. * @since 2.4 */
Closes a URLConnection
close
{ "repo_name": "trivium-io/trivium-core", "path": "src/io/trivium/dep/org/apache/commons/io/IOUtils.java", "license": "apache-2.0", "size": 97969 }
[ "java.io.Reader", "java.net.HttpURLConnection", "java.net.URLConnection" ]
import java.io.Reader; import java.net.HttpURLConnection; import java.net.URLConnection;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,665,171
public final void registerArena(MinigameArena arena) { arenas.put(arena.getName().toLowerCase(), arena); }
final void function(MinigameArena arena) { arenas.put(arena.getName().toLowerCase(), arena); }
/** * registers the arena * * @author xize * @param arena the arena */
registers the arena
registerArena
{ "repo_name": "xEssentials/xEssentials", "path": "src/tv/mineinthebox/essentials/minigames/plugin/MinigamePlugin.java", "license": "gpl-3.0", "size": 10382 }
[ "tv.mineinthebox.essentials.minigames.plugin.arena.MinigameArena" ]
import tv.mineinthebox.essentials.minigames.plugin.arena.MinigameArena;
import tv.mineinthebox.essentials.minigames.plugin.arena.*;
[ "tv.mineinthebox.essentials" ]
tv.mineinthebox.essentials;
2,582,336
public interface BlockStore { void put(StoredBlock block) throws BlockStoreException;
interface BlockStore { void function(StoredBlock block) throws BlockStoreException;
/** * Saves the given block header+extra data. The key isn't specified explicitly as it can be calculated from the * StoredBlock directly. Can throw if there is a problem with the underlying storage layer such as running out of * disk space. */
Saves the given block header+extra data. The key isn't specified explicitly as it can be calculated from the StoredBlock directly. Can throw if there is a problem with the underlying storage layer such as running out of disk space
put
{ "repo_name": "jjculber/defcoinj", "path": "core/src/main/java/com/google/defcoin/store/BlockStore.java", "license": "apache-2.0", "size": 2566 }
[ "com.google.defcoin.core.StoredBlock" ]
import com.google.defcoin.core.StoredBlock;
import com.google.defcoin.core.*;
[ "com.google.defcoin" ]
com.google.defcoin;
611,579
public static String getAPIProductProviderPath(APIProductIdentifier identifier) { return APIConstants.API_LOCATION + RegistryConstants.PATH_SEPARATOR + identifier.getProviderName(); }
static String function(APIProductIdentifier identifier) { return APIConstants.API_LOCATION + RegistryConstants.PATH_SEPARATOR + identifier.getProviderName(); }
/** * Utility method to get API Product provider path * * @param identifier APIProductIdentifier * @return API Product provider path */
Utility method to get API Product provider path
getAPIProductProviderPath
{ "repo_name": "ruks/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java", "license": "apache-2.0", "size": 564037 }
[ "org.wso2.carbon.apimgt.api.model.APIProductIdentifier", "org.wso2.carbon.apimgt.impl.APIConstants", "org.wso2.carbon.registry.core.RegistryConstants" ]
import org.wso2.carbon.apimgt.api.model.APIProductIdentifier; import org.wso2.carbon.apimgt.impl.APIConstants; import org.wso2.carbon.registry.core.RegistryConstants;
import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.registry.core.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
889,250
void setControlPointShape(PointShape controlPointShape);
void setControlPointShape(PointShape controlPointShape);
/** * Sets a point shape of control points of the connection widget. * * @param controlPointShape the control points shape */
Sets a point shape of control points of the connection widget
setControlPointShape
{ "repo_name": "jGauravGupta/nbmodeler", "path": "modeler-api/src/main/java/org/netbeans/modeler/widget/edge/IConnectionWidget.java", "license": "apache-2.0", "size": 11669 }
[ "org.netbeans.api.visual.anchor.PointShape" ]
import org.netbeans.api.visual.anchor.PointShape;
import org.netbeans.api.visual.anchor.*;
[ "org.netbeans.api" ]
org.netbeans.api;
173,914
public static AuthToken kerberos( String base64EncodedTicket ) { return new InternalAuthToken( parameters( "scheme", "kerberos", "principal", "", //This empty string is required for backwards compatibility. "credentials", base64EncodedTicket).asMap( Values...
static AuthToken function( String base64EncodedTicket ) { return new InternalAuthToken( parameters( STR, STR, STR, STRcredentials", base64EncodedTicket).asMap( Values.ofValue() ) ); }
/** * The kerberos authentication scheme, using a base64 encoded ticket * @param base64EncodedTicket a base64 encoded service ticket * @return an authentication token that can be used to connect to Neo4j * @see GraphDatabase#driver(String, AuthToken) * @since 1.3 */
The kerberos authentication scheme, using a base64 encoded ticket
kerberos
{ "repo_name": "cjdaly/CompuCanvas-code", "path": "CompuCanvas-controller/source/net.locosoft.CompuCanvas.controller.Neo4j/driver/src/main/java/org/neo4j/driver/v1/AuthTokens.java", "license": "epl-1.0", "size": 5711 }
[ "org.neo4j.driver.internal.security.InternalAuthToken", "org.neo4j.driver.v1.Values" ]
import org.neo4j.driver.internal.security.InternalAuthToken; import org.neo4j.driver.v1.Values;
import org.neo4j.driver.internal.security.*; import org.neo4j.driver.v1.*;
[ "org.neo4j.driver" ]
org.neo4j.driver;
2,100,897
public ArrayList<FrdParameterRule19> persistFrdParameterRule19List( List<FrdParameterRule19> frdParameterRule19List);
ArrayList<FrdParameterRule19> function( List<FrdParameterRule19> frdParameterRule19List);
/** * persistFrdParameterRule19List - persists a list of FrdParameterRule19 * * @param frdParameterRule19List * @return the list of persisted FrdParameterRule19 */
persistFrdParameterRule19List - persists a list of FrdParameterRule19
persistFrdParameterRule19List
{ "repo_name": "yauritux/venice-legacy", "path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/FrdParameterRule19SessionEJBRemote.java", "license": "apache-2.0", "size": 2780 }
[ "com.gdn.venice.persistence.FrdParameterRule19", "java.util.ArrayList", "java.util.List" ]
import com.gdn.venice.persistence.FrdParameterRule19; import java.util.ArrayList; import java.util.List;
import com.gdn.venice.persistence.*; import java.util.*;
[ "com.gdn.venice", "java.util" ]
com.gdn.venice; java.util;
1,984,133