method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static <E extends Enum<E>> EnumSet<E> newEnumSet(Iterable<E> iterable, Class<E> elementType) { EnumSet<E> set = EnumSet.noneOf(elementType); Iterables.addAll(set, iterable); return set; } // HashSet
static <E extends Enum<E>> EnumSet<E> function(Iterable<E> iterable, Class<E> elementType) { EnumSet<E> set = EnumSet.noneOf(elementType); Iterables.addAll(set, iterable); return set; }
/** * Returns a new, <i>mutable</i> {@code EnumSet} instance containing the given elements in their * natural order. This method behaves identically to {@link EnumSet#copyOf(Collection)}, but also * accepts non-{@code Collection} iterables and empty iterables. */
Returns a new, mutable EnumSet instance containing the given elements in their natural order. This method behaves identically to <code>EnumSet#copyOf(Collection)</code>, but also accepts non-Collection iterables and empty iterables
newEnumSet
{ "repo_name": "monokurobo/guava", "path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Sets.java", "license": "apache-2.0", "size": 48235 }
[ "java.util.EnumSet" ]
import java.util.EnumSet;
import java.util.*;
[ "java.util" ]
java.util;
2,875,583
public Map<Integer, String> getCodeToNameMap() { return Collections.unmodifiableMap(codeToName); }
Map<Integer, String> function() { return Collections.unmodifiableMap(codeToName); }
/** * Returns an unmodifiable view of the code -> name mapping. * * @return the code -> name map */
Returns an unmodifiable view of the code -> name mapping
getCodeToNameMap
{ "repo_name": "mathieufortin01/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/Encoding.java", "license": "apache-2.0", "size": 4120 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
682,979
public void submitRepQuery() { logger.debug("submitting query to fetch repMasker information from the database"); ResultSet rs = null; m_repMaskNameArray = new String[m_locusArray.length]; m_repMaskClassArray = new String[m_locusArray.length]; m_repMaskFamilyArray = new String[m_locusArray.length]; for (int i = 0; i < m_locusArray.length; i++) { chr = m_locusArray[i].getChr(); startPos = m_locusArray[i].getStartPos(); endPos = m_locusArray[i].getEndPos(); // sql query String queryRepMask = "SELECT repName, repClass, repFamily FROM " + chr + "_" + dbTableName + " WHERE " + startPos + " > genoStart" + " AND " + endPos + " < genoEnd"; try { // submit query to the database rs = m_st.executeQuery(queryRepMask); // if some result exists if (rs.next()) { m_repMaskNameArray[i] = rs.getString(1); m_repMaskClassArray[i] = rs.getString(2); m_repMaskFamilyArray[i] = rs.getString(3); } else{ m_repMaskNameArray[i] = GlobalParameters.STR_EMPTY_VALUE; m_repMaskClassArray[i] = GlobalParameters.STR_EMPTY_VALUE; m_repMaskFamilyArray[i] = GlobalParameters.STR_EMPTY_VALUE; } } catch (final SQLException ex) { logger.debug("cannot execute repeats query"); } finally { try { if (rs != null) { rs.close(); } } catch (SQLException ex) { logger.debug("cannot close resultset for repeats query"); } } } logger.info("repeats query successfully submitted and data retrieved"); }
void function() { logger.debug(STR); ResultSet rs = null; m_repMaskNameArray = new String[m_locusArray.length]; m_repMaskClassArray = new String[m_locusArray.length]; m_repMaskFamilyArray = new String[m_locusArray.length]; for (int i = 0; i < m_locusArray.length; i++) { chr = m_locusArray[i].getChr(); startPos = m_locusArray[i].getStartPos(); endPos = m_locusArray[i].getEndPos(); String queryRepMask = STR + chr + "_" + dbTableName + STR + startPos + STR + STR + endPos + STR; try { rs = m_st.executeQuery(queryRepMask); if (rs.next()) { m_repMaskNameArray[i] = rs.getString(1); m_repMaskClassArray[i] = rs.getString(2); m_repMaskFamilyArray[i] = rs.getString(3); } else{ m_repMaskNameArray[i] = GlobalParameters.STR_EMPTY_VALUE; m_repMaskClassArray[i] = GlobalParameters.STR_EMPTY_VALUE; m_repMaskFamilyArray[i] = GlobalParameters.STR_EMPTY_VALUE; } } catch (final SQLException ex) { logger.debug(STR); } finally { try { if (rs != null) { rs.close(); } } catch (SQLException ex) { logger.debug(STR); } } } logger.info(STR); }
/** * Method to fetch repeats information from the track. * * This method contains instructions to submit sql queries * to the database, and to fetch data from the repeat masker track. * */
Method to fetch repeats information from the track. This method contains instructions to submit sql queries to the database, and to fetch data from the repeat masker track
submitRepQuery
{ "repo_name": "mkumar118/locusvu", "path": "src/backend/GetRepeats.java", "license": "gpl-3.0", "size": 3402 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,897,953
log.debug("Consuming event from url={}", url); final RestTemplate restTemplate = restTemplateFactory .getOAuthRestTemplate(credentials.developerKey, credentials.developerSecret); return execute(url, restTemplate); }
log.debug(STR, url); final RestTemplate restTemplate = restTemplateFactory .getOAuthRestTemplate(credentials.developerKey, credentials.developerSecret); return execute(url, restTemplate); }
/** * Perform "signed fetch" in order to retrieve the payload of an event sent to the connector from the AppMarket * * @param url from which we can fetch the event payload * @param credentials the credentials used to sign the request * @return an {@link EventInfo} instance representing the retrieved payload */
Perform "signed fetch" in order to retrieve the payload of an event sent to the connector from the AppMarket
fetchEvent
{ "repo_name": "AppDirect/service-integration-sdk", "path": "src/main/java/com/appdirect/sdk/appmarket/events/AppmarketEventClient.java", "license": "apache-2.0", "size": 8044 }
[ "org.springframework.web.client.RestTemplate" ]
import org.springframework.web.client.RestTemplate;
import org.springframework.web.client.*;
[ "org.springframework.web" ]
org.springframework.web;
2,252,634
public void addTask(RemoteTenant remoteTenant) { if (pluginTimerTasks != null) { pluginTimerTasks.put(remoteTenant.getId(), new PluginTimerTask(remoteTenant, queue)); } }
void function(RemoteTenant remoteTenant) { if (pluginTimerTasks != null) { pluginTimerTasks.put(remoteTenant.getId(), new PluginTimerTask(remoteTenant, queue)); } }
/** * Add a PluginTimerTask to a Tenant * * @param remoteTenant RemoteTenant */
Add a PluginTimerTask to a Tenant
addTask
{ "repo_name": "ferronrsmith/easyrec", "path": "easyrec-web/src/main/java/org/easyrec/service/web/PluginScheduler.java", "license": "gpl-3.0", "size": 10967 }
[ "org.easyrec.model.core.web.RemoteTenant" ]
import org.easyrec.model.core.web.RemoteTenant;
import org.easyrec.model.core.web.*;
[ "org.easyrec.model" ]
org.easyrec.model;
1,519,577
UserInformation findByUsername(final String username);
UserInformation findByUsername(final String username);
/** * Find user by user name. * @param id * @return */
Find user by user name
findByUsername
{ "repo_name": "mbocek/cuisine", "path": "backend/src/main/java/org/cuisine/repository/UserInformationRepository.java", "license": "apache-2.0", "size": 1201 }
[ "org.cuisine.entity.UserInformation" ]
import org.cuisine.entity.UserInformation;
import org.cuisine.entity.*;
[ "org.cuisine.entity" ]
org.cuisine.entity;
1,956,416
public void setCenterTextTypeface(Typeface t) { ((PieChartRenderer) mRenderer).getPaintCenterText().setTypeface(t); }
void function(Typeface t) { ((PieChartRenderer) mRenderer).getPaintCenterText().setTypeface(t); }
/** * sets the typeface for the center-text paint * * @param t */
sets the typeface for the center-text paint
setCenterTextTypeface
{ "repo_name": "BD-ITAC/BD-ITAC", "path": "mobile/Alertas/MPChartLib/src/main/java/com/github/mikephil/charting/charts/PieChart.java", "license": "mit", "size": 16836 }
[ "android.graphics.Typeface", "com.github.mikephil.charting.renderer.PieChartRenderer" ]
import android.graphics.Typeface; import com.github.mikephil.charting.renderer.PieChartRenderer;
import android.graphics.*; import com.github.mikephil.charting.renderer.*;
[ "android.graphics", "com.github.mikephil" ]
android.graphics; com.github.mikephil;
2,547,057
@Test public void reportMessageTest26() throws PcepParseException, PcepOutOfBoundMessageException { byte[] reportMsg = new byte[]{0x20, 0x0a, 0x00, (byte) 0x58, 0x20, 0x10, 0x00, 0x2c, 0x00, 0x00, 0x10, 0x03, //LSP Object 0x00, 0x12, 0x00, 0x10, //StatefulIPv4LspIdentidiersTlv (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x00, 0x01, (byte) 0x80, 0x01, (byte) 0xb6, 0x02, 0x4e, 0x1f, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //SymbolicPathNameTlv 0x00, 0x14, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, //StatefulLspErrorCodeTlv 0x07, 0x10, 0x00, 0x14, //ERO Object 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, //LSPA Object 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; byte[] testReportMsg = {0}; ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); buffer.writeBytes(reportMsg); PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); PcepMessage message = null; message = reader.readFrom(buffer); assertThat(message, instanceOf(PcepReportMsg.class)); ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); message.writeTo(buf); int readLen = buf.writerIndex(); testReportMsg = new byte[readLen]; buf.readBytes(testReportMsg, 0, readLen); assertThat(testReportMsg, is(reportMsg)); }
void function() throws PcepParseException, PcepOutOfBoundMessageException { byte[] reportMsg = new byte[]{0x20, 0x0a, 0x00, (byte) 0x58, 0x20, 0x10, 0x00, 0x2c, 0x00, 0x00, 0x10, 0x03, 0x00, 0x12, 0x00, 0x10, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x00, 0x01, (byte) 0x80, 0x01, (byte) 0xb6, 0x02, 0x4e, 0x1f, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, 0x00, 0x14, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x07, 0x10, 0x00, 0x14, 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; byte[] testReportMsg = {0}; ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); buffer.writeBytes(reportMsg); PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader(); PcepMessage message = null; message = reader.readFrom(buffer); assertThat(message, instanceOf(PcepReportMsg.class)); ChannelBuffer buf = ChannelBuffers.dynamicBuffer(); message.writeTo(buf); int readLen = buf.writerIndex(); testReportMsg = new byte[readLen]; buf.readBytes(testReportMsg, 0, readLen); assertThat(testReportMsg, is(reportMsg)); }
/** * This test case checks for LSP Object(Symbolic path tlv, StatefulIPv4LspIdentidiersTlv,StatefulLspErrorCodeTlv ) * ERO Object,LSPA Object * in PcRpt message. */
This test case checks for LSP Object(Symbolic path tlv, StatefulIPv4LspIdentidiersTlv,StatefulLspErrorCodeTlv ) ERO Object,LSPA Object in PcRpt message
reportMessageTest26
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepReportMsgTest.java", "license": "apache-2.0", "size": 76875 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.hamcrest.core.Is", "org.jboss.netty.buffer.ChannelBuffer", "org.jboss.netty.buffer.ChannelBuffers", "org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException", "org.onosproject.pcepio.exceptions.PcepParseException" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcepio.exceptions.PcepParseException;
import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*;
[ "org.hamcrest", "org.hamcrest.core", "org.jboss.netty", "org.onosproject.pcepio" ]
org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio;
506,293
@XtextOperator("--") public void operator_moinsMoins() { add(-1); }
@XtextOperator("--") void function() { add(-1); }
/** Increment this matrix: {@code this--}. * * <p>This function is an implementation of the operator for * the languages that defined or based on the * <a href="https://www.eclipse.org/Xtext/">Xtext framework</a>. * * @see #add(double) */
Increment this matrix: this--. This function is an implementation of the operator for the languages that defined or based on the Xtext framework
operator_moinsMoins
{ "repo_name": "tpiotrow/afc", "path": "core/math/src/main/java/org/arakhne/afc/math/matrix/Matrix2d.java", "license": "apache-2.0", "size": 55348 }
[ "org.arakhne.afc.vmutil.annotations.XtextOperator" ]
import org.arakhne.afc.vmutil.annotations.XtextOperator;
import org.arakhne.afc.vmutil.annotations.*;
[ "org.arakhne.afc" ]
org.arakhne.afc;
1,572,666
private static TkhdData parseTkhd(ParsableByteArray tkhd) { tkhd.setPosition(Atom.HEADER_SIZE); int fullAtom = tkhd.readInt(); int version = Atom.parseFullAtomVersion(fullAtom); tkhd.skipBytes(version == 0 ? 8 : 16); int trackId = tkhd.readInt(); tkhd.skipBytes(4); boolean durationUnknown = true; int durationPosition = tkhd.getPosition(); int durationByteCount = version == 0 ? 4 : 8; for (int i = 0; i < durationByteCount; i++) { if (tkhd.data[durationPosition + i] != -1) { durationUnknown = false; break; } } long duration; if (durationUnknown) { tkhd.skipBytes(durationByteCount); duration = C.TIME_UNSET; } else { duration = version == 0 ? tkhd.readUnsignedInt() : tkhd.readUnsignedLongToLong(); if (duration == 0) { // 0 duration normally indicates that the file is fully fragmented (i.e. all of the media // samples are in fragments). Treat as unknown. duration = C.TIME_UNSET; } } tkhd.skipBytes(16); int a00 = tkhd.readInt(); int a01 = tkhd.readInt(); tkhd.skipBytes(4); int a10 = tkhd.readInt(); int a11 = tkhd.readInt(); int rotationDegrees; int fixedOne = 65536; if (a00 == 0 && a01 == fixedOne && a10 == -fixedOne && a11 == 0) { rotationDegrees = 90; } else if (a00 == 0 && a01 == -fixedOne && a10 == fixedOne && a11 == 0) { rotationDegrees = 270; } else if (a00 == -fixedOne && a01 == 0 && a10 == 0 && a11 == -fixedOne) { rotationDegrees = 180; } else { // Only 0, 90, 180 and 270 are supported. Treat anything else as 0. rotationDegrees = 0; } return new TkhdData(trackId, duration, rotationDegrees); }
static TkhdData function(ParsableByteArray tkhd) { tkhd.setPosition(Atom.HEADER_SIZE); int fullAtom = tkhd.readInt(); int version = Atom.parseFullAtomVersion(fullAtom); tkhd.skipBytes(version == 0 ? 8 : 16); int trackId = tkhd.readInt(); tkhd.skipBytes(4); boolean durationUnknown = true; int durationPosition = tkhd.getPosition(); int durationByteCount = version == 0 ? 4 : 8; for (int i = 0; i < durationByteCount; i++) { if (tkhd.data[durationPosition + i] != -1) { durationUnknown = false; break; } } long duration; if (durationUnknown) { tkhd.skipBytes(durationByteCount); duration = C.TIME_UNSET; } else { duration = version == 0 ? tkhd.readUnsignedInt() : tkhd.readUnsignedLongToLong(); if (duration == 0) { duration = C.TIME_UNSET; } } tkhd.skipBytes(16); int a00 = tkhd.readInt(); int a01 = tkhd.readInt(); tkhd.skipBytes(4); int a10 = tkhd.readInt(); int a11 = tkhd.readInt(); int rotationDegrees; int fixedOne = 65536; if (a00 == 0 && a01 == fixedOne && a10 == -fixedOne && a11 == 0) { rotationDegrees = 90; } else if (a00 == 0 && a01 == -fixedOne && a10 == fixedOne && a11 == 0) { rotationDegrees = 270; } else if (a00 == -fixedOne && a01 == 0 && a10 == 0 && a11 == -fixedOne) { rotationDegrees = 180; } else { rotationDegrees = 0; } return new TkhdData(trackId, duration, rotationDegrees); }
/** * Parses a tkhd atom (defined in 14496-12). * * @return An object containing the parsed data. */
Parses a tkhd atom (defined in 14496-12)
parseTkhd
{ "repo_name": "saki4510t/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java", "license": "apache-2.0", "size": 64868 }
[ "com.google.android.exoplayer2.util.ParsableByteArray" ]
import com.google.android.exoplayer2.util.ParsableByteArray;
import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
1,834,952
@Test public void testUpdateChangelistDate() { IChangelist changelist = null; List<IFileSpec> files = null; int randNum = getRandomInt(); String dir = "branch" + randNum; String sourceFile = "//depot/112Dev/GetOpenedFilesTest/src/com/perforce/" + "p4cmd/P4CmdDispatcher.java"; String targetFile = "//depot/112Dev/GetOpenedFilesTest/src/com/perforce/" + dir + "/P4CmdDispatcher.java"; try { // Copy the source file to target changelist = getNewChangelist(server, client, "Dev112_UpdateChangelistDateTest copy files"); assertNotNull(changelist); changelist = client.createChangelist(changelist); files = client.copyFiles(new FileSpec(sourceFile), new FileSpec( targetFile), null, new CopyFilesOptions() .setChangelistId(changelist.getId())); assertNotNull(files); changelist.refresh(); files = changelist.submit(new SubmitOptions()); assertNotNull(files); // Update the submitted changelist date with an older day changelist.refresh(); Calendar cal = Calendar.getInstance(); cal.setTime(changelist.getDate()); cal.add(Calendar.DATE, -30); changelist.setDate(cal.getTime()); changelist.update(true); changelist.refresh(); // The changelist date should be updated assertEquals(cal.getTime().getTime(), changelist.getDate() .getTime()); } catch (P4JavaException e) { fail("Unexpected exception: " + e.getLocalizedMessage()); } finally { if (client != null && server != null) { try { // Delete submitted test files IChangelist deleteChangelist = getNewChangelist(server, client, "Dev112_UpdateChangelistDateTest delete submitted files"); deleteChangelist = client .createChangelist(deleteChangelist); client.deleteFiles(FileSpecBuilder .makeFileSpecList(new String[] { targetFile }), new DeleteFilesOptions() .setChangelistId(deleteChangelist.getId())); deleteChangelist.refresh(); deleteChangelist.submit(null); } catch (P4JavaException e) { // Can't do much here... } } } }
void function() { IChangelist changelist = null; List<IFileSpec> files = null; int randNum = getRandomInt(); String dir = STR + randNum; String sourceFile = STRp4cmd/P4CmdDispatcher.javaSTR + dir + STR; try { changelist = getNewChangelist(server, client, STR); assertNotNull(changelist); changelist = client.createChangelist(changelist); files = client.copyFiles(new FileSpec(sourceFile), new FileSpec( targetFile), null, new CopyFilesOptions() .setChangelistId(changelist.getId())); assertNotNull(files); changelist.refresh(); files = changelist.submit(new SubmitOptions()); assertNotNull(files); changelist.refresh(); Calendar cal = Calendar.getInstance(); cal.setTime(changelist.getDate()); cal.add(Calendar.DATE, -30); changelist.setDate(cal.getTime()); changelist.update(true); changelist.refresh(); assertEquals(cal.getTime().getTime(), changelist.getDate() .getTime()); } catch (P4JavaException e) { fail(STR + e.getLocalizedMessage()); } finally { if (client != null && server != null) { try { IChangelist deleteChangelist = getNewChangelist(server, client, STR); deleteChangelist = client .createChangelist(deleteChangelist); client.deleteFiles(FileSpecBuilder .makeFileSpecList(new String[] { targetFile }), new DeleteFilesOptions() .setChangelistId(deleteChangelist.getId())); deleteChangelist.refresh(); deleteChangelist.submit(null); } catch (P4JavaException e) { } } } }
/** * Test force update of the "Date" field for submitted changelists. */
Test force update of the "Date" field for submitted changelists
testUpdateChangelistDate
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/bug/r112/UpdateChangelistDateTest.java", "license": "apache-2.0", "size": 4784 }
[ "com.perforce.p4java.core.IChangelist", "com.perforce.p4java.core.file.FileSpecBuilder", "com.perforce.p4java.core.file.IFileSpec", "com.perforce.p4java.exception.P4JavaException", "com.perforce.p4java.impl.generic.core.file.FileSpec", "com.perforce.p4java.option.changelist.SubmitOptions", "com.perforce.p4java.option.client.CopyFilesOptions", "com.perforce.p4java.option.client.DeleteFilesOptions", "java.util.Calendar", "java.util.List", "org.junit.Assert" ]
import com.perforce.p4java.core.IChangelist; import com.perforce.p4java.core.file.FileSpecBuilder; import com.perforce.p4java.core.file.IFileSpec; import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.impl.generic.core.file.FileSpec; import com.perforce.p4java.option.changelist.SubmitOptions; import com.perforce.p4java.option.client.CopyFilesOptions; import com.perforce.p4java.option.client.DeleteFilesOptions; import java.util.Calendar; import java.util.List; import org.junit.Assert;
import com.perforce.p4java.core.*; import com.perforce.p4java.core.file.*; import com.perforce.p4java.exception.*; import com.perforce.p4java.impl.generic.core.file.*; import com.perforce.p4java.option.changelist.*; import com.perforce.p4java.option.client.*; import java.util.*; import org.junit.*;
[ "com.perforce.p4java", "java.util", "org.junit" ]
com.perforce.p4java; java.util; org.junit;
1,163,817
public File createNewReportOutput(File reportDirectory) throws Exception{ File dir = new File(reportDirectory, outputDirectory); checkDirectory(dir); return new File(dir, outputFileName); }
File function(File reportDirectory) throws Exception{ File dir = new File(reportDirectory, outputDirectory); checkDirectory(dir); return new File(dir, outputFileName); }
/** * Returns a new file in the outputDirectory, with * the requested report name. */
Returns a new file in the outputDirectory, with the requested report name
createNewReportOutput
{ "repo_name": "Squeegee/batik", "path": "test-sources/org/apache/batik/test/xml/XSLXMLReportConsumer.java", "license": "apache-2.0", "size": 4552 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,410,019
private void initializeSchemas() throws Exception { if ( IS_DEBUG ) { LOG.debug( "Initializing schema" ); } File schemaDirectory = new File( baseDirectory, SchemaConstants.OU_SCHEMA ); String[] ldifFiles = schemaDirectory.list( ldifFilter ); for ( String ldifFile : ldifFiles ) { File file = new File( schemaDirectory, ldifFile ); try { LdifReader reader = new LdifReader( file ); LdifEntry entry = reader.next(); reader.close(); Schema schema = getSchema( entry.getEntry() ); if ( schema == null ) { // The entry was not a schema, skip it continue; } schemaMap.put( schema.getSchemaName(), schema ); if ( IS_DEBUG ) { LOG.debug( "Schema Initialized ... \n{}", schema ); } } catch ( Exception e ) { LOG.error( I18n.err( I18n.ERR_10003, ldifFile ), e ); throw e; } } }
void function() throws Exception { if ( IS_DEBUG ) { LOG.debug( STR ); } File schemaDirectory = new File( baseDirectory, SchemaConstants.OU_SCHEMA ); String[] ldifFiles = schemaDirectory.list( ldifFilter ); for ( String ldifFile : ldifFiles ) { File file = new File( schemaDirectory, ldifFile ); try { LdifReader reader = new LdifReader( file ); LdifEntry entry = reader.next(); reader.close(); Schema schema = getSchema( entry.getEntry() ); if ( schema == null ) { continue; } schemaMap.put( schema.getSchemaName(), schema ); if ( IS_DEBUG ) { LOG.debug( STR, schema ); } } catch ( Exception e ) { LOG.error( I18n.err( I18n.ERR_10003, ldifFile ), e ); throw e; } } }
/** * Scans for LDIF files just describing the various schema contained in * the schema repository. * * @throws Exception */
Scans for LDIF files just describing the various schema contained in the schema repository
initializeSchemas
{ "repo_name": "darranl/directory-shared", "path": "ldap/schema/data/src/main/java/org/apache/directory/api/ldap/schemaloader/LdifSchemaLoader.java", "license": "apache-2.0", "size": 17208 }
[ "java.io.File", "org.apache.directory.api.i18n.I18n", "org.apache.directory.api.ldap.model.constants.SchemaConstants", "org.apache.directory.api.ldap.model.ldif.LdifEntry", "org.apache.directory.api.ldap.model.ldif.LdifReader", "org.apache.directory.api.ldap.model.schema.registries.Schema" ]
import java.io.File; import org.apache.directory.api.i18n.I18n; import org.apache.directory.api.ldap.model.constants.SchemaConstants; import org.apache.directory.api.ldap.model.ldif.LdifEntry; import org.apache.directory.api.ldap.model.ldif.LdifReader; import org.apache.directory.api.ldap.model.schema.registries.Schema;
import java.io.*; import org.apache.directory.api.i18n.*; import org.apache.directory.api.ldap.model.constants.*; import org.apache.directory.api.ldap.model.ldif.*; import org.apache.directory.api.ldap.model.schema.registries.*;
[ "java.io", "org.apache.directory" ]
java.io; org.apache.directory;
2,174,057
private SsaInsn getInsnForMove(SsaInsn moveInsn) { int pred = moveInsn.getBlock().getPredecessors().nextSetBit(0); ArrayList<SsaInsn> predInsns = ssaMeth.getBlocks().get(pred).getInsns(); return predInsns.get(predInsns.size()-1); }
SsaInsn function(SsaInsn moveInsn) { int pred = moveInsn.getBlock().getPredecessors().nextSetBit(0); ArrayList<SsaInsn> predInsns = ssaMeth.getBlocks().get(pred).getInsns(); return predInsns.get(predInsns.size()-1); }
/** * Finds the corresponding instruction for a given move result * * @param moveInsn {@code non-null;} a move result instruction * @return {@code non-null;} the instruction that produces the result for * the move */
Finds the corresponding instruction for a given move result
getInsnForMove
{ "repo_name": "geekboxzone/lollipop_external_dexmaker", "path": "src/dx/java/com/android/dx/ssa/EscapeAnalysis.java", "license": "apache-2.0", "size": 34906 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,322,596
public synchronized void downloadFeed(Context context, Feed feed, boolean loadAllPages) throws DownloadRequestException { if (feedFileValid(feed)) { String username = (feed.getPreferences() != null) ? feed.getPreferences().getUsername() : null; String password = (feed.getPreferences() != null) ? feed.getPreferences().getPassword() : null; long ifModifiedSince = feed.isPaged() ? 0 : feed.getLastUpdate().getTime(); Bundle args = new Bundle(); args.putInt(REQUEST_ARG_PAGE_NR, feed.getPageNr()); args.putBoolean(REQUEST_ARG_LOAD_ALL_PAGES, loadAllPages); download(context, feed, null, new File(getFeedfilePath(context), getFeedfileName(feed)), true, username, password, ifModifiedSince, true, args); } }
synchronized void function(Context context, Feed feed, boolean loadAllPages) throws DownloadRequestException { if (feedFileValid(feed)) { String username = (feed.getPreferences() != null) ? feed.getPreferences().getUsername() : null; String password = (feed.getPreferences() != null) ? feed.getPreferences().getPassword() : null; long ifModifiedSince = feed.isPaged() ? 0 : feed.getLastUpdate().getTime(); Bundle args = new Bundle(); args.putInt(REQUEST_ARG_PAGE_NR, feed.getPageNr()); args.putBoolean(REQUEST_ARG_LOAD_ALL_PAGES, loadAllPages); download(context, feed, null, new File(getFeedfilePath(context), getFeedfileName(feed)), true, username, password, ifModifiedSince, true, args); } }
/** * Downloads a feed * * @param context The application's environment. * @param feed Feed to download * @param loadAllPages Set to true to download all pages */
Downloads a feed
downloadFeed
{ "repo_name": "Woogis/SisatongPodcast", "path": "core/src/main/java/net/sisatong/podcast/core/storage/DownloadRequester.java", "license": "mit", "size": 14361 }
[ "android.content.Context", "android.os.Bundle", "java.io.File", "net.sisatong.podcast.core.feed.Feed" ]
import android.content.Context; import android.os.Bundle; import java.io.File; import net.sisatong.podcast.core.feed.Feed;
import android.content.*; import android.os.*; import java.io.*; import net.sisatong.podcast.core.feed.*;
[ "android.content", "android.os", "java.io", "net.sisatong.podcast" ]
android.content; android.os; java.io; net.sisatong.podcast;
55,323
StructureRecordDto<ProfileFilterDto> findProfileFilterRecordBySchemaIdAndEndpointGroupId(String schemaId, String endpointGroupId);
StructureRecordDto<ProfileFilterDto> findProfileFilterRecordBySchemaIdAndEndpointGroupId(String schemaId, String endpointGroupId);
/** * Find profile filter record by schema id and endpoint group id. * * @param schemaId the schema id * @param endpointGroupId the endpoint group id * @return the structure record dto */
Find profile filter record by schema id and endpoint group id
findProfileFilterRecordBySchemaIdAndEndpointGroupId
{ "repo_name": "vzhukovskyi/kaa", "path": "server/common/dao/src/main/java/org/kaaproject/kaa/server/common/dao/ProfileService.java", "license": "apache-2.0", "size": 5786 }
[ "org.kaaproject.kaa.common.dto.ProfileFilterDto", "org.kaaproject.kaa.common.dto.StructureRecordDto" ]
import org.kaaproject.kaa.common.dto.ProfileFilterDto; import org.kaaproject.kaa.common.dto.StructureRecordDto;
import org.kaaproject.kaa.common.dto.*;
[ "org.kaaproject.kaa" ]
org.kaaproject.kaa;
1,667,318
public static A_GNSS_ProvideAssistanceData fromPerAligned(byte[] encodedBytes) { A_GNSS_ProvideAssistanceData result = new A_GNSS_ProvideAssistanceData(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
static A_GNSS_ProvideAssistanceData function(byte[] encodedBytes) { A_GNSS_ProvideAssistanceData result = new A_GNSS_ProvideAssistanceData(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new A_GNSS_ProvideAssistanceData from encoded stream. */
Creates a new A_GNSS_ProvideAssistanceData from encoded stream
fromPerAligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/lpp_ver12/A_GNSS_ProvideAssistanceData.java", "license": "apache-2.0", "size": 9988 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
2,914,378
public List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty> addExtendedProperties(List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty> extendedProperties) throws Exception { MozuClient<List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty>> client = com.mozu.api.clients.commerce.carts.ExtendedPropertyClient.addExtendedPropertiesClient( extendedProperties); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); }
List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty> function(List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty> extendedProperties) throws Exception { MozuClient<List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty>> client = com.mozu.api.clients.commerce.carts.ExtendedPropertyClient.addExtendedPropertiesClient( extendedProperties); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); }
/** * * <p><pre><code> * ExtendedProperty extendedproperty = new ExtendedProperty(); * ExtendedProperty extendedProperty = extendedproperty.addExtendedProperties( extendedProperties); * </code></pre></p> * @param extendedProperties The details of the new extended property. * @return List<com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty> * @see com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty * @see com.mozu.api.contracts.commerceruntime.commerce.ExtendedProperty */
<code><code> ExtendedProperty extendedproperty = new ExtendedProperty(); ExtendedProperty extendedProperty = extendedproperty.addExtendedProperties( extendedProperties); </code></code>
addExtendedProperties
{ "repo_name": "Mozu/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/carts/ExtendedPropertyResource.java", "license": "mit", "size": 16662 }
[ "com.mozu.api.MozuClient", "java.util.List" ]
import com.mozu.api.MozuClient; import java.util.List;
import com.mozu.api.*; import java.util.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
301,498
void enterCommentString(@NotNull CQLParser.CommentStringContext ctx); void exitCommentString(@NotNull CQLParser.CommentStringContext ctx);
void enterCommentString(@NotNull CQLParser.CommentStringContext ctx); void exitCommentString(@NotNull CQLParser.CommentStringContext ctx);
/** * Exit a parse tree produced by {@link CQLParser#commentString}. */
Exit a parse tree produced by <code>CQLParser#commentString</code>
exitCommentString
{ "repo_name": "HuaweiBigData/StreamCQL", "path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java", "license": "apache-2.0", "size": 58667 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,798,858
private AbstractServiceResponse modifyGetCapabilitiesResponse(GetCapabilitiesRequest request, GetCapabilitiesResponse response) throws OwsExceptionReport { if (response.getCapabilities().isSetContents()) { for (SosObservationOffering sosObservationOffering : response.getCapabilities().getContents()) { if (sosObservationOffering.isSetObservedArea()) { SosEnvelope observedArea = sosObservationOffering.getObservedArea(); int targetSrid = getRequestedCrs(request); Envelope transformEnvelope = getGeomtryHandler().transformEnvelope(observedArea.getEnvelope(), observedArea.getSrid(), targetSrid); observedArea.setEnvelope(transformEnvelope); observedArea.setSrid(targetSrid); sosObservationOffering.setObservedArea(observedArea); } } } return response; }
AbstractServiceResponse function(GetCapabilitiesRequest request, GetCapabilitiesResponse response) throws OwsExceptionReport { if (response.getCapabilities().isSetContents()) { for (SosObservationOffering sosObservationOffering : response.getCapabilities().getContents()) { if (sosObservationOffering.isSetObservedArea()) { SosEnvelope observedArea = sosObservationOffering.getObservedArea(); int targetSrid = getRequestedCrs(request); Envelope transformEnvelope = getGeomtryHandler().transformEnvelope(observedArea.getEnvelope(), observedArea.getSrid(), targetSrid); observedArea.setEnvelope(transformEnvelope); observedArea.setSrid(targetSrid); sosObservationOffering.setObservedArea(observedArea); } } } return response; }
/** * Modify the GetCapabilities response * * @param request * the GetCapabilities request * @return Modified the GetCapabilities request * @param response * the GetCapabilities response * @return Modified the GetCapabilities response * @throws OwsExceptionReport * If an error occurs */
Modify the GetCapabilities response
modifyGetCapabilitiesResponse
{ "repo_name": "ahuarte47/SOS", "path": "converter/transformation/coordinate/src/main/java/org/n52/sos/converter/CoordinateTransformator.java", "license": "gpl-2.0", "size": 42198 }
[ "com.vividsolutions.jts.geom.Envelope", "org.n52.sos.ogc.ows.OwsExceptionReport", "org.n52.sos.ogc.sos.SosEnvelope", "org.n52.sos.ogc.sos.SosObservationOffering", "org.n52.sos.request.GetCapabilitiesRequest", "org.n52.sos.response.AbstractServiceResponse", "org.n52.sos.response.GetCapabilitiesResponse" ]
import com.vividsolutions.jts.geom.Envelope; import org.n52.sos.ogc.ows.OwsExceptionReport; import org.n52.sos.ogc.sos.SosEnvelope; import org.n52.sos.ogc.sos.SosObservationOffering; import org.n52.sos.request.GetCapabilitiesRequest; import org.n52.sos.response.AbstractServiceResponse; import org.n52.sos.response.GetCapabilitiesResponse;
import com.vividsolutions.jts.geom.*; import org.n52.sos.ogc.ows.*; import org.n52.sos.ogc.sos.*; import org.n52.sos.request.*; import org.n52.sos.response.*;
[ "com.vividsolutions.jts", "org.n52.sos" ]
com.vividsolutions.jts; org.n52.sos;
1,353,064
TestSuite suite = new ConcurrentTestSuite("Search tests"); suite.addTestSuite(SimpleQueryTest.class); suite.addTestSuite(FulltextQueryTest.class); suite.addTestSuite(SelectClauseTest.class); suite.addTestSuite(SQLTest.class); suite.addTestSuite(JoinTest.class); suite.addTestSuite(OrderByTest.class); suite.addTestSuite(XPathAxisTest.class); suite.addTestSuite(SkipDeletedNodesTest.class); suite.addTestSuite(SkipDeniedNodesTest.class); suite.addTestSuite(MixinTest.class); suite.addTestSuite(DerefTest.class); suite.addTestSuite(VersionStoreQueryTest.class); suite.addTestSuite(UpperLowerCaseQueryTest.class); suite.addTestSuite(ChildAxisQueryTest.class); suite.addTestSuite(QueryResultTest.class); suite.addTestSuite(FnNameQueryTest.class); suite.addTestSuite(PathQueryNodeTest.class); suite.addTestSuite(ExcerptTest.class); suite.addTestSuite(ShareableNodeTest.class); suite.addTestSuite(ParentNodeTest.class); suite.addTestSuite(SimilarQueryTest.class); suite.addTestSuite(FulltextSQL2QueryTest.class); suite.addTestSuite(LimitAndOffsetTest.class); suite.addTestSuite(SQL2NodeLocalNameTest.class); suite.addTestSuite(SQL2OuterJoinTest.class); suite.addTestSuite(SQL2PathEscapingTest.class); suite.addTestSuite(SQL2QueryResultTest.class); suite.addTestSuite(LimitedAccessQueryTest.class); suite.addTestSuite(SQL2OffsetLimitTest.class); suite.addTestSuite(SQL2OrderByTest.class); suite.addTestSuite(DescendantSelfAxisTest.class); return suite; }
TestSuite suite = new ConcurrentTestSuite(STR); suite.addTestSuite(SimpleQueryTest.class); suite.addTestSuite(FulltextQueryTest.class); suite.addTestSuite(SelectClauseTest.class); suite.addTestSuite(SQLTest.class); suite.addTestSuite(JoinTest.class); suite.addTestSuite(OrderByTest.class); suite.addTestSuite(XPathAxisTest.class); suite.addTestSuite(SkipDeletedNodesTest.class); suite.addTestSuite(SkipDeniedNodesTest.class); suite.addTestSuite(MixinTest.class); suite.addTestSuite(DerefTest.class); suite.addTestSuite(VersionStoreQueryTest.class); suite.addTestSuite(UpperLowerCaseQueryTest.class); suite.addTestSuite(ChildAxisQueryTest.class); suite.addTestSuite(QueryResultTest.class); suite.addTestSuite(FnNameQueryTest.class); suite.addTestSuite(PathQueryNodeTest.class); suite.addTestSuite(ExcerptTest.class); suite.addTestSuite(ShareableNodeTest.class); suite.addTestSuite(ParentNodeTest.class); suite.addTestSuite(SimilarQueryTest.class); suite.addTestSuite(FulltextSQL2QueryTest.class); suite.addTestSuite(LimitAndOffsetTest.class); suite.addTestSuite(SQL2NodeLocalNameTest.class); suite.addTestSuite(SQL2OuterJoinTest.class); suite.addTestSuite(SQL2PathEscapingTest.class); suite.addTestSuite(SQL2QueryResultTest.class); suite.addTestSuite(LimitedAccessQueryTest.class); suite.addTestSuite(SQL2OffsetLimitTest.class); suite.addTestSuite(SQL2OrderByTest.class); suite.addTestSuite(DescendantSelfAxisTest.class); return suite; }
/** * Returns a <code>Test</code> suite that executes all tests inside this * package. * * @return a <code>Test</code> suite that executes all tests inside this * package. */
Returns a <code>Test</code> suite that executes all tests inside this package
suite
{ "repo_name": "sdmcraft/jackrabbit", "path": "jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/TestAll.java", "license": "apache-2.0", "size": 3083 }
[ "junit.framework.TestSuite", "org.apache.jackrabbit.test.ConcurrentTestSuite" ]
import junit.framework.TestSuite; import org.apache.jackrabbit.test.ConcurrentTestSuite;
import junit.framework.*; import org.apache.jackrabbit.test.*;
[ "junit.framework", "org.apache.jackrabbit" ]
junit.framework; org.apache.jackrabbit;
1,195,104
@ColorInt public static int getMiniThumbnailFrameColor(Context context, boolean isIncognito) { return ApiCompatibilityUtils.getColor(context.getResources(), isIncognito ? R.color.tab_grid_card_divider_tint_color_incognito : R.color.tab_grid_card_divider_tint_color); }
static int function(Context context, boolean isIncognito) { return ApiCompatibilityUtils.getColor(context.getResources(), isIncognito ? R.color.tab_grid_card_divider_tint_color_incognito : R.color.tab_grid_card_divider_tint_color); }
/** * Returns the mini-thumbnail frame color for the multi-thumbnail tab grid card based on the * incognito mode. * * @param context {@link Context} used to retrieve color. * @param isIncognito Whether the color is used for incognito mode. * @return The mini-thumbnail frame color. */
Returns the mini-thumbnail frame color for the multi-thumbnail tab grid card based on the incognito mode
getMiniThumbnailFrameColor
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiColorProvider.java", "license": "bsd-3-clause", "size": 8105 }
[ "android.content.Context", "org.chromium.base.ApiCompatibilityUtils" ]
import android.content.Context; import org.chromium.base.ApiCompatibilityUtils;
import android.content.*; import org.chromium.base.*;
[ "android.content", "org.chromium.base" ]
android.content; org.chromium.base;
1,503,529
public static ImageAction fromStringRepresentation(String representation) throws IllegalArgumentException { try { return getGsonInstance().fromJson(representation, ImageAction.class); } catch (JsonSyntaxException e) { throw new IllegalArgumentException(e); } }
static ImageAction function(String representation) throws IllegalArgumentException { try { return getGsonInstance().fromJson(representation, ImageAction.class); } catch (JsonSyntaxException e) { throw new IllegalArgumentException(e); } }
/** * Returns an {@link ImageAction} object represented by the string. * * @param representation a string representation of an object * @throws IllegalArgumentException the string is not a valid representation of an object */
Returns an <code>ImageAction</code> object represented by the string
fromStringRepresentation
{ "repo_name": "deliciousblackink/Derpibooru", "path": "app/src/main/java/derpibooru/derpy/ui/views/htmltextview/imageactions/ImageAction.java", "license": "bsd-3-clause", "size": 3256 }
[ "com.google.gson.JsonSyntaxException" ]
import com.google.gson.JsonSyntaxException;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
2,551,093
public void updateACL() throws Exception { long startTime = System.currentTimeMillis(); ArrayList<ACLOperation> ACLUpdates = new ArrayList<ACLOperation>(); Link lk = new Link(new ContentName(userNamespace, userNames[2])); ACLUpdates.add(ACLOperation.addReaderOperation(lk)); _AliceACM.updateACL(baseDirectory, ACLUpdates); System.out.println("updateACL: " + (System.currentTimeMillis() - startTime)); }
void function() throws Exception { long startTime = System.currentTimeMillis(); ArrayList<ACLOperation> ACLUpdates = new ArrayList<ACLOperation>(); Link lk = new Link(new ContentName(userNamespace, userNames[2])); ACLUpdates.add(ACLOperation.addReaderOperation(lk)); _AliceACM.updateACL(baseDirectory, ACLUpdates); System.out.println(STR + (System.currentTimeMillis() - startTime)); }
/** * Add Carol as a reader to the ACL on baseDirectory */
Add Carol as a reader to the ACL on baseDirectory
updateACL
{ "repo_name": "gujianxiao/gatewayForMulticom", "path": "javasrc/src/test/org/ndnx/ndn/profiles/security/access/group/ACPerformanceTestRepo.java", "license": "lgpl-2.1", "size": 8669 }
[ "java.util.ArrayList", "org.ndnx.ndn.io.content.Link", "org.ndnx.ndn.profiles.security.access.group.ACL", "org.ndnx.ndn.protocol.ContentName" ]
import java.util.ArrayList; import org.ndnx.ndn.io.content.Link; import org.ndnx.ndn.profiles.security.access.group.ACL; import org.ndnx.ndn.protocol.ContentName;
import java.util.*; import org.ndnx.ndn.io.content.*; import org.ndnx.ndn.profiles.security.access.group.*; import org.ndnx.ndn.protocol.*;
[ "java.util", "org.ndnx.ndn" ]
java.util; org.ndnx.ndn;
2,240,614
protected void processUnknownStartOption(final String key, final String value, final Map<String, Object> options, final List<String> vmArgs, final Properties props) { throw new IllegalArgumentException( LocalizedStrings.CacheServerLauncher_UNKNOWN_ARGUMENT_0.toLocalizedString(key)); }
void function(final String key, final String value, final Map<String, Object> options, final List<String> vmArgs, final Properties props) { throw new IllegalArgumentException( LocalizedStrings.CacheServerLauncher_UNKNOWN_ARGUMENT_0.toLocalizedString(key)); }
/** * Process a command-line option of the form "-key=value" unknown to the base class. */
Process a command-line option of the form "-key=value" unknown to the base class
processUnknownStartOption
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/CacheServerLauncher.java", "license": "apache-2.0", "size": 49453 }
[ "java.util.List", "java.util.Map", "java.util.Properties", "org.apache.geode.internal.i18n.LocalizedStrings" ]
import java.util.List; import java.util.Map; import java.util.Properties; import org.apache.geode.internal.i18n.LocalizedStrings;
import java.util.*; import org.apache.geode.internal.i18n.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
1,855,899
@CanIgnoreReturnValue @Override SortedSet<V> removeAll(@Nullable Object key);
SortedSet<V> removeAll(@Nullable Object key);
/** * Removes all values associated with a given key. * * <p>Because a {@code SortedSetMultimap} has unique sorted values for a given key, this method * returns a {@link SortedSet}, instead of the {@link java.util.Collection} specified in the * {@link Multimap} interface. */
Removes all values associated with a given key. Because a SortedSetMultimap has unique sorted values for a given key, this method returns a <code>SortedSet</code>, instead of the <code>java.util.Collection</code> specified in the <code>Multimap</code> interface
removeAll
{ "repo_name": "rgoldberg/guava", "path": "guava/src/com/google/common/collect/SortedSetMultimap.java", "license": "apache-2.0", "size": 4536 }
[ "java.util.SortedSet", "org.checkerframework.checker.nullness.qual.Nullable" ]
import java.util.SortedSet; import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.*; import org.checkerframework.checker.nullness.qual.*;
[ "java.util", "org.checkerframework.checker" ]
java.util; org.checkerframework.checker;
1,066,997
DeviceId deviceId();
DeviceId deviceId();
/** * Returns the ONOS deviceID for this device. * * @return DeviceId */
Returns the ONOS deviceID for this device
deviceId
{ "repo_name": "Shashikanth-Huawei/bmp", "path": "protocols/rest/api/src/main/java/org/onosproject/protocol/rest/RestSBDevice.java", "license": "apache-2.0", "size": 1916 }
[ "org.onosproject.net.DeviceId" ]
import org.onosproject.net.DeviceId;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,693,249
public void setPredictedColumns(Set<Column> columns) { this.predictedColumns = columns; }
void function(Set<Column> columns) { this.predictedColumns = columns; }
/** * Sets the {@link Set} of predictedColumns * @param columns */
Sets the <code>Set</code> of predictedColumns
setPredictedColumns
{ "repo_name": "rhyolight/htm.java", "path": "src/main/java/org/numenta/nupic/Connections.java", "license": "gpl-3.0", "size": 47639 }
[ "java.util.Set", "org.numenta.nupic.model.Column" ]
import java.util.Set; import org.numenta.nupic.model.Column;
import java.util.*; import org.numenta.nupic.model.*;
[ "java.util", "org.numenta.nupic" ]
java.util; org.numenta.nupic;
752,946
// TODO Auto-generated method stub FilterBankPreprocessing fbp = new FilterBankPreprocessing(); TimeDomainFeatureExtraction tdfe = new TimeDomainFeatureExtraction(); double[][] mfccMatrix = null; double[] features = null; try { mfccMatrix = fbp.getMfcc(input); features = tdfe.getTimeDomainFeatures(mfccMatrix); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return features; }
FilterBankPreprocessing fbp = new FilterBankPreprocessing(); TimeDomainFeatureExtraction tdfe = new TimeDomainFeatureExtraction(); double[][] mfccMatrix = null; double[] features = null; try { mfccMatrix = fbp.getMfcc(input); features = tdfe.getTimeDomainFeatures(mfccMatrix); } catch (IOException e) { e.printStackTrace(); } return features; }
/** * Extract the Audio features */
Extract the Audio features
extractFeature
{ "repo_name": "ubiquitous-computing-lab/Mining-Minds", "path": "information-curation-layer/low-level-context-awareness/src/org/uclab/mm/icl/llc/AER/jh/AERFeatureExtraction.java", "license": "apache-2.0", "size": 1829 }
[ "java.io.IOException", "org.uclab.mm.icl.llc.MachineLearningTools" ]
import java.io.IOException; import org.uclab.mm.icl.llc.MachineLearningTools;
import java.io.*; import org.uclab.mm.icl.llc.*;
[ "java.io", "org.uclab.mm" ]
java.io; org.uclab.mm;
2,446,704
public void initializeSimulationDriverData(FileSystemDriver initialDriver, ProcessContext context) throws IOException, DriverAlreadySetException;
void function(FileSystemDriver initialDriver, ProcessContext context) throws IOException, DriverAlreadySetException;
/** * performs simulation-specific driver initializations */
performs simulation-specific driver initializations
initializeSimulationDriverData
{ "repo_name": "chfoo/areca-backup-release-mirror", "path": "src/com/application/areca/impl/handler/ArchiveHandler.java", "license": "gpl-2.0", "size": 3956 }
[ "com.application.areca.context.ProcessContext", "java.io.IOException" ]
import com.application.areca.context.ProcessContext; import java.io.IOException;
import com.application.areca.context.*; import java.io.*;
[ "com.application.areca", "java.io" ]
com.application.areca; java.io;
551,478
public static EventLoopGroup newEventLoopGroup(int numThreads, String threadNamePrefix) { return newEventLoopGroup(numThreads, threadNamePrefix, false); }
static EventLoopGroup function(int numThreads, String threadNamePrefix) { return newEventLoopGroup(numThreads, threadNamePrefix, false); }
/** * Returns a newly-created {@link EventLoopGroup}. * * @param numThreads the number of event loop threads * @param threadNamePrefix the prefix of thread names */
Returns a newly-created <code>EventLoopGroup</code>
newEventLoopGroup
{ "repo_name": "anuraaga/armeria", "path": "core/src/main/java/com/linecorp/armeria/common/util/EventLoopGroups.java", "license": "apache-2.0", "size": 7505 }
[ "io.netty.channel.EventLoopGroup" ]
import io.netty.channel.EventLoopGroup;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
2,290,806
public void getStatisticsOnMyAccount(String sessionId, AsyncCallback<String> callBack);
void function(String sessionId, AsyncCallback<String> callBack);
/** * returns a string containing some data regarding the user's account * @param sessionId the session id associated to this new connection * @return a string containing some data regarding the user's account */
returns a string containing some data regarding the user's account
getStatisticsOnMyAccount
{ "repo_name": "sandrineBeauche/scheduling-portal", "path": "scheduler-portal/src/main/java/org/ow2/proactive_grid_cloud_portal/scheduler/client/SchedulerServiceAsync.java", "license": "agpl-3.0", "size": 13955 }
[ "com.google.gwt.user.client.rpc.AsyncCallback" ]
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.*;
[ "com.google.gwt" ]
com.google.gwt;
1,188,982
public Builder setLevel(final Level level) { this.level = level; return this; }
Builder function(final Level level) { this.level = level; return this; }
/** * Sets the logging level to use. */
Sets the logging level to use
setLevel
{ "repo_name": "xnslong/logging-log4j2", "path": "log4j-core/src/main/java/org/apache/logging/log4j/core/filter/BurstFilter.java", "license": "apache-2.0", "size": 12345 }
[ "org.apache.logging.log4j.Level" ]
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.*;
[ "org.apache.logging" ]
org.apache.logging;
1,122,668
public T getStrategy(final String fieldName) { try { return fieldStrategyCache.get(fieldName, () -> newSpatialStrategy(fieldName)); } catch (ExecutionException e) { throw Throwables.propagate(e.getCause()); } }
T function(final String fieldName) { try { return fieldStrategyCache.get(fieldName, () -> newSpatialStrategy(fieldName)); } catch (ExecutionException e) { throw Throwables.propagate(e.getCause()); } }
/** * Gets the cached strategy for this field, creating it if necessary via {@link * #newSpatialStrategy(String)}. * * @param fieldName Mandatory reference to the field name * @return Non-null. */
Gets the cached strategy for this field, creating it if necessary via <code>#newSpatialStrategy(String)</code>
getStrategy
{ "repo_name": "apache/solr", "path": "solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java", "license": "apache-2.0", "size": 17916 }
[ "com.google.common.base.Throwables", "java.util.concurrent.ExecutionException" ]
import com.google.common.base.Throwables; import java.util.concurrent.ExecutionException;
import com.google.common.base.*; import java.util.concurrent.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
782,965
@Override public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<scratchpad xmlns=\"scratchpad:notes\">"); if (getNotes() != null) { buf.append("<text>").append(getNotes()).append("</text>"); } buf.append("</scratchpad>"); return buf.toString(); } public static class Provider implements PrivateDataProvider { private final PrivateNotes notes = new PrivateNotes(); public Provider() { super(); }
String function() { StringBuilder buf = new StringBuilder(); buf.append(STRscratchpad:notes\">"); if (getNotes() != null) { buf.append(STR).append(getNotes()).append(STR); } buf.append(STR); return buf.toString(); } public static class Provider implements PrivateDataProvider { private final PrivateNotes notes = new PrivateNotes(); public Provider() { super(); }
/** * Returns the XML reppresentation of the PrivateData. * * @return the private data as XML. */
Returns the XML reppresentation of the PrivateData
toXML
{ "repo_name": "speedy01/Spark", "path": "core/src/main/java/org/jivesoftware/sparkimpl/plugin/scratchpad/PrivateNotes.java", "license": "apache-2.0", "size": 4745 }
[ "org.jivesoftware.smackx.iqprivate.provider.PrivateDataProvider" ]
import org.jivesoftware.smackx.iqprivate.provider.PrivateDataProvider;
import org.jivesoftware.smackx.iqprivate.provider.*;
[ "org.jivesoftware.smackx" ]
org.jivesoftware.smackx;
1,840,989
public NdArray<T> fromDense(NdArray<T> src) { DataBuffer<T> buffer = DataBuffers.ofObjects(type, src.size()); src.read(buffer); write(buffer); return this; }
NdArray<T> function(NdArray<T> src) { DataBuffer<T> buffer = DataBuffers.ofObjects(type, src.size()); src.read(buffer); write(buffer); return this; }
/** * Populates this sparse array from a dense array * * @param src the dense array * @return this sparse array */
Populates this sparse array from a dense array
fromDense
{ "repo_name": "tensorflow/java-ndarray", "path": "ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java", "license": "apache-2.0", "size": 15390 }
[ "org.tensorflow.ndarray.NdArray", "org.tensorflow.ndarray.buffer.DataBuffer", "org.tensorflow.ndarray.buffer.DataBuffers" ]
import org.tensorflow.ndarray.NdArray; import org.tensorflow.ndarray.buffer.DataBuffer; import org.tensorflow.ndarray.buffer.DataBuffers;
import org.tensorflow.ndarray.*; import org.tensorflow.ndarray.buffer.*;
[ "org.tensorflow.ndarray" ]
org.tensorflow.ndarray;
2,224,102
public List<String> getWarnings() { return impl.getWarnings(); }
List<String> function() { return impl.getWarnings(); }
/** * Returns a list of warnings about problems encountered by previous parse calls. */
Returns a list of warnings about problems encountered by previous parse calls
getWarnings
{ "repo_name": "anupcshan/bazel", "path": "src/main/java/com/google/devtools/common/options/OptionsParser.java", "license": "apache-2.0", "size": 21059 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
732,543
public static Operator readFrom(DataInput input) throws IOException { int b = input.readInt(); for (Operator operator : values()) if (operator.b == b) return operator; throw new IOException(String.format("Cannot resolve Relation.Type from binary representation: %s", b)); }
static Operator function(DataInput input) throws IOException { int b = input.readInt(); for (Operator operator : values()) if (operator.b == b) return operator; throw new IOException(String.format(STR, b)); }
/** * Deserializes a <code>Operator</code> instance from the specified input. * * @param input the input to read from * @return the <code>Operator</code> instance deserialized * @throws IOException if a problem occurs while deserializing the <code>Type</code> instance. */
Deserializes a <code>Operator</code> instance from the specified input
readFrom
{ "repo_name": "tjake/cassandra", "path": "src/java/org/apache/cassandra/cql3/Operator.java", "license": "apache-2.0", "size": 7225 }
[ "java.io.DataInput", "java.io.IOException" ]
import java.io.DataInput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
928,658
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<EndpointInner>> getWithResponseAsync( String resourceGroupName, String profileName, String endpointName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (profileName == null) { return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null.")); } if (endpointName == null) { return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), resourceGroupName, profileName, endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); }
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<EndpointInner>> function( String resourceGroupName, String profileName, String endpointName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException(STR)); } if (profileName == null) { return Mono.error(new IllegalArgumentException(STR)); } if (endpointName == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( STR)); } context = this.client.mergeContext(context); return service .get( this.client.getEndpoint(), resourceGroupName, profileName, endpointName, this.client.getSubscriptionId(), this.client.getApiVersion(), context); }
/** * Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group * and profile. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the CDN profile which is unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an existing CDN endpoint with the specified endpoint name under the specified subscription, resource * group and profile. */
Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile
getWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/EndpointsClientImpl.java", "license": "mit", "size": 169310 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.cdn.fluent.models.EndpointInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.cdn.fluent.models.EndpointInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.cdn.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,602,151
public Map<String, MemoryUsage> getMemoryUsageAfterGc() { return Collections.unmodifiableMap(usageAfterGc); } /** * Returns a {@code GcInfo} object represented by the * given {@code CompositeData}. The given * {@code CompositeData} must contain * all the following attributes: * * <blockquote> * <table border> * <tr> * <th align=left>Attribute Name</th> * <th align=left>Type</th> * </tr> * <tr> * <td>index</td> * <td>{@code java.lang.Long}</td> * </tr> * <tr> * <td>startTime</td> * <td>{@code java.lang.Long}</td> * </tr> * <tr> * <td>endTime</td> * <td>{@code java.lang.Long}</td> * </tr> * <tr> * <td>memoryUsageBeforeGc</td> * <td>{@code javax.management.openmbean.TabularData}</td> * </tr> * <tr> * <td>memoryUsageAfterGc</td> * <td>{@code javax.management.openmbean.TabularData}</td> * </tr> * </table> * </blockquote> * * @throws IllegalArgumentException if {@code cd} does not * represent a {@code GcInfo} object with the attributes * described above. * * @return a {@code GcInfo} object represented by {@code cd}
Map<String, MemoryUsage> function() { return Collections.unmodifiableMap(usageAfterGc); } /** * Returns a {@code GcInfo} object represented by the * given {@code CompositeData}. The given * {@code CompositeData} must contain * all the following attributes: * * <blockquote> * <table border> * <tr> * <th align=left>Attribute Name</th> * <th align=left>Type</th> * </tr> * <tr> * <td>index</td> * <td>{@code java.lang.Long}</td> * </tr> * <tr> * <td>startTime</td> * <td>{@code java.lang.Long}</td> * </tr> * <tr> * <td>endTime</td> * <td>{@code java.lang.Long}</td> * </tr> * <tr> * <td>memoryUsageBeforeGc</td> * <td>{@code javax.management.openmbean.TabularData}</td> * </tr> * <tr> * <td>memoryUsageAfterGc</td> * <td>{@code javax.management.openmbean.TabularData}</td> * </tr> * </table> * </blockquote> * * @throws IllegalArgumentException if {@code cd} does not * represent a {@code GcInfo} object with the attributes * described above. * * @return a {@code GcInfo} object represented by {@code cd}
/** * Returns the memory usage of all memory pools * at the end of this GC. * This method returns * a {@code Map} of the name of a memory pool * to the memory usage of the corresponding * memory pool when GC finishes. * * @return a {@code Map} of memory pool names to the memory * usage of a memory pool when GC finishes. */
Returns the memory usage of all memory pools at the end of this GC. This method returns a Map of the name of a memory pool to the memory usage of the corresponding memory pool when GC finishes
getMemoryUsageAfterGc
{ "repo_name": "shelan/jdk9-mirror", "path": "jdk/src/jdk.management/share/classes/com/sun/management/GcInfo.java", "license": "gpl-2.0", "size": 9327 }
[ "java.lang.management.MemoryUsage", "java.util.Collections", "java.util.Map", "javax.management.openmbean.CompositeData" ]
import java.lang.management.MemoryUsage; import java.util.Collections; import java.util.Map; import javax.management.openmbean.CompositeData;
import java.lang.management.*; import java.util.*; import javax.management.openmbean.*;
[ "java.lang", "java.util", "javax.management" ]
java.lang; java.util; javax.management;
2,839,620
EClass getProcessRefEnd();
EClass getProcessRefEnd();
/** * Returns the meta object for class '{@link org.lunifera.doc.dsl.doccompiler.ProcessRefEnd <em>Process Ref End</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Process Ref End</em>'. * @see org.lunifera.doc.dsl.doccompiler.ProcessRefEnd * @generated */
Returns the meta object for class '<code>org.lunifera.doc.dsl.doccompiler.ProcessRefEnd Process Ref End</code>'.
getProcessRefEnd
{ "repo_name": "lunifera/lunifera-doc", "path": "org.lunifera.doc.dsl.semantic/src/org/lunifera/doc/dsl/doccompiler/DocCompilerPackage.java", "license": "epl-1.0", "size": 267430 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
428,142
public GroupDescription.Basic parseId(String id) { AccountGroup.UUID uuid = new AccountGroup.UUID(id); if (groupBackend.handles(uuid)) { GroupDescription.Basic d = groupBackend.get(uuid); if (d != null) { return d; } } // Might be a legacy AccountGroup.Id. if (id.matches("^[1-9][0-9]*$")) { try { AccountGroup.Id legacyId = AccountGroup.Id.parse(id); return groupControlFactory.controlFor(legacyId).getGroup(); } catch (IllegalArgumentException | NoSuchGroupException e) { // Ignored } } // Might be a group name, be nice and accept unique names. GroupReference ref = GroupBackends.findExactSuggestion(groupBackend, id); if (ref != null) { GroupDescription.Basic d = groupBackend.get(ref.getUUID()); if (d != null) { return d; } } return null; }
GroupDescription.Basic function(String id) { AccountGroup.UUID uuid = new AccountGroup.UUID(id); if (groupBackend.handles(uuid)) { GroupDescription.Basic d = groupBackend.get(uuid); if (d != null) { return d; } } if (id.matches(STR)) { try { AccountGroup.Id legacyId = AccountGroup.Id.parse(id); return groupControlFactory.controlFor(legacyId).getGroup(); } catch (IllegalArgumentException NoSuchGroupException e) { } } GroupReference ref = GroupBackends.findExactSuggestion(groupBackend, id); if (ref != null) { GroupDescription.Basic d = groupBackend.get(ref.getUUID()); if (d != null) { return d; } } return null; }
/** * Parses a group ID and returns the group without making any permission * check whether the current user can see the group. * * @param id ID of the group, can be a group UUID, a group name or a legacy * group ID * @return the group, null if no group is found for the given group ID */
Parses a group ID and returns the group without making any permission check whether the current user can see the group
parseId
{ "repo_name": "MerritCR/merrit", "path": "gerrit-server/src/main/java/com/google/gerrit/server/group/GroupsCollection.java", "license": "apache-2.0", "size": 6792 }
[ "com.google.gerrit.common.data.GroupDescription", "com.google.gerrit.common.data.GroupReference", "com.google.gerrit.common.errors.NoSuchGroupException", "com.google.gerrit.reviewdb.client.AccountGroup", "com.google.gerrit.server.account.GroupBackends" ]
import com.google.gerrit.common.data.GroupDescription; import com.google.gerrit.common.data.GroupReference; import com.google.gerrit.common.errors.NoSuchGroupException; import com.google.gerrit.reviewdb.client.AccountGroup; import com.google.gerrit.server.account.GroupBackends;
import com.google.gerrit.common.data.*; import com.google.gerrit.common.errors.*; import com.google.gerrit.reviewdb.client.*; import com.google.gerrit.server.account.*;
[ "com.google.gerrit" ]
com.google.gerrit;
975,731
@NonNull public StaticLayoutBuilderCompat setStart(@IntRange(from = 0) int start) { this.start = start; return this; }
StaticLayoutBuilderCompat function(@IntRange(from = 0) int start) { this.start = start; return this; }
/** * Set the index of the start of the text * * @return this builder, useful for chaining */
Set the index of the start of the text
setStart
{ "repo_name": "material-components/material-components-android", "path": "lib/java/com/google/android/material/internal/StaticLayoutBuilderCompat.java", "license": "apache-2.0", "size": 11949 }
[ "androidx.annotation.IntRange" ]
import androidx.annotation.IntRange;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
638,986
void onFinishWithKeys(List<? extends PartitionKey> partitionKeys, boolean succeeded);
void onFinishWithKeys(List<? extends PartitionKey> partitionKeys, boolean succeeded);
/** * Same as {@link #onFinish(List, boolean)}, but allows specifying {@link PartitionKey}s * instead of {@link co.cask.cdap.api.dataset.lib.Partition}s. * * @param partitionKeys list of partition keys to mark as either succeeded or failed processing * @param succeeded whether or not processing of the specified partitions was successful * @throws IllegalStateException if any of the specified partitions are not in the working set as in progress. */
Same as <code>#onFinish(List, boolean)</code>, but allows specifying <code>PartitionKey</code>s instead of <code>co.cask.cdap.api.dataset.lib.Partition</code>s
onFinishWithKeys
{ "repo_name": "caskdata/cdap", "path": "cdap-api/src/main/java/co/cask/cdap/api/dataset/lib/partitioned/PartitionConsumer.java", "license": "apache-2.0", "size": 4036 }
[ "co.cask.cdap.api.dataset.lib.PartitionKey", "java.util.List" ]
import co.cask.cdap.api.dataset.lib.PartitionKey; import java.util.List;
import co.cask.cdap.api.dataset.lib.*; import java.util.*;
[ "co.cask.cdap", "java.util" ]
co.cask.cdap; java.util;
200,034
private void playButtonActionPerformed(java.awt.event.ActionEvent evt) { int row = worldTable.getSelectedRow(); if (row == -1) { JOptionPane.showMessageDialog(this, "Please select a world.", "Error", JOptionPane.ERROR_MESSAGE); return; } dispose(); int worldId = (int) worldTable.getValueAt(row, 0); RSLiteConfig.setProperty("lastWorld", worldId); startClient(worldId); }
void function(java.awt.event.ActionEvent evt) { int row = worldTable.getSelectedRow(); if (row == -1) { JOptionPane.showMessageDialog(this, STR, "Error", JOptionPane.ERROR_MESSAGE); return; } dispose(); int worldId = (int) worldTable.getValueAt(row, 0); RSLiteConfig.setProperty(STR, worldId); startClient(worldId); }
/** * Start the game client with the selected row as the world. * * @param evt A standard action event, useless for us. */
Start the game client with the selected row as the world
playButtonActionPerformed
{ "repo_name": "nikkiii/rslite", "path": "src/main/java/org/rslite/worldselector/WorldSelector.java", "license": "isc", "size": 17160 }
[ "java.awt.event.ActionEvent", "javax.swing.JOptionPane", "org.rslite.RSLiteConfig" ]
import java.awt.event.ActionEvent; import javax.swing.JOptionPane; import org.rslite.RSLiteConfig;
import java.awt.event.*; import javax.swing.*; import org.rslite.*;
[ "java.awt", "javax.swing", "org.rslite" ]
java.awt; javax.swing; org.rslite;
637,331
protected WebResource.Builder createMediaTypeHeaders(final WebResource webResource) { return webResource.type(MediaType.APPLICATION_JSON_TYPE).accept(MediaType.APPLICATION_JSON_TYPE); }
WebResource.Builder function(final WebResource webResource) { return webResource.type(MediaType.APPLICATION_JSON_TYPE).accept(MediaType.APPLICATION_JSON_TYPE); }
/** * DOCUMENT ME! * * @param webResource DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
createMediaTypeHeaders
{ "repo_name": "cismet/cids-server", "path": "src/main/java/de/cismet/cidsx/client/connector/RESTfulInterfaceConnector.java", "license": "lgpl-3.0", "size": 121871 }
[ "com.sun.jersey.api.client.WebResource", "javax.ws.rs.core.MediaType" ]
import com.sun.jersey.api.client.WebResource; import javax.ws.rs.core.MediaType;
import com.sun.jersey.api.client.*; import javax.ws.rs.core.*;
[ "com.sun.jersey", "javax.ws" ]
com.sun.jersey; javax.ws;
2,001,743
static Set<PipelineOptionSpec> getOptionSpecs( Iterable<Class<? extends PipelineOptions>> optionsInterfaces) { ImmutableSet.Builder<PipelineOptionSpec> setBuilder = ImmutableSet.builder(); for (Class<? extends PipelineOptions> optionsInterface : optionsInterfaces) { setBuilder.addAll(getOptionSpecs(optionsInterface)); } return setBuilder.build(); }
static Set<PipelineOptionSpec> getOptionSpecs( Iterable<Class<? extends PipelineOptions>> optionsInterfaces) { ImmutableSet.Builder<PipelineOptionSpec> setBuilder = ImmutableSet.builder(); for (Class<? extends PipelineOptions> optionsInterface : optionsInterfaces) { setBuilder.addAll(getOptionSpecs(optionsInterface)); } return setBuilder.build(); }
/** * Retrieve metadata for the full set of pipeline options visible within the type hierarchy * closure of the set of input interfaces. An option is "visible" if: * * <ul> * <li>The option is defined within the interface hierarchy closure of the input {@link * PipelineOptions}. * <li>The defining interface is not marked {@link Hidden}. * </ul> */
Retrieve metadata for the full set of pipeline options visible within the type hierarchy closure of the set of input interfaces. An option is "visible" if: The option is defined within the interface hierarchy closure of the input <code>PipelineOptions</code>. The defining interface is not marked <code>Hidden</code>.
getOptionSpecs
{ "repo_name": "mxm/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsReflector.java", "license": "apache-2.0", "size": 4252 }
[ "com.google.common.collect.ImmutableSet", "java.util.Set" ]
import com.google.common.collect.ImmutableSet; import java.util.Set;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,775,616
private Set<Class<?>> getAllInterfaces(Class<?> cls) { Set<Class<?>> reval = new HashSet<>(); while(cls != null) { for(Class<?> i : cls.getInterfaces()) { reval.add(i); } cls = cls.getSuperclass(); } return reval; }
Set<Class<?>> function(Class<?> cls) { Set<Class<?>> reval = new HashSet<>(); while(cls != null) { for(Class<?> i : cls.getInterfaces()) { reval.add(i); } cls = cls.getSuperclass(); } return reval; }
/** * Helper method: Collecting the set of all interfaces implemented by the * given class * @param cls The class description * @return A set containing all interfaces implemented by the given class. */
Helper method: Collecting the set of all interfaces implemented by the given class
getAllInterfaces
{ "repo_name": "Angerona/angerona-framework", "path": "fw/src/main/java/com/github/angerona/fw/internal/OperatorMap.java", "license": "gpl-3.0", "size": 4095 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
423,481
DirectBuffer buffer();
DirectBuffer buffer();
/** * Buffer in which the flyweight is encoded. * * @return buffer in which the flyweight is encoded. */
Buffer in which the flyweight is encoded
buffer
{ "repo_name": "real-logic/Agrona", "path": "agrona/src/main/java/org/agrona/sbe/Flyweight.java", "license": "apache-2.0", "size": 1802 }
[ "org.agrona.DirectBuffer" ]
import org.agrona.DirectBuffer;
import org.agrona.*;
[ "org.agrona" ]
org.agrona;
1,680,333
public Map<String, Path> getProvenanceRepositoryPaths() { final Map<String, Path> provenanceRepositoryPaths = new HashMap<>(); // go through each property for (String propertyName : stringPropertyNames()) { // determine if the property is a file repository path if (StringUtils.startsWith(propertyName, PROVENANCE_REPO_DIRECTORY_PREFIX)) { // get the repository key final String key = StringUtils.substringAfter(propertyName, PROVENANCE_REPO_DIRECTORY_PREFIX); // attempt to resolve the path specified provenanceRepositoryPaths.put(key, Paths.get(getProperty(propertyName))); } } return provenanceRepositoryPaths; }
Map<String, Path> function() { final Map<String, Path> provenanceRepositoryPaths = new HashMap<>(); for (String propertyName : stringPropertyNames()) { if (StringUtils.startsWith(propertyName, PROVENANCE_REPO_DIRECTORY_PREFIX)) { final String key = StringUtils.substringAfter(propertyName, PROVENANCE_REPO_DIRECTORY_PREFIX); provenanceRepositoryPaths.put(key, Paths.get(getProperty(propertyName))); } } return provenanceRepositoryPaths; }
/** * Returns the provenance repository paths. This method returns a mapping of * file repository name to file repository paths. It simply returns the * values configured. No directories will be created as a result of this * operation. * * @return */
Returns the provenance repository paths. This method returns a mapping of file repository name to file repository paths. It simply returns the values configured. No directories will be created as a result of this operation
getProvenanceRepositoryPaths
{ "repo_name": "rdblue/incubator-nifi", "path": "commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java", "license": "apache-2.0", "size": 39058 }
[ "java.nio.file.Path", "java.nio.file.Paths", "java.util.HashMap", "java.util.Map" ]
import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map;
import java.nio.file.*; import java.util.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
1,216,716
void synchronizeGroupsStructures(PerunSession sess) throws InternalErrorException, PrivilegeException;
void synchronizeGroupsStructures(PerunSession sess) throws InternalErrorException, PrivilegeException;
/** * Synchronize all groups structures (with members) which have enabled group structure synchronization. This method is run by the scheduler every 5 minutes. * * @throws InternalErrorException * @throws PrivilegeException */
Synchronize all groups structures (with members) which have enabled group structure synchronization. This method is run by the scheduler every 5 minutes
synchronizeGroupsStructures
{ "repo_name": "stavamichal/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/GroupsManager.java", "license": "bsd-2-clause", "size": 54135 }
[ "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "cz.metacentrum.perun.core.api.exceptions.PrivilegeException" ]
import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException;
import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
295,936
public java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI> getInput_dots_DotHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.dots.impl.DotImpl.class)){ retour.add(new fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI( (fr.lip6.move.pnml.hlpn.dots.Dot)elemnt )); } } return retour; }
java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.dots.impl.DotImpl.class)){ retour.add(new fr.lip6.move.pnml.hlpn.dots.hlapi.DotHLAPI( (fr.lip6.move.pnml.hlpn.dots.Dot)elemnt )); } } return retour; }
/** * This accessor return a list of encapsulated subelement, only of DotHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of DotHLAPI kind. WARNING : this method can creates a lot of new object in memory
getInput_dots_DotHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/LengthHLAPI.java", "license": "epl-1.0", "size": 108262 }
[ "fr.lip6.move.pnml.hlpn.terms.Sort", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Sort; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
379,283
public Matrix getMatrix() { return mMatrix; }
Matrix function() { return mMatrix; }
/** * Gets the matrix. * * @return the matrix */
Gets the matrix
getMatrix
{ "repo_name": "photo/mobile-android", "path": "submodules/Android-Feather/src/com/aviary/android/feather/widget/HighlightView.java", "license": "apache-2.0", "size": 27019 }
[ "android.graphics.Matrix" ]
import android.graphics.Matrix;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,670,997
public Task assertOperationValidAsync(Connection c, Types.VmOperations op) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "Async.VM.assert_operation_valid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(op)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); }
Task function(Connection c, Types.VmOperations op) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(op)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); }
/** * Check to see whether this operation is acceptable in the current state of the system, raising an error if the operation is invalid for some reason * * @param op proposed operation * @return Task */
Check to see whether this operation is acceptable in the current state of the system, raising an error if the operation is invalid for some reason
assertOperationValidAsync
{ "repo_name": "cinderella/incubator-cloudstack", "path": "deps/XenServerJava/com/xensource/xenapi/VM.java", "license": "apache-2.0", "size": 169722 }
[ "com.xensource.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.xensource.xenapi", "java.util", "org.apache.xmlrpc" ]
com.xensource.xenapi; java.util; org.apache.xmlrpc;
1,830,857
private FieldMessagePathToken createToken(NabuccoProperty property) { FieldMessagePathToken token = new FieldMessagePathToken(property); this.pathTokens.add(token); return token; }
FieldMessagePathToken function(NabuccoProperty property) { FieldMessagePathToken token = new FieldMessagePathToken(property); this.pathTokens.add(token); return token; }
/** * Create a new path token and adds it to the list. * * @param property * the property to add * * @return the path token */
Create a new path token and adds it to the list
createToken
{ "repo_name": "NABUCCO/org.nabucco.framework.base", "path": "org.nabucco.framework.base.facade.datatype/src/main/man/org/nabucco/framework/base/facade/datatype/exceptionmsg/field/FieldMessagePathVisitor.java", "license": "epl-1.0", "size": 4578 }
[ "org.nabucco.framework.base.facade.datatype.property.NabuccoProperty" ]
import org.nabucco.framework.base.facade.datatype.property.NabuccoProperty;
import org.nabucco.framework.base.facade.datatype.property.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
2,171,277
default public <T> void time(int repeat, Callable<T> runnable, Consumer<T> cleanup) throws Exception { for (int i = 0; i != repeat; ++i) { T result = null; Stopwatch sw = create().start(); try { result = runnable.call(); } finally { sw.stop(); if (cleanup != null) { cleanup.accept(result); } } } }
default <T> void function(int repeat, Callable<T> runnable, Consumer<T> cleanup) throws Exception { for (int i = 0; i != repeat; ++i) { T result = null; Stopwatch sw = create().start(); try { result = runnable.call(); } finally { sw.stop(); if (cleanup != null) { cleanup.accept(result); } } } }
/** * Time the given function multiple times. * * @param repeat the number of times to repeat the function call; must be positive * @param runnable the function that is to be executed a number of times; may not be null * @param cleanup the function that is to be called after each time call to the runnable function, and not included * in the time measurements; may be null * @throws Exception the exception thrown by the runnable function */
Time the given function multiple times
time
{ "repo_name": "DuncanSands/debezium", "path": "debezium-core/src/main/java/io/debezium/util/Stopwatch.java", "license": "apache-2.0", "size": 17716 }
[ "java.util.concurrent.Callable", "java.util.function.Consumer" ]
import java.util.concurrent.Callable; import java.util.function.Consumer;
import java.util.concurrent.*; import java.util.function.*;
[ "java.util" ]
java.util;
2,085,173
public boolean setWifiApEnabled(WifiConfiguration wifiConfig, boolean enabled) { try { return mService.setWifiApEnabled(wifiConfig, enabled); } catch (RemoteException e) { return false; } } /** * Gets the Wi-Fi enabled state. * @return One of {@link #WIFI_AP_STATE_DISABLED}, * {@link #WIFI_AP_STATE_DISABLING}, {@link #WIFI_AP_STATE_ENABLED}, * {@link #WIFI_AP_STATE_ENABLING}, {@link #WIFI_AP_STATE_FAILED}
boolean function(WifiConfiguration wifiConfig, boolean enabled) { try { return mService.setWifiApEnabled(wifiConfig, enabled); } catch (RemoteException e) { return false; } } /** * Gets the Wi-Fi enabled state. * @return One of {@link #WIFI_AP_STATE_DISABLED}, * {@link #WIFI_AP_STATE_DISABLING}, {@link #WIFI_AP_STATE_ENABLED}, * {@link #WIFI_AP_STATE_ENABLING}, {@link #WIFI_AP_STATE_FAILED}
/** * Start AccessPoint mode with the specified * configuration. If the radio is already running in * AP mode, update the new configuration * Note that starting in access point mode disables station * mode operation * @param wifiConfig SSID, security and channel details as * part of WifiConfiguration * @return {@code true} if the operation succeeds, {@code false} otherwise * * @hide Dont open up yet */
Start AccessPoint mode with the specified configuration. If the radio is already running in AP mode, update the new configuration Note that starting in access point mode disables station mode operation
setWifiApEnabled
{ "repo_name": "mateor/pdroid", "path": "android-2.3.4_r1/tags/1.32/frameworks/base/wifi/java/android/net/wifi/WifiManager.java", "license": "gpl-3.0", "size": 46337 }
[ "android.os.RemoteException" ]
import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
1,017,695
OutputStream wrapOutIfNeeded(OutputStream out);
OutputStream wrapOutIfNeeded(OutputStream out);
/** * When ANSI is not natively handled, the output will have to be wrapped. */
When ANSI is not natively handled, the output will have to be wrapped
wrapOutIfNeeded
{ "repo_name": "tkruse/jline2", "path": "src/main/java/jline/Terminal.java", "license": "bsd-3-clause", "size": 1634 }
[ "java.io.OutputStream" ]
import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
20,703
private void endTransactionWriter() { Declarable d = createDeclarable(); if (!(d instanceof TransactionWriter)) { throw new CacheXmlException( LocalizedStrings.CacheXmlParser_A_0_IS_NOT_AN_INSTANCE_OF_A_TRANSACTION_WRITER .toLocalizedString(d.getClass().getName())); } CacheTransactionManagerCreation txMgrCreation = (CacheTransactionManagerCreation) stack.peek(); txMgrCreation.setWriter((TransactionWriter) d); }
void function() { Declarable d = createDeclarable(); if (!(d instanceof TransactionWriter)) { throw new CacheXmlException( LocalizedStrings.CacheXmlParser_A_0_IS_NOT_AN_INSTANCE_OF_A_TRANSACTION_WRITER .toLocalizedString(d.getClass().getName())); } CacheTransactionManagerCreation txMgrCreation = (CacheTransactionManagerCreation) stack.peek(); txMgrCreation.setWriter((TransactionWriter) d); }
/** * Create a <code>transaction-writer</code> using the declarable interface and set the transaction * manager with the newly instantiated writer. */
Create a <code>transaction-writer</code> using the declarable interface and set the transaction manager with the newly instantiated writer
endTransactionWriter
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java", "license": "apache-2.0", "size": 130334 }
[ "org.apache.geode.cache.CacheXmlException", "org.apache.geode.cache.Declarable", "org.apache.geode.cache.TransactionWriter", "org.apache.geode.internal.i18n.LocalizedStrings" ]
import org.apache.geode.cache.CacheXmlException; import org.apache.geode.cache.Declarable; import org.apache.geode.cache.TransactionWriter; import org.apache.geode.internal.i18n.LocalizedStrings;
import org.apache.geode.cache.*; import org.apache.geode.internal.i18n.*;
[ "org.apache.geode" ]
org.apache.geode;
615,954
private void setEstimatedRowCount(long heapConglom) throws StandardException { bulkHeapSC = tc.openCompiledScan( false, TransactionController.OPENMODE_FORUPDATE, TransactionController.MODE_TABLE, TransactionController.ISOLATION_SERIALIZABLE, (FormatableBitSet) null, (DataValueDescriptor[]) null, 0, (Qualifier[][]) null, (DataValueDescriptor[]) null, 0, constants.heapSCOCI, heapDCOCI); bulkHeapSC.setEstimatedRowCount(rowCount); bulkHeapSC.close(); bulkHeapSC = null; }
void function(long heapConglom) throws StandardException { bulkHeapSC = tc.openCompiledScan( false, TransactionController.OPENMODE_FORUPDATE, TransactionController.MODE_TABLE, TransactionController.ISOLATION_SERIALIZABLE, (FormatableBitSet) null, (DataValueDescriptor[]) null, 0, (Qualifier[][]) null, (DataValueDescriptor[]) null, 0, constants.heapSCOCI, heapDCOCI); bulkHeapSC.setEstimatedRowCount(rowCount); bulkHeapSC.close(); bulkHeapSC = null; }
/** * Set the estimated row count for this table. * * @param heapConglom Conglomerate number for the heap * * @exception StandardException Thrown on failure */
Set the estimated row count for this table
setEstimatedRowCount
{ "repo_name": "trejkaz/derby", "path": "java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java", "license": "apache-2.0", "size": 82926 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.services.io.FormatableBitSet", "org.apache.derby.iapi.store.access.Qualifier", "org.apache.derby.iapi.store.access.TransactionController", "org.apache.derby.iapi.types.DataValueDescriptor" ]
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.services.io.FormatableBitSet; import org.apache.derby.iapi.store.access.Qualifier; import org.apache.derby.iapi.store.access.TransactionController; import org.apache.derby.iapi.types.DataValueDescriptor;
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.services.io.*; import org.apache.derby.iapi.store.access.*; import org.apache.derby.iapi.types.*;
[ "org.apache.derby" ]
org.apache.derby;
781,609
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<CustomDomainInner> listByEndpoint(String resourceGroupName, String profileName, String endpointName);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<CustomDomainInner> listByEndpoint(String resourceGroupName, String profileName, String endpointName);
/** * Lists all of the existing custom domains within an endpoint. * * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param profileName Name of the CDN profile which is unique within the resource group. * @param endpointName Name of the endpoint under the profile which is unique globally. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of the request to list custom domains as paginated response with {@link PagedIterable}. */
Lists all of the existing custom domains within an endpoint
listByEndpoint
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CustomDomainsClient.java", "license": "mit", "size": 34863 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.resourcemanager.cdn.fluent.models.CustomDomainInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.cdn.fluent.models.CustomDomainInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.cdn.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,011,875
private String insertFormats(final String pattern, final ArrayList<String> customPatterns) { if (!containsElements(customPatterns)) { return pattern; } final StringBuilder sb = new StringBuilder(pattern.length() * 2); final ParsePosition pos = new ParsePosition(0); int fe = -1; int depth = 0; while (pos.getIndex() < pattern.length()) { final char c = pattern.charAt(pos.getIndex()); switch (c) { case QUOTE: appendQuotedString(pattern, pos, sb); break; case START_FE: depth++; sb.append(START_FE).append(readArgumentIndex(pattern, next(pos))); // do not look for custom patterns when they are embedded, e.g. in a choice if (depth == 1) { fe++; final String customPattern = customPatterns.get(fe); if (customPattern != null) { sb.append(START_FMT).append(customPattern); } } break; case END_FE: depth--; //$FALL-THROUGH$ default: sb.append(c); next(pos); } } return sb.toString(); }
String function(final String pattern, final ArrayList<String> customPatterns) { if (!containsElements(customPatterns)) { return pattern; } final StringBuilder sb = new StringBuilder(pattern.length() * 2); final ParsePosition pos = new ParsePosition(0); int fe = -1; int depth = 0; while (pos.getIndex() < pattern.length()) { final char c = pattern.charAt(pos.getIndex()); switch (c) { case QUOTE: appendQuotedString(pattern, pos, sb); break; case START_FE: depth++; sb.append(START_FE).append(readArgumentIndex(pattern, next(pos))); if (depth == 1) { fe++; final String customPattern = customPatterns.get(fe); if (customPattern != null) { sb.append(START_FMT).append(customPattern); } } break; case END_FE: depth--; default: sb.append(c); next(pos); } } return sb.toString(); }
/** * Insert formats back into the pattern for toPattern() support. * * @param pattern source * @param customPatterns The custom patterns to re-insert, if any * @return full pattern */
Insert formats back into the pattern for toPattern() support
insertFormats
{ "repo_name": "britter/commons-lang", "path": "src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java", "license": "apache-2.0", "size": 19364 }
[ "java.text.ParsePosition", "java.util.ArrayList" ]
import java.text.ParsePosition; import java.util.ArrayList;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,048,559
public AirlineItineraryTemplateBuilder setBasePrice(BigDecimal basePrice) { this.payload.setBasePrice(basePrice); return this; }
AirlineItineraryTemplateBuilder function(BigDecimal basePrice) { this.payload.setBasePrice(basePrice); return this; }
/** * Sets the base price for this itinerary. This field is optional. * * @param basePrice * the base price. * @return this builder. */
Sets the base price for this itinerary. This field is optional
setBasePrice
{ "repo_name": "Aurasphere/facebot", "path": "src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/AirlineItineraryTemplateBuilder.java", "license": "mit", "size": 13737 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
801,367
public LocalConnector createLocalConnector() throws Exception { synchronized (this) { LocalConnector connector = new LocalConnector(); _server.addConnector(connector); if (_server.isStarted()) connector.start(); return connector; } }
LocalConnector function() throws Exception { synchronized (this) { LocalConnector connector = new LocalConnector(); _server.addConnector(connector); if (_server.isStarted()) connector.start(); return connector; } }
/** Create a Socket connector. * This methods adds a socket connector to the server * @param locahost if true, only listen on local host, else listen on all interfaces. * @return A URL to access the server via the socket connector. * @throws Exception */
Create a Socket connector. This methods adds a socket connector to the server
createLocalConnector
{ "repo_name": "napcs/qedserver", "path": "jetty/extras/servlet-tester/src/main/java/org/mortbay/jetty/testing/ServletTester.java", "license": "mit", "size": 12493 }
[ "org.mortbay.jetty.LocalConnector" ]
import org.mortbay.jetty.LocalConnector;
import org.mortbay.jetty.*;
[ "org.mortbay.jetty" ]
org.mortbay.jetty;
136,664
public Attribute getAttribute(AKeySimple key) { return getAttribute(key, ""); }
Attribute function(AKeySimple key) { return getAttribute(key, ""); }
/** * Get the specified attribute from the singular group * * @param key * @return */
Get the specified attribute from the singular group
getAttribute
{ "repo_name": "Subterranean-Security/Crimson", "path": "src/main/java/com/subterranean_security/crimson/sv/profile/Profile.java", "license": "apache-2.0", "size": 8091 }
[ "com.subterranean_security.crimson.core.attribute.Attribute", "com.subterranean_security.crimson.core.attribute.keys.singular.AKeySimple" ]
import com.subterranean_security.crimson.core.attribute.Attribute; import com.subterranean_security.crimson.core.attribute.keys.singular.AKeySimple;
import com.subterranean_security.crimson.core.attribute.*; import com.subterranean_security.crimson.core.attribute.keys.singular.*;
[ "com.subterranean_security.crimson" ]
com.subterranean_security.crimson;
243,546
EClass getDomainServiceDeclaration();
EClass getDomainServiceDeclaration();
/** * Returns the meta object for class '{@link org.xtuml.bp.xtext.masl.masl.structure.DomainServiceDeclaration <em>Domain Service Declaration</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Domain Service Declaration</em>'. * @see org.xtuml.bp.xtext.masl.masl.structure.DomainServiceDeclaration * @generated */
Returns the meta object for class '<code>org.xtuml.bp.xtext.masl.masl.structure.DomainServiceDeclaration Domain Service Declaration</code>'.
getDomainServiceDeclaration
{ "repo_name": "lwriemen/bridgepoint", "path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/emf-gen/org/xtuml/bp/xtext/masl/masl/structure/StructurePackage.java", "license": "apache-2.0", "size": 189771 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,703,174
Point getPosition(Player player);//TODO: concurrency
Point getPosition(Player player);
/** * get current position * * @return <code>Point</code> with current position */
get current position
getPosition
{ "repo_name": "agp8x/geogame", "path": "src/main/java/de/clemensklug/uni/ba/geogame/location/LocationProvider.java", "license": "gpl-3.0", "size": 657 }
[ "de.clemensklug.uni.ba.geogame.model.Player", "de.clemensklug.uni.ba.geogame.model.spatial.Point" ]
import de.clemensklug.uni.ba.geogame.model.Player; import de.clemensklug.uni.ba.geogame.model.spatial.Point;
import de.clemensklug.uni.ba.geogame.model.*; import de.clemensklug.uni.ba.geogame.model.spatial.*;
[ "de.clemensklug.uni" ]
de.clemensklug.uni;
1,395,024
@SuppressWarnings("unchecked") public static Set<String> getCategories(ServletContext servletContext) { return (Set<String>) servletContext.getAttribute(Constants.CATEGORIES); }
@SuppressWarnings(STR) static Set<String> function(ServletContext servletContext) { return (Set<String>) servletContext.getAttribute(Constants.CATEGORIES); }
/** * Gets the aspect categories from the servlet context. * * @param servletContext the ServletContext * @return a Set of aspect names */
Gets the aspect categories from the servlet context
getCategories
{ "repo_name": "JoeCarlson/intermine", "path": "intermine/web/main/src/org/intermine/web/logic/session/SessionMethods.java", "license": "lgpl-2.1", "size": 47321 }
[ "java.util.Set", "javax.servlet.ServletContext", "org.intermine.web.logic.Constants" ]
import java.util.Set; import javax.servlet.ServletContext; import org.intermine.web.logic.Constants;
import java.util.*; import javax.servlet.*; import org.intermine.web.logic.*;
[ "java.util", "javax.servlet", "org.intermine.web" ]
java.util; javax.servlet; org.intermine.web;
1,758,721
public Timestamp getCreated(); public static final String COLUMNNAME_CreatedBy = "CreatedBy";
Timestamp function(); public static final String COLUMNNAME_CreatedBy = STR;
/** Get Created. * Date this record was created */
Get Created. Date this record was created
getCreated
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/I_AD_WF_Node_Para.java", "license": "gpl-2.0", "size": 6050 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,257,763
public static RegExp compile(String pattern, String flags) { // Parse flags boolean globalFlag = false; int javaPatternFlags = Pattern.UNIX_LINES; for (char flag : parseFlags(flags)) { switch (flag) { case 'g': globalFlag = true; break; case 'i': javaPatternFlags |= Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE; break; case 'm': javaPatternFlags |= Pattern.MULTILINE; break; default: throw new IllegalArgumentException("Unknown regexp flag: '" + flag + "'"); } } Pattern javaPattern = Pattern.compile(pattern, javaPatternFlags); return new RegExp(pattern, javaPattern, globalFlag); }
static RegExp function(String pattern, String flags) { boolean globalFlag = false; int javaPatternFlags = Pattern.UNIX_LINES; for (char flag : parseFlags(flags)) { switch (flag) { case 'g': globalFlag = true; break; case 'i': javaPatternFlags = Pattern.CASE_INSENSITIVE Pattern.UNICODE_CASE; break; case 'm': javaPatternFlags = Pattern.MULTILINE; break; default: throw new IllegalArgumentException(STR + flag + "'"); } } Pattern javaPattern = Pattern.compile(pattern, javaPatternFlags); return new RegExp(pattern, javaPattern, globalFlag); }
/** * Creates a regular expression object from a pattern using the given flags. * * @param pattern the Javascript regular expression pattern to compile * @param flags the flags string, containing at most one occurrence of {@code * 'g'} ({@link #getGlobal()}), {@code 'i'} ({@link #getIgnoreCase()}), * or {@code 'm'} ({@link #getMultiline()}). * @return a new regular expression * @throws RuntimeException if the pattern or the flags are invalid */
Creates a regular expression object from a pattern using the given flags
compile
{ "repo_name": "datalint/open", "path": "Open/src/main/java/com/google/gwt/regexp/shared/RegExp.java", "license": "apache-2.0", "size": 14584 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,283,260
public final GemFireCacheImpl getGemfireCache() { return (GemFireCacheImpl)getCache(); }
final GemFireCacheImpl function() { return (GemFireCacheImpl)getCache(); }
/** * same as {@link #getCache()} but with casting */
same as <code>#getCache()</code> but with casting
getGemfireCache
{ "repo_name": "ysung-pivotal/incubator-geode", "path": "gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheTestCase.java", "license": "apache-2.0", "size": 21662 }
[ "com.gemstone.gemfire.internal.cache.GemFireCacheImpl" ]
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
697,219
@Test(expected = IllegalArgumentException.class) public void test_create_accountNull() throws Exception { instance.create(null); }
@Test(expected = IllegalArgumentException.class) void function() throws Exception { instance.create(null); }
/** * <p> * Failure test for the method <code>create(Account account)</code> with account is null.<br> * <code>IllegalArgumentException</code> is expected. * </p> * * @throws Exception * to JUnit. */
Failure test for the method <code>create(Account account)</code> with account is null. <code>IllegalArgumentException</code> is expected.
test_create_accountNull
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/Batch_Processing/src/java/tests/gov/opm/scrd/services/impl/AccountServiceImplUnitTests.java", "license": "apache-2.0", "size": 61048 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,749,097
@Test public void testAssignMetaAndCrashBeforeResponse() throws Exception { tearDown(); // See setUp(), start HBase until set up meta util = new HBaseTestingUtility(); this.executor = Executors.newSingleThreadScheduledExecutor(); setupConfiguration(util.getConfiguration()); master = new MockMasterServices(util.getConfiguration(), this.regionsToRegionServers); rsDispatcher = new MockRSProcedureDispatcher(master); master.start(NSERVERS, rsDispatcher); am = master.getAssignmentManager(); // Assign meta rsDispatcher.setMockRsExecutor(new HangThenRSRestartExecutor()); am.assign(RegionInfoBuilder.FIRST_META_REGIONINFO); assertEquals(true, am.isMetaAssigned()); // set it back as default, see setUpMeta() am.wakeMetaLoadedEvent(); }
void function() throws Exception { tearDown(); util = new HBaseTestingUtility(); this.executor = Executors.newSingleThreadScheduledExecutor(); setupConfiguration(util.getConfiguration()); master = new MockMasterServices(util.getConfiguration(), this.regionsToRegionServers); rsDispatcher = new MockRSProcedureDispatcher(master); master.start(NSERVERS, rsDispatcher); am = master.getAssignmentManager(); rsDispatcher.setMockRsExecutor(new HangThenRSRestartExecutor()); am.assign(RegionInfoBuilder.FIRST_META_REGIONINFO); assertEquals(true, am.isMetaAssigned()); am.wakeMetaLoadedEvent(); }
/** * It is possible that when AM send assign meta request to a RS successfully, but RS can not send * back any response, which cause master startup hangs forever */
It is possible that when AM send assign meta request to a RS successfully, but RS can not send back any response, which cause master startup hangs forever
testAssignMetaAndCrashBeforeResponse
{ "repo_name": "ultratendency/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/master/assignment/TestAssignmentManager.java", "license": "apache-2.0", "size": 12098 }
[ "java.util.concurrent.Executors", "org.apache.hadoop.hbase.HBaseTestingUtility", "org.apache.hadoop.hbase.client.RegionInfoBuilder", "org.junit.Assert" ]
import java.util.concurrent.Executors; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.client.RegionInfoBuilder; import org.junit.Assert;
import java.util.concurrent.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
296,299
public List<ConnectionMultiplexerSession> getConnectionMultiplexerSessions() { List<ConnectionMultiplexerSession> sessions = new ArrayList<>(); // Add sessions of CMs connected to this JVM sessions.addAll(localSessionManager.getConnnectionManagerSessions().values()); // Add sessions of CMs connected to other cluster nodes RemoteSessionLocator locator = server.getRemoteSessionLocator(); if (locator != null) { for (Map.Entry<String, byte[]> entry : multiplexerSessionsCache.entrySet()) { if (!server.getNodeID().equals(entry.getValue())) { sessions.add(locator.getConnectionMultiplexerSession(entry.getValue(), new JID(entry.getKey()))); } } } return sessions; }
List<ConnectionMultiplexerSession> function() { List<ConnectionMultiplexerSession> sessions = new ArrayList<>(); sessions.addAll(localSessionManager.getConnnectionManagerSessions().values()); RemoteSessionLocator locator = server.getRemoteSessionLocator(); if (locator != null) { for (Map.Entry<String, byte[]> entry : multiplexerSessionsCache.entrySet()) { if (!server.getNodeID().equals(entry.getValue())) { sessions.add(locator.getConnectionMultiplexerSession(entry.getValue(), new JID(entry.getKey()))); } } } return sessions; }
/** * Returns all sessions originated from connection managers. * * @return all sessions originated from connection managers. */
Returns all sessions originated from connection managers
getConnectionMultiplexerSessions
{ "repo_name": "zhouluoyang/openfire", "path": "src/java/org/jivesoftware/openfire/SessionManager.java", "license": "apache-2.0", "size": 72875 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.jivesoftware.openfire.session.ConnectionMultiplexerSession", "org.jivesoftware.openfire.session.RemoteSessionLocator" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.jivesoftware.openfire.session.ConnectionMultiplexerSession; import org.jivesoftware.openfire.session.RemoteSessionLocator;
import java.util.*; import org.jivesoftware.openfire.session.*;
[ "java.util", "org.jivesoftware.openfire" ]
java.util; org.jivesoftware.openfire;
769,772
public Integer createPenaltyOrder(InvoiceDTO invoice, ItemBL item, BigDecimal fee) throws PluggableTaskException { OrderDTO summary = new OrderDTO(); OrderPeriodDTO orderPeriod = new OrderPeriodDAS().findRecurringPeriod(); if (orderPeriod == null) { LOG.error("No period different than One-Time was found."); return null; } summary.setOrderPeriod(orderPeriod); OrderBillingTypeDTO type = new OrderBillingTypeDTO(); type.setId(Constants.ORDER_BILLING_PRE_PAID); summary.setOrderBillingType(type); //penalty applicable since the date Invoice got created. summary.setActiveSince(invoice.getDueDate()); LOG.debug("Order active since " + summary.getActiveSince()); summary.setCurrency(invoice.getCurrency()); //if invoice is paid after due date, this order must have an active until date if (Constants.INVOICE_STATUS_PAID.equals(invoice.getInvoiceStatus().getId())) { LOG.debug("Invoice " + invoice.getId() + " has been paid."); summary.setActiveUntil(invoice.getPaymentMap().iterator().next().getCreateDatetime()); } UserDTO user = new UserDTO(); user.setId(invoice.getBaseUser().getId()); summary.setBaseUserByUserId(user); // now add the item to the po Integer languageId = invoice.getBaseUser().getLanguageIdField(); String description = item.getEntity().getDescription(languageId) + " as Overdue Penalty for Invoice Number " + invoice.getPublicNumber(); OrderLineDTO line = new OrderLineDTO(); line.setAmount(fee); line.setDescription(description); line.setItemId(getPenaltyItemId()); line.setTypeId(Constants.ORDER_LINE_TYPE_PENALTY); summary.getLines().add(line); // create the db record OrderBL order = new OrderBL(); order.set(summary); return order.create(invoice.getBaseUser().getEntity().getId(), null, summary); }
Integer function(InvoiceDTO invoice, ItemBL item, BigDecimal fee) throws PluggableTaskException { OrderDTO summary = new OrderDTO(); OrderPeriodDTO orderPeriod = new OrderPeriodDAS().findRecurringPeriod(); if (orderPeriod == null) { LOG.error(STR); return null; } summary.setOrderPeriod(orderPeriod); OrderBillingTypeDTO type = new OrderBillingTypeDTO(); type.setId(Constants.ORDER_BILLING_PRE_PAID); summary.setOrderBillingType(type); summary.setActiveSince(invoice.getDueDate()); LOG.debug(STR + summary.getActiveSince()); summary.setCurrency(invoice.getCurrency()); if (Constants.INVOICE_STATUS_PAID.equals(invoice.getInvoiceStatus().getId())) { LOG.debug(STR + invoice.getId() + STR); summary.setActiveUntil(invoice.getPaymentMap().iterator().next().getCreateDatetime()); } UserDTO user = new UserDTO(); user.setId(invoice.getBaseUser().getId()); summary.setBaseUserByUserId(user); Integer languageId = invoice.getBaseUser().getLanguageIdField(); String description = item.getEntity().getDescription(languageId) + STR + invoice.getPublicNumber(); OrderLineDTO line = new OrderLineDTO(); line.setAmount(fee); line.setDescription(description); line.setItemId(getPenaltyItemId()); line.setTypeId(Constants.ORDER_LINE_TYPE_PENALTY); summary.getLines().add(line); OrderBL order = new OrderBL(); order.set(summary); return order.create(invoice.getBaseUser().getEntity().getId(), null, summary); }
/** * Create a task specific Order for the given Invoice having given Item * @param invoice Invoice for which to create Penalty order * @param item Penalty Item (Percentage or Flat) * @return orderId */
Create a task specific Order for the given Invoice having given Item
createPenaltyOrder
{ "repo_name": "maxdelo77/replyit-master-3.2-final", "path": "src/java/com/sapienter/jbilling/server/pluggableTask/OverdueInvoicePenaltyTask.java", "license": "agpl-3.0", "size": 10232 }
[ "com.sapienter.jbilling.server.invoice.db.InvoiceDTO", "com.sapienter.jbilling.server.item.ItemBL", "com.sapienter.jbilling.server.order.OrderBL", "com.sapienter.jbilling.server.order.db.OrderBillingTypeDTO", "com.sapienter.jbilling.server.order.db.OrderDTO", "com.sapienter.jbilling.server.order.db.OrderLineDTO", "com.sapienter.jbilling.server.order.db.OrderPeriodDAS", "com.sapienter.jbilling.server.order.db.OrderPeriodDTO", "com.sapienter.jbilling.server.pluggableTask.admin.PluggableTaskException", "com.sapienter.jbilling.server.user.db.UserDTO", "com.sapienter.jbilling.server.util.Constants", "java.math.BigDecimal" ]
import com.sapienter.jbilling.server.invoice.db.InvoiceDTO; import com.sapienter.jbilling.server.item.ItemBL; import com.sapienter.jbilling.server.order.OrderBL; import com.sapienter.jbilling.server.order.db.OrderBillingTypeDTO; import com.sapienter.jbilling.server.order.db.OrderDTO; import com.sapienter.jbilling.server.order.db.OrderLineDTO; import com.sapienter.jbilling.server.order.db.OrderPeriodDAS; import com.sapienter.jbilling.server.order.db.OrderPeriodDTO; import com.sapienter.jbilling.server.pluggableTask.admin.PluggableTaskException; import com.sapienter.jbilling.server.user.db.UserDTO; import com.sapienter.jbilling.server.util.Constants; import java.math.BigDecimal;
import com.sapienter.jbilling.server.*; import com.sapienter.jbilling.server.invoice.db.*; import com.sapienter.jbilling.server.item.*; import com.sapienter.jbilling.server.order.*; import com.sapienter.jbilling.server.order.db.*; import com.sapienter.jbilling.server.user.db.*; import com.sapienter.jbilling.server.util.*; import java.math.*;
[ "com.sapienter.jbilling", "java.math" ]
com.sapienter.jbilling; java.math;
829,130
public void setChanged(Date changed) { this.changed = changed; }
void function(Date changed) { this.changed = changed; }
/** * Sets when the corresponding database entry was last changed. * * @param changed When the corresponding database entry was last changed. */
Sets when the corresponding database entry was last changed
setChanged
{ "repo_name": "Adi3000/subsonic-main", "path": "src/main/java/net/sourceforge/subsonic/domain/InternetRadio.java", "license": "gpl-3.0", "size": 4881 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,429,979
public void verify() throws CredentialException { try { String caCertsLocation = "file:" + CoGProperties.getDefault().getCaCertLocations(); KeyStore keyStore = Stores.getTrustStore(caCertsLocation + "/" + Stores.getDefaultCAFilesPattern()); CertStore crlStore = Stores.getCRLStore(caCertsLocation + "/" + Stores.getDefaultCRLFilesPattern()); ResourceSigningPolicyStore sigPolStore = Stores.getSigningPolicyStore(caCertsLocation + "/" + Stores.getDefaultSigningPolicyFilesPattern()); X509ProxyCertPathParameters parameters = new X509ProxyCertPathParameters(keyStore, crlStore, sigPolStore, false); X509ProxyCertPathValidator validator = new X509ProxyCertPathValidator(); validator.engineValidate(CertificateUtil.getCertPath(certChain), parameters); } catch (Exception e) { throw new CredentialException(e); } }
void function() throws CredentialException { try { String caCertsLocation = "file:" + CoGProperties.getDefault().getCaCertLocations(); KeyStore keyStore = Stores.getTrustStore(caCertsLocation + "/" + Stores.getDefaultCAFilesPattern()); CertStore crlStore = Stores.getCRLStore(caCertsLocation + "/" + Stores.getDefaultCRLFilesPattern()); ResourceSigningPolicyStore sigPolStore = Stores.getSigningPolicyStore(caCertsLocation + "/" + Stores.getDefaultSigningPolicyFilesPattern()); X509ProxyCertPathParameters parameters = new X509ProxyCertPathParameters(keyStore, crlStore, sigPolStore, false); X509ProxyCertPathValidator validator = new X509ProxyCertPathValidator(); validator.engineValidate(CertificateUtil.getCertPath(certChain), parameters); } catch (Exception e) { throw new CredentialException(e); } }
/** * Verifies the validity of the credentials. All certificate path validation is performed using trusted * certificates in default locations. * * @exception CredentialException * if one of the certificates in the chain expired or if path validiation fails. */
Verifies the validity of the credentials. All certificate path validation is performed using trusted certificates in default locations
verify
{ "repo_name": "jglobus/JGlobus", "path": "ssl-proxies/src/main/java/org/globus/gsi/X509Credential.java", "license": "apache-2.0", "size": 23811 }
[ "java.security.KeyStore", "java.security.cert.CertStore", "org.globus.common.CoGProperties", "org.globus.gsi.stores.ResourceSigningPolicyStore", "org.globus.gsi.stores.Stores", "org.globus.gsi.trustmanager.X509ProxyCertPathValidator", "org.globus.gsi.util.CertificateUtil" ]
import java.security.KeyStore; import java.security.cert.CertStore; import org.globus.common.CoGProperties; import org.globus.gsi.stores.ResourceSigningPolicyStore; import org.globus.gsi.stores.Stores; import org.globus.gsi.trustmanager.X509ProxyCertPathValidator; import org.globus.gsi.util.CertificateUtil;
import java.security.*; import java.security.cert.*; import org.globus.common.*; import org.globus.gsi.stores.*; import org.globus.gsi.trustmanager.*; import org.globus.gsi.util.*;
[ "java.security", "org.globus.common", "org.globus.gsi" ]
java.security; org.globus.common; org.globus.gsi;
710,134
public void setClientId(String id) { Preconditions.checkState(clientId == null, "Client ID has already been set."); this.clientId = id; }
void function(String id) { Preconditions.checkState(clientId == null, STR); this.clientId = id; }
/** * Sets the authenticated client ID. This is meant to be used by the authentication layer. * * Trying to set a different client ID after it's been set will result in an exception. */
Sets the authenticated client ID. This is meant to be used by the authentication layer. Trying to set a different client ID after it's been set will result in an exception
setClientId
{ "repo_name": "aokolnychyi/spark", "path": "common/network-common/src/main/java/org/apache/spark/network/client/TransportClient.java", "license": "apache-2.0", "size": 12066 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
561,089
@SideOnly(Side.CLIENT) public static void registerTypicalItemModel(Item item) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); }
@SideOnly(Side.CLIENT) static void function(Item item) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), STR)); }
/** * Registers a typical (no meta, no special inventory variant or anything) item model. * * @param item The item */
Registers a typical (no meta, no special inventory variant or anything) item model
registerTypicalItemModel
{ "repo_name": "squeek502/VeganOption", "path": "java/squeek/veganoption/content/ContentHelper.java", "license": "unlicense", "size": 11138 }
[ "net.minecraft.client.renderer.block.model.ModelResourceLocation", "net.minecraft.item.Item", "net.minecraftforge.client.model.ModelLoader", "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.block.model.*; import net.minecraft.item.*; import net.minecraftforge.client.model.*; import net.minecraftforge.fml.relauncher.*;
[ "net.minecraft.client", "net.minecraft.item", "net.minecraftforge.client", "net.minecraftforge.fml" ]
net.minecraft.client; net.minecraft.item; net.minecraftforge.client; net.minecraftforge.fml;
1,978,673
public OvhRescueAdminPassword project_serviceName_instance_instanceId_rescueMode_POST(String serviceName, String instanceId, String imageId, Boolean rescue) throws IOException { String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/rescueMode"; StringBuilder sb = path(qPath, serviceName, instanceId); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "imageId", imageId); addBody(o, "rescue", rescue); String resp = exec(qPath, "POST", sb.toString(), o); return convertTo(resp, OvhRescueAdminPassword.class); }
OvhRescueAdminPassword function(String serviceName, String instanceId, String imageId, Boolean rescue) throws IOException { String qPath = STR; StringBuilder sb = path(qPath, serviceName, instanceId); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, STR, imageId); addBody(o, STR, rescue); String resp = exec(qPath, "POST", sb.toString(), o); return convertTo(resp, OvhRescueAdminPassword.class); }
/** * Enable or disable rescue mode * * REST: POST /cloud/project/{serviceName}/instance/{instanceId}/rescueMode * @param imageId [required] Image to boot on * @param instanceId [required] Instance id * @param rescue [required] Enable rescue mode * @param serviceName [required] Service name */
Enable or disable rescue mode
project_serviceName_instance_instanceId_rescueMode_POST
{ "repo_name": "UrielCh/ovh-java-sdk", "path": "ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java", "license": "bsd-3-clause", "size": 111796 }
[ "java.io.IOException", "java.util.HashMap", "net.minidev.ovh.api.cloud.instance.OvhRescueAdminPassword" ]
import java.io.IOException; import java.util.HashMap; import net.minidev.ovh.api.cloud.instance.OvhRescueAdminPassword;
import java.io.*; import java.util.*; import net.minidev.ovh.api.cloud.instance.*;
[ "java.io", "java.util", "net.minidev.ovh" ]
java.io; java.util; net.minidev.ovh;
1,370,460
public interface BadgeServiceAsync { void getBadgeNames(String gameToken, AsyncCallback<String[]> callback);
interface BadgeServiceAsync { void function(String gameToken, AsyncCallback<String[]> callback);
/** * Get a list of badge names for this game. * * @param gameToken * The secret token for the current game. * @param callback * Called once the operation finishes. On success, passes a list * of strings corresponding to the 'name' field of each badge in * the current game. */
Get a list of badge names for this game
getBadgeNames
{ "repo_name": "aramk/mechanix", "path": "src/au/edu/unimelb/csse/mugle/client/api/BadgeServiceAsync.java", "license": "mit", "size": 4756 }
[ "com.google.gwt.user.client.rpc.AsyncCallback" ]
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.*;
[ "com.google.gwt" ]
com.google.gwt;
1,351,971
// ////////////////////////////////////////////////////////// // START Creation/Deletion of Storages ///////////////////// // ////////////////////////////////////////////////////////// public static synchronized boolean createStorage(final StorageConfiguration pStorageConfig) throws TTIOException { boolean returnVal = true; // if file is existing, skipping if (!pStorageConfig.mFile.exists() && pStorageConfig.mFile.mkdirs()) { returnVal = IOUtils.createFolderStructure(pStorageConfig.mFile, StorageConfiguration.Paths.values()); // serialization of the config StorageConfiguration.serialize(pStorageConfig); // if something was not correct, delete the partly created // substructure if (!returnVal) { pStorageConfig.mFile.delete(); } return returnVal; } else { return false; } }
static synchronized boolean function(final StorageConfiguration pStorageConfig) throws TTIOException { boolean returnVal = true; if (!pStorageConfig.mFile.exists() && pStorageConfig.mFile.mkdirs()) { returnVal = IOUtils.createFolderStructure(pStorageConfig.mFile, StorageConfiguration.Paths.values()); StorageConfiguration.serialize(pStorageConfig); if (!returnVal) { pStorageConfig.mFile.delete(); } return returnVal; } else { return false; } }
/** * Creating a storage. This includes loading the storageconfiguration, * building up the structure and preparing everything for login. * * * @param pStorageConfig * which are used for the storage, including storage location * @return true if creation is valid, false otherwise * @throws TTIOException * if something odd happens within the creation process. */
Creating a storage. This includes loading the storageconfiguration, building up the structure and preparing everything for login
createStorage
{ "repo_name": "sebastiangraf/treetank", "path": "coremodules/core/src/main/java/org/treetank/access/Storage.java", "license": "bsd-3-clause", "size": 16233 }
[ "org.treetank.access.conf.StorageConfiguration", "org.treetank.exception.TTIOException", "org.treetank.io.IOUtils" ]
import org.treetank.access.conf.StorageConfiguration; import org.treetank.exception.TTIOException; import org.treetank.io.IOUtils;
import org.treetank.access.conf.*; import org.treetank.exception.*; import org.treetank.io.*;
[ "org.treetank.access", "org.treetank.exception", "org.treetank.io" ]
org.treetank.access; org.treetank.exception; org.treetank.io;
1,007,397
@Test public void endPutIncrementsPutTime() { cachePerfStats.endPut(0, false); assertThat(statistics.getLong(putTimeId)).isEqualTo(CLOCK_TIME); }
void function() { cachePerfStats.endPut(0, false); assertThat(statistics.getLong(putTimeId)).isEqualTo(CLOCK_TIME); }
/** * Characterization test: Note that the only way to increment {@code putTime} is to invoke {@code * endPut}. */
Characterization test: Note that the only way to increment putTime is to invoke endPut
endPutIncrementsPutTime
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java", "license": "apache-2.0", "size": 34945 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
996,670
//----------------------------------------------------------------------- public CurveExtrapolator getExtrapolatorLeft() { return extrapolatorLeft; }
CurveExtrapolator function() { return extrapolatorLeft; }
/** * Gets the extrapolator used to find points to the left of the leftmost point on the curve. * @return the value of the property, not null */
Gets the extrapolator used to find points to the left of the leftmost point on the curve
getExtrapolatorLeft
{ "repo_name": "OpenGamma/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/curve/InterpolatedNodalCurveDefinition.java", "license": "apache-2.0", "size": 34460 }
[ "com.opengamma.strata.market.curve.interpolator.CurveExtrapolator" ]
import com.opengamma.strata.market.curve.interpolator.CurveExtrapolator;
import com.opengamma.strata.market.curve.interpolator.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
1,468,522
public static <T> Optional<T> ofNullableOptional(Optional<T> nullable) { return nullable == null ? Optional.empty() : nullable; }
static <T> Optional<T> function(Optional<T> nullable) { return nullable == null ? Optional.empty() : nullable; }
/** * Takes an optional value (that may itself be null) and makes it a non-null optional * @param nullable an Optional value that may, itself, be null * @param <T> type of the optional value * @return an Optional */
Takes an optional value (that may itself be null) and makes it a non-null optional
ofNullableOptional
{ "repo_name": "kamransaleem/waltz", "path": "waltz-common/src/main/java/com/khartec/waltz/common/OptionalUtilities.java", "license": "apache-2.0", "size": 2411 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
686,091
@Override public byte[] getFirstRowKey() { byte[] firstKey = getFirstKey(); if (firstKey == null) return null; return KeyValue.createKeyValueFromKey(firstKey).getRow(); }
byte[] function() { byte[] firstKey = getFirstKey(); if (firstKey == null) return null; return KeyValue.createKeyValueFromKey(firstKey).getRow(); }
/** * TODO left from {@link HFile} version 1: move this to StoreFile after Ryan's * patch goes in to eliminate {@link KeyValue} here. * * @return the first row key, or null if the file is empty. */
TODO left from <code>HFile</code> version 1: move this to StoreFile after Ryan's patch goes in to eliminate <code>KeyValue</code> here
getFirstRowKey
{ "repo_name": "lifeng5042/RStore", "path": "src/org/apache/hadoop/hbase/io/hfile/AbstractHFileReader.java", "license": "gpl-2.0", "size": 10011 }
[ "org.apache.hadoop.hbase.KeyValue" ]
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,274,666
public void addGroupBy(FieldHelper aField) { if (aField != null) { m_groupby.add(aField); } }
void function(FieldHelper aField) { if (aField != null) { m_groupby.add(aField); } }
/** * Adds a field for groupby * @param aField */
Adds a field for groupby
addGroupBy
{ "repo_name": "kuali/ojb-1.0.4", "path": "src/java/org/apache/ojb/broker/query/QueryByCriteria.java", "license": "apache-2.0", "size": 16077 }
[ "org.apache.ojb.broker.metadata.FieldHelper" ]
import org.apache.ojb.broker.metadata.FieldHelper;
import org.apache.ojb.broker.metadata.*;
[ "org.apache.ojb" ]
org.apache.ojb;
1,895,761
public Currency getCurrency2() { return _currency2; }
Currency function() { return _currency2; }
/** * Gets the second currency of the transaction. The cash settlement is done in this currency. * @return The currency. */
Gets the second currency of the transaction. The cash settlement is done in this currency
getCurrency2
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/forex/derivative/ForexNonDeliverableForward.java", "license": "apache-2.0", "size": 8675 }
[ "com.opengamma.util.money.Currency" ]
import com.opengamma.util.money.Currency;
import com.opengamma.util.money.*;
[ "com.opengamma.util" ]
com.opengamma.util;
2,235,915
public void dump(Printer pw, String prefix) { pw.println(prefix + "durationMillis: " + durationMillis); pw.println(prefix + "serviceDetails: " + serviceDetails); } }
void function(Printer pw, String prefix) { pw.println(prefix + STR + durationMillis); pw.println(prefix + STR + serviceDetails); } }
/** * Dump a BatteryInfo instance to a Printer. */
Dump a BatteryInfo instance to a Printer
dump
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/app/ApplicationErrorReport.java", "license": "apache-2.0", "size": 19016 }
[ "android.util.Printer" ]
import android.util.Printer;
import android.util.*;
[ "android.util" ]
android.util;
1,431,210
HSSFWorkbook workbook = HSSFTestDataSamples.openSampleWorkbook("SimpleChart.xls"); HSSFSheet sheet = workbook.getSheetAt(0); HSSFRow firstRow = sheet.getRow(0); HSSFCell firstCell = firstRow.getCell(0); //System.out.println("first assertion for date"); Calendar calExp = LocaleUtil.getLocaleCalendar(2000, 0, 1, 10, 51, 2); Date dateAct = HSSFDateUtil.getJavaDate(firstCell.getNumericCellValue(), false); assertEquals(calExp.getTime(), dateAct); HSSFRow row = sheet.createRow(15); HSSFCell cell = row.createCell(1); cell.setCellValue(22); InternalSheet newSheet = workbook.getSheetAt(0).getSheet(); List<RecordBase> records = newSheet.getRecords(); assertTrue(records.get(0) instanceof BOFRecord); assertTrue(records.get(records.size() - 1) instanceof EOFRecord); workbook.close(); }
HSSFWorkbook workbook = HSSFTestDataSamples.openSampleWorkbook(STR); HSSFSheet sheet = workbook.getSheetAt(0); HSSFRow firstRow = sheet.getRow(0); HSSFCell firstCell = firstRow.getCell(0); Calendar calExp = LocaleUtil.getLocaleCalendar(2000, 0, 1, 10, 51, 2); Date dateAct = HSSFDateUtil.getJavaDate(firstCell.getNumericCellValue(), false); assertEquals(calExp.getTime(), dateAct); HSSFRow row = sheet.createRow(15); HSSFCell cell = row.createCell(1); cell.setCellValue(22); InternalSheet newSheet = workbook.getSheetAt(0).getSheet(); List<RecordBase> records = newSheet.getRecords(); assertTrue(records.get(0) instanceof BOFRecord); assertTrue(records.get(records.size() - 1) instanceof EOFRecord); workbook.close(); }
/** * In the presence of a chart we need to make sure BOF/EOF records still exist. */
In the presence of a chart we need to make sure BOF/EOF records still exist
testBOFandEOFRecords
{ "repo_name": "lvweiwolf/poi-3.16", "path": "src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java", "license": "apache-2.0", "size": 2662 }
[ "java.util.Calendar", "java.util.Date", "java.util.List", "org.apache.poi.hssf.HSSFTestDataSamples", "org.apache.poi.hssf.model.InternalSheet", "org.apache.poi.hssf.record.BOFRecord", "org.apache.poi.hssf.record.EOFRecord", "org.apache.poi.hssf.record.RecordBase", "org.apache.poi.util.LocaleUtil", "org.junit.Assert" ]
import java.util.Calendar; import java.util.Date; import java.util.List; import org.apache.poi.hssf.HSSFTestDataSamples; import org.apache.poi.hssf.model.InternalSheet; import org.apache.poi.hssf.record.BOFRecord; import org.apache.poi.hssf.record.EOFRecord; import org.apache.poi.hssf.record.RecordBase; import org.apache.poi.util.LocaleUtil; import org.junit.Assert;
import java.util.*; import org.apache.poi.hssf.*; import org.apache.poi.hssf.model.*; import org.apache.poi.hssf.record.*; import org.apache.poi.util.*; import org.junit.*;
[ "java.util", "org.apache.poi", "org.junit" ]
java.util; org.apache.poi; org.junit;
652,427
public double getDouble(int columnIndex) throws SQLException { Object o = getColumnInType(columnIndex, Type.SQL_DOUBLE); return o == null ? 0.0 : ((Number) o).doubleValue(); }
double function(int columnIndex) throws SQLException { Object o = getColumnInType(columnIndex, Type.SQL_DOUBLE); return o == null ? 0.0 : ((Number) o).doubleValue(); }
/** * <!-- start generic documentation --> * Retrieves the value of the designated column in the current row * of this <code>ResultSet</code> object as * a <code>double</code> in the Java programming language. * <!-- end generic documentation --> * * @param columnIndex the first column is 1, the second is 2, ... * @return the column value; if the value is SQL <code>NULL</code>, the * value returned is <code>0</code> * @exception SQLException if a database access error occurs or this method is * called on a closed result set */
Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>double</code> in the Java programming language.
getDouble
{ "repo_name": "apavlo/h-store", "path": "src/hsqldb19b3/org/hsqldb/jdbc/JDBCResultSet.java", "license": "gpl-3.0", "size": 304688 }
[ "java.sql.SQLException", "org.hsqldb.types.Type" ]
import java.sql.SQLException; import org.hsqldb.types.Type;
import java.sql.*; import org.hsqldb.types.*;
[ "java.sql", "org.hsqldb.types" ]
java.sql; org.hsqldb.types;
2,170,899
public static ExpectedCondition<WebElement> elementToBeClickable(final WebElement element) { return new ExpectedCondition<WebElement>() {
static ExpectedCondition<WebElement> function(final WebElement element) { return new ExpectedCondition<WebElement>() {
/** * An expectation for checking an element is visible and enabled such that you can click it. * * @param element the WebElement * @return the (same) WebElement once it is clickable (visible and enabled) */
An expectation for checking an element is visible and enabled such that you can click it
elementToBeClickable
{ "repo_name": "Ardesco/selenium", "path": "java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java", "license": "apache-2.0", "size": 51442 }
[ "org.openqa.selenium.WebElement" ]
import org.openqa.selenium.WebElement;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,677,812
public void testTermNegative05() throws Exception { final Element ele = BasicParser.createElement( "<EQUI><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></EQUI>"); // System.out.println(ele.toString()); LogicalCheckExceptionList list = checker.checkTerm(ele, context, getChecker()); assertEquals(1, list.size()); assertEquals(30620, list.get(0).getErrorCode()); }
void function() throws Exception { final Element ele = BasicParser.createElement( STRA\STRB\STR); LogicalCheckExceptionList list = checker.checkTerm(ele, context, getChecker()); assertEquals(1, list.size()); assertEquals(30620, list.get(0).getErrorCode()); }
/** * Function: checkTerm(Element) * Type: negative, code 30620, unknown term operator * Data: A <-> B * * @throws Exception Test failed. */
Function: checkTerm(Element) Type: negative, code 30620, unknown term operator Data: A B
testTermNegative05
{ "repo_name": "m-31/qedeq", "path": "QedeqKernelBoTest/src/org/qedeq/kernel/bo/logic/wf/FormulaCheckerTermTest.java", "license": "gpl-2.0", "size": 10330 }
[ "org.qedeq.kernel.bo.logic.common.LogicalCheckExceptionList", "org.qedeq.kernel.se.base.list.Element", "org.qedeq.kernel.xml.parser.BasicParser" ]
import org.qedeq.kernel.bo.logic.common.LogicalCheckExceptionList; import org.qedeq.kernel.se.base.list.Element; import org.qedeq.kernel.xml.parser.BasicParser;
import org.qedeq.kernel.bo.logic.common.*; import org.qedeq.kernel.se.base.list.*; import org.qedeq.kernel.xml.parser.*;
[ "org.qedeq.kernel" ]
org.qedeq.kernel;
201,707
public JSONObject _cardConf(Card card) { return mCol.getDecks().confForDid(card.getDid()); }
JSONObject function(Card card) { return mCol.getDecks().confForDid(card.getDid()); }
/** * Tools ******************************************************************** *************************** */
Tools ********************************************************************
_cardConf
{ "repo_name": "agrueneberg/Anki-Android", "path": "AnkiDroid/src/main/java/com/ichi2/libanki/Sched.java", "license": "gpl-3.0", "size": 87234 }
[ "org.json.JSONObject" ]
import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
2,586,530
public TIntHashSet epsilonNeighborhoodSearch(double[] queryPoint, double epsilon, boolean openNeighborhood) { TIntHashSet neighborhood = new TIntHashSet(); epsilonNeighborhoodSearch(this.root, queryPoint, neighborhood, 0, epsilon * epsilon, openNeighborhood); return neighborhood; }
TIntHashSet function(double[] queryPoint, double epsilon, boolean openNeighborhood) { TIntHashSet neighborhood = new TIntHashSet(); epsilonNeighborhoodSearch(this.root, queryPoint, neighborhood, 0, epsilon * epsilon, openNeighborhood); return neighborhood; }
/** * This function finds all points within an open or closed neighborhood of the query point. * * @param queryPoint the center of the ball to query * @param epsilon the radius of the ball * @param openNeighborhood true if the neighborhood is open and false otherwise * @return the indices of those points that fall within the ball centered at the query point */
This function finds all points within an open or closed neighborhood of the query point
epsilonNeighborhoodSearch
{ "repo_name": "queenBNE/javaplex", "path": "src/java/edu/stanford/math/plex4/kd/KDTree.java", "license": "bsd-3-clause", "size": 10720 }
[ "gnu.trove.TIntHashSet" ]
import gnu.trove.TIntHashSet;
import gnu.trove.*;
[ "gnu.trove" ]
gnu.trove;
50,133
// N.B. Commons IO IOUtils has equivalent methods; these were added before IO was included // TODO - perhaps deprecate these in favour of Commons IO? public static void closeQuietly(Closeable cl){ try { if (cl != null) { cl.close(); } } catch (IOException ignored) { // NOOP } }
static void function(Closeable cl){ try { if (cl != null) { cl.close(); } } catch (IOException ignored) { } }
/** * Close a Closeable with no error thrown * @param cl - Closeable (may be null) */
Close a Closeable with no error thrown
closeQuietly
{ "repo_name": "d0k1/jmeter", "path": "src/jorphan/org/apache/jorphan/util/JOrphanUtils.java", "license": "apache-2.0", "size": 20531 }
[ "java.io.Closeable", "java.io.IOException" ]
import java.io.Closeable; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
641,434
public Cancellable getOverallBucketsAsync(GetOverallBucketsRequest request, RequestOptions options, ActionListener<GetOverallBucketsResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, MLRequestConverters::getOverallBuckets, options, GetOverallBucketsResponse::fromXContent, listener, Collections.emptySet()); }
Cancellable function(GetOverallBucketsRequest request, RequestOptions options, ActionListener<GetOverallBucketsResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, MLRequestConverters::getOverallBuckets, options, GetOverallBucketsResponse::fromXContent, listener, Collections.emptySet()); }
/** * Gets overall buckets for a set of Machine Learning Jobs, notifies listener once the requested buckets are retrieved. * <p> * For additional info * see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html"> * ML GET overall buckets documentation</a> * * @param request The request * @param options Additional request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized * @param listener Listener to be notified upon request completion * @return cancellable that may be used to cancel the request */
Gets overall buckets for a set of Machine Learning Jobs, notifies listener once the requested buckets are retrieved. For additional info see ML GET overall buckets documentation
getOverallBucketsAsync
{ "repo_name": "gingerwizard/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/MachineLearningClient.java", "license": "apache-2.0", "size": 133077 }
[ "java.util.Collections", "org.elasticsearch.action.ActionListener", "org.elasticsearch.client.ml.GetOverallBucketsRequest", "org.elasticsearch.client.ml.GetOverallBucketsResponse" ]
import java.util.Collections; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.ml.GetOverallBucketsRequest; import org.elasticsearch.client.ml.GetOverallBucketsResponse;
import java.util.*; import org.elasticsearch.action.*; import org.elasticsearch.client.ml.*;
[ "java.util", "org.elasticsearch.action", "org.elasticsearch.client" ]
java.util; org.elasticsearch.action; org.elasticsearch.client;
1,222,099
public ServiceResponse<Void> putBase64UrlEncoded(String stringBody) throws ErrorException, IOException, IllegalArgumentException { if (stringBody == null) { throw new IllegalArgumentException("Parameter stringBody is required and cannot be null."); } Call<ResponseBody> call = service.putBase64UrlEncoded(stringBody); return putBase64UrlEncodedDelegate(call.execute()); }
ServiceResponse<Void> function(String stringBody) throws ErrorException, IOException, IllegalArgumentException { if (stringBody == null) { throw new IllegalArgumentException(STR); } Call<ResponseBody> call = service.putBase64UrlEncoded(stringBody); return putBase64UrlEncodedDelegate(call.execute()); }
/** * Put value that is base64url encoded. * * @param stringBody the String value * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters * @return the {@link ServiceResponse} object if successful. */
Put value that is base64url encoded
putBase64UrlEncoded
{ "repo_name": "John-Hart/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodystring/implementation/StringsImpl.java", "license": "mit", "size": 36590 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
1,013,429
@Override public void remove(List<Attack_Windows> entities) { if(entities != null) { entityManager.getTransaction().begin(); try { for(Attack_Windows entity : entities) { remove(entity); } entityManager.getTransaction().commit(); } catch(Exception e) { entityManager.getTransaction().rollback(); e.printStackTrace(System.err); } } }
void function(List<Attack_Windows> entities) { if(entities != null) { entityManager.getTransaction().begin(); try { for(Attack_Windows entity : entities) { remove(entity); } entityManager.getTransaction().commit(); } catch(Exception e) { entityManager.getTransaction().rollback(); e.printStackTrace(System.err); } } }
/** * Overrides remove method */
Overrides remove method
remove
{ "repo_name": "eliasgranderubio/pfm-mustic9", "path": "master/master_db_ws/src/main/java/es/uem/cracking/master/dao/attacks/AttackWindowsDaoImpl.java", "license": "gpl-2.0", "size": 4514 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,814,691
public MultiPartSpecBuilder charset(String charset) { Validate.notEmpty(charset, "Charset cannot be empty"); if (content instanceof byte[] || content instanceof InputStream) { throw new IllegalArgumentException("Cannot specify charset input streams or byte arrays."); } this.charset = charset; return this; }
MultiPartSpecBuilder function(String charset) { Validate.notEmpty(charset, STR); if (content instanceof byte[] content instanceof InputStream) { throw new IllegalArgumentException(STR); } this.charset = charset; return this; }
/** * Specify the charset for this charset. * * @param charset The charset to use * @return An instance of MultiPartSpecBuilder */
Specify the charset for this charset
charset
{ "repo_name": "dushmis/rest-assured", "path": "rest-assured/src/main/java/com/jayway/restassured/builder/MultiPartSpecBuilder.java", "license": "apache-2.0", "size": 6509 }
[ "java.io.InputStream", "org.apache.commons.lang3.Validate" ]
import java.io.InputStream; import org.apache.commons.lang3.Validate;
import java.io.*; import org.apache.commons.lang3.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
582,286