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
long exportPdf(long entityId, OutputStream outputStream, String lookupName, QueryParams params, List<String> headers, Map<String, Object> lookupFields);
long exportPdf(long entityId, OutputStream outputStream, String lookupName, QueryParams params, List<String> headers, Map<String, Object> lookupFields);
/** * Exports entity instances to a PDF file. * @param entityId id of the entity for which the instances will be exported * @param outputStream the stream to write the PDF to * @param lookupName the name of lookup * @param params query parameters to be used retrieving instances * @param he...
Exports entity instances to a PDF file
exportPdf
{ "repo_name": "adamkalmus/motech", "path": "platform/mds/mds/src/main/java/org/motechproject/mds/service/CsvImportExportService.java", "license": "bsd-3-clause", "size": 11163 }
[ "java.io.OutputStream", "java.util.List", "java.util.Map", "org.motechproject.mds.query.QueryParams" ]
import java.io.OutputStream; import java.util.List; import java.util.Map; import org.motechproject.mds.query.QueryParams;
import java.io.*; import java.util.*; import org.motechproject.mds.query.*;
[ "java.io", "java.util", "org.motechproject.mds" ]
java.io; java.util; org.motechproject.mds;
369,276
public ArrayList<ProjectDocument> getDocuments() { ArrayList<ProjectDocument> docuArray = new ArrayList<ProjectDocument>(); for (int i = 0; i < documents.size(); i++) { ProjectDocument projectDocument = (ProjectDocument) documents .get(i); docuArray.add(projectDocument); } return docuArray; }
ArrayList<ProjectDocument> function() { ArrayList<ProjectDocument> docuArray = new ArrayList<ProjectDocument>(); for (int i = 0; i < documents.size(); i++) { ProjectDocument projectDocument = (ProjectDocument) documents .get(i); docuArray.add(projectDocument); } return docuArray; }
/** * Devuelve un arrayList con todos los documentos. * * @return Documentos */
Devuelve un arrayList con todos los documentos
getDocuments
{ "repo_name": "iCarto/siga", "path": "appgvSIG/src/com/iver/cit/gvsig/project/Project.java", "license": "gpl-3.0", "size": 62151 }
[ "com.iver.cit.gvsig.project.documents.ProjectDocument", "java.util.ArrayList" ]
import com.iver.cit.gvsig.project.documents.ProjectDocument; import java.util.ArrayList;
import com.iver.cit.gvsig.project.documents.*; import java.util.*;
[ "com.iver.cit", "java.util" ]
com.iver.cit; java.util;
2,785,259
public void onVideoPicture(IVideoPictureEvent event) { try { File file = File.createTempFile("frame", ".png"); thumbnail_path = file.getAbsolutePath(); ImageIO.write(event.getImage(), "png", file); } catch (Exception e) { e.printStackTrace(); ...
void function(IVideoPictureEvent event) { try { File file = File.createTempFile("frame", ".png"); thumbnail_path = file.getAbsolutePath(); ImageIO.write(event.getImage(), "png", file); } catch (Exception e) { e.printStackTrace(); } }
/** * Called after a video frame has been decoded from a media stream. * Optionally a BufferedImage version of the frame may be passed * if the calling {@link IMediaReader} instance was configured to * create BufferedImages. * * This method blocks, so return quickly. */
Called after a video frame has been decoded from a media stream. Optionally a BufferedImage version of the frame may be passed if the calling <code>IMediaReader</code> instance was configured to create BufferedImages. This method blocks, so return quickly
onVideoPicture
{ "repo_name": "samber/VideoThumbnail", "path": "GetFirstFrameVideo.java", "license": "apache-2.0", "size": 3698 }
[ "com.xuggle.mediatool.event.IVideoPictureEvent", "java.io.File", "javax.imageio.ImageIO" ]
import com.xuggle.mediatool.event.IVideoPictureEvent; import java.io.File; import javax.imageio.ImageIO;
import com.xuggle.mediatool.event.*; import java.io.*; import javax.imageio.*;
[ "com.xuggle.mediatool", "java.io", "javax.imageio" ]
com.xuggle.mediatool; java.io; javax.imageio;
2,720,700
protected void moveSelectionUp() { final IStructuredSelection selection = this.list.getStructuredSelection(); final int index = this.conversions.indexOf(selection.getFirstElement()); if (index > 0) { final ConversionMapping previous = this.conversions.remove(index - 1); this.conversions.add(index + selec...
void function() { final IStructuredSelection selection = this.list.getStructuredSelection(); final int index = this.conversions.indexOf(selection.getFirstElement()); if (index > 0) { final ConversionMapping previous = this.conversions.remove(index - 1); this.conversions.add(index + selection.size() - 1, previous); refr...
/** Move the selection up. */
Move the selection up
moveSelectionUp
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java", "license": "apache-2.0", "size": 29496 }
[ "org.eclipse.jface.viewers.IStructuredSelection" ]
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
2,854,809
public File getSelectedFile() { if (model == null) return super.getSelectedFile(); if (model.getChooserType() == FileChooser.FOLDER_CHOOSER) return super.getSelectedFile(); if (nameArea == null) return super.getSelectedFile(); String name = nameArea.getText(); if (name == null || name.trim().length() ...
File function() { if (model == null) return super.getSelectedFile(); if (model.getChooserType() == FileChooser.FOLDER_CHOOSER) return super.getSelectedFile(); if (nameArea == null) return super.getSelectedFile(); String name = nameArea.getText(); if (name == null name.trim().length() == 0) return super.getSelectedFile(...
/** * Overridden to create the selected file when * <code>Save</code> and <code>Preview</code> options are visible, * otherwise the selected file is <code>null</code>. * @see JFileChooser#getSelectedFile() */
Overridden to create the selected file when <code>Save</code> and <code>Preview</code> options are visible, otherwise the selected file is <code>null</code>
getSelectedFile
{ "repo_name": "hflynn/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/filechooser/CustomizedFileChooser.java", "license": "gpl-2.0", "size": 13104 }
[ "java.io.File", "javax.swing.event.DocumentEvent" ]
import java.io.File; import javax.swing.event.DocumentEvent;
import java.io.*; import javax.swing.event.*;
[ "java.io", "javax.swing" ]
java.io; javax.swing;
1,816,431
private boolean notifyResponseReceived(final XBeeResponse response) { boolean processed = false; logger.debug("RX XBEE: {}", response.toString()); synchronized (transactionListeners) { for (XBeeListener listener : transactionListeners) { try { ...
boolean function(final XBeeResponse response) { boolean processed = false; logger.debug(STR, response.toString()); synchronized (transactionListeners) { for (XBeeListener listener : transactionListeners) { try { if (listener.transactionEvent(response)) { processed = true; } } catch (Exception e) { logger.debug(STR, res...
/** * Notify any transaction listeners when we receive a response. * * @param response the {@link XBeeEvent} data received * @return true if the response was processed */
Notify any transaction listeners when we receive a response
notifyResponseReceived
{ "repo_name": "zsmartsystems/com.zsmartsystems.zigbee", "path": "com.zsmartsystems.zigbee.dongle.xbee/src/main/java/com/zsmartsystems/zigbee/dongle/xbee/internal/XBeeFrameHandler.java", "license": "epl-1.0", "size": 22802 }
[ "com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeResponse" ]
import com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeResponse;
import com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.*;
[ "com.zsmartsystems.zigbee" ]
com.zsmartsystems.zigbee;
2,427,578
TupleSet closedInstanceAtoms(TupleFactory factory, InstanceKey typeKey) { if (openWorldKeys.contains(typeKey)) { final TupleSet s = factory.noneOf(1); Relation[] atoms = instances.get(typeKey); for(int i = 0; i < atoms.length - openWorldScopeSize; i++) { s.add(factory.tuple( atoms[i] )); } retu...
TupleSet closedInstanceAtoms(TupleFactory factory, InstanceKey typeKey) { if (openWorldKeys.contains(typeKey)) { final TupleSet s = factory.noneOf(1); Relation[] atoms = instances.get(typeKey); for(int i = 0; i < atoms.length - openWorldScopeSize; i++) { s.add(factory.tuple( atoms[i] )); } return s; } else { return ins...
/** * Returns a tupleset containing all instances (atoms) of the given type partition * that are in the closed world. * @requires this.atoms() in factory.universe.atoms[int] * @return a tupleset containing all instances (atoms) of the given type partition that are in the closed world. */
Returns a tupleset containing all instances (atoms) of the given type partition that are in the closed world
closedInstanceAtoms
{ "repo_name": "wala/MemSAT", "path": "com.ibm.wala.memsat/src/com/ibm/wala/memsat/representation/ConstantFactory.java", "license": "epl-1.0", "size": 19745 }
[ "com.ibm.wala.ipa.callgraph.propagation.InstanceKey" ]
import com.ibm.wala.ipa.callgraph.propagation.InstanceKey;
import com.ibm.wala.ipa.callgraph.propagation.*;
[ "com.ibm.wala" ]
com.ibm.wala;
2,688,044
protected Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache) { Map<String, Object> model = new HashMap<String, Object>(1); QName classQname = getClassQname(req); QName propertyQname = getPropertyQname(req); if (this.dictionaryservice.getClass(class...
Map<String, Object> function(WebScriptRequest req, Status status, Cache cache) { Map<String, Object> model = new HashMap<String, Object>(1); QName classQname = getClassQname(req); QName propertyQname = getPropertyQname(req); if (this.dictionaryservice.getClass(classQname).getProperties().get(propertyQname) != null) { m...
/** * Override method from DeclarativeWebScript */
Override method from DeclarativeWebScript
executeImpl
{ "repo_name": "Alfresco/community-edition", "path": "projects/remote-api/source/java/org/alfresco/repo/web/scripts/dictionary/AbstractPropertyGet.java", "license": "lgpl-3.0", "size": 2695 }
[ "java.util.HashMap", "java.util.Map", "org.alfresco.service.namespace.QName", "org.springframework.extensions.webscripts.Cache", "org.springframework.extensions.webscripts.Status", "org.springframework.extensions.webscripts.WebScriptRequest" ]
import java.util.HashMap; import java.util.Map; import org.alfresco.service.namespace.QName; import org.springframework.extensions.webscripts.Cache; import org.springframework.extensions.webscripts.Status; import org.springframework.extensions.webscripts.WebScriptRequest;
import java.util.*; import org.alfresco.service.namespace.*; import org.springframework.extensions.webscripts.*;
[ "java.util", "org.alfresco.service", "org.springframework.extensions" ]
java.util; org.alfresco.service; org.springframework.extensions;
1,064,707
@ServiceMethod(returns = ReturnType.SINGLE) Mono<MicrosoftGraphEndpointInner> getEndpointsAsync(String servicePrincipalId, String endpointId);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<MicrosoftGraphEndpointInner> getEndpointsAsync(String servicePrincipalId, String endpointId);
/** * Get endpoints from servicePrincipals. * * @param servicePrincipalId key: id of servicePrincipal. * @param endpointId key: id of endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.authorization.fluent.models.Odata...
Get endpoints from servicePrincipals
getEndpointsAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java", "license": "mit", "size": 228379 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphEndpointInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphEndpointInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.authorization.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
107,172
public void occurrence(short occurrence, Augmentations augs) throws XNIException { } // occurence(short, Augmentations)
void function(short occurrence, Augmentations augs) throws XNIException { }
/** * The occurrence count for a child in a children content model or * for the mixed content model group. * * @param occurrence The occurrence count for the last element * or group. * @param augs Additional information that may include infoset * ...
The occurrence count for a child in a children content model or for the mixed content model group
occurrence
{ "repo_name": "AaronZhangL/SplitCharater", "path": "xerces-2_11_0/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java", "license": "gpl-2.0", "size": 31977 }
[ "org.apache.xerces.xni.Augmentations", "org.apache.xerces.xni.XNIException" ]
import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.XNIException;
import org.apache.xerces.xni.*;
[ "org.apache.xerces" ]
org.apache.xerces;
1,225,633
public void killJob(JobID jobid) throws IOException;
void function(JobID jobid) throws IOException;
/** * Kill the indicated job */
Kill the indicated job
killJob
{ "repo_name": "ghelmling/hadoop-common", "path": "src/mapred/org/apache/hadoop/mapred/JobSubmissionProtocol.java", "license": "apache-2.0", "size": 8192 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,224,795
@Test public void testDateToYyyymmdd() { String result = testDialect.getSqlFrom(Function.dateToYyyymmdd(field("testField"))); assertEquals(expectedDateToYyyymmdd(), result); }
void function() { String result = testDialect.getSqlFrom(Function.dateToYyyymmdd(field(STR))); assertEquals(expectedDateToYyyymmdd(), result); }
/** * Test that YYYYMMDDToDate functionality behaves as expected. */
Test that YYYYMMDDToDate functionality behaves as expected
testDateToYyyymmdd
{ "repo_name": "badgerwithagun/morf", "path": "morf-testsupport/src/main/java/org/alfasoftware/morf/jdbc/AbstractSqlDialectTest.java", "license": "apache-2.0", "size": 201465 }
[ "org.alfasoftware.morf.sql.element.Function", "org.junit.Assert" ]
import org.alfasoftware.morf.sql.element.Function; import org.junit.Assert;
import org.alfasoftware.morf.sql.element.*; import org.junit.*;
[ "org.alfasoftware.morf", "org.junit" ]
org.alfasoftware.morf; org.junit;
2,713,328
return SportRecord.class; } public final TableField<SportRecord, Integer> ID = createField("id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); public final TableField<SportRecord, String> MODALITY = createField("modality", org.jooq.impl.SQLDataType.VARCHAR.length(45).nullable(fal...
return SportRecord.class; } public final TableField<SportRecord, Integer> ID = createField("id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, STRmodalitySTRSTRlifetime_event_idSTRSTRsportSTR"); } /** * {@inheritDoc}
/** * The class holding records for this type */
The class holding records for this type
getRecordType
{ "repo_name": "zuacaldeira/lifetime", "path": "lifetime-ejb/src/main/java/lifetime/backend/persistence/jooq/tables/Sport.java", "license": "unlicense", "size": 3535 }
[ "org.jooq.TableField" ]
import org.jooq.TableField;
import org.jooq.*;
[ "org.jooq" ]
org.jooq;
161,922
final Downloadable downloadable = fetchDownloadable(); if (downloadable == null) { return null; } return downloadable.listener(listener); } /** * <p> * Gets called internally by {@link #read()} to actually do the work. The * method reads the web page identified by {@link #url} and interprets it, ...
final Downloadable downloadable = fetchDownloadable(); if (downloadable == null) { return null; } return downloadable.listener(listener); } /** * <p> * Gets called internally by {@link #read()} to actually do the work. The * method reads the web page identified by {@link #url} and interprets it, * returning an accordin...
/** * <p> * Fetches the web page and interprets it, i.e. creating a * {@linkplain Downloadable downloadable item} of it. * </p> * * @throws IOException * If reading/interpreting the web page fails */
Fetches the web page and interprets it, i.e. creating a Downloadable downloadable item of it.
read
{ "repo_name": "codepain/media-download", "path": "src/main/java/com/github/codepain/mediadownload/reader/Reader.java", "license": "mit", "size": 6754 }
[ "com.github.codepain.mediadownload.download.Downloadable" ]
import com.github.codepain.mediadownload.download.Downloadable;
import com.github.codepain.mediadownload.download.*;
[ "com.github.codepain" ]
com.github.codepain;
682,162
private ForwardingObjective buildForwardingObjective(TrafficSelector selector, TrafficTreatment treatment, int nextId, boolean add, ...
ForwardingObjective function(TrafficSelector selector, TrafficTreatment treatment, int nextId, boolean add, int priority) { DefaultForwardingObjective.Builder fobBuilder = DefaultForwardingObjective.builder(); fobBuilder.withSelector(selector); if (treatment != null) { fobBuilder.withTreatment(treatment); } if (nextId ...
/** * Builds a forwarding objective from the given selector, treatment and nextId. * * @param selector selector * @param treatment treatment to apply to packet, can be null * @param nextId next objective to point to for forwarding packet * @param add true to create an add objective, false ...
Builds a forwarding objective from the given selector, treatment and nextId
buildForwardingObjective
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "apps/routing/cpr/src/main/java/org/onosproject/routing/cpr/ControlPlaneRedirectManager.java", "license": "apache-2.0", "size": 29144 }
[ "org.onosproject.net.flow.TrafficSelector", "org.onosproject.net.flow.TrafficTreatment", "org.onosproject.net.flowobjective.DefaultForwardingObjective", "org.onosproject.net.flowobjective.ForwardingObjective" ]
import org.onosproject.net.flow.TrafficSelector; import org.onosproject.net.flow.TrafficTreatment; import org.onosproject.net.flowobjective.DefaultForwardingObjective; import org.onosproject.net.flowobjective.ForwardingObjective;
import org.onosproject.net.flow.*; import org.onosproject.net.flowobjective.*;
[ "org.onosproject.net" ]
org.onosproject.net;
874,958
@Override //eta would be at the first cell //lambda would be at the second cell //the number of iteration that we'll go and generate epsilon public Vector update(Vector currentWeights, Example example, ClassifierData classifierData) { try{ double algorithmIteration = classifierData.iteration;...
Vector function(Vector currentWeights, Example example, ClassifierData classifierData) { try{ double algorithmIteration = classifierData.iteration; double newEta = eta/Math.sqrt(algorithmIteration); Vector expectation = new Vector(); Random random = new Random(); for(Integer key : currentWeights.keySet()) expectation.p...
/** * Implementation of the update rule * @param currentWeights - the current weights * @param example - a single example * @param classifierData - all the additional data that needed such as: loss function, inference, etc. * @return the new set of weights */
Implementation of the update rule
update
{ "repo_name": "adiyoss/StructED", "path": "src/com/structed/models/algorithms/ProbitLoss.java", "license": "mit", "size": 5416 }
[ "com.structed.data.entities.Example", "com.structed.data.entities.Vector", "com.structed.models.ClassifierData", "com.structed.utils.MathHelpers", "java.util.Random" ]
import com.structed.data.entities.Example; import com.structed.data.entities.Vector; import com.structed.models.ClassifierData; import com.structed.utils.MathHelpers; import java.util.Random;
import com.structed.data.entities.*; import com.structed.models.*; import com.structed.utils.*; import java.util.*;
[ "com.structed.data", "com.structed.models", "com.structed.utils", "java.util" ]
com.structed.data; com.structed.models; com.structed.utils; java.util;
1,965,129
public GVRSceneObject[] getSceneObjectsByName(final String name) { if (null == name || name.isEmpty()) { return null; } final List<GVRSceneObject> matches = new ArrayList<GVRSceneObject>(); GVRScene.getSceneObjectsByName(matches, mSceneObjects, name); return 0 !...
GVRSceneObject[] function(final String name) { if (null == name name.isEmpty()) { return null; } final List<GVRSceneObject> matches = new ArrayList<GVRSceneObject>(); GVRScene.getSceneObjectsByName(matches, mSceneObjects, name); return 0 != matches.size() ? matches.toArray(new GVRSceneObject[matches.size()]) : null; }
/** * Performs case-sensitive search * * @param name * @return null if nothing was found or name was null/empty */
Performs case-sensitive search
getSceneObjectsByName
{ "repo_name": "parthmehta209/GearVRf", "path": "GVRf/Framework/framework/src/main/java/org/gearvrf/GVRScene.java", "license": "apache-2.0", "size": 21411 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,109,047
public PieData findMostPlayedData(StatisticType type, List<Long> shownChallenges) { //Create lists ArrayList<Entry> entries = new ArrayList<>(); ArrayList<String> labels = new ArrayList<>(); //Retrieve numbers List<Statistics> statistics; statistics = mStatisticsData...
PieData function(StatisticType type, List<Long> shownChallenges) { ArrayList<Entry> entries = new ArrayList<>(); ArrayList<String> labels = new ArrayList<>(); List<Statistics> statistics; statistics = mStatisticsDataSource.findByCategoryAndUser(mCategoryId, mUser); switch (type) { case TYPE_MOST_PLAYED: break; case TYP...
/** * Creates a PieData object containing entries of the most played / failed or succeded * challenges. Which of these entries are added depends on the given mode. The ids of the * challenges are also added to the shownChallenges list. * * @param type the type * @param shownChal...
Creates a PieData object containing entries of the most played / failed or succeded challenges. Which of these entries are added depends on the given mode. The ids of the challenges are also added to the shownChallenges list
findMostPlayedData
{ "repo_name": "tope018/CSC439_Project", "path": "app/src/main/java/de/fhdw/ergoholics/brainphaser/logic/statistics/ChartDataLogic.java", "license": "gpl-3.0", "size": 12096 }
[ "com.github.mikephil.charting.data.Entry", "com.github.mikephil.charting.data.PieData", "com.github.mikephil.charting.data.PieDataSet", "de.fhdw.ergoholics.brainphaser.model.Statistics", "java.util.ArrayList", "java.util.List" ]
import com.github.mikephil.charting.data.Entry; import com.github.mikephil.charting.data.PieData; import com.github.mikephil.charting.data.PieDataSet; import de.fhdw.ergoholics.brainphaser.model.Statistics; import java.util.ArrayList; import java.util.List;
import com.github.mikephil.charting.data.*; import de.fhdw.ergoholics.brainphaser.model.*; import java.util.*;
[ "com.github.mikephil", "de.fhdw.ergoholics", "java.util" ]
com.github.mikephil; de.fhdw.ergoholics; java.util;
152,557
public static void loadLdif(ContextSource contextSource, Resource ldifFile) throws IOException { DirContext context = contextSource.getReadWriteContext(); try { loadLdif(context, ldifFile); } finally { try { context.close(); } catch (Except...
static void function(ContextSource contextSource, Resource ldifFile) throws IOException { DirContext context = contextSource.getReadWriteContext(); try { loadLdif(context, ldifFile); } finally { try { context.close(); } catch (Exception e) { } } }
/** * Load an Ldif file into an LDAP server. * * @param contextSource ContextSource to use for getting a DirContext to * interact with the LDAP server. * @param ldifFile a Resource representing a valid LDIF file. * @throws IOException if the Resource cannot be rea...
Load an Ldif file into an LDAP server
loadLdif
{ "repo_name": "spring-projects/spring-ldap", "path": "test-support/src/main/java/org/springframework/ldap/test/LdapTestUtils.java", "license": "apache-2.0", "size": 10965 }
[ "java.io.IOException", "javax.naming.directory.DirContext", "org.springframework.core.io.Resource", "org.springframework.ldap.core.ContextSource" ]
import java.io.IOException; import javax.naming.directory.DirContext; import org.springframework.core.io.Resource; import org.springframework.ldap.core.ContextSource;
import java.io.*; import javax.naming.directory.*; import org.springframework.core.io.*; import org.springframework.ldap.core.*;
[ "java.io", "javax.naming", "org.springframework.core", "org.springframework.ldap" ]
java.io; javax.naming; org.springframework.core; org.springframework.ldap;
1,663,993
public String getMapDebugScript() { return get(JobContext.MAP_DEBUG_SCRIPT); } /** * Set the debug script to run when the reduce tasks fail. * * <p>The debug script can aid debugging of failed reduce tasks. The script * is given task's stdout, stderr, syslog, jobconf files as arguments.</p> ...
String function() { return get(JobContext.MAP_DEBUG_SCRIPT); } /** * Set the debug script to run when the reduce tasks fail. * * <p>The debug script can aid debugging of failed reduce tasks. The script * is given task's stdout, stderr, syslog, jobconf files as arguments.</p> * * <p>The debug command, run on the node wh...
/** * Get the map task's debug script. * * @return the debug Script for the mapred job for failed map tasks. * @see #setMapDebugScript(String) */
Get the map task's debug script
getMapDebugScript
{ "repo_name": "jonathangizmo/HadoopDistJ", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobConf.java", "license": "mit", "size": 69550 }
[ "org.apache.hadoop.mapreduce.filecache.DistributedCache" ]
import org.apache.hadoop.mapreduce.filecache.DistributedCache;
import org.apache.hadoop.mapreduce.filecache.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,215,080
public void removeComponent(String subdomain) { List<Component> componentsToRemove = new ArrayList<Component>(routables.get(subdomain).getComponents()); for (Component component : componentsToRemove) { removeComponent(subdomain, component); } }
void function(String subdomain) { List<Component> componentsToRemove = new ArrayList<Component>(routables.get(subdomain).getComponents()); for (Component component : componentsToRemove) { removeComponent(subdomain, component); } }
/** * Removes a component. The {@link Component#shutdown} method will be called on the * component. Note that if the component was an external component that was connected * several times then all its connections will be terminated. * * @param subdomain the subdomain of the component's address....
Removes a component. The <code>Component#shutdown</code> method will be called on the component. Note that if the component was an external component that was connected several times then all its connections will be terminated
removeComponent
{ "repo_name": "wudingli/openfire", "path": "src/java/org/jivesoftware/openfire/component/InternalComponentManager.java", "license": "apache-2.0", "size": 23707 }
[ "java.util.ArrayList", "java.util.List", "org.xmpp.component.Component" ]
import java.util.ArrayList; import java.util.List; import org.xmpp.component.Component;
import java.util.*; import org.xmpp.component.*;
[ "java.util", "org.xmpp.component" ]
java.util; org.xmpp.component;
479,885
void apply(ArrayList<Integer> sourceVerts, ArrayList<Integer> resultVerts);
void apply(ArrayList<Integer> sourceVerts, ArrayList<Integer> resultVerts);
/** * Apply an algorithm to a contour. * <p>The implementation is permitted to require that the the result * vertices be seeded with existing data. In this case the argument * becomes an in/out argument rather than just an out argument.</p> * @param sourceVerts The source vertices that re...
Apply an algorithm to a contour. The implementation is permitted to require that the the result vertices be seeded with existing data. In this case the argument becomes an in/out argument rather than just an out argument
apply
{ "repo_name": "d235j/jmonkeyengine", "path": "navmesh/IContourAlgorithm.java", "license": "bsd-3-clause", "size": 2154 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,051,419
public void addOrReplaceClusterSchema( ClusterSchema clusterSchema ) { int index = clusterSchemas.indexOf( clusterSchema ); if ( index < 0 ) { clusterSchemas.add( clusterSchema ); } else { ClusterSchema previous = clusterSchemas.get( index ); previous.replaceMeta( clusterSchema ); } ...
void function( ClusterSchema clusterSchema ) { int index = clusterSchemas.indexOf( clusterSchema ); if ( index < 0 ) { clusterSchemas.add( clusterSchema ); } else { ClusterSchema previous = clusterSchemas.get( index ); previous.replaceMeta( clusterSchema ); } setChanged(); }
/** * Add a new cluster schema to the transformation if that didn't exist yet. Otherwise, replace it. * * @param clusterSchema * The cluster schema to be added. */
Add a new cluster schema to the transformation if that didn't exist yet. Otherwise, replace it
addOrReplaceClusterSchema
{ "repo_name": "Advent51/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/TransMeta.java", "license": "apache-2.0", "size": 225587 }
[ "org.pentaho.di.cluster.ClusterSchema" ]
import org.pentaho.di.cluster.ClusterSchema;
import org.pentaho.di.cluster.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,713,057
public void useHttps(SSLSocketFactory sslSocketFactory, boolean tunnelProxy) { this.sslSocketFactory = sslSocketFactory; this.tunnelProxy = tunnelProxy; }
void function(SSLSocketFactory sslSocketFactory, boolean tunnelProxy) { this.sslSocketFactory = sslSocketFactory; this.tunnelProxy = tunnelProxy; }
/** * Serve requests with HTTPS rather than otherwise. * @param tunnelProxy true to expect the HTTP CONNECT method before * negotiating TLS. */
Serve requests with HTTPS rather than otherwise
useHttps
{ "repo_name": "beamly/okhttp", "path": "mockwebserver/src/main/java/com/squareup/okhttp/mockwebserver/MockWebServer.java", "license": "apache-2.0", "size": 24792 }
[ "javax.net.ssl.SSLSocketFactory" ]
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
257,339
public List<String> enumerate() { Logger.D(TAG, "enumerate"); List<String> barcodeIdStrings = new ArrayList<String>(); if(emdkIds != null && emdkIds.length > 0) barcodeIdStrings.addAll(Arrays.asList(emdkIds)); if(zxingIds != null && zxingIds.length > 0) barcodeIdStrings.addAll(Arrays.asList(zxingIds)); ...
List<String> function() { Logger.D(TAG, STR); List<String> barcodeIdStrings = new ArrayList<String>(); if(emdkIds != null && emdkIds.length > 0) barcodeIdStrings.addAll(Arrays.asList(emdkIds)); if(zxingIds != null && zxingIds.length > 0) barcodeIdStrings.addAll(Arrays.asList(zxingIds)); return barcodeIdStrings; }
/** * Enumerates all of the available EMDK and ZXing scanners * @return a String List of the Scanner IDs * @author Ben Kennedy (NCVT73) */
Enumerates all of the available EMDK and ZXing scanners
enumerate
{ "repo_name": "tauplatform/tau", "path": "lib/commonAPI/barcode/ext/platform/android/src/com/rho/barcode/BarcodeFactory.java", "license": "mit", "size": 19424 }
[ "com.rhomobile.rhodes.Logger", "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import com.rhomobile.rhodes.Logger; import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import com.rhomobile.rhodes.*; import java.util.*;
[ "com.rhomobile.rhodes", "java.util" ]
com.rhomobile.rhodes; java.util;
240,730
public static SOCLargestArmy parseDataStr(String s) { String ga; // the game name int pn; // the seat number StringTokenizer st = new StringTokenizer(s, sep2); try { ga = st.nextToken(); pn = Integer.parseInt(st.nextToken()); } ca...
static SOCLargestArmy function(String s) { String ga; int pn; StringTokenizer st = new StringTokenizer(s, sep2); try { ga = st.nextToken(); pn = Integer.parseInt(st.nextToken()); } catch (Exception e) { return null; } return new SOCLargestArmy(ga, pn); }
/** * Parse the command String into a LARGESTARMY message. * * @param s the String to parse * @return a LARGESTARMY message, or null if the data is garbled */
Parse the command String into a LARGESTARMY message
parseDataStr
{ "repo_name": "jdmonin/JSettlers2", "path": "src/main/java/soc/message/SOCLargestArmy.java", "license": "gpl-3.0", "size": 3768 }
[ "java.util.StringTokenizer" ]
import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
230,147
public InetAddress getLocalIPaddress() { WifiManager wifiManager = (WifiManager) myContext.getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); InetAddress address = null; try { address = InetAddress.getByName(Formatter.formatIpAdd...
InetAddress function() { WifiManager wifiManager = (WifiManager) myContext.getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiManager.getConnectionInfo(); InetAddress address = null; try { address = InetAddress.getByName(Formatter.formatIpAddress(wifiInfo.getIpAddress())); } catch (UnknownHostException e) ...
/** * Obtain the local IP address from the <code>WiFiManager</code>. * <p>The following <code>uses</code> permission must be addeded to * the Android project manifest to obtain the network connection * status:<br> * <code>ACCESS_WIFI_STATE</code> * @return the local WiFi IP address. * @see W...
Obtain the local IP address from the <code>WiFiManager</code>. The following <code>uses</code> permission must be addeded to the Android project manifest to obtain the network connection status: <code>ACCESS_WIFI_STATE</code>
getLocalIPaddress
{ "repo_name": "AndroidLevise/frozenbubbleandroid", "path": "src/com/efortin/frozenbubble/NetworkManager.java", "license": "gpl-2.0", "size": 73094 }
[ "android.content.Context", "android.net.wifi.WifiInfo", "android.net.wifi.WifiManager", "android.text.format.Formatter", "java.net.InetAddress", "java.net.UnknownHostException" ]
import android.content.Context; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.text.format.Formatter; import java.net.InetAddress; import java.net.UnknownHostException;
import android.content.*; import android.net.wifi.*; import android.text.format.*; import java.net.*;
[ "android.content", "android.net", "android.text", "java.net" ]
android.content; android.net; android.text; java.net;
222,548
private boolean setVarSelected(final Variable var, final boolean selected) { for (final Component c : pnlVariables.getComponents()) { if (c instanceof VarCheckBox) { final VarCheckBox box = (VarCheckBox)c; if (box.getVar().equals(var)) { box.re...
boolean function(final Variable var, final boolean selected) { for (final Component c : pnlVariables.getComponents()) { if (c instanceof VarCheckBox) { final VarCheckBox box = (VarCheckBox)c; if (box.getVar().equals(var)) { box.removeChangeListener(selected ? negPreventVarChangeL : posPreventVarChangeL); box.setSelecte...
/** * DOCUMENT ME! * * @param var DOCUMENT ME! * @param selected DOCUMENT ME! * * @return DOCUMENT ME! * * @throws IllegalArgumentException DOCUMENT ME! */
DOCUMENT ME
setVarSelected
{ "repo_name": "cismet/cids-custom-sudplan", "path": "src/main/java/de/cismet/cids/custom/objectrenderer/sudplan/MonitorstationRenderer.java", "license": "lgpl-3.0", "size": 18608 }
[ "de.cismet.cids.custom.objecteditors.sudplan.MonitorstationEditor", "de.cismet.cids.custom.sudplan.Variable", "java.awt.Component" ]
import de.cismet.cids.custom.objecteditors.sudplan.MonitorstationEditor; import de.cismet.cids.custom.sudplan.Variable; import java.awt.Component;
import de.cismet.cids.custom.objecteditors.sudplan.*; import de.cismet.cids.custom.sudplan.*; import java.awt.*;
[ "de.cismet.cids", "java.awt" ]
de.cismet.cids; java.awt;
763,957
public void dispatchTrackPropertiesChanged(Track track) { for (Iterator<TrackOverlay> iter = overlayManager.fileTrackOverlays.iterator(); iter.hasNext();) { TrackOverlay to = iter.next(); if (to.getTrack() == track) { to.onTrackPropertiesChanged(); } } }
void function(Track track) { for (Iterator<TrackOverlay> iter = overlayManager.fileTrackOverlays.iterator(); iter.hasNext();) { TrackOverlay to = iter.next(); if (to.getTrack() == track) { to.onTrackPropertiesChanged(); } } }
/** * Notify overlay that track properties have changed * @param track Changed track */
Notify overlay that track properties have changed
dispatchTrackPropertiesChanged
{ "repo_name": "andreynovikov/Androzic", "path": "src/main/java/com/androzic/Androzic.java", "license": "gpl-3.0", "size": 77622 }
[ "com.androzic.data.Track", "com.androzic.overlay.TrackOverlay", "java.util.Iterator" ]
import com.androzic.data.Track; import com.androzic.overlay.TrackOverlay; import java.util.Iterator;
import com.androzic.data.*; import com.androzic.overlay.*; import java.util.*;
[ "com.androzic.data", "com.androzic.overlay", "java.util" ]
com.androzic.data; com.androzic.overlay; java.util;
1,547,098
public static void createDatabase(String id, String name) { System.out.println("create"); Document document = documentBuilder.newDocument(); Element rootElement = document.createElement("database"); document.appendChild(rootElement); Element databaseName = document.createElement("name"); databa...
static void function(String id, String name) { System.out.println(STR); Document document = documentBuilder.newDocument(); Element rootElement = document.createElement(STR); document.appendChild(rootElement); Element databaseName = document.createElement("name"); databaseName.setTextContent(name); rootElement.appendChi...
/** * This method creates a new database. The new entry is written in a * {@code XML} file. * * @param id * {@code String} the id of the new entry. * @param name * {@code String} the name of the new entry. */
This method creates a new database. The new entry is written in a XML file
createDatabase
{ "repo_name": "domokoslaci94/The_Project", "path": "src/main/java/utils/DataUtils.java", "license": "gpl-3.0", "size": 10394 }
[ "java.io.File", "java.nio.file.Path", "java.nio.file.Paths", "javax.xml.transform.TransformerException", "javax.xml.transform.dom.DOMSource", "javax.xml.transform.stream.StreamResult", "org.pmw.tinylog.Logger", "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; import javax.xml.transform.TransformerException; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.pmw.tinylog.Logger; import org.w3c.dom.Document; import org.w3c.dom.Element;
import java.io.*; import java.nio.file.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.pmw.tinylog.*; import org.w3c.dom.*;
[ "java.io", "java.nio", "javax.xml", "org.pmw.tinylog", "org.w3c.dom" ]
java.io; java.nio; javax.xml; org.pmw.tinylog; org.w3c.dom;
449,245
void transform(Writer writer) throws Exception; } public static class Summary extends HtmlOutputText implements ISection { private RequestContext context; private HeRecord record;
void transform(Writer writer) throws Exception; } public static class Summary extends HtmlOutputText implements ISection { private RequestContext context; private HeRecord record;
/** * Transform section and writes into writer * @param writer writer * @throws Exception if transforming fails */
Transform section and writes into writer
transform
{ "repo_name": "usgin/usgin-geoportal", "path": "src/com/esri/gpt/control/harvest/ReportViewer.java", "license": "apache-2.0", "size": 12486 }
[ "com.esri.gpt.catalog.harvest.history.HeRecord", "com.esri.gpt.framework.context.RequestContext", "java.io.Writer", "javax.faces.component.html.HtmlOutputText" ]
import com.esri.gpt.catalog.harvest.history.HeRecord; import com.esri.gpt.framework.context.RequestContext; import java.io.Writer; import javax.faces.component.html.HtmlOutputText;
import com.esri.gpt.catalog.harvest.history.*; import com.esri.gpt.framework.context.*; import java.io.*; import javax.faces.component.html.*;
[ "com.esri.gpt", "java.io", "javax.faces" ]
com.esri.gpt; java.io; javax.faces;
1,638,620
public List<Variable> popTable() { if (empty()) { Logger.getLogger(this.getClass() ).warn("Internal error : empty stack"); return null; } return pop().getTable(); }
List<Variable> function() { if (empty()) { Logger.getLogger(this.getClass() ).warn(STR); return null; } return pop().getTable(); }
/** * This function extracts a Table from the top of the stack. * * @return a String from the top of the stack. If the stack is empty, this * function returns null. * @exception ClassCastException * if the top of the stack is not a String (the top could be * an Integ...
This function extracts a Table from the top of the stack
popTable
{ "repo_name": "Orange-OpenSource/ATK", "path": "gui/src/main/java/com/orange/atk/interpreter/atkCore/JATKInterpreterStack.java", "license": "apache-2.0", "size": 5996 }
[ "java.util.List", "org.apache.log4j.Logger" ]
import java.util.List; import org.apache.log4j.Logger;
import java.util.*; import org.apache.log4j.*;
[ "java.util", "org.apache.log4j" ]
java.util; org.apache.log4j;
184,165
void handleAgentLogoffEvent(AgentLogoffEvent event) { AsteriskAgentImpl agent = getAgentByAgentId("Agent/" + event.getAgent()); if (agent == null) { logger.error("Ignored AgentLogoffEvent for unknown agent " + event.getAgent() + ". Agents: " ...
void handleAgentLogoffEvent(AgentLogoffEvent event) { AsteriskAgentImpl agent = getAgentByAgentId(STR + event.getAgent()); if (agent == null) { logger.error(STR + event.getAgent() + STR + agents.values().toString()); return; } agent.updateState(AgentState.AGENT_LOGGEDOFF); }
/** * Change state if agent logs out. * * @param event */
Change state if agent logs out
handleAgentLogoffEvent
{ "repo_name": "milesje/asterisk-java", "path": "src/main/java/org/asteriskjava/live/internal/AgentManager.java", "license": "apache-2.0", "size": 9522 }
[ "org.asteriskjava.live.AgentState", "org.asteriskjava.manager.event.AgentLogoffEvent" ]
import org.asteriskjava.live.AgentState; import org.asteriskjava.manager.event.AgentLogoffEvent;
import org.asteriskjava.live.*; import org.asteriskjava.manager.event.*;
[ "org.asteriskjava.live", "org.asteriskjava.manager" ]
org.asteriskjava.live; org.asteriskjava.manager;
1,192,383
public void TIntepreterChangeCursor(){ if (TInterpreterConstants.interpreterCursor==null) { ImageIcon ii=TResourceManager.getImageIcon("flecha2.png"); if (ii==null){ ii=TResourceManager.getImageIcon("flecha2.png"); } Image imageCursor=ii.getImage(); Cursor customCursor=getToolkit().createCusto...
void function(){ if (TInterpreterConstants.interpreterCursor==null) { ImageIcon ii=TResourceManager.getImageIcon(STR); if (ii==null){ ii=TResourceManager.getImageIcon(STR); } Image imageCursor=ii.getImage(); Cursor customCursor=getToolkit().createCustomCursor(imageCursor,new Point(),STR); this.setCursor(customCursor); ...
/** * Change Interpreter's Cursor into a predefined image * */
Change Interpreter's Cursor into a predefined image
TIntepreterChangeCursor
{ "repo_name": "hendyyou/FST", "path": "src/tico/interpreter/TInterpreter.java", "license": "gpl-3.0", "size": 14431 }
[ "java.awt.Cursor", "java.awt.Image", "java.awt.Point", "javax.swing.ImageIcon" ]
import java.awt.Cursor; import java.awt.Image; import java.awt.Point; import javax.swing.ImageIcon;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,332,425
@Test(groups = { "functional", "sctp" }) public void testServerSctp() throws Exception { if (SctpTransferTest.checkSctpEnabled()) this.testServerByProtocol(IpChannelType.SCTP); }
@Test(groups = { STR, "sctp" }) void function() throws Exception { if (SctpTransferTest.checkSctpEnabled()) this.testServerByProtocol(IpChannelType.SCTP); }
/** * Test the creation of Server. Stop management and start, and Server should * be started automatically * * @throws Exception */
Test the creation of Server. Stop management and start, and Server should be started automatically
testServerSctp
{ "repo_name": "RestComm/sctp", "path": "sctp-impl/src/test/java/org/mobicents/protocols/sctp/netty/NettyManagementTest.java", "license": "agpl-3.0", "size": 13825 }
[ "org.mobicents.protocols.api.IpChannelType", "org.mobicents.protocols.sctp.SctpTransferTest", "org.testng.annotations.Test" ]
import org.mobicents.protocols.api.IpChannelType; import org.mobicents.protocols.sctp.SctpTransferTest; import org.testng.annotations.Test;
import org.mobicents.protocols.api.*; import org.mobicents.protocols.sctp.*; import org.testng.annotations.*;
[ "org.mobicents.protocols", "org.testng.annotations" ]
org.mobicents.protocols; org.testng.annotations;
1,571,501
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // gets absolute path of the web application String appPath = request.getServletContext().getRealPath(""); // constructs path of the directory to save uploaded file String savePath = appP...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String appPath = request.getServletContext().getRealPath(STRmessageSTRUpload has been done successfully!STR/message.jsp").forward( request, response); }
/** * handles file upload */
handles file upload
doPost
{ "repo_name": "waiwong/Eclipse_Workspace", "path": "UploadServlet30/src/net/codejava/servlet/UploadServlet.java", "license": "apache-2.0", "size": 2002 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,287,597
public Enumeration getInitParameterNames() { return (new Enumerator(parameters.keySet())); }
Enumeration function() { return (new Enumerator(parameters.keySet())); }
/** * Return the set of initialization parameter names defined for this * servlet. If none are defined, an empty Enumeration is returned. */
Return the set of initialization parameter names defined for this servlet. If none are defined, an empty Enumeration is returned
getInitParameterNames
{ "repo_name": "Netprophets/JBOSSWEB_7_0_13_FINAL", "path": "java/org/apache/catalina/core/StandardWrapper.java", "license": "lgpl-3.0", "size": 56307 }
[ "java.util.Enumeration", "org.apache.catalina.util.Enumerator" ]
import java.util.Enumeration; import org.apache.catalina.util.Enumerator;
import java.util.*; import org.apache.catalina.util.*;
[ "java.util", "org.apache.catalina" ]
java.util; org.apache.catalina;
1,629,268
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, URISyntaxException { response.setContentType("text/html;charset=UTF-8"); updatePriority(request, response); request.getRequestDispatcher...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, URISyntaxException { response.setContentType(STR); updatePriority(request, response); request.getRequestDispatcher(STR).forward(request, response); }
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "bryansiebert/PrioritizeMe", "path": "src/main/java/servlet/BubblesView.java", "license": "mit", "size": 10331 }
[ "java.io.IOException", "java.net.URISyntaxException", "java.sql.SQLException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.net.URISyntaxException; import java.sql.SQLException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.net.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "java.net", "java.sql", "javax.servlet" ]
java.io; java.net; java.sql; javax.servlet;
2,107,709
String getTableName(); List<T> findByHql(String hql) throws DAOException; List<Map<String,Object>> queryBySql(String sql) throws DAOException;
String getTableName(); List<T> findByHql(String hql) throws DAOException; List<Map<String,Object>> queryBySql(String sql) throws DAOException;
/** * return Query result * @param sql * @return * @throws DAOException */
return Query result
queryBySql
{ "repo_name": "robinhood-jim/JavaFrame", "path": "core/src/main/java/com/robin/core/base/dao/BaseGenricDao.java", "license": "apache-2.0", "size": 7426 }
[ "com.robin.core.base.exception.DAOException", "java.util.List", "java.util.Map" ]
import com.robin.core.base.exception.DAOException; import java.util.List; import java.util.Map;
import com.robin.core.base.exception.*; import java.util.*;
[ "com.robin.core", "java.util" ]
com.robin.core; java.util;
790,001
private static String getInitialClasspath(Configuration conf) throws IOException { synchronized (classpathLock) { if (initialClasspathFlag.get()) { return initialClasspath; } Map<String, String> env = new HashMap<String, String>(); MRApps.setClasspath(env, conf); initialClass...
static String function(Configuration conf) throws IOException { synchronized (classpathLock) { if (initialClasspathFlag.get()) { return initialClasspath; } Map<String, String> env = new HashMap<String, String>(); MRApps.setClasspath(env, conf); initialClasspath = env.get(Environment.CLASSPATH.name()); initialAppClasspa...
/** * Lock this on initialClasspath so that there is only one fork in the AM for * getting the initial class-path. TODO: We already construct * a parent CLC and use it for all the containers, so this should go away * once the mr-generated-classpath stuff is gone. */
Lock this on initialClasspath so that there is only one fork in the AM for a parent CLC and use it for all the containers, so this should go away once the mr-generated-classpath stuff is gone
getInitialClasspath
{ "repo_name": "moreus/hadoop", "path": "hadoop-0.23.10/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TaskAttemptImpl.java", "license": "apache-2.0", "size": 73665 }
[ "java.io.IOException", "java.util.HashMap", "java.util.Map", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.mapreduce.v2.util.MRApps", "org.apache.hadoop.yarn.api.ApplicationConstants" ]
import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.v2.util.MRApps; import org.apache.hadoop.yarn.api.ApplicationConstants;
import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.mapreduce.v2.util.*; import org.apache.hadoop.yarn.api.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,746,723
void postMerge(final ObserverContext<RegionServerCoprocessorEnvironment> c, final HRegion regionA, final HRegion regionB, final HRegion mergedRegion) throws IOException;
void postMerge(final ObserverContext<RegionServerCoprocessorEnvironment> c, final HRegion regionA, final HRegion regionB, final HRegion mergedRegion) throws IOException;
/** * called after the regions merge. * @param c * @param regionA * @param regionB * @param mergedRegion * @throws IOException */
called after the regions merge
postMerge
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionServerObserver.java", "license": "apache-2.0", "size": 4630 }
[ "java.io.IOException", "org.apache.hadoop.hbase.regionserver.HRegion" ]
import java.io.IOException; import org.apache.hadoop.hbase.regionserver.HRegion;
import java.io.*; import org.apache.hadoop.hbase.regionserver.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,797,059
public static byte[] getCharList(MapleClient c, int serverId, int status) { final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(); mplew.writeShort(SendOpcode.CHARLIST.getValue()); mplew.write(status); List<MapleCharacter>...
static byte[] function(MapleClient c, int serverId, int status) { final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(); mplew.writeShort(SendOpcode.CHARLIST.getValue()); mplew.write(status); List<MapleCharacter> chars = c.loadCharacters(serverId); mplew.write((byte) chars.size()); for (MapleC...
/** * Gets a packet with a list of characters. * * @param c The MapleClient to load characters of. * @param serverId The ID of the server requested. * @param status The charlist request result. * @return The character list packet. * * Possible val...
Gets a packet with a list of characters
getCharList
{ "repo_name": "ronancpl/MapleSolaxiaV2", "path": "src/tools/MaplePacketCreator.java", "license": "agpl-3.0", "size": 404136 }
[ "java.util.List", "net.opcodes.SendOpcode", "tools.data.output.MaplePacketLittleEndianWriter" ]
import java.util.List; import net.opcodes.SendOpcode; import tools.data.output.MaplePacketLittleEndianWriter;
import java.util.*; import net.opcodes.*; import tools.data.output.*;
[ "java.util", "net.opcodes", "tools.data.output" ]
java.util; net.opcodes; tools.data.output;
2,473,017
@Test public void testGetResourceWithTCCL() throws Exception { System.out.println("\nStarting ClassPathLoaderTest#testGetResourceWithTCCL"); ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false); String resourceToGet = "com/nowhere/testGetResourceWithTCCL.rsc"; assertNull(dcl.getResource...
void function() throws Exception { System.out.println(STR); ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false); String resourceToGet = STR; assertNull(dcl.getResource(resourceToGet)); ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(new Gen...
/** * Verifies that <tt>getResource</tt> works with TCCL from {@link ClassPathLoader}. */
Verifies that getResource works with TCCL from <code>ClassPathLoader</code>
testGetResourceWithTCCL
{ "repo_name": "pivotal-amurmann/geode", "path": "geode-core/src/test/java/org/apache/geode/internal/ClassPathLoaderIntegrationTest.java", "license": "apache-2.0", "size": 28828 }
[ "java.io.BufferedInputStream", "java.io.InputStream", "org.junit.Assert" ]
import java.io.BufferedInputStream; import java.io.InputStream; import org.junit.Assert;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
823,295
@Override public int getBurnTime(ItemStack fuel) { if (fuel.getItem() == ModItems.itemCoke) { return 1800; } else if (fuel.getItem() == Item.getItemFromBlock(ModBlocks.blockCoke)) { return getBurnTime(new ItemStack(ModItems.itemCoke)) * 9; } else { return 0; } }
int function(ItemStack fuel) { if (fuel.getItem() == ModItems.itemCoke) { return 1800; } else if (fuel.getItem() == Item.getItemFromBlock(ModBlocks.blockCoke)) { return getBurnTime(new ItemStack(ModItems.itemCoke)) * 9; } else { return 0; } }
/** * Takes an item and returns it's burn time (in game ticks). * * @param fuel The item to check. * @return Burntime The amount of ticks the given fuel will burn for. */
Takes an item and returns it's burn time (in game ticks)
getBurnTime
{ "repo_name": "Hanse00/CrafTech-old", "path": "src/main/java/dk/philiphansen/craftech/handler/FuelHandler.java", "license": "gpl-3.0", "size": 1992 }
[ "dk.philiphansen.craftech.block.ModBlocks", "dk.philiphansen.craftech.item.ModItems", "net.minecraft.item.Item", "net.minecraft.item.ItemStack" ]
import dk.philiphansen.craftech.block.ModBlocks; import dk.philiphansen.craftech.item.ModItems; import net.minecraft.item.Item; import net.minecraft.item.ItemStack;
import dk.philiphansen.craftech.block.*; import dk.philiphansen.craftech.item.*; import net.minecraft.item.*;
[ "dk.philiphansen.craftech", "net.minecraft.item" ]
dk.philiphansen.craftech; net.minecraft.item;
1,860,034
private ApplicationKeyDTO getApplicationKeyByAppIDAndKeyType(String applicationId, String keyType) { Set<APIKey> applicationKeys = getApplicationKeys(applicationId); if (applicationKeys != null) { for (APIKey apiKey : applicationKeys) { if (keyType != null && keyType.equa...
ApplicationKeyDTO function(String applicationId, String keyType) { Set<APIKey> applicationKeys = getApplicationKeys(applicationId); if (applicationKeys != null) { for (APIKey apiKey : applicationKeys) { if (keyType != null && keyType.equals(apiKey.getType()) && APIConstants.KeyManager.DEFAULT_KEY_MANAGER.equals(apiKey....
/** * Returns Keys of an application by key type * * @param applicationId Application Id * @param keyType Key Type (Production | Sandbox) * @return Application Key Information */
Returns Keys of an application by key type
getApplicationKeyByAppIDAndKeyType
{ "repo_name": "isharac/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/impl/ApplicationsApiServiceImpl.java", "license": "apache-2.0", "size": 74036 }
[ "java.util.Set", "org.wso2.carbon.apimgt.api.model.APIKey", "org.wso2.carbon.apimgt.impl.APIConstants", "org.wso2.carbon.apimgt.rest.api.store.v1.dto.ApplicationKeyDTO", "org.wso2.carbon.apimgt.rest.api.store.v1.mappings.ApplicationKeyMappingUtil" ]
import java.util.Set; import org.wso2.carbon.apimgt.api.model.APIKey; import org.wso2.carbon.apimgt.impl.APIConstants; import org.wso2.carbon.apimgt.rest.api.store.v1.dto.ApplicationKeyDTO; import org.wso2.carbon.apimgt.rest.api.store.v1.mappings.ApplicationKeyMappingUtil;
import java.util.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.rest.api.store.v1.dto.*; import org.wso2.carbon.apimgt.rest.api.store.v1.mappings.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
2,490,052
Object executeQuery(WSDLQuery aQuery) throws WSDLException, IOException;
Object executeQuery(WSDLQuery aQuery) throws WSDLException, IOException;
/** * Executes a query against this web service. * * @param aQuery * @return An object representing the response of the service to aQuery * @throws WSDLException * @throws IOException */
Executes a query against this web service
executeQuery
{ "repo_name": "RPI-UPE/rocs", "path": "src/main/java/edu/rpi/rocs/WSDLQueryEngine.java", "license": "bsd-2-clause", "size": 1602 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
764,699
RemoteOperationResult result = null; LocalMoveMethod move = null; boolean noInvalidChars = FileUtils.isValidPath(mNewRemotePath); if (noInvalidChars) { try { if (mNewName.equals(mOldName)) { return new RemoteOperationResult(ResultCod...
RemoteOperationResult result = null; LocalMoveMethod move = null; boolean noInvalidChars = FileUtils.isValidPath(mNewRemotePath); if (noInvalidChars) { try { if (mNewName.equals(mOldName)) { return new RemoteOperationResult(ResultCode.OK); } if (client.existsFile(mNewRemotePath)) { return new RemoteOperationResult(Resu...
/** * Performs the rename operation. * * @param client Client object to communicate with the remote ownCloud server. */
Performs the rename operation
run
{ "repo_name": "cloudcopy/owncloud-android-library", "path": "src/com/owncloud/android/lib/resources/files/RenameRemoteFileOperation.java", "license": "mit", "size": 5537 }
[ "com.owncloud.android.lib.common.network.WebdavUtils", "com.owncloud.android.lib.common.operations.RemoteOperationResult", "org.apache.jackrabbit.webdav.client.methods.DavMethodBase" ]
import com.owncloud.android.lib.common.network.WebdavUtils; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import org.apache.jackrabbit.webdav.client.methods.DavMethodBase;
import com.owncloud.android.lib.common.network.*; import com.owncloud.android.lib.common.operations.*; import org.apache.jackrabbit.webdav.client.methods.*;
[ "com.owncloud.android", "org.apache.jackrabbit" ]
com.owncloud.android; org.apache.jackrabbit;
1,966,756
public static long parseLong(@Nullable String string, long defaultVal) { if (string == null) return defaultVal; try { return Long.parseLong(string); } catch (NumberFormatException e) { return defaultVal; } }
static long function(@Nullable String string, long defaultVal) { if (string == null) return defaultVal; try { return Long.parseLong(string); } catch (NumberFormatException e) { return defaultVal; } }
/** * Parse a long value from a string and return a default value if parsing fails. * * @param string The string to parse. * @param defaultVal The default value to return if parsing fails. */
Parse a long value from a string and return a default value if parsing fails
parseLong
{ "repo_name": "JCThePants/NucleusFramework", "path": "src/com/jcwhatever/nucleus/utils/text/TextUtils.java", "license": "mit", "size": 44562 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
553,555
//using try-with-resources to avoid closing resources (boiler plate code) try (Connection con = SQLConnection.getConnection(); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SELECT customer_id FROM customer WHERE " + "customer_id...
try (Connection con = SQLConnection.getConnection(); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(STR + STR + id)) { while(rs.next()) { Customer customer = new Customer(rs.getInt(STR)); return customer; } } catch (SQLException e) { Logger.getLogger(Reserve.class.getName()).log(Level.SEVERE, ...
/** * Search for a customer by his ID and return customer object * @param id * @return Customer object is customer exists else null */
Search for a customer by his ID and return customer object
searchForCustomerByID
{ "repo_name": "shilpasequeira/SuperRent", "path": "SuperRent-master/SuperRent-master/src/ca/ubc/icics/mss/superrent/clerk/customer/CustomerRepository.java", "license": "gpl-2.0", "size": 2443 }
[ "ca.ubc.icics.mss.superrent.clerk.rentreserve.Reserve", "ca.ubc.icics.mss.superrent.database.SQLConnection", "java.sql.Connection", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement", "java.util.logging.Level", "java.util.logging.Logger" ]
import ca.ubc.icics.mss.superrent.clerk.rentreserve.Reserve; import ca.ubc.icics.mss.superrent.database.SQLConnection; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.logging.Level; import java.util.logging.Logger;
import ca.ubc.icics.mss.superrent.clerk.rentreserve.*; import ca.ubc.icics.mss.superrent.database.*; import java.sql.*; import java.util.logging.*;
[ "ca.ubc.icics", "java.sql", "java.util" ]
ca.ubc.icics; java.sql; java.util;
2,313,344
public SearchRequestBuilder setTimeout(TimeValue timeout) { sourceBuilder().timeout(timeout); return this; }
SearchRequestBuilder function(TimeValue timeout) { sourceBuilder().timeout(timeout); return this; }
/** * An optional timeout to control how long search is allowed to take. */
An optional timeout to control how long search is allowed to take
setTimeout
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java", "license": "apache-2.0", "size": 19687 }
[ "org.elasticsearch.common.unit.TimeValue" ]
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,689,777
public int getDisplayX() { DisplayMetrics dm = new DisplayMetrics(); ((WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay() .getMetrics(dm); return dm.widthPixels; }
int function() { DisplayMetrics dm = new DisplayMetrics(); ((WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay() .getMetrics(dm); return dm.widthPixels; }
/** * get the pixels of screens's width * * @return the pixels of screens's width */
get the pixels of screens's width
getDisplayX
{ "repo_name": "BaiduQA/Cafe", "path": "testservice/src/com/baidu/cafe/remote/SystemLib.java", "license": "apache-2.0", "size": 87756 }
[ "android.content.Context", "android.util.DisplayMetrics", "android.view.WindowManager" ]
import android.content.Context; import android.util.DisplayMetrics; import android.view.WindowManager;
import android.content.*; import android.util.*; import android.view.*;
[ "android.content", "android.util", "android.view" ]
android.content; android.util; android.view;
2,232,043
EClass getResourceAssignmentExpression();
EClass getResourceAssignmentExpression();
/** * Returns the meta object for class '{@link org.eclipse.bpmn2.ResourceAssignmentExpression <em>Resource Assignment Expression</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Resource Assignment Expression</em>'. * @see org.eclipse.bpmn2.ResourceAssignment...
Returns the meta object for class '<code>org.eclipse.bpmn2.ResourceAssignmentExpression Resource Assignment Expression</code>'.
getResourceAssignmentExpression
{ "repo_name": "Rikkola/kie-wb-common", "path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 929298 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,124,452
public static void write(File file, String text, String charset) throws IOException { BufferedWriter writer = null; try { writer = newWriter(file, charset); writer.write(text); writer.flush(); Writer temp = writer; writer = null; ...
static void function(File file, String text, String charset) throws IOException { BufferedWriter writer = null; try { writer = newWriter(file, charset); writer.write(text); writer.flush(); Writer temp = writer; writer = null; temp.close(); } finally { closeWithWarning(writer); } }
/** * Write the text to the File, using the specified encoding. * * @param file a File * @param text the text to write to the File * @param charset the charset used * @throws IOException if an IOException occurs. * @since 1.0 */
Write the text to the File, using the specified encoding
write
{ "repo_name": "mv2a/yajsw", "path": "src/groovy-patch/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "apache-2.0", "size": 704164 }
[ "java.io.BufferedWriter", "java.io.File", "java.io.IOException", "java.io.Writer" ]
import java.io.BufferedWriter; import java.io.File; import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
1,565,822
private void createPointFromJtsGeometry(final Point jtsPoint, final PointType xbPoint) throws OwsExceptionReport { final DirectPositionType xbPos = xbPoint.addNewPos(); xbPos.setSrsName(getSrsName(jtsPoint)); xbPos.setStringValue(JTSHelper.getCoordinatesString(jtsPoint)); }
void function(final Point jtsPoint, final PointType xbPoint) throws OwsExceptionReport { final DirectPositionType xbPos = xbPoint.addNewPos(); xbPos.setSrsName(getSrsName(jtsPoint)); xbPos.setStringValue(JTSHelper.getCoordinatesString(jtsPoint)); }
/** * Creates a XML Point from a SOS Point. * * @param jtsPoint * SOS Point * @param xbPoint * XML Point */
Creates a XML Point from a SOS Point
createPointFromJtsGeometry
{ "repo_name": "sauloperez/sos", "path": "src/coding/sos-v20/src/main/java/org/n52/sos/encode/GmlEncoderv321.java", "license": "apache-2.0", "size": 30446 }
[ "com.vividsolutions.jts.geom.Point", "net.opengis.gml.x32.DirectPositionType", "net.opengis.gml.x32.PointType", "org.n52.sos.ogc.ows.OwsExceptionReport", "org.n52.sos.util.JTSHelper" ]
import com.vividsolutions.jts.geom.Point; import net.opengis.gml.x32.DirectPositionType; import net.opengis.gml.x32.PointType; import org.n52.sos.ogc.ows.OwsExceptionReport; import org.n52.sos.util.JTSHelper;
import com.vividsolutions.jts.geom.*; import net.opengis.gml.x32.*; import org.n52.sos.ogc.ows.*; import org.n52.sos.util.*;
[ "com.vividsolutions.jts", "net.opengis.gml", "org.n52.sos" ]
com.vividsolutions.jts; net.opengis.gml; org.n52.sos;
2,865,250
@Override public void show() { Texture texture; float width = Gdx.graphics.getWidth(); float height = Gdx.graphics.getHeight(); camera = new OrthographicCamera(1, height / width); batch = new SpriteBatch(); texture = new Texture(Gdx.files.internal("data/splash....
void function() { Texture texture; float width = Gdx.graphics.getWidth(); float height = Gdx.graphics.getHeight(); camera = new OrthographicCamera(1, height / width); batch = new SpriteBatch(); texture = new Texture(Gdx.files.internal(STR)); texture.setFilter(TextureFilter.Linear, TextureFilter.Linear); TextureRegion r...
/** * Initializes this splash screen */
Initializes this splash screen
show
{ "repo_name": "OlliV/angr", "path": "workspace/Angr/src/fi/hbp/angr/screens/SplashScreen.java", "license": "gpl-2.0", "size": 3315 }
[ "com.badlogic.gdx.Gdx", "com.badlogic.gdx.graphics.OrthographicCamera", "com.badlogic.gdx.graphics.Texture", "com.badlogic.gdx.graphics.g2d.Sprite", "com.badlogic.gdx.graphics.g2d.SpriteBatch", "com.badlogic.gdx.graphics.g2d.TextureRegion" ]
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.*; import com.badlogic.gdx.graphics.*; import com.badlogic.gdx.graphics.g2d.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
1,573,765
byte[] sendDeliverSmResp(OutputStream os, int commandStatus, int sequenceNumber, String messageId) throws IOException;
byte[] sendDeliverSmResp(OutputStream os, int commandStatus, int sequenceNumber, String messageId) throws IOException;
/** * Send the deliver short message response. * * @param os is the {@link OutputStream}. * @param sequenceNumber is the sequence_number. * @return the composed bytes. * @throws IOException if there is an IO error occur. */
Send the deliver short message response
sendDeliverSmResp
{ "repo_name": "amdtelecom/jsmpp", "path": "jsmpp/src/main/java/org/jsmpp/PDUSender.java", "license": "apache-2.0", "size": 16559 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
488,739
@Test public void testOrderMembersDescWithNullLast() throws Exception { Arrays.sort( accountParentIds, Collections.reverseOrder( new StringWithNullComparator( false ) ) ); testOrderQuery( false, true ); } private class StringWithNullComparator implements Comparator<String> { private boolea...
void function() throws Exception { Arrays.sort( accountParentIds, Collections.reverseOrder( new StringWithNullComparator( false ) ) ); testOrderQuery( false, true ); } private class StringWithNullComparator implements Comparator<String> { private boolean isNullFirst = true; public StringWithNullComparator() { } public ...
/** * Verifies order query by descending with null values at last */
Verifies order query by descending with null values at last
testOrderMembersDescWithNullLast
{ "repo_name": "pentaho/mondrian-tck", "path": "src/test/java/org/pentaho/mondrian/tck/NullValuesTest.java", "license": "apache-2.0", "size": 7726 }
[ "java.util.Arrays", "java.util.Collections", "java.util.Comparator" ]
import java.util.Arrays; import java.util.Collections; import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
1,729,958
private Map createToolParams(CmsWorkplace wp, String url, Map params) { Map newParams = new HashMap(); // add query parameters to the parameter map if required if (url.indexOf("?") > 0) { String query = url.substring(url.indexOf("?")); Map reqParameters = CmsRe...
Map function(CmsWorkplace wp, String url, Map params) { Map newParams = new HashMap(); if (url.indexOf("?") > 0) { String query = url.substring(url.indexOf("?")); Map reqParameters = CmsRequestUtil.createParameterMap(query); newParams.putAll(reqParameters); } if (params != null) { newParams.putAll(params); } if (!newPa...
/** * Creates a parameter map from the given url and additional parameters.<p> * * @param wp the workplace context * @param url the url to create the parameter map for (extracting query params) * @param params additional parameter map * * @return the new parameter map *...
Creates a parameter map from the given url and additional parameters
createToolParams
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/workplace/tools/CmsToolManager.java", "license": "lgpl-2.1", "size": 31376 }
[ "java.util.HashMap", "java.util.Map", "org.opencms.util.CmsRequestUtil", "org.opencms.workplace.CmsDialog", "org.opencms.workplace.CmsWorkplace" ]
import java.util.HashMap; import java.util.Map; import org.opencms.util.CmsRequestUtil; import org.opencms.workplace.CmsDialog; import org.opencms.workplace.CmsWorkplace;
import java.util.*; import org.opencms.util.*; import org.opencms.workplace.*;
[ "java.util", "org.opencms.util", "org.opencms.workplace" ]
java.util; org.opencms.util; org.opencms.workplace;
1,337,011
try { return PublicEncryptionFactory.encryptString(text); } catch (Exception e) { return null; } }
try { return PublicEncryptionFactory.encryptString(text); } catch (Exception e) { return null; } }
/** * Encrypt a text * @param text parameter with the text to be encrypted * @return String with the encrypted text * @see java.lang.String */
Encrypt a text
crypt
{ "repo_name": "zhiqinghuang/core", "path": "src/com/dotmarketing/viewtools/CryptWebAPI.java", "license": "gpl-3.0", "size": 978 }
[ "com.dotmarketing.cms.factories.PublicEncryptionFactory" ]
import com.dotmarketing.cms.factories.PublicEncryptionFactory;
import com.dotmarketing.cms.factories.*;
[ "com.dotmarketing.cms" ]
com.dotmarketing.cms;
2,574,382
@Test public void testMessageRedelivery() throws Exception { final String topicName = "persistent://prop/ns-abc/topic2"; final String subName = "sub2"; Message<String> msg; int totalMessages = 10; Consumer<String> consumer = pulsarClient.newConsumer(Schema.STRING) ...
void function() throws Exception { final String topicName = STRsub2STRmy-message-STRmsg should be redelivered ", e); } msg = consumer.receive(100, TimeUnit.MILLISECONDS); assertNull(msg); consumer.close(); producer.close(); }
/** * Verify: Broker should not replay already acknowledged messages again and should clear them from messageReplay * bucket * * 1. produce messages 2. consume messages and ack all except 1 msg 3. Verification: should replay only 1 unacked * message */
Verify: Broker should not replay already acknowledged messages again and should clear them from messageReplay bucket 1. produce messages 2. consume messages and ack all except 1 msg 3. Verification: should replay only 1 unacked message
testMessageRedelivery
{ "repo_name": "nkurihar/pulsar", "path": "pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentTopicE2ETest.java", "license": "apache-2.0", "size": 55795 }
[ "java.util.concurrent.TimeUnit", "org.testng.Assert" ]
import java.util.concurrent.TimeUnit; import org.testng.Assert;
import java.util.concurrent.*; import org.testng.*;
[ "java.util", "org.testng" ]
java.util; org.testng;
1,096,250
private Digester createDigester() throws ParserConfigurationException { Digester digester = new Digester(); digester.setValidating(false); digester.setClassLoader(CheckStyleRules.class.getClassLoader()); String section = "*/section"; digester.addObjectCreate(section, R...
Digester function() throws ParserConfigurationException { Digester digester = new Digester(); digester.setValidating(false); digester.setClassLoader(CheckStyleRules.class.getClassLoader()); String section = STR; digester.addObjectCreate(section, Rule.class); digester.addSetProperties(section); digester.addSetNext(secti...
/** * Creates a new digester. * * @return the new digester. * @throws ParserConfigurationException * if digester is not configured properly */
Creates a new digester
createDigester
{ "repo_name": "jenkinsci/jshint-checkstyle-plugin", "path": "src/main/java/hudson/plugins/jshint/rules/CheckStyleRules.java", "license": "mit", "size": 4580 }
[ "javax.xml.parsers.ParserConfigurationException", "org.apache.commons.digester.Digester" ]
import javax.xml.parsers.ParserConfigurationException; import org.apache.commons.digester.Digester;
import javax.xml.parsers.*; import org.apache.commons.digester.*;
[ "javax.xml", "org.apache.commons" ]
javax.xml; org.apache.commons;
1,259,277
public void testToString008() { try { ContentModel cm2 = new ContentModel(); cm = new ContentModel(Integer.MIN_VALUE, cm2); cm.toString(); fail("Should raise NullPointerException"); } catch (NullPointerException e) { // Expected ...
void function() { try { ContentModel cm2 = new ContentModel(); cm = new ContentModel(Integer.MIN_VALUE, cm2); cm.toString(); fail(STR); } catch (NullPointerException e) { } }
/** * Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.toString()' * Parameters type=Integer.MIN_VALUE, ContentModel() Should throw * NullPointerException */
Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.toString()' Parameters type=Integer.MIN_VALUE, ContentModel() Should throw NullPointerException
testToString008
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/swing/src/test/api/java.injected/org/apache/harmony/swing/tests/javax/swing/text/parser/ContentModelCompatilityTest.java", "license": "gpl-2.0", "size": 153261 }
[ "javax.swing.text.html.parser.ContentModel" ]
import javax.swing.text.html.parser.ContentModel;
import javax.swing.text.html.parser.*;
[ "javax.swing" ]
javax.swing;
2,387,054
@RobotKeyword @ArgumentNames({ "locator" }) public int getVerticalPosition(String locator) { List<WebElement> elements = elementFind(locator, true, false); if (elements.size() == 0) { throw new Selenium2LibraryNonFatalException( String.format("Could not determine position for '%s'.", locator)); } ...
@ArgumentNames({ STR }) int function(String locator) { List<WebElement> elements = elementFind(locator, true, false); if (elements.size() == 0) { throw new Selenium2LibraryNonFatalException( String.format(STR, locator)); } return elements.get(0).getLocation().getY(); }
/** * Returns vertical position of element identified by <b>locator</b>.<br> * <br> * The position is returned in pixels off the top of the page, as an * integer. Fails if the matching element is not found.<br> * <br> * Key attributes for arbitrary elements are id and name. See `Introduction` * for detail...
Returns vertical position of element identified by locator. The position is returned in pixels off the top of the page, as an integer. Fails if the matching element is not found. Key attributes for arbitrary elements are id and name. See `Introduction` for details about locators
getVerticalPosition
{ "repo_name": "MarkusBernhardt/robotframework-selenium2library-java", "path": "src/main/java/com/github/markusbernhardt/selenium2library/keywords/Element.java", "license": "apache-2.0", "size": 56233 }
[ "com.github.markusbernhardt.selenium2library.Selenium2LibraryNonFatalException", "java.util.List", "org.openqa.selenium.WebElement", "org.robotframework.javalib.annotation.ArgumentNames" ]
import com.github.markusbernhardt.selenium2library.Selenium2LibraryNonFatalException; import java.util.List; import org.openqa.selenium.WebElement; import org.robotframework.javalib.annotation.ArgumentNames;
import com.github.markusbernhardt.selenium2library.*; import java.util.*; import org.openqa.selenium.*; import org.robotframework.javalib.annotation.*;
[ "com.github.markusbernhardt", "java.util", "org.openqa.selenium", "org.robotframework.javalib" ]
com.github.markusbernhardt; java.util; org.openqa.selenium; org.robotframework.javalib;
546,068
private void performMethod(Method method) { if (method.isAnnotationPresent(PerformanceTest.class)) { PerformanceTest test = method.getAnnotation(PerformanceTest.class); String name = test.name(); boolean customTimer = test.customTimer(); Type type = method.get...
void function(Method method) { if (method.isAnnotationPresent(PerformanceTest.class)) { PerformanceTest test = method.getAnnotation(PerformanceTest.class); String name = test.name(); boolean customTimer = test.customTimer(); Type type = method.getReturnType(); if (!results.containsKey(name)) { results.put(name, new Arr...
/** * This function perform the method and print the return value for debugging. */
This function perform the method and print the return value for debugging
performMethod
{ "repo_name": "guzman890/EpisMates", "path": "src/client/java/teammates/client/scripts/PerformanceProfiler.java", "license": "gpl-2.0", "size": 22901 }
[ "java.lang.reflect.Method", "java.lang.reflect.Type", "java.util.ArrayList" ]
import java.lang.reflect.Method; import java.lang.reflect.Type; import java.util.ArrayList;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,189,527
RelNode getRoot(); /** * Registers a rel trait definition. If the {@link RelTraitDef} has already * been registered, does nothing. * * @return whether the RelTraitDef was added, as per * {@link java.util.Collection#add}
RelNode getRoot(); /** * Registers a rel trait definition. If the {@link RelTraitDef} has already * been registered, does nothing. * * @return whether the RelTraitDef was added, as per * {@link java.util.Collection#add}
/** * Returns the root node of this query. * * @return Root node */
Returns the root node of this query
getRoot
{ "repo_name": "xhoong/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/plan/RelOptPlanner.java", "license": "apache-2.0", "size": 11477 }
[ "org.apache.calcite.rel.RelNode" ]
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.*;
[ "org.apache.calcite" ]
org.apache.calcite;
2,463,228
public static void putResolvedMultifactorAuthenticationProviders(final RequestContext context, final Collection<MultifactorAuthenticationProvider> value) { context.getConversationScope().put("resolvedMultifactorAuthenticationProviders", va...
static void function(final RequestContext context, final Collection<MultifactorAuthenticationProvider> value) { context.getConversationScope().put(STR, value); }
/** * Put resolved multifactor authentication providers into scope. * * @param context the context * @param value the value */
Put resolved multifactor authentication providers into scope
putResolvedMultifactorAuthenticationProviders
{ "repo_name": "doodelicious/cas", "path": "core/cas-server-core-web/src/main/java/org/apereo/cas/web/support/WebUtils.java", "license": "apache-2.0", "size": 32168 }
[ "java.util.Collection", "org.apereo.cas.services.MultifactorAuthenticationProvider", "org.springframework.webflow.execution.RequestContext" ]
import java.util.Collection; import org.apereo.cas.services.MultifactorAuthenticationProvider; import org.springframework.webflow.execution.RequestContext;
import java.util.*; import org.apereo.cas.services.*; import org.springframework.webflow.execution.*;
[ "java.util", "org.apereo.cas", "org.springframework.webflow" ]
java.util; org.apereo.cas; org.springframework.webflow;
368,314
public ViewerFilter createViewerFilter() { if (!isCustomFilter()) return null;
ViewerFilter function() { if (!isCustomFilter()) return null;
/** * Creates a new <code>ViewerFilter</code>. * This method is only valid for viewer filters. * @return a new <code>ViewerFilter</code> */
Creates a new <code>ViewerFilter</code>. This method is only valid for viewer filters
createViewerFilter
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/filters/FilterDescriptor.java", "license": "epl-1.0", "size": 9298 }
[ "org.eclipse.jface.viewers.ViewerFilter" ]
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,290,222
void addMessage(IotHubServiceboundMessage msg, IotHubEventCallback callback, Object callbackContext);
void addMessage(IotHubServiceboundMessage msg, IotHubEventCallback callback, Object callbackContext);
/** * Adds a message to the transport queue. * * @param msg the message to be sent. * @param callback the callback to be invoked when a response for the * message is received. * @param callbackContext the context to be passed in when the callback is * invoked. */
Adds a message to the transport queue
addMessage
{ "repo_name": "fsautomata/azure-iot-sdks", "path": "java/device/iothub-java-client/src/main/java/com/microsoft/azure/iothub/transport/IotHubTransport.java", "license": "mit", "size": 2577 }
[ "com.microsoft.azure.iothub.IotHubEventCallback", "com.microsoft.azure.iothub.IotHubServiceboundMessage" ]
import com.microsoft.azure.iothub.IotHubEventCallback; import com.microsoft.azure.iothub.IotHubServiceboundMessage;
import com.microsoft.azure.iothub.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,290,162
@Nonnull public CalendarPermissionRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { return new com.microsoft.graph.requests.CalendarPermissionRequest(getRequestUrl(), getClient(), requestOptions); }
CalendarPermissionRequest function(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { return new com.microsoft.graph.requests.CalendarPermissionRequest(getRequestUrl(), getClient(), requestOptions); }
/** * Creates the request with specific requestOptions instead of the existing requestOptions * * @param requestOptions the options for this request * @return the CalendarPermissionRequest instance */
Creates the request with specific requestOptions instead of the existing requestOptions
buildRequest
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/CalendarPermissionRequestBuilder.java", "license": "mit", "size": 2400 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,411,327
public static int getOverlaySubstratumVersion(Context context, String packageName) { try { ApplicationInfo appInfo = context.getPackageManager().getApplicationInfo( packageName, PackageManager.GET_META_DATA); if (a...
static int function(Context context, String packageName) { try { ApplicationInfo appInfo = context.getPackageManager().getApplicationInfo( packageName, PackageManager.GET_META_DATA); if (appInfo.metaData != null) { return appInfo.metaData.getInt(metadataThemeVersion); } } catch (Exception ignored) { } return 0; }
/** * Grab a specific overlay's substratum compiler version * * @param context Context * @param packageName Package name of the desired app to be checked * @return Returns the version of the substratum compiler */
Grab a specific overlay's substratum compiler version
getOverlaySubstratumVersion
{ "repo_name": "iskandar1023/substratum", "path": "app/src/main/java/projekt/substratum/common/Packages.java", "license": "gpl-3.0", "size": 35407 }
[ "android.content.Context", "android.content.pm.ApplicationInfo", "android.content.pm.PackageManager" ]
import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager;
import android.content.*; import android.content.pm.*;
[ "android.content" ]
android.content;
1,195,845
@POST @Path("{organizationId}/apis/{apiId}/versions/{version}/policies") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public PolicyBean createApiPolicy(@PathParam("organizationId") String organizationId, @PathParam("apiId") String apiId, @PathParam("ve...
@Path(STR) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) PolicyBean function(@PathParam(STR) String organizationId, @PathParam("apiId") String apiId, @PathParam(STR) String version, NewPolicyBean bean) throws OrganizationNotFoundException, ApiVersionNotFoundException, NotAuthorizedExceptio...
/** * Use this endpoint to add a new Policy to the API version. * @summary Add API Policy * @param organizationId The Organization ID. * @param apiId The API ID. * @param version The API version. * @param bean Information about the new Policy. * @statuscode 200 If the Policy is...
Use this endpoint to add a new Policy to the API version
createApiPolicy
{ "repo_name": "jasonchaffee/apiman", "path": "manager/api/rest/src/main/java/io/apiman/manager/api/rest/contract/IOrganizationResource.java", "license": "apache-2.0", "size": 109599 }
[ "io.apiman.manager.api.beans.policies.NewPolicyBean", "io.apiman.manager.api.beans.policies.PolicyBean", "io.apiman.manager.api.rest.contract.exceptions.ApiVersionNotFoundException", "io.apiman.manager.api.rest.contract.exceptions.NotAuthorizedException", "io.apiman.manager.api.rest.contract.exceptions.Orga...
import io.apiman.manager.api.beans.policies.NewPolicyBean; import io.apiman.manager.api.beans.policies.PolicyBean; import io.apiman.manager.api.rest.contract.exceptions.ApiVersionNotFoundException; import io.apiman.manager.api.rest.contract.exceptions.NotAuthorizedException; import io.apiman.manager.api.rest.contract.e...
import io.apiman.manager.api.beans.policies.*; import io.apiman.manager.api.rest.contract.exceptions.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "io.apiman.manager", "javax.ws" ]
io.apiman.manager; javax.ws;
483,395
private void checkNotificationPrivacySetting() { final PushManager pushManager = Matrix.getInstance(VectorHomeActivity.this).getPushManager(); if (pushManager.useFcm()) { if (!PreferencesManager.didMigrateToNotificationRework(this)) { PreferencesManager.setDidMigrateTo...
void function() { final PushManager pushManager = Matrix.getInstance(VectorHomeActivity.this).getPushManager(); if (pushManager.useFcm()) { if (!PreferencesManager.didMigrateToNotificationRework(this)) { PreferencesManager.setDidMigrateToNotificationRework(this); boolean backgroundSyncAllowed = pushManager.isBackground...
/** * Ask the user to choose a notification privacy policy. */
Ask the user to choose a notification privacy policy
checkNotificationPrivacySetting
{ "repo_name": "vector-im/vector-android", "path": "vector/src/main/java/im/vector/activity/VectorHomeActivity.java", "license": "apache-2.0", "size": 99340 }
[ "android.os.Build", "im.vector.Matrix", "im.vector.push.PushManager", "im.vector.util.PreferencesManager" ]
import android.os.Build; import im.vector.Matrix; import im.vector.push.PushManager; import im.vector.util.PreferencesManager;
import android.os.*; import im.vector.*; import im.vector.push.*; import im.vector.util.*;
[ "android.os", "im.vector", "im.vector.push", "im.vector.util" ]
android.os; im.vector; im.vector.push; im.vector.util;
772,383
@Test() public void testFailInFirstPostAuth() throws Exception { final InMemoryDirectoryServer ds = getTestDS(); final SingleServerSet serverSet = new SingleServerSet("127.0.0.1", ds.getListenPort()); final LDAPConnectionPool pool = new LDAPConnectionPool(serverSet, null, ...
@Test() void function() throws Exception { final InMemoryDirectoryServer ds = getTestDS(); final SingleServerSet serverSet = new SingleServerSet(STR, ds.getListenPort()); final LDAPConnectionPool pool = new LDAPConnectionPool(serverSet, null, 0, 1, new AggregatePostConnectProcessor( new TestPostConnectProcessor(null, n...
/** * Tests the behavior of the aggregate post-connect processor that wraps * several post-connect processors in which the first should fail in * post-authentication processing. * * @throws Exception If an unexpected problem occurs. */
Tests the behavior of the aggregate post-connect processor that wraps several post-connect processors in which the first should fail in post-authentication processing
testFailInFirstPostAuth
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/AggregatePostConnectProcessorTestCase.java", "license": "gpl-2.0", "size": 10444 }
[ "com.unboundid.ldap.listener.InMemoryDirectoryServer", "org.testng.annotations.Test" ]
import com.unboundid.ldap.listener.InMemoryDirectoryServer; import org.testng.annotations.Test;
import com.unboundid.ldap.listener.*; import org.testng.annotations.*;
[ "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.ldap; org.testng.annotations;
1,483,410
public void addFrameListener(MenuFrameListener l) { super.addElementListener(l); }
void function(MenuFrameListener l) { super.addElementListener(l); }
/** * Adds a new listener * * @param l the new listener */
Adds a new listener
addFrameListener
{ "repo_name": "Mikescher/absGDX", "path": "absGDX-framework/src/de/samdev/absgdx/framework/menu/elements/MenuFrame.java", "license": "mit", "size": 7051 }
[ "de.samdev.absgdx.framework.menu.events.MenuFrameListener" ]
import de.samdev.absgdx.framework.menu.events.MenuFrameListener;
import de.samdev.absgdx.framework.menu.events.*;
[ "de.samdev.absgdx" ]
de.samdev.absgdx;
2,293,849
public void setUnemployedSince(Date unemployedSince) { this.unemployedSince = unemployedSince; }
void function(Date unemployedSince) { this.unemployedSince = unemployedSince; }
/** * Missing description at method setUnemployedSince. * * @param unemployedSince the Date. */
Missing description at method setUnemployedSince
setUnemployedSince
{ "repo_name": "NABUCCO/org.nabucco.business.person", "path": "org.nabucco.business.person.facade.datatype/src/main/gen/org/nabucco/business/person/facade/datatype/Applicant.java", "license": "epl-1.0", "size": 24346 }
[ "org.nabucco.framework.base.facade.datatype.date.Date" ]
import org.nabucco.framework.base.facade.datatype.date.Date;
import org.nabucco.framework.base.facade.datatype.date.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
1,594,712
@Override protected void init(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, SiddhiAppContext siddhiAppContext) { if (attributeExpressionExecutors.length != 1) { throw new OperationNotSupportedException("Sum aggregator has to have exactl...
void function(ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader, SiddhiAppContext siddhiAppContext) { if (attributeExpressionExecutors.length != 1) { throw new OperationNotSupportedException(STR + attributeExpressionExecutors.length + STR); } Attribute.Type type = attributeExpressionExecutors...
/** * The initialization method for FunctionExecutor * * @param attributeExpressionExecutors are the executors of each attributes in the function * @param configReader this hold the {@link SumAttributeAggregator} configuration reader. * @param siddhiAppContext Siddhi...
The initialization method for FunctionExecutor
init
{ "repo_name": "slgobinath/siddhi", "path": "modules/siddhi-core/src/main/java/org/wso2/siddhi/core/query/selector/attribute/aggregator/SumAttributeAggregator.java", "license": "apache-2.0", "size": 9341 }
[ "org.wso2.siddhi.core.config.SiddhiAppContext", "org.wso2.siddhi.core.exception.OperationNotSupportedException", "org.wso2.siddhi.core.executor.ExpressionExecutor", "org.wso2.siddhi.core.util.config.ConfigReader", "org.wso2.siddhi.query.api.definition.Attribute" ]
import org.wso2.siddhi.core.config.SiddhiAppContext; import org.wso2.siddhi.core.exception.OperationNotSupportedException; import org.wso2.siddhi.core.executor.ExpressionExecutor; import org.wso2.siddhi.core.util.config.ConfigReader; import org.wso2.siddhi.query.api.definition.Attribute;
import org.wso2.siddhi.core.config.*; import org.wso2.siddhi.core.exception.*; import org.wso2.siddhi.core.executor.*; import org.wso2.siddhi.core.util.config.*; import org.wso2.siddhi.query.api.definition.*;
[ "org.wso2.siddhi" ]
org.wso2.siddhi;
1,140,424
public static List<Plant> getPlants() { return Plant.find().all(); }
static List<Plant> function() { return Plant.find().all(); }
/** * Get list of all plants in database. * @return A list of all plants in the database. */
Get list of all plants in database
getPlants
{ "repo_name": "OpenRainGarden/OpenRainGarden", "path": "app/models/PlantDB.java", "license": "mit", "size": 3235 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
686,784
private void notifyIncompatibility(String clientVersion, String serverVersion, String hostname) { UserNotifier un = registry.getUserNotifier(); String message = "The client version ("+clientVersion+") is not " + "compatible with the following server:"+hostname; if (serverVersion != n...
void function(String clientVersion, String serverVersion, String hostname) { UserNotifier un = registry.getUserNotifier(); String message = STR+clientVersion+STR + STR+hostname; if (serverVersion != null) { message += STR+serverVersion; } message += "."; un.notifyInfo(STR, message); }
/** * Notifies the user that the client and the server are not compatible. * * @param clientVersion The version of the client. * @param serverVersion The version of the server. * @param hostname The name of the server. */
Notifies the user that the client and the server are not compatible
notifyIncompatibility
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/DataServicesFactory.java", "license": "gpl-2.0", "size": 21678 }
[ "org.openmicroscopy.shoola.env.ui.UserNotifier" ]
import org.openmicroscopy.shoola.env.ui.UserNotifier;
import org.openmicroscopy.shoola.env.ui.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
471,025
ConcurrentMap<byte[], Boolean> getRegionsInTransitionInRS();
ConcurrentMap<byte[], Boolean> getRegionsInTransitionInRS();
/** * Get the regions that are currently being opened or closed in the RS * @return map of regions in transition in this RS */
Get the regions that are currently being opened or closed in the RS
getRegionsInTransitionInRS
{ "repo_name": "francisliu/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerServices.java", "license": "apache-2.0", "size": 10430 }
[ "java.util.concurrent.ConcurrentMap" ]
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,720,314
public static StorageDomain findStorageDomainForMemory(Guid storagePoolId, long sizeRequested, Map<StorageDomain, Integer> domain2reservedSpaceInDomain) { List<StorageDomain> domainsInPool = DbFacade.getInstance().getStorageDomainDao().getAllForStoragePool(storagePoolId); for (StorageDom...
static StorageDomain function(Guid storagePoolId, long sizeRequested, Map<StorageDomain, Integer> domain2reservedSpaceInDomain) { List<StorageDomain> domainsInPool = DbFacade.getInstance().getStorageDomainDao().getAllForStoragePool(storagePoolId); for (StorageDomain currDomain : domainsInPool) { long reservedSizeForDis...
/** * Returns a <code>StorageDomain</code> in the given <code>StoragePool</code> that has * at least as much as requested free space and can be used to store memory images * * @param storagePoolId * The storage pool where the search for a domain will be made * @param sizeRequeste...
Returns a <code>StorageDomain</code> in the given <code>StoragePool</code> that has at least as much as requested free space and can be used to store memory images
findStorageDomainForMemory
{ "repo_name": "halober/ovirt-engine", "path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java", "license": "apache-2.0", "size": 34157 }
[ "java.util.List", "java.util.Map", "org.ovirt.engine.core.common.businessentities.StorageDomain", "org.ovirt.engine.core.common.businessentities.StorageDomainStatus", "org.ovirt.engine.core.compat.Guid", "org.ovirt.engine.core.dal.dbbroker.DbFacade" ]
import java.util.List; import java.util.Map; import org.ovirt.engine.core.common.businessentities.StorageDomain; import org.ovirt.engine.core.common.businessentities.StorageDomainStatus; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.dal.dbbroker.DbFacade;
import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*; import org.ovirt.engine.core.dal.dbbroker.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
2,881,512
private void printURI(URI uri) throws IOException { final String uriString = uri.stringValue(); int splitIdx = 0; String namespace = null; if(namespaceTable != null) { splitIdx = uriString.indexOf(':'); if (splitIdx > 0) { String prefix = uriSt...
void function(URI uri) throws IOException { final String uriString = uri.stringValue(); int splitIdx = 0; String namespace = null; if(namespaceTable != null) { splitIdx = uriString.indexOf(':'); if (splitIdx > 0) { String prefix = uriString.substring(0, splitIdx); namespace = namespaceTable.get(prefix); } } if (namespa...
/** * Prints out a URI string, replacing the existing prefix if found. * * @param uri the URI to print. * @throws IOException */
Prints out a URI string, replacing the existing prefix if found
printURI
{ "repo_name": "venukb/any23", "path": "any23-core/src/main/java/org/deri/any23/io/nquads/NQuadsWriter.java", "license": "apache-2.0", "size": 7438 }
[ "java.io.IOException", "org.openrdf.rio.ntriples.NTriplesUtil" ]
import java.io.IOException; import org.openrdf.rio.ntriples.NTriplesUtil;
import java.io.*; import org.openrdf.rio.ntriples.*;
[ "java.io", "org.openrdf.rio" ]
java.io; org.openrdf.rio;
1,660,348
public static long getUnsignedInt(ByteBuffer bb, int offset) { return (bb.getInt(offset) & 0xffffffffL); }
static long function(ByteBuffer bb, int offset) { return (bb.getInt(offset) & 0xffffffffL); }
/** * Get an unsigned int from the specified offset in the ByteBuffer * * @param bb ByteBuffer to get the int from * @param offset the offset to get the int from * @return an unsigned int contained in a long */
Get an unsigned int from the specified offset in the ByteBuffer
getUnsignedInt
{ "repo_name": "phisolani/floodlight", "path": "src/main/java/org/openflow/util/Unsigned.java", "license": "apache-2.0", "size": 6885 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,192,231
public void applyAndJournal(Supplier<JournalContext> context, DeleteFileEntry entry) { // Unlike most entries, the delete file entry must be applied *before* making the in-memory // change. This is because delete file and create file are performed with only a read lock on // the parent directory. As soon ...
void function(Supplier<JournalContext> context, DeleteFileEntry entry) { try { context.get().append(JournalEntry.newBuilder().setDeleteFile(entry).build()); applyDelete(entry); } catch (Throwable t) { ProcessUtils.fatalError(LOG, t, STR, entry); } }
/** * Deletes an inode (may be either a file or directory). * * @param context journal context supplier * @param entry delete file entry */
Deletes an inode (may be either a file or directory)
applyAndJournal
{ "repo_name": "calvinjia/tachyon", "path": "core/server/master/src/main/java/alluxio/master/file/meta/InodeTreePersistentState.java", "license": "apache-2.0", "size": 27605 }
[ "java.util.function.Supplier" ]
import java.util.function.Supplier;
import java.util.function.*;
[ "java.util" ]
java.util;
13,202
@Path( "updateProxyConnector" ) @POST @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) Act...
@Path( STR ) @Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } ) @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION ) ActionStatus updateProxyConnector( ProxyConnector pr...
/** * <b>only for enabled/disable or changing bean values except target/source</b> * * @param proxyConnector * @return */
only for enabled/disable or changing bean values except target/source
updateProxyConnector
{ "repo_name": "apache/archiva", "path": "archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/ProxyConnectorService.java", "license": "apache-2.0", "size": 4747 }
[ "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "org.apache.archiva.admin.model.beans.ProxyConnector", "org.apache.archiva.redback.authorization.RedbackAuthorization", "org.apache.archiva.rest.api.model.ActionStatus", "org.apache.archiva.security.commo...
import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.apache.archiva.admin.model.beans.ProxyConnector; import org.apache.archiva.redback.authorization.RedbackAuthorization; import org.apache.archiva.rest.api.model.ActionStatus; import org.apache...
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.archiva.admin.model.beans.*; import org.apache.archiva.redback.authorization.*; import org.apache.archiva.rest.api.model.*; import org.apache.archiva.security.common.*;
[ "javax.ws", "org.apache.archiva" ]
javax.ws; org.apache.archiva;
1,671,866
@POST @Consumes("text/vcard") @Produces("text/vcard") public Response handlePost(@Context HttpServletRequest request, @QueryParam("tagId") @DefaultValue("0") int tagId, String vcard) { Response retval = null; ObjectMapper mapper = new ObjectMapper(); List<Contact> contacts = new ArrayList<>(); Stri...
@Consumes(STR) @Produces(STR) Response function(@Context HttpServletRequest request, @QueryParam("tagId") @DefaultValue("0") int tagId, String vcard) { Response retval = null; ObjectMapper mapper = new ObjectMapper(); List<Contact> contacts = new ArrayList<>(); StringBuilder sb = new StringBuilder(); try { for (Contact...
/** * Create a new contact from text/vcard. */
Create a new contact from text/vcard
handlePost
{ "repo_name": "harkwell/khallware", "path": "src/main/java/com/khallware/api/ctrl/Contacts.java", "license": "gpl-3.0", "size": 7738 }
[ "com.fasterxml.jackson.databind.ObjectMapper", "com.khallware.api.ContactFactory", "com.khallware.api.domain.Contact", "java.util.ArrayList", "java.util.List", "javax.servlet.http.HttpServletRequest", "javax.ws.rs.Consumes", "javax.ws.rs.DefaultValue", "javax.ws.rs.Produces", "javax.ws.rs.QueryPar...
import com.fasterxml.jackson.databind.ObjectMapper; import com.khallware.api.ContactFactory; import com.khallware.api.domain.Contact; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.DefaultValue; import javax.ws.rs.Produces...
import com.fasterxml.jackson.databind.*; import com.khallware.api.*; import com.khallware.api.domain.*; import java.util.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "com.fasterxml.jackson", "com.khallware.api", "java.util", "javax.servlet", "javax.ws" ]
com.fasterxml.jackson; com.khallware.api; java.util; javax.servlet; javax.ws;
2,909,718
@Routed(priority = PriorityCollector.DEFAULT_PRIORITY - 1, value = "/ui/:1/upload") public void uploadFile(WebContext ctx, String bucket) { try { String name = ctx.get("filename").asString(ctx.get("qqfile").asString()); Bucket storageBucket = storage.getBucket(bucket); ...
@Routed(priority = PriorityCollector.DEFAULT_PRIORITY - 1, value = STR) void function(WebContext ctx, String bucket) { try { String name = ctx.get(STR).asString(ctx.get(STR).asString()); Bucket storageBucket = storage.getBucket(bucket); StoredObject object = storageBucket.getObject(name); InputStream inputStream = ctx....
/** * Handles manual object uploads * * @param ctx the context describing the current request * @param bucket the name of the target bucket */
Handles manual object uploads
uploadFile
{ "repo_name": "FingolfinTEK/s3ninja", "path": "src/main/java/ninja/NinjaController.java", "license": "mit", "size": 10394 }
[ "com.google.common.collect.Maps", "com.google.common.hash.HashCode", "com.google.common.hash.Hashing", "com.google.common.io.BaseEncoding", "com.google.common.io.ByteStreams", "com.google.common.io.Files", "io.netty.handler.codec.http.HttpHeaders", "io.netty.handler.codec.http.HttpResponseStatus", "...
import com.google.common.collect.Maps; import com.google.common.hash.HashCode; import com.google.common.hash.Hashing; import com.google.common.io.BaseEncoding; import com.google.common.io.ByteStreams; import com.google.common.io.Files; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.H...
import com.google.common.collect.*; import com.google.common.hash.*; import com.google.common.io.*; import io.netty.handler.codec.http.*; import java.io.*; import java.util.*;
[ "com.google.common", "io.netty.handler", "java.io", "java.util" ]
com.google.common; io.netty.handler; java.io; java.util;
959,687
void cancel(Http2Error error, Throwable cause) { cancelled = true; // Ensure that the queue can't be modified while we are writing. if (writing) { return; } FlowControlled frame = pendingWriteQueue.poll(); if (frame != null...
void cancel(Http2Error error, Throwable cause) { cancelled = true; if (writing) { return; } FlowControlled frame = pendingWriteQueue.poll(); if (frame != null) { final Http2Exception exception = streamError(stream.id(), error, cause, STR); do { writeError(frame, exception); frame = pendingWriteQueue.poll(); } while (fr...
/** * Clears the pending queue and writes errors for each remaining frame. * @param error the {@link Http2Error} to use. * @param cause the {@link Throwable} that caused this method to be invoked. */
Clears the pending queue and writes errors for each remaining frame
cancel
{ "repo_name": "bryce-anderson/netty", "path": "codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2RemoteFlowController.java", "license": "apache-2.0", "size": 30822 }
[ "io.netty.handler.codec.http2.Http2Exception" ]
import io.netty.handler.codec.http2.Http2Exception;
import io.netty.handler.codec.http2.*;
[ "io.netty.handler" ]
io.netty.handler;
361,356
private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, List<SDDocumentImpl> docs, Container container, Class implType) { BindingID bindingId = binding.getBindingId(); if (!bindingId.canGenerateWSDL()) { ...
static SDDocumentImpl function(WSBinding binding, AbstractSEIModelImpl seiModel, List<SDDocumentImpl> docs, Container container, Class implType) { BindingID bindingId = binding.getBindingId(); if (!bindingId.canGenerateWSDL()) { throw new ServerRtException(STR, bindingId); } if (bindingId.toString().equals(SOAPBindingI...
/** * Generates the WSDL and XML Schema for the endpoint if necessary * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings */
Generates the WSDL and XML Schema for the endpoint if necessary It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings
generateWSDL
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java", "license": "mit", "size": 36839 }
[ "com.sun.xml.internal.ws.api.BindingID", "com.sun.xml.internal.ws.api.WSBinding", "com.sun.xml.internal.ws.api.databinding.WSDLGenInfo", "com.sun.xml.internal.ws.api.server.Container", "com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension", "com.sun.xml.internal.ws.binding.SOAPBindingImpl", "c...
import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo; import com.sun.xml.internal.ws.api.server.Container; import com.sun.xml.internal.ws.api.wsdl.writer.WSDLGeneratorExtension; import com.sun.xml.internal.ws.binding.SOAPB...
import com.sun.xml.internal.ws.api.*; import com.sun.xml.internal.ws.api.databinding.*; import com.sun.xml.internal.ws.api.server.*; import com.sun.xml.internal.ws.api.wsdl.writer.*; import com.sun.xml.internal.ws.binding.*; import com.sun.xml.internal.ws.model.*; import com.sun.xml.internal.ws.resources.*; import com....
[ "com.sun.xml", "java.util" ]
com.sun.xml; java.util;
185,438
@Override final Object tryMergePolylines(final Object first, final Iterator<?> polylines) { throw unsupported(2); // TODO - see class javadoc }
final Object tryMergePolylines(final Object first, final Iterator<?> polylines) { throw unsupported(2); }
/** * Merges a sequence of points or paths if the first instance is an implementation of this library. * * @throws ClassCastException if an element in the iterator is not a JTS geometry. */
Merges a sequence of points or paths if the first instance is an implementation of this library
tryMergePolylines
{ "repo_name": "Geomatys/sis", "path": "core/sis-feature/src/main/java/org/apache/sis/internal/feature/JTS.java", "license": "apache-2.0", "size": 6300 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,708,356
public synchronized TypeCode create_enum_tc(String id, String name, String[] members) { checkShutdownState(); return new TypeCodeImpl(this, TCKind._tk_enum, id, name, members); }
synchronized TypeCode function(String id, String name, String[] members) { checkShutdownState(); return new TypeCodeImpl(this, TCKind._tk_enum, id, name, members); }
/** * Create a TypeCode for an enum. * * @param id the logical id for the typecode. * @param name the name for the typecode. * @param members an array describing the members of the TypeCode. * @return the requested TypeCode. */
Create a TypeCode for an enum
create_enum_tc
{ "repo_name": "JetBrains/jdk8u_corba", "path": "src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java", "license": "gpl-2.0", "size": 70996 }
[ "com.sun.corba.se.impl.corba.TypeCodeImpl", "org.omg.CORBA" ]
import com.sun.corba.se.impl.corba.TypeCodeImpl; import org.omg.CORBA;
import com.sun.corba.se.impl.corba.*; import org.omg.*;
[ "com.sun.corba", "org.omg" ]
com.sun.corba; org.omg;
1,258,685
protected static synchronized TaskletExecutor getExecutor() { if (executor_ == null) { if (Factory.isStarted()) { // executor_ = new XotsExecutor(2,4, "Config"); // executor_.scheduleAtFixedRate(new ObjectFlusher(), 5, 15, TimeUnit.SECONDS); // TODO LifeCycleManager.addCleanupHook(SHUTDOWN_HOOK); ...
static synchronized TaskletExecutor function() { if (executor_ == null) { if (Factory.isStarted()) { } } return executor_; }
/** * Sets up the executor, if no one exists * * @return */
Sets up the executor, if no one exists
getExecutor
{ "repo_name": "rPraml/org.openntf.domino", "path": "domino/deprecated/src/main/java/org/openntf/domino/config/Configuration.java", "license": "apache-2.0", "size": 5528 }
[ "org.openntf.domino.utils.Factory", "org.openntf.tasklet.TaskletExecutor" ]
import org.openntf.domino.utils.Factory; import org.openntf.tasklet.TaskletExecutor;
import org.openntf.domino.utils.*; import org.openntf.tasklet.*;
[ "org.openntf.domino", "org.openntf.tasklet" ]
org.openntf.domino; org.openntf.tasklet;
1,578,910
private void checkOpen() throws SQLException { if (connection.isClosed()) { throw new SQLException( Messages.get("error.generic.closed", "Connection"), "HY010"); } }
void function() throws SQLException { if (connection.isClosed()) { throw new SQLException( Messages.get(STR, STR), "HY010"); } }
/** * Check that the connection is still open. * * @throws SQLException * if the connection is closed */
Check that the connection is still open
checkOpen
{ "repo_name": "kassak/jtds", "path": "src/main/net/sourceforge/jtds/jdbc/TdsCore.java", "license": "lgpl-2.1", "size": 169087 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
191,348
public static long skip(InputStream input, long toSkip) throws IOException { if (toSkip < 0) { throw new IllegalArgumentException("Skip count must be non-negative, actual: " + toSkip); } if (SKIP_BYTE_BUFFER == null) { SKIP_BYTE_BUFFER = new byte[SKIP_BUFFER_...
static long function(InputStream input, long toSkip) throws IOException { if (toSkip < 0) { throw new IllegalArgumentException(STR + toSkip); } if (SKIP_BYTE_BUFFER == null) { SKIP_BYTE_BUFFER = new byte[SKIP_BUFFER_SIZE]; } long remain = toSkip; while (remain > 0) { long n = input.read(SKIP_BYTE_BUFFER, 0, (int) Math....
/** * Skip bytes from an input byte stream. * This implementation guarantees that it will read as many bytes * as possible before giving up; this may not always be the case for * subclasses of {@link Reader}. * * @param input byte stream to skip * @param toSkip number of bytes to s...
Skip bytes from an input byte stream. This implementation guarantees that it will read as many bytes as possible before giving up; this may not always be the case for subclasses of <code>Reader</code>
skip
{ "repo_name": "wspeirs/sop4j-base", "path": "src/main/java/com/sop4j/base/apache/io/IOUtils.java", "license": "apache-2.0", "size": 97933 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
186,654
private static InstallationResources download() throws IOException { for (final InstallationResources c : ServiceLoader.load(InstallationResources.class, new URLClassLoader(new URL[] {new URL(DOWNLOAD_URL)}))) { if (!c.getClass().isAnnotationPresent(Fallback.class) && c.g...
static InstallationResources function() throws IOException { for (final InstallationResources c : ServiceLoader.load(InstallationResources.class, new URLClassLoader(new URL[] {new URL(DOWNLOAD_URL)}))) { if (!c.getClass().isAnnotationPresent(Fallback.class) && c.getAuthorities().contains(EPSG)) { return c; } } throw ne...
/** * Downloads the provider to use for fetching the actual licensed data after we got user's agreement. */
Downloads the provider to use for fetching the actual licensed data after we got user's agreement
download
{ "repo_name": "Geomatys/sis", "path": "application/sis-console/src/main/java/org/apache/sis/console/ResourcesDownloader.java", "license": "apache-2.0", "size": 13541 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.net.URLClassLoader", "java.util.ServiceLoader", "org.apache.sis.internal.referencing.Fallback", "org.apache.sis.setup.InstallationResources" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.net.URLClassLoader; import java.util.ServiceLoader; import org.apache.sis.internal.referencing.Fallback; import org.apache.sis.setup.InstallationResources;
import java.io.*; import java.net.*; import java.util.*; import org.apache.sis.internal.referencing.*; import org.apache.sis.setup.*;
[ "java.io", "java.net", "java.util", "org.apache.sis" ]
java.io; java.net; java.util; org.apache.sis;
2,071,821
public String parseStream(JobCollection collection, XInputFile xInputFile, int pes_streamtype, int action, String vptslog) { // is elementary new StreamProcess(CommonParsing.SUBPICTURE, collection, xInputFile, "-1", "sp", vptslog, CommonParsing.ES_TYPE); return null; }
String function(JobCollection collection, XInputFile xInputFile, int pes_streamtype, int action, String vptslog) { new StreamProcess(CommonParsing.SUBPICTURE, collection, xInputFile, "-1", "sp", vptslog, CommonParsing.ES_TYPE); return null; }
/** * subpicture elementary stream */
subpicture elementary stream
parseStream
{ "repo_name": "silid/project-x-cvs", "path": "src/net/sourceforge/dvb/projectx/parser/StreamParserESSubpicture.java", "license": "gpl-2.0", "size": 2512 }
[ "net.sourceforge.dvb.projectx.common.JobCollection", "net.sourceforge.dvb.projectx.parser.CommonParsing", "net.sourceforge.dvb.projectx.parser.StreamProcess", "net.sourceforge.dvb.projectx.xinput.XInputFile" ]
import net.sourceforge.dvb.projectx.common.JobCollection; import net.sourceforge.dvb.projectx.parser.CommonParsing; import net.sourceforge.dvb.projectx.parser.StreamProcess; import net.sourceforge.dvb.projectx.xinput.XInputFile;
import net.sourceforge.dvb.projectx.common.*; import net.sourceforge.dvb.projectx.parser.*; import net.sourceforge.dvb.projectx.xinput.*;
[ "net.sourceforge.dvb" ]
net.sourceforge.dvb;
536,378
@Test public void testRollbackWithMultiTransactions() { EntityManager em1 = emf.createEntityManager(); // em1.setFlushMode(FlushModeType.COMMIT); // Begin transaction. em1.getTransaction().begin(); Object p1 = prepareData("11", 10); em1.persist(p1); ...
void function() { EntityManager em1 = emf.createEntityManager(); em1.getTransaction().begin(); Object p1 = prepareData("11", 10); em1.persist(p1); em1.getTransaction().commit(); EntityManager em2 = emf.createEntityManager(); em2.getTransaction().begin(); Person found = em2.find(Person.class, "11"); found.setPersonName(...
/** * Roll back with multi transactions. */
Roll back with multi transactions
testRollbackWithMultiTransactions
{ "repo_name": "impetus-opensource/Kundera", "path": "src/jpa-engine/core/src/test/java/com/impetus/kundera/EntityTransactionTest.java", "license": "apache-2.0", "size": 6952 }
[ "com.impetus.kundera.query.Person", "javax.persistence.EntityManager", "junit.framework.Assert" ]
import com.impetus.kundera.query.Person; import javax.persistence.EntityManager; import junit.framework.Assert;
import com.impetus.kundera.query.*; import javax.persistence.*; import junit.framework.*;
[ "com.impetus.kundera", "javax.persistence", "junit.framework" ]
com.impetus.kundera; javax.persistence; junit.framework;
2,853,590
@Override public Document getNewDocument(String documentTypeName) throws WorkflowException { // argument validation String watchName = "DocumentServiceImpl.getNewDocument"; StopWatch watch = new StopWatch(); watch.start(); if (LOG.isDebugEnabled()) { ...
Document function(String documentTypeName) throws WorkflowException { String watchName = STR; StopWatch watch = new StopWatch(); watch.start(); if (LOG.isDebugEnabled()) { LOG.debug(watchName + STR); } if (StringUtils.isBlank(documentTypeName)) { throw new IllegalArgumentException(STR); } if (GlobalVariables.getUserSes...
/** * Creates a new document by document type name. * * @see org.kuali.rice.krad.service.DocumentService#getNewDocument(java.lang.String) */
Creates a new document by document type name
getNewDocument
{ "repo_name": "sbower/kuali-rice-1", "path": "impl/src/main/java/org/kuali/rice/krad/service/impl/DocumentServiceImpl.java", "license": "apache-2.0", "size": 52079 }
[ "java.lang.reflect.Constructor", "java.lang.reflect.InvocationTargetException", "org.apache.commons.lang.StringUtils", "org.apache.commons.lang.time.StopWatch", "org.kuali.rice.core.api.config.ConfigurationException", "org.kuali.rice.kew.api.WorkflowDocument", "org.kuali.rice.kew.exception.WorkflowExcep...
import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.time.StopWatch; import org.kuali.rice.core.api.config.ConfigurationException; import org.kuali.rice.kew.api.WorkflowDocument; import org.kuali.rice.kew.exc...
import java.lang.reflect.*; import org.apache.commons.lang.*; import org.apache.commons.lang.time.*; import org.kuali.rice.core.api.config.*; import org.kuali.rice.kew.api.*; import org.kuali.rice.kew.exception.*; import org.kuali.rice.kim.api.identity.*; import org.kuali.rice.krad.bo.*; import org.kuali.rice.krad.docu...
[ "java.lang", "org.apache.commons", "org.kuali.rice" ]
java.lang; org.apache.commons; org.kuali.rice;
1,833,064
protected String getDefaultEncoding(MimeMessage mimeMessage) { if (mimeMessage instanceof SmartMimeMessage) { return ((SmartMimeMessage) mimeMessage).getDefaultEncoding(); } return null; }
String function(MimeMessage mimeMessage) { if (mimeMessage instanceof SmartMimeMessage) { return ((SmartMimeMessage) mimeMessage).getDefaultEncoding(); } return null; }
/** * Determine the default encoding for the given MimeMessage. * @param mimeMessage the passed-in MimeMessage * @return the default encoding associated with the MimeMessage, * or <code>null</code> if none found */
Determine the default encoding for the given MimeMessage
getDefaultEncoding
{ "repo_name": "raedle/univis", "path": "lib/springframework-1.2.8/src/org/springframework/mail/javamail/MimeMessageHelper.java", "license": "lgpl-2.1", "size": 43902 }
[ "javax.mail.internet.MimeMessage" ]
import javax.mail.internet.MimeMessage;
import javax.mail.internet.*;
[ "javax.mail" ]
javax.mail;
1,689,051
Recipe getRecipe();
Recipe getRecipe();
/** * Retrieves the recipe that has been crafted as a result of this event. * * @return The recipe */
Retrieves the recipe that has been crafted as a result of this event
getRecipe
{ "repo_name": "joshgarde/SpongeAPI", "path": "src/main/java/org/spongepowered/api/event/inventory/CraftItemEvent.java", "license": "mit", "size": 2431 }
[ "org.spongepowered.api.item.recipe.Recipe" ]
import org.spongepowered.api.item.recipe.Recipe;
import org.spongepowered.api.item.recipe.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
1,109,942
@RequestMapping(value = "/{settingsId}/resources/jdbc/dbcp-new/", method = RequestMethod.POST) public String newDbcpDataSource(Model model, @PathVariable("settingsId") String settingsId, DbcpDataSource dbcpDataSource, BindingResult binder) throws UnsupportedEncodingException { dbcpDataSource.val...
@RequestMapping(value = STR, method = RequestMethod.POST) String function(Model model, @PathVariable(STR) String settingsId, DbcpDataSource dbcpDataSource, BindingResult binder) throws UnsupportedEncodingException { dbcpDataSource.validate(dbcpDataSource, binder); if (!binder.hasErrors()) { settingsService.addDataSourc...
/** * Validate and create a new DBCP data source. * * @param model * @param settingsId the tc Runtime instance id * @param dbcpDataSource the new DBCP data source * @param binder the binding result * @return * @throws UnsupportedEncodingException */
Validate and create a new DBCP data source
newDbcpDataSource
{ "repo_name": "pivotal/tcs-hq-management-plugin", "path": "com.springsource.hq.plugin.tcserver.serverconfig.web/src/main/java/com/springsource/hq/plugin/tcserver/serverconfig/web/controllers/JdbcResourceController.java", "license": "gpl-2.0", "size": 16800 }
[ "com.springsource.hq.plugin.tcserver.serverconfig.resources.jdbc.DbcpDataSource", "java.io.UnsupportedEncodingException", "org.springframework.ui.Model", "org.springframework.validation.BindingResult", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.Request...
import com.springsource.hq.plugin.tcserver.serverconfig.resources.jdbc.DbcpDataSource; import java.io.UnsupportedEncodingException; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.a...
import com.springsource.hq.plugin.tcserver.serverconfig.resources.jdbc.*; import java.io.*; import org.springframework.ui.*; import org.springframework.validation.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.util.*;
[ "com.springsource.hq", "java.io", "org.springframework.ui", "org.springframework.validation", "org.springframework.web" ]
com.springsource.hq; java.io; org.springframework.ui; org.springframework.validation; org.springframework.web;
288,112