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
final ServletHolder sh = new ServletHolder(ServletContainer.class); sh.setInitParameter("com.sun.jersey.config.property.resourceConfigClass", "com.sun.jersey.api.core.PackagesResourceConfig"); sh.setInitParameter("com.sun.jersey.config.property.packages", "org.jaxrx.resource"); new ...
final ServletHolder sh = new ServletHolder(ServletContainer.class); sh.setInitParameter(STR, STR); sh.setInitParameter(STR, STR); new Context(s, "/", Context.SESSIONS).addServlet(sh, "/"); }
/** * Constructor, attaching JAX-RX to the specified server. * * @param s * server instance */
Constructor, attaching JAX-RX to the specified server
register
{ "repo_name": "sebastiangraf/treetank", "path": "interfacemodules/jax-rx/src/main/java/org/jaxrx/JettyServer.java", "license": "bsd-3-clause", "size": 3269 }
[ "com.sun.jersey.spi.container.servlet.ServletContainer", "org.mortbay.jetty.servlet.Context", "org.mortbay.jetty.servlet.ServletHolder" ]
import com.sun.jersey.spi.container.servlet.ServletContainer; import org.mortbay.jetty.servlet.Context; import org.mortbay.jetty.servlet.ServletHolder;
import com.sun.jersey.spi.container.servlet.*; import org.mortbay.jetty.servlet.*;
[ "com.sun.jersey", "org.mortbay.jetty" ]
com.sun.jersey; org.mortbay.jetty;
2,649,031
private IterableSubject assertTempsForTarget(String testTarget) throws Exception { useConfiguration("--save_temps"); ConfiguredTarget target = getConfiguredTarget(testTarget); assertThat(target).isNotNull(); List<String> temps = ActionsTestUtil.baseArtifactNames(getOutputGroup(target, OutputG...
IterableSubject function(String testTarget) throws Exception { useConfiguration(STR); ConfiguredTarget target = getConfiguredTarget(testTarget); assertThat(target).isNotNull(); List<String> temps = ActionsTestUtil.baseArtifactNames(getOutputGroup(target, OutputGroupInfo.TEMP_FILES)); return assertWithMessage("k8").that...
/** * Returns the {@link IterableSubject} for the {@link OutputGroupInfo#TEMP_FILES} generated when * {@code testTarget} is built for {@code cpu}. */
Returns the <code>IterableSubject</code> for the <code>OutputGroupInfo#TEMP_FILES</code> generated when testTarget is built for cpu
assertTempsForTarget
{ "repo_name": "twitter-forks/bazel", "path": "src/test/java/com/google/devtools/build/lib/rules/cpp/CcCommonTest.java", "license": "apache-2.0", "size": 46628 }
[ "com.google.common.truth.IterableSubject", "com.google.common.truth.Truth", "com.google.devtools.build.lib.actions.util.ActionsTestUtil", "com.google.devtools.build.lib.analysis.ConfiguredTarget", "com.google.devtools.build.lib.analysis.OutputGroupInfo", "java.util.List" ]
import com.google.common.truth.IterableSubject; import com.google.common.truth.Truth; import com.google.devtools.build.lib.actions.util.ActionsTestUtil; import com.google.devtools.build.lib.analysis.ConfiguredTarget; import com.google.devtools.build.lib.analysis.OutputGroupInfo; import java.util.List;
import com.google.common.truth.*; import com.google.devtools.build.lib.actions.util.*; import com.google.devtools.build.lib.analysis.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,483,987
public static void outputResultSet(ResultSetRow[] rows) { if (rows != null) { for (int x = 0; x < rows.length; x++) { ResultSetRow row = rows[x]; NamedValue[] columns = row.getColumns(); for (int y = 0; y < ...
static void function(ResultSetRow[] rows) { if (rows != null) { for (int x = 0; x < rows.length; x++) { ResultSetRow row = rows[x]; NamedValue[] columns = row.getColumns(); for (int y = 0; y < columns.length; y++) { System.out.println(STR + x + STR + row.getColumns(y).getName() + STR + row.getColumns(y).getValue()); } ...
/** * Helper method to output the rows contained within a result set * * @param rows an array of rows */
Helper method to output the rows contained within a result set
outputResultSet
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/sdk/samples/WebServiceSamples/source/org/alfresco/sample/webservice/Query1.java", "license": "lgpl-3.0", "size": 5549 }
[ "org.alfresco.webservice.types.NamedValue", "org.alfresco.webservice.types.ResultSetRow" ]
import org.alfresco.webservice.types.NamedValue; import org.alfresco.webservice.types.ResultSetRow;
import org.alfresco.webservice.types.*;
[ "org.alfresco.webservice" ]
org.alfresco.webservice;
381,974
public OperationStatusRest startProcessingOfTasks(String experimentCode, Long companyUniqueId) { return changeExecStateTo(experimentCode, EnumsApi.ExecContextState.STARTED, companyUniqueId); }
OperationStatusRest function(String experimentCode, Long companyUniqueId) { return changeExecStateTo(experimentCode, EnumsApi.ExecContextState.STARTED, companyUniqueId); }
/** * this method is for using in command-line * * @param experimentCode * @param companyUniqueId * @return */
this method is for using in command-line
startProcessingOfTasks
{ "repo_name": "sergmain/aiai", "path": "apps/metaheuristic/src/main/java/ai/metaheuristic/ai/dispatcher/experiment/ExperimentTopLevelService.java", "license": "gpl-3.0", "size": 11725 }
[ "ai.metaheuristic.api.EnumsApi", "ai.metaheuristic.api.data.OperationStatusRest" ]
import ai.metaheuristic.api.EnumsApi; import ai.metaheuristic.api.data.OperationStatusRest;
import ai.metaheuristic.api.*; import ai.metaheuristic.api.data.*;
[ "ai.metaheuristic.api" ]
ai.metaheuristic.api;
2,323,182
public ArrayList<String> getCelestialStarNameArray () { return this.celestiaStarNameArray; }
ArrayList<String> function () { return this.celestiaStarNameArray; }
/** * Gets the celestial star name array * * @return the name array */
Gets the celestial star name array
getCelestialStarNameArray
{ "repo_name": "sabarjp/VictusLudus", "path": "victusludus/src/com/teamderpy/victusludus/data/ResourceBin.java", "license": "mit", "size": 4999 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,790,117
protected HttpRequest copy(final Reader input, final Writer output) throws IOException { return new CloseOperation<HttpRequest>(input, ignoreCloseExceptions) {
HttpRequest function(final Reader input, final Writer output) throws IOException { return new CloseOperation<HttpRequest>(input, ignoreCloseExceptions) {
/** * Copy from reader to writer * * @param input * @param output * @return this request * @throws IOException */
Copy from reader to writer
copy
{ "repo_name": "manuelblanch/imatge", "path": "src/com/iesebre/DAM2/imatge/HttpRequest.java", "license": "apache-2.0", "size": 86543 }
[ "java.io.IOException", "java.io.Reader", "java.io.Writer" ]
import java.io.IOException; import java.io.Reader; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
1,094,328
setupIntegrationTestEnvironmentForTransactionVerificationTests(HTTP_MODE_IDENTIFIER, TESTNET_ENDPOINT_IDENTIFIER); ArrayList<AccountName> requiredPostingAuths = new ArrayList<>(); requiredPostingAuths.add(new AccountName("dez1337")); // Steem does not allow to combine operation...
setupIntegrationTestEnvironmentForTransactionVerificationTests(HTTP_MODE_IDENTIFIER, TESTNET_ENDPOINT_IDENTIFIER); ArrayList<AccountName> requiredPostingAuths = new ArrayList<>(); requiredPostingAuths.add(new AccountName(STR)); ArrayList<AccountName> requiredActiveAuths = null; String id = STR; EnableContentEditingOper...
/** * <b>Attention:</b> This test class requires a valid active key of the used * "owner". If no active key is provided or the active key is not valid an * Exception will be thrown. The active key is passed as a -D parameter * during test execution. * * @throws Exception * ...
Attention: This test class requires a valid active key of the used "owner". If no active key is provided or the active key is not valid an Exception will be thrown. The active key is passed as a -D parameter during test execution
prepareTestClass
{ "repo_name": "marvin-we/steem-java-api-wrapper", "path": "core/src/test/java/eu/bittrade/libs/steemj/plugins/apis/witness/model/operations/EnableContentEditingOperationIT.java", "license": "gpl-3.0", "size": 6086 }
[ "eu.bittrade.libs.steemj.chain.SignedTransaction", "eu.bittrade.libs.steemj.fc.TimePointSec", "eu.bittrade.libs.steemj.plugins.apis.witness.models.operations.EnableContentEditingOperation", "eu.bittrade.libs.steemj.protocol.AccountName", "eu.bittrade.libs.steemj.protocol.operations.CustomJsonOperation", "...
import eu.bittrade.libs.steemj.chain.SignedTransaction; import eu.bittrade.libs.steemj.fc.TimePointSec; import eu.bittrade.libs.steemj.plugins.apis.witness.models.operations.EnableContentEditingOperation; import eu.bittrade.libs.steemj.protocol.AccountName; import eu.bittrade.libs.steemj.protocol.operations.CustomJsonO...
import eu.bittrade.libs.steemj.chain.*; import eu.bittrade.libs.steemj.fc.*; import eu.bittrade.libs.steemj.plugins.apis.witness.models.operations.*; import eu.bittrade.libs.steemj.protocol.*; import eu.bittrade.libs.steemj.protocol.operations.*; import java.util.*;
[ "eu.bittrade.libs", "java.util" ]
eu.bittrade.libs; java.util;
969,621
public void addTraceParent(Span span) { if (span == null) { return; } addTraceParent(span.getSpanId()); }
void function(Span span) { if (span == null) { return; } addTraceParent(span.getSpanId()); }
/** * Add a trace parent span for this packet.<p/> * * Trace parent spans for a packet are the trace spans responsible for * adding data to that packet. We store them as an array of longs for * efficiency.<p/> * * Protected by the DFSOutputStream dataQueue lock. */
Add a trace parent span for this packet. Trace parent spans for a packet are the trace spans responsible for adding data to that packet. We store them as an array of longs for efficiency. Protected by the DFSOutputStream dataQueue lock
addTraceParent
{ "repo_name": "ouyangjie/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSPacket.java", "license": "apache-2.0", "size": 10505 }
[ "org.apache.htrace.core.Span" ]
import org.apache.htrace.core.Span;
import org.apache.htrace.core.*;
[ "org.apache.htrace" ]
org.apache.htrace;
13,215
protected boolean isFromMatch(Method method) { return String.class.equals(method.getParameterTypes()[0]); }
boolean function(Method method) { return String.class.equals(method.getParameterTypes()[0]); }
/** * Subclasses can override this template method with their own matching strategy * @param method The method to be determined * @return True if match */
Subclasses can override this template method with their own matching strategy
isFromMatch
{ "repo_name": "HerrB92/obp", "path": "OpenBeaconPackage/libraries/jadira.parent-3.1.0.CR8/jadira/bindings/src/main/java/org/jadira/bindings/core/provider/JodaConvertConverterProvider.java", "license": "mit", "size": 1966 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
617,131
void applyFlowRule(NetworkId networkId, FlowRule... flowRules);
void applyFlowRule(NetworkId networkId, FlowRule... flowRules);
/** * Instructs the provider to apply the specified flow rules to their * respective virtual devices. * * @param networkId the identity of the virtual network where this rule applies * @param flowRules one or more flow rules */
Instructs the provider to apply the specified flow rules to their respective virtual devices
applyFlowRule
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "incubator/api/src/main/java/org/onosproject/incubator/net/virtual/provider/VirtualFlowRuleProvider.java", "license": "apache-2.0", "size": 2100 }
[ "org.onosproject.incubator.net.virtual.NetworkId", "org.onosproject.net.flow.FlowRule" ]
import org.onosproject.incubator.net.virtual.NetworkId; import org.onosproject.net.flow.FlowRule;
import org.onosproject.incubator.net.virtual.*; import org.onosproject.net.flow.*;
[ "org.onosproject.incubator", "org.onosproject.net" ]
org.onosproject.incubator; org.onosproject.net;
2,100,262
public List<CmsSite> getAvailableCorruptedSites(CmsObject cms, boolean workplaceMode) { List<CmsSite> res = new ArrayList<CmsSite>(); List<CmsSite> visSites = getAvailableSites(cms, workplaceMode); Map<CmsSiteMatcher, CmsSite> allsites = getSites(); for (CmsSiteMatcher matcher : all...
List<CmsSite> function(CmsObject cms, boolean workplaceMode) { List<CmsSite> res = new ArrayList<CmsSite>(); List<CmsSite> visSites = getAvailableSites(cms, workplaceMode); Map<CmsSiteMatcher, CmsSite> allsites = getSites(); for (CmsSiteMatcher matcher : allsites.keySet()) { CmsSite site = allsites.get(matcher); if (!v...
/** * Returns all wrong configured sites.<p> * * @param cms CmsObject * @param workplaceMode workplace mode * @return List of CmsSite */
Returns all wrong configured sites
getAvailableCorruptedSites
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/site/CmsSiteManagerImpl.java", "license": "lgpl-2.1", "size": 73846 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.opencms.file.CmsObject" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.opencms.file.CmsObject;
import java.util.*; import org.opencms.file.*;
[ "java.util", "org.opencms.file" ]
java.util; org.opencms.file;
2,165,307
public List<TranslationModel> getModels(final Boolean showDefault, final String source, final String target) { final RequestBuilder requestBuilder = RequestBuilder.get(PATH_MODELS); if (source != null && !source.isEmpty()) requestBuilder.withQuery(SOURCE, source); if (target != null && !targ...
List<TranslationModel> function(final Boolean showDefault, final String source, final String target) { final RequestBuilder requestBuilder = RequestBuilder.get(PATH_MODELS); if (source != null && !source.isEmpty()) requestBuilder.withQuery(SOURCE, source); if (target != null && !target.isEmpty()) requestBuilder.withQue...
/** * Retrieves the list of models. * * @param showDefault show default models * @param source the source * @param target the target * @return the translation models * @see TranslationModel */
Retrieves the list of models
getModels
{ "repo_name": "ibmecod/cognitive-devoxx-videosearch", "path": "src/main/java/com/ibm/watson/developer_cloud/language_translation/v2/LanguageTranslation.java", "license": "apache-2.0", "size": 11318 }
[ "com.ibm.watson.developer_cloud.http.RequestBuilder", "com.ibm.watson.developer_cloud.language_translation.v2.model.TranslationModel", "com.ibm.watson.developer_cloud.language_translation.v2.model.TranslationModelList", "java.util.List" ]
import com.ibm.watson.developer_cloud.http.RequestBuilder; import com.ibm.watson.developer_cloud.language_translation.v2.model.TranslationModel; import com.ibm.watson.developer_cloud.language_translation.v2.model.TranslationModelList; import java.util.List;
import com.ibm.watson.developer_cloud.http.*; import com.ibm.watson.developer_cloud.language_translation.v2.model.*; import java.util.*;
[ "com.ibm.watson", "java.util" ]
com.ibm.watson; java.util;
1,309,124
public String makeEscapedCompactString() { return toEscapedCompactString(realCounter); }
String function() { return toEscapedCompactString(realCounter); }
/** * Returns the compact stringified version of the counter in the format * [(actual-name)(display-name)(value)] * @return the stringified result */
Returns the compact stringified version of the counter in the format [(actual-name)(display-name)(value)]
makeEscapedCompactString
{ "repo_name": "cnfire/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Counters.java", "license": "apache-2.0", "size": 19351 }
[ "org.apache.hadoop.mapreduce.util.CountersStrings" ]
import org.apache.hadoop.mapreduce.util.CountersStrings;
import org.apache.hadoop.mapreduce.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
943,913
public Item setMaxDamage(int maxDamageIn) { this.maxDamage = maxDamageIn; if (maxDamageIn > 0) { this.addPropertyOverride(new ResourceLocation("damaged"), DAMAGED_GETTER); this.addPropertyOverride(new ResourceLocation("damage"), DAMAGE_GETTER); } ...
Item function(int maxDamageIn) { this.maxDamage = maxDamageIn; if (maxDamageIn > 0) { this.addPropertyOverride(new ResourceLocation(STR), DAMAGED_GETTER); this.addPropertyOverride(new ResourceLocation(STR), DAMAGE_GETTER); } return this; }
/** * set max damage of an Item */
set max damage of an Item
setMaxDamage
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/item/Item.java", "license": "lgpl-2.1", "size": 86763 }
[ "net.minecraft.util.ResourceLocation" ]
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
610,845
@Override public void onEnabled(Context context, Intent intent) { EmailBroadcastProcessorService.processDevicePolicyMessage(context, DEVICE_ADMIN_MESSAGE_ENABLED); }
void function(Context context, Intent intent) { EmailBroadcastProcessorService.processDevicePolicyMessage(context, DEVICE_ADMIN_MESSAGE_ENABLED); }
/** * Called after the administrator is first enabled. */
Called after the administrator is first enabled
onEnabled
{ "repo_name": "craigacgomez/flaming_monkey_packages_apps_Email", "path": "src/com/android/email/SecurityPolicy.java", "license": "apache-2.0", "size": 40372 }
[ "android.content.Context", "android.content.Intent", "com.android.email.service.EmailBroadcastProcessorService" ]
import android.content.Context; import android.content.Intent; import com.android.email.service.EmailBroadcastProcessorService;
import android.content.*; import com.android.email.service.*;
[ "android.content", "com.android.email" ]
android.content; com.android.email;
886,442
public static byte[] readFileFromZip(ZipInputStream zis, String filename) throws IOException { ZipEntry zi = null; byte content[] = null; while ((zi = zis.getNextEntry()) != null) { if (filename.equals(zi.getName())) { IOUtils.toByteArray(zis); break; } } return content; }
static byte[] function(ZipInputStream zis, String filename) throws IOException { ZipEntry zi = null; byte content[] = null; while ((zi = zis.getNextEntry()) != null) { if (filename.equals(zi.getName())) { IOUtils.toByteArray(zis); break; } } return content; }
/** * Read file from ZIP */
Read file from ZIP
readFileFromZip
{ "repo_name": "papamas/DMS-KANGREG-XI-MANADO", "path": "src/main/java/com/openkm/util/ArchiveUtils.java", "license": "gpl-3.0", "size": 7232 }
[ "java.io.IOException", "java.util.zip.ZipEntry", "java.util.zip.ZipInputStream", "org.apache.commons.io.IOUtils" ]
import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import org.apache.commons.io.IOUtils;
import java.io.*; import java.util.zip.*; import org.apache.commons.io.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
2,376,094
private long writeToStorage(final List selectedCells, final byte[] data) throws StorageException { final long position; try { // REVIEWME: @SF -> Preferred to put into SortedArray (Queue or like that) // and then flush it to disk final int lastItem = selectedCells....
long function(final List selectedCells, final byte[] data) throws StorageException { final long position; try { final int lastItem = selectedCells.size() - 1; long currentCell = (Long) selectedCells.get(0); position = storageCellSize * currentCell; int lengthToRecord = data.length; final byte[] buffer = new byte[(int) ...
/** * <b>writeToStorage</b> writes Storage Cells to the File * * @param selectedCells - List of Cells to be written to file * @param data - byte array to be recorded to disk * @return - <u>long</u> postion of the first cell on disk * @throws StorageException */
writeToStorage writes Storage Cells to the File
writeToStorage
{ "repo_name": "cacheonix/cacheonix-core", "path": "src/org/cacheonix/impl/cache/storage/disk/StorageCellsManager.java", "license": "lgpl-2.1", "size": 26173 }
[ "java.util.Arrays", "java.util.List" ]
import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,817,759
List<Child> findByCareGiverName(String careGiverName);
List<Child> findByCareGiverName(String careGiverName);
/** * Find by care giver name. * * @param careGiverName * the care giver name * @return the list */
Find by care giver name
findByCareGiverName
{ "repo_name": "gudipatiharitha/medicmobile", "path": "modules/medicmobile/trunk/src/main/java/org/medicmobile/repository/ChildRepository.java", "license": "bsd-3-clause", "size": 2394 }
[ "java.util.List", "org.medicmobile.model.Child" ]
import java.util.List; import org.medicmobile.model.Child;
import java.util.*; import org.medicmobile.model.*;
[ "java.util", "org.medicmobile.model" ]
java.util; org.medicmobile.model;
1,519,201
public void onUpdate() { this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; if (this.particleAge++ >= this.particleMaxAge) { this.setDead(); } this.setParticleTextureIndex(7 - this.particleAge * 8 / this.particle...
void function() { this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ = this.posZ; if (this.particleAge++ >= this.particleMaxAge) { this.setDead(); } this.setParticleTextureIndex(7 - this.particleAge * 8 / this.particleMaxAge); this.moveEntity(this.motionX, this.motionY, this.motionZ); this.motionX *= 0...
/** * Called to update the entity's position/logic. */
Called to update the entity's position/logic
onUpdate
{ "repo_name": "SkidJava/BaseClient", "path": "new_1.8.8/net/minecraft/client/particle/EntityCloudFX.java", "license": "gpl-2.0", "size": 3400 }
[ "net.minecraft.entity.player.EntityPlayer" ]
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
177,876
try { AltaPaciente dialog = new AltaPaciente(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } //Se crea el diálogo public AltaPaciente() { setType(Type.POPUP); setResizable(false); setTitle...
try { AltaPaciente dialog = new AltaPaciente(); dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } public AltaPaciente() { setType(Type.POPUP); setResizable(false); setTitle(STR); setBounds(100, 100, 300, 300); getContentPane().setLayout(...
/** * Launch the application. */
Launch the application
main
{ "repo_name": "proudh0n/emergencymasta", "path": "src/iu/AltaPaciente.java", "license": "gpl-2.0", "size": 8622 }
[ "java.awt.BorderLayout", "java.awt.Window", "javax.swing.JDialog", "javax.swing.JLabel", "javax.swing.JRadioButton", "javax.swing.JTextField", "javax.swing.border.EmptyBorder" ]
import java.awt.BorderLayout; import java.awt.Window; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JRadioButton; import javax.swing.JTextField; import javax.swing.border.EmptyBorder;
import java.awt.*; import javax.swing.*; import javax.swing.border.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
71,795
private void configureTLS(URL url, URLConnection conn) { if ("https".equals(url.getProtocol())) { try { final HttpsURLConnection secCon = (HttpsURLConnection) conn; final SSLSocketFactoryEx factory = new SSLSocketFactoryEx(settings); secCon.setSSLS...
void function(URL url, URLConnection conn) { if ("https".equals(url.getProtocol())) { try { final HttpsURLConnection secCon = (HttpsURLConnection) conn; final SSLSocketFactoryEx factory = new SSLSocketFactoryEx(settings); secCon.setSSLSocketFactory(factory); } catch (NoSuchAlgorithmException ex) { LOGGER.debug(STR, ex)...
/** * If the protocol is HTTPS, this will configure the cipher suites so that * connections can be made to the NVD, and others, using older versions of * Java. * * @param url the URL * @param conn the connection */
If the protocol is HTTPS, this will configure the cipher suites so that connections can be made to the NVD, and others, using older versions of Java
configureTLS
{ "repo_name": "hansjoachim/DependencyCheck", "path": "utils/src/main/java/org/owasp/dependencycheck/utils/URLConnectionFactory.java", "license": "apache-2.0", "size": 9355 }
[ "java.net.URLConnection", "java.security.KeyManagementException", "java.security.NoSuchAlgorithmException", "javax.net.ssl.HttpsURLConnection" ]
import java.net.URLConnection; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import javax.net.ssl.HttpsURLConnection;
import java.net.*; import java.security.*; import javax.net.ssl.*;
[ "java.net", "java.security", "javax.net" ]
java.net; java.security; javax.net;
370,581
private JSONArray populateContactArray(int limit, HashMap<String, Boolean> populate, Cursor c) { String contactId = ""; String rawId = ""; String oldContactId = ""; boolean newContact = true; String mimetype = ""; JSONArray contacts = new JSONArray(); JSONObject contact...
JSONArray function(int limit, HashMap<String, Boolean> populate, Cursor c) { String contactId = STRSTRSTRSTRidSTRrawIdSTRdisplayNameSTRnameSTRnameSTRphoneNumbersSTRemailsSTRaddressesSTRorganizationsSTRimsSTRnoteSTRnoteSTRnicknameSTRnicknameSTRurlsSTRbirthdaySTRbirthdaySTRphotos",populate)) { photos.put(photoQuery(c, co...
/** * Creates an array of contacts from the cursor you pass in * * @param limit max number of contacts for the array * @param populate whether or not you should populate a certain value * @param c the cursor * @return a JSONArray of contacts */
Creates an array of contacts from the cursor you pass in
populateContactArray
{ "repo_name": "justsml/cordova-android", "path": "framework/src/org/apache/cordova/ContactAccessorSdk5.java", "license": "apache-2.0", "size": 84647 }
[ "android.database.Cursor", "android.util.Log", "java.util.HashMap", "org.json.JSONArray", "org.json.JSONException" ]
import android.database.Cursor; import android.util.Log; import java.util.HashMap; import org.json.JSONArray; import org.json.JSONException;
import android.database.*; import android.util.*; import java.util.*; import org.json.*;
[ "android.database", "android.util", "java.util", "org.json" ]
android.database; android.util; java.util; org.json;
2,481,032
@Test void onLinkRemoteCloseWithErrorCondition() { // Arrange final ErrorCondition errorCondition = new ErrorCondition(symbol, description); when(link.getRemoteCondition()).thenReturn(errorCondition); when(link.getSession()).thenReturn(session); when(link.getLocalState()...
void onLinkRemoteCloseWithErrorCondition() { final ErrorCondition errorCondition = new ErrorCondition(symbol, description); when(link.getRemoteCondition()).thenReturn(errorCondition); when(link.getSession()).thenReturn(session); when(link.getLocalState()).thenReturn(EndpointState.CLOSED); StepVerifier.create(handler.ge...
/** * Verifies that an error is propagated if there is an error condition on close. */
Verifies that an error is propagated if there is an error condition on close
onLinkRemoteCloseWithErrorCondition
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/LinkHandlerTest.java", "license": "mit", "size": 14333 }
[ "com.azure.core.amqp.exception.AmqpException", "org.apache.qpid.proton.amqp.transport.ErrorCondition", "org.apache.qpid.proton.engine.EndpointState", "org.junit.jupiter.api.Assertions", "org.mockito.Mockito" ]
import com.azure.core.amqp.exception.AmqpException; import org.apache.qpid.proton.amqp.transport.ErrorCondition; import org.apache.qpid.proton.engine.EndpointState; import org.junit.jupiter.api.Assertions; import org.mockito.Mockito;
import com.azure.core.amqp.exception.*; import org.apache.qpid.proton.amqp.transport.*; import org.apache.qpid.proton.engine.*; import org.junit.jupiter.api.*; import org.mockito.*;
[ "com.azure.core", "org.apache.qpid", "org.junit.jupiter", "org.mockito" ]
com.azure.core; org.apache.qpid; org.junit.jupiter; org.mockito;
1,592,241
public static void putUnsignedByte(final ByteBuffer bb, final short v, final int offset) { bb.put(offset, (byte) (v & 0xff)); }
static void function(final ByteBuffer bb, final short v, final int offset) { bb.put(offset, (byte) (v & 0xff)); }
/** * Put an unsigned byte into the specified ByteBuffer at the specified * offset * * @param bb * ByteBuffer to put the byte into * @param v * the short containing the unsigned byte * @param offset * the offset to insert the unsigned byte at */
Put an unsigned byte into the specified ByteBuffer at the specified offset
putUnsignedByte
{ "repo_name": "fnkhan/second", "path": "src/main/java/org/openflow/util/Unsigned.java", "license": "apache-2.0", "size": 7795 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,851,682
@Test public void testTreeNodeCallback() { TreeNodeWithChildren nodeValue = new TreeNodeWithChildren(); TreeNodeCallback callback = new KeyValueReplacer(); // @formatter:off TreeNode node = new TreeNodeBuilder(callback) .addChild(TEST_KEY1, nodeValue) .addChild(new TreeNode()) ...
void function() { TreeNodeWithChildren nodeValue = new TreeNodeWithChildren(); TreeNodeCallback callback = new KeyValueReplacer(); TreeNode node = new TreeNodeBuilder(callback) .addChild(TEST_KEY1, nodeValue) .addChild(new TreeNode()) .build(); assertKeyValue(node, TEST_KEY3, TEST_VALUE3, 2); assertKeyValueNoChild(node...
/** * Tests builder with {@link TreeNodeCallback} that replaces all keys and values with known constants. The callback is * not expected to change {@link TreeNode}s not created by the builder. */
Tests builder with <code>TreeNodeCallback</code> that replaces all keys and values with known constants. The callback is not expected to change <code>TreeNode</code>s not created by the builder
testTreeNodeCallback
{ "repo_name": "mrtamm/rocket-path", "path": "src/test/java/ws/rocket/path/test/builder/TreeNodeBuilderTest.java", "license": "apache-2.0", "size": 6055 }
[ "ws.rocket.path.TreeNode", "ws.rocket.path.builder.TreeNodeBuilder", "ws.rocket.path.builder.TreeNodeBuilderAware", "ws.rocket.path.builder.TreeNodeCallback", "ws.rocket.path.test.TreeNodeTest" ]
import ws.rocket.path.TreeNode; import ws.rocket.path.builder.TreeNodeBuilder; import ws.rocket.path.builder.TreeNodeBuilderAware; import ws.rocket.path.builder.TreeNodeCallback; import ws.rocket.path.test.TreeNodeTest;
import ws.rocket.path.*; import ws.rocket.path.builder.*; import ws.rocket.path.test.*;
[ "ws.rocket.path" ]
ws.rocket.path;
1,781,209
@Nullable IColony getColony();
IColony getColony();
/** * Getter for the colony. * * @return the colony of the citizen or null. */
Getter for the colony
getColony
{ "repo_name": "Minecolonies/minecolonies", "path": "src/api/java/com/minecolonies/api/entity/citizen/citizenhandlers/ICitizenColonyHandler.java", "license": "gpl-3.0", "size": 1538 }
[ "com.minecolonies.api.colony.IColony" ]
import com.minecolonies.api.colony.IColony;
import com.minecolonies.api.colony.*;
[ "com.minecolonies.api" ]
com.minecolonies.api;
1,767,187
public void configChanged() { setLevel(config.getLogLevel()); useChildLogging = config.getLogFile() != null && !config.getLogFile().equals(new File("")) && config.getLogFileSizeLimit() != 0; if (useChildLogging()) { logDir = rollingFileHandler.getParentFile(config.getLogFile()); // le...
void function() { setLevel(config.getLogLevel()); useChildLogging = config.getLogFile() != null && !config.getLogFile().equals(new File("")) && config.getLogFileSizeLimit() != 0; if (useChildLogging()) { logDir = rollingFileHandler.getParentFile(config.getLogFile()); mainLogId = rollingFileHandler.calcNextMainId(logDir...
/** * Call when the config changes at runtime. */
Call when the config changes at runtime
configChanged
{ "repo_name": "PurelyApplied/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/logging/ManagerLogWriter.java", "license": "apache-2.0", "size": 13829 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,002,650
@Test (timeout=300000) public void testCombineSnapshotDiff2() throws Exception { testCombineSnapshotDiffImpl(sub, "subsub1/subsubsub1/", 3); }
@Test (timeout=300000) void function() throws Exception { testCombineSnapshotDiffImpl(sub, STR, 3); }
/** * Test deleting snapshots in more complicated scenarios (snapshot diffs are * distributed in the directory sub-tree) */
Test deleting snapshots in more complicated scenarios (snapshot diffs are distributed in the directory sub-tree)
testCombineSnapshotDiff2
{ "repo_name": "ZhangXFeng/hadoop", "path": "src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotDeletion.java", "license": "apache-2.0", "size": 47391 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
80,643
private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtils.writeShape(this.legendLine, stream); SerialUtils.writeComposite(this.fillComposite, stream); }
void function(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtils.writeShape(this.legendLine, stream); SerialUtils.writeComposite(this.fillComposite, stream); }
/** * Provides serialization support. * * @param stream the output stream. * * @throws IOException if there is an I/O error. */
Provides serialization support
writeObject
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/main/java/org/jfree/chart/renderer/DefaultPolarItemRenderer.java", "license": "lgpl-2.1", "size": 33651 }
[ "java.io.IOException", "java.io.ObjectOutputStream", "org.jfree.chart.util.SerialUtils" ]
import java.io.IOException; import java.io.ObjectOutputStream; import org.jfree.chart.util.SerialUtils;
import java.io.*; import org.jfree.chart.util.*;
[ "java.io", "org.jfree.chart" ]
java.io; org.jfree.chart;
1,604,294
protected void onPtrRestoreInstanceState(Bundle savedInstanceState) { }
void function(Bundle savedInstanceState) { }
/** * Called by {@link #onRestoreInstanceState(Parcelable)} so that derivative * classes can handle their saved instance state. * * @param savedInstanceState * - Bundle which contains saved instance state. */
Called by <code>#onRestoreInstanceState(Parcelable)</code> so that derivative classes can handle their saved instance state
onPtrRestoreInstanceState
{ "repo_name": "ribbon-xx/VTVPro-Plus", "path": "VtvPro/src/com/handmark/pulltorefresh/library/PullToRefreshBase.java", "license": "apache-2.0", "size": 37255 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
2,692,752
public void put(@NonNull final String key, final Parcelable value) { put(key, value, -1); }
void function(@NonNull final String key, final Parcelable value) { put(key, value, -1); }
/** * Put parcelable in cache. * * @param key The key of cache. * @param value The value of cache. */
Put parcelable in cache
put
{ "repo_name": "Blankj/AndroidUtilCode", "path": "lib/utilcode/src/main/java/com/blankj/utilcode/util/CacheDiskUtils.java", "license": "apache-2.0", "size": 30297 }
[ "android.os.Parcelable", "androidx.annotation.NonNull" ]
import android.os.Parcelable; import androidx.annotation.NonNull;
import android.os.*; import androidx.annotation.*;
[ "android.os", "androidx.annotation" ]
android.os; androidx.annotation;
2,519,729
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Flux<ByteBuffer>>> updateTagsWithResponseAsync( String resourceGroupName, String azureFirewallName, TagsObject parameters) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String azureFirewallName, TagsObject parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new ...
/** * Updates tags of an Azure Firewall resource. * * @param resourceGroupName The name of the resource group. * @param azureFirewallName The name of the Azure Firewall. * @param parameters Parameters supplied to update azure firewall tags. * @throws IllegalArgumentException thrown if para...
Updates tags of an Azure Firewall resource
updateTagsWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallsClientImpl.java", "license": "mit", "size": 77256 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.network.models.TagsObject", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.network.models.TagsObject; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
1,759,031
public static float getRotationOfChar(Element elt, final int charnum ) { final SVGOMElement svgelt = (SVGOMElement)elt; if ( (charnum < 0) || (charnum >= getNumberOfChars(elt)) ){ throw svgelt.createDOMException (DOMException.INDEX_SIZE_ERR, ...
static float function(Element elt, final int charnum ) { final SVGOMElement svgelt = (SVGOMElement)elt; if ( (charnum < 0) (charnum >= getNumberOfChars(elt)) ){ throw svgelt.createDOMException (DOMException.INDEX_SIZE_ERR, "",null); } final SVGTextContent context = (SVGTextContent)svgelt.getSVGContext(); return context...
/** * To implement {@link * org.w3c.dom.svg.SVGTextContentElement#getRotationOfChar(int charnum)}. */
To implement <code>org.w3c.dom.svg.SVGTextContentElement#getRotationOfChar(int charnum)</code>
getRotationOfChar
{ "repo_name": "shyamalschandra/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/svg/SVGTextContentSupport.java", "license": "apache-2.0", "size": 10284 }
[ "org.w3c.dom.DOMException", "org.w3c.dom.Element" ]
import org.w3c.dom.DOMException; import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,539,931
public void makeElseBlock(SymTabAST tree) { if (tree.getType() == TokenTypes.SLIST) { BlockDef block = makeBlock(tree); symbolTable.pushScope( block ); walkTree(tree, false); symbolTable.popScope(); } else { walkTree(tree, false); } }
void function(SymTabAST tree) { if (tree.getType() == TokenTypes.SLIST) { BlockDef block = makeBlock(tree); symbolTable.pushScope( block ); walkTree(tree, false); symbolTable.popScope(); } else { walkTree(tree, false); } }
/** * defines an anonymous block to enclose the scope of an else block * * @param tree the SymTabAST to process * @return <code>void</code> * @see #makeBlock(SymTabAST) * @see #walkTree(SymTabAST, boolean) */
defines an anonymous block to enclose the scope of an else block
makeElseBlock
{ "repo_name": "rnveach/contribution", "path": "usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/TableMaker.java", "license": "lgpl-2.1", "size": 43732 }
[ "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
1,848,478
RacePositionTemplate addRacePositionTemplate(RacePositionTemplate template, String sessionId) throws ServiceException;
RacePositionTemplate addRacePositionTemplate(RacePositionTemplate template, String sessionId) throws ServiceException;
/** * Add template * @param template to create * @return created template * @throws ServiceException on error */
Add template
addRacePositionTemplate
{ "repo_name": "PloughingAByteField/tiatus", "path": "service/src/main/java/org/tiatus/service/RacePositionTemplateService.java", "license": "mit", "size": 1588 }
[ "org.tiatus.entity.RacePositionTemplate" ]
import org.tiatus.entity.RacePositionTemplate;
import org.tiatus.entity.*;
[ "org.tiatus.entity" ]
org.tiatus.entity;
2,223,037
public void testAssociationCQL2() throws ApplicationException { CQLQuery cqlQuery = new CQLQuery(); CQLObject target = new CQLObject(); CQLAssociation association = new CQLAssociation(); association.setName("gov.nih.nci.cacoresdk.domain.inheritance.childwithassociation.Payment"); association.setAttribute...
void function() throws ApplicationException { CQLQuery cqlQuery = new CQLQuery(); CQLObject target = new CQLObject(); CQLAssociation association = new CQLAssociation(); association.setName(STR); association.setAttribute(new CQLAttribute("id", CQLPredicate.EQUAL_TO,"2")); target.setName(STR); target.setAssociation(assoc...
/** * Uses CQL Criteria for inheritance as association in search * Verifies that the results are returned * Verifies size of the result set * Verifies that none of the attribute is null * * @throws ApplicationException */
Uses CQL Criteria for inheritance as association in search Verifies that the results are returned Verifies size of the result set Verifies that none of the attribute is null
testAssociationCQL2
{ "repo_name": "NCIP/stats-analysis", "path": "cacoresdk 3.2.1/junit/src/test/gov/nih/nci/cacoresdk/domain/inheritance/childwithassociation/ChildWithAssociationTest.java", "license": "bsd-3-clause", "size": 16836 }
[ "gov.nih.nci.cacoresdk.domain.inheritance.childwithassociation.Cash", "gov.nih.nci.system.applicationservice.ApplicationException", "gov.nih.nci.system.query.cql.CQLAssociation", "gov.nih.nci.system.query.cql.CQLAttribute", "gov.nih.nci.system.query.cql.CQLObject", "gov.nih.nci.system.query.cql.CQLPredica...
import gov.nih.nci.cacoresdk.domain.inheritance.childwithassociation.Cash; import gov.nih.nci.system.applicationservice.ApplicationException; import gov.nih.nci.system.query.cql.CQLAssociation; import gov.nih.nci.system.query.cql.CQLAttribute; import gov.nih.nci.system.query.cql.CQLObject; import gov.nih.nci.system.que...
import gov.nih.nci.cacoresdk.domain.inheritance.childwithassociation.*; import gov.nih.nci.system.applicationservice.*; import gov.nih.nci.system.query.cql.*; import java.util.*;
[ "gov.nih.nci", "java.util" ]
gov.nih.nci; java.util;
2,587,479
public void test_ConstructorLjava_util_TimeZoneLjava_util_Locale() { // Test for method java.util.GregorianCalendar(java.util.TimeZone, // java.util.Locale) Date date = new Date(2008, 1, 1); TimeZone.getDefault(); GregorianCalendar gc1 = new GregorianCalendar(AMERICA_NEW_YORK...
void function() { Date date = new Date(2008, 1, 1); TimeZone.getDefault(); GregorianCalendar gc1 = new GregorianCalendar(AMERICA_NEW_YORK, Locale.JAPAN); gc1.setTime(date); GregorianCalendar gc2 = new GregorianCalendar(AMERICA_NEW_YORK, Locale.JAPAN); gc2.setTime(date); GregorianCalendar gc3 = new GregorianCalendar(AME...
/** * java.util.GregorianCalendar#GregorianCalendar(java.util.TimeZone, *java.util.Locale) */
java.util.GregorianCalendar#GregorianCalendar(java.util.TimeZone, java.util.Locale)
test_ConstructorLjava_util_TimeZoneLjava_util_Locale
{ "repo_name": "bandcampdotcom/j2objc", "path": "jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/GregorianCalendarTest.java", "license": "apache-2.0", "size": 34151 }
[ "java.util.Calendar", "java.util.Date", "java.util.GregorianCalendar", "java.util.Locale", "java.util.TimeZone" ]
import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
904,685
boolean res = false; XNameAccess the_tables = oObj.getTextTables(); res = the_tables.hasByName("SwXTextDocument"); tRes.tested("getTextTables()",res); }
boolean res = false; XNameAccess the_tables = oObj.getTextTables(); res = the_tables.hasByName(STR); tRes.tested(STR,res); }
/** * Get the collection of tables. Then check it. <p> * Has <b>OK</b> status if returned collection contains * element with name 'SwXTextDocument'. */
Get the collection of tables. Then check it. Has OK status if returned collection contains element with name 'SwXTextDocument'
_getTextTables
{ "repo_name": "sbbic/core", "path": "qadevOOo/tests/java/ifc/text/_XTextTablesSupplier.java", "license": "gpl-3.0", "size": 1847 }
[ "com.sun.star.container.XNameAccess" ]
import com.sun.star.container.XNameAccess;
import com.sun.star.container.*;
[ "com.sun.star" ]
com.sun.star;
1,925,885
public void complexOuterJoinQuery() { EntityManager em = createEntityManager(); // JPQL query using one INNER JOIN and three OUTER JOINs String jpql = "SELECT t3.firstName, t2.number, t4.firstName, t1.name " + "FROM Employee t0 " + "INNER JOIN t0.pro...
void function() { EntityManager em = createEntityManager(); String jpql = STR + STR + STR + STR + STR + STR + STR + STR; Query q = em.createQuery(jpql); List<Object[]> result = q.getResultList(); Assert.assertEquals(STR, 2, result.size()); Object[] result0 = result.get(0); Assert.assertNull (STR, result0[0]); Assert.as...
/** * Test glassfish issue 3041. */
Test glassfish issue 3041
complexOuterJoinQuery
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/jpql/JUnitJPQLComplexTestSuite.java", "license": "epl-1.0", "size": 208931 }
[ "java.util.List", "javax.persistence.EntityManager", "javax.persistence.Query", "junit.framework.Assert" ]
import java.util.List; import javax.persistence.EntityManager; import javax.persistence.Query; import junit.framework.Assert;
import java.util.*; import javax.persistence.*; import junit.framework.*;
[ "java.util", "javax.persistence", "junit.framework" ]
java.util; javax.persistence; junit.framework;
1,013,447
@Generated @Selector("selectedOffer") public native INRestaurantOffer selectedOffer();
@Selector(STR) native INRestaurantOffer function();
/** * offer selected by user, if one exists */
offer selected by user, if one exists
selectedOffer
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/intents/INBookRestaurantReservationIntent.java", "license": "apache-2.0", "size": 8309 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
293,601
public void setUriageDate(LocalDateTime value) { set(13, value); }
void function(LocalDateTime value) { set(13, value); }
/** * Setter for <code>PUBLIC.T_URIAGE.URIAGE_DATE</code>. */
Setter for <code>PUBLIC.T_URIAGE.URIAGE_DATE</code>
setUriageDate
{ "repo_name": "ShowKa/HanbaiKanri", "path": "src/main/java/com/showka/table/public_/tables/records/T_URIAGE_RECORD.java", "license": "mit", "size": 16106 }
[ "java.time.LocalDateTime" ]
import java.time.LocalDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,322,654
public int load(int dataBytes, int parentValueCount, int childValueCount, DrillBuf buf);
int function(int dataBytes, int parentValueCount, int childValueCount, DrillBuf buf);
/** * Load the records in the provided buffer based on the given number of values. * @param dataBytes The number of bytes associated with the data array. * @param parentValueCount Number of separate repeating groupings. * @param childValueCount Number of supported values in the vector. * @param buf...
Load the records in the provided buffer based on the given number of values
load
{ "repo_name": "bbevens/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/vector/RepeatedVariableWidthVector.java", "license": "apache-2.0", "size": 2028 }
[ "io.netty.buffer.DrillBuf" ]
import io.netty.buffer.DrillBuf;
import io.netty.buffer.*;
[ "io.netty.buffer" ]
io.netty.buffer;
1,394,034
List<TNotifyFieldBean> getTriggerFieldsForRaciRole(Integer person, List<Integer> projectIDs, Integer actionType, Integer fieldType);
List<TNotifyFieldBean> getTriggerFieldsForRaciRole(Integer person, List<Integer> projectIDs, Integer actionType, Integer fieldType);
/** * Get the notifyFieldBeans, the person requests * notification for, for a project, actionType and fieldType * @param person * @param projectIDs typically one single project but if the project * itself is modified then both the old and the new project * @param actionType * @param fieldType * @r...
Get the notifyFieldBeans, the person requests notification for, for a project, actionType and fieldType
getTriggerFieldsForRaciRole
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/dao/NotifyFieldDAO.java", "license": "gpl-3.0", "size": 2532 }
[ "com.aurel.track.beans.TNotifyFieldBean", "java.util.List" ]
import com.aurel.track.beans.TNotifyFieldBean; import java.util.List;
import com.aurel.track.beans.*; import java.util.*;
[ "com.aurel.track", "java.util" ]
com.aurel.track; java.util;
1,358,343
public static void correctBinaryInMetadataCache(Metadata.ParquetTableMetadataBase parquetTableMetadata) { // Looking for the names of the columns with BINARY data type // in the metadata cache file for V2 and all v3 versions Set<List<String>> columnsNames = getBinaryColumnsNames(parquetTableMetadata); ...
static void function(Metadata.ParquetTableMetadataBase parquetTableMetadata) { Set<List<String>> columnsNames = getBinaryColumnsNames(parquetTableMetadata); for (Metadata.ParquetFileMetadata file : parquetTableMetadata.getFiles()) { for (Metadata.RowGroupMetadata rowGroupMetadata : file.getRowGroups()) { Long rowCount ...
/** * Checks assigns byte arrays to min/max values obtained from the deserialized string * for BINARY. * * @param parquetTableMetadata table metadata that should be corrected */
Checks assigns byte arrays to min/max values obtained from the deserialized string for BINARY
correctBinaryInMetadataCache
{ "repo_name": "shakamunyi/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetReaderUtility.java", "license": "apache-2.0", "size": 23838 }
[ "java.util.Arrays", "java.util.List", "java.util.Set", "org.apache.parquet.schema.PrimitiveType" ]
import java.util.Arrays; import java.util.List; import java.util.Set; import org.apache.parquet.schema.PrimitiveType;
import java.util.*; import org.apache.parquet.schema.*;
[ "java.util", "org.apache.parquet" ]
java.util; org.apache.parquet;
1,324,382
public FundingSourceInfo save(FundingSourceInfo fundingSourceInfo);
FundingSourceInfo function(FundingSourceInfo fundingSourceInfo);
/** * This method saves the information of the given fundingSourceInfo * * @param fundingSourceInfo - is the fundingSourceInfo object with the new information to be added/updated. * @return a number greater than 0 representing the new ID assigned by the database, 0 if the fundingSourceInfo was * ...
This method saves the information of the given fundingSourceInfo
save
{ "repo_name": "CCAFS/MARLO", "path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/FundingSourceInfoDAO.java", "license": "gpl-3.0", "size": 2951 }
[ "org.cgiar.ccafs.marlo.data.model.FundingSourceInfo" ]
import org.cgiar.ccafs.marlo.data.model.FundingSourceInfo;
import org.cgiar.ccafs.marlo.data.model.*;
[ "org.cgiar.ccafs" ]
org.cgiar.ccafs;
1,757,361
public BlockPos east(int n) { return this.offset(EnumFacing.EAST, n); }
BlockPos function(int n) { return this.offset(EnumFacing.EAST, n); }
/** * Offset this BlockPos n blocks in eastern direction */
Offset this BlockPos n blocks in eastern direction
east
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/util/math/BlockPos.java", "license": "gpl-3.0", "size": 18016 }
[ "net.minecraft.util.EnumFacing" ]
import net.minecraft.util.EnumFacing;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
2,270,519
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages errors = new ActionMessages(); ActionForward forward = null; // Figure out which form to reset to String formName = (String)request.getParamet...
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionMessages errors = new ActionMessages(); ActionForward forward = null; String formName = (String)request.getParameter(STR); if (formName.equals(STR)) { logger.debug(STR); forw...
/** * execute is called when this action is posted to * <P> * @param mapping The ActionMapping for this action as configured in struts * @param form The ActionForm that posted to this action if any * @param request The HttpServletRequest for the current post * @param response The HttpServletResponse for the...
execute is called when this action is posted to
execute
{ "repo_name": "NCIP/cagwas", "path": "software/cagwas/src/gov/nih/nci/cagwas/web/action/ResetAction.java", "license": "bsd-3-clause", "size": 3643 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.apache.struts.action.ActionMessages" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessages;
import javax.servlet.http.*; import org.apache.struts.action.*;
[ "javax.servlet", "org.apache.struts" ]
javax.servlet; org.apache.struts;
2,708,824
void clear(User user);
void clear(User user);
/** * Clears all traces for the given user */
Clears all traces for the given user
clear
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/dao/access/PermissionDeniedTraceDAO.java", "license": "gpl-2.0", "size": 1547 }
[ "nl.strohalm.cyclos.entities.access.User" ]
import nl.strohalm.cyclos.entities.access.User;
import nl.strohalm.cyclos.entities.access.*;
[ "nl.strohalm.cyclos" ]
nl.strohalm.cyclos;
1,589,900
void enterPackageOrTypeName(@NotNull Java8Parser.PackageOrTypeNameContext ctx);
void enterPackageOrTypeName(@NotNull Java8Parser.PackageOrTypeNameContext ctx);
/** * Enter a parse tree produced by {@link Java8Parser#packageOrTypeName}. * * @param ctx the parse tree */
Enter a parse tree produced by <code>Java8Parser#packageOrTypeName</code>
enterPackageOrTypeName
{ "repo_name": "BigDaddy-Germany/WHOAMI", "path": "WHOAMI/src/de/aima13/whoami/modules/syntaxcheck/languages/antlrgen/Java8Listener.java", "license": "mit", "size": 97945 }
[ "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;
100,556
@Test public void setBounds() { World w = new World(); AxisAlignedBounds b = new AxisAlignedBounds(1.0, 1.0); w.setBounds(b); TestCase.assertNotNull(w.getBounds()); TestCase.assertEquals(1.0, ((AxisAlignedBounds)w.getBounds()).getWidth()); TestCase.assertEquals(1.0, ((AxisAlignedBounds)w.getB...
void function() { World w = new World(); AxisAlignedBounds b = new AxisAlignedBounds(1.0, 1.0); w.setBounds(b); TestCase.assertNotNull(w.getBounds()); TestCase.assertEquals(1.0, ((AxisAlignedBounds)w.getBounds()).getWidth()); TestCase.assertEquals(1.0, ((AxisAlignedBounds)w.getBounds()).getHeight()); }
/** * Tests the set bounds method. */
Tests the set bounds method
setBounds
{ "repo_name": "satishbabusee/dyn4j", "path": "junit/org/dyn4j/dynamics/WorldTest.java", "license": "bsd-3-clause", "size": 27828 }
[ "junit.framework.TestCase", "org.dyn4j.collision.AxisAlignedBounds" ]
import junit.framework.TestCase; import org.dyn4j.collision.AxisAlignedBounds;
import junit.framework.*; import org.dyn4j.collision.*;
[ "junit.framework", "org.dyn4j.collision" ]
junit.framework; org.dyn4j.collision;
690,686
public long getGeneratedKey() { checkInitialized(); ResultSet rs = getGeneratedColumns(); try { return DbUtil.getFirstLong(rs); } catch (SQLException sex) { throw new DbSqlException(this, "No generated key as long", sex); } finally { DbUtil.close(rs); resultSets.remove(rs); totalOpenResultSe...
long function() { checkInitialized(); ResultSet rs = getGeneratedColumns(); try { return DbUtil.getFirstLong(rs); } catch (SQLException sex) { throw new DbSqlException(this, STR, sex); } finally { DbUtil.close(rs); resultSets.remove(rs); totalOpenResultSetCount--; } }
/** * Returns generated key i.e. first generated column as <code>long</code>. */
Returns generated key i.e. first generated column as <code>long</code>
getGeneratedKey
{ "repo_name": "007slm/jodd", "path": "jodd-db/src/main/java/jodd/db/DbQueryBase.java", "license": "bsd-3-clause", "size": 21056 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,922,855
public static RunStatistic parseFromString(final Repository repository, String runStatistic) throws UnknownRunStatisticException { Class<? extends RunStatistic> c = repository.getRegisteredClass( RunStatistic.class, "de.clusteval.run.statistics." + runStatistic); try { RunStatistic statistic = c...
static RunStatistic function(final Repository repository, String runStatistic) throws UnknownRunStatisticException { Class<? extends RunStatistic> c = repository.getRegisteredClass( RunStatistic.class, STR + runStatistic); try { RunStatistic statistic = c.getConstructor(Repository.class, boolean.class, long.class, File...
/** * This method parses a string and maps it to a subclass of * {@link RunStatistic} looking it up in the given repository. * * @param repository * The repository to look for the classes. * @param runStatistic * The string representation of a run statistic subclass. * @return A s...
This method parses a string and maps it to a subclass of <code>RunStatistic</code> looking it up in the given repository
parseFromString
{ "repo_name": "deric/clusteval-parent", "path": "clusteval-backend/src/main/java/de/clusteval/run/statistics/RunStatistic.java", "license": "gpl-3.0", "size": 6820 }
[ "de.clusteval.framework.repository.Repository", "java.io.File", "java.lang.reflect.InvocationTargetException" ]
import de.clusteval.framework.repository.Repository; import java.io.File; import java.lang.reflect.InvocationTargetException;
import de.clusteval.framework.repository.*; import java.io.*; import java.lang.reflect.*;
[ "de.clusteval.framework", "java.io", "java.lang" ]
de.clusteval.framework; java.io; java.lang;
1,645,398
private DataDictionaryService getDataDictionaryService() { return getService(DataDictionaryService.class); }
DataDictionaryService function() { return getService(DataDictionaryService.class); }
/** * Lookup the <code>{@link DataDictionaryService}</code> * * @return DataDictionaryService */
Lookup the <code><code>DataDictionaryService</code></code>
getDataDictionaryService
{ "repo_name": "mukadder/kc", "path": "coeus-impl/src/main/java/org/kuali/coeus/propdev/impl/person/PersonEditableFieldValuesFinder.java", "license": "agpl-3.0", "size": 3429 }
[ "org.kuali.coeus.sys.framework.service.KcServiceLocator", "org.kuali.rice.kns.service.DataDictionaryService" ]
import org.kuali.coeus.sys.framework.service.KcServiceLocator; import org.kuali.rice.kns.service.DataDictionaryService;
import org.kuali.coeus.sys.framework.service.*; import org.kuali.rice.kns.service.*;
[ "org.kuali.coeus", "org.kuali.rice" ]
org.kuali.coeus; org.kuali.rice;
1,095,132
private static boolean areSampleSizesEqual(SampleModel sm) { boolean allSameSize = true; int[] sampleSize = sm.getSampleSize(); int sampleSize0 = sampleSize[0]; int numBands = sampleSize.length; for(int i = 1; i < numBands; i++) { if(sampleSize[i] != sampleSize0)...
static boolean function(SampleModel sm) { boolean allSameSize = true; int[] sampleSize = sm.getSampleSize(); int sampleSize0 = sampleSize[0]; int numBands = sampleSize.length; for(int i = 1; i < numBands; i++) { if(sampleSize[i] != sampleSize0) { allSameSize = false; break; } } return allSameSize; }
/** * Returns whether all samples have the same number of bits. */
Returns whether all samples have the same number of bits
areSampleSizesEqual
{ "repo_name": "hflynn/bioformats", "path": "components/forks/jai/src/com/sun/media/imageio/plugins/tiff/TIFFDecompressor.java", "license": "gpl-2.0", "size": 115340 }
[ "java.awt.image.SampleModel" ]
import java.awt.image.SampleModel;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
1,971,855
public ApiManagementServiceBaseProperties withCertificates(List<CertificateConfiguration> certificates) { this.certificates = certificates; return this; }
ApiManagementServiceBaseProperties function(List<CertificateConfiguration> certificates) { this.certificates = certificates; return this; }
/** * Set the certificates property: List of Certificates that need to be installed in the API Management service. Max * supported certificates that can be installed is 10. * * @param certificates the certificates value to set. * @return the ApiManagementServiceBaseProperties object itself. ...
Set the certificates property: List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10
withCertificates
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/models/ApiManagementServiceBaseProperties.java", "license": "mit", "size": 27718 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,848,657
public void add(final String listenerType, final Object listener) { if (listener == null) { throw new IllegalArgumentException("Listener cannot be null"); } if (!listeners.containsKey(listenerType)) { listeners.put(listenerType, new CopyOnWriteArrayList<>()); ...
void function(final String listenerType, final Object listener) { if (listener == null) { throw new IllegalArgumentException(STR); } if (!listeners.containsKey(listenerType)) { listeners.put(listenerType, new CopyOnWriteArrayList<>()); } listeners.get(listenerType).add(listener); }
/** * Adds a new listener of the specified type to this listener list. * * @param listenerType The name of the type of listener that's being added * @param listener The listener to be added */
Adds a new listener of the specified type to this listener list
add
{ "repo_name": "DMDirc/Util", "path": "src/main/java/com/dmdirc/util/collections/ListenerList.java", "license": "mit", "size": 6623 }
[ "java.util.concurrent.CopyOnWriteArrayList" ]
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,071,931
public void truncateLog(long zxid) throws IOException { this.zkDb.truncateLog(zxid); }
void function(long zxid) throws IOException { this.zkDb.truncateLog(zxid); }
/** * trunccate the log to get in sync with others * if in a quorum * @param zxid the zxid that it needs to get in sync * with others * @throws IOException */
trunccate the log to get in sync with others if in a quorum
truncateLog
{ "repo_name": "rahulkurup/zookeeper", "path": "src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java", "license": "apache-2.0", "size": 41231 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,848,908
public List<Account> getAccountsOfCustomer(Customer customer) { return accountDao.getAccountsOfCustomer(customer.getUid()); }
List<Account> function(Customer customer) { return accountDao.getAccountsOfCustomer(customer.getUid()); }
/** * Returns all accounts of the given customer. * * @param customer * @return */
Returns all accounts of the given customer
getAccountsOfCustomer
{ "repo_name": "butfriendly/friendly-dam", "path": "src/main/java/de/soulworks/dam/webservice/service/CustomerService.java", "license": "isc", "size": 3606 }
[ "de.soulworks.dam.domain.Account", "de.soulworks.dam.domain.Customer", "java.util.List" ]
import de.soulworks.dam.domain.Account; import de.soulworks.dam.domain.Customer; import java.util.List;
import de.soulworks.dam.domain.*; import java.util.*;
[ "de.soulworks.dam", "java.util" ]
de.soulworks.dam; java.util;
2,604,223
public Set<String> filterOutNonParallelGatewaySenders(Set<String> senderIds) { Set<String> allParallelSenders = cache.getAllGatewaySenders() .parallelStream() .filter(GatewaySender::isParallel) .map(GatewaySender::getId) .collect(toSet()); Set<String> parallelSenders = new Has...
Set<String> function(Set<String> senderIds) { Set<String> allParallelSenders = cache.getAllGatewaySenders() .parallelStream() .filter(GatewaySender::isParallel) .map(GatewaySender::getId) .collect(toSet()); Set<String> parallelSenders = new HashSet<>(senderIds); parallelSenders.retainAll(allParallelSenders); return par...
/** * Filters out non parallel GatewaySenders. * * @param senderIds set of gateway sender IDs. * @return set of parallel gateway senders present in the input set. */
Filters out non parallel GatewaySenders
filterOutNonParallelGatewaySenders
{ "repo_name": "davinash/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java", "license": "apache-2.0", "size": 383155 }
[ "java.util.HashSet", "java.util.Set", "org.apache.geode.cache.wan.GatewaySender" ]
import java.util.HashSet; import java.util.Set; import org.apache.geode.cache.wan.GatewaySender;
import java.util.*; import org.apache.geode.cache.wan.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
2,354,476
@Override public void setClasspath(final Path classpath) { this.classpath = classpath; }
void function(final Path classpath) { this.classpath = classpath; }
/** * Sets the classpath for loading. * * @param classpath The classpath to set */
Sets the classpath for loading
setClasspath
{ "repo_name": "apache/incubator-groovy", "path": "subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java", "license": "apache-2.0", "size": 27356 }
[ "org.apache.tools.ant.types.Path" ]
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.*;
[ "org.apache.tools" ]
org.apache.tools;
194,241
@Nonnull List<HbmColumn> getColumns(); HbmColumn addColumn();
List<HbmColumn> getColumns(); HbmColumn addColumn();
/** * Adds new child to the list of column children. * @return created child */
Adds new child to the list of column children
addColumn
{ "repo_name": "consulo-trash/consulo-hibernate", "path": "plugin/src/main/java/com/intellij/hibernate/model/xml/mapping/HbmIndexManyToMany.java", "license": "apache-2.0", "size": 1946 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,528,053
public ServiceFuture<PolicyDefinitionInner> createOrUpdateAsync(String policyDefinitionName, PolicyDefinitionInner parameters, final ServiceCallback<PolicyDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(policyDefinitionName, parameters), serviceCa...
ServiceFuture<PolicyDefinitionInner> function(String policyDefinitionName, PolicyDefinitionInner parameters, final ServiceCallback<PolicyDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(policyDefinitionName, parameters), serviceCallback); }
/** * Creates or updates a policy definition. * * @param policyDefinitionName The name of the policy definition to create. * @param parameters The policy definition properties. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalAr...
Creates or updates a policy definition
createOrUpdateAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/policy/mgmt-v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyDefinitionsInner.java", "license": "mit", "size": 77819 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,680,697
public UnitType unit() { return this.unit; }
UnitType function() { return this.unit; }
/** * Get the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'. * * @return the unit value */
Get the unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond', 'Milliseconds'
unit
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cosmos/mgmt-v2019_12_12/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_12_12/implementation/MetricInner.java", "license": "mit", "size": 3444 }
[ "com.microsoft.azure.management.cosmosdb.v2019_12_12.UnitType" ]
import com.microsoft.azure.management.cosmosdb.v2019_12_12.UnitType;
import com.microsoft.azure.management.cosmosdb.v2019_12_12.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
18,683
public OneResponse migrate(int hostId, boolean live, boolean enforce, int ds_id) { return client.call(MIGRATE, id, hostId, live, enforce, ds_id); }
OneResponse function(int hostId, boolean live, boolean enforce, int ds_id) { return client.call(MIGRATE, id, hostId, live, enforce, ds_id); }
/** * Migrates the virtual machine to the target host (hid). * * @param hostId The target host id (hid) where we want to migrate * the vm. * @param live If true we are indicating that we want livemigration, * otherwise false. * @param enforce If it is set to true, the host capacity ...
Migrates the virtual machine to the target host (hid)
migrate
{ "repo_name": "tuxmea/one", "path": "src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java", "license": "apache-2.0", "size": 42818 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
586,631
public void increaseKey(int i, Key key) { if (i < 0 || i >= n) throw new IndexOutOfBoundsException(); if (!contains(i)) throw new NoSuchElementException("Specified index is not in the queue"); if (greater(nodes[i].key, key)) throw new IllegalArgumentException("Calling with this argument would not increase t...
void function(int i, Key key) { if (i < 0 i >= n) throw new IndexOutOfBoundsException(); if (!contains(i)) throw new NoSuchElementException(STR); if (greater(nodes[i].key, key)) throw new IllegalArgumentException(STR); delete(i); insert(i, key); }
/** * Increases the key associated with index i to the given key * Worst case is O(log(n)) * @param i an index * @param key the key to associate with i * @throws java.lang.IndexOutOfBoundsException if the specified index is invalid * @throws java.util.NoSuchElementException if the index has no key associate...
Increases the key associated with index i to the given key Worst case is O(log(n))
increaseKey
{ "repo_name": "ahmedkhaled4d/S-Engineering", "path": "Algorithms/src/IndexFibonacciMinPQ.java", "license": "gpl-2.0", "size": 15644 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,988,820
private void executeValidation(Document docValidation, Map<String, Object> mapParam) throws DTETransfException { XMLUtils xmlParser = null; try { xmlParser = XMLUtils.getParserInstance(); ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( ...
void function(Document docValidation, Map<String, Object> mapParam) throws DTETransfException { XMLUtils xmlParser = null; try { xmlParser = XMLUtils.getParserInstance(); ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( xmlParser.serializeDOMToByteArray(docValidation)); logger.debug(STR + getValida...
/** * Execute the document validation * * @param docValidation * The document to validate * @param mapParam * The Map object * @throws DTETransfException */
Execute the document validation
executeValidation
{ "repo_name": "green-vulcano/gv-engine", "path": "gvengine/gvdte/src/main/java/it/greenvulcano/gvesb/gvdte/transformers/xq/XQTransformer.java", "license": "lgpl-3.0", "size": 22555 }
[ "it.greenvulcano.gvesb.gvdte.transformers.DTETransfException", "it.greenvulcano.util.xml.XMLUtils", "java.io.ByteArrayInputStream", "java.util.Map", "org.w3c.dom.Document" ]
import it.greenvulcano.gvesb.gvdte.transformers.DTETransfException; import it.greenvulcano.util.xml.XMLUtils; import java.io.ByteArrayInputStream; import java.util.Map; import org.w3c.dom.Document;
import it.greenvulcano.gvesb.gvdte.transformers.*; import it.greenvulcano.util.xml.*; import java.io.*; import java.util.*; import org.w3c.dom.*;
[ "it.greenvulcano.gvesb", "it.greenvulcano.util", "java.io", "java.util", "org.w3c.dom" ]
it.greenvulcano.gvesb; it.greenvulcano.util; java.io; java.util; org.w3c.dom;
2,240,636
public AggregatorFactories parseAggregators(XContentParser parser, SearchContext context) throws IOException { return parseAggregators(parser, context, 0); }
AggregatorFactories function(XContentParser parser, SearchContext context) throws IOException { return parseAggregators(parser, context, 0); }
/** * Parses the aggregation request recursively generating aggregator factories in turn. * * @param parser The input xcontent that will be parsed. * @param context The search context. * * @return The parsed aggregator factories. * * @throws IOException When parsing...
Parses the aggregation request recursively generating aggregator factories in turn
parseAggregators
{ "repo_name": "queirozfcom/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/aggregations/AggregatorParsers.java", "license": "apache-2.0", "size": 11932 }
[ "java.io.IOException", "org.elasticsearch.common.xcontent.XContentParser", "org.elasticsearch.search.internal.SearchContext" ]
import java.io.IOException; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.search.internal.SearchContext;
import java.io.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.search.internal.*;
[ "java.io", "org.elasticsearch.common", "org.elasticsearch.search" ]
java.io; org.elasticsearch.common; org.elasticsearch.search;
1,383,188
public boolean referencesSessionSchema() throws StandardException { //If table being created/declared is in SESSION schema, then return true. return isSessionSchema(getSchemaDescriptor(tableType != TableDescriptor.GLOBAL_TEMPORARY_TABLE_TYPE)); }
boolean function() throws StandardException { return isSessionSchema(getSchemaDescriptor(tableType != TableDescriptor.GLOBAL_TEMPORARY_TABLE_TYPE)); }
/** * Return true if the node references SESSION schema tables (temporary or permanent) * * @return true if references SESSION schema tables, else false * * @exception StandardException Thrown on error */
Return true if the node references SESSION schema tables (temporary or permanent)
referencesSessionSchema
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/compile/CreateTableNode.java", "license": "apache-2.0", "size": 35483 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.sql.dictionary.TableDescriptor" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.TableDescriptor;
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.sql.dictionary.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
54,599
public Collection<Vertex> getCenterVertices() { List<Vertex> result = Lists.newArrayList(); for (Long vId : getCentralVertexIds()) { result.add(getVertexById(vId)); } return result; }
Collection<Vertex> function() { List<Vertex> result = Lists.newArrayList(); for (Long vId : getCentralVertexIds()) { result.add(getVertexById(vId)); } return result; }
/** * Returns all vertices that have a minimum eccentricity. * * @return center vertices */
Returns all vertices that have a minimum eccentricity
getCenterVertices
{ "repo_name": "galpha/gradoop", "path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/matching/common/query/QueryHandler.java", "license": "apache-2.0", "size": 20209 }
[ "com.google.common.collect.Lists", "java.util.Collection", "java.util.List", "org.gradoop.gdl.model.Vertex" ]
import com.google.common.collect.Lists; import java.util.Collection; import java.util.List; import org.gradoop.gdl.model.Vertex;
import com.google.common.collect.*; import java.util.*; import org.gradoop.gdl.model.*;
[ "com.google.common", "java.util", "org.gradoop.gdl" ]
com.google.common; java.util; org.gradoop.gdl;
2,447,301
private int readS16(int address) throws IOException { int hibyte = device.read(address); if (hibyte > 127) hibyte -= 256; return (hibyte * 256) + device.read(address + 1); }
int function(int address) throws IOException { int hibyte = device.read(address); if (hibyte > 127) hibyte -= 256; return (hibyte * 256) + device.read(address + 1); }
/** * Read signed 2 byte from address * * @param address * * @return Value * * @throws IOException */
Read signed 2 byte from address
readS16
{ "repo_name": "git4gecko/jMeasurement", "path": "src/de/us/rpi/jMeasurement/bmp085/BMP085Device.java", "license": "gpl-2.0", "size": 4903 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,650,291
public static String copyToString(Reader in) throws IOException { StringWriter out = new StringWriter(); copy(in, out); return out.toString(); }
static String function(Reader in) throws IOException { StringWriter out = new StringWriter(); copy(in, out); return out.toString(); }
/** * Copy the contents of the given Reader into a String. * Closes the reader when done. * @param in the reader to copy from * @return the String that has been copied to * @throws IOException in case of I/O errors */
Copy the contents of the given Reader into a String. Closes the reader when done
copyToString
{ "repo_name": "lj654548718/ispring", "path": "src/main/java/io/ispring/ori/utils/FileCopyUtils.java", "license": "apache-2.0", "size": 7038 }
[ "java.io.IOException", "java.io.Reader", "java.io.StringWriter" ]
import java.io.IOException; import java.io.Reader; import java.io.StringWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,015,381
public com.mozu.api.contracts.productadmin.DynamicExpression validateDynamicExpression(com.mozu.api.contracts.productadmin.DynamicExpression dynamicExpressionIn, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.DynamicExpression> client = com.mozu.api.clients.commerce.catal...
com.mozu.api.contracts.productadmin.DynamicExpression function(com.mozu.api.contracts.productadmin.DynamicExpression dynamicExpressionIn, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.DynamicExpression> client = com.mozu.api.clients.commerce.catalog.admin.CategoryClient.valida...
/** * Validates the precomputed dynamic category expression. * <p><pre><code> * Category category = new Category(); * DynamicExpression dynamicExpression = category.validateDynamicExpression( dynamicExpressionIn, responseFields); * </code></pre></p> * @param responseFields Filtering syntax appended to an A...
Validates the precomputed dynamic category expression. <code><code> Category category = new Category(); DynamicExpression dynamicExpression = category.validateDynamicExpression( dynamicExpressionIn, responseFields); </code></code>
validateDynamicExpression
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/CategoryResource.java", "license": "mit", "size": 18447 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
1,029,550
protected FTPClientWrapper connectToFTP(int port) throws IOException { FTPClientWrapper vfsClient = new FTPClientWrapper(ftpHostName, ftpUsername, ftpPassword, port); vfsClient.connectToFtp(); return vfsClient; }
FTPClientWrapper function(int port) throws IOException { FTPClientWrapper vfsClient = new FTPClientWrapper(ftpHostName, ftpUsername, ftpPassword, port); vfsClient.connectToFtp(); return vfsClient; }
/** * Function to connect to an FTP Server * * @param port - ftp port * @return - VFSClient * @throws IOException - if connecting to FTP server fails */
Function to connect to an FTP Server
connectToFTP
{ "repo_name": "wso2/product-ei", "path": "product-scenarios/scenarios-commons/src/main/java/org/wso2/carbon/esb/scenario/test/common/ScenarioTestBase.java", "license": "apache-2.0", "size": 20631 }
[ "java.io.IOException", "org.wso2.carbon.esb.scenario.test.common.ftp.FTPClientWrapper" ]
import java.io.IOException; import org.wso2.carbon.esb.scenario.test.common.ftp.FTPClientWrapper;
import java.io.*; import org.wso2.carbon.esb.scenario.test.common.ftp.*;
[ "java.io", "org.wso2.carbon" ]
java.io; org.wso2.carbon;
481,851
@Override public List<String> listIndexNames(String dbName, String tblName, short max) throws MetaException, TException { return filterHook.filterIndexNames(dbName, tblName, client.get_index_names(dbName, tblName, max)); }
List<String> function(String dbName, String tblName, short max) throws MetaException, TException { return filterHook.filterIndexNames(dbName, tblName, client.get_index_names(dbName, tblName, max)); }
/** * list indexes of the give base table * @param dbName * @param tblName * @param max * @return the list of indexes * @throws NoSuchObjectException * @throws MetaException * @throws TException */
list indexes of the give base table
listIndexNames
{ "repo_name": "WANdisco/amplab-hive", "path": "metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java", "license": "apache-2.0", "size": 73830 }
[ "java.util.List", "org.apache.hadoop.hive.metastore.api.MetaException", "org.apache.thrift.TException" ]
import java.util.List; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.thrift.TException;
import java.util.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.thrift.*;
[ "java.util", "org.apache.hadoop", "org.apache.thrift" ]
java.util; org.apache.hadoop; org.apache.thrift;
1,281,525
public static File createTemporaryFolder(String prefix) throws IOException { File file = File.createTempFile(prefix, "", null); LOGGER.debugv("Creating temporary folder {0}", file); file.delete(); file.mkdir(); return file; }
static File function(String prefix) throws IOException { File file = File.createTempFile(prefix, STRCreating temporary folder {0}", file); file.delete(); file.mkdir(); return file; }
/** * Creates a temporary folder name with given name prefix. * * @param prefix folder name prefix * @return created folder */
Creates a temporary folder name with given name prefix
createTemporaryFolder
{ "repo_name": "99sono/wildfly", "path": "testsuite/shared/src/main/java/org/jboss/as/test/integration/security/common/Utils.java", "license": "lgpl-2.1", "size": 50065 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,236,314
public static AnnotationBuilder newBuilder(final Class<? extends Annotation> annotationClass) { return new AnnotationBuilder(annotationClass); } private AnnotationBuilder(final Class<? extends Annotation> annotationClass) { // for(ElementType et: ElementType.values()) { // members.put(et, new HashMap<St...
static AnnotationBuilder function(final Class<? extends Annotation> annotationClass) { return new AnnotationBuilder(annotationClass); } private AnnotationBuilder(final Class<? extends Annotation> annotationClass) { this.annotationClass = annotationClass; final Retention retention = this.annotationClass.getAnnotation(Re...
/** * Creates a new AnnotationBuilder for the passed annotation type * @param annotationClass The annotation type * @return an annotation builder */
Creates a new AnnotationBuilder for the passed annotation type
newBuilder
{ "repo_name": "nickman/retransformer", "path": "src/main/java/com/heliosapm/aop/retransformer/AnnotationBuilder.java", "license": "apache-2.0", "size": 35730 }
[ "java.lang.annotation.Annotation", "java.lang.annotation.ElementType", "java.lang.annotation.Retention", "java.lang.annotation.RetentionPolicy", "java.lang.annotation.Target", "java.lang.reflect.Method", "java.util.Collections", "java.util.EnumSet", "java.util.HashSet", "java.util.Set" ]
import java.lang.annotation.Annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Method; import java.util.Collections; import java.util.EnumSet; import java.util.HashSet; impo...
import java.lang.annotation.*; import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,203,845
public List<Privilege> getAllPrivileges() throws APIException; /** * @deprecated use {@link #getAllRoles()}
List<Privilege> function() throws APIException; /** * @deprecated use {@link #getAllRoles()}
/** * Returns all privileges currently possible for any User * * @return Global list of privileges * @throws APIException * @should return all privileges in the system */
Returns all privileges currently possible for any User
getAllPrivileges
{ "repo_name": "Winbobob/openmrs-core", "path": "api/src/main/java/org/openmrs/api/UserService.java", "license": "mpl-2.0", "size": 21666 }
[ "java.util.List", "org.openmrs.Privilege" ]
import java.util.List; import org.openmrs.Privilege;
import java.util.*; import org.openmrs.*;
[ "java.util", "org.openmrs" ]
java.util; org.openmrs;
2,198,745
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux<PollResult<MongoDBDatabaseGetResultsInner>, MongoDBDatabaseGetResultsInner> beginCreateUpdateMongoDBDatabaseAsync( String resourceGroupName, String accountName, String databaseName, ...
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<MongoDBDatabaseGetResultsInner>, MongoDBDatabaseGetResultsInner> function( String resourceGroupName, String accountName, String databaseName, MongoDBDatabaseCreateUpdateParameters createUpdateMongoDBDatabaseParameters, Context context) { ...
/** * Create or updates Azure Cosmos DB MongoDB database. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param createUpdateMongoDBDatabasePara...
Create or updates Azure Cosmos DB MongoDB database
beginCreateUpdateMongoDBDatabaseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/MongoDBResourcesClientImpl.java", "license": "mit", "size": 257038 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.PollerFlux", "com.azure.resourcemanager.cosmos.fluent.models.MongoDBDatabase...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.resourcemanager.cosmos.fluent.mo...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.cosmos.fluent.models.*; import com.azure.resourcemanager.cosmos.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
145,540
private void showTabs() { mainPanel.removeAll(); tabbedPane.addTab(Constant.messages.getString("spider.panel.tab.urls"), getUrlsTableScrollPane()); tabbedPane.addTab(Constant.messages.getString("spider.panel.tab.messages"), getMessagesTableScrollPanel()); getShowMessagesToggleButton().setText(Constant.messa...
void function() { mainPanel.removeAll(); tabbedPane.addTab(Constant.messages.getString(STR), getUrlsTableScrollPane()); tabbedPane.addTab(Constant.messages.getString(STR), getMessagesTableScrollPanel()); getShowMessagesToggleButton().setText(Constant.messages.getString(STR)); tabbedPane.setSelectedIndex(1); mainPanel.a...
/** * Shows both tabs, the one of the URLs found and the other of the HTTP messages sent. * * @see #hideMessagesTab() */
Shows both tabs, the one of the URLs found and the other of the HTTP messages sent
showTabs
{ "repo_name": "GillesMoris/OSS", "path": "src/org/zaproxy/zap/extension/spider/SpiderPanel.java", "license": "apache-2.0", "size": 14007 }
[ "org.parosproxy.paros.Constant" ]
import org.parosproxy.paros.Constant;
import org.parosproxy.paros.*;
[ "org.parosproxy.paros" ]
org.parosproxy.paros;
733,985
public void show(int timeout) { if (!mShowing && mAnchor != null) { setProgress(); if (mPauseButton != null) { mPauseButton.requestFocus(); } disableUnsupportedButtons(); FrameLayout.LayoutParams tlp = new FrameLayout.LayoutParams(...
void function(int timeout) { if (!mShowing && mAnchor != null) { setProgress(); if (mPauseButton != null) { mPauseButton.requestFocus(); } disableUnsupportedButtons(); FrameLayout.LayoutParams tlp = new FrameLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM );...
/** * Show the controller on screen. It will go away * automatically after 'timeout' milliseconds of inactivity. * @param timeout The timeout in milliseconds. Use 0 to show * the controller until hide() is called. */
Show the controller on screen. It will go away automatically after 'timeout' milliseconds of inactivity
show
{ "repo_name": "wafleh/VideoPlayer", "path": "app/src/main/java/cl/wafle/videoplayer/WafleMediaController.java", "license": "gpl-3.0", "size": 22813 }
[ "android.os.Message", "android.view.Gravity", "android.view.ViewGroup", "android.widget.FrameLayout" ]
import android.os.Message; import android.view.Gravity; import android.view.ViewGroup; import android.widget.FrameLayout;
import android.os.*; import android.view.*; import android.widget.*;
[ "android.os", "android.view", "android.widget" ]
android.os; android.view; android.widget;
1,334,591
Figure figure = new Pawn(new Cell(1, 2)); figure.way(new Cell(1, 10)); }
Figure figure = new Pawn(new Cell(1, 2)); figure.way(new Cell(1, 10)); }
/** * Test when move takes place outside the board. * * @throws FigureNotFoundException Figure not found. * @throws OccupiedWayException Figure on the way. * @throws ImpossibleMoveException Figure make imposible move. */
Test when move takes place outside the board
whenWentBeyondTheBoard
{ "repo_name": "Malamut54/dbobrov", "path": "chapter_002/src/test/java/ru/job4j/chess/PawnTest.java", "license": "apache-2.0", "size": 3796 }
[ "ru.job4j.chess.figure.Figure", "ru.job4j.chess.figure.Pawn" ]
import ru.job4j.chess.figure.Figure; import ru.job4j.chess.figure.Pawn;
import ru.job4j.chess.figure.*;
[ "ru.job4j.chess" ]
ru.job4j.chess;
762,436
public StoreCostController openStoreCost( TransactionManager xact_manager, Transaction rawtran) throws StandardException { OpenHeap open_conglom = new OpenHeap(); if (open_conglom.init( (ContainerHandle) null, this, this.format_...
StoreCostController function( TransactionManager xact_manager, Transaction rawtran) throws StandardException { OpenHeap open_conglom = new OpenHeap(); if (open_conglom.init( (ContainerHandle) null, this, this.format_ids, this.collation_ids, xact_manager, rawtran, false, ContainerHandle.MODE_READONLY, TransactionControl...
/** * Return an open StoreCostController for the conglomerate. * <p> * Return an open StoreCostController which can be used to ask about * the estimated row counts and costs of ScanController and * ConglomerateController operations, on the given conglomerate. * <p> * @param xact_manage...
Return an open StoreCostController for the conglomerate. Return an open StoreCostController which can be used to ask about the estimated row counts and costs of ScanController and ConglomerateController operations, on the given conglomerate.
openStoreCost
{ "repo_name": "trejkaz/derby", "path": "java/engine/org/apache/derby/impl/store/access/heap/Heap.java", "license": "apache-2.0", "size": 46555 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.reference.SQLState", "org.apache.derby.iapi.store.access.DynamicCompiledOpenConglomInfo", "org.apache.derby.iapi.store.access.StoreCostController", "org.apache.derby.iapi.store.access.TransactionController", "org.apache.derby.iapi.sto...
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.reference.SQLState; import org.apache.derby.iapi.store.access.DynamicCompiledOpenConglomInfo; import org.apache.derby.iapi.store.access.StoreCostController; import org.apache.derby.iapi.store.access.TransactionController; import org.apac...
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.reference.*; import org.apache.derby.iapi.store.access.*; import org.apache.derby.iapi.store.access.conglomerate.*; import org.apache.derby.iapi.store.raw.*;
[ "org.apache.derby" ]
org.apache.derby;
1,265,007
public void assertHasHourOfDay(AssertionInfo info, Date actual, int hourOfDay) { assertNotNull(info, actual); if (hourOfDayOf(actual) != hourOfDay) throw failures.failure(info, shouldHaveDateField(actual, "hour", hourOfDay)); }
void function(AssertionInfo info, Date actual, int hourOfDay) { assertNotNull(info, actual); if (hourOfDayOf(actual) != hourOfDay) throw failures.failure(info, shouldHaveDateField(actual, "hour", hourOfDay)); }
/** * Verifies that the actual {@code Date} hour od day is equal to the given hour of day (24-hour clock). * @param info contains information about the assertion. * @param actual the "actual" {@code Date}. * @param hourOfDay the hour of day to compare actual hour of day to (24-hour clock) * @throws Asser...
Verifies that the actual Date hour od day is equal to the given hour of day (24-hour clock)
assertHasHourOfDay
{ "repo_name": "dorzey/assertj-core", "path": "src/main/java/org/assertj/core/internal/Dates.java", "license": "apache-2.0", "size": 39894 }
[ "java.util.Date", "org.assertj.core.api.AssertionInfo", "org.assertj.core.error.ShouldHaveDateField" ]
import java.util.Date; import org.assertj.core.api.AssertionInfo; import org.assertj.core.error.ShouldHaveDateField;
import java.util.*; import org.assertj.core.api.*; import org.assertj.core.error.*;
[ "java.util", "org.assertj.core" ]
java.util; org.assertj.core;
1,023,330
public ContentHandler getContentHandler () { return contentHandler; }
ContentHandler function () { return contentHandler; }
/** * Get the content event handler. * * @return The current content handler, or null if none was set. */
Get the content event handler
getContentHandler
{ "repo_name": "FauxFaux/jdk9-jaxp", "path": "src/java.xml/share/classes/org/xml/sax/helpers/XMLFilterImpl.java", "license": "gpl-2.0", "size": 21751 }
[ "org.xml.sax.ContentHandler" ]
import org.xml.sax.ContentHandler;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,474,392
protected ByteBuffer encodeOptions() throws IOException { ByteBuffer buf = ByteBuffer.allocate(1020); // 1024 - 1(msgType) - 3(transId) = 1020 (options) if (dhcpOptions != null) { for (DhcpOption option : dhcpOptions.values()) { buf.put(option.encode()); ...
ByteBuffer function() throws IOException { ByteBuffer buf = ByteBuffer.allocate(1020); if (dhcpOptions != null) { for (DhcpOption option : dhcpOptions.values()) { buf.put(option.encode()); } } if (iaNaOptions != null) { for (DhcpV6IaNaOption iaNaOption : iaNaOptions) { buf.put(iaNaOption.encode()); } } if (iaTaOptions ...
/** * Encode the options of this DhcpMessage to wire format for sending. * * @return a ByteBuffer containing the encoded options * @throws IOException */
Encode the options of this DhcpMessage to wire format for sending
encodeOptions
{ "repo_name": "jagornet/dhcp", "path": "Jagornet-DHCP/dhcp-core/src/main/java/com/jagornet/dhcp/core/message/DhcpV6Message.java", "license": "gpl-3.0", "size": 23651 }
[ "com.jagornet.dhcp.core.option.base.DhcpOption", "com.jagornet.dhcp.core.option.v6.DhcpV6IaNaOption", "com.jagornet.dhcp.core.option.v6.DhcpV6IaPdOption", "com.jagornet.dhcp.core.option.v6.DhcpV6IaTaOption", "java.io.IOException", "java.nio.ByteBuffer" ]
import com.jagornet.dhcp.core.option.base.DhcpOption; import com.jagornet.dhcp.core.option.v6.DhcpV6IaNaOption; import com.jagornet.dhcp.core.option.v6.DhcpV6IaPdOption; import com.jagornet.dhcp.core.option.v6.DhcpV6IaTaOption; import java.io.IOException; import java.nio.ByteBuffer;
import com.jagornet.dhcp.core.option.base.*; import com.jagornet.dhcp.core.option.v6.*; import java.io.*; import java.nio.*;
[ "com.jagornet.dhcp", "java.io", "java.nio" ]
com.jagornet.dhcp; java.io; java.nio;
1,178,750
protected void removeUnnecessaryOperations() { for (Class<? extends Entity> entityClass : deletedObjects.keySet()) { // Collect ids of deleted entities + remove duplicates Set<String> ids = new HashSet<>(); Iterator<Entity> entitiesToDeleteIterator = deletedObjects.get(...
void function() { for (Class<? extends Entity> entityClass : deletedObjects.keySet()) { Set<String> ids = new HashSet<>(); Iterator<Entity> entitiesToDeleteIterator = deletedObjects.get(entityClass).values().iterator(); while (entitiesToDeleteIterator.hasNext()) { Entity entityToDelete = entitiesToDeleteIterator.next()...
/** * Clears all deleted and inserted objects from the cache, and removes inserts and deletes that cancel each other. * * Also removes deletes with duplicate ids. */
Clears all deleted and inserted objects from the cache, and removes inserts and deletes that cancel each other. Also removes deletes with duplicate ids
removeUnnecessaryOperations
{ "repo_name": "dbmalkovsky/flowable-engine", "path": "modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/DbSqlSession.java", "license": "apache-2.0", "size": 28629 }
[ "java.util.HashSet", "java.util.Iterator", "java.util.Set", "org.flowable.common.engine.impl.persistence.entity.Entity" ]
import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.flowable.common.engine.impl.persistence.entity.Entity;
import java.util.*; import org.flowable.common.engine.impl.persistence.entity.*;
[ "java.util", "org.flowable.common" ]
java.util; org.flowable.common;
1,541,551
@Nullable public static ErrorInfo getExistingFailedPackage(SkyframeExecutor skyframeExecutor, Label label) throws InterruptedException { SkyKey key = PackageValue.key(label.getPackageIdentifier()); return getExistingError(skyframeExecutor, key); }
static ErrorInfo function(SkyframeExecutor skyframeExecutor, Label label) throws InterruptedException { SkyKey key = PackageValue.key(label.getPackageIdentifier()); return getExistingError(skyframeExecutor, key); }
/** * Returns the error info for an existing target value, or {@code null} if there is not an * appropriate target value key in the graph. * * <p>This helper is provided so legacy tests don't need to know about details of skyframe keys. */
Returns the error info for an existing target value, or null if there is not an appropriate target value key in the graph. This helper is provided so legacy tests don't need to know about details of skyframe keys
getExistingFailedPackage
{ "repo_name": "Asana/bazel", "path": "src/test/java/com/google/devtools/build/lib/skyframe/util/SkyframeExecutorTestUtils.java", "license": "apache-2.0", "size": 6920 }
[ "com.google.devtools.build.lib.cmdline.Label", "com.google.devtools.build.lib.skyframe.PackageValue", "com.google.devtools.build.lib.skyframe.SkyframeExecutor", "com.google.devtools.build.skyframe.ErrorInfo", "com.google.devtools.build.skyframe.SkyKey" ]
import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.skyframe.PackageValue; import com.google.devtools.build.lib.skyframe.SkyframeExecutor; import com.google.devtools.build.skyframe.ErrorInfo; import com.google.devtools.build.skyframe.SkyKey;
import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.skyframe.*; import com.google.devtools.build.skyframe.*;
[ "com.google.devtools" ]
com.google.devtools;
657,874
public java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanHLAPI> getSubterm_integers_GreaterThanHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanHLAPI>(); for (Term elemnt : getSubterm()) { ...
java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlp...
/** * This accessor return a list of encapsulated subelement, only of GreaterThanHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of GreaterThanHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_integers_GreaterThanHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/multisets/hlapi/EmptyHLAPI.java", "license": "epl-1.0", "size": 113920 }
[ "fr.lip6.move.pnml.hlpn.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
1,442,506
public FrequencyBase getFrequencyBase() { return frequencyBase; }
FrequencyBase function() { return frequencyBase; }
/** * Gets the frequencyBase attribute. * @return Returns the frequencyBase. */
Gets the frequencyBase attribute
getFrequencyBase
{ "repo_name": "blackcathacker/kc.preclean", "path": "coeus-code/src/main/java/org/kuali/kra/award/paymentreports/awardreports/AwardReportTerm.java", "license": "apache-2.0", "size": 11997 }
[ "org.kuali.kra.award.paymentreports.FrequencyBase" ]
import org.kuali.kra.award.paymentreports.FrequencyBase;
import org.kuali.kra.award.paymentreports.*;
[ "org.kuali.kra" ]
org.kuali.kra;
606,665
public static byte[] readImage(final File srcFile) { if (srcFile != null && srcFile.exists()) { try { String ext = FilenameUtils.getExtension(srcFile.getName()); if (ext.equals("tif") || ext.equals("tiff")) { ...
static byte[] function(final File srcFile) { if (srcFile != null && srcFile.exists()) { try { String ext = FilenameUtils.getExtension(srcFile.getName()); if (ext.equals("tif") ext.equals("tiff")) { return GraphicsUtils.readTiffImage(srcFile); } return FileUtils.readFileToByteArray(srcFile); } catch (IOException e) { e....
/** * Reads an image to a byte array (Tiff, Png, JPeg). * @param srcFile the file * @return byte array */
Reads an image to a byte array (Tiff, Png, JPeg)
readImage
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/ui/GraphicsUtils.java", "license": "gpl-2.0", "size": 25375 }
[ "java.io.File", "java.io.IOException", "org.apache.commons.io.FileUtils", "org.apache.commons.io.FilenameUtils" ]
import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils;
import java.io.*; import org.apache.commons.io.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,441,425
@Override public URL toURL(URI uri) { ResolverUtil.validate(uri, SCHEME); return ResolverUtil.createURLFromPath(uri, BASE_ARTIFACT_URL); }
URL function(URI uri) { ResolverUtil.validate(uri, SCHEME); return ResolverUtil.createURLFromPath(uri, BASE_ARTIFACT_URL); }
/** * Convert the specified URI to one or more URL(s). * * @param uri the URI to convert * @return a URL to the identified resource * @throws IllegalArgumentException if the scheme is not equal to the value from getScheme() * the uri is malformed such that ...
Convert the specified URI to one or more URL(s)
toURL
{ "repo_name": "opencadc/caom2", "path": "caom2-artifact-resolvers/src/main/java/ca/nrc/cadc/caom2/artifact/resolvers/XmmResolver.java", "license": "agpl-3.0", "size": 2824 }
[ "ca.nrc.cadc.caom2.artifact.resolvers.util.ResolverUtil" ]
import ca.nrc.cadc.caom2.artifact.resolvers.util.ResolverUtil;
import ca.nrc.cadc.caom2.artifact.resolvers.util.*;
[ "ca.nrc.cadc" ]
ca.nrc.cadc;
166,055
default void removeReplicationPeer(final String peerId) throws IOException { }
default void removeReplicationPeer(final String peerId) throws IOException { }
/** * Remove a peer and stop the replication * @param peerId a short name that identifies the peer * @throws IOException */
Remove a peer and stop the replication
removeReplicationPeer
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 97415 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
90,785
DOCUMENTATION_ROOT.mkdirs(); ScenarioDocuWriter writer = getNewWriter(); writer.saveBranchDescription(createBranch(BRANCH_NAME)); writer.saveBuildDescription(createBuild(BUILD_NAME)); writer.flush(); }
DOCUMENTATION_ROOT.mkdirs(); ScenarioDocuWriter writer = getNewWriter(); writer.saveBranchDescription(createBranch(BRANCH_NAME)); writer.saveBuildDescription(createBuild(BUILD_NAME)); writer.flush(); }
/** * Create directory to store the scenarioo report files inside * and store the needed description files for the branch and the build. * This has to be done at least once for a full scenarioo report build. */
Create directory to store the scenarioo report files inside and store the needed description files for the branch and the build. This has to be done at least once for a full scenarioo report build
initScenariooReportForCurrentBuildRun
{ "repo_name": "scenarioo/pizza-delivery", "path": "src/test/java/org/scenarioo/pizza/scenarioo/ScenariooBuildContext.java", "license": "mit", "size": 4116 }
[ "org.scenarioo.api.ScenarioDocuWriter" ]
import org.scenarioo.api.ScenarioDocuWriter;
import org.scenarioo.api.*;
[ "org.scenarioo.api" ]
org.scenarioo.api;
1,996,260
public static <T> List<Weighted<T>> create(List<T> things) { return Lists.transform(things, new WeightFunction<T>()); }
static <T> List<Weighted<T>> function(List<T> things) { return Lists.transform(things, new WeightFunction<T>()); }
/** * Converts an input {@code List<T>} into a {@code List<Weighted>}. * * @param things The items to convert * @return The items as {@code Weighted<T>} values with weight 1.0 */
Converts an input List into a List
create
{ "repo_name": "bikash/oryx", "path": "kmeans-common/src/main/java/com/cloudera/oryx/kmeans/common/Weighted.java", "license": "apache-2.0", "size": 4151 }
[ "com.google.common.collect.Lists", "java.util.List" ]
import com.google.common.collect.Lists; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
965,453
public boolean isError() { return fSeverity == IStatus.ERROR; }
boolean function() { return fSeverity == IStatus.ERROR; }
/** * Returns if the status' severity is ERROR. */
Returns if the status' severity is ERROR
isError
{ "repo_name": "webratio/typescript.java", "path": "eclipse/ts.eclipse.ide.ui/src/ts/eclipse/ide/ui/preferences/StatusInfo.java", "license": "mit", "size": 4739 }
[ "org.eclipse.core.runtime.IStatus" ]
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
1,450,731
protected void addGpusPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_P3_2xlarge_gpus_feature"), getString("_UI_PropertyDescriptor_descripti...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), Ec2Package.eINSTANCE.getP3_2xlarge_Gpus(), true, false, false, ItemPropertyDescriptor.GENERIC_VAL...
/** * This adds a property descriptor for the Gpus feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Gpus feature.
addGpusPropertyDescriptor
{ "repo_name": "occiware/Multi-Cloud-Studio", "path": "plugins/org.eclipse.cmf.occi.multicloud.aws.ec2.edit/src-gen/org/eclipse/cmf/occi/multicloud/aws/ec2/provider/P3_2xlargeItemProvider.java", "license": "epl-1.0", "size": 8379 }
[ "org.eclipse.cmf.occi.multicloud.aws.ec2.Ec2Package", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.cmf.occi.multicloud.aws.ec2.Ec2Package; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.cmf.occi.multicloud.aws.ec2.*; import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.cmf", "org.eclipse.emf" ]
org.eclipse.cmf; org.eclipse.emf;
991,722
Promise<Void> any(final Promise<?>... promises);
Promise<Void> any(final Promise<?>... promises);
/** * Any promises must complete. * * @param promises promises * @return return containing promise */
Any promises must complete
any
{ "repo_name": "advantageous/reakt", "path": "src/main/java/io/advantageous/reakt/reactor/Reactor.java", "license": "apache-2.0", "size": 7546 }
[ "io.advantageous.reakt.promise.Promise" ]
import io.advantageous.reakt.promise.Promise;
import io.advantageous.reakt.promise.*;
[ "io.advantageous.reakt" ]
io.advantageous.reakt;
1,825,754
public void initialize(Configuration conf) throws IOException;
void function(Configuration conf) throws IOException;
/** * Initialize state storage. This should open connections to any external * services if required. * @throws IOException */
Initialize state storage. This should open connections to any external services if required
initialize
{ "repo_name": "epfl-labos/eagle", "path": "src/main/java/ch/epfl/eagle/daemon/nodemonitor/NodeMonitorState.java", "license": "apache-2.0", "size": 1704 }
[ "java.io.IOException", "org.apache.commons.configuration.Configuration" ]
import java.io.IOException; import org.apache.commons.configuration.Configuration;
import java.io.*; import org.apache.commons.configuration.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
626,646
void update(EventBean[] newEvents, EventBean[] oldEvents);
void update(EventBean[] newEvents, EventBean[] oldEvents);
/** * This is the main method for receiving any tick updates from the CEP Engine. * Two arrays are passed in, one with the new events, another one with all old events. * * @see http://wiki.myopentrader.org/confluence/display/MOTD/Interface+method%3A+Update * @see com.espertech.esper.client.UpdateListe...
This is the main method for receiving any tick updates from the CEP Engine. Two arrays are passed in, one with the new events, another one with all old events
update
{ "repo_name": "sgrotz/myopentrader", "path": "MyOpenTraderCommon/src/main/java/org/mot/common/iface/StrategyInterface.java", "license": "gpl-3.0", "size": 4232 }
[ "com.espertech.esper.client.EventBean" ]
import com.espertech.esper.client.EventBean;
import com.espertech.esper.client.*;
[ "com.espertech.esper" ]
com.espertech.esper;
1,618,143
public Resource createRelative(String relativePath) { String pathToUse = StringUtils.applyRelativePath(this.path, relativePath); return new ServletContextResource(this.servletContext, pathToUse); }
Resource function(String relativePath) { String pathToUse = StringUtils.applyRelativePath(this.path, relativePath); return new ServletContextResource(this.servletContext, pathToUse); }
/** * This implementation creates a ServletContextResource, applying the given path * relative to the path of the underlying file of this resource descriptor. * @see org.springframework.util.StringUtils#applyRelativePath(String, String) */
This implementation creates a ServletContextResource, applying the given path relative to the path of the underlying file of this resource descriptor
createRelative
{ "repo_name": "GIP-RECIA/esco-grouper-ui", "path": "ext/bundles/org.springframework.web/src/main/java/org/springframework/web/context/support/ServletContextResource.java", "license": "apache-2.0", "size": 6975 }
[ "org.springframework.core.io.Resource", "org.springframework.util.StringUtils" ]
import org.springframework.core.io.Resource; import org.springframework.util.StringUtils;
import org.springframework.core.io.*; import org.springframework.util.*;
[ "org.springframework.core", "org.springframework.util" ]
org.springframework.core; org.springframework.util;
2,417,533