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
@Override protected void setUpView(View rootView) { }
void function(View rootView) { }
/** * Maps all the view elements from the xml declaration to members of this renderer. */
Maps all the view elements from the xml declaration to members of this renderer
setUpView
{ "repo_name": "0359xiaodong/Renderers", "path": "sample/src/main/java/com/pedrogomez/renderers/ui/renderers/VideoRenderer.java", "license": "apache-2.0", "size": 4791 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,266,918
protected void createContents() { Display display = Display.getDefault(); shell = new Shell(display, SWT.SHELL_TRIM | SWT.CENTER); shell.setLayout(new GridLayout(1, false)); Image icon = new Image(display, App.class.getResourceAsStream("icons/icon.png")); shell.setImage(icon)...
void function() { Display display = Display.getDefault(); shell = new Shell(display, SWT.SHELL_TRIM SWT.CENTER); shell.setLayout(new GridLayout(1, false)); Image icon = new Image(display, App.class.getResourceAsStream(STR)); shell.setImage(icon); createActions(); createMenu(display); createToolbar(); SashForm sashForm ...
/** * Create contents of the window. */
Create contents of the window
createContents
{ "repo_name": "asig/programmablefun", "path": "src/main/java/com/programmablefun/ide/App.java", "license": "gpl-3.0", "size": 22621 }
[ "com.google.common.base.Strings", "com.google.common.collect.Lists", "com.google.common.collect.Sets", "com.programmablefun.ide.console.ConsoleComposite", "com.programmablefun.ide.turtle.Canvas", "com.programmablefun.runtime.VirtualMachine", "com.programmablefun.runtime.nativecode.CanvasWrapper", "com...
import com.google.common.base.Strings; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.programmablefun.ide.console.ConsoleComposite; import com.programmablefun.ide.turtle.Canvas; import com.programmablefun.runtime.VirtualMachine; import com.programmablefun.runtime.nativecode.Ca...
import com.google.common.base.*; import com.google.common.collect.*; import com.programmablefun.ide.console.*; import com.programmablefun.ide.turtle.*; import com.programmablefun.runtime.*; import com.programmablefun.runtime.nativecode.*; import java.io.*; import java.lang.reflect.*; import java.util.*; import org.ecli...
[ "com.google.common", "com.programmablefun.ide", "com.programmablefun.runtime", "java.io", "java.lang", "java.util", "org.eclipse.swt" ]
com.google.common; com.programmablefun.ide; com.programmablefun.runtime; java.io; java.lang; java.util; org.eclipse.swt;
665,984
public Raster getData() { // REMIND : this allocates a whole new tile if raster is a // subtile. (It only copies in the requested area) // We should do something smarter. int width = raster.getWidth(); int height = raster.getHeight(); int startX = raster.getMinX(); ...
Raster function() { int width = raster.getWidth(); int height = raster.getHeight(); int startX = raster.getMinX(); int startY = raster.getMinY(); WritableRaster wr = Raster.createWritableRaster(raster.getSampleModel(), new Point(raster.getSampleModelTranslateX(), raster.getSampleModelTranslateY())); Object tdata = null...
/** * Returns the image as one large tile. The <code>Raster</code> * returned is a copy of the image data is not updated if the * image is changed. * @return a <code>Raster</code> that is a copy of the image data. * @see #setData(Raster) */
Returns the image as one large tile. The <code>Raster</code> returned is a copy of the image data is not updated if the image is changed
getData
{ "repo_name": "openjdk/jdk7u", "path": "jdk/src/share/classes/java/awt/image/BufferedImage.java", "license": "gpl-2.0", "size": 65010 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,026,899
public void write(byte[] buf, int off, int len) throws IOException { // This could of course be optimized for (int i = 0; i < len; i++) { write(buf[off + i]); } }
void function(byte[] buf, int off, int len) throws IOException { for (int i = 0; i < len; i++) { write(buf[off + i]); } }
/** * Writes the given byte array to the output stream in an encoded form. * * @param buf * the data to be written * @param off * the start offset of the data * @param len * the length of the data * @exception IOException * if an I/O error occurs */
Writes the given byte array to the output stream in an encoded form
write
{ "repo_name": "zhengjiabin/domeke", "path": "core/src/main/java/com/domeke/app/cos/Base64Encoder.java", "license": "apache-2.0", "size": 6111 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
657,237
public void testGetSelect1() throws Exception { BitMap B = new BitMap(2048); ArrayList<Long> test = new ArrayList<Long>(); for (int i = 0; i < 2048; i++) { if ((int) (Math.random() * 2) == 1) { B.setBit(i); test.add((long) i); } } Dictionary D = new Dictionary(B); ...
void function() throws Exception { BitMap B = new BitMap(2048); ArrayList<Long> test = new ArrayList<Long>(); for (int i = 0; i < 2048; i++) { if ((int) (Math.random() * 2) == 1) { B.setBit(i); test.add((long) i); } } Dictionary D = new Dictionary(B); ByteBuffer dBuf = D.getByteBuffer(); FSDataInputStream is = TestUtil...
/** * Test method: getSelect1(ByteBuffer buf, int startPos, int i) * * @throws Exception */
Test method: getSelect1(ByteBuffer buf, int startPos, int i)
testGetSelect1
{ "repo_name": "amplab/succinct", "path": "spark/src/test/java/edu/berkeley/cs/succinct/util/stream/serops/DictionaryOpsTest.java", "license": "apache-2.0", "size": 3409 }
[ "edu.berkeley.cs.succinct.util.bitmap.BitMap", "edu.berkeley.cs.succinct.util.dictionary.Dictionary", "edu.berkeley.cs.succinct.util.stream.RandomAccessByteStream", "edu.berkeley.cs.succinct.util.stream.TestUtils", "java.nio.ByteBuffer", "java.util.ArrayList", "org.apache.hadoop.fs.FSDataInputStream" ]
import edu.berkeley.cs.succinct.util.bitmap.BitMap; import edu.berkeley.cs.succinct.util.dictionary.Dictionary; import edu.berkeley.cs.succinct.util.stream.RandomAccessByteStream; import edu.berkeley.cs.succinct.util.stream.TestUtils; import java.nio.ByteBuffer; import java.util.ArrayList; import org.apache.hadoop.fs.F...
import edu.berkeley.cs.succinct.util.bitmap.*; import edu.berkeley.cs.succinct.util.dictionary.*; import edu.berkeley.cs.succinct.util.stream.*; import java.nio.*; import java.util.*; import org.apache.hadoop.fs.*;
[ "edu.berkeley.cs", "java.nio", "java.util", "org.apache.hadoop" ]
edu.berkeley.cs; java.nio; java.util; org.apache.hadoop;
2,396,062
private static void initMapAminoAcid() throws FastaFormatException, ChemistryException { try { aminoacids = MonomerFactory.getInstance().getMonomerDB().get("PEPTIDE"); } catch (IOException e) { e.printStackTrace(); LOG.error("AminoAcids can not be initialized"); throw new FastaFormatException(e...
static void function() throws FastaFormatException, ChemistryException { try { aminoacids = MonomerFactory.getInstance().getMonomerDB().get(STR); } catch (IOException e) { e.printStackTrace(); LOG.error(STR); throw new FastaFormatException(e.getMessage()); } }
/** * method to initialize map of existing amino acids in the database * * @throws FastaFormatException * AminoAcids can not be initialized * @throws ChemistryException * if chemistry engine can not be initialized * @throws CTKException * general ChemToolKit e...
method to initialize map of existing amino acids in the database
initMapAminoAcid
{ "repo_name": "PistoiaHELM/HELM2NotationToolkit", "path": "src/main/java/org/helm/notation2/tools/FastaFormat.java", "license": "mit", "size": 29777 }
[ "java.io.IOException", "org.helm.notation2.MonomerFactory", "org.helm.notation2.exception.ChemistryException", "org.helm.notation2.exception.FastaFormatException" ]
import java.io.IOException; import org.helm.notation2.MonomerFactory; import org.helm.notation2.exception.ChemistryException; import org.helm.notation2.exception.FastaFormatException;
import java.io.*; import org.helm.notation2.*; import org.helm.notation2.exception.*;
[ "java.io", "org.helm.notation2" ]
java.io; org.helm.notation2;
2,450,355
void onPlaybackStateChanged(PlayerState oldState, PlayerState newState);
void onPlaybackStateChanged(PlayerState oldState, PlayerState newState);
/** * Called when the Playback state has changed (e.g. from playing to paused) * @param oldState the old state * @param newState the new state */
Called when the Playback state has changed (e.g. from playing to paused)
onPlaybackStateChanged
{ "repo_name": "js0701/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/media/remote/MediaRouteController.java", "license": "bsd-3-clause", "size": 10589 }
[ "org.chromium.chrome.browser.media.remote.RemoteVideoInfo" ]
import org.chromium.chrome.browser.media.remote.RemoteVideoInfo;
import org.chromium.chrome.browser.media.remote.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
2,609,067
@Path("{id}/consents") @GET @NoCache @Produces(MediaType.APPLICATION_JSON) public List<Map<String, Object>> getConsents(final @PathParam("id") String id) { auth.requireView(); UserModel user = session.users().getUserById(id, realm); if (user == null) { throw new N...
@Path(STR) @Produces(MediaType.APPLICATION_JSON) List<Map<String, Object>> function(final @PathParam("id") String id) { auth.requireView(); UserModel user = session.users().getUserById(id, realm); if (user == null) { throw new NotFoundException(STR); } List<Map<String, Object>> result = new LinkedList<>(); Set<ClientMo...
/** * Get consents granted by the user * * @param id User id * @return */
Get consents granted by the user
getConsents
{ "repo_name": "gregjones60/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/UsersResource.java", "license": "apache-2.0", "size": 35766 }
[ "java.util.Collections", "java.util.HashMap", "java.util.LinkedList", "java.util.List", "java.util.Map", "java.util.Set", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "org.jboss.resteasy.spi.NotFoundException", "org.keycloak.models.ClientMo...
import java.util.Collections; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.jboss.resteasy.spi.NotFoundException; ...
import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jboss.resteasy.spi.*; import org.keycloak.models.*; import org.keycloak.models.utils.*; import org.keycloak.representations.idm.*; import org.keycloak.services.managers.*;
[ "java.util", "javax.ws", "org.jboss.resteasy", "org.keycloak.models", "org.keycloak.representations", "org.keycloak.services" ]
java.util; javax.ws; org.jboss.resteasy; org.keycloak.models; org.keycloak.representations; org.keycloak.services;
1,257,232
private void registerCommandsInScheduler(Map<Integer, HashSet<String>> scheduledCommands) { if(scheduledCommands != null) { for(Entry<Integer, HashSet<String>> scheduledCommandsStack : scheduledCommands.entrySet()) { p.getServer().getScheduler().runTaskLater( p, new ScheduledCommandsExecutorTask...
void function(Map<Integer, HashSet<String>> scheduledCommands) { if(scheduledCommands != null) { for(Entry<Integer, HashSet<String>> scheduledCommandsStack : scheduledCommands.entrySet()) { p.getServer().getScheduler().runTaskLater( p, new ScheduledCommandsExecutorTask(p, scheduledCommandsStack.getValue()), scheduledCo...
/** * Register the given commands in the Bukkit' scheduler. * * Delays are from the execution of this method. * @param scheduledCommands */
Register the given commands in the Bukkit' scheduler. Delays are from the execution of this method
registerCommandsInScheduler
{ "repo_name": "kyriog/UHPlugin", "path": "src/main/java/me/azenet/UHPlugin/UHRuntimeCommandsExecutor.java", "license": "gpl-3.0", "size": 7515 }
[ "java.util.HashSet", "java.util.Map", "me.azenet.UHPlugin" ]
import java.util.HashSet; import java.util.Map; import me.azenet.UHPlugin;
import java.util.*; import me.azenet.*;
[ "java.util", "me.azenet" ]
java.util; me.azenet;
1,613,717
private void fromStream(int size) throws IOException { if (in == null) return; maxOff = Math.max(maxOff, size); long now = U.currentTimeMillis(); // Increase size of buffer if needed. if (size > inBuf.length) buf = inBuf = new byte[Math.max(inBuf.le...
void function(int size) throws IOException { if (in == null) return; maxOff = Math.max(maxOff, size); long now = U.currentTimeMillis(); if (size > inBuf.length) buf = inBuf = new byte[Math.max(inBuf.length << 1, size)]; else if (now - lastCheck > CHECK_FREQ) { int halfSize = inBuf.length >> 1; if (maxOff < halfSize) { ...
/** * Reads from stream to buffer. If stream is {@code null}, this method is no-op. * * @param size Number of bytes to read. * @throws IOException In case of error. */
Reads from stream to buffer. If stream is null, this method is no-op
fromStream
{ "repo_name": "ilantukh/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/io/GridUnsafeDataInput.java", "license": "apache-2.0", "size": 17806 }
[ "java.io.EOFException", "java.io.IOException", "org.apache.ignite.internal.util.typedef.internal.U" ]
import java.io.EOFException; import java.io.IOException; import org.apache.ignite.internal.util.typedef.internal.U;
import java.io.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "java.io", "org.apache.ignite" ]
java.io; org.apache.ignite;
2,162,031
public static void setState(TEBase TE, int state) { int temp = BlockProperties.getMetadata(TE) & 0xfffb; temp |= state << 2; World world = TE.getWorldObj(); if (!world.isRemote) { world.playAuxSFXAtEntity((EntityPlayer)null, 1003, TE.xCoord, TE.yCoord, TE.zCoord, 0)...
static void function(TEBase TE, int state) { int temp = BlockProperties.getMetadata(TE) & 0xfffb; temp = state << 2; World world = TE.getWorldObj(); if (!world.isRemote) { world.playAuxSFXAtEntity((EntityPlayer)null, 1003, TE.xCoord, TE.yCoord, TE.zCoord, 0); } BlockProperties.setMetadata(TE, temp); }
/** * Sets state. */
Sets state
setState
{ "repo_name": "LorenzoDCC/carpentersblocks", "path": "carpentersblocks/data/Safe.java", "license": "lgpl-2.1", "size": 3603 }
[ "net.minecraft.entity.player.EntityPlayer", "net.minecraft.world.World" ]
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World;
import net.minecraft.entity.player.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.world;
159,795
private static <T> T getMergeFuture(Future<T> mergeFuture) throws InterruptedException, DeltaFailureException { try { return mergeFuture.get(); } catch (ExecutionException e) { Throwable cause = e.getCause(); if (cause instanceof DeltaFailureException) { throw (DeltaFailureException)...
static <T> T function(Future<T> mergeFuture) throws InterruptedException, DeltaFailureException { try { return mergeFuture.get(); } catch (ExecutionException e) { Throwable cause = e.getCause(); if (cause instanceof DeltaFailureException) { throw (DeltaFailureException) cause; } if (cause instanceof InterruptedExceptio...
/** * Utility method that unwraps ExecutionExceptions and propagates their cause as-is when possible. * Expects to be given a Future for a call to mergeTableChanges. */
Utility method that unwraps ExecutionExceptions and propagates their cause as-is when possible. Expects to be given a Future for a call to mergeTableChanges
getMergeFuture
{ "repo_name": "data-integrations/bigquery-delta-plugins", "path": "src/main/java/io/cdap/delta/bigquery/BigQueryEventConsumer.java", "license": "apache-2.0", "size": 66047 }
[ "io.cdap.delta.api.DeltaFailureException", "java.util.concurrent.ExecutionException", "java.util.concurrent.Future" ]
import io.cdap.delta.api.DeltaFailureException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future;
import io.cdap.delta.api.*; import java.util.concurrent.*;
[ "io.cdap.delta", "java.util" ]
io.cdap.delta; java.util;
2,608,263
public void testCloning() { BoxAndWhiskerXYToolTipGenerator g1 = new BoxAndWhiskerXYToolTipGenerator(); BoxAndWhiskerXYToolTipGenerator g2 = null; try { g2 = (BoxAndWhiskerXYToolTipGenerator) g1.clone(); } catch (CloneNotSupportedException e) { ...
void function() { BoxAndWhiskerXYToolTipGenerator g1 = new BoxAndWhiskerXYToolTipGenerator(); BoxAndWhiskerXYToolTipGenerator g2 = null; try { g2 = (BoxAndWhiskerXYToolTipGenerator) g1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } assertTrue(g1 != g2); assertTrue(g1.getClass() == g2.getClass(...
/** * Confirm that cloning works. */
Confirm that cloning works
testCloning
{ "repo_name": "linuxuser586/jfreechart", "path": "tests/org/jfree/chart/labels/junit/BoxAndWhiskerXYToolTipGeneratorTests.java", "license": "lgpl-2.1", "size": 6776 }
[ "org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator" ]
import org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator;
import org.jfree.chart.labels.*;
[ "org.jfree.chart" ]
org.jfree.chart;
54,988
private boolean createLocationForAddedPartition( final Table tbl, final Partition part) throws MetaException { Path partLocation = null; String partLocationStr = null; if (part.getSd() != null) { partLocationStr = part.getSd().getLocation(); } if (partLocationStr == nu...
boolean function( final Table tbl, final Partition part) throws MetaException { Path partLocation = null; String partLocationStr = null; if (part.getSd() != null) { partLocationStr = part.getSd().getLocation(); } if (partLocationStr == null partLocationStr.isEmpty()) { if (tbl.getSd().getLocation() != null) { partLocat...
/** * Handles the location for a partition being created. * @param tbl Table. * @param part Partition. * @return Whether the partition SD location is set to a newly created directory. */
Handles the location for a partition being created
createLocationForAddedPartition
{ "repo_name": "grundprinzip/Impala", "path": "thirdparty/hive-0.13.1-cdh5.4.0-SNAPSHOT/src/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java", "license": "apache-2.0", "size": 197415 }
[ "org.apache.hadoop.fs.Path", "org.apache.hadoop.hive.metastore.api.MetaException", "org.apache.hadoop.hive.metastore.api.Partition", "org.apache.hadoop.hive.metastore.api.Table" ]
import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.Partition; import org.apache.hadoop.hive.metastore.api.Table;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.metastore.api.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
54,499
public String getMessageById(int id, String dbName) { System.out.println("Getting message for id= " + id); Connection connection = connectDb(dbName); Statement statement; String msg = null; try { statement = connection.createStatement(); statement.setQueryTimeout(30); // set timeout to 30 sec Resu...
String function(int id, String dbName) { System.out.println(STR + id); Connection connection = connectDb(dbName); Statement statement; String msg = null; try { statement = connection.createStatement(); statement.setQueryTimeout(30); ResultSet rs = statement.executeQuery(AttributeManager.SELECT_FROM + DB_MESSAGE_TABLE +...
/** * Reads an SMS message from the Db for the given id. * * @param id * , is the row-id of the message * @param dbName * is the full path name to the .db file. * @return a String representing the message or "id NOT FOUND" */
Reads an SMS message from the Db for the given id
getMessageById
{ "repo_name": "trishan/posit-mobile.haiti-server", "path": "src/haiti/server/datamodel/DAO.java", "license": "gpl-3.0", "size": 28234 }
[ "java.sql.Connection", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
712,405
public static Criterion overlaps(String begin, String end, Time value) throws UnsupportedTimeException { return filter(new OverlapsRestriction(), begin, end, value); }
static Criterion function(String begin, String end, Time value) throws UnsupportedTimeException { return filter(new OverlapsRestriction(), begin, end, value); }
/** * Creates a temporal restriction for the specified time and property. * * @param begin * the begin property name * @param end * the end property name * @param value * the value * * @return the <tt>Criterion</tt> * * @see...
Creates a temporal restriction for the specified time and property
overlaps
{ "repo_name": "impulze/SOS", "path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/TemporalRestrictions.java", "license": "gpl-2.0", "size": 39623 }
[ "org.hibernate.criterion.Criterion", "org.n52.sos.ds.hibernate.util.TemporalRestriction", "org.n52.sos.exception.ows.concrete.UnsupportedTimeException", "org.n52.sos.ogc.gml.time.Time" ]
import org.hibernate.criterion.Criterion; import org.n52.sos.ds.hibernate.util.TemporalRestriction; import org.n52.sos.exception.ows.concrete.UnsupportedTimeException; import org.n52.sos.ogc.gml.time.Time;
import org.hibernate.criterion.*; import org.n52.sos.ds.hibernate.util.*; import org.n52.sos.exception.ows.concrete.*; import org.n52.sos.ogc.gml.time.*;
[ "org.hibernate.criterion", "org.n52.sos" ]
org.hibernate.criterion; org.n52.sos;
2,497,855
public void run(ImportTask task) { try { if (task.readers.isEmpty()) { task.configure(); } for (CSVInput input : config.getInputs()) { for (Reader reader : task.readers.get(input.getFileName())) { try { this.process(input, reader); } catch (IOExcep...
void function(ImportTask task) { try { if (task.readers.isEmpty()) { task.configure(); } for (CSVInput input : config.getInputs()) { for (Reader reader : task.readers.get(input.getFileName())) { try { this.process(input, reader); } catch (IOException e) { if (LOG.isErrorEnabled()) { LOG.error(STR, input.getFileName());...
/** * Run the task from the configured readers * * @param task the task to run */
Run the task from the configured readers
run
{ "repo_name": "axelor/axelor-development-kit", "path": "axelor-core/src/main/java/com/axelor/data/csv/CSVImporter.java", "license": "agpl-3.0", "size": 12626 }
[ "com.axelor.data.ImportException", "com.axelor.data.ImportTask", "java.io.IOException", "java.io.Reader" ]
import com.axelor.data.ImportException; import com.axelor.data.ImportTask; import java.io.IOException; import java.io.Reader;
import com.axelor.data.*; import java.io.*;
[ "com.axelor.data", "java.io" ]
com.axelor.data; java.io;
362,050
public void testGetElements008() { cm = new ContentModel(null); Vector v = new Vector(); cm.getElements(v); assertEquals(1, v.size()); assertEquals("[null]", v.toString()); }
void function() { cm = new ContentModel(null); Vector v = new Vector(); cm.getElements(v); assertEquals(1, v.size()); assertEquals(STR, v.toString()); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)' * ContentModel(null).getElements(new Vector()) Expected: "[null]" */
Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.getElements(Vector)' ContentModel(null).getElements(new Vector()) Expected: "[null]"
testGetElements008
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/swing/src/test/api/java.injected/org/apache/harmony/swing/tests/javax/swing/text/parser/ContentModelCompatilityTest.java", "license": "gpl-2.0", "size": 153261 }
[ "java.util.Vector", "javax.swing.text.html.parser.ContentModel" ]
import java.util.Vector; import javax.swing.text.html.parser.ContentModel;
import java.util.*; import javax.swing.text.html.parser.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
2,387,154
public DataBeadReceiver sendData(DataBead db) { setParams(db); return this; }
DataBeadReceiver function(DataBead db) { setParams(db); return this; }
/** * Sets the pan position with a DataBead. * @see #setParams(DataBead) */
Sets the pan position with a DataBead
sendData
{ "repo_name": "occloxium/Monoid", "path": "beads/src/beads_main/net/beadsproject/beads/ugens/Panner.java", "license": "mit", "size": 5762 }
[ "net.beadsproject.beads.data.DataBead", "net.beadsproject.beads.data.DataBeadReceiver" ]
import net.beadsproject.beads.data.DataBead; import net.beadsproject.beads.data.DataBeadReceiver;
import net.beadsproject.beads.data.*;
[ "net.beadsproject.beads" ]
net.beadsproject.beads;
2,719,510
final Repo repo = new MkGithub().randomRepo(); final String name = "bug"; repo.labels().create(name, "c0c0c0"); final Issue issue = repo.issues().create("title", "body"); issue.labels().add(Collections.singletonList(name)); MatcherAssert.assertThat( issue.labels().ite...
final Repo repo = new MkGithub().randomRepo(); final String name = "bug"; repo.labels().create(name, STR); final Issue issue = repo.issues().create("title", "body"); issue.labels().add(Collections.singletonList(name)); MatcherAssert.assertThat( issue.labels().iterate(), Matchers.<Label>iterableWithSize(1) ); }
/** * MkIssueLabels can list labels. * @throws Exception If some problem inside */
MkIssueLabels can list labels
iteratesIssues
{ "repo_name": "prondzyn/jcabi-github", "path": "src/test/java/com/jcabi/github/mock/MkIssueLabelsTest.java", "license": "bsd-3-clause", "size": 5757 }
[ "com.jcabi.github.Issue", "com.jcabi.github.Label", "com.jcabi.github.Repo", "java.util.Collections", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import com.jcabi.github.Issue; import com.jcabi.github.Label; import com.jcabi.github.Repo; import java.util.Collections; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import com.jcabi.github.*; import java.util.*; import org.hamcrest.*;
[ "com.jcabi.github", "java.util", "org.hamcrest" ]
com.jcabi.github; java.util; org.hamcrest;
760,683
public static Log replay(Log source, Log destination) { if (source instanceof DeferredLog) { ((DeferredLog) source).replayTo(destination); } return destination; }
static Log function(Log source, Log destination) { if (source instanceof DeferredLog) { ((DeferredLog) source).replayTo(destination); } return destination; }
/** * Replay from a source log to a destination log when the source is deferred. * @param source the source logger * @param destination the destination logger * @return the destination */
Replay from a source log to a destination log when the source is deferred
replay
{ "repo_name": "lburgazzoli/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/DeferredLog.java", "license": "apache-2.0", "size": 6288 }
[ "org.apache.commons.logging.Log" ]
import org.apache.commons.logging.Log;
import org.apache.commons.logging.*;
[ "org.apache.commons" ]
org.apache.commons;
2,601,664
@IgniteSpiConfiguration(optional = true) @Deprecated public TcpDiscoverySpi setForceServerMode(boolean forceSrvMode) { this.forceSrvMode = forceSrvMode; return this; }
@IgniteSpiConfiguration(optional = true) TcpDiscoverySpi function(boolean forceSrvMode) { this.forceSrvMode = forceSrvMode; return this; }
/** * Sets force server mode flag. * <p> * If {@code true} TcpDiscoverySpi is started in server mode regardless * of {@link IgniteConfiguration#isClientMode()}. * * @param forceSrvMode forceServerMode flag. * @return {@code this} for chaining. * @deprecated Will be removed at 3.0...
Sets force server mode flag. If true TcpDiscoverySpi is started in server mode regardless of <code>IgniteConfiguration#isClientMode()</code>
setForceServerMode
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java", "license": "apache-2.0", "size": 94998 }
[ "org.apache.ignite.spi.IgniteSpiConfiguration" ]
import org.apache.ignite.spi.IgniteSpiConfiguration;
import org.apache.ignite.spi.*;
[ "org.apache.ignite" ]
org.apache.ignite;
558,308
public void setBusinessObjectService(BusinessObjectService businessObjectService) { this.businessObjectService = businessObjectService; }
void function(BusinessObjectService businessObjectService) { this.businessObjectService = businessObjectService; }
/** * * Convenience method to set the business object service. * @param businessObjectService The reference to the business object service */
Convenience method to set the business object service
setBusinessObjectService
{ "repo_name": "sanjupolus/kc-coeus-1508.3", "path": "coeus-impl/src/main/java/org/kuali/coeus/common/notification/impl/service/impl/KcNotificationModuleRoleServiceImpl.java", "license": "agpl-3.0", "size": 3377 }
[ "org.kuali.rice.krad.service.BusinessObjectService" ]
import org.kuali.rice.krad.service.BusinessObjectService;
import org.kuali.rice.krad.service.*;
[ "org.kuali.rice" ]
org.kuali.rice;
2,367,916
public void store() throws IOException { if (file != null) { store(file); } else { throw new IOException("no configuration file known, use store(File file)"); } }
void function() throws IOException { if (file != null) { store(file); } else { throw new IOException(STR); } }
/** * Store configuration in the file it was loaded from. * @throws IOException */
Store configuration in the file it was loaded from
store
{ "repo_name": "mikegr/snipsnap", "path": "src/org/snipsnap/config/ServerConfiguration.java", "license": "gpl-2.0", "size": 5627 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
172,714
public static HttpResponse readFrom(InputStream in) { InputStreamReader inputStreamReader; try { inputStreamReader = new InputStreamReader(in, StringPool.ISO_8859_1); } catch (UnsupportedEncodingException ignore) { return null; } BufferedReader reader = new BufferedReader(inputStreamReader); HttpR...
static HttpResponse function(InputStream in) { InputStreamReader inputStreamReader; try { inputStreamReader = new InputStreamReader(in, StringPool.ISO_8859_1); } catch (UnsupportedEncodingException ignore) { return null; } BufferedReader reader = new BufferedReader(inputStreamReader); HttpResponse httpResponse = new Ht...
/** * Reads response input stream and returns {@link HttpResponse response}. * Supports both streamed and chunked response. */
Reads response input stream and returns <code>HttpResponse response</code>. Supports both streamed and chunked response
readFrom
{ "repo_name": "wjw465150/jodd", "path": "jodd-http/src/main/java/jodd/http/HttpResponse.java", "license": "bsd-2-clause", "size": 6605 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.io.UnsupportedEncodingException" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
14,946
public String getMergedCountsString(final boolean details) { final StringBuilder builder = new StringBuilder(1024); final Map<String, Integer> syCounts = getSynchronizedCounts(); final Map<String, Integer> ptCounts = getPrimaryThreadCounts(); builder.append('|'); for (final E...
String function(final boolean details) { final StringBuilder builder = new StringBuilder(1024); final Map<String, Integer> syCounts = getSynchronizedCounts(); final Map<String, Integer> ptCounts = getPrimaryThreadCounts(); builder.append(' '); for (final Entry<String, Integer> entry : ptCounts.entrySet()) { final Strin...
/** * Return a String (one line), which summarizes the contents: key * merged-count (pt count / sy count).<br> * Does not acquire any locks. * * @param details * If to show difference of primary thread vs. other threads. * @return */
Return a String (one line), which summarizes the contents: key merged-count (pt count / sy count). Does not acquire any locks
getMergedCountsString
{ "repo_name": "NoCheatPlus/NoCheatPlus", "path": "NCPCore/src/main/java/fr/neatmonster/nocheatplus/stats/Counters.java", "license": "gpl-3.0", "size": 9064 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
121,276
Account followed = accountRepository.findOne(target); Account follower = accountService.getAuthenticatedAccount(); Relationship relationship = relationshipRepository.findTopByFollowerAndFollowed(follower, followed); if (relationship == null) { relationship = new Relationship(); ...
Account followed = accountRepository.findOne(target); Account follower = accountService.getAuthenticatedAccount(); Relationship relationship = relationshipRepository.findTopByFollowerAndFollowed(follower, followed); if (relationship == null) { relationship = new Relationship(); relationship.setFollower(follower); relat...
/** * Toggles relationship (if user is following the target, then unfollows or opposite) * * @param target id of the target account */
Toggles relationship (if user is following the target, then unfollows or opposite)
toggleRelationship
{ "repo_name": "leevilehtonen/cook-a-gram", "path": "src/main/java/com/leevilehtonen/cookagram/service/RelationshipService.java", "license": "mit", "size": 1732 }
[ "com.leevilehtonen.cookagram.domain.Account", "com.leevilehtonen.cookagram.domain.Relationship" ]
import com.leevilehtonen.cookagram.domain.Account; import com.leevilehtonen.cookagram.domain.Relationship;
import com.leevilehtonen.cookagram.domain.*;
[ "com.leevilehtonen.cookagram" ]
com.leevilehtonen.cookagram;
724,130
public static int pickOne(Random r, int[] counts) { int index = r.nextInt(sum(counts)); for (int i = 0; i < counts.length; i++) { if (counts[i] > index) return i; index -= counts[i]; } return -1; }
static int function(Random r, int[] counts) { int index = r.nextInt(sum(counts)); for (int i = 0; i < counts.length; i++) { if (counts[i] > index) return i; index -= counts[i]; } return -1; }
/** * Given `counts` full of nonnegative index counts, returns a random index. * (Like drawing from a bag, with replacement.) * I might want to do something aside from Random.... * @param r * @param array * @return */
Given `counts` full of nonnegative index counts, returns a random index. (Like drawing from a bag, with replacement.) I might want to do something aside from Random...
pickOne
{ "repo_name": "Erhannis/MathNStuff", "path": "src/main/java/com/erhannis/mathnstuff/MeMath.java", "license": "apache-2.0", "size": 40517 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,668,690
public List<Criteria> getOredCriteria() { return oredCriteria; }
List<Criteria> function() { return oredCriteria; }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table EPSS.ES_INIT_POWER_HIS * * @mbggenerated Fri Apr 25 17:26:31 CST 2014 */
This method was generated by MyBatis Generator. This method corresponds to the database table EPSS.ES_INIT_POWER_HIS
getOredCriteria
{ "repo_name": "zhanrui/ky-epss", "path": "src/main/java/epss/repository/model/EsInitPowerHisExample.java", "license": "gpl-2.0", "size": 33323 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,622,797
Assert.notNull(m_configDao); Assert.notNull(m_serviceRegistry); // Registering itself as a northbounder m_registrations.put(getName(), m_serviceRegistry.register(this, Northbounder.class)); // Registering each destination as a northbounder registerNorthbounders(); }
Assert.notNull(m_configDao); Assert.notNull(m_serviceRegistry); m_registrations.put(getName(), m_serviceRegistry.register(this, Northbounder.class)); registerNorthbounders(); }
/** * After properties set. * * @throws Exception the exception */
After properties set
afterPropertiesSet
{ "repo_name": "jeffgdotorg/opennms", "path": "opennms-alarms/syslog-northbounder/src/main/java/org/opennms/netmgt/alarmd/northbounder/syslog/SyslogNorthbounderManager.java", "license": "gpl-2.0", "size": 6134 }
[ "org.opennms.netmgt.alarmd.api.Northbounder", "org.springframework.util.Assert" ]
import org.opennms.netmgt.alarmd.api.Northbounder; import org.springframework.util.Assert;
import org.opennms.netmgt.alarmd.api.*; import org.springframework.util.*;
[ "org.opennms.netmgt", "org.springframework.util" ]
org.opennms.netmgt; org.springframework.util;
586,502
@Override public MetalyzerTime getMetalyzerTime() { time = new MetalyzerTimeImpl(this); return time; }
MetalyzerTime function() { time = new MetalyzerTimeImpl(this); return time; }
/** * Returns a new MetalyzerTime object to set the time for this filter. */
Returns a new MetalyzerTime object to set the time for this filter
getMetalyzerTime
{ "repo_name": "trustathsh/metalyzer", "path": "dataservice-module/src/main/java/de/hshannover/f4/trust/metalyzer/api/impl/MetalyzerFilterImpl.java", "license": "apache-2.0", "size": 6731 }
[ "de.hshannover.f4.trust.metalyzer.api.MetalyzerTime" ]
import de.hshannover.f4.trust.metalyzer.api.MetalyzerTime;
import de.hshannover.f4.trust.metalyzer.api.*;
[ "de.hshannover.f4" ]
de.hshannover.f4;
1,379,678
void registerInterceptor(IClientInterceptor theInterceptor);
void registerInterceptor(IClientInterceptor theInterceptor);
/** * Register a new interceptor for this client. An interceptor can be used to add additional * logging, or add security headers, or pre-process responses, etc. */
Register a new interceptor for this client. An interceptor can be used to add additional logging, or add security headers, or pre-process responses, etc
registerInterceptor
{ "repo_name": "cementsuf/hapi-fhir", "path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java", "license": "apache-2.0", "size": 2778 }
[ "ca.uhn.fhir.rest.client.IClientInterceptor" ]
import ca.uhn.fhir.rest.client.IClientInterceptor;
import ca.uhn.fhir.rest.client.*;
[ "ca.uhn.fhir" ]
ca.uhn.fhir;
2,362,702
protected static File getObjectFile( File sourceFile, File outputDirectory, String objectFileExtension ) throws NativeBuildException { String objectFileName; try { objectFileExtension = AbstractCompiler.getObjectFileExtension( objectFileExtension ); //pl...
static File function( File sourceFile, File outputDirectory, String objectFileExtension ) throws NativeBuildException { String objectFileName; try { objectFileExtension = AbstractCompiler.getObjectFileExtension( objectFileExtension ); objectFileName = FileUtils.basename( sourceFile.getCanonicalPath() ); if ( objectFile...
/** * Figure out the object file relative path from a given source file * @param sourceFile * @param workingDirectory * @param outputDirectory * @param config * @return */
Figure out the object file relative path from a given source file
getObjectFile
{ "repo_name": "dukeboard/maven-native-plugin", "path": "maven-native-api/src/main/java/org/codehaus/mojo/natives/compiler/AbstractCompiler.java", "license": "mit", "size": 8305 }
[ "edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor", "java.io.File", "java.io.IOException", "org.codehaus.mojo.natives.NativeBuildException", "org.codehaus.plexus.util.FileUtils" ]
import edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor; import java.io.File; import java.io.IOException; import org.codehaus.mojo.natives.NativeBuildException; import org.codehaus.plexus.util.FileUtils;
import edu.emory.mathcs.backport.java.util.concurrent.*; import java.io.*; import org.codehaus.mojo.natives.*; import org.codehaus.plexus.util.*;
[ "edu.emory.mathcs", "java.io", "org.codehaus.mojo", "org.codehaus.plexus" ]
edu.emory.mathcs; java.io; org.codehaus.mojo; org.codehaus.plexus;
774,867
@NonNull protected KeyStoreCryptoOperationStreamer createMainDataStreamer( KeyStore keyStore, IBinder operationToken) { return new KeyStoreCryptoOperationChunkedStreamer( new KeyStoreCryptoOperationChunkedStreamer.MainDataStream( keyStore, operationTok...
KeyStoreCryptoOperationStreamer function( KeyStore keyStore, IBinder operationToken) { return new KeyStoreCryptoOperationChunkedStreamer( new KeyStoreCryptoOperationChunkedStreamer.MainDataStream( keyStore, operationToken)); }
/** * Creates a streamer which sends plaintext/ciphertext into the provided KeyStore and receives * the corresponding ciphertext/plaintext from the KeyStore. * * <p>This implementation returns a working streamer. */
Creates a streamer which sends plaintext/ciphertext into the provided KeyStore and receives the corresponding ciphertext/plaintext from the KeyStore. This implementation returns a working streamer
createMainDataStreamer
{ "repo_name": "xorware/android_frameworks_base", "path": "keystore/java/android/security/keystore/AndroidKeyStoreCipherSpiBase.java", "license": "apache-2.0", "size": 35193 }
[ "android.os.IBinder", "android.security.KeyStore" ]
import android.os.IBinder; import android.security.KeyStore;
import android.os.*; import android.security.*;
[ "android.os", "android.security" ]
android.os; android.security;
2,755,953
public void encode(OutputStream output, String charsetName, Indenter indenter) throws UnsupportedEncodingException;
void function(OutputStream output, String charsetName, Indenter indenter) throws UnsupportedEncodingException;
/** * Encodes this element into its XML representation and writes * this encoding to the given <code>OutputStream</code> with * indentation. * * @param output a stream into which the XML-encoded data is written * @param charsetName the character set to use in encoding of strings. * T...
Encodes this element into its XML representation and writes this encoding to the given <code>OutputStream</code> with indentation
encode
{ "repo_name": "GenericBreakGlass/GenericBreakGlass-XACML", "path": "src/com.sun.xacml/src/main/java/com/sun/xacml/PolicyTreeElement.java", "license": "apache-2.0", "size": 5563 }
[ "java.io.OutputStream", "java.io.UnsupportedEncodingException" ]
import java.io.OutputStream; import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
307,955
@Test public void testExcludesAllPositive02() throws Exception { TestPerformer testPerformer; String modelFileName; String oclFileName; oclFileName = "standardlibrary/collection/excludesAllPositive02.ocl"; modelFileName = "testmodel.uml"; testPerformer = TestPerformer.getInstance(AllStandardL...
void function() throws Exception { TestPerformer testPerformer; String modelFileName; String oclFileName; oclFileName = STR; modelFileName = STR; testPerformer = TestPerformer.getInstance(AllStandardLibraryTests.META_MODEL_ID, AllStandardLibraryTests.MODEL_BUNDLE, AllStandardLibraryTests.MODEL_DIRECTORY); testPerformer...
/** * <p> * A test case testing the method * <code>Collection->excludesAll(Collection(T))</code>. * </p> */
A test case testing the method <code>Collection->excludesAll(Collection(T))</code>.
testExcludesAllPositive02
{ "repo_name": "dresden-ocl/dresdenocl", "path": "tests/org.dresdenocl.ocl2parser.test/src/org/dresdenocl/ocl2parser/test/standardlibrary/TestCollection.java", "license": "lgpl-3.0", "size": 77031 }
[ "org.dresdenocl.ocl2parser.test.TestPerformer" ]
import org.dresdenocl.ocl2parser.test.TestPerformer;
import org.dresdenocl.ocl2parser.test.*;
[ "org.dresdenocl.ocl2parser" ]
org.dresdenocl.ocl2parser;
2,058,306
public void writeUTF8(ByteBuffer bb, String value) { bb.clear(); for (int i = 0; i < value.length(); i++) { int ch = value.charAt(i); if (ch > 0 && ch < 0x80) bb.append(ch); else if (ch < 0x800) { bb.append(0xc0 + (ch >> 6)); bb.append(0x80 + (ch & 0x3f)); }...
void function(ByteBuffer bb, String value) { bb.clear(); for (int i = 0; i < value.length(); i++) { int ch = value.charAt(i); if (ch > 0 && ch < 0x80) bb.append(ch); else if (ch < 0x800) { bb.append(0xc0 + (ch >> 6)); bb.append(0x80 + (ch & 0x3f)); } else { bb.append(0xe0 + (ch >> 12)); bb.append(0x80 + ((ch >> 6) & 0x...
/** * Writes UTF-8 */
Writes UTF-8
writeUTF8
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/bytecode/ByteCodeWriter.java", "license": "gpl-2.0", "size": 4886 }
[ "com.caucho.util.ByteBuffer" ]
import com.caucho.util.ByteBuffer;
import com.caucho.util.*;
[ "com.caucho.util" ]
com.caucho.util;
899,752
@Test public void testGetEncodedUrlByArrayMapNullUri(){ Map<String, String[]> keyAndArrayMap = newLinkedHashMap(); keyAndArrayMap.put("province", new String[] { "江苏省" }); keyAndArrayMap.put("city", new String[] { "南通市" }); assertEquals(EMPTY, addParameterArrayValueMap(null, keyA...
void function(){ Map<String, String[]> keyAndArrayMap = newLinkedHashMap(); keyAndArrayMap.put(STR, new String[] { "江苏省" }); keyAndArrayMap.put("city", new String[] { "南通市" }); assertEquals(EMPTY, addParameterArrayValueMap(null, keyAndArrayMap, UTF8)); }
/** * Test get encoded url by array map null uri. */
Test get encoded url by array map null uri
testGetEncodedUrlByArrayMapNullUri
{ "repo_name": "venusdrogon/feilong-core", "path": "src/test/java/com/feilong/core/net/paramutiltest/AddParameterArrayValueMapTest.java", "license": "apache-2.0", "size": 5699 }
[ "com.feilong.core.net.ParamUtil", "com.feilong.core.util.MapUtil", "java.util.Map", "org.junit.Assert" ]
import com.feilong.core.net.ParamUtil; import com.feilong.core.util.MapUtil; import java.util.Map; import org.junit.Assert;
import com.feilong.core.net.*; import com.feilong.core.util.*; import java.util.*; import org.junit.*;
[ "com.feilong.core", "java.util", "org.junit" ]
com.feilong.core; java.util; org.junit;
868,876
public boolean handleFault(SOAPMessageContext context) { log.warn("SoapHeaderHandler.handleFault"); return true; }
boolean function(SOAPMessageContext context) { log.warn(STR); return true; }
/** * Method handles a fault if one occurs * @param context * @return */
Method handles a fault if one occurs
handleFault
{ "repo_name": "alameluchidambaram/CONNECT", "path": "Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/callback/SOAPHeaderHandler.java", "license": "bsd-3-clause", "size": 6913 }
[ "javax.xml.ws.handler.soap.SOAPMessageContext" ]
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.handler.soap.*;
[ "javax.xml" ]
javax.xml;
2,583,257
Map<String, List<NodeId>> getCandidates();
Map<String, List<NodeId>> getCandidates();
/** * Returns the candidates for all known topics. * * @return A mapping from topics to corresponding list of candidates. */
Returns the candidates for all known topics
getCandidates
{ "repo_name": "packet-tracker/onos", "path": "core/api/src/main/java/org/onosproject/cluster/LeadershipService.java", "license": "apache-2.0", "size": 4036 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,452,405
private void addToOrders (final Order newOrder, Map<Double, Order> orders) { if (orders.containsKey(newOrder.getPrice())) { int newVolume = orders.get(newOrder.getPrice()).getVolume() + newOrder.getVolume(); orders.remove(newOrder.getPrice()); orders.put(newOrder.getPric...
void function (final Order newOrder, Map<Double, Order> orders) { if (orders.containsKey(newOrder.getPrice())) { int newVolume = orders.get(newOrder.getPrice()).getVolume() + newOrder.getVolume(); orders.remove(newOrder.getPrice()); orders.put(newOrder.getPrice(), new Order(newOrder.getBookName(), newOrder.getOperation...
/** * Adds specified new order to specified orders map. * @param newOrder specified new order. * @param orders specified orders map. */
Adds specified new order to specified orders map
addToOrders
{ "repo_name": "dionisius1976/java-a-to-z", "path": "chapter_005/7_Additional_XML_Parsing/src/main/java/ru/dionisius/Book.java", "license": "apache-2.0", "size": 5059 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,072,020
public synchronized static SimpleNodeList getElements(String expression, Node node) throws XPathExpressionException { SimpleNodeList nodes = new SimpleNodeList((NodeList)xpath.evaluate(expression, node, XPathConstants.NODESET)); return nodes; }
synchronized static SimpleNodeList function(String expression, Node node) throws XPathExpressionException { SimpleNodeList nodes = new SimpleNodeList((NodeList)xpath.evaluate(expression, node, XPathConstants.NODESET)); return nodes; }
/** * Returns a {@link SimpleNodeList} containing all the nodes that match the given expression * when executed on the given node (as opposed to the dom as a whole). * * @param expression an XPath expression * @param node the contextual node * @return SimpleNodeList containing the results...
Returns a <code>SimpleNodeList</code> containing all the nodes that match the given expression when executed on the given node (as opposed to the dom as a whole)
getElements
{ "repo_name": "sabren/java-XmlHttpRequest", "path": "src/org/jdesktop/xpath/XPathUtils.java", "license": "lgpl-2.1", "size": 7947 }
[ "javax.xml.xpath.XPathConstants", "javax.xml.xpath.XPathExpressionException", "org.jdesktop.dom.SimpleNodeList", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import org.jdesktop.dom.SimpleNodeList; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import javax.xml.xpath.*; import org.jdesktop.dom.*; import org.w3c.dom.*;
[ "javax.xml", "org.jdesktop.dom", "org.w3c.dom" ]
javax.xml; org.jdesktop.dom; org.w3c.dom;
908,169
public DcmElement putDA(int tag, String[] values) { return put( values != null ? StringElement.createDA(tag, values) : StringElement.createDA(tag)); }
DcmElement function(int tag, String[] values) { return put( values != null ? StringElement.createDA(tag, values) : StringElement.createDA(tag)); }
/** * Description of the Method * * @param tag Description of the Parameter * @param values Description of the Parameter * @return Description of the Return Value */
Description of the Method
putDA
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4che14/tags/DCM4CHE_1_4_14/src/java/org/dcm4cheri/data/DcmObjectImpl.java", "license": "apache-2.0", "size": 84001 }
[ "org.dcm4che.data.DcmElement" ]
import org.dcm4che.data.DcmElement;
import org.dcm4che.data.*;
[ "org.dcm4che.data" ]
org.dcm4che.data;
1,078,879
public ContainerSettings containerSettings() { return this.containerSettings; }
ContainerSettings function() { return this.containerSettings; }
/** * Get if the container was downloaded as part of cluster setup then the same container image will be used. If not provided, the job will run on the VM. * * @return the containerSettings value */
Get if the container was downloaded as part of cluster setup then the same container image will be used. If not provided, the job will run on the VM
containerSettings
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/batchai/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/JobInner.java", "license": "mit", "size": 26475 }
[ "com.microsoft.azure.management.batchai.v2018_03_01.ContainerSettings" ]
import com.microsoft.azure.management.batchai.v2018_03_01.ContainerSettings;
import com.microsoft.azure.management.batchai.v2018_03_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,377,076
List<ConversationLink> getOutgoingConversationLinks();
List<ConversationLink> getOutgoingConversationLinks();
/** * Returns the value of the '<em><b>Outgoing Conversation Links</b></em>' reference list. * The list contents are of type {@link org.eclipse.bpmn2.ConversationLink}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Outgoing Conversation Links</em>' reference list isn't clear, ...
Returns the value of the 'Outgoing Conversation Links' reference list. The list contents are of type <code>org.eclipse.bpmn2.ConversationLink</code>. If the meaning of the 'Outgoing Conversation Links' reference list isn't clear, there really should be more of a description here...
getOutgoingConversationLinks
{ "repo_name": "lqjack/fixflow", "path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/InteractionNode.java", "license": "apache-2.0", "size": 2770 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,269,848
// ------------------------------------------------------------------ static public String encode(String s) { try { return encode(s,null); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(e.toString()); } ...
static String function(String s) { try { return encode(s,null); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(e.toString()); } }
/** * Base 64 encode as described in RFC 1421. * <p>Does not insert whitespace as described in RFC 1521. * @param s String to encode. * @return String containing the encoded form of the input. */
Base 64 encode as described in RFC 1421. Does not insert whitespace as described in RFC 1521
encode
{ "repo_name": "xmpace/jetty-read", "path": "jetty-util/src/main/java/org/eclipse/jetty/util/B64Code.java", "license": "apache-2.0", "size": 15320 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
850,367
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieURLGenerator)) { return false; } StandardPieURLGenerator that = (StandardPieURLGenerator) obj; if (!this.prefix.equals(...
boolean function(Object obj) { if (obj == this) { return true; } if (!(obj instanceof StandardPieURLGenerator)) { return false; } StandardPieURLGenerator that = (StandardPieURLGenerator) obj; if (!this.prefix.equals(that.prefix)) { return false; } if (!this.categoryParamName.equals(that.categoryParamName)) { return fal...
/** * Tests if this object is equal to another. * * @param obj the object ({@code null} permitted). * * @return A boolean. */
Tests if this object is equal to another
equals
{ "repo_name": "jfree/jfreechart", "path": "src/main/java/org/jfree/chart/urls/StandardPieURLGenerator.java", "license": "lgpl-2.1", "size": 5547 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,863,015
protected void applyMergedBeanDefinitionPostProcessors(RootBeanDefinition mbd, Class<?> beanType, String beanName) throws BeansException { try { for (BeanPostProcessor bp : getBeanPostProcessors()) { if (bp instanceof MergedBeanDefinitionPostProcessor) { MergedBeanDefinitionPostProcessor bdp = (Mer...
void function(RootBeanDefinition mbd, Class<?> beanType, String beanName) throws BeansException { try { for (BeanPostProcessor bp : getBeanPostProcessors()) { if (bp instanceof MergedBeanDefinitionPostProcessor) { MergedBeanDefinitionPostProcessor bdp = (MergedBeanDefinitionPostProcessor) bp; bdp.postProcessMergedBeanD...
/** * Apply MergedBeanDefinitionPostProcessors to the specified bean definition, * invoking their {@code postProcessMergedBeanDefinition} methods. * @param mbd the merged bean definition for the bean * @param beanType the actual type of the managed bean instance * @param beanName the name of the bean * @thr...
Apply MergedBeanDefinitionPostProcessors to the specified bean definition, invoking their postProcessMergedBeanDefinition methods
applyMergedBeanDefinitionPostProcessors
{ "repo_name": "kingtang/spring-learn", "path": "spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java", "license": "gpl-3.0", "size": 70458 }
[ "org.springframework.beans.BeansException", "org.springframework.beans.factory.BeanCreationException", "org.springframework.beans.factory.config.BeanPostProcessor" ]
import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.beans.*; import org.springframework.beans.factory.*; import org.springframework.beans.factory.config.*;
[ "org.springframework.beans" ]
org.springframework.beans;
679,928
private boolean advanceToNextRow( TreeReaderFactory.TreeReader reader, long nextRow, boolean canAdvanceStripe) throws IOException { long nextRowInStripe = nextRow - rowBaseInStripe; // check for row skipping if (rowIndexStride != 0 && includedRowGroups != null && nextRowInStrip...
boolean function( TreeReaderFactory.TreeReader reader, long nextRow, boolean canAdvanceStripe) throws IOException { long nextRowInStripe = nextRow - rowBaseInStripe; if (rowIndexStride != 0 && includedRowGroups != null && nextRowInStripe < rowCountInStripe) { int rowGroup = (int) (nextRowInStripe / rowIndexStride); if ...
/** * Skip over rows that we aren't selecting, so that the next row is * one that we will read. * * @param nextRow the row we want to go to * @throws IOException */
Skip over rows that we aren't selecting, so that the next row is one that we will read
advanceToNextRow
{ "repo_name": "majetideepak/orc", "path": "java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java", "license": "apache-2.0", "size": 58099 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
373,244
@RequestMapping(value = "/viewplannedcharges", method = RequestMethod.GET) public String viewPlannedCharges(ModelMap map) { logger.debug("### viewPlannedCharges method starting..."); Revision futureRevision = channelService.getFutureRevision(null); Map<Product, List<ProductCharge>> plannedCharges = new...
@RequestMapping(value = STR, method = RequestMethod.GET) String function(ModelMap map) { logger.debug(STR); Revision futureRevision = channelService.getFutureRevision(null); Map<Product, List<ProductCharge>> plannedCharges = new HashMap<Product, List<ProductCharge>>(); for (ProductRevision productRevision : channelServ...
/** * View charges for all products. * * @param map * @return String */
View charges for all products
viewPlannedCharges
{ "repo_name": "backbrainer/cpbm-customization", "path": "citrix.cpbm.custom.portal/src/main/java/com/citrix/cpbm/portal/fragment/controllers/AbstractProductsController.java", "license": "bsd-2-clause", "size": 67633 }
[ "com.vmops.model.CurrencyValue", "com.vmops.model.Product", "com.vmops.model.ProductCharge", "com.vmops.model.ProductRevision", "com.vmops.model.Revision", "java.util.HashMap", "java.util.List", "java.util.Map", "org.springframework.ui.ModelMap", "org.springframework.web.bind.annotation.RequestMap...
import com.vmops.model.CurrencyValue; import com.vmops.model.Product; import com.vmops.model.ProductCharge; import com.vmops.model.ProductRevision; import com.vmops.model.Revision; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.ui.ModelMap; import org.springframework.w...
import com.vmops.model.*; import java.util.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*;
[ "com.vmops.model", "java.util", "org.springframework.ui", "org.springframework.web" ]
com.vmops.model; java.util; org.springframework.ui; org.springframework.web;
1,770,327
public List<Accessor> getConnectionsForQuery(AbstractSession session, DatabaseQuery query, AbstractRecord arguments) { Object value = arguments.get(this.partitionField); List<Accessor> accessors = null; if (value == null) { if (this.unionUnpartitionableQueries) { ...
List<Accessor> function(AbstractSession session, DatabaseQuery query, AbstractRecord arguments) { Object value = arguments.get(this.partitionField); List<Accessor> accessors = null; if (value == null) { if (this.unionUnpartitionableQueries) { accessors = new ArrayList<Accessor>(this.partitions.size()); } else { return ...
/** * INTERNAL: * Get a connection from one of the pools in a round robin rotation fashion. */
Get a connection from one of the pools in a round robin rotation fashion
getConnectionsForQuery
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/partitioning/RangePartitioningPolicy.java", "license": "epl-1.0", "size": 6297 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.persistence.internal.databaseaccess.Accessor", "org.eclipse.persistence.internal.sessions.AbstractRecord", "org.eclipse.persistence.internal.sessions.AbstractSession", "org.eclipse.persistence.queries.DatabaseQuery" ]
import java.util.ArrayList; import java.util.List; import org.eclipse.persistence.internal.databaseaccess.Accessor; import org.eclipse.persistence.internal.sessions.AbstractRecord; import org.eclipse.persistence.internal.sessions.AbstractSession; import org.eclipse.persistence.queries.DatabaseQuery;
import java.util.*; import org.eclipse.persistence.internal.databaseaccess.*; import org.eclipse.persistence.internal.sessions.*; import org.eclipse.persistence.queries.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
2,225,026
Map<DeployedMtaMetadata, Set<String>> servicesMap = new HashMap<>(); Map<DeployedMtaMetadata, List<DeployedMtaModule>> modulesMap = new HashMap<>(); List<String> standaloneApps = new ArrayList<>(); for (CloudApplication app : apps) { String appName = app.getName(); ...
Map<DeployedMtaMetadata, Set<String>> servicesMap = new HashMap<>(); Map<DeployedMtaMetadata, List<DeployedMtaModule>> modulesMap = new HashMap<>(); List<String> standaloneApps = new ArrayList<>(); for (CloudApplication app : apps) { String appName = app.getName(); ApplicationMtaMetadata appMetadata = ApplicationMtaMet...
/** * Detects all deployed components on this platform. * */
Detects all deployed components on this platform
detectAllDeployedComponents
{ "repo_name": "boyan-velinov/cf-mta-deploy-service", "path": "com.sap.cloud.lm.sl.cf.core/src/main/java/com/sap/cloud/lm/sl/cf/core/cf/detect/DeployedComponentsDetector.java", "license": "apache-2.0", "size": 5117 }
[ "com.sap.cloud.lm.sl.cf.core.model.ApplicationMtaMetadata", "com.sap.cloud.lm.sl.cf.core.model.DeployedMtaMetadata", "com.sap.cloud.lm.sl.cf.core.model.DeployedMtaModule", "java.util.ArrayList", "java.util.Date", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.ut...
import com.sap.cloud.lm.sl.cf.core.model.ApplicationMtaMetadata; import com.sap.cloud.lm.sl.cf.core.model.DeployedMtaMetadata; import com.sap.cloud.lm.sl.cf.core.model.DeployedMtaModule; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; import ...
import com.sap.cloud.lm.sl.cf.core.model.*; import java.util.*; import org.cloudfoundry.client.lib.domain.*;
[ "com.sap.cloud", "java.util", "org.cloudfoundry.client" ]
com.sap.cloud; java.util; org.cloudfoundry.client;
1,018,740
List<AnswerHeader> getPrintAnswerHeadersForProtocol(ModuleQuestionnaireBean moduleQuestionnaireBean, String protocolNumber, QuestionnaireHelperBase questionnaireHelper);
List<AnswerHeader> getPrintAnswerHeadersForProtocol(ModuleQuestionnaireBean moduleQuestionnaireBean, String protocolNumber, QuestionnaireHelperBase questionnaireHelper);
/** * * This method is to get all the questionnaire answers to print for the protocol. * This method is intended to obtain the data that will ultimately be used by the protocol actions, print, questionnaire sub-tab. * * @param moduleQuestionnaireBean * @param protocolNumber * @para...
This method is to get all the questionnaire answers to print for the protocol. This method is intended to obtain the data that will ultimately be used by the protocol actions, print, questionnaire sub-tab
getPrintAnswerHeadersForProtocol
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/questionnaire/answer/QuestionnaireAnswerService.java", "license": "apache-2.0", "size": 7893 }
[ "java.util.List", "org.kuali.kra.protocol.questionnaire.QuestionnaireHelperBase" ]
import java.util.List; import org.kuali.kra.protocol.questionnaire.QuestionnaireHelperBase;
import java.util.*; import org.kuali.kra.protocol.questionnaire.*;
[ "java.util", "org.kuali.kra" ]
java.util; org.kuali.kra;
606,472
public MetaProperty<DayCount> dayCount() { return dayCount; }
MetaProperty<DayCount> function() { return dayCount; }
/** * The meta-property for the {@code dayCount} property. * @return the meta-property, not null */
The meta-property for the dayCount property
dayCount
{ "repo_name": "OpenGamma/OG-Commons", "path": "modules/basics/src/main/java/com/opengamma/basics/index/ImmutableOvernightIndex.java", "license": "apache-2.0", "size": 24238 }
[ "com.opengamma.basics.date.DayCount", "org.joda.beans.MetaProperty" ]
import com.opengamma.basics.date.DayCount; import org.joda.beans.MetaProperty;
import com.opengamma.basics.date.*; import org.joda.beans.*;
[ "com.opengamma.basics", "org.joda.beans" ]
com.opengamma.basics; org.joda.beans;
193,272
private Point2D convertPointToPixel(final JXMapViewer map, final Point2D point) { final GeoPosition geoPosition = new GeoPosition(point.getX(), point.getY()); return map.getTileFactory().geoToPixel(geoPosition, map.getZoom()); }
Point2D function(final JXMapViewer map, final Point2D point) { final GeoPosition geoPosition = new GeoPosition(point.getX(), point.getY()); return map.getTileFactory().geoToPixel(geoPosition, map.getZoom()); }
/** * Convert a given point to pixel pos * @param map * @param point * @return */
Convert a given point to pixel pos
convertPointToPixel
{ "repo_name": "jnidzwetzki/bboxdb", "path": "bboxdb-tools/src/main/java/org/bboxdb/tools/gui/views/query/OverlayElement.java", "license": "apache-2.0", "size": 11704 }
[ "java.awt.geom.Point2D", "org.jxmapviewer.JXMapViewer", "org.jxmapviewer.viewer.GeoPosition" ]
import java.awt.geom.Point2D; import org.jxmapviewer.JXMapViewer; import org.jxmapviewer.viewer.GeoPosition;
import java.awt.geom.*; import org.jxmapviewer.*; import org.jxmapviewer.viewer.*;
[ "java.awt", "org.jxmapviewer", "org.jxmapviewer.viewer" ]
java.awt; org.jxmapviewer; org.jxmapviewer.viewer;
2,334,834
@Element( name = "DTMAT", order = 130) public Date getDebtMaturityDate() { return debtMaturityDate; }
@Element( name = "DTMAT", order = 130) Date function() { return debtMaturityDate; }
/** * Gets the date when the debt matures. This is an optional field according to the OFX spec. * * @return the date when the debt matures */
Gets the date when the debt matures. This is an optional field according to the OFX spec
getDebtMaturityDate
{ "repo_name": "stoicflame/ofx4j", "path": "src/main/java/com/webcohesion/ofx4j/domain/data/seclist/DebtSecurityInfo.java", "license": "apache-2.0", "size": 9958 }
[ "com.webcohesion.ofx4j.meta.Element", "java.util.Date" ]
import com.webcohesion.ofx4j.meta.Element; import java.util.Date;
import com.webcohesion.ofx4j.meta.*; import java.util.*;
[ "com.webcohesion.ofx4j", "java.util" ]
com.webcohesion.ofx4j; java.util;
2,675,562
public java.security.PrivateKey getPrivKey() { return privKey; }
java.security.PrivateKey function() { return privKey; }
/** * Gets the private key. * * @return the private key */
Gets the private key
getPrivKey
{ "repo_name": "SafetyCulture/DroidText", "path": "app/src/main/java/com/lowagie/text/pdf/PdfSignatureAppearance.java", "license": "lgpl-3.0", "size": 47358 }
[ "java.security.PrivateKey" ]
import java.security.PrivateKey;
import java.security.*;
[ "java.security" ]
java.security;
2,724,375
public void refreshNodeAttributesToScheduler(NodeId nodeId) { String hostName = nodeId.getHost(); Map<String, Set<NodeAttribute>> newNodeToAttributesMap = new HashMap<>(); Host host = nodeCollections.get(hostName); if (host == null || host.attributes == null) { return; } newNodeT...
void function(NodeId nodeId) { String hostName = nodeId.getHost(); Map<String, Set<NodeAttribute>> newNodeToAttributesMap = new HashMap<>(); Host host = nodeCollections.get(hostName); if (host == null host.attributes == null) { return; } newNodeToAttributesMap.put(hostName, host.attributes.keySet()); if (rmContext != n...
/** * Refresh node attributes on a given node during RM recovery. * @param nodeId Node Id */
Refresh node attributes on a given node during RM recovery
refreshNodeAttributesToScheduler
{ "repo_name": "nandakumar131/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/NodeAttributesManagerImpl.java", "license": "apache-2.0", "size": 26453 }
[ "java.util.HashMap", "java.util.Map", "java.util.Set", "org.apache.hadoop.yarn.api.records.NodeAttribute", "org.apache.hadoop.yarn.api.records.NodeId", "org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.NodeAttributesUpdateSchedulerEvent" ]
import java.util.HashMap; import java.util.Map; import java.util.Set; import org.apache.hadoop.yarn.api.records.NodeAttribute; import org.apache.hadoop.yarn.api.records.NodeId; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.NodeAttributesUpdateSchedulerEvent;
import java.util.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
160,630
public void retryCommit(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault11 { try { InteropUtil.registerDurable2PC(coordinationContext, new CommitFailureDurable2PCParticipant(), new Uid().toString()) ; } catch (final Throwable ...
void function(final CoordinationContextType coordinationContext, final MAP map) throws SoapFault11 { try { InteropUtil.registerDurable2PC(coordinationContext, new CommitFailureDurable2PCParticipant(), new Uid().toString()) ; } catch (final Throwable th) { throw new SoapFault11(th) ; } }
/** * Execute the RetryCommit * @param map The current addressing context. * @throws SoapFault11 for errors during processing */
Execute the RetryCommit
retryCommit
{ "repo_name": "nmcl/wfswarm-example-arjuna-old", "path": "graalvm/transactions/fork/narayana/XTS/localjunit/WSTFSC07-interop/src/main/java/com/jboss/transaction/wstf/webservices/sc007/processors/ParticipantProcessor.java", "license": "apache-2.0", "size": 12252 }
[ "com.arjuna.ats.arjuna.common.Uid", "com.arjuna.webservices11.SoapFault11", "com.jboss.transaction.wstf.webservices.sc007.InteropUtil", "com.jboss.transaction.wstf.webservices.sc007.participant.CommitFailureDurable2PCParticipant", "org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType" ]
import com.arjuna.ats.arjuna.common.Uid; import com.arjuna.webservices11.SoapFault11; import com.jboss.transaction.wstf.webservices.sc007.InteropUtil; import com.jboss.transaction.wstf.webservices.sc007.participant.CommitFailureDurable2PCParticipant; import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext...
import com.arjuna.ats.arjuna.common.*; import com.arjuna.webservices11.*; import com.jboss.transaction.wstf.webservices.sc007.*; import com.jboss.transaction.wstf.webservices.sc007.participant.*; import org.oasis_open.docs.ws_tx.wscoor.*;
[ "com.arjuna.ats", "com.arjuna.webservices11", "com.jboss.transaction", "org.oasis_open.docs" ]
com.arjuna.ats; com.arjuna.webservices11; com.jboss.transaction; org.oasis_open.docs;
89,186
final ByteArrayOutputStream bs = new ByteArrayOutputStream((s.length() / 4) * 3); final char[] c = new char[s.length()]; s.getChars(0, s.length(), c, 0); int endchar = -1; for (int j = 0; j < c.length && endchar == -1; j++) { if (c[j] >= 'A' && c[j] <= 'Z') { c[j] -= 'A'; } else if (c[j] ...
final ByteArrayOutputStream bs = new ByteArrayOutputStream((s.length() / 4) * 3); final char[] c = new char[s.length()]; s.getChars(0, s.length(), c, 0); int endchar = -1; for (int j = 0; j < c.length && endchar == -1; j++) { if (c[j] >= 'A' && c[j] <= 'Z') { c[j] -= 'A'; } else if (c[j] >= 'a' && c[j] <= 'z') { c[j] =...
/** * Helper method for decoding a Base64 string as an byte array. Returns null * on encoding error. This method does not allow any other characters * present in the string then the 65 special base64 chars. */
Helper method for decoding a Base64 string as an byte array. Returns null on encoding error. This method does not allow any other characters present in the string then the 65 special base64 chars
decode64
{ "repo_name": "SDX2000/freeplane", "path": "freeplane/src/org/freeplane/features/encrypt/Base64Coding.java", "license": "gpl-2.0", "size": 4901 }
[ "java.io.ByteArrayOutputStream" ]
import java.io.ByteArrayOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
12,868
private void processLogEntryResponse(LogEntry[] entries, String type, String processPath, JSONArray result) throws JSONException { for (LogEntry logEntry : entries) { try { switch (logEntry.getAction()) { case LogEntry.UPDATE: if (...
void function(LogEntry[] entries, String type, String processPath, JSONArray result) throws JSONException { for (LogEntry logEntry : entries) { try { switch (logEntry.getAction()) { case LogEntry.UPDATE: if (ProcessCenterConstants.AUDIT.PROCESS.equals(type)) filterProcessUpdateLogs(logEntry); getLogEntryJson(logEntry, ...
/** * processes log entry response to a json array * * @param entries log entries taken from the registry logs * @param type log entry type * @param processPath the path to the process asset * @param result resultant json of the log entries * @throws JSONException ...
processes log entry response to a json array
processLogEntryResponse
{ "repo_name": "dimuthnc/product-pc", "path": "modules/components/core/org.wso2.carbon.pc.core/src/main/java/org/wso2/carbon/pc/core/audit/util/LogEntryProcessUtils.java", "license": "apache-2.0", "size": 7350 }
[ "org.json.JSONArray", "org.json.JSONException", "org.wso2.carbon.pc.core.ProcessCenterConstants", "org.wso2.carbon.registry.core.LogEntry" ]
import org.json.JSONArray; import org.json.JSONException; import org.wso2.carbon.pc.core.ProcessCenterConstants; import org.wso2.carbon.registry.core.LogEntry;
import org.json.*; import org.wso2.carbon.pc.core.*; import org.wso2.carbon.registry.core.*;
[ "org.json", "org.wso2.carbon" ]
org.json; org.wso2.carbon;
1,577,558
//----------------------------------------------------------------------- public Object[] toArray() { Object[] result = new Object[size()]; int i = 0; Iterator it = map.keySet().iterator(); while (it.hasNext()) { Object current = it.next(); for (in...
Object[] function() { Object[] result = new Object[size()]; int i = 0; Iterator it = map.keySet().iterator(); while (it.hasNext()) { Object current = it.next(); for (int index = getCount(current); index > 0; index--) { result[i++] = current; } } return result; }
/** * Returns an array of all of this bag's elements. * * @return an array of all of this bag's elements */
Returns an array of all of this bag's elements
toArray
{ "repo_name": "ProfilingLabs/Usemon2", "path": "usemon-agent-commons-java/src/main/java/com/usemon/lib/org/apache/commons/collections/bag/AbstractMapBag.java", "license": "mpl-2.0", "size": 18655 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,129,803
//--------------------------------------------------------------------- private void appendModel(Result result, long model_id) throws Exception { boolean exception = false; int batch[] = { result.getBatch() }, run[] = { 0 }; Statement st = getConnection().createStatement(); // !!!MODOSITAS!!! if (res...
void function(Result result, long model_id) throws Exception { boolean exception = false; int batch[] = { result.getBatch() }, run[] = { 0 }; Statement st = getConnection().createStatement(); if (result.getRun() == -1) throw new Exception(STR); run[0] = result.getRun(); ResultSet rs = null; try { rs = st.executeQuery(S...
/** * This method is part of addResult(result). * @pre <code>result</code> specifies an existing model, which is * found by {name,version} at the specified model_id. */
This method is part of addResult(result)
appendModel
{ "repo_name": "lgulyas/MEME", "path": "src/ai/aitia/meme/database/LocalAPI.java", "license": "gpl-3.0", "size": 43503 }
[ "ai.aitia.meme.MEMEApp", "ai.aitia.meme.database.ColumnType", "ai.aitia.meme.database.Columns", "ai.aitia.meme.database.SQLDialect", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement", "java.util.ArrayList" ]
import ai.aitia.meme.MEMEApp; import ai.aitia.meme.database.ColumnType; import ai.aitia.meme.database.Columns; import ai.aitia.meme.database.SQLDialect; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList;
import ai.aitia.meme.*; import ai.aitia.meme.database.*; import java.sql.*; import java.util.*;
[ "ai.aitia.meme", "java.sql", "java.util" ]
ai.aitia.meme; java.sql; java.util;
2,472,862
public int getGeneralIndex(Test o, boolean filterFixtures) { Vector<RunnerTest> testsToCount = new Vector<RunnerTest>(); for (int i = 0; i < allTests.size(); i++) { if (!(allTests.elementAt(i) instanceof RunnerFixture) || !filterFixtures) { testsToCount.add((RunnerTest) allTests.elementAt(i)); } } ...
int function(Test o, boolean filterFixtures) { Vector<RunnerTest> testsToCount = new Vector<RunnerTest>(); for (int i = 0; i < allTests.size(); i++) { if (!(allTests.elementAt(i) instanceof RunnerFixture) !filterFixtures) { testsToCount.add((RunnerTest) allTests.elementAt(i)); } } for (int i = 0; i < testsToCount.size(...
/** * Gets the index of the test in all scenario's offsprings. If * filterFixtures is set to true, fixtures are filtered from general tests * list.<br> * -1 if test is not found.<br> * Test is identified according to it's handler in the jvm's memory.<br> * */
Gets the index of the test in all scenario's offsprings. If filterFixtures is set to true, fixtures are filtered from general tests list. -1 if test is not found. Test is identified according to it's handler in the jvm's memory
getGeneralIndex
{ "repo_name": "Top-Q/jsystem", "path": "jsystem-core-projects/jsystemCore/src/main/java/jsystem/framework/scenario/JTestContainer.java", "license": "apache-2.0", "size": 39931 }
[ "java.util.Vector", "junit.framework.Test" ]
import java.util.Vector; import junit.framework.Test;
import java.util.*; import junit.framework.*;
[ "java.util", "junit.framework" ]
java.util; junit.framework;
571,709
public static void outputLog(Writer writer) { if (loggingEnabled()) { try { synchronized(times) { for (int i = 0; i < times.size(); ++i) { TimeData td = times.get(i); if (td != null) { ...
static void function(Writer writer) { if (loggingEnabled()) { try { synchronized(times) { for (int i = 0; i < times.size(); ++i) { TimeData td = times.get(i); if (td != null) { writer.write(i + " " + td.getMessage() + STR + (td.getTime() - baseTime) + "\n"); } } } writer.flush(); } catch (Exception e) { System.out.prin...
/** * Outputs all data to parameter-specified Writer object */
Outputs all data to parameter-specified Writer object
outputLog
{ "repo_name": "universsky/openjdk", "path": "jdk/src/java.base/share/classes/sun/misc/PerformanceLogger.java", "license": "gpl-2.0", "size": 10824 }
[ "java.io.Writer" ]
import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
975,519
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { XObject expr1 = m_left.execute(xctxt); if (expr1.bool()) { XObject expr2 = m_right.execute(xctxt); return expr2.bool() ? XBoolean.S_TRUE : XBoolean.S_FALSE; } else return XBoolean.S_...
XObject function(XPathContext xctxt) throws javax.xml.transform.TransformerException { XObject expr1 = m_left.execute(xctxt); if (expr1.bool()) { XObject expr2 = m_right.execute(xctxt); return expr2.bool() ? XBoolean.S_TRUE : XBoolean.S_FALSE; } else return XBoolean.S_FALSE; }
/** * AND two expressions and return the boolean result. Override * superclass method for optimization purposes. * * @param xctxt The runtime execution context. * * @return {@link com.sun.org.apache.xpath.internal.objects.XBoolean#S_TRUE} or * {@link com.sun.org.apache.xpath.internal.objects.XBoole...
AND two expressions and return the boolean result. Override superclass method for optimization purposes
execute
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/com/sun/org/apache/xpath/internal/operations/And.java", "license": "apache-2.0", "size": 2363 }
[ "com.sun.org.apache.xpath.internal.XPathContext", "com.sun.org.apache.xpath.internal.objects.XBoolean", "com.sun.org.apache.xpath.internal.objects.XObject" ]
import com.sun.org.apache.xpath.internal.XPathContext; import com.sun.org.apache.xpath.internal.objects.XBoolean; import com.sun.org.apache.xpath.internal.objects.XObject;
import com.sun.org.apache.xpath.internal.*; import com.sun.org.apache.xpath.internal.objects.*;
[ "com.sun.org" ]
com.sun.org;
2,002,646
@Test public void test_getReversedPayment() { Boolean value = true; instance.setReversedPayment(value); assertEquals("'getReversedPayment' should be correct.", value, instance.getReversedPayment()); }
void function() { Boolean value = true; instance.setReversedPayment(value); assertEquals(STR, value, instance.getReversedPayment()); }
/** * <p> * Accuracy test for the method <code>getReversedPayment()</code>.<br> * The value should be properly retrieved. * </p> */
Accuracy test for the method <code>getReversedPayment()</code>. The value should be properly retrieved.
test_getReversedPayment
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/Data_Migration/src/java/tests/gov/opm/scrd/entities/application/BatchDailyPaymentsUnitTests.java", "license": "apache-2.0", "size": 19516 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,694,535
public String getKickstartHost() { log.debug("KickstartHelper.getKickstartHost()"); // Example proxy header: // X-RHN-Proxy-Auth : 1006681409::1151513167.96:21600.0:VV/xF // NEmCYOuHxEBAs7BEw==:fjs-0-08.rhndev.redhat.com,1006681408 // ::1151513034.3:21600.0:w2lm+XWSFJMVCGBK1...
String function() { log.debug(STR); String proxyHeader = request.getHeader(XRHNPROXYAUTH); log.debug(STR + proxyHeader); if (!StringUtils.isEmpty(proxyHeader)) { String[] proxies = StringUtils.split(proxyHeader, ","); String firstProxy = proxies[0]; log.debug(STR + firstProxy); String[] chunks = StringUtils.split(first...
/** * Get the kickstart host to use. Will use the host of the proxy if the header is * present. If not the code then resorts to getting the cobbler hostname from our * rhn.conf Config. * * @return String representing the Kickstart Host */
Get the kickstart host to use. Will use the host of the proxy if the header is present. If not the code then resorts to getting the cobbler hostname from our rhn.conf Config
getKickstartHost
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/action/kickstart/KickstartHelper.java", "license": "gpl-2.0", "size": 18328 }
[ "com.redhat.rhn.common.conf.ConfigDefaults", "org.apache.commons.lang.StringUtils" ]
import com.redhat.rhn.common.conf.ConfigDefaults; import org.apache.commons.lang.StringUtils;
import com.redhat.rhn.common.conf.*; import org.apache.commons.lang.*;
[ "com.redhat.rhn", "org.apache.commons" ]
com.redhat.rhn; org.apache.commons;
67,980
protected BatchDailyPayments getBatchDailyPayments() { BatchDailyPayments entity = new BatchDailyPayments(); entity.setAuditBatchId(1L); entity.setPayTransactionKey(1); entity.setNumberPaymentToday(1); entity.setBatchTime(new Date()); entity.setAccountStatus(getAcco...
BatchDailyPayments function() { BatchDailyPayments entity = new BatchDailyPayments(); entity.setAuditBatchId(1L); entity.setPayTransactionKey(1); entity.setNumberPaymentToday(1); entity.setBatchTime(new Date()); entity.setAccountStatus(getAccountStatus()); create(entity.getAccountStatus()); entity.setPayTransStatusCode...
/** * Creates an instance of BatchDailyPayments. * * @return the BatchDailyPayments instance. * * @since 1.1 (OPM - Data Migration - Entities Update Module Assembly 1.0) */
Creates an instance of BatchDailyPayments
getBatchDailyPayments
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/BasePersistenceTests.java", "license": "apache-2.0", "size": 58033 }
[ "gov.opm.scrd.entities.application.BatchDailyPayments", "java.math.BigDecimal", "java.util.Date" ]
import gov.opm.scrd.entities.application.BatchDailyPayments; import java.math.BigDecimal; import java.util.Date;
import gov.opm.scrd.entities.application.*; import java.math.*; import java.util.*;
[ "gov.opm.scrd", "java.math", "java.util" ]
gov.opm.scrd; java.math; java.util;
801,020
@Override public Uri insert(Uri uri, ContentValues initialValues) { if( ! initializeDB() ) { Log.w(AUTHORITY,"Database unavailable..."); return null; } ContentValues values = (initialValues != null) ? new ContentValues( initialValues) : new ContentValues(); switch (sU...
Uri function(Uri uri, ContentValues initialValues) { if( ! initializeDB() ) { Log.w(AUTHORITY,STR); return null; } ContentValues values = (initialValues != null) ? new ContentValues( initialValues) : new ContentValues(); switch (sUriMatcher.match(uri)) { case CALLS: database.beginTransaction(); long call_id = database....
/** * Insert entry to the database */
Insert entry to the database
insert
{ "repo_name": "cluo29/com.aware.plugin.trying", "path": "aware-core/src/main/java/com/aware/providers/Communication_Provider.java", "license": "apache-2.0", "size": 11399 }
[ "android.content.ContentUris", "android.content.ContentValues", "android.database.SQLException", "android.database.sqlite.SQLiteDatabase", "android.net.Uri", "android.util.Log" ]
import android.content.ContentUris; import android.content.ContentValues; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.net.Uri; import android.util.Log;
import android.content.*; import android.database.*; import android.database.sqlite.*; import android.net.*; import android.util.*;
[ "android.content", "android.database", "android.net", "android.util" ]
android.content; android.database; android.net; android.util;
2,905,392
public void write(byte[] buffer) { try { mmOutStream.write(buffer); } catch (IOException e) { Log.e(TAG, "Exception during write", e); } } }
void function(byte[] buffer) { try { mmOutStream.write(buffer); } catch (IOException e) { Log.e(TAG, STR, e); } } }
/** * Write to the connected OutStream. * @param buffer The bytes to write */
Write to the connected OutStream
write
{ "repo_name": "myHealthAssistant-tudarmstadt/myHealthHub", "path": "src/de/tudarmstadt/dvs/myhealthassistant/myhealthhub/sensormodules/AbstractBluetoothSensorModule.java", "license": "gpl-3.0", "size": 19791 }
[ "android.util.Log", "java.io.IOException" ]
import android.util.Log; import java.io.IOException;
import android.util.*; import java.io.*;
[ "android.util", "java.io" ]
android.util; java.io;
1,871,322
public Operator getOperator();
Operator function();
/** * Get the expression operator. * * @return the logical operator for the expression */
Get the expression operator
getOperator
{ "repo_name": "zouzhberk/ambaridemo", "path": "demo-server/src/main/java/org/apache/ambari/server/api/predicate/expressions/Expression.java", "license": "apache-2.0", "size": 2775 }
[ "org.apache.ambari.server.api.predicate.operators.Operator" ]
import org.apache.ambari.server.api.predicate.operators.Operator;
import org.apache.ambari.server.api.predicate.operators.*;
[ "org.apache.ambari" ]
org.apache.ambari;
2,190,922
public Bitmap getScaleBitmap(int w, int h) { this.setDrawingCacheEnabled(false); this.setDrawingCacheEnabled(true); return Bitmap.createScaledBitmap(this.getDrawingCache(), w, h, true); }
Bitmap function(int w, int h) { this.setDrawingCacheEnabled(false); this.setDrawingCacheEnabled(true); return Bitmap.createScaledBitmap(this.getDrawingCache(), w, h, true); }
/** * This method gets current canvas as scaled bitmap. * * @return This is returned as scaled bitmap. */
This method gets current canvas as scaled bitmap
getScaleBitmap
{ "repo_name": "Alexendoo/Slide", "path": "app/src/main/java/me/ccrama/redditslide/Views/CanvasView.java", "license": "gpl-3.0", "size": 23453 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,128,488
public RequestCreator placeholder(@DrawableRes int placeholderResId) { if (!setPlaceholder) { throw new IllegalStateException("Already explicitly declared as no placeholder."); } if (placeholderResId == 0) { throw new IllegalArgumentException("Placeholder image resource invalid."); } i...
RequestCreator function(@DrawableRes int placeholderResId) { if (!setPlaceholder) { throw new IllegalStateException(STR); } if (placeholderResId == 0) { throw new IllegalArgumentException(STR); } if (placeholderDrawable != null) { throw new IllegalStateException(STR); } this.placeholderResId = placeholderResId; return ...
/** * A placeholder drawable to be used while the image is being loaded. If the requested image is * not immediately available in the memory cache then this resource will be set on the target * {@link ImageView}. */
A placeholder drawable to be used while the image is being loaded. If the requested image is not immediately available in the memory cache then this resource will be set on the target <code>ImageView</code>
placeholder
{ "repo_name": "MaTriXy/picasso", "path": "picasso/src/main/java/com/squareup/picasso/RequestCreator.java", "license": "apache-2.0", "size": 28386 }
[ "android.support.annotation.DrawableRes" ]
import android.support.annotation.DrawableRes;
import android.support.annotation.*;
[ "android.support" ]
android.support;
2,040,816
public static Player loadGame(String file) throws ClassNotFoundException, IOException, InterruptedException { File check = new File(System.getProperty("user.dir")+"/door_saves/" + file + ".ser"); if(!check.exists()) { System.out.println("No game file found or game is corrupted."); main(argsInt...
static Player function(String file) throws ClassNotFoundException, IOException, InterruptedException { File check = new File(System.getProperty(STR)+STR + file + ".ser"); if(!check.exists()) { System.out.println(STR); main(argsInternal); } FileInputStream fileIn = new FileInputStream(System.getProperty(STR)+STR + file ...
/** * Loads the player in from a saved .ser file * * @param name * @param command * @throws IOException * @throws ClassNotFoundException * @throws InterruptedException */
Loads the player in from a saved .ser file
loadGame
{ "repo_name": "incomingstick/Doors", "path": "src/Game.java", "license": "mit", "size": 5736 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.ObjectInputStream" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream;
import java.io.*;
[ "java.io" ]
java.io;
797,644
log.info("BaseShortenedUrlService init()"); String implementingClass = serverConfigurationService.getString(ShortenedUrlService.IMPLEMENTATION_PROP_NAME, ShortenedUrlService.DEFAULT_IMPLEMENTATION); service = (ShortenedUrlService) ComponentManager.get(implementingClass); log.info("BaseShortenedUrlService init()...
log.info(STR); String implementingClass = serverConfigurationService.getString(ShortenedUrlService.IMPLEMENTATION_PROP_NAME, ShortenedUrlService.DEFAULT_IMPLEMENTATION); service = (ShortenedUrlService) ComponentManager.get(implementingClass); log.info(STR + implementingClass); } /** * @{inheritDoc}
/** * This init method sets up the implementing class that will be used. */
This init method sets up the implementing class that will be used
init
{ "repo_name": "OpenCollabZA/sakai", "path": "shortenedurl/impl/src/java/org/sakaiproject/shortenedurl/impl/BaseShortenedUrlService.java", "license": "apache-2.0", "size": 2334 }
[ "org.sakaiproject.component.cover.ComponentManager", "org.sakaiproject.shortenedurl.api.ShortenedUrlService" ]
import org.sakaiproject.component.cover.ComponentManager; import org.sakaiproject.shortenedurl.api.ShortenedUrlService;
import org.sakaiproject.component.cover.*; import org.sakaiproject.shortenedurl.api.*;
[ "org.sakaiproject.component", "org.sakaiproject.shortenedurl" ]
org.sakaiproject.component; org.sakaiproject.shortenedurl;
2,501,085
public void addOnFocusChangeListener(View.OnFocusChangeListener focusChangeListener){ if(onFocusChangeListeners == null){ onFocusChangeListeners = new LinkedList<View.OnFocusChangeListener>(); } onFocusChangeListeners.add(focusChangeListener); }
void function(View.OnFocusChangeListener focusChangeListener){ if(onFocusChangeListeners == null){ onFocusChangeListeners = new LinkedList<View.OnFocusChangeListener>(); } onFocusChangeListeners.add(focusChangeListener); }
/** * Add a listener that will be called upon when the focus of this binding changes * @param focusChangeListener The listener object that will be notified of the change */
Add a listener that will be called upon when the focus of this binding changes
addOnFocusChangeListener
{ "repo_name": "ProjectGroep1/Joetz-Android-V2", "path": "Joetz_Android_V2/app/src/main/java/com/example/jens/myapplication/domain/binding/ValidatorBinding.java", "license": "gpl-2.0", "size": 5958 }
[ "android.view.View", "java.util.LinkedList" ]
import android.view.View; import java.util.LinkedList;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
1,387,801
public Editor edit() throws IOException { return DiskLruCache.this.edit(key, sequenceNumber); }
Editor function() throws IOException { return DiskLruCache.this.edit(key, sequenceNumber); }
/** * Returns an editor for this snapshot's entry, or null if either the * entry has changed since this snapshot was created or if another edit * is in progress. */
Returns an editor for this snapshot's entry, or null if either the entry has changed since this snapshot was created or if another edit is in progress
edit
{ "repo_name": "IsaacRF/EpicBitmapRenderer", "path": "epicbitmaprenderer/src/main/java/com/isaacrf/epicbitmaprenderer/utils/DiskLruCache.java", "license": "apache-2.0", "size": 41221 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,215,430
public void releaseLock() { mLockGUI.release(); } /////////////////////////////////////////////// //Constructors /////////////////////////////////////////////// public InfoTab( FLAMEClient client, int analysis_id, String analysis_type, String value_type, Display ...
void function() { mLockGUI.release(); } public InfoTab( FLAMEClient client, int analysis_id, String analysis_type, String value_type, Display display, final Shell shell, int mag, TabFolder tabFolder, boolean xteamGUISwitch, boolean twoColumnMode, ScreenLogger screenLogger) { String font_face = STR; int font_size = 9; m...
/** * Releases the outgoing Event semaphore */
Releases the outgoing Event semaphore
releaseLock
{ "repo_name": "ronia/flame", "path": "src/flame/client/xteam/InfoTab.java", "license": "mit", "size": 30289 }
[ "java.util.concurrent.Semaphore", "org.eclipse.swt.graphics.Color", "org.eclipse.swt.graphics.Font", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Display", "org.eclipse.swt.widgets.Group", "org.eclipse.swt.widgets.Label", "org.eclipse.swt.widgets.List", "org.eclipse.swt.widgets.Shell",...
import java.util.concurrent.Semaphore; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.List; import org.e...
import java.util.concurrent.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*;
[ "java.util", "org.eclipse.swt" ]
java.util; org.eclipse.swt;
1,294,532
boolean supersedes(final long primaryTerm, final long version) { return this.primaryTerm > primaryTerm || this.primaryTerm == primaryTerm && this.version > version; } private final Map<String, RetentionLease> leases;
boolean supersedes(final long primaryTerm, final long version) { return this.primaryTerm > primaryTerm this.primaryTerm == primaryTerm && this.version > version; } private final Map<String, RetentionLease> leases;
/** * Checks if this retention leases collection would supersede a retention leases collection with the specified primary term and version. * A retention leases collection supersedes another retention leases collection if its primary term is higher, or if for equal primary * terms its version is higher. ...
Checks if this retention leases collection would supersede a retention leases collection with the specified primary term and version. A retention leases collection supersedes another retention leases collection if its primary term is higher, or if for equal primary terms its version is higher
supersedes
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/seqno/RetentionLeases.java", "license": "apache-2.0", "size": 10595 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,905,522
public Ipv4[] getIpv4InterfaceProperties(Ipv4 inet) { Ipv4[] res = new Ipv4[3]; try { // We launch the ifconfig each time. launch_ifconfig(); // We get the data from the ifconfig. BufferedReader b = new BufferedReader(new InputStreamReader(datas)); // We iterate over the datas. String line...
Ipv4[] function(Ipv4 inet) { Ipv4[] res = new Ipv4[3]; try { launch_ifconfig(); BufferedReader b = new BufferedReader(new InputStreamReader(datas)); String line = STRinet adr:STRinet adr:STRSTRBcast:STRSTRMasque:STRSTR "); res[0] = new Ipv4(inter[inter.length - 5]); res[1] = new Ipv4(inter[inter.length - 3]); res[2] = ...
/** * The detail of the ipv4 interface with the address inet given in String. * Don't work for the loopback address inet. * * @return A list of the ipv4 interface and her three parameters in an array * of three strings with the address inet, the address broadcast and * the address mask. Nul...
The detail of the ipv4 interface with the address inet given in String. Don't work for the loopback address inet
getIpv4InterfaceProperties
{ "repo_name": "prometheus45/Alien_in_town", "path": "trunk/jimmy/Aliens_in_town/src/com/ludosimp/aliens_in_town/models/InterfacesProperties.java", "license": "mit", "size": 3887 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader;
import java.io.*;
[ "java.io" ]
java.io;
2,339,662
public void addTracks(List<Track> tracks, PanelName panelName) { TrackPanel panel = getTrackPanel(panelName.getName()); panel.addTracks(tracks); doRefresh(); }
void function(List<Track> tracks, PanelName panelName) { TrackPanel panel = getTrackPanel(panelName.getName()); panel.addTracks(tracks); doRefresh(); }
/** * Add tracks to the specified panel * * @param tracks * @param panelName * @api */
Add tracks to the specified panel
addTracks
{ "repo_name": "popitsch/varan-gie", "path": "src/org/broad/igv/ui/IGV.java", "license": "mit", "size": 83654 }
[ "java.util.List", "org.broad.igv.track.Track", "org.broad.igv.ui.panel.TrackPanel" ]
import java.util.List; import org.broad.igv.track.Track; import org.broad.igv.ui.panel.TrackPanel;
import java.util.*; import org.broad.igv.track.*; import org.broad.igv.ui.panel.*;
[ "java.util", "org.broad.igv" ]
java.util; org.broad.igv;
61,659
private static Instances getMultiDimContinuousDiv(ArrayList<Attribute> atts, int sampleSetSize, boolean useMid){ int L = Math.min(7, Math.max(sampleSetSize, atts.size()));//7 is chosen for no special reason double maxMinDist = 0, crntMinDist;//work as the threshold to select the sample set ArrayList<Integer...
static Instances function(ArrayList<Attribute> atts, int sampleSetSize, boolean useMid){ int L = Math.min(7, Math.max(sampleSetSize, atts.size())); double maxMinDist = 0, crntMinDist; ArrayList<Integer>[] setWithMaxMinDist=null; for(int i=0; i<L; i++){ ArrayList<Integer>[] setPerm = generateOneSampleSet(sampleSetSize, ...
/** * At current version, we assume all attributes are numeric attributes with bounds * * Let PACE be upper-lower DIVided by the sampleSetSize * * @param useMid true if to use the middle point of a subdomain, false if to use a random point within a subdomain */
At current version, we assume all attributes are numeric attributes with bounds Let PACE be upper-lower DIVided by the sampleSetSize
getMultiDimContinuousDiv
{ "repo_name": "zhuyuqing/bestconf", "path": "src/main/cn/ict/zyq/bestConf/bestConf/sampler/LHSSampler.java", "license": "apache-2.0", "size": 17002 }
[ "java.util.ArrayList", "java.util.Iterator" ]
import java.util.ArrayList; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
564,654
protected NotificationWidgetEvent getEvent() { Cursor cursor = null; NotificationWidgetEvent event = null; try { cursor = getEventCursor(); if (cursor == null) { return null; } event = new NotificationWidgetEvent(mCo...
NotificationWidgetEvent function() { Cursor cursor = null; NotificationWidgetEvent event = null; try { cursor = getEventCursor(); if (cursor == null) { return null; } event = new NotificationWidgetEvent(mContext); event.setContactReference(cursor.getString(cursor .getColumnIndexOrThrow(Notification.EventColumns.CONTACT...
/** * Get the widget event to show. * * @return The widget event to show. */
Get the widget event to show
getEvent
{ "repo_name": "BAILOOL/Assistant-for-People-with-Low-Vision", "path": "GlassApp/smartExtensionUtils/src/main/java/com/sonyericsson/extras/liveware/extension/util/widget/NotificationWidgetExtension.java", "license": "mit", "size": 16258 }
[ "android.database.Cursor", "android.database.SQLException", "com.sonyericsson.extras.liveware.aef.notification.Notification", "com.sonyericsson.extras.liveware.extension.util.Dbg" ]
import android.database.Cursor; import android.database.SQLException; import com.sonyericsson.extras.liveware.aef.notification.Notification; import com.sonyericsson.extras.liveware.extension.util.Dbg;
import android.database.*; import com.sonyericsson.extras.liveware.aef.notification.*; import com.sonyericsson.extras.liveware.extension.util.*;
[ "android.database", "com.sonyericsson.extras" ]
android.database; com.sonyericsson.extras;
463,414
public void setOnBindSuggestionCallback(SearchSuggestionsAdapter.OnBindSuggestionCallback callback) { this.mOnBindSuggestionCallback = callback; if (mSuggestionsAdapter != null) { mSuggestionsAdapter.setOnBindSuggestionCallback(mOnBindSuggestionCallback); } }
void function(SearchSuggestionsAdapter.OnBindSuggestionCallback callback) { this.mOnBindSuggestionCallback = callback; if (mSuggestionsAdapter != null) { mSuggestionsAdapter.setOnBindSuggestionCallback(mOnBindSuggestionCallback); } }
/** * Set a callback that will be called after each suggestion view in the suggestions recycler * list is bound. This allows for customized binding for specific items in the list. * * @param callback A callback to be called after a suggestion is bound by the suggestions list's * ...
Set a callback that will be called after each suggestion view in the suggestions recycler list is bound. This allows for customized binding for specific items in the list
setOnBindSuggestionCallback
{ "repo_name": "maxee/floatingsearchview", "path": "library/src/main/java/com/arlib/floatingsearchview/FloatingSearchView.java", "license": "apache-2.0", "size": 81317 }
[ "com.arlib.floatingsearchview.suggestions.SearchSuggestionsAdapter" ]
import com.arlib.floatingsearchview.suggestions.SearchSuggestionsAdapter;
import com.arlib.floatingsearchview.suggestions.*;
[ "com.arlib.floatingsearchview" ]
com.arlib.floatingsearchview;
787,391
@NonNull public synchronized Credentials getCredentials() { Credentials credentials; if (mUserCredentials != null) { credentials = mUserCredentials; } else { credentials = mClientCredentials; } return credentials; }
synchronized Credentials function() { Credentials credentials; if (mUserCredentials != null) { credentials = mUserCredentials; } else { credentials = mClientCredentials; } return credentials; }
/** * Provides the credentials. * * @return The credentials. */
Provides the credentials
getCredentials
{ "repo_name": "mobgen/halo-android", "path": "sdk/halo-sdk/src/main/java/com/mobgen/halo/android/sdk/core/management/authentication/HaloAuthenticator.java", "license": "apache-2.0", "size": 9885 }
[ "com.mobgen.halo.android.sdk.core.management.models.Credentials" ]
import com.mobgen.halo.android.sdk.core.management.models.Credentials;
import com.mobgen.halo.android.sdk.core.management.models.*;
[ "com.mobgen.halo" ]
com.mobgen.halo;
718,606
@Idempotent public void reportBadBlocks(LocatedBlock[] blocks) throws IOException;
void function(LocatedBlock[] blocks) throws IOException;
/** * The client wants to report corrupted blocks (blocks with specified * locations on datanodes). * @param blocks Array of located blocks to report */
The client wants to report corrupted blocks (blocks with specified locations on datanodes)
reportBadBlocks
{ "repo_name": "iostackproject/FairIO", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 54643 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,080,722
protected void parseSessionSslId(Request request) { if (request.getRequestedSessionId() == null && SSL_ONLY.equals(request.getServletContext() .getEffectiveSessionTrackingModes()) && request.connector.secure) { // TODO Is there a be...
void function(Request request) { if (request.getRequestedSessionId() == null && SSL_ONLY.equals(request.getServletContext() .getEffectiveSessionTrackingModes()) && request.connector.secure) { request.setRequestedSessionId( request.getAttribute(SSLSupport.SESSION_ID_KEY).toString()); request.setRequestedSessionSSL(true)...
/** * Look for SSL session ID if required. Only look for SSL Session ID if it * is the only tracking method enabled. */
Look for SSL session ID if required. Only look for SSL Session ID if it is the only tracking method enabled
parseSessionSslId
{ "repo_name": "thanple/tomcatsrc", "path": "java/org/apache/catalina/connector/CoyoteAdapter.java", "license": "apache-2.0", "size": 55447 }
[ "org.apache.tomcat.util.net.SSLSupport" ]
import org.apache.tomcat.util.net.SSLSupport;
import org.apache.tomcat.util.net.*;
[ "org.apache.tomcat" ]
org.apache.tomcat;
1,509,838
public void caretUpdate (CaretEvent event) { JComponent comp = (JComponent)event.getSource(); String name = comp.getName(); // Minimum players if ("minPlayersTextField".equals (name)) { try { String minPlayersStr = minPlayersTextField.getText().trim(); if (minPla...
void function (CaretEvent event) { JComponent comp = (JComponent)event.getSource(); String name = comp.getName(); if (STR.equals (name)) { try { String minPlayersStr = minPlayersTextField.getText().trim(); if (minPlayersStr.length() != 0 && minPlayersTextField.isEnabled()) { int minPlayers = Integer.parseInt (minPlayer...
/** * Update server properties based on key stroke changes. */
Update server properties based on key stroke changes
caretUpdate
{ "repo_name": "lsilvestre/Jogre", "path": "server/src/org/jogre/server/administrator/AdminServerPropertiesDialog.java", "license": "gpl-2.0", "size": 50813 }
[ "javax.swing.JButton", "javax.swing.JComboBox", "javax.swing.JComponent", "javax.swing.JLabel", "javax.swing.JList", "javax.swing.JPasswordField", "javax.swing.JTextField", "javax.swing.event.CaretEvent", "org.jogre.server.ServerProperties" ]
import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPasswordField; import javax.swing.JTextField; import javax.swing.event.CaretEvent; import org.jogre.server.ServerProperties;
import javax.swing.*; import javax.swing.event.*; import org.jogre.server.*;
[ "javax.swing", "org.jogre.server" ]
javax.swing; org.jogre.server;
157,043
Method setValueMethod() { StringBuilder setter = new StringBuilder(); final Class<?>[] args; if (isMapField()) { setter.append("put"); args = new Class<?>[] {mapKeyField.javaClass(), javaClass()}; } else { args = new Class<?>[] {javaClass()}; if (field.isRepeated()) { s...
Method setValueMethod() { StringBuilder setter = new StringBuilder(); final Class<?>[] args; if (isMapField()) { setter.append("put"); args = new Class<?>[] {mapKeyField.javaClass(), javaClass()}; } else { args = new Class<?>[] {javaClass()}; if (field.isRepeated()) { setter.append("add"); } else { setter.append("set")...
/** * Returns the {@link Method} that sets a single value of the field. For repeated and map fields, * this is the add or put method that only take an individual element; */
Returns the <code>Method</code> that sets a single value of the field. For repeated and map fields, this is the add or put method that only take an individual element
setValueMethod
{ "repo_name": "curioswitch/curiostack", "path": "common/grpc/protobuf-jackson/src/main/java/org/curioswitch/common/protobuf/json/ProtoFieldInfo.java", "license": "mit", "size": 14773 }
[ "com.google.protobuf.Descriptors", "java.lang.reflect.Method" ]
import com.google.protobuf.Descriptors; import java.lang.reflect.Method;
import com.google.protobuf.*; import java.lang.reflect.*;
[ "com.google.protobuf", "java.lang" ]
com.google.protobuf; java.lang;
1,551,354
private File getStatFolder() { // Try to create the file in $ACS_TMP String acstmp = System.getProperty("ACS.tmp","."); if (!acstmp.endsWith(""+File.separator)) { acstmp=acstmp+File.separator; } String acsbaseport = System.getProperty("ACS.baseport","0"); String folderName=acstmp+File.separator+"ACS_I...
File function() { String acstmp = System.getProperty(STR,"."); if (!acstmp.endsWith(STRACS.baseport","0STRACS_INSTANCE.STRAlarm systems statisticss will be recorded in "+folderName); return new File(folderName); }
/** * Get the folder where the files with the statistics will be written * that normally is <code>ACS_TMP/ACS_INSTANCE.n</code> (the fallback is the current folder). * * @return The folder to host file of statistics. */
Get the folder where the files with the statistics will be written that normally is <code>ACS_TMP/ACS_INSTANCE.n</code> (the fallback is the current folder)
getStatFolder
{ "repo_name": "ACS-Community/ACS", "path": "LGPL/CommonSoftware/ACSLaser/laser-core/src/alma/alarmsystem/statistics/StatsCalculator.java", "license": "lgpl-2.1", "size": 10984 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,359,645
public static void showInfo(Activity activity, String message) { SimpleToast.info(activity, message); }
static void function(Activity activity, String message) { SimpleToast.info(activity, message); }
/** * Show info message * * @param activity context of activity * @param message message to be displayed */
Show info message
showInfo
{ "repo_name": "benchakalaka/DrawingMagic", "path": "app/src/main/java/com/drawingmagic/utils/Notification.java", "license": "mit", "size": 4490 }
[ "android.app.Activity", "com.github.pierry.simpletoast.SimpleToast" ]
import android.app.Activity; import com.github.pierry.simpletoast.SimpleToast;
import android.app.*; import com.github.pierry.simpletoast.*;
[ "android.app", "com.github.pierry" ]
android.app; com.github.pierry;
2,054,378
public void testClientMsgsRegionSize() throws Exception { // slow start for dispatcher serverVM0.invoke(ConflationDUnitTest.class, "setIsSlowStart", new Object[] { "30000" }); serverVM1.invoke(ConflationDUnitTest.class, "setIsSlowStart", new Object[] { "30000" }); createClientCache(ge...
void function() throws Exception { serverVM0.invoke(ConflationDUnitTest.class, STR, new Object[] { "30000" }); serverVM1.invoke(ConflationDUnitTest.class, STR, new Object[] { "30000" }); createClientCache(getServerHostName(Host.getHost(0)), new Integer(PORT1), new Integer(PORT2), "1"); final String client1Host = getSer...
/** * This test verifies that the client-messages-region does not store duplicate * ClientUpdateMessageImpl instances, during a normal put path as well as the * GII path. * * @throws Exception */
This test verifies that the client-messages-region does not store duplicate ClientUpdateMessageImpl instances, during a normal put path as well as the GII path
testClientMsgsRegionSize
{ "repo_name": "ysung-pivotal/incubator-geode", "path": "gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java", "license": "apache-2.0", "size": 52392 }
[ "com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest" ]
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
import com.gemstone.gemfire.internal.cache.tier.sockets.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
400,059
@Override public Value evalArray(Env env) { Value array = _expr.evalArray(env); Value index = _index.eval(env); return array.getArray(index); }
Value function(Env env) { Value array = _expr.evalArray(env); Value index = _index.eval(env); return array.getArray(index); }
/** * Evaluates the expression, creating an array if the value is unset. * * @param env the calling environment. * * @return the expression value. */
Evaluates the expression, creating an array if the value is unset
evalArray
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/quercus/src/com/caucho/quercus/expr/ArrayGetExpr.java", "license": "gpl-2.0", "size": 5594 }
[ "com.caucho.quercus.env.Env", "com.caucho.quercus.env.Value" ]
import com.caucho.quercus.env.Env; import com.caucho.quercus.env.Value;
import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
477,398
private static GenericValue createContentWithTemplateBody(Delegator delegator, String templateBody, Map<String, ?> contentFields, Map<String, ?> dataResourceFields) throws CmsException { try { GenericValue dataResource = delegator.makeValue("DataResource", UtilMis...
static GenericValue function(Delegator delegator, String templateBody, Map<String, ?> contentFields, Map<String, ?> dataResourceFields) throws CmsException { try { GenericValue dataResource = delegator.makeValue(STR, UtilMisc.toMap(STR, STR, STR, STR, STR, "NONE")); if (dataResourceFields != null) { dataResource.setNon...
/** * Creates an ElectronicText DataResource and Content and returns the new Content for it. * optional extra manual fields. */
Creates an ElectronicText DataResource and Content and returns the new Content for it. optional extra manual fields
createContentWithTemplateBody
{ "repo_name": "ilscipio/scipio-erp", "path": "applications/cms/src/com/ilscipio/scipio/cms/template/CmsTemplate.java", "license": "apache-2.0", "size": 35510 }
[ "com.ilscipio.scipio.cms.CmsException", "java.util.Map", "org.ofbiz.base.util.UtilMisc", "org.ofbiz.entity.Delegator", "org.ofbiz.entity.GenericEntityException", "org.ofbiz.entity.GenericValue" ]
import com.ilscipio.scipio.cms.CmsException; import java.util.Map; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue;
import com.ilscipio.scipio.cms.*; import java.util.*; import org.ofbiz.base.util.*; import org.ofbiz.entity.*;
[ "com.ilscipio.scipio", "java.util", "org.ofbiz.base", "org.ofbiz.entity" ]
com.ilscipio.scipio; java.util; org.ofbiz.base; org.ofbiz.entity;
2,084,517
@Override public int read(ByteBuffer dst) throws IOException { //if we want to take advantage of the expand function, make sure we only use the ApplicationBufferHandler's buffers if ( dst != bufHandler.getReadBuffer() ) throw new IllegalArgumentException("You can only read using the application ...
int function(ByteBuffer dst) throws IOException { if ( dst != bufHandler.getReadBuffer() ) throw new IllegalArgumentException(STR); if ( closing closed) return -1; if (!handshakeComplete) throw new IllegalStateException(STR); int netread = sc.read(netInBuffer); if (netread == -1) return -1; int read = 0; SSLEngineResul...
/** * Reads a sequence of bytes from this channel into the given buffer. * * @param dst The buffer into which bytes are to be transferred * @return The number of bytes read, possibly zero, or <tt>-1</tt> if the channel has reached end-of-stream * @throws IOException If some other I/O error occu...
Reads a sequence of bytes from this channel into the given buffer
read
{ "repo_name": "plumer/codana", "path": "tomcat_files/8.0.0/SecureNioChannel.java", "license": "mit", "size": 23243 }
[ "java.io.IOException", "java.nio.ByteBuffer", "javax.net.ssl.SSLEngineResult" ]
import java.io.IOException; import java.nio.ByteBuffer; import javax.net.ssl.SSLEngineResult;
import java.io.*; import java.nio.*; import javax.net.ssl.*;
[ "java.io", "java.nio", "javax.net" ]
java.io; java.nio; javax.net;
2,385,318
private static List<CompositeAPIInfoDTO> toCompositeAPIInfo(List<CompositeAPI> apiSummaryList) { List<CompositeAPIInfoDTO> apiInfoList = new ArrayList<>(); for (CompositeAPI apiSummary : apiSummaryList) { CompositeAPIInfoDTO apiInfo = new CompositeAPIInfoDTO(); apiInfo.setId(...
static List<CompositeAPIInfoDTO> function(List<CompositeAPI> apiSummaryList) { List<CompositeAPIInfoDTO> apiInfoList = new ArrayList<>(); for (CompositeAPI apiSummary : apiSummaryList) { CompositeAPIInfoDTO apiInfo = new CompositeAPIInfoDTO(); apiInfo.setId(apiSummary.getId()); apiInfo.setContext(apiSummary.getContext(...
/** * Converts {@link CompositeAPI} List to an {@link CompositeAPIInfoDTO} List. * * @param apiSummaryList * @return */
Converts <code>CompositeAPI</code> List to an <code>CompositeAPIInfoDTO</code> List
toCompositeAPIInfo
{ "repo_name": "Minoli/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/java/org/wso2/carbon/apimgt/rest/api/store/mappings/CompositeAPIMappingUtil.java", "license": "apache-2.0", "size": 3632 }
[ "java.util.ArrayList", "java.util.List", "org.wso2.carbon.apimgt.core.models.CompositeAPI", "org.wso2.carbon.apimgt.rest.api.store.dto.CompositeAPIInfoDTO" ]
import java.util.ArrayList; import java.util.List; import org.wso2.carbon.apimgt.core.models.CompositeAPI; import org.wso2.carbon.apimgt.rest.api.store.dto.CompositeAPIInfoDTO;
import java.util.*; import org.wso2.carbon.apimgt.core.models.*; import org.wso2.carbon.apimgt.rest.api.store.dto.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
1,604,862
public void buildDeckList(List<Sched.DeckDueTreeNode> nodes) { mDeckList.clear(); mNew = mLrn = mRev = 0; processNodes(nodes); notifyDataSetChanged(); }
void function(List<Sched.DeckDueTreeNode> nodes) { mDeckList.clear(); mNew = mLrn = mRev = 0; processNodes(nodes); notifyDataSetChanged(); }
/** * Consume a list of {@link Sched.DeckDueTreeNode}s to render a new deck list. */
Consume a list of <code>Sched.DeckDueTreeNode</code>s to render a new deck list
buildDeckList
{ "repo_name": "PLoginoff/Anki-Android", "path": "AnkiDroid/src/main/java/com/ichi2/anki/widgets/DeckAdapter.java", "license": "gpl-3.0", "size": 11387 }
[ "com.ichi2.libanki.Sched", "java.util.List" ]
import com.ichi2.libanki.Sched; import java.util.List;
import com.ichi2.libanki.*; import java.util.*;
[ "com.ichi2.libanki", "java.util" ]
com.ichi2.libanki; java.util;
51,125
public ServiceResponseWithHeaders<Void, LROSADsDeleteAsyncRelativeRetryNoStatusHeaders> deleteAsyncRelativeRetryNoStatus() throws CloudException, IOException, InterruptedException { Response<ResponseBody> result = service.deleteAsyncRelativeRetryNoStatus(this.client.getAcceptLanguage()).execute(); r...
ServiceResponseWithHeaders<Void, LROSADsDeleteAsyncRelativeRetryNoStatusHeaders> function() throws CloudException, IOException, InterruptedException { Response<ResponseBody> result = service.deleteAsyncRelativeRetryNoStatus(this.client.getAcceptLanguage()).execute(); return client.getAzureClient().getPostOrDeleteResult...
/** * Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. * * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization ...
Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status
deleteAsyncRelativeRetryNoStatus
{ "repo_name": "xingwu1/autorest", "path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROSADsOperationsImpl.java", "license": "mit", "size": 236888 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.azure.CloudException", "com.microsoft.rest.ServiceResponseWithHeaders", "java.io.IOException" ]
import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponseWithHeaders; import java.io.IOException;
import com.google.common.reflect.*; import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*;
[ "com.google.common", "com.microsoft.azure", "com.microsoft.rest", "java.io" ]
com.google.common; com.microsoft.azure; com.microsoft.rest; java.io;
374,050
public static <T> Iterable<T> randomIterable(Collection<T> col) { List<T> list = new ArrayList<>(col); Collections.shuffle(list); return list; }
static <T> Iterable<T> function(Collection<T> col) { List<T> list = new ArrayList<>(col); Collections.shuffle(list); return list; }
/** * Takes given collection, shuffles it and returns iterable instance. * * @param <T> Type of elements to create iterator for. * @param col Collection to shuffle. * @return Iterable instance over randomly shuffled collection. */
Takes given collection, shuffles it and returns iterable instance
randomIterable
{ "repo_name": "shurun19851206/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 289056 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,742,957