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
TransitionListener<S, E, C> create(TransitionListener<? super S, ? super E, ? super C> listener);
TransitionListener<S, E, C> create(TransitionListener<? super S, ? super E, ? super C> listener);
/** * Creates a new transition listener that is an asynchronous version of the specified transition listener. The new * asynchronous transition listener uses the factory completion executor to execute the specified transition * listener. * * @param listener the transition listener to perform a...
Creates a new transition listener that is an asynchronous version of the specified transition listener. The new asynchronous transition listener uses the factory completion executor to execute the specified transition listener
create
{ "repo_name": "bnorm-software/infinite", "path": "src/main/java/com/bnorm/infinite/async/AsyncTransitionListenerFactory.java", "license": "bsd-3-clause", "size": 894 }
[ "com.bnorm.infinite.TransitionListener" ]
import com.bnorm.infinite.TransitionListener;
import com.bnorm.infinite.*;
[ "com.bnorm.infinite" ]
com.bnorm.infinite;
1,163,499
public void setConversation(Vertex conversation) { if (conversation == null) { this.conversation = null; } else { this.conversation = conversation.getId(); } }
void function(Vertex conversation) { if (conversation == null) { this.conversation = null; } else { this.conversation = conversation.getId(); } }
/** * Set the current conversation. */
Set the current conversation
setConversation
{ "repo_name": "BOTlibre/BOTlibre", "path": "ai-engine/source/org/botlibre/sense/chat/Chat.java", "license": "epl-1.0", "size": 13842 }
[ "org.botlibre.api.knowledge.Vertex" ]
import org.botlibre.api.knowledge.Vertex;
import org.botlibre.api.knowledge.*;
[ "org.botlibre.api" ]
org.botlibre.api;
87,452
protected final void cullCache() { // Check if a max cache size is defined. if (maxCacheSize < 0) { return; } // See if the cache size is within 3% of being too big. If so, clean out // cache until it's 10% free. int desiredSize = (int)(maxCacheSize * .97...
final void function() { if (maxCacheSize < 0) { return; } int desiredSize = (int)(maxCacheSize * .97); if (cacheSize >= desiredSize) { deleteExpiredEntries(); desiredSize = (int)(maxCacheSize * .90); if (cacheSize > desiredSize) { long t = System.currentTimeMillis(); do { remove(lastAccessedList.getLast().object); } wh...
/** * Removes objects from cache if the cache is too full. "Too full" is * defined as within 3% of the maximum cache size. Whenever the cache is * is too big, the least frequently used elements are deleted until the * cache is at least 10% empty. */
Removes objects from cache if the cache is too full. "Too full" is defined as within 3% of the maximum cache size. Whenever the cache is is too big, the least frequently used elements are deleted until the cache is at least 10% empty
cullCache
{ "repo_name": "derek-wang/ca.rides.openfire", "path": "src/java/org/jivesoftware/util/cache/DefaultCache.java", "license": "apache-2.0", "size": 22820 }
[ "org.jivesoftware.util.LinkedListNode" ]
import org.jivesoftware.util.LinkedListNode;
import org.jivesoftware.util.*;
[ "org.jivesoftware.util" ]
org.jivesoftware.util;
52,022
public String recvSanitizedMsg(Function<String, String> f) { String msg = ""; byte[] bytes = new byte[0]; if (connectionIsEncrypted()) { try { bytes = recv_encrypted(); } catch (Exception e) { e.printStackTrace(); ...
String function(Function<String, String> f) { String msg = STRUTF-8"), f); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return msg; }
/** * Receives a message and runs function to sanitize string * @param f A function used to sanitize the received message * @return A processed string */
Receives a message and runs function to sanitize string
recvSanitizedMsg
{ "repo_name": "czifro-development/JSocket", "path": "jsocket/src/main/java/jsock/net/MessageSocket.java", "license": "mit", "size": 10286 }
[ "java.io.UnsupportedEncodingException", "java.util.function.Function" ]
import java.io.UnsupportedEncodingException; import java.util.function.Function;
import java.io.*; import java.util.function.*;
[ "java.io", "java.util" ]
java.io; java.util;
769,474
public void close() { if (outputSurface != null) { outputSurface.release(); } try { fileInputStream.close(); } catch (IOException e) { e.printStackTrace(); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { ...
void function() { if (outputSurface != null) { outputSurface.release(); } try { fileInputStream.close(); } catch (IOException e) { e.printStackTrace(); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { renderHandler.getLooper().quitSafely(); } else { renderHandler.getLooper().quit(); } decoder.releas...
/** * Shut down all resources allocated to the MotionPhotoReader instance. */
Shut down all resources allocated to the MotionPhotoReader instance
close
{ "repo_name": "googleinterns/motion-photos-filereader", "path": "MotionPhotoReader/app/src/main/java/com/google/android/libraries/motionphotoreader/MotionPhotoReader.java", "license": "apache-2.0", "size": 31205 }
[ "android.os.Build", "java.io.IOException" ]
import android.os.Build; import java.io.IOException;
import android.os.*; import java.io.*;
[ "android.os", "java.io" ]
android.os; java.io;
2,475,846
public static void main(final String[] s) { final JFrame frame = new JFrame("JCalendar"); final JCalendar jcalendar = new JCalendar(); frame.getContentPane().add(jcalendar); frame.pack(); frame.setVisible(true); } private Calendar calendar; private JPopupMenu calendarPopupMenu; final private JTimeChoo...
static void function(final String[] s) { final JFrame frame = new JFrame(STR); final JCalendar jcalendar = new JCalendar(); frame.getContentPane().add(jcalendar); frame.pack(); frame.setVisible(true); } private Calendar calendar; private JPopupMenu calendarPopupMenu; final private JTimeChooser timeChooser; final privat...
/** * Creates a JFrame with a JCalendar inside and can be used for testing. * * @param s * The command line arguments */
Creates a JFrame with a JCalendar inside and can be used for testing
main
{ "repo_name": "freeplane/freeplane", "path": "freeplane/src/main/java/org/freeplane/core/ui/components/calendar/JCalendar.java", "license": "gpl-2.0", "size": 17605 }
[ "java.awt.BorderLayout", "java.util.Calendar", "java.util.Date", "java.util.Locale", "javax.swing.BorderFactory", "javax.swing.JFrame", "javax.swing.JPanel", "javax.swing.JPopupMenu" ]
import java.awt.BorderLayout; import java.util.Calendar; import java.util.Date; import java.util.Locale; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JPopupMenu;
import java.awt.*; import java.util.*; import javax.swing.*;
[ "java.awt", "java.util", "javax.swing" ]
java.awt; java.util; javax.swing;
94,503
private static boolean nodesHaveSameControlFlow(Node node1, Node node2) { Node node1DeepestControlDependentBlock = closestControlDependentAncestor(node1); Node node2DeepestControlDependentBlock = closestControlDependentAncestor(node2); if (node1DeepestControlDependentBloc...
static boolean function(Node node1, Node node2) { Node node1DeepestControlDependentBlock = closestControlDependentAncestor(node1); Node node2DeepestControlDependentBlock = closestControlDependentAncestor(node2); if (node1DeepestControlDependentBlock == node2DeepestControlDependentBlock) { if (node2DeepestControlDepende...
/** * Returns true if the two nodes have the same control flow properties, * that is, is node1 be executed every time node2 is executed and vice versa? */
Returns true if the two nodes have the same control flow properties, that is, is node1 be executed every time node2 is executed and vice versa
nodesHaveSameControlFlow
{ "repo_name": "antz29/closure-compiler", "path": "src/com/google/javascript/jscomp/SideEffectsAnalysis.java", "license": "apache-2.0", "size": 33333 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,060,011
public ConnectPoint getSrc() { return src; }
ConnectPoint function() { return src; }
/** * Returns the source transponder port. * * @return source transponder port */
Returns the source transponder port
getSrc
{ "repo_name": "gkatsikas/onos", "path": "core/api/src/main/java/org/onosproject/net/intent/OpticalCircuitIntent.java", "license": "apache-2.0", "size": 8750 }
[ "org.onosproject.net.ConnectPoint" ]
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
2,656,452
public void testEquals() { MeterPlot plot1 = new MeterPlot(); MeterPlot plot2 = new MeterPlot(); assertTrue(plot1.equals(plot2)); // units plot1.setUnits("mph"); assertFalse(plot1.equals(plot2)); plot2.setUnits("mph"); assertTrue(plot1.equ...
void function() { MeterPlot plot1 = new MeterPlot(); MeterPlot plot2 = new MeterPlot(); assertTrue(plot1.equals(plot2)); plot1.setUnits("mph"); assertFalse(plot1.equals(plot2)); plot2.setUnits("mph"); assertTrue(plot1.equals(plot2)); plot1.setRange(new Range(50.0, 70.0)); assertFalse(plot1.equals(plot2)); plot2.setRang...
/** * Test the equals method to ensure that it can distinguish the required * fields. Note that the dataset is NOT considered in the equals test. */
Test the equals method to ensure that it can distinguish the required fields. Note that the dataset is NOT considered in the equals test
testEquals
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/jfreechart-1.0.5/tests/org/jfree/chart/plot/junit/MeterPlotTests.java", "license": "gpl-2.0", "size": 10416 }
[ "java.awt.Color", "java.awt.Font", "java.awt.GradientPaint", "java.text.DecimalFormat", "org.jfree.chart.plot.DialShape", "org.jfree.chart.plot.MeterInterval", "org.jfree.chart.plot.MeterPlot", "org.jfree.data.Range" ]
import java.awt.Color; import java.awt.Font; import java.awt.GradientPaint; import java.text.DecimalFormat; import org.jfree.chart.plot.DialShape; import org.jfree.chart.plot.MeterInterval; import org.jfree.chart.plot.MeterPlot; import org.jfree.data.Range;
import java.awt.*; import java.text.*; import org.jfree.chart.plot.*; import org.jfree.data.*;
[ "java.awt", "java.text", "org.jfree.chart", "org.jfree.data" ]
java.awt; java.text; org.jfree.chart; org.jfree.data;
1,441,795
private static int setColorAlpha(int color, byte alpha) { return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color)); }
static int function(int color, byte alpha) { return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color)); }
/** * Set the alpha value of the {@code color} to be the given {@code alpha} value. */
Set the alpha value of the color to be the given alpha value
setColorAlpha
{ "repo_name": "wuyexiong/SmartTabLayout", "path": "library/src/main/java/com/ogaclejapan/smarttablayout/SmartTabStrip.java", "license": "apache-2.0", "size": 13075 }
[ "android.graphics.Color" ]
import android.graphics.Color;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,683,001
@ServiceMethod(returns = ReturnType.SINGLE) public CloudServiceInner createOrUpdate( String resourceGroupName, String cloudServiceName, CloudServiceInner parameters) { return createOrUpdateAsync(resourceGroupName, cloudServiceName, parameters).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) CloudServiceInner function( String resourceGroupName, String cloudServiceName, CloudServiceInner parameters) { return createOrUpdateAsync(resourceGroupName, cloudServiceName, parameters).block(); }
/** * Create or update a cloud service. Please note some properties can be set only during cloud service creation. * * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @param parameters The cloud service object. * @throws IllegalAr...
Create or update a cloud service. Please note some properties can be set only during cloud service creation
createOrUpdate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CloudServicesClientImpl.java", "license": "mit", "size": 179410 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.compute.fluent.models.CloudServiceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.fluent.models.CloudServiceInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
30,179
public void setProductGroup(ProductGroup productGroup) { this.productGroup = productGroup; }
void function(ProductGroup productGroup) { this.productGroup = productGroup; }
/** * Sets the productGroup. * @param productGroup The productGroup to set */
Sets the productGroup
setProductGroup
{ "repo_name": "kuali/ojb-1.0.4", "path": "src/test/org/apache/ojb/odmg/shared/Article.java", "license": "apache-2.0", "size": 9599 }
[ "org.apache.ojb.odmg.shared.ProductGroup" ]
import org.apache.ojb.odmg.shared.ProductGroup;
import org.apache.ojb.odmg.shared.*;
[ "org.apache.ojb" ]
org.apache.ojb;
2,002,926
private void refreshStorageManagerView(CmrRepositoryDefinition cmrRepositoryDefinition) { IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(StorageManagerView.VIEW_ID); if (viewPart instanceof StorageManagerView) { ((StorageManagerView) viewPart).refresh(cmrRep...
void function(CmrRepositoryDefinition cmrRepositoryDefinition) { IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(StorageManagerView.VIEW_ID); if (viewPart instanceof StorageManagerView) { ((StorageManagerView) viewPart).refresh(cmrRepositoryDefinition); } }
/** * Refreshes the {@link StorageManagerView}, but only reloads the storages from given * repository. * * @param cmrRepositoryDefinition * {@link CmrRepositoryDefinition}. */
Refreshes the <code>StorageManagerView</code>, but only reloads the storages from given repository
refreshStorageManagerView
{ "repo_name": "stefansiegl/inspectIT", "path": "inspectIT/src/info/novatec/inspectit/rcp/form/StorageDataPropertyForm.java", "license": "agpl-3.0", "size": 21172 }
[ "info.novatec.inspectit.rcp.repository.CmrRepositoryDefinition", "info.novatec.inspectit.rcp.view.impl.StorageManagerView", "org.eclipse.ui.IViewPart", "org.eclipse.ui.PlatformUI" ]
import info.novatec.inspectit.rcp.repository.CmrRepositoryDefinition; import info.novatec.inspectit.rcp.view.impl.StorageManagerView; import org.eclipse.ui.IViewPart; import org.eclipse.ui.PlatformUI;
import info.novatec.inspectit.rcp.repository.*; import info.novatec.inspectit.rcp.view.impl.*; import org.eclipse.ui.*;
[ "info.novatec.inspectit", "org.eclipse.ui" ]
info.novatec.inspectit; org.eclipse.ui;
781,293
this.initTestSession(method); WebTest webTestAnnotation = method.getAnnotation(WebTest.class); // check class has webtest annotation (i.e. using shared sessions) if (webTestAnnotation == null) { webTestAnnotation = method.getActualMethod().getDeclaringClass().getAnnotation(We...
this.initTestSession(method); WebTest webTestAnnotation = method.getAnnotation(WebTest.class); if (webTestAnnotation == null) { webTestAnnotation = method.getActualMethod().getDeclaringClass().getAnnotation(WebTest.class); } this.browser = getLocalConfigProperty(ConfigProperty.BROWSER); if (webTestAnnotation != null) {...
/** * Call this to initialize the {@link WebTestSession} object from the TestNG {@link IInvokedMethod} * * @param method * - the TestNG {@link IInvokedMethod} * */
Call this to initialize the <code>WebTestSession</code> object from the TestNG <code>IInvokedMethod</code>
initializeTestSession
{ "repo_name": "sundaramrajendran/SeLion", "path": "client/src/main/java/com/paypal/selion/internal/platform/grid/WebTestSession.java", "license": "apache-2.0", "size": 7696 }
[ "com.paypal.selion.annotations.WebTest", "com.paypal.selion.configuration.Config", "org.apache.commons.lang.StringUtils" ]
import com.paypal.selion.annotations.WebTest; import com.paypal.selion.configuration.Config; import org.apache.commons.lang.StringUtils;
import com.paypal.selion.annotations.*; import com.paypal.selion.configuration.*; import org.apache.commons.lang.*;
[ "com.paypal.selion", "org.apache.commons" ]
com.paypal.selion; org.apache.commons;
1,563,166
@Test public void testOptionalParenthesis() throws Exception { //The parenthesis is optional if and only if there is one parameter. LambdaExpression expression = (LambdaExpression) elp.eval("x->64"); Integer result = Integer.valueOf(expression.invoke(3).toString()); assertTrue(...
void function() throws Exception { LambdaExpression expression = (LambdaExpression) elp.eval("x->64"); Integer result = Integer.valueOf(expression.invoke(3).toString()); assertTrue(STR + result, result == 64); }
/** * The parenthesis is optional if and only if there is one parameter * "x->64"))).invoke(3) * * @throws Exception */
The parenthesis is optional if and only if there is one parameter "x->64"))).invoke(3)
testOptionalParenthesis
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.el.3.0_fat/test-applications/TestEL3.0.war/src/com/ibm/ws/el30/fat/servlets/TestVariousLambdaExpression.java", "license": "epl-1.0", "size": 9384 }
[ "javax.el.LambdaExpression", "org.junit.Assert" ]
import javax.el.LambdaExpression; import org.junit.Assert;
import javax.el.*; import org.junit.*;
[ "javax.el", "org.junit" ]
javax.el; org.junit;
1,488,884
public int getColorTemperature(String deviceId) { if (settingsData == null) { logger.error("Hue bridge settings not initialized correctly."); return 154; } Object ct = settingsData.node("lights").node(deviceId).node("state").value("ct"); if (ct instanceof Inte...
int function(String deviceId) { if (settingsData == null) { logger.error(STR); return 154; } Object ct = settingsData.node(STR).node(deviceId).node("state").value("ct"); if (ct instanceof Integer) { return (Integer) ct; } else { return 154; } } /** * Determines the brightness of the given bulb. * * @param deviceId * Th...
/** * Determines the color temperature of the given bulb. * * @param deviceId * The bulb id the bridge has filed the bulb under. * @return The color temperature as a value from 154 - 500 */
Determines the color temperature of the given bulb
getColorTemperature
{ "repo_name": "sedstef/openhab", "path": "bundles/binding/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/data/HueSettings.java", "license": "epl-1.0", "size": 10034 }
[ "org.openhab.binding.hue.internal.hardware.HueBulb" ]
import org.openhab.binding.hue.internal.hardware.HueBulb;
import org.openhab.binding.hue.internal.hardware.*;
[ "org.openhab.binding" ]
org.openhab.binding;
628,121
public void commitTransaction(Connection connection) { finalizeStatement(connection); initList(); _list.add(new FinalizedStatement(connection, StatementType.TRANSACTION_COMMIT)); }
void function(Connection connection) { finalizeStatement(connection); initList(); _list.add(new FinalizedStatement(connection, StatementType.TRANSACTION_COMMIT)); }
/** * Adda "commit transaction" statement to the internal list of finalized statements. * * @param connection The connection the statement is for. */
Adda "commit transaction" statement to the internal list of finalized statements
commitTransaction
{ "repo_name": "JCThePants/MySqlProvider", "path": "src/com/jcwhatever/nucleus/providers/mysql/statements/Statement.java", "license": "mit", "size": 6063 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,129,752
public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fIn...
void function(QName element, Augmentations augs) throws XNIException { if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(e...
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */
The end of an element
endElement
{ "repo_name": "jimma/xerces", "path": "src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java", "license": "apache-2.0", "size": 22414 }
[ "org.apache.xerces.impl.xs.SchemaSymbols", "org.apache.xerces.xni.Augmentations", "org.apache.xerces.xni.QName", "org.apache.xerces.xni.XNIException" ]
import org.apache.xerces.impl.xs.SchemaSymbols; import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.QName; import org.apache.xerces.xni.XNIException;
import org.apache.xerces.impl.xs.*; import org.apache.xerces.xni.*;
[ "org.apache.xerces" ]
org.apache.xerces;
1,779,993
public static List<FileStatus> listMostNestedPathRecursively(FileSystem fs, Path path) throws IOException { return listMostNestedPathRecursively(fs, path, NO_OP_PATH_FILTER); }
static List<FileStatus> function(FileSystem fs, Path path) throws IOException { return listMostNestedPathRecursively(fs, path, NO_OP_PATH_FILTER); }
/** * Method to list out all files, or directory if no file exists, under a specified path. */
Method to list out all files, or directory if no file exists, under a specified path
listMostNestedPathRecursively
{ "repo_name": "zliu41/gobblin", "path": "gobblin-utility/src/main/java/gobblin/util/FileListUtils.java", "license": "apache-2.0", "size": 6047 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
758,184
@VisibleForTesting(otherwise = VisibleForTesting.NONE) public static boolean confirmMinimalUIForTest() { return sShowingPaymentRequest != null && sShowingPaymentRequest.confirmMinimalUIForTestInternal(); }
@VisibleForTesting(otherwise = VisibleForTesting.NONE) static boolean function() { return sShowingPaymentRequest != null && sShowingPaymentRequest.confirmMinimalUIForTestInternal(); }
/** * Confirms payment in minimal UI. Used only in test. * * @return Whether the payment was confirmed successfully. */
Confirms payment in minimal UI. Used only in test
confirmMinimalUIForTest
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java", "license": "bsd-3-clause", "size": 137589 }
[ "androidx.annotation.VisibleForTesting" ]
import androidx.annotation.VisibleForTesting;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,318,837
public Enumeration oids() { return ordering.elements(); }
Enumeration function() { return ordering.elements(); }
/** * return an Enumeration of the extension field's object ids. */
return an Enumeration of the extension field's object ids
oids
{ "repo_name": "Turksat/ESign", "path": "ESignCore/src/main/java/org/bouncycastle/asn1/x509/X509Extensions.java", "license": "apache-2.0", "size": 13674 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,219,331
public void setHeaderName(String headerName) { Assert.hasLength(headerName, "headerName cannot be null or empty"); this.headerName = headerName; }
void function(String headerName) { Assert.hasLength(headerName, STR); this.headerName = headerName; }
/** * Sets the header name that the {@link CsrfToken} is expected to appear on * and the header that the response will contain the {@link CsrfToken}. * * @param headerName * the new header name to use */
Sets the header name that the <code>CsrfToken</code> is expected to appear on and the header that the response will contain the <code>CsrfToken</code>
setHeaderName
{ "repo_name": "wilkinsona/spring-security", "path": "web/src/main/java/org/springframework/security/web/csrf/HttpSessionCsrfTokenRepository.java", "license": "apache-2.0", "size": 4298 }
[ "org.springframework.util.Assert" ]
import org.springframework.util.Assert;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
458,059
public Collection getDeltaCertificateRevocationLists( X509CRLStoreSelector selector) throws StoreException { String[] attrs = splitString(params.getDeltaRevocationListAttribute()); String attrNames[] = splitString(params.getLdapDeltaRevocationListAttributeName()); String issuerAt...
Collection function( X509CRLStoreSelector selector) throws StoreException { String[] attrs = splitString(params.getDeltaRevocationListAttribute()); String attrNames[] = splitString(params.getLdapDeltaRevocationListAttributeName()); String issuerAttributeNames[] = splitString(params .getDeltaRevocationListIssuerAttribut...
/** * Returns the delta revocation list for revoked certificates. * * @param selector The CRL selector to use to find the CRLs. * @return A possible empty collection with CRLs. * @throws StoreException */
Returns the delta revocation list for revoked certificates
getDeltaCertificateRevocationLists
{ "repo_name": "dirtyfilthy/dirtyfilthy-bouncycastle", "path": "net/dirtyfilthy/bouncycastle/x509/util/LDAPStoreHelper.java", "license": "mit", "size": 40315 }
[ "java.util.Collection", "java.util.List", "java.util.Set", "net.dirtyfilthy.bouncycastle.util.StoreException", "net.dirtyfilthy.bouncycastle.x509.X509CRLStoreSelector" ]
import java.util.Collection; import java.util.List; import java.util.Set; import net.dirtyfilthy.bouncycastle.util.StoreException; import net.dirtyfilthy.bouncycastle.x509.X509CRLStoreSelector;
import java.util.*; import net.dirtyfilthy.bouncycastle.util.*; import net.dirtyfilthy.bouncycastle.x509.*;
[ "java.util", "net.dirtyfilthy.bouncycastle" ]
java.util; net.dirtyfilthy.bouncycastle;
1,083,610
@Nullable public Contact put(@Nonnull final Contact newContact) throws ClientException { return send(HttpMethod.PUT, newContact); }
Contact function(@Nonnull final Contact newContact) throws ClientException { return send(HttpMethod.PUT, newContact); }
/** * Creates a Contact with a new object * * @param newContact the object to create/update * @return the created Contact * @throws ClientException this exception occurs if the request was unable to complete for any reason */
Creates a Contact with a new object
put
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/ContactRequest.java", "license": "mit", "size": 6050 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.Contact", "javax.annotation.Nonnull" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.Contact; import javax.annotation.Nonnull;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
2,880,849
public static AlertDialog.Builder confirm(final Activity context, final int title, final int msg, final OnClickListener okayListener) { return confirm(context, getString(title), getString(msg), okayListener); }
static AlertDialog.Builder function(final Activity context, final int title, final int msg, final OnClickListener okayListener) { return confirm(context, getString(title), getString(msg), okayListener); }
/** * Confirm using two buttons "OK" and "Cancel", where "Cancel" just closes the dialog. * * @param context * activity hosting the dialog * @param title * dialog title * @param msg * dialog message * @param okayListener * lis...
Confirm using two buttons "OK" and "Cancel", where "Cancel" just closes the dialog
confirm
{ "repo_name": "eric-stanley/cgeo", "path": "main/src/cgeo/geocaching/ui/dialog/Dialogs.java", "license": "apache-2.0", "size": 14006 }
[ "android.app.Activity", "android.app.AlertDialog", "android.content.DialogInterface" ]
import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface;
import android.app.*; import android.content.*;
[ "android.app", "android.content" ]
android.app; android.content;
485,171
public int getValue(Limit limit) { return values[limit.ordinal()]; }
int function(Limit limit) { return values[limit.ordinal()]; }
/** * Return the value of the current max count for the specified property * * @param limit the property * @return the value of the property */
Return the value of the current max count for the specified property
getValue
{ "repo_name": "lostdj/Jaklin-OpenJDK-JAXP", "path": "src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java", "license": "gpl-2.0", "size": 8165 }
[ "com.sun.org.apache.xerces.internal.utils.XMLSecurityManager" ]
import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
import com.sun.org.apache.xerces.internal.utils.*;
[ "com.sun.org" ]
com.sun.org;
849,048
public com.google.common.util.concurrent.ListenableFuture<com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup> updateGroup( com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest request) { return futureUnaryCall( getChannel().newCall(getUpdateGroupMethodHelper(), getCallO...
com.google.common.util.concurrent.ListenableFuture<com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup> function( com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest request) { return futureUnaryCall( getChannel().newCall(getUpdateGroupMethodHelper(), getCallOptions()), request); } } private stati...
/** * <pre> * Replace the data for the specified group. * Fails if the group does not exist. * </pre> */
<code> Replace the data for the specified group. Fails if the group does not exist. </code>
updateGroup
{ "repo_name": "pongad/api-client-staging", "path": "generated/java/grpc-google-cloud-error-reporting-v1beta1/src/main/java/com/google/devtools/clouderrorreporting/v1beta1/ErrorGroupServiceGrpc.java", "license": "bsd-3-clause", "size": 17635 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
2,583,643
public Date getBirthDate() { return birthDate; }
Date function() { return birthDate; }
/** * Gets the birth date. * * @return the birth date */
Gets the birth date
getBirthDate
{ "repo_name": "tlin-fei/ds4p", "path": "DS4P/consent2share/core/src/main/java/gov/samhsa/consent2share/service/dto/SignupDto.java", "license": "bsd-3-clause", "size": 4330 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,558,089
public void militarize(ISlicingTool tool);
void function(ISlicingTool tool);
/** * Demilitarizes the current tool (if different) and miliarizes this tool. * * @param tool */
Demilitarizes the current tool (if different) and miliarizes this tool
militarize
{ "repo_name": "xen-0/dawnsci", "path": "org.eclipse.dawnsci.slicing.api/src/org/eclipse/dawnsci/slicing/api/system/ISliceSystem.java", "license": "epl-1.0", "size": 8408 }
[ "org.eclipse.dawnsci.slicing.api.tool.ISlicingTool" ]
import org.eclipse.dawnsci.slicing.api.tool.ISlicingTool;
import org.eclipse.dawnsci.slicing.api.tool.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
1,411,062
public static void printResults( ValidateBean bean, ValidatorResults results, ValidatorResources resources) { boolean success = true; // Start by getting the form for the current locale and Bean. Form form = resources.getForm(Locale.getDefault(), "Valida...
static void function( ValidateBean bean, ValidatorResults results, ValidatorResources resources) { boolean success = true; Form form = resources.getForm(Locale.getDefault(), STR); System.out.println(STR); System.out.println(bean); Iterator<String> propertyNames = results.getPropertyNames().iterator(); while (propertyNa...
/** * Dumps out the Bean in question and the results of validating it. */
Dumps out the Bean in question and the results of validating it
printResults
{ "repo_name": "floscher/commons-validator", "path": "src/example/org/apache/commons/validator/example/ValidateExample.java", "license": "apache-2.0", "size": 7763 }
[ "java.text.MessageFormat", "java.util.Iterator", "java.util.Locale", "org.apache.commons.validator.Field", "org.apache.commons.validator.Form", "org.apache.commons.validator.ValidatorAction", "org.apache.commons.validator.ValidatorResources", "org.apache.commons.validator.ValidatorResult", "org.apac...
import java.text.MessageFormat; import java.util.Iterator; import java.util.Locale; import org.apache.commons.validator.Field; import org.apache.commons.validator.Form; import org.apache.commons.validator.ValidatorAction; import org.apache.commons.validator.ValidatorResources; import org.apache.commons.validator.Valida...
import java.text.*; import java.util.*; import org.apache.commons.validator.*;
[ "java.text", "java.util", "org.apache.commons" ]
java.text; java.util; org.apache.commons;
1,366,899
private void updateBottomSheetPosition() { gpsApp.setGPSActivityActiveTab(tabLayout.getSelectedTabPosition()); if (gpsApp.getGPSActivityActiveTab() != 2) { bottomSheetBehavior.setPeekHeight(1); bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED); //Lo...
void function() { gpsApp.setGPSActivityActiveTab(tabLayout.getSelectedTabPosition()); if (gpsApp.getGPSActivityActiveTab() != 2) { bottomSheetBehavior.setPeekHeight(1); bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED); bottomSheetBehavior.setPeekHeight(bottomSheet.getHeight()); } else { bottomSheetBehav...
/** * Expands/Collapses the bottom bar, basing on the active tab. */
Expands/Collapses the bottom bar, basing on the active tab
updateBottomSheetPosition
{ "repo_name": "BasicAirData/GPSLogger", "path": "app/src/main/java/eu/basicairdata/graziano/gpslogger/GPSActivity.java", "license": "gpl-3.0", "size": 27441 }
[ "com.google.android.material.bottomsheet.BottomSheetBehavior" ]
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.bottomsheet.*;
[ "com.google.android" ]
com.google.android;
520,608
public final boolean isInRange(double value) { // dates and missing values are a special case if (m_Type == DATE || Instance.isMissingValue(value)) return true; if (m_Type != NUMERIC) { // do label range check int intVal = (int) value; if (intVal < 0 || intVal >= m_Hashtable.size()) r...
final boolean function(double value) { if (m_Type == DATE Instance.isMissingValue(value)) return true; if (m_Type != NUMERIC) { int intVal = (int) value; if (intVal < 0 intVal >= m_Hashtable.size()) return false; } else { if (m_LowerBoundIsOpen) { if (value <= m_LowerBound) return false; } else { if (value < m_LowerBou...
/** * Determines whether a value lies within the bounds of the attribute. * * @param value the value to check * @return whether the value is in range */
Determines whether a value lies within the bounds of the attribute
isInRange
{ "repo_name": "williamClanton/singularity", "path": "weka/src/main/java/weka/core/Attribute.java", "license": "mit", "size": 51065 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
1,630,187
@Test public void testUnequalOverlappingKeyExpression() throws SQLException { String tenantId = "000000000000001"; String keyPrefix = "002"; String entityId = "001333333333333"; String query = "select * from atable where organization_id='" + tenantId + "' and substr(entity_id,1,3...
void function() throws SQLException { String tenantId = STR; String keyPrefix = "002"; String entityId = STR; String query = STR + tenantId + STR + keyPrefix + STR + entityId + "'"; Scan scan = new Scan(); List<Object> binds = Collections.emptyList(); compileStatement(query, scan, binds); assertDegenerate(scan); }
/** * This is testing the degenerate case where nothing will match because the overlapping keys (keyPrefix and entityId) don't match. * @throws SQLException */
This is testing the degenerate case where nothing will match because the overlapping keys (keyPrefix and entityId) don't match
testUnequalOverlappingKeyExpression
{ "repo_name": "forcedotcom/phoenix", "path": "phoenix-core/src/test/java/com/salesforce/phoenix/compile/WhereClauseOptimizerTest.java", "license": "bsd-3-clause", "size": 84364 }
[ "com.salesforce.phoenix.util.TestUtil", "java.sql.SQLException", "java.util.Collections", "java.util.List", "org.apache.hadoop.hbase.client.Scan" ]
import com.salesforce.phoenix.util.TestUtil; import java.sql.SQLException; import java.util.Collections; import java.util.List; import org.apache.hadoop.hbase.client.Scan;
import com.salesforce.phoenix.util.*; import java.sql.*; import java.util.*; import org.apache.hadoop.hbase.client.*;
[ "com.salesforce.phoenix", "java.sql", "java.util", "org.apache.hadoop" ]
com.salesforce.phoenix; java.sql; java.util; org.apache.hadoop;
2,305,017
protected void sendUnlink(final OtpErlangPid from, final OtpErlangPid dest, long unlink_id) throws IOException { if (!connected) { throw new IOException("Not connected"); } @SuppressWarnings("resource") final OtpOutputStream heade...
void function(final OtpErlangPid from, final OtpErlangPid dest, long unlink_id) throws IOException { if (!connected) { throw new IOException(STR); } @SuppressWarnings(STR) final OtpOutputStream header = new OtpOutputStream(headerLen); header.write4BE(0); header.write1(passThrough); header.write1(version); if ((peer.fla...
/** * * Send unlink signal to remote process. * * @param dest * the Erlang PID of the remote process. * * @exception java.io.IOException * if the connection is not active or a communication error * occurs. */
Send unlink signal to remote process
sendUnlink
{ "repo_name": "potatosalad/otp", "path": "lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java", "license": "apache-2.0", "size": 54241 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
737,383
@Adjacency(label = EXCLUDE_JAVA_PACKAGES, direction = Direction.OUT) void addExcludeJavaPackage(PackageModel scanJavaPackage);
@Adjacency(label = EXCLUDE_JAVA_PACKAGES, direction = Direction.OUT) void addExcludeJavaPackage(PackageModel scanJavaPackage);
/** * What Java packages to exclude during scanning of applications. */
What Java packages to exclude during scanning of applications
addExcludeJavaPackage
{ "repo_name": "bradsdavis/windup", "path": "rules-java/src/main/java/org/jboss/windup/rules/apps/java/model/WindupJavaConfigurationModel.java", "license": "epl-1.0", "size": 4690 }
[ "com.tinkerpop.blueprints.Direction", "com.tinkerpop.frames.Adjacency" ]
import com.tinkerpop.blueprints.Direction; import com.tinkerpop.frames.Adjacency;
import com.tinkerpop.blueprints.*; import com.tinkerpop.frames.*;
[ "com.tinkerpop.blueprints", "com.tinkerpop.frames" ]
com.tinkerpop.blueprints; com.tinkerpop.frames;
637,680
// This method is automatically generated and should not be modified directly. String url = String.format("/lol/tournament/v4/codes/%1$s", tournamentCode); Type type = TournamentCode.class; return riotApi.getBasic("tournament-v4.getTournamentCode", url, region, type, Collections.emptyList()); }
String url = String.format(STR, tournamentCode); Type type = TournamentCode.class; return riotApi.getBasic(STR, url, region, type, Collections.emptyList()); }
/** * Returns the tournament code DTO associated with a tournament code string. * * <a href="https://developer.riotgames.com/api-methods/#tournament-v4/GET_getTournamentCode">Link to Portal</a><br> * @param region Region to execute against. * @param tournamentCode (required) The tournament code string. ...
Returns the tournament code DTO associated with a tournament code string. Link to Portal
getTournamentCode
{ "repo_name": "MingweiSamuel/Zyra", "path": "src/main/gen/com/mingweisamuel/zyra/TournamentV4Endpoints.java", "license": "lgpl-3.0", "size": 3773 }
[ "com.mingweisamuel.zyra.tournamentV4.TournamentCode", "java.lang.String", "java.lang.reflect.Type", "java.util.Collections" ]
import com.mingweisamuel.zyra.tournamentV4.TournamentCode; import java.lang.String; import java.lang.reflect.Type; import java.util.Collections;
import com.mingweisamuel.zyra.*; import java.lang.*; import java.lang.reflect.*; import java.util.*;
[ "com.mingweisamuel.zyra", "java.lang", "java.util" ]
com.mingweisamuel.zyra; java.lang; java.util;
1,098,274
public JButton getCancelButton(){ return cancelButton; }
JButton function(){ return cancelButton; }
/** * Cancel button accessor */
Cancel button accessor
getCancelButton
{ "repo_name": "PuzzleBot/dayplanner", "path": "src/dayplanner/ExitWindow.java", "license": "mit", "size": 1383 }
[ "javax.swing.JButton" ]
import javax.swing.JButton;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,826,600
public Iterator<Item> iterator() { return new RandomQueueIterator(); }
Iterator<Item> function() { return new RandomQueueIterator(); }
/** * returns an iterator of this random queue object. */
returns an iterator of this random queue object
iterator
{ "repo_name": "ashish-chopra/Structures", "path": "src/main/java/com/queues/RandomizedQueue.java", "license": "mit", "size": 3365 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
73,991
public static boolean hasListenerAnnotation(AnnotatedNode node) { for (AnnotationNode annotation : node.getAnnotations()) { if (CHANGE_LISTENER_CLASS.equals(annotation.getClassNode())) { return true; } } return false; }
static boolean function(AnnotatedNode node) { for (AnnotationNode annotation : node.getAnnotations()) { if (CHANGE_LISTENER_CLASS.equals(annotation.getClassNode())) { return true; } } return false; }
/** * Convenience method to see if an annotated node is {@code @ChangeListener}. * * @param node the node to check * @return true if the node is an event publisher */
Convenience method to see if an annotated node is @ChangeListener
hasListenerAnnotation
{ "repo_name": "griffon/griffon", "path": "subprojects/griffon-groovy-compile/src/main/java/org/codehaus/griffon/compile/core/ast/transform/ChangeListenerASTTransformation.java", "license": "apache-2.0", "size": 8885 }
[ "org.codehaus.groovy.ast.AnnotatedNode", "org.codehaus.groovy.ast.AnnotationNode" ]
import org.codehaus.groovy.ast.AnnotatedNode; import org.codehaus.groovy.ast.AnnotationNode;
import org.codehaus.groovy.ast.*;
[ "org.codehaus.groovy" ]
org.codehaus.groovy;
1,245,656
public Vector3i getOffset() { return this.offset; }
Vector3i function() { return this.offset; }
/** * Represents the directional offset of this Blockface as a Vector3i. * * @return the offset of this directional. */
Represents the directional offset of this Blockface as a Vector3i
getOffset
{ "repo_name": "flow/engine", "path": "src/main/java/com/flowpowered/api/material/block/BlockFace.java", "license": "mit", "size": 4431 }
[ "com.flowpowered.math.vector.Vector3i" ]
import com.flowpowered.math.vector.Vector3i;
import com.flowpowered.math.vector.*;
[ "com.flowpowered.math" ]
com.flowpowered.math;
546,765
public void response(CaravanHttpResponse payload) { this.response = payload; }
void function(CaravanHttpResponse payload) { this.response = payload; }
/** * Set the response that this request matcher should return. * @param payload Payload */
Set the response that this request matcher should return
response
{ "repo_name": "wcm-io-caravan/caravan-testing", "path": "http-test/src/main/java/io/wcm/caravan/testing/http/RequestMatcher.java", "license": "apache-2.0", "size": 3735 }
[ "io.wcm.caravan.io.http.response.CaravanHttpResponse" ]
import io.wcm.caravan.io.http.response.CaravanHttpResponse;
import io.wcm.caravan.io.http.response.*;
[ "io.wcm.caravan" ]
io.wcm.caravan;
2,514,297
public static Object[] verifyCertificates(Certificate certs[], KeyStore keystore, Collection crls, Calendar calendar) { if(calendar == null) calendar = new GregorianCalendar(); for(int k = 0; k < certs.length; ++k) { X509Certificate cert = (X509Certificate) certs[k]; String err = verifyCertificate(ce...
static Object[] function(Certificate certs[], KeyStore keystore, Collection crls, Calendar calendar) { if(calendar == null) calendar = new GregorianCalendar(); for(int k = 0; k < certs.length; ++k) { X509Certificate cert = (X509Certificate) certs[k]; String err = verifyCertificate(cert, crls, calendar); if(err != null)...
/** * Verifies a certificate chain against a KeyStore. * * @param certs the certificate chain * @param keystore the <CODE>KeyStore</CODE> * @param crls the certificate revocation list or <CODE>null</CODE> * @param calendar the date or <CODE>null</CODE> for the current date * @return <CODE>null</COD...
Verifies a certificate chain against a KeyStore
verifyCertificates
{ "repo_name": "SafetyCulture/DroidText", "path": "app/src/main/java/com/lowagie/text/pdf/PdfPKCS7.java", "license": "lgpl-3.0", "size": 57524 }
[ "java.security.KeyStore", "java.security.cert.Certificate", "java.security.cert.X509Certificate", "java.util.Calendar", "java.util.Collection", "java.util.Enumeration", "java.util.GregorianCalendar" ]
import java.security.KeyStore; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Calendar; import java.util.Collection; import java.util.Enumeration; import java.util.GregorianCalendar;
import java.security.*; import java.security.cert.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
2,489,658
@Nonnull JobStatus getStatus(); // ### Methods below apply only to normal (non-light) jobs.
JobStatus getStatus();
/** * Returns the current status of this job. Each invocation queries the * status from the job coordinator. For light jobs it returns only {@link * JobStatus#RUNNING RUNNING}, {@link JobStatus#COMPLETED COMPLETED} or * {@link JobStatus#FAILED FAILED}. */
Returns the current status of this job. Each invocation queries the status from the job coordinator. For light jobs it returns only <code>JobStatus#RUNNING RUNNING</code>, <code>JobStatus#COMPLETED COMPLETED</code> or <code>JobStatus#FAILED FAILED</code>
getStatus
{ "repo_name": "jerrinot/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/jet/Job.java", "license": "apache-2.0", "size": 15013 }
[ "com.hazelcast.jet.core.JobStatus" ]
import com.hazelcast.jet.core.JobStatus;
import com.hazelcast.jet.core.*;
[ "com.hazelcast.jet" ]
com.hazelcast.jet;
2,396,818
@Nonnull List<String> getGroups();
List<String> getGroups();
/** * Get all groups (or categories) of this version number. The first element in the list is the major category, * followed by the minor and bugfix segment of the version number.<br> * <br> * The returned list of the version number segments should be immutable. * * @return a list of segments of the versio...
Get all groups (or categories) of this version number. The first element in the list is the major category, followed by the minor and bugfix segment of the version number. The returned list of the version number segments should be immutable
getGroups
{ "repo_name": "zpzgone/uadetector", "path": "modules/uadetector-core/src/main/java/net/sf/uadetector/ReadableVersionNumber.java", "license": "apache-2.0", "size": 3039 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,597,522
private static Deque<String> expandArguments(List<String> args) throws IOException { Deque<String> expanded = new ArrayDeque<>(args.size()); for (String arg : args) { expandArgument(expanded, arg); } return expanded; }
static Deque<String> function(List<String> args) throws IOException { Deque<String> expanded = new ArrayDeque<>(args.size()); for (String arg : args) { expandArgument(expanded, arg); } return expanded; }
/** * Pre-processes an argument list, expanding options @filename to read in * the content of the file and add it to the list of arguments. * * @param args the List of arguments to pre-process. * @return the List of pre-processed arguments. * @throws java.io.IOException if one of the files containing ...
Pre-processes an argument list, expanding options @filename to read in the content of the file and add it to the list of arguments
expandArguments
{ "repo_name": "kamalmarhubi/bazel", "path": "src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java", "license": "apache-2.0", "size": 12721 }
[ "java.io.IOException", "java.util.ArrayDeque", "java.util.Deque", "java.util.List" ]
import java.io.IOException; import java.util.ArrayDeque; import java.util.Deque; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
963,818
@Nullable private DateTime computeUniversalTimestamp() { final String timestampStringFromContext = getContextValue(CTX_KEY_FUDGE_TIMESTAMP, ""); final Granularity granularity = getGranularity(); if (!timestampStringFromContext.isEmpty()) { return DateTimes.utc(Long.parseLong(timestampStringFrom...
DateTime function() { final String timestampStringFromContext = getContextValue(CTX_KEY_FUDGE_TIMESTAMP, ""); final Granularity granularity = getGranularity(); if (!timestampStringFromContext.isEmpty()) { return DateTimes.utc(Long.parseLong(timestampStringFromContext)); } else if (Granularities.ALL.equals(granularity))...
/** * Computes the timestamp that will be returned by {@link #getUniversalTimestamp()}. */
Computes the timestamp that will be returned by <code>#getUniversalTimestamp()</code>
computeUniversalTimestamp
{ "repo_name": "gianm/druid", "path": "processing/src/main/java/org/apache/druid/query/groupby/GroupByQuery.java", "license": "apache-2.0", "size": 38718 }
[ "org.apache.druid.java.util.common.DateTimes", "org.apache.druid.java.util.common.granularity.Granularities", "org.apache.druid.java.util.common.granularity.Granularity", "org.joda.time.DateTime", "org.joda.time.Interval" ]
import org.apache.druid.java.util.common.DateTimes; import org.apache.druid.java.util.common.granularity.Granularities; import org.apache.druid.java.util.common.granularity.Granularity; import org.joda.time.DateTime; import org.joda.time.Interval;
import org.apache.druid.java.util.common.*; import org.apache.druid.java.util.common.granularity.*; import org.joda.time.*;
[ "org.apache.druid", "org.joda.time" ]
org.apache.druid; org.joda.time;
2,716,282
protected void sequence_Target(EObject context, Target semanticObject) { if(errorAcceptor != null) { if(transientValues.isValueTransient(semanticObject, RestfuncDSLPackage.Literals.TARGET__DE_TARGET) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Res...
void function(EObject context, Target semanticObject) { if(errorAcceptor != null) { if(transientValues.isValueTransient(semanticObject, RestfuncDSLPackage.Literals.TARGET__DE_TARGET) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, RestfuncDSLPackage.Literals.TARG...
/** * Constraint: * deTarget=ID */
Constraint: deTarget=ID
sequence_Target
{ "repo_name": "surli/spinefm", "path": "spinefm-restfuncDSL-root/restfuncDSL/src-gen/fr/unice/spinefm/serializer/RestfuncDSLSemanticSequencer.java", "license": "mit", "size": 12558 }
[ "fr.unice.spinefm.restfuncDSL.RestfuncDSLPackage", "fr.unice.spinefm.restfuncDSL.Target", "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.serializer.acceptor.SequenceFeeder", "org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider", "org.eclipse.xtext.serializer.sequencer.ITransientValueService"...
import fr.unice.spinefm.restfuncDSL.RestfuncDSLPackage; import fr.unice.spinefm.restfuncDSL.Target; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider; import org.eclipse.xtext.serializer.sequencer.ITrans...
import fr.unice.spinefm.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*;
[ "fr.unice.spinefm", "org.eclipse.emf", "org.eclipse.xtext" ]
fr.unice.spinefm; org.eclipse.emf; org.eclipse.xtext;
543,731
public void addDefaultChannel(String id) { if (defaultChannels == null) defaultChannels = new ArrayList<String>(); else if (defaultChannels.contains(id)) return; List<String> channelIds = getChannelIds(); if (channelIds == null || !channelIds.contains(id)...
void function(String id) { if (defaultChannels == null) defaultChannels = new ArrayList<String>(); else if (defaultChannels.contains(id)) return; List<String> channelIds = getChannelIds(); if (channelIds == null !channelIds.contains(id)) { if (Log.isWarn()) { Log.getLogger(LOG_CATEGORY).warn(STR + STR, new Object[]{id}...
/** * Adds the channel id to the list of default channel ids. * * @param id The id of the channel to add to the list of default channel ids. */
Adds the channel id to the list of default channel ids
addDefaultChannel
{ "repo_name": "designreuse/flex-blazeds", "path": "modules/core/src/flex/messaging/MessageBroker.java", "license": "apache-2.0", "size": 77273 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,116,616
@Nonnull Map<String, Property> getProperties();
Map<String, Property> getProperties();
/** * Get class properties. * * @return Map [property_name] = [{@link com.jetbrains.python.psi.Property}] */
Get class properties
getProperties
{ "repo_name": "consulo/consulo-python", "path": "python-psi-api/src/main/java/com/jetbrains/python/psi/PyClass.java", "license": "apache-2.0", "size": 9952 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
831,752
protected void setTypeConversions(List<Pair<String, String>> typeConversions, boolean notifyController) { this.conversions.clear(); if (typeConversions != null) { for (final Pair<String, String> entry : typeConversions) { this.conversions.add(new ConversionMapping(entry.getKey(), entry.getValue())); } ...
void function(List<Pair<String, String>> typeConversions, boolean notifyController) { this.conversions.clear(); if (typeConversions != null) { for (final Pair<String, String> entry : typeConversions) { this.conversions.add(new ConversionMapping(entry.getKey(), entry.getValue())); } } this.list.setInput(this.conversions...
/** * Sets the type conversions to be displayed in this block. * * @param typeConversions the type conversions. * @param notifyController indicates if the controller should be notified. */
Sets the type conversions to be displayed in this block
setTypeConversions
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java", "license": "apache-2.0", "size": 29496 }
[ "java.util.List", "org.eclipse.xtext.xbase.lib.Pair" ]
import java.util.List; import org.eclipse.xtext.xbase.lib.Pair;
import java.util.*; import org.eclipse.xtext.xbase.lib.*;
[ "java.util", "org.eclipse.xtext" ]
java.util; org.eclipse.xtext;
2,854,805
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<P2SVpnGatewayInner> getByResourceGroupAsync(String resourceGroupName, String gatewayName) { return getByResourceGroupWithResponseAsync(resourceGroupName, gatewayName) .flatMap( (Response<P2SVpnGatewayInner> res) -> { ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<P2SVpnGatewayInner> function(String resourceGroupName, String gatewayName) { return getByResourceGroupWithResponseAsync(resourceGroupName, gatewayName) .flatMap( (Response<P2SVpnGatewayInner> res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } els...
/** * Retrieves the details of a virtual wan p2s vpn gateway. * * @param resourceGroupName The resource group name of the P2SVpnGateway. * @param gatewayName The name of the gateway. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException ...
Retrieves the details of a virtual wan p2s vpn gateway
getByResourceGroupAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/P2SVpnGatewaysClientImpl.java", "license": "mit", "size": 155308 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.network.fluent.models.P2SVpnGatewayInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.network.fluent.models.P2SVpnGatewayInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,353,477
public void writeAnimatedGIF(List<GIFFrame> frames, OutputStream os) throws Exception { writeAnimatedGIF(frames.toArray(new GIFFrame[0]), os); }
void function(List<GIFFrame> frames, OutputStream os) throws Exception { writeAnimatedGIF(frames.toArray(new GIFFrame[0]), os); }
/** * Writes a list of GIFFrame as an animated GIF * * @param frames * a list of GIFFrame * @param os * OutputStream for the animated GIF * @throws Exception */
Writes a list of GIFFrame as an animated GIF
writeAnimatedGIF
{ "repo_name": "vjay82/Distributed-Classroom", "path": "src/de/volkerGronau/distributedClassroom/AnimatedGIFWriter.java", "license": "gpl-3.0", "size": 56979 }
[ "java.io.OutputStream", "java.util.List" ]
import java.io.OutputStream; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,385,872
@Override public void init() throws Exception { if (!initialized) { Assert.hasText(namespace, "namespace is required"); Assert.hasText(name, "name is required"); Assert.hasText(getProvidersUrl(), "providersUrl is required"); // Assert.notNul...
void function() throws Exception { if (!initialized) { Assert.hasText(namespace, STR); Assert.hasText(name, STR); Assert.hasText(getProvidersUrl(), STR); String url = getProvidersUrl(); if (!StringUtils.isEmpty(url)) { if (url.charAt(0) == '/') { url.substring(1); } setProvidersUrl(url); } String apiFile = name + ".js"...
/** * Registry initialization * @throws Exception */
Registry initialization
init
{ "repo_name": "devacfr/matcha", "path": "direct/src/main/java/org/cfr/matcha/direct/spi/BaseDirectContext.java", "license": "apache-2.0", "size": 11720 }
[ "com.google.common.collect.Sets", "com.softwarementors.extjs.djn.jscodegen.CodeFileGenerator", "org.apache.commons.lang.StringUtils", "org.cfr.commons.util.Assert", "org.cfr.commons.util.collection.CollectionUtil" ]
import com.google.common.collect.Sets; import com.softwarementors.extjs.djn.jscodegen.CodeFileGenerator; import org.apache.commons.lang.StringUtils; import org.cfr.commons.util.Assert; import org.cfr.commons.util.collection.CollectionUtil;
import com.google.common.collect.*; import com.softwarementors.extjs.djn.jscodegen.*; import org.apache.commons.lang.*; import org.cfr.commons.util.*; import org.cfr.commons.util.collection.*;
[ "com.google.common", "com.softwarementors.extjs", "org.apache.commons", "org.cfr.commons" ]
com.google.common; com.softwarementors.extjs; org.apache.commons; org.cfr.commons;
704,774
public void addError(ASTNode ast, String msg, String suggestion, Type[] expected, Type actual) { program.addError(new TypeMismatchError(ast, msg, ...
void function(ASTNode ast, String msg, String suggestion, Type[] expected, Type actual) { program.addError(new TypeMismatchError(ast, msg, suggestion, expected, actual)); }
/** * Constructs a new TypeMismatchError on an offending ASTNode * @param ast the ASTNode this error originated from * @param msg the message explaining the error * @param suggestion the suggestion suggesting a fix to the error * @param expected all Types this ASTNode was expected to yield ...
Constructs a new TypeMismatchError on an offending ASTNode
addError
{ "repo_name": "mhems/jhelp", "path": "src/com/binghamton/jhelp/ast/FileLevelVisitor.java", "license": "bsd-3-clause", "size": 21761 }
[ "com.binghamton.jhelp.error.TypeMismatchError", "com.binghamton.jhelp.types.Type" ]
import com.binghamton.jhelp.error.TypeMismatchError; import com.binghamton.jhelp.types.Type;
import com.binghamton.jhelp.error.*; import com.binghamton.jhelp.types.*;
[ "com.binghamton.jhelp" ]
com.binghamton.jhelp;
2,725,291
public void draw(ShadowVertexProgram program) { if (mVertexesSize > 0) { glUniformMatrix4fv(program.mMVPMatrixLoc, 1, false, VertexProgram.MVPMatrix, 0); glUniform1f(program.mVertexZLoc, vertexZ); // disable texture, and enable blend ...
void function(ShadowVertexProgram program) { if (mVertexesSize > 0) { glUniformMatrix4fv(program.mMVPMatrixLoc, 1, false, VertexProgram.MVPMatrix, 0); glUniform1f(program.mVertexZLoc, vertexZ); glDisable(GL_TEXTURE_2D); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glVertexAttribPointer(program...
/** * Draw shadow * * @param program shadow vertex shader program */
Draw shadow
draw
{ "repo_name": "eschao/android-PageFlip", "path": "PageFlip/src/main/java/com/eschao/android/widget/pageflip/ShadowVertexes.java", "license": "apache-2.0", "size": 9800 }
[ "android.opengl.GLES20" ]
import android.opengl.GLES20;
import android.opengl.*;
[ "android.opengl" ]
android.opengl;
1,153,818
public static boolean isFileExist(String filePath) { if (StringUtils.isBlank(filePath)) { return false; } File file = new File(filePath); return (file.exists() && file.isFile()); }
static boolean function(String filePath) { if (StringUtils.isBlank(filePath)) { return false; } File file = new File(filePath); return (file.exists() && file.isFile()); }
/** * Indicates if this file represents a file on the underlying file system. * * @param filePath * @return */
Indicates if this file represents a file on the underlying file system
isFileExist
{ "repo_name": "zhengjiong/JieSeHelper", "path": "app/src/main/java/namofo/org/jiesehelper/util/FileUtils.java", "license": "apache-2.0", "size": 19207 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,176,837
public static void assertNotContainsKey(String mapName, Object unexpectedKey, Map<?, ?> actualMap) { try { Verify.assertObjectNotNull(mapName, actualMap); if (actualMap.containsKey(unexpectedKey)) { Assert.fail(mapName + " should not contain u...
static void function(String mapName, Object unexpectedKey, Map<?, ?> actualMap) { try { Verify.assertObjectNotNull(mapName, actualMap); if (actualMap.containsKey(unexpectedKey)) { Assert.fail(mapName + STR + unexpectedKey + '>'); } } catch (AssertionError e) { Verify.throwMangledException(e); } }
/** * Assert that the given {@link Collection} does <em>not</em> contain the given item. */
Assert that the given <code>Collection</code> does not contain the given item
assertNotContainsKey
{ "repo_name": "bhav0904/eclipse-collections", "path": "eclipse-collections-testutils/src/main/java/org/eclipse/collections/impl/test/Verify.java", "license": "bsd-3-clause", "size": 138680 }
[ "java.util.Map", "org.junit.Assert" ]
import java.util.Map; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,592,656
public void testOnlyNewline() throws IOException { compareStyled("\n"); }
void function() throws IOException { compareStyled("\n"); }
/** * Test styler for file with only single newline * * @throws IOException */
Test styler for file with only single newline
testOnlyNewline
{ "repo_name": "DeLaSalleUniversity-Manila/ForkHub-macexcel", "path": "app/src/androidTest/java/com/github/zion/tests/commit/DiffStylerTest.java", "license": "apache-2.0", "size": 4185 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,935,869
protected void sendToNhinProxy(RespondingGatewaySendAlertMessageType newRequest, AssertionType assertion, NhinTargetSystemType target) { LOG.debug("begin sendToNhinProxy"); OutboundAdminDistributionDelegate adDelegate = getNewOutboundAdminDistributionDelegate(); OutboundAdminDist...
void function(RespondingGatewaySendAlertMessageType newRequest, AssertionType assertion, NhinTargetSystemType target) { LOG.debug(STR); OutboundAdminDistributionDelegate adDelegate = getNewOutboundAdminDistributionDelegate(); OutboundAdminDistributionOrchestratable orchestratable = new OutboundAdminDistributionOrchestr...
/** * This method send message to Nhin Proxy. * * @param newRequest * SendAlertMessage received. * @param assertion * Assertion received. * @param target * NhinTargetSystem received. */
This method send message to Nhin Proxy
sendToNhinProxy
{ "repo_name": "healthreveal/CONNECT", "path": "Product/Production/Services/AdminDistributionCore/src/main/java/gov/hhs/fha/nhinc/admindistribution/outbound/StandardOutboundAdminDistribution.java", "license": "bsd-3-clause", "size": 9711 }
[ "gov.hhs.fha.nhinc.admindistribution.entity.OutboundAdminDistributionDelegate", "gov.hhs.fha.nhinc.admindistribution.entity.OutboundAdminDistributionOrchestratable", "gov.hhs.fha.nhinc.common.nhinccommon.AssertionType", "gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetSystemType", "gov.hhs.fha.nhinc.common.n...
import gov.hhs.fha.nhinc.admindistribution.entity.OutboundAdminDistributionDelegate; import gov.hhs.fha.nhinc.admindistribution.entity.OutboundAdminDistributionOrchestratable; import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType; import gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetSystemType; import gov.hhs.fha....
import gov.hhs.fha.nhinc.admindistribution.entity.*; import gov.hhs.fha.nhinc.common.nhinccommon.*; import gov.hhs.fha.nhinc.common.nhinccommonentity.*;
[ "gov.hhs.fha" ]
gov.hhs.fha;
2,623,864
PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Presentation.preferenceAnalysis.EditQualityRequirementPreferencePage", new String[] { "Presentation.preferenceAnalysis.EditQualityRequirementPreferencePage" }, null); if (p...
PreferenceDialog pref = PreferencesUtil.createPreferenceDialogOn( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), STR, new String[] { STR }, null); if (pref != null) pref.open(); return null; }
/** * the command has been executed, so extract extract the needed information * from the application context. */
the command has been executed, so extract extract the needed information from the application context
execute
{ "repo_name": "MSMontenegro/SAE", "path": "Project/src/Presentation/handlerAnalysis/EditQualityRequirementHandler.java", "license": "epl-1.0", "size": 1136 }
[ "org.eclipse.jface.preference.PreferenceDialog", "org.eclipse.ui.PlatformUI", "org.eclipse.ui.dialogs.PreferencesUtil" ]
import org.eclipse.jface.preference.PreferenceDialog; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.jface.preference.*; import org.eclipse.ui.*; import org.eclipse.ui.dialogs.*;
[ "org.eclipse.jface", "org.eclipse.ui" ]
org.eclipse.jface; org.eclipse.ui;
957,848
public static final void applyTransform(GL2 gl, Transform t) { Vector2 tr = t.getTranslation(); // apply the translation gl.glTranslated(tr.x, tr.y, 0.0); // apply the rotation (remember that OpenGL expects degrees not radians) gl.glRotated(Math.toDegrees(t.getRotation()), 0.0, 0.0, 1.0); }
static final void function(GL2 gl, Transform t) { Vector2 tr = t.getTranslation(); gl.glTranslated(tr.x, tr.y, 0.0); gl.glRotated(Math.toDegrees(t.getRotation()), 0.0, 0.0, 1.0); }
/** * Applies the given transform to the given OpenGL context. * @param gl the OpenGL context * @param t the transform */
Applies the given transform to the given OpenGL context
applyTransform
{ "repo_name": "dmitrykolesnikovich/dyn4j", "path": "sandbox/src/org/dyn4j/sandbox/utilities/RenderUtilities.java", "license": "bsd-3-clause", "size": 36176 }
[ "org.dyn4j.geometry.Transform", "org.dyn4j.geometry.Vector2" ]
import org.dyn4j.geometry.Transform; import org.dyn4j.geometry.Vector2;
import org.dyn4j.geometry.*;
[ "org.dyn4j.geometry" ]
org.dyn4j.geometry;
2,555,974
@Idempotent public void setTimes(String src, long mtime, long atime) throws AccessControlException, FileNotFoundException, UnresolvedLinkException, SnapshotAccessControlException, IOException;
void function(String src, long mtime, long atime) throws AccessControlException, FileNotFoundException, UnresolvedLinkException, SnapshotAccessControlException, IOException;
/** * Sets the modification and access time of the file to the specified time. * @param src The string representation of the path * @param mtime The number of milliseconds since Jan 1, 1970. * Setting mtime to -1 means that modification time should not be set * by this call. ...
Sets the modification and access time of the file to the specified time
setTimes
{ "repo_name": "ict-carch/hadoop-plus", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 45751 }
[ "java.io.FileNotFoundException", "java.io.IOException", "org.apache.hadoop.fs.UnresolvedLinkException", "org.apache.hadoop.security.AccessControlException" ]
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.fs.UnresolvedLinkException; import org.apache.hadoop.security.AccessControlException;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.security.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
802,099
public void enable() throws IOException { // This has to be synchronized or it can collide with the check in the task. synchronized (optOutLock) { // Check if the server owner has already set opt-out, if not, set it. if (isOptOut()) { configuration.set("opt-ou...
void function() throws IOException { synchronized (optOutLock) { if (isOptOut()) { configuration.set(STR, false); configuration.save(configurationFile); } if (task == null) { start(); } } }
/** * Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task. * * @throws java.io.IOException */
Enables metrics for the server by setting "opt-out" to false in the config file and starting the metrics task
enable
{ "repo_name": "MrInspectorDev/MPK", "path": "src/org/mcstats/Metrics.java", "license": "gpl-2.0", "size": 23943 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,602,485
synchronized void abortCurrentLogSegment() { try { //Check for null, as abort can be called any time. if (editLogStream != null) { editLogStream.abort(); editLogStream = null; state = State.BETWEEN_LOG_SEGMENTS; } } catch (IOException e) { LOG.warn("All journals...
synchronized void abortCurrentLogSegment() { try { if (editLogStream != null) { editLogStream.abort(); editLogStream = null; state = State.BETWEEN_LOG_SEGMENTS; } } catch (IOException e) { LOG.warn(STR, e); } }
/** * Abort all current logs. Called from the backup node. */
Abort all current logs. Called from the backup node
abortCurrentLogSegment
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java", "license": "gpl-3.0", "size": 58205 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
986,780
@SuppressWarnings("unchecked") public static void registerValidator(Class<? extends IValidator<?>> validator) { if (validator == null) { throw new IllegalArgumentException("validator cannot be null"); } ValidatorFactory.registerValidatorClasses(validator); }
@SuppressWarnings(STR) static void function(Class<? extends IValidator<?>> validator) { if (validator == null) { throw new IllegalArgumentException(STR); } ValidatorFactory.registerValidatorClasses(validator); }
/** * Register custom validator. This is only usable if you want to use custom validation annotations. * Otherwise you can use {@link eu.inmite.android.lib.validations.form.annotations.Custom} annotation. * * @param validator validator class that is annotated with {@link eu.inmite.android.lib.validations.form.a...
Register custom validator. This is only usable if you want to use custom validation annotations. Otherwise you can use <code>eu.inmite.android.lib.validations.form.annotations.Custom</code> annotation
registerValidator
{ "repo_name": "douglasjunior/android-validation-komensky", "path": "library/src/main/java/eu/inmite/android/lib/validations/form/FormValidator.java", "license": "apache-2.0", "size": 17001 }
[ "eu.inmite.android.lib.validations.form.iface.IValidator", "eu.inmite.android.lib.validations.form.validators.ValidatorFactory" ]
import eu.inmite.android.lib.validations.form.iface.IValidator; import eu.inmite.android.lib.validations.form.validators.ValidatorFactory;
import eu.inmite.android.lib.validations.form.iface.*; import eu.inmite.android.lib.validations.form.validators.*;
[ "eu.inmite.android" ]
eu.inmite.android;
1,041,451
public DateTime ifModifiedSince() { if (this.ifModifiedSince == null) { return null; } return this.ifModifiedSince.dateTime(); }
DateTime function() { if (this.ifModifiedSince == null) { return null; } return this.ifModifiedSince.dateTime(); }
/** * Get a timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time. * * @return the ifModifiedSince value */
Get a timestamp indicating the last modified time of the resource known to the client. The operation will be performed only if the resource on the service has been modified since the specified time
ifModifiedSince
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/batch/microsoft-azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/PoolStopResizeOptions.java", "license": "mit", "size": 9467 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
639,865
protected void addIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Job_id_feature"), getString("_UI_PropertyDescriptor_description", "_UI_J...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), SbdPackage.Literals.JOB__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null...
/** * This adds a property descriptor for the Id feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Id feature.
addIdPropertyDescriptor
{ "repo_name": "vzmaru/spring-batch-design", "path": "com.vm.tools.sbd.model.edit/src/sbd/provider/JobItemProvider.java", "license": "bsd-3-clause", "size": 6403 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,598,165
boolean hasSystemPermission(String user, SystemPermission permission);
boolean hasSystemPermission(String user, SystemPermission permission);
/** * Used to get the system permission for the user */
Used to get the system permission for the user
hasSystemPermission
{ "repo_name": "apache/accumulo", "path": "server/base/src/main/java/org/apache/accumulo/server/security/handler/PermissionHandler.java", "license": "apache-2.0", "size": 5292 }
[ "org.apache.accumulo.core.security.SystemPermission" ]
import org.apache.accumulo.core.security.SystemPermission;
import org.apache.accumulo.core.security.*;
[ "org.apache.accumulo" ]
org.apache.accumulo;
1,681,460
@ApiModelProperty(example = "null", required = true, value = "A code describing the error, usually the HTTP status code for example CLIENT_FORBIDDEN_REQUEST or SERVER_ERROR.") public String getCode() { return code; }
@ApiModelProperty(example = "null", required = true, value = STR) String function() { return code; }
/** * A code describing the error, usually the HTTP status code for example CLIENT_FORBIDDEN_REQUEST or SERVER_ERROR. * @return code **/
A code describing the error, usually the HTTP status code for example CLIENT_FORBIDDEN_REQUEST or SERVER_ERROR
getCode
{ "repo_name": "ixaris/ope-applicationclients", "path": "java-client/src/main/java/com/ixaris/ope/applications/client/model/DefaultErrorModel.java", "license": "mit", "size": 3065 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,296,338
public void deleteCashControlDetail(int index) { CashControlDetail cashControlDetail = cashControlDetails.remove(index); this.cashControlTotalAmount = this.cashControlTotalAmount.subtract(cashControlDetail.getFinancialDocumentLineAmount()); }
void function(int index) { CashControlDetail cashControlDetail = cashControlDetails.remove(index); this.cashControlTotalAmount = this.cashControlTotalAmount.subtract(cashControlDetail.getFinancialDocumentLineAmount()); }
/** * This method removes a cash control detail from the list * * @param index */
This method removes a cash control detail from the list
deleteCashControlDetail
{ "repo_name": "bhutchinson/kfs", "path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/CashControlDocument.java", "license": "agpl-3.0", "size": 29406 }
[ "org.kuali.kfs.module.ar.businessobject.CashControlDetail" ]
import org.kuali.kfs.module.ar.businessobject.CashControlDetail;
import org.kuali.kfs.module.ar.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,528,894
public Observable<ServiceResponse<OpenShiftManagedClusterInner>> updateTagsWithServiceResponseAsync(String resourceGroupName, String resourceName, Map<String, String> tags) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is...
Observable<ServiceResponse<OpenShiftManagedClusterInner>> function(String resourceGroupName, String resourceName, Map<String, String> tags) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (resourceNam...
/** * Updates tags on an OpenShift managed cluster. * Updates an OpenShift managed cluster with the specified tags. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the OpenShift managed cluster resource. * @param tags Resource tags. * @th...
Updates tags on an OpenShift managed cluster. Updates an OpenShift managed cluster with the specified tags
updateTagsWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/implementation/OpenShiftManagedClustersInner.java", "license": "mit", "size": 82727 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.azure.management.containerservice.v2020_07_01.TagsObject", "com.microsoft.rest.ServiceResponse", "com.microsoft.rest.Validator", "java.util.Map" ]
import com.google.common.reflect.TypeToken; import com.microsoft.azure.management.containerservice.v2020_07_01.TagsObject; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.util.Map;
import com.google.common.reflect.*; import com.microsoft.azure.management.containerservice.v2020_07_01.*; import com.microsoft.rest.*; import java.util.*;
[ "com.google.common", "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.google.common; com.microsoft.azure; com.microsoft.rest; java.util;
819,225
@Test public void testIsBigInteger() { assertNull(Strings.isBigInteger(null)); assertNull(Strings.isBigInteger("")); assertNull(Strings.isBigInteger(".12")); assertNotNull(Strings.isBigInteger("1" + Integer.MAX_VALUE)); assertNotNull(Strings.isBigInteger("" + Integer.MIN_VALUE + "1")); assertNotNull(St...
void function() { assertNull(Strings.isBigInteger(null)); assertNull(Strings.isBigInteger(STR.12STR1STRSTR1STR+12312STR-12STR-12312STRSTRSTR124564897619849846165498949844651684984124564897619849846165498949844651684984124564897619849846165498949844651684984STR1STR1STR-12STR-12STR1245648976198498461654989498446516849841...
/** * Tests the implementation of {@code Strings#isBigInteger(String)}. */
Tests the implementation of Strings#isBigInteger(String)
testIsBigInteger
{ "repo_name": "pmeisen/gen-misc", "path": "test/net/meisen/general/genmisc/TestStrings.java", "license": "mit", "size": 8228 }
[ "net.meisen.general.genmisc.types.Strings", "org.junit.Assert" ]
import net.meisen.general.genmisc.types.Strings; import org.junit.Assert;
import net.meisen.general.genmisc.types.*; import org.junit.*;
[ "net.meisen.general", "org.junit" ]
net.meisen.general; org.junit;
1,220,475
public synchronized String getCatalog() throws SQLException { checkClosed(); try { return (String) sessionProxy.getAttribute( SessionInterface.INFO_CATALOG); } catch (HsqlException e) { throw Util.sqlException(e); } }
synchronized String function() throws SQLException { checkClosed(); try { return (String) sessionProxy.getAttribute( SessionInterface.INFO_CATALOG); } catch (HsqlException e) { throw Util.sqlException(e); } }
/** * <!-- start generic documentation --> * * Retrieves this <code>Connection</code> object's current catalog name. * * <!-- end generic documentation --> * <!-- start release-specific documentation --> * <div class="ReleaseSpecificDocumentation"> * <h3>HSQLDB-Specific Informati...
Retrieves this <code>Connection</code> object's current catalog name. HSQLDB-Specific Information: HSQLDB supports a single catalog per database. This method returns the catalog name for the current database error.
getCatalog
{ "repo_name": "ggorsontanguy/pocHSQLDB", "path": "hsqldb-2.2.9/hsqldb/src/org/hsqldb/jdbc/JDBCConnection.java", "license": "gpl-3.0", "size": 154629 }
[ "java.sql.SQLException", "org.hsqldb.HsqlException", "org.hsqldb.SessionInterface" ]
import java.sql.SQLException; import org.hsqldb.HsqlException; import org.hsqldb.SessionInterface;
import java.sql.*; import org.hsqldb.*;
[ "java.sql", "org.hsqldb" ]
java.sql; org.hsqldb;
980,858
public static List<Point3d> atomsToPoints(Collection<Atom> atoms) { ArrayList<Point3d> points = new ArrayList<>(atoms.size()); for (Atom atom : atoms) { points.add(atom.getCoordsAsPoint3d()); } return points; }
static List<Point3d> function(Collection<Atom> atoms) { ArrayList<Point3d> points = new ArrayList<>(atoms.size()); for (Atom atom : atoms) { points.add(atom.getCoordsAsPoint3d()); } return points; }
/** * Convert an array of atoms into an array of vecmath points * * @param atoms * list of atoms * @return list of Point3ds storing the x,y,z coordinates of each atom */
Convert an array of atoms into an array of vecmath points
atomsToPoints
{ "repo_name": "pwrose/biojava", "path": "biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java", "license": "lgpl-2.1", "size": 33877 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "javax.vecmath.Point3d" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List; import javax.vecmath.Point3d;
import java.util.*; import javax.vecmath.*;
[ "java.util", "javax.vecmath" ]
java.util; javax.vecmath;
2,715,308
public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { ...
boolean function(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PieDataset)) { return false; } PieDataset that = (PieDataset) obj; int count = getItemCount(); if (that.getItemCount() != count) { return false; } for (int i = 0; i < count; i++) { Comparable k1 = getKey(i); Comparable k2 = that.getKe...
/** * Tests this dataset for equality with an arbitrary object, returning * <code>true</code> if <code>obj</code> is a dataset containing the same * keys and values in the same order as this dataset. * * @param obj the object to test (<code>null</code> permitted). * * @return ...
Tests this dataset for equality with an arbitrary object, returning <code>true</code> if <code>obj</code> is a dataset containing the same keys and values in the same order as this dataset
equals
{ "repo_name": "fluidware/Eastwood-Charts", "path": "source/org/jfree/data/category/CategoryToPieDataset.java", "license": "lgpl-2.1", "size": 10960 }
[ "org.jfree.data.general.PieDataset" ]
import org.jfree.data.general.PieDataset;
import org.jfree.data.general.*;
[ "org.jfree.data" ]
org.jfree.data;
2,155,756
@Override public void processAfterCopy(MaintenanceDocument document, Map<String, String[]> parameters) { SecurityModel securityModel = (SecurityModel) document.getNewMaintainableObject().getBusinessObject(); securityModel.setRoleId(""); super.processAfterCopy(document, parameters); ...
void function(MaintenanceDocument document, Map<String, String[]> parameters) { SecurityModel securityModel = (SecurityModel) document.getNewMaintainableObject().getBusinessObject(); securityModel.setRoleId(""); super.processAfterCopy(document, parameters); }
/** * Override to clear out KIM role id on copy * * @see org.kuali.rice.kns.maintenance.KualiMaintainableImpl#processAfterCopy(org.kuali.rice.kns.document.MaintenanceDocument, * java.util.Map) */
Override to clear out KIM role id on copy
processAfterCopy
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/sec/document/SecurityModelMaintainableImpl.java", "license": "apache-2.0", "size": 14518 }
[ "java.util.Map", "org.kuali.kfs.sec.businessobject.SecurityModel", "org.kuali.rice.kns.document.MaintenanceDocument" ]
import java.util.Map; import org.kuali.kfs.sec.businessobject.SecurityModel; import org.kuali.rice.kns.document.MaintenanceDocument;
import java.util.*; import org.kuali.kfs.sec.businessobject.*; import org.kuali.rice.kns.document.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
1,089,408
public ArffMeta[] getOutputFields() { return m_outputFields; }
ArffMeta[] function() { return m_outputFields; }
/** * Get the meta data for the output fields * * @return an array of ArffMeta */
Get the meta data for the output fields
getOutputFields
{ "repo_name": "pentaho/pdi-weka-arff-output-plugin", "path": "src/org/pentaho/di/arff/ArffOutputMeta.java", "license": "gpl-3.0", "size": 17790 }
[ "org.pentaho.dm.commons.ArffMeta" ]
import org.pentaho.dm.commons.ArffMeta;
import org.pentaho.dm.commons.*;
[ "org.pentaho.dm" ]
org.pentaho.dm;
2,189,697
@Column(name = "name", length = 255) public String getName();
@Column(name = "name", length = 255) String function();
/** * Getter for <code>cattle.network.name</code>. */
Getter for <code>cattle.network.name</code>
getName
{ "repo_name": "vincent99/cattle", "path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/Network.java", "license": "apache-2.0", "size": 5126 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
33,913
Money calculateTotalWithAdjustments();
Money calculateTotalWithAdjustments();
/** * Returns the final total for this item taking into account the finalized * adjustments. Intended to be called after the adjustments have been * finalized. */
Returns the final total for this item taking into account the finalized adjustments. Intended to be called after the adjustments have been finalized
calculateTotalWithAdjustments
{ "repo_name": "akdasari/SparkCore", "path": "spark-framework/src/main/java/org/sparkcommerce/core/offer/service/discount/domain/PromotableOrderItem.java", "license": "apache-2.0", "size": 4379 }
[ "org.sparkcommerce.common.money.Money" ]
import org.sparkcommerce.common.money.Money;
import org.sparkcommerce.common.money.*;
[ "org.sparkcommerce.common" ]
org.sparkcommerce.common;
595,910
@Element(name="receiverLocation") public LocationComponent getReceiverLoc(){return m_receiverLoc;}
@Element(name=STR) public LocationComponent getReceiverLoc(){return m_receiverLoc;}
/** * set receiving location to {@code _r} * @_r */
set receiving location to _r
setReceiverLoc
{ "repo_name": "anton23/gpanalyser", "path": "src-masspa/uk/ac/imperial/doc/masspa/gui/models/channels/ChannelComponent.java", "license": "mit", "size": 4141 }
[ "org.simpleframework.xml.Element", "uk.ac.imperial.doc.masspa.gui.models.topologies.LocationComponent" ]
import org.simpleframework.xml.Element; import uk.ac.imperial.doc.masspa.gui.models.topologies.LocationComponent;
import org.simpleframework.xml.*; import uk.ac.imperial.doc.masspa.gui.models.topologies.*;
[ "org.simpleframework.xml", "uk.ac.imperial" ]
org.simpleframework.xml; uk.ac.imperial;
2,489,233
@Override public Date getLastModified() { if (m_File != null) return new Date(m_File.getTimestamp().getTimeInMillis()); else return new Date(0L); }
Date function() { if (m_File != null) return new Date(m_File.getTimestamp().getTimeInMillis()); else return new Date(0L); }
/** * Returns the date when the file was last modified. * * @return date when last modified */
Returns the date when the file was last modified
getLastModified
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-net/src/main/java/adams/core/io/FtpFileObject.java", "license": "gpl-3.0", "size": 4847 }
[ "java.io.File", "java.util.Date" ]
import java.io.File; import java.util.Date;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,692,485
public synchronized void writeTelegram(EBusTelegram telegram, String comment) { try { if(writer == null) return; DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(); writer.write(df.format(date)); writer.write(";"); writer.write('"'+EBusUtils.to...
synchronized void function(EBusTelegram telegram, String comment) { try { if(writer == null) return; DateFormat df = new SimpleDateFormat(STR); Date date = new Date(); writer.write(df.format(date)); writer.write(";"); writer.write('STR'); writer.write(";"); writer.write('STR'); writer.write(";"); writer.write('STR'); w...
/** * Writes a eBUS telegram to the CSV file * @param telegram * @param comment * @throws IOException */
Writes a eBUS telegram to the CSV file
writeTelegram
{ "repo_name": "cschneider/openhab", "path": "bundles/binding/org.openhab.binding.ebus/src/main/java/org/openhab/binding/ebus/internal/parser/EBusTelegramCSVWriter.java", "license": "epl-1.0", "size": 4605 }
[ "java.io.IOException", "java.text.DateFormat", "java.text.SimpleDateFormat", "java.util.Date", "org.openhab.binding.ebus.internal.EBusTelegram", "org.openhab.binding.ebus.internal.utils.EBusUtils" ]
import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import org.openhab.binding.ebus.internal.EBusTelegram; import org.openhab.binding.ebus.internal.utils.EBusUtils;
import java.io.*; import java.text.*; import java.util.*; import org.openhab.binding.ebus.internal.*; import org.openhab.binding.ebus.internal.utils.*;
[ "java.io", "java.text", "java.util", "org.openhab.binding" ]
java.io; java.text; java.util; org.openhab.binding;
1,480,863
public void testWordExtractionOOXML() throws Exception { // open an input stream for the test file @SuppressWarnings("resource") InputStream in = getClass().getClassLoader().getResourceAsStream("org/opencms/search/extractors/test1.docx"); // extract the content I_CmsExtract...
void function() throws Exception { @SuppressWarnings(STR) InputStream in = getClass().getClassLoader().getResourceAsStream(STR); I_CmsExtractionResult extractionResult = CmsExtractorMsOfficeOOXML.getExtractor().extractText(in); Map<String, String> items = extractionResult.getContentItems(); System.out.println(STR); Sys...
/** * Tests the Word text extraction for new (MS Office 2007) OOXML documents.<p> * * @throws Exception if the test fails */
Tests the Word text extraction for new (MS Office 2007) OOXML documents
testWordExtractionOOXML
{ "repo_name": "alkacon/opencms-core", "path": "test/org/opencms/search/extractors/TestMsWordExtraction.java", "license": "lgpl-2.1", "size": 7177 }
[ "java.io.InputStream", "java.util.Iterator", "java.util.Map" ]
import java.io.InputStream; import java.util.Iterator; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
976,794
boolean installForwardingRule(ExtFlowContainer container);
boolean installForwardingRule(ExtFlowContainer container);
/** * Install forwarding rule. * * @param container BgpFlow container * @return a true if success else false */
Install forwarding rule
installForwardingRule
{ "repo_name": "paradisecr/ONOS-OXP", "path": "apps/bgpflowspec/flowmgr/src/main/java/org/onosproject/flow/forwarder/BgpFlowForwarderService.java", "license": "apache-2.0", "size": 1237 }
[ "org.onosproject.flowapi.ExtFlowContainer" ]
import org.onosproject.flowapi.ExtFlowContainer;
import org.onosproject.flowapi.*;
[ "org.onosproject.flowapi" ]
org.onosproject.flowapi;
2,216,536
public static SortedSet getProfileSet(SortedSet sortedSet) { ArrayList<Profile> profileList = new ArrayList<Profile>(); String orderBy = ""; if (sortedSet.getOrderByField() != null && !sortedSet.getOrderByField().trim().equals("")) { orderBy = "order by " + sortedSet.getOrderByF...
static SortedSet function(SortedSet sortedSet) { ArrayList<Profile> profileList = new ArrayList<Profile>(); String orderBy = STRSTRorder by STR STRselect * from profiles STRidSTRnmSTRdescSTRtag")); profileList.add(profile); } DBUtils.closeRs(rs); DBUtils.closeStmt(stmt); } catch (Exception e) { log.error(e.toString(), ...
/** * method to do order by based on the sorted set object for profiles * @return list of profiles */
method to do order by based on the sorted set object for profiles
getProfileSet
{ "repo_name": "hufsm/KeyBox", "path": "src/main/java/com/keybox/manage/db/ProfileDB.java", "license": "apache-2.0", "size": 8032 }
[ "com.keybox.manage.model.Profile", "com.keybox.manage.model.SortedSet", "com.keybox.manage.util.DBUtils", "java.util.ArrayList" ]
import com.keybox.manage.model.Profile; import com.keybox.manage.model.SortedSet; import com.keybox.manage.util.DBUtils; import java.util.ArrayList;
import com.keybox.manage.model.*; import com.keybox.manage.util.*; import java.util.*;
[ "com.keybox.manage", "java.util" ]
com.keybox.manage; java.util;
1,047,504
public void display(GLAutoDrawable drawable) { TextureData data = model.getProjectedImageAsTexture(); if (data == null) { GL gl = drawable.getGL(); // Clear The Screen And The Depth Buffer gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); Color c = ProjectionBICanvas....
void function(GLAutoDrawable drawable) { TextureData data = model.getProjectedImageAsTexture(); if (data == null) { GL gl = drawable.getGL(); gl.glClear(GL.GL_COLOR_BUFFER_BIT GL.GL_DEPTH_BUFFER_BIT); Color c = ProjectionBICanvas.BACKGROUND_COLOR; float[] array = new float[4]; array = c.getRGBColorComponents(array); gl...
/** * Paints the image. * */
Paints the image
display
{ "repo_name": "bramalingam/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/browser/ProjectionCanvas.java", "license": "gpl-2.0", "size": 3550 }
[ "com.sun.opengl.util.texture.TextureData", "java.awt.Color", "javax.media.opengl.GLAutoDrawable" ]
import com.sun.opengl.util.texture.TextureData; import java.awt.Color; import javax.media.opengl.GLAutoDrawable;
import com.sun.opengl.util.texture.*; import java.awt.*; import javax.media.opengl.*;
[ "com.sun.opengl", "java.awt", "javax.media" ]
com.sun.opengl; java.awt; javax.media;
1,411,217
@Override public String beginFileUpload() throws TException { String fileLoc = null; try { String path = null; String key = UUID.randomUUID().toString(); path = StormConfig.masterInbox(conf) + "/" + key; FileUtils.forceMkdir(new File(path)); FileUtils.cleanDirectory(new File(path)); fileLoc =...
String function() throws TException { String fileLoc = null; try { String path = null; String key = UUID.randomUUID().toString(); path = StormConfig.masterInbox(conf) + "/" + key; FileUtils.forceMkdir(new File(path)); FileUtils.cleanDirectory(new File(path)); fileLoc = path + STR + key + ".jar"; data.getUploaders().put...
/** * prepare to uploading topology jar, return the file location * * @throws */
prepare to uploading topology jar, return the file location
beginFileUpload
{ "repo_name": "zhangjunfang/jstorm-0.9.6.3-", "path": "jstorm-server/src/main/java/com/alibaba/jstorm/daemon/nimbus/ServiceHandler.java", "license": "apache-2.0", "size": 41095 }
[ "com.alibaba.jstorm.cluster.StormConfig", "java.io.File", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException", "java.nio.channels.Channels", "java.util.UUID", "org.apache.commons.io.FileUtils", "org.apache.thrift7.TException" ]
import com.alibaba.jstorm.cluster.StormConfig; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.Channels; import java.util.UUID; import org.apache.commons.io.FileUtils; import org.apache.thrift7.TException;
import com.alibaba.jstorm.cluster.*; import java.io.*; import java.nio.channels.*; import java.util.*; import org.apache.commons.io.*; import org.apache.thrift7.*;
[ "com.alibaba.jstorm", "java.io", "java.nio", "java.util", "org.apache.commons", "org.apache.thrift7" ]
com.alibaba.jstorm; java.io; java.nio; java.util; org.apache.commons; org.apache.thrift7;
232,441
public Collection<E> getEdgesByGraphIds(GradoopIdSet graphIds) { Collection<E> result = Sets.newHashSetWithExpectedSize(graphIds.size()); for (E edge : edges.values()) { if (edge.getGraphIds().containsAny(graphIds)) { result.add(edge); } } return result; }
Collection<E> function(GradoopIdSet graphIds) { Collection<E> result = Sets.newHashSetWithExpectedSize(graphIds.size()); for (E edge : edges.values()) { if (edge.getGraphIds().containsAny(graphIds)) { result.add(edge); } } return result; }
/** * Returns all edges that belong to the given graphs. * * @param graphIds Graph identifiers * @return edges */
Returns all edges that belong to the given graphs
getEdgesByGraphIds
{ "repo_name": "rostam/gradoop", "path": "gradoop-common/src/main/java/org/gradoop/common/util/AsciiGraphLoader.java", "license": "apache-2.0", "size": 17096 }
[ "com.google.common.collect.Sets", "java.util.Collection", "org.gradoop.common.model.impl.id.GradoopIdSet" ]
import com.google.common.collect.Sets; import java.util.Collection; import org.gradoop.common.model.impl.id.GradoopIdSet;
import com.google.common.collect.*; import java.util.*; import org.gradoop.common.model.impl.id.*;
[ "com.google.common", "java.util", "org.gradoop.common" ]
com.google.common; java.util; org.gradoop.common;
1,111,097
@POST @Path("{subjectClassKey}") @Consumes(MediaType.APPLICATION_JSON) @SuppressWarnings("unchecked") public Response upload(@PathParam("subjectClassKey") String subjectClassKey, InputStream request) throws IOException { NetworkConfigService service = get(NetworkCo...
@Path(STR) @Consumes(MediaType.APPLICATION_JSON) @SuppressWarnings(STR) Response function(@PathParam(STR) String subjectClassKey, InputStream request) throws IOException { NetworkConfigService service = get(NetworkConfigService.class); ObjectNode root = readTreeFromStream(mapper(), request); SubjectFactory subjectFacto...
/** * Upload multiple network configurations for a subject class. * * @param subjectClassKey subject class key * @param request network configuration JSON rooted at the top node * @return 200 OK * @throws IOException if unable to parse the request */
Upload multiple network configurations for a subject class
upload
{ "repo_name": "opennetworkinglab/onos", "path": "web/api/src/main/java/org/onosproject/rest/resources/NetworkConfigWebResource.java", "license": "apache-2.0", "size": 18043 }
[ "com.fasterxml.jackson.databind.node.ObjectNode", "java.io.IOException", "java.io.InputStream", "java.util.List", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.onlab.util.Tools", "org.onosproject.net.config.Ne...
import com.fasterxml.jackson.databind.node.ObjectNode; import java.io.IOException; import java.io.InputStream; import java.util.List; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onlab.util.Tools; impo...
import com.fasterxml.jackson.databind.node.*; import java.io.*; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onlab.util.*; import org.onosproject.net.config.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "javax.ws", "org.onlab.util", "org.onosproject.net" ]
com.fasterxml.jackson; java.io; java.util; javax.ws; org.onlab.util; org.onosproject.net;
271,966
private CharacterCollider createCharacterCollider(EntityRef owner) { LocationComponent locComp = owner.getComponent(LocationComponent.class); CharacterMovementComponent movementComp = owner.getComponent(CharacterMovementComponent.class); if (locComp == null || movementComp == null) { ...
CharacterCollider function(EntityRef owner) { LocationComponent locComp = owner.getComponent(LocationComponent.class); CharacterMovementComponent movementComp = owner.getComponent(CharacterMovementComponent.class); if (locComp == null movementComp == null) { throw new IllegalArgumentException(STR); } Vector3f pos = Vec...
/** * Creates a Collider for the given entity based on the LocationComponent * and CharacterMovementComponent. * All collision flags are set right for a character movement component. * * @param owner the entity to create the collider for. * @return */
Creates a Collider for the given entity based on the LocationComponent and CharacterMovementComponent. All collision flags are set right for a character movement component
createCharacterCollider
{ "repo_name": "Vizaxo/Terasology", "path": "engine/src/main/java/org/terasology/physics/bullet/BulletPhysics.java", "license": "apache-2.0", "size": 42621 }
[ "com.bulletphysics.collision.dispatch.CollisionFlags", "com.bulletphysics.collision.shapes.CapsuleShape", "com.bulletphysics.collision.shapes.ConvexShape", "javax.vecmath.Vector3f", "org.terasology.entitySystem.entity.EntityRef", "org.terasology.logic.characters.CharacterMovementComponent", "org.terasol...
import com.bulletphysics.collision.dispatch.CollisionFlags; import com.bulletphysics.collision.shapes.CapsuleShape; import com.bulletphysics.collision.shapes.ConvexShape; import javax.vecmath.Vector3f; import org.terasology.entitySystem.entity.EntityRef; import org.terasology.logic.characters.CharacterMovementComponent...
import com.bulletphysics.collision.dispatch.*; import com.bulletphysics.collision.shapes.*; import javax.vecmath.*; import org.terasology.*; import org.terasology.logic.characters.*; import org.terasology.logic.location.*; import org.terasology.math.*; import org.terasology.physics.engine.*;
[ "com.bulletphysics.collision", "javax.vecmath", "org.terasology", "org.terasology.logic", "org.terasology.math", "org.terasology.physics" ]
com.bulletphysics.collision; javax.vecmath; org.terasology; org.terasology.logic; org.terasology.math; org.terasology.physics;
1,910,899
protected Set<String> getNodeList(String listArg) throws IOException { URL listURL; String nodeData; Set<String> resultSet = new TreeSet<>(); if ((listArg == null) || listArg.isEmpty()) { return resultSet; } if (listArg.startsWith("file://")) { listURL = new URL(listArg); t...
Set<String> function(String listArg) throws IOException { URL listURL; String nodeData; Set<String> resultSet = new TreeSet<>(); if ((listArg == null) listArg.isEmpty()) { return resultSet; } if (listArg.startsWith(STRincludeSTRThe input host file path '%s' is not a valid path. STRPlease make sure the host file exists....
/** * Gets the node set from a file or a string. * * @param listArg - String File URL or a comma separated list of node names. * @return Set of node names * @throws IOException */
Gets the node set from a file or a string
getNodeList
{ "repo_name": "apurtell/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/Command.java", "license": "apache-2.0", "size": 17631 }
[ "java.io.IOException", "java.util.Collections", "java.util.Set", "java.util.TreeSet", "org.apache.hadoop.hdfs.server.diskbalancer.DiskBalancerException" ]
import java.io.IOException; import java.util.Collections; import java.util.Set; import java.util.TreeSet; import org.apache.hadoop.hdfs.server.diskbalancer.DiskBalancerException;
import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.server.diskbalancer.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,104,680
public void zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source) { zoom((upperPercent + lowerPercent) / 2.0); }
void function(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source) { zoom((upperPercent + lowerPercent) / 2.0); }
/** * Zooms in on the range axes. * * @param lowerPercent the new lower bound. * @param upperPercent the new upper bound. * @param state the plot state. * @param source the source point (in Java2D coordinates). */
Zooms in on the range axes
zoomRangeAxes
{ "repo_name": "opensim-org/opensim-gui", "path": "Gui/opensim/jfreechart/src/org/jfree/chart/plot/PolarPlot.java", "license": "apache-2.0", "size": 39793 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,361,510
@Test public void presentValueMethodVsCalculator() { final MultipleCurrencyAmount pvMethod = METHOD_SWPT_SABR.presentValue(SWAPTION_LONG_PAYER, SABR_MULTICURVES); final MultipleCurrencyAmount pvCalculator = PVSSC.visit(SWAPTION_LONG_PAYER, SABR_MULTICURVES); assertEquals("SwaptionPhysicalFixedIborSABRMe...
void function() { final MultipleCurrencyAmount pvMethod = METHOD_SWPT_SABR.presentValue(SWAPTION_LONG_PAYER, SABR_MULTICURVES); final MultipleCurrencyAmount pvCalculator = PVSSC.visit(SWAPTION_LONG_PAYER, SABR_MULTICURVES); assertEquals(STR, pvMethod, pvCalculator); }
/** * Tests the method against the present value calculator. */
Tests the method against the present value calculator
presentValueMethodVsCalculator
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/test/java/com/opengamma/analytics/financial/interestrate/swaption/provider/SwaptionPhysicalFixedIborSABRMethodTest.java", "license": "apache-2.0", "size": 29584 }
[ "com.opengamma.util.money.MultipleCurrencyAmount", "org.testng.AssertJUnit" ]
import com.opengamma.util.money.MultipleCurrencyAmount; import org.testng.AssertJUnit;
import com.opengamma.util.money.*; import org.testng.*;
[ "com.opengamma.util", "org.testng" ]
com.opengamma.util; org.testng;
439,903
public void setInterpolator(Interpolator interpolator) { this.mInterpolator = interpolator; } @SuppressWarnings({"UnusedDeclaration"}) public MarqueeView(Context context) { super(context); init(context); } @SuppressWarnings({"UnusedDeclaration"}) public MarqueeView(...
void function(Interpolator interpolator) { this.mInterpolator = interpolator; } @SuppressWarnings({STR}) public MarqueeView(Context context) { super(context); init(context); } @SuppressWarnings({STR}) public MarqueeView(Context context, AttributeSet attrs) { super(context, attrs); init(context); extractAttributes(attrs...
/** * Sets a custom interpolator for the animation. * * @param interpolator Animation interpolator. */
Sets a custom interpolator for the animation
setInterpolator
{ "repo_name": "0359xiaodong/Android-MarqueeView", "path": "library/src/asia/ivity/android/marqueeview/MarqueeView.java", "license": "bsd-2-clause", "size": 9921 }
[ "android.annotation.TargetApi", "android.content.Context", "android.os.Build", "android.util.AttributeSet", "android.view.animation.Interpolator" ]
import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.util.AttributeSet; import android.view.animation.Interpolator;
import android.annotation.*; import android.content.*; import android.os.*; import android.util.*; import android.view.animation.*;
[ "android.annotation", "android.content", "android.os", "android.util", "android.view" ]
android.annotation; android.content; android.os; android.util; android.view;
2,658,596
@Override public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); JournalTrace info = (JournalTrace) o; info.setMessage(tightUnmarshalString(dataIn, bs)); }
void function(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); JournalTrace info = (JournalTrace) o; info.setMessage(tightUnmarshalString(dataIn, bs)); }
/** * Un-marshal an object instance from the data input stream * * @param o * the object to un-marshal * @param dataIn * the data input stream to build the object from * @throws IOException */
Un-marshal an object instance from the data input stream
tightUnmarshal
{ "repo_name": "apache/activemq-openwire", "path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v6/JournalTraceMarshaller.java", "license": "apache-2.0", "size": 4129 }
[ "java.io.DataInput", "java.io.IOException", "org.apache.activemq.openwire.codec.BooleanStream", "org.apache.activemq.openwire.codec.OpenWireFormat", "org.apache.activemq.openwire.commands.JournalTrace" ]
import java.io.DataInput; import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.JournalTrace;
import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*;
[ "java.io", "org.apache.activemq" ]
java.io; org.apache.activemq;
260,616
public Insets getMargin() { return margin; }
Insets function() { return margin; }
/** * Return the button's "margin" property, which is an {@link Insets} object * describing the distance between the button's border and its text and * icon. * * @return The current "margin" property */
Return the button's "margin" property, which is an <code>Insets</code> object describing the distance between the button's border and its text and icon
getMargin
{ "repo_name": "aosm/gcc_40", "path": "libjava/javax/swing/AbstractButton.java", "license": "gpl-2.0", "size": 59595 }
[ "java.awt.Insets" ]
import java.awt.Insets;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,898,867
void put(String key, Object payload, String ref, Collection<String> dependRefs);
void put(String key, Object payload, String ref, Collection<String> dependRefs);
/** * Cache an object that depends on more than just the key. This doesn't just work for * authz but anything. * @param key The key with which to find the payload. * @param payload The cached object. * @param dependRefs All the references that this cached object depends on. */
Cache an object that depends on more than just the key. This doesn't just work for authz but anything
put
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "kernel/api/src/main/java/org/sakaiproject/memory/api/GenericMultiRefCache.java", "license": "apache-2.0", "size": 1978 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,370,487
public void setDateNextRun (Timestamp DateNextRun);
void function (Timestamp DateNextRun);
/** Set Date next run. * Date the process will run next */
Set Date next run. Date the process will run next
setDateNextRun
{ "repo_name": "pplatek/adempiere", "path": "base/src/org/compiere/model/I_AD_LdapProcessor.java", "license": "gpl-2.0", "size": 6622 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,884,731
public void raise(Errors error) { raise(error.exception()); }
void function(Errors error) { raise(error.exception()); }
/** * Raise an error. The request will be marked as failed. * @param error corresponding error to be passed to caller */
Raise an error. The request will be marked as failed
raise
{ "repo_name": "wangcy6/storm_app", "path": "frame/kafka-0.11.0/kafka-0.11.0.1-src/clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestFuture.java", "license": "apache-2.0", "size": 9368 }
[ "org.apache.kafka.common.protocol.Errors" ]
import org.apache.kafka.common.protocol.Errors;
import org.apache.kafka.common.protocol.*;
[ "org.apache.kafka" ]
org.apache.kafka;
1,471,946
public Object parseSAX(CIMArgument<?>[] pOutArgA) throws Exception { return SAXHelper.parseInvokeMethodResponse(getStreamReader(), pOutArgA, Common.LOCALPATH .getBasePath()); }
Object function(CIMArgument<?>[] pOutArgA) throws Exception { return SAXHelper.parseInvokeMethodResponse(getStreamReader(), pOutArgA, Common.LOCALPATH .getBasePath()); }
/** * Parses the method response with SAX. * * @param pOutArgA * - output arguments of method response. * @return return value of method response. * @throws Exception */
Parses the method response with SAX
parseSAX
{ "repo_name": "acleasby/sblim2", "path": "utst/org/sblim/cimclient/unittest/wbem/MethodRspChecker.java", "license": "epl-1.0", "size": 5701 }
[ "javax.cim.CIMArgument", "org.sblim.cimclient.internal.cimxml.sax.SAXHelper" ]
import javax.cim.CIMArgument; import org.sblim.cimclient.internal.cimxml.sax.SAXHelper;
import javax.cim.*; import org.sblim.cimclient.internal.cimxml.sax.*;
[ "javax.cim", "org.sblim.cimclient" ]
javax.cim; org.sblim.cimclient;
2,436,726