method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public ServiceResponse<Map<String, DateTime>> getDateTimeValid() throws ErrorException, IOException {
Call<ResponseBody> call = service.getDateTimeValid();
return getDateTimeValidDelegate(call.execute());
} | ServiceResponse<Map<String, DateTime>> function() throws ErrorException, IOException { Call<ResponseBody> call = service.getDateTimeValid(); return getDateTimeValidDelegate(call.execute()); } | /**
* Get date-time dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": "1492-10-12T10:15:01-08:00"}.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the Map<Strin... | Get date-time dictionary value {"0": "2000-12-01t00:00:01z", "1": "1980-01-02T00:11:35+01:00", "2": "1492-10-12T10:15:01-08:00"} | getDateTimeValid | {
"repo_name": "John-Hart/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java",
"license": "mit",
"size": 172079
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException",
"java.util.Map",
"org.joda.time.DateTime"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.Map; import org.joda.time.DateTime; | import com.microsoft.rest.*; import java.io.*; import java.util.*; import org.joda.time.*; | [
"com.microsoft.rest",
"java.io",
"java.util",
"org.joda.time"
] | com.microsoft.rest; java.io; java.util; org.joda.time; | 2,322,885 |
@Override
public void append(CharSequence text, int start, int end) {
// We don't care about watching text changes while appending.
if (mTextWatcher != null) {
removeTextChangedListener(mTextWatcher);
}
super.append(text, start, end);
if (!TextUtils.isEmpty(te... | void function(CharSequence text, int start, int end) { if (mTextWatcher != null) { removeTextChangedListener(mTextWatcher); } super.append(text, start, end); if (!TextUtils.isEmpty(text) && TextUtils.getTrimmedLength(text) > 0) { String displayString = text.toString(); if (!displayString.trim().endsWith(String.valueOf(... | /**
* Convenience method: Append the specified text slice to the TextView's
* display buffer, upgrading it to BufferType.EDITABLE if it was
* not already editable. Commas are excluded as they are added automatically
* by the view.
*/ | Convenience method: Append the specified text slice to the TextView's display buffer, upgrading it to BufferType.EDITABLE if it was not already editable. Commas are excluded as they are added automatically by the view | append | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/com/android/ex/chips/RecipientEditTextView.java",
"license": "gpl-3.0",
"size": 126594
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 518,316 |
public void testCRLException07() {
CRLException tE;
for (int i = 0; i < msgs.length; i++) {
tE = new CRLException(msgs[i], null);
assertEquals("getMessage() must return: ".concat(msgs[i]), tE
.getMessage(), msgs[i]);
assertNull("getCause() must... | void function() { CRLException tE; for (int i = 0; i < msgs.length; i++) { tE = new CRLException(msgs[i], null); assertEquals(STR.concat(msgs[i]), tE .getMessage(), msgs[i]); assertNull(STR, tE.getCause()); } } | /**
* Test for <code>CRLException(String, Throwable)</code> constructor
* Assertion: constructs CRLException when <code>cause</code> is null
* <code>msg</code> is not null
*/ | Test for <code>CRLException(String, Throwable)</code> constructor Assertion: constructs CRLException when <code>cause</code> is null <code>msg</code> is not null | testCRLException07 | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CRLExceptionTest.java",
"license": "gpl-3.0",
"size": 6836
} | [
"java.security.cert.CRLException"
] | import java.security.cert.CRLException; | import java.security.cert.*; | [
"java.security"
] | java.security; | 917,208 |
private RepositoryInfo createRepositoryInfo(CmisVersion cmisVersion)
{
Descriptor currentDescriptor = descriptorService.getCurrentRepositoryDescriptor();
// get change token
boolean auditEnabled = auditService.isAuditEnabled(CMIS_CHANGELOG_AUDIT_APPLICATION, "/"
+ CMIS_C... | RepositoryInfo function(CmisVersion cmisVersion) { Descriptor currentDescriptor = descriptorService.getCurrentRepositoryDescriptor(); boolean auditEnabled = auditService.isAuditEnabled(CMIS_CHANGELOG_AUDIT_APPLICATION, "/" + CMIS_CHANGELOG_AUDIT_APPLICATION); String latestChangeLogToken = null; if (auditEnabled) { Entr... | /**
* Creates the repository info object.
*/ | Creates the repository info object | createRepositoryInfo | {
"repo_name": "Kast0rTr0y/community-edition",
"path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java",
"license": "lgpl-3.0",
"size": 147090
} | [
"java.util.Arrays",
"org.alfresco.repo.security.authentication.AuthenticationUtil",
"org.alfresco.service.cmr.audit.AuditQueryParameters",
"org.alfresco.service.cmr.repository.NodeRef",
"org.alfresco.service.cmr.security.PermissionService",
"org.alfresco.service.descriptor.Descriptor",
"org.apache.chemi... | import java.util.Arrays; import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.alfresco.service.cmr.audit.AuditQueryParameters; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.service.descriptor.Descriptor; imp... | import java.util.*; import org.alfresco.repo.security.authentication.*; import org.alfresco.service.cmr.audit.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.cmr.security.*; import org.alfresco.service.descriptor.*; import org.apache.chemistry.opencmis.commons.data.*; import org.apache.chem... | [
"java.util",
"org.alfresco.repo",
"org.alfresco.service",
"org.apache.chemistry"
] | java.util; org.alfresco.repo; org.alfresco.service; org.apache.chemistry; | 905,876 |
@Override
public void write(char[] buffer, int offset, int length) throws IOException
{
synchronized (lock)
{
while (length-- > 0) {
write(buffer[offset++]);
}
}
}
| void function(char[] buffer, int offset, int length) throws IOException { synchronized (lock) { while (length-- > 0) { write(buffer[offset++]); } } } | /***
* Writes a number of characters from a character array to the output
* starting from a given offset.
* <p>
* @param buffer The character array to write.
* @param offset The offset into the array at which to start copying data.
* @param length The number of characters to write... | Writes a number of characters from a character array to the output starting from a given offset. | write | {
"repo_name": "rayanmestiri/android-chat-telnet",
"path": "src/org/apache/commons/net/io/DotTerminatedMessageWriter.java",
"license": "lgpl-3.0",
"size": 6978
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,705,270 |
public void askForNewName(final ResourceBasedNode<?> node, final InputCallback inputCallback, final CancelCallback cancelCallback) {
final int selectionLength = node.getName().indexOf('.') >= 0
? node.getName().lastIndexOf('.')
: node.g... | void function(final ResourceBasedNode<?> node, final InputCallback inputCallback, final CancelCallback cancelCallback) { final int selectionLength = node.getName().indexOf('.') >= 0 ? node.getName().lastIndexOf('.') : node.getName().length(); InputDialog inputDialog = dialogFactory.createInputDialog(getDialogTitle(node... | /**
* Asks the user for new node name.
*
* @param node
* @param inputCallback
* @param cancelCallback
*/ | Asks the user for new node name | askForNewName | {
"repo_name": "stour/che",
"path": "core/ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/actions/RenameItemAction.java",
"license": "epl-1.0",
"size": 10031
} | [
"org.eclipse.che.ide.api.dialogs.CancelCallback",
"org.eclipse.che.ide.api.dialogs.InputCallback",
"org.eclipse.che.ide.api.dialogs.InputDialog",
"org.eclipse.che.ide.project.node.FileReferenceNode",
"org.eclipse.che.ide.project.node.FolderReferenceNode",
"org.eclipse.che.ide.project.node.ProjectNode",
... | import org.eclipse.che.ide.api.dialogs.CancelCallback; import org.eclipse.che.ide.api.dialogs.InputCallback; import org.eclipse.che.ide.api.dialogs.InputDialog; import org.eclipse.che.ide.project.node.FileReferenceNode; import org.eclipse.che.ide.project.node.FolderReferenceNode; import org.eclipse.che.ide.project.node... | import org.eclipse.che.ide.api.dialogs.*; import org.eclipse.che.ide.project.node.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,297,962 |
void resetDocument(Object element) throws CoreException; | void resetDocument(Object element) throws CoreException; | /**
* Resets the given element's document to its last saved state.
* Element state listeners are notified both before (<code>elementContentAboutToBeReplaced</code>)
* and after (<code>elementContentReplaced</code>) the content is changed.
*
* @param element the element, or <code>null</code>
* @exception Cor... | Resets the given element's document to its last saved state. Element state listeners are notified both before (<code>elementContentAboutToBeReplaced</code>) and after (<code>elementContentReplaced</code>) the content is changed | resetDocument | {
"repo_name": "xiaguangme/simon_ide_tools",
"path": "02.eclipse_enhance/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProvider.java",
"license": "apache-2.0",
"size": 9664
} | [
"org.eclipse.core.runtime.CoreException"
] | import org.eclipse.core.runtime.CoreException; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,543,625 |
List<T> getSortedList(Comparator<T> comparator); | List<T> getSortedList(Comparator<T> comparator); | /**
* Given a comparator, return the search results as a sorted list.
*
* @param comparator the comparator
* @return the search results list sorted by the comparator
*/ | Given a comparator, return the search results as a sorted list | getSortedList | {
"repo_name": "tair/tairwebapp",
"path": "src/org/tair/search/ISearchResultsManager.java",
"license": "gpl-3.0",
"size": 4103
} | [
"java.util.Comparator",
"java.util.List"
] | import java.util.Comparator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,662,102 |
@ColorInt
public int getFillColorAsInt() {
PropertyValue<String> value = getFillColor();
if (value.isValue()) {
return rgbaToColor(value.getValue());
} else {
throw new RuntimeException("fill-color was set as a Function");
}
} | int function() { PropertyValue<String> value = getFillColor(); if (value.isValue()) { return rgbaToColor(value.getValue()); } else { throw new RuntimeException(STR); } } | /**
* The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the
* color's opacity will not affect the opacity of the 1px stroke, if it is used.
*
* @return int representation of a rgba string color
* @throws RuntimeException thrown if property isn't... | The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used | getFillColorAsInt | {
"repo_name": "geminy/aidear",
"path": "oss/qt/qt-everywhere-opensource-src-5.9.0/qtlocation/src/3rdparty/mapbox-gl-native/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java",
"license": "gpl-3.0",
"size": 5886
} | [
"com.mapbox.mapboxsdk.utils.ColorUtils"
] | import com.mapbox.mapboxsdk.utils.ColorUtils; | import com.mapbox.mapboxsdk.utils.*; | [
"com.mapbox.mapboxsdk"
] | com.mapbox.mapboxsdk; | 2,043,292 |
public boolean isValidPersistenceMethod(ClassAccessor classAccessor, boolean userDecorated) {
if (! isValidPersistenceElement(getModifiers()) || ! isValidPersistenceMethod()) {
// So it's not a valid method, did the user decorate it with
// annotations or specify it in XML?
... | boolean function(ClassAccessor classAccessor, boolean userDecorated) { if (! isValidPersistenceElement(getModifiers()) ! isValidPersistenceMethod()) { if (userDecorated) { if (hasParameters()) { throw ValidationException.mappingMetadataAppliedToMethodWithArguments(this, classAccessor.getDescriptorJavaClass()); } else i... | /**
* INTERNAL:
* Return true is this method is a valid persistence method. User decorated
* is used to indicate that the method either had persistence annotations
* defined on it or that it was specified in XML.
*/ | Return true is this method is a valid persistence method. User decorated is used to indicate that the method either had persistence annotations defined on it or that it was specified in XML | isValidPersistenceMethod | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataMethod.java",
"license": "epl-1.0",
"size": 10405
} | [
"org.eclipse.persistence.exceptions.ValidationException",
"org.eclipse.persistence.internal.jpa.metadata.MetadataLogger",
"org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor"
] | import org.eclipse.persistence.exceptions.ValidationException; import org.eclipse.persistence.internal.jpa.metadata.MetadataLogger; import org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor; | import org.eclipse.persistence.exceptions.*; import org.eclipse.persistence.internal.jpa.metadata.*; import org.eclipse.persistence.internal.jpa.metadata.accessors.classes.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 2,768,347 |
private void renderOverview(final PrintWriter pw, final TopologyView topology) {
pw.println("<p class=\"statline ui-state-highlight\">Configuration</p>");
pw.println("<br/>");
pw.print("<a href=\"${appRoot}/configMgr/org.apache.sling.discovery.impl.Config\">Configure Discovery Service</a>");... | void function(final PrintWriter pw, final TopologyView topology) { pw.println(STRstatline ui-state-highlight\STR); pw.println("<br/>"); pw.print(STR${appRoot}/configMgr/org.apache.sling.discovery.impl.Config\STR); pw.println("<br/>STR<br/>"); final String changing; if (!topology.isCurrent()) { changing = STR; } else { ... | /**
* Render the overview of the entire topology
*/ | Render the overview of the entire topology | renderOverview | {
"repo_name": "MRivas-XumaK/slingBuild",
"path": "bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/TopologyWebConsolePlugin.java",
"license": "apache-2.0",
"size": 40360
} | [
"java.io.PrintWriter",
"org.apache.felix.scr.annotations.Property",
"org.apache.sling.discovery.ClusterView",
"org.apache.sling.discovery.TopologyView"
] | import java.io.PrintWriter; import org.apache.felix.scr.annotations.Property; import org.apache.sling.discovery.ClusterView; import org.apache.sling.discovery.TopologyView; | import java.io.*; import org.apache.felix.scr.annotations.*; import org.apache.sling.discovery.*; | [
"java.io",
"org.apache.felix",
"org.apache.sling"
] | java.io; org.apache.felix; org.apache.sling; | 2,847,392 |
public long getAlterationTime()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getAlterationTime");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getAlterationTime", Long.valueOf(_alterationTime));
... | long function() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, STR); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, STR, Long.valueOf(_alterationTime)); return _alterationTime; } | /**
* Gets the current alteration time for this localization.
*
* @return
*/ | Gets the current alteration time for this localization | getAlterationTime | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/store/itemstreams/PubSubMessageItemStream.java",
"license": "epl-1.0",
"size": 36725
} | [
"com.ibm.websphere.ras.TraceComponent",
"com.ibm.ws.sib.utils.ras.SibTr"
] | import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.sib.utils.ras.SibTr; | import com.ibm.websphere.ras.*; import com.ibm.ws.sib.utils.ras.*; | [
"com.ibm.websphere",
"com.ibm.ws"
] | com.ibm.websphere; com.ibm.ws; | 251,203 |
@Test(expected = PropertyNotFoundException.class)
public void testIsReadOnly05() {
ListELResolver resolver = new ListELResolver();
ELContext context = new ELContextImpl();
List<String> list = new ArrayList<String>();
list.add("key");
resolver.isReadOnly(context, list, ne... | @Test(expected = PropertyNotFoundException.class) void function() { ListELResolver resolver = new ListELResolver(); ELContext context = new ELContextImpl(); List<String> list = new ArrayList<String>(); list.add("key"); resolver.isReadOnly(context, list, new Integer(1)); } | /**
* Tests that the key is out of bounds and exception will be thrown.
*/ | Tests that the key is out of bounds and exception will be thrown | testIsReadOnly05 | {
"repo_name": "plumer/codana",
"path": "tomcat_files/7.0.61/TestListELResolver.java",
"license": "mit",
"size": 11785
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.jasper.el.ELContextImpl",
"org.junit.Test"
] | import java.util.ArrayList; import java.util.List; import org.apache.jasper.el.ELContextImpl; import org.junit.Test; | import java.util.*; import org.apache.jasper.el.*; import org.junit.*; | [
"java.util",
"org.apache.jasper",
"org.junit"
] | java.util; org.apache.jasper; org.junit; | 863,415 |
public static boolean updateItem(ItemFull item) {
System.out.println("Updating the item");
Document itemToUpdate = DBH.getInstance().checkingParsingItem(item);
// check error
if(itemToUpdate == null) {
return false;
}
String itemID = item.getID();
Bson filter = Filters.eq("_id", new ObjectId(itemI... | static boolean function(ItemFull item) { System.out.println(STR); Document itemToUpdate = DBH.getInstance().checkingParsingItem(item); if(itemToUpdate == null) { return false; } String itemID = item.getID(); Bson filter = Filters.eq("_id", new ObjectId(itemID)); Document update = new Document("$set", itemToUpdate); Mon... | /**
* Update values of an item.
*
* @param item The item
*
* @return True if succeed, else otherwise.
*/ | Update values of an item | updateItem | {
"repo_name": "gaelfoppolo/locomotor",
"path": "src/locomotor/core/DBH.java",
"license": "gpl-3.0",
"size": 42395
} | [
"com.mongodb.client.MongoCollection",
"com.mongodb.client.model.Filters",
"org.bson.Document",
"org.bson.conversions.Bson",
"org.bson.types.ObjectId"
] | import com.mongodb.client.MongoCollection; import com.mongodb.client.model.Filters; import org.bson.Document; import org.bson.conversions.Bson; import org.bson.types.ObjectId; | import com.mongodb.client.*; import com.mongodb.client.model.*; import org.bson.*; import org.bson.conversions.*; import org.bson.types.*; | [
"com.mongodb.client",
"org.bson",
"org.bson.conversions",
"org.bson.types"
] | com.mongodb.client; org.bson; org.bson.conversions; org.bson.types; | 405,433 |
private boolean recurseDeleteEmptyDirs(File dir) {
File[] allFiles = dir.listFiles();
// return true if dir is now empty
if (allFiles.length == 0) {
return true;
}
for (File file : allFiles) {
if (file.isDirectory()) {
if (recurseDele... | boolean function(File dir) { File[] allFiles = dir.listFiles(); if (allFiles.length == 0) { return true; } for (File file : allFiles) { if (file.isDirectory()) { if (recurseDeleteEmptyDirs(file)) { file.delete(); } } } return (dir.listFiles().length == 0); } | /**
* Recurses all directories returning empty status on the way back.
*/ | Recurses all directories returning empty status on the way back | recurseDeleteEmptyDirs | {
"repo_name": "slipperyseal/atomicobjects",
"path": "atomicobjects-lang/src/main/java/net/catchpole/io/DirectoryTree.java",
"license": "apache-2.0",
"size": 1940
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,442,089 |
private void createImageViewBlur() {
if (mUseBlur) {
mRootView = (ViewGroup) ((Activity) mContext).getWindow().getDecorView()
.findViewById(android.R.id.content);
mBlurredImageView = new ImageView(mContext);
RelativeLayout.LayoutParams params = new ... | void function() { if (mUseBlur) { mRootView = (ViewGroup) ((Activity) mContext).getWindow().getDecorView() .findViewById(android.R.id.content); mBlurredImageView = new ImageView(mContext); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.M... | /**
* Create a ImageView with width and height MATCH_PARENT, which will host the blurred snapshot.
*/ | Create a ImageView with width and height MATCH_PARENT, which will host the blurred snapshot | createImageViewBlur | {
"repo_name": "chenyi2013/PickerUI",
"path": "library/src/main/java/com/dpizarro/uipicker/library/blur/PickerUIBlurHelper.java",
"license": "apache-2.0",
"size": 12138
} | [
"android.app.Activity",
"android.util.Log",
"android.view.View",
"android.view.ViewGroup",
"android.widget.ImageView",
"android.widget.RelativeLayout"
] | import android.app.Activity; import android.util.Log; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.RelativeLayout; | import android.app.*; import android.util.*; import android.view.*; import android.widget.*; | [
"android.app",
"android.util",
"android.view",
"android.widget"
] | android.app; android.util; android.view; android.widget; | 730,723 |
@Nonnull
public ApplicationCollectionRequest count(final boolean value) {
addCountOption(value);
return this;
} | ApplicationCollectionRequest function(final boolean value) { addCountOption(value); return this; } | /**
* Sets the count value for the request
*
* @param value whether or not to return the count of objects with the request
* @return the updated request
*/ | Sets the count value for the request | count | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/ApplicationCollectionRequest.java",
"license": "mit",
"size": 5874
} | [
"com.microsoft.graph.requests.ApplicationCollectionRequest"
] | import com.microsoft.graph.requests.ApplicationCollectionRequest; | import com.microsoft.graph.requests.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 1,208,944 |
public static String supervisorPids(Map conf) throws IOException {
String ret = supervisor_local_dir(conf) + FILE_SEPERATEOR + "pids";
try {
FileUtils.forceMkdir(new File(ret));
} catch (IOException e) {
LOG.error("Failed to create dir " + ret, e);
throw e... | static String function(Map conf) throws IOException { String ret = supervisor_local_dir(conf) + FILE_SEPERATEOR + "pids"; try { FileUtils.forceMkdir(new File(ret)); } catch (IOException e) { LOG.error(STR + ret, e); throw e; } return ret; } | /**
* Return supervisor's pid dir
*
* @param conf
* @return
* @throws IOException
*/ | Return supervisor's pid dir | supervisorPids | {
"repo_name": "kenchen1101/jstorm",
"path": "jstorm-core/src/main/java/com/alibaba/jstorm/cluster/StormConfig.java",
"license": "apache-2.0",
"size": 19690
} | [
"java.io.File",
"java.io.IOException",
"java.util.Map",
"org.apache.commons.io.FileUtils"
] | import java.io.File; import java.io.IOException; import java.util.Map; import org.apache.commons.io.FileUtils; | import java.io.*; import java.util.*; import org.apache.commons.io.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 1,553,478 |
public void render(Graphics2D g2d) {
boundsTransf = getWorldMatrix().createTransformedShape(bounds);
AffineTransform oTransf = g2d.getTransform();
g2d.rotate(rotation, boundsTransf.getBounds().getX()+boundsTransf.getBounds().getWidth()/2, boundsTransf.getBounds().getY()+boundsTransf.getBounds().getHeight()/2);... | void function(Graphics2D g2d) { boundsTransf = getWorldMatrix().createTransformedShape(bounds); AffineTransform oTransf = g2d.getTransform(); g2d.rotate(rotation, boundsTransf.getBounds().getX()+boundsTransf.getBounds().getWidth()/2, boundsTransf.getBounds().getY()+boundsTransf.getBounds().getHeight()/2); g2d.drawImage... | /**
* Dessiner la balle.
* @param g2d ({@link Graphics2D}) Le contexte graphique sur lequel dessiner la balle.
* @see AffineTransform#createTransformedShape(Shape)
*/ | Dessiner la balle | render | {
"repo_name": "OliPro007/FlickBaseball-Java",
"path": "src/drawable/gameobject/ball/NormalBall.java",
"license": "gpl-2.0",
"size": 2758
} | [
"java.awt.Graphics2D",
"java.awt.geom.AffineTransform"
] | import java.awt.Graphics2D; import java.awt.geom.AffineTransform; | import java.awt.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,134,626 |
public CreateTableEntry appendToStatsTable(String tableName) {
throw UserException.unsupportedError()
.message("Statistics tables are not supported in schema [%s]", getSchemaPath())
.build(logger);
} | CreateTableEntry function(String tableName) { throw UserException.unsupportedError() .message(STR, getSchemaPath()) .build(logger); } | /**
* Create an append statistics table entry for given <i>tableName</i>. If there is not existing
* statistics table, a new one is created.
* @param tableName table name
* @return instance of create table entry
*/ | Create an append statistics table entry for given tableName. If there is not existing statistics table, a new one is created | appendToStatsTable | {
"repo_name": "apache/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java",
"license": "apache-2.0",
"size": 14948
} | [
"org.apache.drill.common.exceptions.UserException",
"org.apache.drill.exec.planner.logical.CreateTableEntry"
] | import org.apache.drill.common.exceptions.UserException; import org.apache.drill.exec.planner.logical.CreateTableEntry; | import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.planner.logical.*; | [
"org.apache.drill"
] | org.apache.drill; | 189,763 |
public List<EvalNode> getActiveNodes()
{
return activeNodes;
}
| List<EvalNode> function() { return activeNodes; } | /**
* Returns all nodes found.
* @return pattern nodes
*/ | Returns all nodes found | getActiveNodes | {
"repo_name": "intelie/esper",
"path": "esper/src/main/java/com/espertech/esper/pattern/EvalNodeAnalysisResult.java",
"license": "gpl-2.0",
"size": 2238
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,368,659 |
private void restoreNaNs(double[] ranks, List<Integer> nanPositions) {
if (nanPositions.size() == 0) {
return;
}
Iterator<Integer> iterator = nanPositions.iterator();
while (iterator.hasNext()) {
ranks[iterator.next().intValue()] = Double.NaN;
}
} | void function(double[] ranks, List<Integer> nanPositions) { if (nanPositions.size() == 0) { return; } Iterator<Integer> iterator = nanPositions.iterator(); while (iterator.hasNext()) { ranks[iterator.next().intValue()] = Double.NaN; } } | /**
* Set <code>ranks[i] = Double.NaN</code> for each i in <code>nanPositions.</code>
*
* @param ranks array to modify
* @param nanPositions list of index values to set to <code>Double.NaN</code>
*/ | Set <code>ranks[i] = Double.NaN</code> for each i in <code>nanPositions.</code> | restoreNaNs | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_32/src/main/java/org/apache/commons/math3/stat/ranking/NaturalRanking.java",
"license": "gpl-2.0",
"size": 16038
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 695,047 |
public Processor getProcessor();
// public void setName(String name); | Processor function(); | /**
* Gets the processing item processor.
*
* @return Processor
*/ | Gets the processing item processor | getProcessor | {
"repo_name": "bhupeshchawda/incubator-samoa",
"path": "samoa-api/src/main/java/org/apache/samoa/topology/IProcessingItem.java",
"license": "apache-2.0",
"size": 1101
} | [
"org.apache.samoa.core.Processor"
] | import org.apache.samoa.core.Processor; | import org.apache.samoa.core.*; | [
"org.apache.samoa"
] | org.apache.samoa; | 2,096,422 |
protected XMLReader createXMLReader() {
try {
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
saxParserFactory.setNamespaceAware(true);
// disable validation, so dataset can still be used when a DTD or XSD is missing
disableValidatio... | XMLReader function() { try { SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); saxParserFactory.setNamespaceAware(true); disableValidation(saxParserFactory); return saxParserFactory.newSAXParser().getXMLReader(); } catch (Exception e) { throw new UnitilsException(STR, e); } } | /**
* Factory method for creating the SAX xml reader.
*
* @return the XML reader, not null
*/ | Factory method for creating the SAX xml reader | createXMLReader | {
"repo_name": "arteam/unitils",
"path": "unitils-dbunit/src/main/java/org/unitils/dbunit/util/MultiSchemaXmlDataSetReader.java",
"license": "apache-2.0",
"size": 11241
} | [
"javax.xml.parsers.SAXParserFactory",
"org.unitils.core.UnitilsException",
"org.xml.sax.XMLReader"
] | import javax.xml.parsers.SAXParserFactory; import org.unitils.core.UnitilsException; import org.xml.sax.XMLReader; | import javax.xml.parsers.*; import org.unitils.core.*; import org.xml.sax.*; | [
"javax.xml",
"org.unitils.core",
"org.xml.sax"
] | javax.xml; org.unitils.core; org.xml.sax; | 405,981 |
RestTemplate restTemplate = new RestTemplate();
List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>();
converters.add(new MappingJacksonHttpMessageConverter());
restTemplate.setMessageConverters(converters);
return restTemplate;
} | RestTemplate restTemplate = new RestTemplate(); List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>(); converters.add(new MappingJacksonHttpMessageConverter()); restTemplate.setMessageConverters(converters); return restTemplate; } | /**
* Factory method for creating a RestTemplate, which is a Spring helper class that simplifies making Rest calls onto
* a remote server. See http://blog.springsource.com/2009/03/27/rest-in-spring-3-resttemplate/ for more information
* on RestTemplates.
*
* @return a RestTemplate ready for use... | Factory method for creating a RestTemplate, which is a Spring helper class that simplifies making Rest calls onto a remote server. See HREF for more information on RestTemplates | restTemplate | {
"repo_name": "rokon12/sleepingkit-jfx",
"path": "sleepingkit-client/src/main/java/com/codexplo/sleepingkit/client/SimpleRestAppFactory.java",
"license": "mit",
"size": 6053
} | [
"java.util.ArrayList",
"java.util.List",
"org.springframework.http.converter.HttpMessageConverter",
"org.springframework.http.converter.json.MappingJacksonHttpMessageConverter",
"org.springframework.web.client.RestTemplate"
] | import java.util.ArrayList; import java.util.List; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter; import org.springframework.web.client.RestTemplate; | import java.util.*; import org.springframework.http.converter.*; import org.springframework.http.converter.json.*; import org.springframework.web.client.*; | [
"java.util",
"org.springframework.http",
"org.springframework.web"
] | java.util; org.springframework.http; org.springframework.web; | 1,067,469 |
public JarEntry getJarEntry() throws IOException {
return getJarFile().getJarEntry(entryName);
} | JarEntry function() throws IOException { return getJarFile().getJarEntry(entryName); } | /**
* Return the JAR entry object for this connection, if any. This
* method returns null if the JAR file URL corresponding to this
* connection points to a JAR file and not a JAR file entry.
*
* @return the JAR entry object for this connection, or null if
* the JAR URL for this connection... | Return the JAR entry object for this connection, if any. This method returns null if the JAR file URL corresponding to this connection points to a JAR file and not a JAR file entry | getJarEntry | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "src/java.base/share/classes/java/net/JarURLConnection.java",
"license": "gpl-2.0",
"size": 10117
} | [
"java.io.IOException",
"java.util.jar.JarEntry"
] | import java.io.IOException; import java.util.jar.JarEntry; | import java.io.*; import java.util.jar.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,528,392 |
public PlayerCredentials getCredentials() {
return credentials;
} | PlayerCredentials function() { return credentials; } | /**
* Gets the player's credentials.
*
* @return The player's credentials.
*/ | Gets the player's credentials | getCredentials | {
"repo_name": "Major-/apollo",
"path": "net/src/main/org/apollo/net/codec/login/LoginRequest.java",
"license": "isc",
"size": 2734
} | [
"org.apollo.util.security.PlayerCredentials"
] | import org.apollo.util.security.PlayerCredentials; | import org.apollo.util.security.*; | [
"org.apollo.util"
] | org.apollo.util; | 1,524,138 |
protected List<String> deleteObjects(List<String> keys) throws IOException {
List<String> result = new ArrayList<>();
for (String key : keys) {
boolean status = deleteObject(key);
// If key is a directory, it is possible that it was not created through Alluxio and no
// zero-byte breadcrumb ... | List<String> function(List<String> keys) throws IOException { List<String> result = new ArrayList<>(); for (String key : keys) { boolean status = deleteObject(key); if (status key.endsWith(getFolderSuffix())) { result.add(key); } } return result; } | /**
* Internal function to delete a list of keys.
*
* @param keys the list of keys to delete
* @return list of successfully deleted keys
*/ | Internal function to delete a list of keys | deleteObjects | {
"repo_name": "bf8086/alluxio",
"path": "core/common/src/main/java/alluxio/underfs/ObjectUnderFileSystem.java",
"license": "apache-2.0",
"size": 40864
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,352,317 |
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
throw logger.logExceptionAsError(new IllegalAr... | Configurable function(Duration defaultPollInterval) { this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, STR); if (this.defaultPollInterval.isNegative()) { throw logger.logExceptionAsError(new IllegalArgumentException(STR)); } return this; } | /**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
* @param defaultPollInterval the default poll interval.
* @return the configurable object itself.
*/ | Sets the default poll interval, used when service does not provide "Retry-After" header | withDefaultPollInterval | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/marketplaceordering/azure-resourcemanager-marketplaceordering/src/main/java/com/azure/resourcemanager/marketplaceordering/MarketplaceOrderingManager.java",
"license": "mit",
"size": 9881
} | [
"java.time.Duration",
"java.util.Objects"
] | import java.time.Duration; import java.util.Objects; | import java.time.*; import java.util.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 432,437 |
@RequiresPermission(Manifest.permission.CAMERA)
public CameraSource start(SurfaceHolder surfaceHolder) throws IOException {
synchronized (mCameraLock) {
if (mCamera != null) {
return this;
}
mCamera = createCamera();
mCamera.setPreviewDisp... | @RequiresPermission(Manifest.permission.CAMERA) CameraSource function(SurfaceHolder surfaceHolder) throws IOException { synchronized (mCameraLock) { if (mCamera != null) { return this; } mCamera = createCamera(); mCamera.setPreviewDisplay(surfaceHolder); mCamera.startPreview(); mProcessingThread = new Thread(mFrameProc... | /**
* Opens the camera and starts sending preview frames to the underlying detector. The supplied
* surface holder is used for the preview so frames can be displayed to the user.
*
* @param surfaceHolder the surface holder to use for the preview frames
* @throws IOException if the supplied sur... | Opens the camera and starts sending preview frames to the underlying detector. The supplied surface holder is used for the preview so frames can be displayed to the user | start | {
"repo_name": "franblas/trognon",
"path": "app/src/main/java/com/dntf/dntf/dntf/utils/CameraSource.java",
"license": "mit",
"size": 49160
} | [
"android.support.annotation.RequiresPermission",
"android.view.SurfaceHolder",
"java.io.IOException"
] | import android.support.annotation.RequiresPermission; import android.view.SurfaceHolder; import java.io.IOException; | import android.support.annotation.*; import android.view.*; import java.io.*; | [
"android.support",
"android.view",
"java.io"
] | android.support; android.view; java.io; | 1,620,063 |
public static final SourceModel.Expr unionTwoRanges(SourceModel.Expr r1, SourceModel.Expr r2) {
return
SourceModel.Expr.Application.make(
new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.unionTwoRanges), r1, r2});
}
public static final QualifiedName unionTwoRanges =
Quali... | static final SourceModel.Expr function(SourceModel.Expr r1, SourceModel.Expr r2) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.unionTwoRanges), r1, r2}); } static final QualifiedName function = QualifiedName.make(CAL_Range.MODULE_NAME, STR); } public static fina... | /**
* Unifies two ranges.
* <p>
* Returns <code>[unifiedRange]</code> if ranges overlap, or <code>[rangeA, rangeB]</code> in start order
* <p>
* Complexity: time O(1), space O(1)
*
* @param r1 (CAL type: <code>Cal.Core.Prelude.Ord a => Cal.Utilities.Range.Range a</code>)
* @param r2 (CA... | Unifies two ranges. Returns <code>[unifiedRange]</code> if ranges overlap, or <code>[rangeA, rangeB]</code> in start order Complexity: time O(1), space O(1) | unionTwoRanges | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Libraries/src/org/openquark/cal/module/Cal/Utilities/CAL_Range.java",
"license": "bsd-3-clause",
"size": 34986
} | [
"org.openquark.cal.compiler.QualifiedName",
"org.openquark.cal.compiler.SourceModel"
] | import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel; | import org.openquark.cal.compiler.*; | [
"org.openquark.cal"
] | org.openquark.cal; | 377,963 |
public void requestAddresses(String address, OnHttpRequestFinishedCallback context) {
// create a request
Request request = new AddressRequest(
context, address, "country:DE",
new ConnectionInformation("maps.googleapis.com", 443));
// create a request task
... | void function(String address, OnHttpRequestFinishedCallback context) { Request request = new AddressRequest( context, address, STR, new ConnectionInformation(STR, 443)); HttpRequestTask requestTask = new HttpRequestTask((Context) context); requestTask.execute(request); } | /**
* Method that creates and executes
* a {@link AddressRequest}.
* @param address the address
* @param context the context
*/ | Method that creates and executes a <code>AddressRequest</code> | requestAddresses | {
"repo_name": "andju/findlunch",
"path": "FindLunchApp/app/src/main/java/edu/hm/cs/projektstudium/findlunch/androidapp/rest/RequestHelper.java",
"license": "apache-2.0",
"size": 14508
} | [
"android.content.Context",
"edu.hm.cs.projektstudium.findlunch.androidapp.network.ConnectionInformation"
] | import android.content.Context; import edu.hm.cs.projektstudium.findlunch.androidapp.network.ConnectionInformation; | import android.content.*; import edu.hm.cs.projektstudium.findlunch.androidapp.network.*; | [
"android.content",
"edu.hm.cs"
] | android.content; edu.hm.cs; | 1,077,356 |
EReference getDocumentRoot_GetCapabilities(); | EReference getDocumentRoot_GetCapabilities(); | /**
* Returns the meta object for the containment reference '{@link net.opengis.ows20.DocumentRoot#getGetCapabilities <em>Get Capabilities</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Get Capabilities</em>'.
* @see net.opengis.ow... | Returns the meta object for the containment reference '<code>net.opengis.ows20.DocumentRoot#getGetCapabilities Get Capabilities</code>'. | getDocumentRoot_GetCapabilities | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.ows/src/net/opengis/ows20/Ows20Package.java",
"license": "lgpl-2.1",
"size": 356067
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,706,290 |
@Test
void testFunctionArgumentOrder() throws Exception
{
String functionText = "{ pop }";
// pops an argument (2nd) and returns the next argument (1st)
PDFunctionType4 function = createFunction(functionText,
new float[] {-1.0f, 1.0f, -1.0f, 1.0f},
ne... | void testFunctionArgumentOrder() throws Exception { String functionText = STR; PDFunctionType4 function = createFunction(functionText, new float[] {-1.0f, 1.0f, -1.0f, 1.0f}, new float[] {-1.0f, 1.0f}); float[] input = new float[] {-0.7f, 0.0f }; float[] output = function.eval(input); assertEquals(1, output.length); as... | /**
* Checks the handling of the argument order for a {@link PDFunctionType4}.
* @throws Exception if an error occurs
*/ | Checks the handling of the argument order for a <code>PDFunctionType4</code> | testFunctionArgumentOrder | {
"repo_name": "kalaspuffar/pdfbox",
"path": "pdfbox/src/test/java/org/apache/pdfbox/pdmodel/common/function/TestPDFunctionType4.java",
"license": "apache-2.0",
"size": 3661
} | [
"org.junit.jupiter.api.Assertions"
] | import org.junit.jupiter.api.Assertions; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 719,124 |
@Deprecated
public static void setLocalArchives(Configuration conf, String str) {
conf.set(CACHE_LOCALARCHIVES, str);
} | static void function(Configuration conf, String str) { conf.set(CACHE_LOCALARCHIVES, str); } | /**
* Set the conf to contain the location for localized archives. Used
* by internal DistributedCache code.
* @param conf The conf to modify to contain the localized caches
* @param str a comma separated list of local archives
*/ | Set the conf to contain the location for localized archives. Used by internal DistributedCache code | setLocalArchives | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/filecache/DistributedCache.java",
"license": "apache-2.0",
"size": 12861
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,364,948 |
Collection<Module> getModules() {
return modules;
} | Collection<Module> getModules() { return modules; } | /**
* don't expose {@link #modules}; if the modules are needed at some point, make sure to clone
* the collection first.
*/ | don't expose <code>#modules</code>; if the modules are needed at some point, make sure to clone the collection first | getModules | {
"repo_name": "ronshapiro/albus-android",
"path": "library/src/main/java/me/ronshapiro/albus/android/Albus.java",
"license": "apache-2.0",
"size": 3667
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,056,900 |
public Computed getComputed ()
{
return _computed;
} | Computed function () { return _computed; } | /**
* Returns the Computed annotation on this field, if any.
*/ | Returns the Computed annotation on this field, if any | getComputed | {
"repo_name": "threerings/depot",
"path": "src/main/java/com/samskivert/depot/impl/FieldMarshaller.java",
"license": "bsd-3-clause",
"size": 36029
} | [
"com.samskivert.depot.annotation.Computed"
] | import com.samskivert.depot.annotation.Computed; | import com.samskivert.depot.annotation.*; | [
"com.samskivert.depot"
] | com.samskivert.depot; | 2,297,498 |
private boolean indexIsInFieldList(FormIndex index) {
int event = getEvent(index);
if (event == FormEntryController.EVENT_QUESTION) {
// caption[0..len-1]
// caption[len-1] == the question itself
// caption[len-2] == the first group it is contained in.
... | boolean function(FormIndex index) { int event = getEvent(index); if (event == FormEntryController.EVENT_QUESTION) { FormEntryCaption[] captions = getCaptionHierarchy(index); if (captions.length < 2) { return false; } FormEntryCaption grp = captions[captions.length - 2]; return groupIsFieldList(grp.getIndex()); } else i... | /**
* Tests if the FormIndex 'index' is located inside a group that is marked as a "field-list"
*
* @param index
* @return true if index is in a "field-list". False otherwise.
*/ | Tests if the FormIndex 'index' is located inside a group that is marked as a "field-list" | indexIsInFieldList | {
"repo_name": "smap-consulting/ODK1.4_lib",
"path": "src/org/odk/collect/android/logic/FormController.java",
"license": "apache-2.0",
"size": 44030
} | [
"org.javarosa.core.model.FormIndex",
"org.javarosa.form.api.FormEntryCaption",
"org.javarosa.form.api.FormEntryController"
] | import org.javarosa.core.model.FormIndex; import org.javarosa.form.api.FormEntryCaption; import org.javarosa.form.api.FormEntryController; | import org.javarosa.core.model.*; import org.javarosa.form.api.*; | [
"org.javarosa.core",
"org.javarosa.form"
] | org.javarosa.core; org.javarosa.form; | 2,060,290 |
SparkPipelineOptions options = PipelineOptionsFactory.as(SparkPipelineOptions.class);
options.setRunner(SparkRunner.class);
return new SparkRunner(options);
} | SparkPipelineOptions options = PipelineOptionsFactory.as(SparkPipelineOptions.class); options.setRunner(SparkRunner.class); return new SparkRunner(options); } | /**
* Creates and returns a new SparkRunner with default options. In particular, against a
* spark instance running in local mode.
*
* @return A pipeline runner with default options.
*/ | Creates and returns a new SparkRunner with default options. In particular, against a spark instance running in local mode | create | {
"repo_name": "tweise/beam",
"path": "runners/spark/src/main/java/org/apache/beam/runners/spark/SparkRunner.java",
"license": "apache-2.0",
"size": 10534
} | [
"org.apache.beam.sdk.options.PipelineOptionsFactory"
] | import org.apache.beam.sdk.options.PipelineOptionsFactory; | import org.apache.beam.sdk.options.*; | [
"org.apache.beam"
] | org.apache.beam; | 352,216 |
@Override
public ITileLayer createTileLayer(final TileCache tileCache, final IMapViewPosition mapViewPosition) {
final List<MapFile> mapFiles = new ArrayList<>();
for (ImmutablePair<String, Uri> fileName : mapUris) {
final MapFile mf = createMapFile(fileName.right... | ITileLayer function(final TileCache tileCache, final IMapViewPosition mapViewPosition) { final List<MapFile> mapFiles = new ArrayList<>(); for (ImmutablePair<String, Uri> fileName : mapUris) { final MapFile mf = createMapFile(fileName.right); if (mf != null) { mapFiles.add(mf); } else { MapsforgeMapProvider.getInstance... | /**
* Create new render layer, if mapfiles exist
*/ | Create new render layer, if mapfiles exist | createTileLayer | {
"repo_name": "S-Bartfast/cgeo",
"path": "main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java",
"license": "apache-2.0",
"size": 14876
} | [
"android.net.Uri",
"java.util.ArrayList",
"java.util.List",
"org.apache.commons.lang3.tuple.ImmutablePair",
"org.mapsforge.map.android.graphics.AndroidGraphicFactory",
"org.mapsforge.map.layer.cache.TileCache",
"org.mapsforge.map.model.IMapViewPosition",
"org.mapsforge.map.reader.MapFile"
] | import android.net.Uri; import java.util.ArrayList; import java.util.List; import org.apache.commons.lang3.tuple.ImmutablePair; import org.mapsforge.map.android.graphics.AndroidGraphicFactory; import org.mapsforge.map.layer.cache.TileCache; import org.mapsforge.map.model.IMapViewPosition; import org.mapsforge.map.reade... | import android.net.*; import java.util.*; import org.apache.commons.lang3.tuple.*; import org.mapsforge.map.android.graphics.*; import org.mapsforge.map.layer.cache.*; import org.mapsforge.map.model.*; import org.mapsforge.map.reader.*; | [
"android.net",
"java.util",
"org.apache.commons",
"org.mapsforge.map"
] | android.net; java.util; org.apache.commons; org.mapsforge.map; | 2,883,385 |
public void onPull(float deltaDistance) {
final long now = AnimationUtils.currentAnimationTimeMillis();
if (mState == STATE_PULL_DECAY && now - mStartTime < mDuration) {
return;
}
if (mState != STATE_PULL) {
mGlowScaleY = PULL_GLOW_BEGIN;
}
mSt... | void function(float deltaDistance) { final long now = AnimationUtils.currentAnimationTimeMillis(); if (mState == STATE_PULL_DECAY && now - mStartTime < mDuration) { return; } if (mState != STATE_PULL) { mGlowScaleY = PULL_GLOW_BEGIN; } mState = STATE_PULL; mStartTime = now; mDuration = PULL_TIME; mPullDistance += delta... | /**
* A view should call this when content is pulled away from an edge by the user.
* This will update the state of the current visual effect and its associated animation.
* The host view should always {@link android.view.View#invalidate()} after this
* and draw the results accordingly.
*
... | A view should call this when content is pulled away from an edge by the user. This will update the state of the current visual effect and its associated animation. The host view should always <code>android.view.View#invalidate()</code> after this and draw the results accordingly | onPull | {
"repo_name": "TShapinsky/droidplanner",
"path": "Libraries/HorizontalVariableListView/HorizontalVariableListView/src/it/sephiroth/android/library/widget/EdgeEffect.java",
"license": "gpl-3.0",
"size": 16614
} | [
"android.view.animation.AnimationUtils"
] | import android.view.animation.AnimationUtils; | import android.view.animation.*; | [
"android.view"
] | android.view; | 2,821,732 |
public static boolean deleteFolder(String folderPath) throws InvalidKeyException, NoSuchAlgorithmException, IOException {
boolean isFolderDeletedSuccessfully = false;
if(folderPath == null || folderPath.length() == 0) {
throw new IllegalArgumentException("Folder path cannot be null or empty");
}
... | static boolean function(String folderPath) throws InvalidKeyException, NoSuchAlgorithmException, IOException { boolean isFolderDeletedSuccessfully = false; if(folderPath == null folderPath.length() == 0) { throw new IllegalArgumentException(STR); } String strURL = FOLDER_URI + Uri.encode(folderPath); String signedURL =... | /**
* Delete an empty folder from the storage. Use "FolderName/SubFolderName" for sub folders.
* @param folderPath Folder path
* @return Boolean variable indicates whether folder deleted successfully
*/ | Delete an empty folder from the storage. Use "FolderName/SubFolderName" for sub folders | deleteFolder | {
"repo_name": "asposeforcloud/Aspose_Cloud_SDK_For_Android",
"path": "asposecloudsdk/src/main/java/com/aspose/cloud/sdk/storage/api/Folder.java",
"license": "mit",
"size": 13073
} | [
"android.net.Uri",
"com.aspose.cloud.sdk.common.BaseResponse",
"com.aspose.cloud.sdk.common.Utils",
"com.google.gson.Gson",
"java.io.IOException",
"java.io.InputStream",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException"
] | import android.net.Uri; import com.aspose.cloud.sdk.common.BaseResponse; import com.aspose.cloud.sdk.common.Utils; import com.google.gson.Gson; import java.io.IOException; import java.io.InputStream; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; | import android.net.*; import com.aspose.cloud.sdk.common.*; import com.google.gson.*; import java.io.*; import java.security.*; | [
"android.net",
"com.aspose.cloud",
"com.google.gson",
"java.io",
"java.security"
] | android.net; com.aspose.cloud; com.google.gson; java.io; java.security; | 2,522,964 |
public ServiceCall upgradeOSAsync(String poolId, String targetOSVersion, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
}
if (poolId ... | ServiceCall function(String poolId, String targetOSVersion, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } if (poolId == null) { serviceCallback.failure(new IllegalArgumentException(STR)); return null; } if (this.c... | /**
* Upgrades the operating system of the specified pool.
*
* @param poolId The id of the pool to upgrade.
* @param targetOSVersion The Azure Guest OS version to be installed on the virtual machines in the pool.
* @param serviceCallback the async ServiceCallback to handle successful and failed... | Upgrades the operating system of the specified pool | upgradeOSAsync | {
"repo_name": "pomortaz/azure-sdk-for-java",
"path": "azure-batch/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java",
"license": "mit",
"size": 237401
} | [
"com.microsoft.azure.batch.protocol.models.PoolUpgradeOSOptions",
"com.microsoft.azure.batch.protocol.models.PoolUpgradeOSParameter",
"com.microsoft.rest.DateTimeRfc1123",
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"org.joda.time.DateTime"
] | import com.microsoft.azure.batch.protocol.models.PoolUpgradeOSOptions; import com.microsoft.azure.batch.protocol.models.PoolUpgradeOSParameter; import com.microsoft.rest.DateTimeRfc1123; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import org.joda.time.DateTime; | import com.microsoft.azure.batch.protocol.models.*; import com.microsoft.rest.*; import org.joda.time.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"org.joda.time"
] | com.microsoft.azure; com.microsoft.rest; org.joda.time; | 657,947 |
@JmxOperation(description = "swapFiles changes this store to use the new data directory")
public void swapFiles(String newStoreDirectory) {
logger.info("Swapping files for store '" + getName() + "' to " + newStoreDirectory);
File newVersionDir = new File(newStoreDirectory);
if(!newVersi... | @JmxOperation(description = STR) void function(String newStoreDirectory) { logger.info(STR + getName() + STR + newStoreDirectory); File newVersionDir = new File(newStoreDirectory); if(!newVersionDir.exists()) throw new VoldemortException(STR + newVersionDir.getAbsolutePath() + STR); if(!(newVersionDir.getParentFile().c... | /**
* Swap the current version folder for a new one
*
* @param newStoreDirectory The path to the new version directory
*/ | Swap the current version folder for a new one | swapFiles | {
"repo_name": "medallia/voldemort",
"path": "src/java/voldemort/store/readonly/ReadOnlyStorageEngine.java",
"license": "apache-2.0",
"size": 24794
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 574,567 |
EAttribute getBooleanBinaryExpression_Operator(); | EAttribute getBooleanBinaryExpression_Operator(); | /**
* Returns the meta object for the attribute '{@link activitydiagram.BooleanBinaryExpression#getOperator <em>Operator</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Operator</em>'.
* @see activitydiagram.BooleanBinaryExpression#getOperator()
* @... | Returns the meta object for the attribute '<code>activitydiagram.BooleanBinaryExpression#getOperator Operator</code>'. | getBooleanBinaryExpression_Operator | {
"repo_name": "gemoc/activitydiagram",
"path": "dev/gemoc_sequential/language_workbench/org.gemoc.activitydiagram.sequential.model/src/activitydiagram/ActivitydiagramPackage.java",
"license": "epl-1.0",
"size": 91129
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,770,931 |
// TODO creation should be removed from SLUG header to json
@POST
@Path(OrionConstantValues.ORION_IMPORT_PATH + "{userWorkspace}/{containerName}/{parentPath}")
@Fallback(SameFileWithDiffTypeFallback.class)
@Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD, OrionHttpFields.ORION_XFER_OPTIONS }, values = {
... | @Path(OrionConstantValues.ORION_IMPORT_PATH + STR) @Fallback(SameFileWithDiffTypeFallback.class) @Headers(keys = { OrionHttpFields.ORION_VERSION_FIELD, OrionHttpFields.ORION_XFER_OPTIONS }, values = { OrionConstantValues.ORION_VERSION, OrionConstantValues.XFER_RAW }) boolean createBlob(@PathParam(STR) String userWorksp... | /**
* This method creates an empty file/folder depending on the request
* parameters.
*
* If a file/folder with the same name exists, it is removed and replaced
* with the requested type.
*
* @param userWorkspace
* @param containerName
* @param parentPath
* @param blob
* @return
*/ | This method creates an empty file/folder depending on the request parameters. If a file/folder with the same name exists, it is removed and replaced with the requested type | createBlob | {
"repo_name": "timur87/orion-jclouds",
"path": "src/main/java/org/jclouds/orion/OrionApi.java",
"license": "apache-2.0",
"size": 18819
} | [
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"org.jclouds.orion.blobstore.binders.BlobCreationBinder",
"org.jclouds.orion.blobstore.fallbacks.SameFileWithDiffTypeFallback",
"org.jclouds.orion.blobstore.functions.parsers.param.EncodeBlobParentPathParamParser",
"org.jclouds.orion.blobstore.validators.BlobNa... | import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.jclouds.orion.blobstore.binders.BlobCreationBinder; import org.jclouds.orion.blobstore.fallbacks.SameFileWithDiffTypeFallback; import org.jclouds.orion.blobstore.functions.parsers.param.EncodeBlobParentPathParamParser; import org.jclouds.orion.blobstore.... | import javax.ws.rs.*; import org.jclouds.orion.blobstore.binders.*; import org.jclouds.orion.blobstore.fallbacks.*; import org.jclouds.orion.blobstore.functions.parsers.param.*; import org.jclouds.orion.blobstore.validators.*; import org.jclouds.orion.config.constans.*; import org.jclouds.orion.domain.*; import org.jcl... | [
"javax.ws",
"org.jclouds.orion",
"org.jclouds.rest"
] | javax.ws; org.jclouds.orion; org.jclouds.rest; | 2,464,636 |
public void message(Player player, String message){
if (player != null){
String pre = stripNull(prefix);
String suf = stripNull(suffix);
player.sendMessage(pre + message + suf);
}
}
| void function(Player player, String message){ if (player != null){ String pre = stripNull(prefix); String suf = stripNull(suffix); player.sendMessage(pre + message + suf); } } | /**
* Message a Player a message, includes prefix and suffix.
* @param Player player
* @param String message
*/ | Message a Player a message, includes prefix and suffix | message | {
"repo_name": "comdude2/ComLibrary",
"path": "src/net/comdude2/plugins/comlibrary/util/Messenger.java",
"license": "gpl-3.0",
"size": 2998
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 2,540,924 |
public boolean unRegisterClient(Integer clientID) throws RemoteException
{
ILiveBeansClient client = getClientByID(clientID);
if (client == null)
{
return false;
}
if (_connectedClients.containsValue(client))
{
_clientHeartbeats.remove(cl... | boolean function(Integer clientID) throws RemoteException { ILiveBeansClient client = getClientByID(clientID); if (client == null) { return false; } if (_connectedClients.containsValue(client)) { _clientHeartbeats.remove(clientID); _connectedClients.remove(clientID); System.out.println(STR); return true; } else { Syste... | /**
* Unregisters a client with the server
*
* @param clientID The ID of the client to unregister
* @return Returns true if successful, false if otherwise
* @throws RemoteException
*/ | Unregisters a client with the server | unRegisterClient | {
"repo_name": "ldawkes/LiveBeans",
"path": "LiveBeansServer/src/livebeansserver/LiveBeansServer.java",
"license": "apache-2.0",
"size": 13859
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 129,234 |
public static void closeQuietly(final Session session)
{
if (session == null) return;
try
{
session.close();
}
catch (Throwable t)
{
// ignore
}
} | static void function(final Session session) { if (session == null) return; try { session.close(); } catch (Throwable t) { } } | /**
* Unconditionally close a <code>Session</code>
*
* @param session the session to be closed
*/ | Unconditionally close a <code>Session</code> | closeQuietly | {
"repo_name": "jbvanzuylen/cf-jms-gateway",
"path": "src/org/primeoservices/cfgateway/jms/utils/JMSUtils.java",
"license": "apache-2.0",
"size": 5629
} | [
"javax.jms.Session"
] | import javax.jms.Session; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 2,169,780 |
private String checkPathAtRoot(PathToCheck ptc, NodeState root, boolean checkBinaries) {
String result = null;
for (String corruptPath : ptc.corruptPaths) {
try {
NodeWrapper wrapper = NodeWrapper.deriveTraversableNodeOnPath(root, corruptPath);
result = c... | String function(PathToCheck ptc, NodeState root, boolean checkBinaries) { String result = null; for (String corruptPath : ptc.corruptPaths) { try { NodeWrapper wrapper = NodeWrapper.deriveTraversableNodeOnPath(root, corruptPath); result = checkNode(wrapper.node, wrapper.path, checkBinaries); if (result != null) { retur... | /**
* Checks the consistency of the supplied {@code ptc} relative to the given {@code root}.
*
* @param ptc path to check, provided there are no corrupt paths.
* @param root root relative to which the path is retrieved
* @param checkBinaries if {@code true} full content of ... | Checks the consistency of the supplied ptc relative to the given root | checkPathAtRoot | {
"repo_name": "alexkli/jackrabbit-oak",
"path": "oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tooling/ConsistencyChecker.java",
"license": "apache-2.0",
"size": 24851
} | [
"org.apache.jackrabbit.oak.spi.state.NodeState"
] | import org.apache.jackrabbit.oak.spi.state.NodeState; | import org.apache.jackrabbit.oak.spi.state.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 1,910,883 |
public void rollbackAuditCoreCreation(TenantRelationalContext relationalContext, TenantInfo tenantInfo) {
rollbackCoreCreation(relationalContext.getDatabaseName(), tenantInfo);
} | void function(TenantRelationalContext relationalContext, TenantInfo tenantInfo) { rollbackCoreCreation(relationalContext.getDatabaseName(), tenantInfo); } | /**
* Rollback audit core creation.
*
* @param relationalContext
* the relational context
* @param tenantInfo
* the tenant info
*/ | Rollback audit core creation | rollbackAuditCoreCreation | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/platform/tenant/tenant-audit-integration/src/main/java/com/sirma/itt/seip/tenant/audit/AuditSolrProvisioning.java",
"license": "lgpl-3.0",
"size": 15946
} | [
"com.sirma.itt.seip.tenant.context.TenantInfo",
"com.sirma.itt.seip.tenant.db.TenantRelationalContext"
] | import com.sirma.itt.seip.tenant.context.TenantInfo; import com.sirma.itt.seip.tenant.db.TenantRelationalContext; | import com.sirma.itt.seip.tenant.context.*; import com.sirma.itt.seip.tenant.db.*; | [
"com.sirma.itt"
] | com.sirma.itt; | 1,978,656 |
public void snapshot(String snapshotName, String columnFamilyName) throws IOException
{
snapshot(snapshotName, columnFamilyName, false, null, null, Instant.now());
} | void function(String snapshotName, String columnFamilyName) throws IOException { snapshot(snapshotName, columnFamilyName, false, null, null, Instant.now()); } | /**
* Take a snapshot of the specific column family, or the entire set of column families
* if columnFamily is null with a given timestamp
*
* @param snapshotName the tag associated with the name of the snapshot. This value may not be null
* @param columnFamilyName the column family to sna... | Take a snapshot of the specific column family, or the entire set of column families if columnFamily is null with a given timestamp | snapshot | {
"repo_name": "adelapena/cassandra",
"path": "src/java/org/apache/cassandra/db/Keyspace.java",
"license": "apache-2.0",
"size": 32920
} | [
"java.io.IOException",
"java.time.Instant"
] | import java.io.IOException; import java.time.Instant; | import java.io.*; import java.time.*; | [
"java.io",
"java.time"
] | java.io; java.time; | 2,471,487 |
public void onDiscovery(SchemaAbstractDiscoveryMessage msg) {
IgniteUuid id = msg.id();
if (!dscoMsgIdHist.add(id)) {
U.warn(log, "Received duplicate schema custom discovery message (will ignore) [opId=" +
msg.operation().id() + ", msg=" + msg +']');
return... | void function(SchemaAbstractDiscoveryMessage msg) { IgniteUuid id = msg.id(); if (!dscoMsgIdHist.add(id)) { U.warn(log, STR + msg.operation().id() + STR + msg +']'); return; } if (msg instanceof SchemaProposeDiscoveryMessage) { SchemaProposeDiscoveryMessage msg0 = (SchemaProposeDiscoveryMessage)msg; boolean exchange = ... | /**
* Handle custom discovery message.
*
* @param msg Message.
*/ | Handle custom discovery message | onDiscovery | {
"repo_name": "BiryukovVA/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java",
"license": "apache-2.0",
"size": 115527
} | [
"org.apache.ignite.internal.processors.query.schema.message.SchemaAbstractDiscoveryMessage",
"org.apache.ignite.internal.processors.query.schema.message.SchemaFinishDiscoveryMessage",
"org.apache.ignite.internal.processors.query.schema.message.SchemaProposeDiscoveryMessage",
"org.apache.ignite.internal.util.t... | import org.apache.ignite.internal.processors.query.schema.message.SchemaAbstractDiscoveryMessage; import org.apache.ignite.internal.processors.query.schema.message.SchemaFinishDiscoveryMessage; import org.apache.ignite.internal.processors.query.schema.message.SchemaProposeDiscoveryMessage; import org.apache.ignite.inte... | import org.apache.ignite.internal.processors.query.schema.message.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lang.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 275,831 |
public static IndexComponent createFromDynamicColumn(NameComponentDescription rowKeyDesc,
String dynamicColumnComponentName) {
return new IndexComponent(Preconditions.checkNotNull(rowKeyDesc),
null, Preconditions.checkNotNull(dynamicCo... | static IndexComponent function(NameComponentDescription rowKeyDesc, String dynamicColumnComponentName) { return new IndexComponent(Preconditions.checkNotNull(rowKeyDesc), null, Preconditions.checkNotNull(dynamicColumnComponentName), null, null, false); } | /**
* This takes an existing dynamic column component and uses it in the index.
*/ | This takes an existing dynamic column component and uses it in the index | createFromDynamicColumn | {
"repo_name": "sh4nth/atlasdb-1",
"path": "atlasdb-client/src/main/java/com/palantir/atlasdb/table/description/IndexComponent.java",
"license": "bsd-3-clause",
"size": 5759
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,461,230 |
public void setFunctor(Functor functor)
{
myFunctor = functor;
} | void function(Functor functor) { myFunctor = functor; } | /**
* Write the functor property.
*
* @param functor
* the functor to set
*/ | Write the functor property | setFunctor | {
"repo_name": "sporniket/core",
"path": "sporniket-core-ui/src/main/java/com/sporniket/libre/ui/action/FunctorBasedAction.java",
"license": "lgpl-3.0",
"size": 2165
} | [
"com.sporniket.libre.lang.functor.Functor"
] | import com.sporniket.libre.lang.functor.Functor; | import com.sporniket.libre.lang.functor.*; | [
"com.sporniket.libre"
] | com.sporniket.libre; | 852,326 |
public void testSecretKeyFactory07() throws NoSuchAlgorithmException {
if (!DEFSupported) {
fail(NotSupportMsg);
return;
}
try {
SecretKeyFactory.getInstance(null, defaultProvider);
fail("NullPointerException or NoSuchAlgorithmException should ... | void function() throws NoSuchAlgorithmException { if (!DEFSupported) { fail(NotSupportMsg); return; } try { SecretKeyFactory.getInstance(null, defaultProvider); fail(STR); } catch (NullPointerException e) { } catch (NoSuchAlgorithmException e) { } for (int i = 0; i < invalidValues.length; i++) { try { SecretKeyFactory.... | /**
* Test for <code>getInstance(String algorithm, Provider provider)</code>
* method
* Assertion: throws NullPointerException when algorithm is null;
* throws NoSuchAlgorithmException when algorithm is invalid
*/ | Test for <code>getInstance(String algorithm, Provider provider)</code> method Assertion: throws NullPointerException when algorithm is null; throws NoSuchAlgorithmException when algorithm is invalid | testSecretKeyFactory07 | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/SecretKeyFactoryTest.java",
"license": "gpl-3.0",
"size": 16414
} | [
"java.security.NoSuchAlgorithmException",
"javax.crypto.SecretKeyFactory"
] | import java.security.NoSuchAlgorithmException; import javax.crypto.SecretKeyFactory; | import java.security.*; import javax.crypto.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 2,856,598 |
public static Trees instance(ProcessingEnvironment env) {
if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment"))
throw new IllegalArgumentException();
return getJavacTrees(ProcessingEnvironment.class, env);
} | static Trees function(ProcessingEnvironment env) { if (!env.getClass().getName().equals(STR)) throw new IllegalArgumentException(); return getJavacTrees(ProcessingEnvironment.class, env); } | /**
* Gets a Trees object for a given ProcessingEnvironment.
* @param env the processing environment for which to get the Trees object
* @throws IllegalArgumentException if the env does not support the Trees API.
*/ | Gets a Trees object for a given ProcessingEnvironment | instance | {
"repo_name": "reprogrammer/jsr308-langtools",
"path": "src/share/classes/com/sun/source/util/Trees.java",
"license": "gpl-2.0",
"size": 8691
} | [
"javax.annotation.processing.ProcessingEnvironment"
] | import javax.annotation.processing.ProcessingEnvironment; | import javax.annotation.processing.*; | [
"javax.annotation"
] | javax.annotation; | 71,872 |
public VirtualHostBuilder decorator(
Route route, DecoratingHttpServiceFunction decoratingHttpServiceFunction) {
requireNonNull(decoratingHttpServiceFunction, "decoratingHttpServiceFunction");
return decorator(route, delegate -> new FunctionalDecoratingHttpService(
delega... | VirtualHostBuilder function( Route route, DecoratingHttpServiceFunction decoratingHttpServiceFunction) { requireNonNull(decoratingHttpServiceFunction, STR); return decorator(route, delegate -> new FunctionalDecoratingHttpService( delegate, decoratingHttpServiceFunction)); } | /**
* Decorates {@link HttpService}s whose {@link Route} matches the specified {@link Route}.
*
* @param route the route being decorated
* @param decoratingHttpServiceFunction the {@link DecoratingHttpServiceFunction} that decorates
* {@link HttpService}s
... | Decorates <code>HttpService</code>s whose <code>Route</code> matches the specified <code>Route</code> | decorator | {
"repo_name": "minwoox/armeria",
"path": "core/src/main/java/com/linecorp/armeria/server/VirtualHostBuilder.java",
"license": "apache-2.0",
"size": 47502
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 1,101,621 |
public double getScoreFromRange(double value, Set<ScoringRange> scoringRange) {
for (ScoringRange range : scoringRange)
{
if (range.withinRange(value))
{
return range.getScorePoints();
}
}
return 0.0;
} | double function(double value, Set<ScoringRange> scoringRange) { for (ScoringRange range : scoringRange) { if (range.withinRange(value)) { return range.getScorePoints(); } } return 0.0; } | /**
* Determine what the bucketed score is for a particular value.
* @param value The raw value
* @param scoringRange The min, max, and buckets for all scoring ranges
* @return The points from the scoring range for this raw score
*/ | Determine what the bucketed score is for a particular value | getScoreFromRange | {
"repo_name": "dmillett/prank",
"path": "src/main/java/net/prank/tools/ScoringTool.java",
"license": "apache-2.0",
"size": 13647
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,226,842 |
public static void testUpdate(GeoPackage geoPackage) throws SQLException {
DataColumnsDao dao = geoPackage.getDataColumnsDao();
if (dao.isTableExists()) {
List<DataColumns> results = dao.queryForAll();
if (!results.isEmpty()) {
// Choose random data contents
int random = (int) (Math.random() * r... | static void function(GeoPackage geoPackage) throws SQLException { DataColumnsDao dao = geoPackage.getDataColumnsDao(); if (dao.isTableExists()) { List<DataColumns> results = dao.queryForAll(); if (!results.isEmpty()) { int random = (int) (Math.random() * results.size()); DataColumns dataColumns = results.get(random); S... | /**
* Test update
*
* @param geoPackage
* @throws SQLException
*/ | Test update | testUpdate | {
"repo_name": "boundlessgeo/geopackage-java",
"path": "src/test/java/mil/nga/geopackage/test/schema/columns/DataColumnsUtils.java",
"license": "mit",
"size": 14562
} | [
"com.j256.ormlite.stmt.PreparedQuery",
"com.j256.ormlite.stmt.PreparedUpdate",
"com.j256.ormlite.stmt.QueryBuilder",
"com.j256.ormlite.stmt.UpdateBuilder",
"java.sql.SQLException",
"java.util.List",
"junit.framework.TestCase",
"mil.nga.geopackage.GeoPackage",
"mil.nga.geopackage.schema.TableColumnKe... | import com.j256.ormlite.stmt.PreparedQuery; import com.j256.ormlite.stmt.PreparedUpdate; import com.j256.ormlite.stmt.QueryBuilder; import com.j256.ormlite.stmt.UpdateBuilder; import java.sql.SQLException; import java.util.List; import junit.framework.TestCase; import mil.nga.geopackage.GeoPackage; import mil.nga.geopa... | import com.j256.ormlite.stmt.*; import java.sql.*; import java.util.*; import junit.framework.*; import mil.nga.geopackage.*; import mil.nga.geopackage.schema.*; import mil.nga.geopackage.schema.columns.*; import mil.nga.geopackage.test.*; | [
"com.j256.ormlite",
"java.sql",
"java.util",
"junit.framework",
"mil.nga.geopackage"
] | com.j256.ormlite; java.sql; java.util; junit.framework; mil.nga.geopackage; | 106,980 |
public static Type extractTypeFromLambda(
LambdaExecutable exec,
int[] lambdaTypeArgumentIndices,
int paramLen,
int baseParametersLen) {
Type output = exec.getParameterTypes()[paramLen - baseParametersLen + lambdaTypeArgumentIndices[0]];
for (int i = 1; i < lambdaTypeArgumentIndices.length; i++) {
out... | static Type function( LambdaExecutable exec, int[] lambdaTypeArgumentIndices, int paramLen, int baseParametersLen) { Type output = exec.getParameterTypes()[paramLen - baseParametersLen + lambdaTypeArgumentIndices[0]]; for (int i = 1; i < lambdaTypeArgumentIndices.length; i++) { output = extractTypeArgument(output, lamb... | /**
* Extracts type from given index from lambda. It supports nested types.
*
* @param exec lambda function to extract the type from
* @param lambdaTypeArgumentIndices position of type to extract in type hierarchy
* @param paramLen count of total parameters of the lambda (including closure parameters)
* @pa... | Extracts type from given index from lambda. It supports nested types | extractTypeFromLambda | {
"repo_name": "zohar-mizrahi/flink",
"path": "flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractionUtils.java",
"license": "apache-2.0",
"size": 10148
} | [
"java.lang.reflect.Type"
] | import java.lang.reflect.Type; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,045,890 |
public String[] getResources() {
ContextResource[] resources =
((NamingResources)this.resource).findResources();
ArrayList results = new ArrayList();
for (int i = 0; i < resources.length; i++) {
try {
ObjectName oname =
... | String[] function() { ContextResource[] resources = ((NamingResources)this.resource).findResources(); ArrayList results = new ArrayList(); for (int i = 0; i < resources.length; i++) { try { ObjectName oname = MBeanUtils.createObjectName(managed.getDomain(), resources[i]); results.add(oname.toString()); } catch (Malform... | /**
* Return the MBean Names of all the defined resource references for this
* application.
*/ | Return the MBean Names of all the defined resource references for this application | getResources | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/NamingResourcesMBean.java",
"license": "apache-2.0",
"size": 13315
} | [
"java.util.ArrayList",
"javax.management.MalformedObjectNameException",
"javax.management.ObjectName",
"org.apache.catalina.deploy.ContextResource",
"org.apache.catalina.deploy.NamingResources"
] | import java.util.ArrayList; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import org.apache.catalina.deploy.ContextResource; import org.apache.catalina.deploy.NamingResources; | import java.util.*; import javax.management.*; import org.apache.catalina.deploy.*; | [
"java.util",
"javax.management",
"org.apache.catalina"
] | java.util; javax.management; org.apache.catalina; | 810,969 |
protected void flush()
throws IOException {
if (outputBuffer.position() > 0) {
if (Socket.sendbb(socket, 0, outputBuffer.position()) < 0) {
throw new IOException(MESSAGES.failedWrite());
}
outputBuffer.clear();
}
}
// ------------... | void function() throws IOException { if (outputBuffer.position() > 0) { if (Socket.sendbb(socket, 0, outputBuffer.position()) < 0) { throw new IOException(MESSAGES.failedWrite()); } outputBuffer.clear(); } } protected class SocketInputBuffer implements InputBuffer { | /**
* Callback to write data from the buffer.
*/ | Callback to write data from the buffer | flush | {
"repo_name": "johnaoahra80/JBOSSWEB_7_5_0_FINAL",
"path": "src/main/java/org/apache/coyote/ajp/AjpAprProcessor.java",
"license": "apache-2.0",
"size": 43426
} | [
"java.io.IOException",
"org.apache.coyote.InputBuffer",
"org.apache.tomcat.jni.Socket",
"org.jboss.web.CoyoteMessages"
] | import java.io.IOException; import org.apache.coyote.InputBuffer; import org.apache.tomcat.jni.Socket; import org.jboss.web.CoyoteMessages; | import java.io.*; import org.apache.coyote.*; import org.apache.tomcat.jni.*; import org.jboss.web.*; | [
"java.io",
"org.apache.coyote",
"org.apache.tomcat",
"org.jboss.web"
] | java.io; org.apache.coyote; org.apache.tomcat; org.jboss.web; | 1,386,840 |
public int doStartTag() throws JspException {
if(log.isDebugEnabled())
log.debug(this.NAME + ".doStartTag() - From CustomTag.doStartTag()");
otherDoStartTagOperations();
if (theBodyShouldBeEvaluated()) {
if(IBodyTag.class.isInstance(this))
// See if we... | int function() throws JspException { if(log.isDebugEnabled()) log.debug(this.NAME + STR); otherDoStartTagOperations(); if (theBodyShouldBeEvaluated()) { if(IBodyTag.class.isInstance(this)) return EVAL_BODY_BUFFERED; else return EVAL_BODY_INCLUDE; } else { return SKIP_BODY; } } | /**
* This method is called when the JSP engine encounters the start tag,
* after the attributes are processed.
* Scripting variables (if any) have their values set here.
* @return EVAL_BODY_TAG if the JSP engine should evaluate the tag body, otherwise return SKIP_BODY.
* This method is automat... | This method is called when the JSP engine encounters the start tag, after the attributes are processed. Scripting variables (if any) have their values set here | doStartTag | {
"repo_name": "snavaneethan1/jaffa-framework",
"path": "jaffa-core/source/java/org/jaffa/presentation/portlet/widgets/taglib/CustomTag.java",
"license": "gpl-3.0",
"size": 19380
} | [
"javax.servlet.jsp.JspException"
] | import javax.servlet.jsp.JspException; | import javax.servlet.jsp.*; | [
"javax.servlet"
] | javax.servlet; | 1,066,617 |
public DcmElement putCS(int tag) {
return put(StringElement.createCS(tag));
} | DcmElement function(int tag) { return put(StringElement.createCS(tag)); } | /**
* Description of the Method
*
* @param tag
* Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putCS | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4CHE_1_4_31/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 86527
} | [
"org.dcm4che.data.DcmElement"
] | import org.dcm4che.data.DcmElement; | import org.dcm4che.data.*; | [
"org.dcm4che.data"
] | org.dcm4che.data; | 1,516,380 |
@Deprecated
public ProxyHandler addRequestHeader(final HttpString header, final ExchangeAttribute attribute) {
requestHeaders.put(header, attribute);
return this;
} | ProxyHandler function(final HttpString header, final ExchangeAttribute attribute) { requestHeaders.put(header, attribute); return this; } | /**
* Adds a request header to the outgoing request. If the header resolves to null or an empty string
* it will not be added, however any existing header with the same name will be removed.
*
* @param header The header name
* @param attribute The header value attribute.
* @return this
... | Adds a request header to the outgoing request. If the header resolves to null or an empty string it will not be added, however any existing header with the same name will be removed | addRequestHeader | {
"repo_name": "networknt/light-4j",
"path": "egress-router/src/main/java/com/networknt/router/ProxyHandler.java",
"license": "apache-2.0",
"size": 44448
} | [
"io.undertow.attribute.ExchangeAttribute",
"io.undertow.util.HttpString"
] | import io.undertow.attribute.ExchangeAttribute; import io.undertow.util.HttpString; | import io.undertow.attribute.*; import io.undertow.util.*; | [
"io.undertow.attribute",
"io.undertow.util"
] | io.undertow.attribute; io.undertow.util; | 2,127,852 |
void addContent(ByteBuf buffer, boolean last) throws IOException; | void addContent(ByteBuf buffer, boolean last) throws IOException; | /**
* Add the content from the ChannelBuffer
*
* @param buffer
* must be not null except if last is set to False
* @param last
* True of the buffer is the last one
* @throws IOException
*/ | Add the content from the ChannelBuffer | addContent | {
"repo_name": "zer0se7en/netty",
"path": "codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpData.java",
"license": "apache-2.0",
"size": 6942
} | [
"io.netty.buffer.ByteBuf",
"java.io.IOException"
] | import io.netty.buffer.ByteBuf; import java.io.IOException; | import io.netty.buffer.*; import java.io.*; | [
"io.netty.buffer",
"java.io"
] | io.netty.buffer; java.io; | 1,596,566 |
public static AccountFragment newInstance(int sectionNumber) {
AccountFragment fragment = new AccountFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
}
public AccountFragment() {
} | static AccountFragment function(int sectionNumber) { AccountFragment fragment = new AccountFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } public AccountFragment() { } | /**
* Returns a new instance of this fragment for the given section number.
*/ | Returns a new instance of this fragment for the given section number | newInstance | {
"repo_name": "cedarwu/AutoLogin",
"path": "src/com/cedar/autologin/MainActivity.java",
"license": "mit",
"size": 57879
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,579,513 |
public ApiResponse<AlertRule> createRuleWithHttpInfo(AlertRuleRequest request) throws ApiException {
Object localVarPostBody = request;
// verify the required parameter 'request' is set
if (request == null) {
throw new ApiException(400, "Missing the required parameter 'request' when calling cre... | ApiResponse<AlertRule> function(AlertRuleRequest request) throws ApiException { Object localVarPostBody = request; if (request == null) { throw new ApiException(400, STR); } String localVarPath = STR; List<Pair> localVarQueryParams = new ArrayList<Pair>(); Map<String, String> localVarHeaderParams = new HashMap<String, ... | /**
* Creates Alert rule. Type is ST_DEV or FIXED. Aggregation type is COUNT, AVG or SUM
*
* @param request request (required)
* @return ApiResponse<AlertRule>
* @throws ApiException if fails to make API call
*/ | Creates Alert rule. Type is ST_DEV or FIXED. Aggregation type is COUNT, AVG or SUM | createRuleWithHttpInfo | {
"repo_name": "LogSentinel/logsentinel-java-client",
"path": "src/main/java/com/logsentinel/api/AlertsApi.java",
"license": "mit",
"size": 29811
} | [
"com.logsentinel.ApiException",
"com.logsentinel.ApiResponse",
"com.logsentinel.Pair",
"com.logsentinel.model.AlertRule",
"com.logsentinel.model.AlertRuleRequest",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.ws.rs.core.GenericType"
] | import com.logsentinel.ApiException; import com.logsentinel.ApiResponse; import com.logsentinel.Pair; import com.logsentinel.model.AlertRule; import com.logsentinel.model.AlertRuleRequest; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.ws.rs.core.GenericT... | import com.logsentinel.*; import com.logsentinel.model.*; import java.util.*; import javax.ws.rs.core.*; | [
"com.logsentinel",
"com.logsentinel.model",
"java.util",
"javax.ws"
] | com.logsentinel; com.logsentinel.model; java.util; javax.ws; | 2,394,226 |
void postCompact(final ObserverContext<RegionCoprocessorEnvironment> c, final Store store,
StoreFile resultFile, CompactionRequest request) throws IOException; | void postCompact(final ObserverContext<RegionCoprocessorEnvironment> c, final Store store, StoreFile resultFile, CompactionRequest request) throws IOException; | /**
* Called after compaction has completed and the new store file has been moved in to place.
* @param c the environment provided by the region server
* @param store the store being compacted
* @param resultFile the new store file written out during compaction
* @param request the requested compaction
... | Called after compaction has completed and the new store file has been moved in to place | postCompact | {
"repo_name": "zqxjjj/NobidaBase",
"path": "target/hbase-0.94.9/hbase-0.94.9/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java",
"license": "apache-2.0",
"size": 41666
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.regionserver.Store",
"org.apache.hadoop.hbase.regionserver.StoreFile",
"org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest"
] | import java.io.IOException; import org.apache.hadoop.hbase.regionserver.Store; import org.apache.hadoop.hbase.regionserver.StoreFile; import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest; | import java.io.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.regionserver.compactions.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 904,937 |
public static String formatDateTime(Date date, Locale locale) {
return getDateTimeInstance(locale).format(date);
} | static String function(Date date, Locale locale) { return getDateTimeInstance(locale).format(date); } | /**
* Accepts a java.util.Date object
* @return A formatted version of the date with time
**/ | Accepts a java.util.Date object | formatDateTime | {
"repo_name": "idega/platform2",
"path": "src/com/idega/util/CustomDateFormat.java",
"license": "gpl-3.0",
"size": 1619
} | [
"java.util.Date",
"java.util.Locale"
] | import java.util.Date; import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,150,445 |
public static Map<String, Result> parse(short[] frcData) throws Exception {
checkFrcData(frcData);
Map<String, ResultImpl> resultImplMap = null;
try {
resultImplMap = FRC_ResultParser.parseAsCollectedBits(frcData, ResultImpl.class);
} catch (Exception ex) {
t... | static Map<String, Result> function(short[] frcData) throws Exception { checkFrcData(frcData); Map<String, ResultImpl> resultImplMap = null; try { resultImplMap = FRC_ResultParser.parseAsCollectedBits(frcData, ResultImpl.class); } catch (Exception ex) { throw new Exception(STR + ex); } Map<String, Result> resultMap = n... | /**
* Parses specified FRC data comming from IQRF.
*
* @param frcData FRC data to parse
* @return map of results for each node. Identifiers of nodes are used as a
* keys of the returned map.
* @throws IllegalArgumentException if specified FRC data are not in correct
* format
* @t... | Parses specified FRC data comming from IQRF | parse | {
"repo_name": "iqrfsdk/jsimply",
"path": "simply-modules/simply-iqrf-dpa30x/simply-iqrf-dpa-v30x/src/main/java/com/microrisc/simply/iqrf/dpa/v30x/types/FRC_LedgOn.java",
"license": "apache-2.0",
"size": 4807
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,432,449 |
protected static native void fann_destroy_train(Pointer data); | static native void function(Pointer data); | /**
* Deallocate the data
*
* @param data the training/testing data to deallocate
*/ | Deallocate the data | fann_destroy_train | {
"repo_name": "jjYBdx4IL/fannj",
"path": "src/main/java/com/googlecode/fannj/Trainer.java",
"license": "lgpl-3.0",
"size": 7607
} | [
"com.sun.jna.Pointer"
] | import com.sun.jna.Pointer; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 2,189,857 |
public FileSystemDeleteHeaders setDateProperty(OffsetDateTime dateProperty) {
if (dateProperty == null) {
this.dateProperty = null;
} else {
this.dateProperty = new DateTimeRfc1123(dateProperty);
}
return this;
} | FileSystemDeleteHeaders function(OffsetDateTime dateProperty) { if (dateProperty == null) { this.dateProperty = null; } else { this.dateProperty = new DateTimeRfc1123(dateProperty); } return this; } | /**
* Set the dateProperty property: A UTC date/time value generated by the
* service that indicates the time at which the response was initiated.
*
* @param dateProperty the dateProperty value to set.
* @return the FileSystemDeleteHeaders object itself.
*/ | Set the dateProperty property: A UTC date/time value generated by the service that indicates the time at which the response was initiated | setDateProperty | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/models/FileSystemDeleteHeaders.java",
"license": "mit",
"size": 3910
} | [
"com.azure.core.util.DateTimeRfc1123",
"java.time.OffsetDateTime"
] | import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; | import com.azure.core.util.*; import java.time.*; | [
"com.azure.core",
"java.time"
] | com.azure.core; java.time; | 2,367,473 |
public void enableLogging( final Logger fallbackLogger )
{
if ( m_enableLoggingInvoked )
{
throw new IllegalStateException( "enableLogging() already called" );
}
m_switch.setFallback( fallbackLogger );
m_enableLoggingInvoked = true;
} | void function( final Logger fallbackLogger ) { if ( m_enableLoggingInvoked ) { throw new IllegalStateException( STR ); } m_switch.setFallback( fallbackLogger ); m_enableLoggingInvoked = true; } | /**
* Accept the logger we shall use as the initial and the fallback logger.
*/ | Accept the logger we shall use as the initial and the fallback logger | enableLogging | {
"repo_name": "eva-xuyen/excalibur",
"path": "containerkit/logger/src/main/java/org/apache/avalon/excalibur/logger/AbstractLoggerManager.java",
"license": "apache-2.0",
"size": 8865
} | [
"org.apache.avalon.framework.logger.Logger"
] | import org.apache.avalon.framework.logger.Logger; | import org.apache.avalon.framework.logger.*; | [
"org.apache.avalon"
] | org.apache.avalon; | 2,663,130 |
public static void performAndWaitForWindowChange(SWTBot bot, Runnable runnable) {
SWTBotShell shell = bot.activeShell();
runnable.run();
waitUntilShellIsNotActive(bot, shell);
} | static void function(SWTBot bot, Runnable runnable) { SWTBotShell shell = bot.activeShell(); runnable.run(); waitUntilShellIsNotActive(bot, shell); } | /**
* Simple wrapper to block for actions that either open or close a window.
*/ | Simple wrapper to block for actions that either open or close a window | performAndWaitForWindowChange | {
"repo_name": "pruebasetichat/google-plugin-for-eclipse",
"path": "plugins/com.google.gdt.eclipse.swtbot/src/com/google/gdt/eclipse/swtbot/SwtBotTestingUtilities.java",
"license": "epl-1.0",
"size": 10745
} | [
"org.eclipse.swtbot.swt.finder.SWTBot",
"org.eclipse.swtbot.swt.finder.widgets.SWTBotShell"
] | import org.eclipse.swtbot.swt.finder.SWTBot; import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; | import org.eclipse.swtbot.swt.finder.*; import org.eclipse.swtbot.swt.finder.widgets.*; | [
"org.eclipse.swtbot"
] | org.eclipse.swtbot; | 2,777,581 |
void setRoutingService(RoutingService routingService); | void setRoutingService(RoutingService routingService); | /**
* Another hack to solve dep injection problem..., note, this will be called before
* any start is called.
*/ | Another hack to solve dep injection problem..., note, this will be called before any start is called | setRoutingService | {
"repo_name": "ThalaivaStars/OrgRepo1",
"path": "core/src/main/java/org/elasticsearch/discovery/Discovery.java",
"license": "apache-2.0",
"size": 2670
} | [
"org.elasticsearch.cluster.routing.RoutingService"
] | import org.elasticsearch.cluster.routing.RoutingService; | import org.elasticsearch.cluster.routing.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 420,841 |
public Read<K, V> withMaxReadTime(Duration maxReadTime) {
return toBuilder().setMaxNumRecords(Long.MAX_VALUE).setMaxReadTime(maxReadTime).build();
} | Read<K, V> function(Duration maxReadTime) { return toBuilder().setMaxNumRecords(Long.MAX_VALUE).setMaxReadTime(maxReadTime).build(); } | /**
* Similar to
* {@link org.apache.beam.sdk.io.Read.Unbounded#withMaxReadTime(Duration)}.
* Mainly used for tests and demo
* applications.
*/ | Similar to <code>org.apache.beam.sdk.io.Read.Unbounded#withMaxReadTime(Duration)</code>. Mainly used for tests and demo applications | withMaxReadTime | {
"repo_name": "amitsela/incubator-beam",
"path": "sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java",
"license": "apache-2.0",
"size": 59120
} | [
"org.joda.time.Duration"
] | import org.joda.time.Duration; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 842,124 |
@Authorized(PrivilegeConstants.PURGE_ORDER_FREQUENCIES)
public void purgeOrderFrequency(OrderFrequency orderFrequency) throws APIException;
| @Authorized(PrivilegeConstants.PURGE_ORDER_FREQUENCIES) void function(OrderFrequency orderFrequency) throws APIException; | /**
* Completely removes an order frequency from the database
*
* @param orderFrequency the order frequency to purge
* @since 1.10
* @should delete given order frequency
* @should not allow deleting an order frequency that is in use
*/ | Completely removes an order frequency from the database | purgeOrderFrequency | {
"repo_name": "vinayvenu/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/OrderService.java",
"license": "mpl-2.0",
"size": 31663
} | [
"org.openmrs.OrderFrequency",
"org.openmrs.annotation.Authorized",
"org.openmrs.util.PrivilegeConstants"
] | import org.openmrs.OrderFrequency; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants; | import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*; | [
"org.openmrs",
"org.openmrs.annotation",
"org.openmrs.util"
] | org.openmrs; org.openmrs.annotation; org.openmrs.util; | 1,258,832 |
//-----------------------------------------------------------------------
public static Date setMonths(Date date, int amount) {
return set(date, Calendar.MONTH, amount);
} | static Date function(Date date, int amount) { return set(date, Calendar.MONTH, amount); } | /**
* Sets the months field to a date returning a new object.
* The original date object is unchanged.
*
* @param date the date, not null
* @param amount the amount to set
* @return a new Date object set with the specified value
* @throws IllegalArgumentException if the date is null
... | Sets the months field to a date returning a new object. The original date object is unchanged | setMonths | {
"repo_name": "SpoonLabs/astor",
"path": "examples/lang_39/src/java/org/apache/commons/lang3/time/DateUtils.java",
"license": "gpl-2.0",
"size": 73011
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 151,554 |
public static String getRelativeName(String fullDn, Context baseCtx)
throws NamingException {
String baseDn = baseCtx.getNameInNamespace();
if (baseDn.length() == 0) {
return fullDn;
}
DistinguishedName base = new DistinguishedName(baseDn);
DistinguishedName full = new DistinguishedName(fullDn);
... | static String function(String fullDn, Context baseCtx) throws NamingException { String baseDn = baseCtx.getNameInNamespace(); if (baseDn.length() == 0) { return fullDn; } DistinguishedName base = new DistinguishedName(baseDn); DistinguishedName full = new DistinguishedName(fullDn); if (base.equals(full)) { return STRFu... | /**
* Obtains the part of a DN relative to a supplied base context.
* <p>
* If the DN is "cn=bob,ou=people,dc=springframework,dc=org" and the base context name
* is "ou=people,dc=springframework,dc=org" it would return "cn=bob".
* </p>
*
* @param fullDn the DN
* @param baseCtx the context to work out th... | Obtains the part of a DN relative to a supplied base context. If the DN is "cn=bob,ou=people,dc=springframework,dc=org" and the base context name is "ou=people,dc=springframework,dc=org" it would return "cn=bob". | getRelativeName | {
"repo_name": "eddumelendez/spring-security",
"path": "ldap/src/main/java/org/springframework/security/ldap/LdapUtils.java",
"license": "apache-2.0",
"size": 5248
} | [
"javax.naming.Context",
"javax.naming.NamingException",
"org.springframework.ldap.core.DistinguishedName"
] | import javax.naming.Context; import javax.naming.NamingException; import org.springframework.ldap.core.DistinguishedName; | import javax.naming.*; import org.springframework.ldap.core.*; | [
"javax.naming",
"org.springframework.ldap"
] | javax.naming; org.springframework.ldap; | 1,636,865 |
@Override
public SocketAddress getInetAddress() {
return connections.get(OFAuxId.MAIN).getRemoteInetAddress();
} | SocketAddress function() { return connections.get(OFAuxId.MAIN).getRemoteInetAddress(); } | /**
* Get the IP Address for the switch
* @return the inet address
*/ | Get the IP Address for the switch | getInetAddress | {
"repo_name": "fazevedo86/floodlight",
"path": "src/main/java/net/floodlightcontroller/core/OFSwitch.java",
"license": "apache-2.0",
"size": 36572
} | [
"java.net.SocketAddress",
"org.projectfloodlight.openflow.types.OFAuxId"
] | import java.net.SocketAddress; import org.projectfloodlight.openflow.types.OFAuxId; | import java.net.*; import org.projectfloodlight.openflow.types.*; | [
"java.net",
"org.projectfloodlight.openflow"
] | java.net; org.projectfloodlight.openflow; | 2,251,012 |
private void refreshFileFolder(TreeImageDisplay expNode,
Map<Integer, Set> r)
{
DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel();
expNode.setChildrenLoaded(Boolean.valueOf(true));
expNode.setExpanded(Boolean.valueOf(true));
if (r == null || r.size() == 0) return;
Iterator i = r.keySet(... | void function(TreeImageDisplay expNode, Map<Integer, Set> r) { DefaultTreeModel dtm = (DefaultTreeModel) treeDisplay.getModel(); expNode.setChildrenLoaded(Boolean.valueOf(true)); expNode.setExpanded(Boolean.valueOf(true)); if (r == null r.size() == 0) return; Iterator i = r.keySet().iterator(); int index; int n = expNo... | /**
* Refreshes the folder hosting the file.
*
* @param expNode The experimenter node to refresh.
* @param r The data to display.
*/ | Refreshes the folder hosting the file | refreshFileFolder | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java",
"license": "gpl-2.0",
"size": 83096
} | [
"java.util.Iterator",
"java.util.Map",
"java.util.Set",
"javax.swing.tree.DefaultTreeModel",
"org.openmicroscopy.shoola.agents.util.browser.TreeFileSet",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay"
] | import java.util.Iterator; import java.util.Map; import java.util.Set; import javax.swing.tree.DefaultTreeModel; import org.openmicroscopy.shoola.agents.util.browser.TreeFileSet; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay; | import java.util.*; import javax.swing.tree.*; import org.openmicroscopy.shoola.agents.util.browser.*; | [
"java.util",
"javax.swing",
"org.openmicroscopy.shoola"
] | java.util; javax.swing; org.openmicroscopy.shoola; | 216,562 |
public CertificateDetails root() {
return this.innerProperties() == null ? null : this.innerProperties().root();
} | CertificateDetails function() { return this.innerProperties() == null ? null : this.innerProperties().root(); } | /**
* Get the root property: Root certificate.
*
* @return the root value.
*/ | Get the root property: Root certificate | root | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/AppServiceCertificateOrderInner.java",
"license": "mit",
"size": 12735
} | [
"com.azure.resourcemanager.appservice.models.CertificateDetails"
] | import com.azure.resourcemanager.appservice.models.CertificateDetails; | import com.azure.resourcemanager.appservice.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,344,685 |
@Test
public void mbFillLayerSpritesVisualTest() throws Exception {
// Read file to JSONObject
JSONObject jsonObject = MapboxTestUtils.parseTestStyle("fillStyleSpriteTest.json");
// Get the style
MBStyle mbStyle = new MBStyle(jsonObject);
StyledLayerDescriptor sld = mbS... | void function() throws Exception { JSONObject jsonObject = MapboxTestUtils.parseTestStyle(STR); MBStyle mbStyle = new MBStyle(jsonObject); StyledLayerDescriptor sld = mbStyle.transform(); Style style = MapboxTestUtils.getStyle(sld, 0); MapContent mc = new MapContent(); mc.addLayer(new FeatureLayer(polygonsBigFS, style)... | /**
* Test generation of a GeoTools style from an MBFillLayer (using a constant sprite fill
* pattern)
*/ | Test generation of a GeoTools style from an MBFillLayer (using a constant sprite fill pattern) | mbFillLayerSpritesVisualTest | {
"repo_name": "geotools/geotools",
"path": "modules/extension/mbstyle/src/test/java/org/geotools/mbstyle/transform/VisualTransformerTest.java",
"license": "lgpl-2.1",
"size": 35079
} | [
"java.awt.RenderingHints",
"java.awt.image.BufferedImage",
"org.geotools.geometry.jts.ReferencedEnvelope",
"org.geotools.image.test.ImageAssert",
"org.geotools.map.FeatureLayer",
"org.geotools.map.MapContent",
"org.geotools.mbstyle.MBStyle",
"org.geotools.mbstyle.MapboxTestUtils",
"org.geotools.rend... | import java.awt.RenderingHints; import java.awt.image.BufferedImage; import org.geotools.geometry.jts.ReferencedEnvelope; import org.geotools.image.test.ImageAssert; import org.geotools.map.FeatureLayer; import org.geotools.map.MapContent; import org.geotools.mbstyle.MBStyle; import org.geotools.mbstyle.MapboxTestUtils... | import java.awt.*; import java.awt.image.*; import org.geotools.geometry.jts.*; import org.geotools.image.test.*; import org.geotools.map.*; import org.geotools.mbstyle.*; import org.geotools.renderer.lite.*; import org.geotools.styling.*; import org.json.simple.*; | [
"java.awt",
"org.geotools.geometry",
"org.geotools.image",
"org.geotools.map",
"org.geotools.mbstyle",
"org.geotools.renderer",
"org.geotools.styling",
"org.json.simple"
] | java.awt; org.geotools.geometry; org.geotools.image; org.geotools.map; org.geotools.mbstyle; org.geotools.renderer; org.geotools.styling; org.json.simple; | 1,160,265 |
public void setConnectTimeout(final FileSystemOptions opts, final Integer connectTimeout) {
setParam(opts, CONNECT_TIMEOUT, connectTimeout);
} | void function(final FileSystemOptions opts, final Integer connectTimeout) { setParam(opts, CONNECT_TIMEOUT, connectTimeout); } | /**
* Sets the timeout for the initial control connection.
* <p>
* If you set the connectTimeout to {@code null} no connectTimeout will be set.
* </p>
*
* @param opts The FileSystemOptions.
* @param connectTimeout the timeout value in milliseconds
* @since 2.1
*/ | Sets the timeout for the initial control connection. If you set the connectTimeout to null no connectTimeout will be set. | setConnectTimeout | {
"repo_name": "seeburger-ag/commons-vfs",
"path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java",
"license": "apache-2.0",
"size": 17410
} | [
"org.apache.commons.vfs2.FileSystemOptions"
] | import org.apache.commons.vfs2.FileSystemOptions; | import org.apache.commons.vfs2.*; | [
"org.apache.commons"
] | org.apache.commons; | 664,141 |
BufferedReader in = null;
try {
String line;
in = new BufferedReader(new FileReader(filename));
while( (line = in.readLine()) != null ) {
return fromString(line);
}
} catch( IOException ex ) { ex.printStackTrace(); }
return null;
} | BufferedReader in = null; try { String line; in = new BufferedReader(new FileReader(filename)); while( (line = in.readLine()) != null ) { return fromString(line); } } catch( IOException ex ) { ex.printStackTrace(); } return null; } | /**
* Reads counts from a tab-separated file. One Counter per line, keys and values
* alternate after each tab.
* @param filename The file to read.
* @return A counter.
*/ | Reads counts from a tab-separated file. One Counter per line, keys and values alternate after each tab | fromFile | {
"repo_name": "nchambers/schemas",
"path": "src/main/java/nate/reading/ir/ParsesToCounts.java",
"license": "apache-2.0",
"size": 4391
} | [
"java.io.BufferedReader",
"java.io.FileReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,785,802 |
private void overshadowRect(final Rectangle2D rect, final Graphics2D g) {
Graphics2D g2 = (Graphics2D) g.create();
g2.setColor(GRAY_OUT);
g2.fill(rect);
g2.dispose();
} | void function(final Rectangle2D rect, final Graphics2D g) { Graphics2D g2 = (Graphics2D) g.create(); g2.setColor(GRAY_OUT); g2.fill(rect); g2.dispose(); } | /**
* Shadows the given rectangle. Gives a disabled look to the given area.
*
* @param rect
* the area to draw the shadow over
* @param g
* the context to draw upon
*/ | Shadows the given rectangle. Gives a disabled look to the given area | overshadowRect | {
"repo_name": "brtonnies/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/flow/processrendering/annotations/AnnotationDrawer.java",
"license": "agpl-3.0",
"size": 22044
} | [
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D"
] | import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; | import java.awt.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,953,245 |
EClass getJavaConversionImplementation();
| EClass getJavaConversionImplementation(); | /**
* Returns the meta object for class '{@link com.openMap1.mapper.JavaConversionImplementation <em>Java Conversion Implementation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Java Conversion Implementation</em>'.
* @see com.openMap1.mapper.JavaConve... | Returns the meta object for class '<code>com.openMap1.mapper.JavaConversionImplementation Java Conversion Implementation</code>'. | getJavaConversionImplementation | {
"repo_name": "openmapsoftware/mappingtools",
"path": "openmap-mapper-lib/src/main/java/com/openMap1/mapper/MapperPackage.java",
"license": "epl-1.0",
"size": 172715
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,184,719 |
public com.mozu.api.contracts.commerceruntime.wishlists.WishlistItem getWishlistItem(String wishlistId, String wishlistItemId, String responseFields) throws Exception
{
MozuClient<com.mozu.api.contracts.commerceruntime.wishlists.WishlistItem> client = com.mozu.api.clients.commerce.wishlists.WishlistItemClient.get... | com.mozu.api.contracts.commerceruntime.wishlists.WishlistItem function(String wishlistId, String wishlistItemId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.wishlists.WishlistItem> client = com.mozu.api.clients.commerce.wishlists.WishlistItemClient.getWishlistItemClient( ... | /**
* Retrieves the details of an item in a shopper wish list.
* <p><pre><code>
* WishlistItem wishlistitem = new WishlistItem();
* WishlistItem wishlistItem = wishlistitem.getWishlistItem( wishlistId, wishlistItemId, responseFields);
* </code></pre></p>
* @param responseFields Use this field to include t... | Retrieves the details of an item in a shopper wish list. <code><code> WishlistItem wishlistitem = new WishlistItem(); WishlistItem wishlistItem = wishlistitem.getWishlistItem( wishlistId, wishlistItemId, responseFields); </code></code> | getWishlistItem | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/wishlists/WishlistItemResource.java",
"license": "mit",
"size": 17850
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 962,073 |
public void testSDOWithinDistanceCircle() throws Exception {
String sql =
"select GID, GEOMETRY from WRAPPED_SPATIAL WS where " + "mdsys.sdo_within_distance(WS.geometry.geom, " +
"mdsys.sdo_geometry(3,null,null, " +
"mdsys.sdo_elem_info_array(1,3,4), " +
... | void function() throws Exception { String sql = STR + STR + STR + STR + STR + STR; SQLReader reader = new SQLReader(session, sql); JGeometry circle = JGeometry.createCircle(-10, 0, 0, 10, 10, 0, 0); ReadAllQuery raq = new ReadAllQuery(WrappedSpatial.class); ExpressionBuilder eb = raq.getExpressionBuilder(); String para... | /**
* SDO_WITHIN_DISTANCE using a with a circle of radius 10 around (0,0)
*/ | SDO_WITHIN_DISTANCE using a with a circle of radius 10 around (0,0) | testSDOWithinDistanceCircle | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/eclipselink.extension.oracle.test/src/org/eclipse/persistence/testing/tests/spatial/jgeometry/wrapped/Query_SpatialExpOp_ExpGeom_Tests.java",
"license": "epl-1.0",
"size": 22201
} | [
"java.util.List",
"oracle.spatial.geometry.JGeometry",
"org.eclipse.persistence.expressions.Expression",
"org.eclipse.persistence.expressions.ExpressionBuilder",
"org.eclipse.persistence.expressions.spatial.SpatialExpressionFactory",
"org.eclipse.persistence.expressions.spatial.SpatialParameters",
"org.... | import java.util.List; import oracle.spatial.geometry.JGeometry; import org.eclipse.persistence.expressions.Expression; import org.eclipse.persistence.expressions.ExpressionBuilder; import org.eclipse.persistence.expressions.spatial.SpatialExpressionFactory; import org.eclipse.persistence.expressions.spatial.SpatialPar... | import java.util.*; import oracle.spatial.geometry.*; import org.eclipse.persistence.expressions.*; import org.eclipse.persistence.expressions.spatial.*; import org.eclipse.persistence.queries.*; import org.eclipse.persistence.testing.models.spatial.jgeometry.wrapped.*; import org.eclipse.persistence.testing.tests.spat... | [
"java.util",
"oracle.spatial.geometry",
"org.eclipse.persistence"
] | java.util; oracle.spatial.geometry; org.eclipse.persistence; | 1,371,754 |
F_About fragment = new F_About();
Bundle args = new Bundle();
return fragment;
} | F_About fragment = new F_About(); Bundle args = new Bundle(); return fragment; } | /**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
* @return A new instance of fragment F_About.
*/ | Use this factory method to create a new instance of this fragment using the provided parameters | newInstance | {
"repo_name": "jorgechp/csim-emotions",
"path": "app/src/main/java/layout/F_About.java",
"license": "gpl-2.0",
"size": 3038
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,733,536 |
protected void addRulesToCycle(Rule targetRule,
Rule enclosingRule,
List<Set<Rule>> listOfRecursiveCycles)
{
boolean foundCycle = false;
for (int i = 0; i < listOfRecursiveCycles.size(); i++) {
Set<Rule> rulesInCycle = listOfRecursiveCycles.get(i);
// ensure both rules are in same cy... | void function(Rule targetRule, Rule enclosingRule, List<Set<Rule>> listOfRecursiveCycles) { boolean foundCycle = false; for (int i = 0; i < listOfRecursiveCycles.size(); i++) { Set<Rule> rulesInCycle = listOfRecursiveCycles.get(i); if ( rulesInCycle.contains(targetRule) ) { rulesInCycle.add(enclosingRule); foundCycle =... | /** enclosingRuleName calls targetRuleName, find the cycle containing
* the target and add the caller. Find the cycle containing the caller
* and add the target. If no cycles contain either, then create a new
* cycle. listOfRecursiveCycles is List<Set<String>> that holds a list
* of cycles (sets of rule ... | enclosingRuleName calls targetRuleName, find the cycle containing the target and add the caller. Find the cycle containing the caller and add the target. If no cycles contain either, then create a new cycle. listOfRecursiveCycles is List> that holds a list of cycles (sets of rule names) | addRulesToCycle | {
"repo_name": "africallshop/africallshop-iphone",
"path": "submodules/externals/antlr3/tool/src/main/java/org/antlr/tool/GrammarSanity.java",
"license": "gpl-2.0",
"size": 11238
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import java.util.HashSet; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,573,284 |
public boolean onKey(View v, int keyCode, KeyEvent event) {
return false;
} | boolean function(View v, int keyCode, KeyEvent event) { return false; } | /**
* Allows a Preference to intercept key events without having focus.
* For example, SeekBarPreference uses this to intercept +/- to adjust
* the progress.
* @return True if the Preference handled the key. Returns false by default.
* @hide
*/ | Allows a Preference to intercept key events without having focus. For example, SeekBarPreference uses this to intercept +/- to adjust the progress | onKey | {
"repo_name": "daiqiquan/framework-base",
"path": "core/java/android/preference/Preference.java",
"license": "apache-2.0",
"size": 66927
} | [
"android.view.KeyEvent",
"android.view.View"
] | import android.view.KeyEvent; import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 754,369 |
@Override
public void doConsume(Object command) {
// The instanceof can be avoided, but that would require modifying the
// Command clas tree and that would require too much effort right
// now.
if (command instanceof ConnectionInfo) {
ConnectionInfo connectionInfo = ... | void function(Object command) { if (command instanceof ConnectionInfo) { ConnectionInfo connectionInfo = (ConnectionInfo)command; connectionInfo.setTransportContext(getPeerCertificates()); } super.doConsume(command); } | /**
* Overriding in order to add the client's certificates to ConnectionInfo
* Commmands.
*
* @param command The Command coming in.
*/ | Overriding in order to add the client's certificates to ConnectionInfo Commmands | doConsume | {
"repo_name": "chirino/activemq",
"path": "activemq-client/src/main/java/org/apache/activemq/transport/tcp/SslTransport.java",
"license": "apache-2.0",
"size": 5373
} | [
"org.apache.activemq.command.ConnectionInfo"
] | import org.apache.activemq.command.ConnectionInfo; | import org.apache.activemq.command.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 2,371,896 |
// init class variables
this.mappings = mappings;
MapProcessorHelper mapProcessorHelper = new MapProcessorHelper();
csvUtil = new MapProcssorCSVUtil();
datatypeProcessor.setEnv(csvUtil, functions, mappings);
List<XMLElement> resultsArray = new ArrayList<XMLElement>();
... | this.mappings = mappings; MapProcessorHelper mapProcessorHelper = new MapProcessorHelper(); csvUtil = new MapProcssorCSVUtil(); datatypeProcessor.setEnv(csvUtil, functions, mappings); List<XMLElement> resultsArray = new ArrayList<XMLElement>(); List<CSVSegment> logicalRecords = csvSegmentedFile.getLogicalRecords(); if ... | /**
* This method will process the mapping file and generate a list of HL7 v3 message objects
*
* @param mapfilename the name of the mapping file
* @param csvfilename the name of the csv file
*/ | This method will process the mapping file and generate a list of HL7 v3 message objects | process | {
"repo_name": "NCIP/caadapter",
"path": "software/caadapter/src/java/gov/nih/nci/caadapter/hl7/transformation/MapProcessor.java",
"license": "bsd-3-clause",
"size": 36656
} | [
"gov.nih.nci.caadapter.common.csv.data.CSVSegment",
"gov.nih.nci.caadapter.hl7.transformation.data.XMLElement",
"java.util.ArrayList",
"java.util.List"
] | import gov.nih.nci.caadapter.common.csv.data.CSVSegment; import gov.nih.nci.caadapter.hl7.transformation.data.XMLElement; import java.util.ArrayList; import java.util.List; | import gov.nih.nci.caadapter.common.csv.data.*; import gov.nih.nci.caadapter.hl7.transformation.data.*; import java.util.*; | [
"gov.nih.nci",
"java.util"
] | gov.nih.nci; java.util; | 2,843,497 |
protected Map<Instance, Integer> getRuleInstFromUI(final Parameter _parameter)
{
final Map<Instance, Integer> ret = new LinkedHashMap<>();
final String[] oids = _parameter.getParameterValues(CITablePayroll.Payroll_PositionRuleTable.rulePosition.name);
if (oids != null) {
int... | Map<Instance, Integer> function(final Parameter _parameter) { final Map<Instance, Integer> ret = new LinkedHashMap<>(); final String[] oids = _parameter.getParameterValues(CITablePayroll.Payroll_PositionRuleTable.rulePosition.name); if (oids != null) { int idx = 0; for (final String oid : oids) { final Instance ruleIns... | /**
* Gets the rule inst from ui.
*
* @param _parameter Parameter as passed by the eFaps API
* @return the rule inst from ui
*/ | Gets the rule inst from ui | getRuleInstFromUI | {
"repo_name": "eFaps/eFapsApp-Payroll",
"path": "src/main/efaps/ESJP/org/efaps/esjp/payroll/Payslip_Base.java",
"license": "apache-2.0",
"size": 71194
} | [
"java.util.LinkedHashMap",
"java.util.Map",
"org.efaps.admin.event.Parameter",
"org.efaps.db.Instance",
"org.efaps.esjp.ci.CITablePayroll"
] | import java.util.LinkedHashMap; import java.util.Map; import org.efaps.admin.event.Parameter; import org.efaps.db.Instance; import org.efaps.esjp.ci.CITablePayroll; | import java.util.*; import org.efaps.admin.event.*; import org.efaps.db.*; import org.efaps.esjp.ci.*; | [
"java.util",
"org.efaps.admin",
"org.efaps.db",
"org.efaps.esjp"
] | java.util; org.efaps.admin; org.efaps.db; org.efaps.esjp; | 1,035,634 |
public File getDenLibDirectory() {
return new File(getModsDirectory(), "denlib");
} | File function() { return new File(getModsDirectory(), STR); } | /**
* Gets a File object for the denlib directory of this Instance.
*
* @return File object for the denlib directory of this Instance
*/ | Gets a File object for the denlib directory of this Instance | getDenLibDirectory | {
"repo_name": "OpenLauncher/OpenLauncher",
"path": "src/main/java/com/atlauncher/data/Instance.java",
"license": "gpl-3.0",
"size": 53171
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 726,945 |
@Override
public LogLevel getLogLevel() {
return logLevel;
} | LogLevel function() { return logLevel; } | /**
* Gets the log level.
*
* @return the log level
* @see org.pentaho.di.core.logging.LoggingObjectInterface#getLogLevel()
*/ | Gets the log level | getLogLevel | {
"repo_name": "tmcsantos/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 199612
} | [
"org.pentaho.di.core.logging.LogLevel"
] | import org.pentaho.di.core.logging.LogLevel; | import org.pentaho.di.core.logging.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,157,939 |
public ShardId shardId() {
return shardId;
} | ShardId function() { return shardId; } | /**
* The shard id.
*/ | The shard id | shardId | {
"repo_name": "gfyoung/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/cluster/routing/ShardRouting.java",
"license": "apache-2.0",
"size": 26876
} | [
"org.elasticsearch.index.shard.ShardId"
] | import org.elasticsearch.index.shard.ShardId; | import org.elasticsearch.index.shard.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 1,234,944 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.