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
private EmrMasterSecurityGroup createEmrClusterMasterGroupFromRequest(String namespaceCd, String clusterDefinitionName, String clusterName, List<String> groupIds) { // Create the EMR cluster. EmrMasterSecurityGroup emrMasterSecurityGroup = new EmrMasterSecurityGroup(); emrMasterS...
EmrMasterSecurityGroup function(String namespaceCd, String clusterDefinitionName, String clusterName, List<String> groupIds) { EmrMasterSecurityGroup emrMasterSecurityGroup = new EmrMasterSecurityGroup(); emrMasterSecurityGroup.setNamespace(namespaceCd); emrMasterSecurityGroup.setEmrClusterDefinitionName(clusterDefinit...
/** * Creates a new EMR master group object from request. * * @param namespaceCd, the namespace Code * @param clusterDefinitionName, the cluster definition name * @param clusterName, the cluster name * @param groupIds, the List of groupId * * @return the created EMR master group ...
Creates a new EMR master group object from request
createEmrClusterMasterGroupFromRequest
{ "repo_name": "seoj/herd", "path": "herd-code/herd-service/src/main/java/org/finra/herd/service/impl/EmrServiceImpl.java", "license": "apache-2.0", "size": 55398 }
[ "java.util.List", "org.finra.herd.model.api.xml.EmrMasterSecurityGroup" ]
import java.util.List; import org.finra.herd.model.api.xml.EmrMasterSecurityGroup;
import java.util.*; import org.finra.herd.model.api.xml.*;
[ "java.util", "org.finra.herd" ]
java.util; org.finra.herd;
2,631,806
private void checkPatternNameUniqueness() { // make sure there is no pattern with name "$endState$" stateNameHandler.checkNameUniqueness(ENDING_STATE_NAME); Pattern patternToCheck = currentPattern; while (patternToCheck != null) { checkPatternNameUniqueness(patternToCheck); patternToCheck = pat...
void function() { stateNameHandler.checkNameUniqueness(ENDING_STATE_NAME); Pattern patternToCheck = currentPattern; while (patternToCheck != null) { checkPatternNameUniqueness(patternToCheck); patternToCheck = patternToCheck.getPrevious(); } stateNameHandler.clear(); }
/** * Check if there are duplicate pattern names. If yes, it * throws a {@link MalformedPatternException}. */
Check if there are duplicate pattern names. If yes, it throws a <code>MalformedPatternException</code>
checkPatternNameUniqueness
{ "repo_name": "zhangminglei/flink", "path": "flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/compiler/NFACompiler.java", "license": "apache-2.0", "size": 34981 }
[ "org.apache.flink.cep.pattern.Pattern" ]
import org.apache.flink.cep.pattern.Pattern;
import org.apache.flink.cep.pattern.*;
[ "org.apache.flink" ]
org.apache.flink;
754,472
public AffineTransform getAffineTransform() { return getAffineTransform(mValues); }
AffineTransform function() { return getAffineTransform(mValues); }
/** * Returns an {@link AffineTransform} matching the matrix. */
Returns an <code>AffineTransform</code> matching the matrix
getAffineTransform
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/base/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java", "license": "gpl-3.0", "size": 33948 }
[ "java.awt.geom.AffineTransform" ]
import java.awt.geom.AffineTransform;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,551,700
private void tweakTreeBorder(AbstractSourceTree tree) { Border treeBorder = tree.getBorder(); if (treeBorder==null) { treeBorder = BorderFactory.createEmptyBorder(2, 0, 0, 0); tree.setBorder(treeBorder); } else if (treeBorder instanceof EmptyBorder && ((EmptyBorder)treeBorder).getBorderInsets().top...
void function(AbstractSourceTree tree) { Border treeBorder = tree.getBorder(); if (treeBorder==null) { treeBorder = BorderFactory.createEmptyBorder(2, 0, 0, 0); tree.setBorder(treeBorder); } else if (treeBorder instanceof EmptyBorder && ((EmptyBorder)treeBorder).getBorderInsets().top==0) { treeBorder = BorderFactory.cr...
/** * Ensures the tree has a very small empty border at the top, to make * things look a little nicer. * * @param tree The tree whose border should be examined. */
Ensures the tree has a very small empty border at the top, to make things look a little nicer
tweakTreeBorder
{ "repo_name": "ZenHarbinger/RSTALanguageSupport", "path": "src/main/java/org/fife/rsta/ac/GoToMemberWindow.java", "license": "bsd-3-clause", "size": 7749 }
[ "java.awt.event.ActionListener", "java.awt.event.ComponentListener", "java.awt.event.KeyListener", "java.awt.event.MouseAdapter", "java.awt.event.WindowFocusListener", "javax.swing.BorderFactory", "javax.swing.border.Border", "javax.swing.border.EmptyBorder", "javax.swing.event.DocumentListener" ]
import java.awt.event.ActionListener; import java.awt.event.ComponentListener; import java.awt.event.KeyListener; import java.awt.event.MouseAdapter; import java.awt.event.WindowFocusListener; import javax.swing.BorderFactory; import javax.swing.border.Border; import javax.swing.border.EmptyBorder; import javax.swing.e...
import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; import javax.swing.event.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,841,682
public FormValidation doCheckControllerPollingInterval(@QueryParameter String value) { if (StringUtils.isEmpty(value)) { return FormValidation.ok(); } if (!StringUtils.isNumeric(value)) { return FormValidation.error("Controller Polling Interval must be a number"); } return FormValidation.o...
FormValidation function(@QueryParameter String value) { if (StringUtils.isEmpty(value)) { return FormValidation.ok(); } if (!StringUtils.isNumeric(value)) { return FormValidation.error(STR); } return FormValidation.ok(); }
/** * Do check controller polling interval form validation. * * @param value the value * @return the form validation */
Do check controller polling interval form validation
doCheckControllerPollingInterval
{ "repo_name": "hpsa/hpe-application-automation-tools-plugin", "path": "src/main/java/com/hp/application/automation/tools/run/RunFromFileBuilder.java", "license": "mit", "size": 21546 }
[ "hudson.util.FormValidation", "org.apache.commons.lang.StringUtils", "org.kohsuke.stapler.QueryParameter" ]
import hudson.util.FormValidation; import org.apache.commons.lang.StringUtils; import org.kohsuke.stapler.QueryParameter;
import hudson.util.*; import org.apache.commons.lang.*; import org.kohsuke.stapler.*;
[ "hudson.util", "org.apache.commons", "org.kohsuke.stapler" ]
hudson.util; org.apache.commons; org.kohsuke.stapler;
323,119
@ServiceMethod(returns = ReturnType.SINGLE) Mono<MicrosoftGraphDelegatedPermissionClassificationInner> createDelegatedPermissionClassificationsAsync( String servicePrincipalId, MicrosoftGraphDelegatedPermissionClassificationInner body);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<MicrosoftGraphDelegatedPermissionClassificationInner> createDelegatedPermissionClassificationsAsync( String servicePrincipalId, MicrosoftGraphDelegatedPermissionClassificationInner body);
/** * Create new navigation property to delegatedPermissionClassifications for servicePrincipals. * * @param servicePrincipalId key: id of servicePrincipal. * @param body New navigation property. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azu...
Create new navigation property to delegatedPermissionClassifications for servicePrincipals
createDelegatedPermissionClassificationsAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java", "license": "mit", "size": 228379 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDelegatedPermissionClassificationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDelegatedPermissionClassificationInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.authorization.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
107,145
public void setExtdirs(Path path) { cmd.createArgument().setValue("-extdirs"); cmd.createArgument().setPath(path); }
void function(Path path) { cmd.createArgument().setValue(STR); cmd.createArgument().setPath(path); }
/** * Set the location of the extensions directories. * * @param path a path containing the extension directories. */
Set the location of the extensions directories
setExtdirs
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/taskdefs/Javadoc.java", "license": "mit", "size": 84218 }
[ "org.apache.tools.ant.types.Path" ]
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.*;
[ "org.apache.tools" ]
org.apache.tools;
719,815
void enterLogicalOrExpression(@NotNull ECMAScriptParser.LogicalOrExpressionContext ctx); void exitLogicalOrExpression(@NotNull ECMAScriptParser.LogicalOrExpressionContext ctx);
void enterLogicalOrExpression(@NotNull ECMAScriptParser.LogicalOrExpressionContext ctx); void exitLogicalOrExpression(@NotNull ECMAScriptParser.LogicalOrExpressionContext ctx);
/** * Exit a parse tree produced by {@link ECMAScriptParser#LogicalOrExpression}. * @param ctx the parse tree */
Exit a parse tree produced by <code>ECMAScriptParser#LogicalOrExpression</code>
exitLogicalOrExpression
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/ECMAScriptListener.java", "license": "gpl-3.0", "size": 39591 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
44,134
String description; Method method; try { method = option.getToolTipMethod(); description = (String) method.invoke(option.getOptionHandler(), new Object[0]); } catch (Exception e) { description = "-none-"; } parent.addRow(new String[]{ "Description", description ...
String description; Method method; try { method = option.getToolTipMethod(); description = (String) method.invoke(option.getOptionHandler(), new Object[0]); } catch (Exception e) { description = STR; } parent.addRow(new String[]{ STR, description }); }
/** * Adds the description of the option as row. * * @param parent the table to add to * @param option the option to use */
Adds the description of the option as row
addDescription
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/core/option/DocBookProducer.java", "license": "gpl-3.0", "size": 15389 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,839,996
public void addParameter(String name, String value) { queryParams.add(new BasicNameValuePair(name, value)); }
void function(String name, String value) { queryParams.add(new BasicNameValuePair(name, value)); }
/** * Adds a parameter to the request's query string. This method does not do * duplicate detection. Adding a parameter more than once will result in a * query string with a duplicated parameter. * * @param name * The name of the parameter to add * @param value * The value to asso...
Adds a parameter to the request's query string. This method does not do duplicate detection. Adding a parameter more than once will result in a query string with a duplicated parameter
addParameter
{ "repo_name": "almajeas/RHITMobile-Android", "path": "src/RHITMobile/src/edu/rosehulman/android/directory/service/RestClient.java", "license": "apache-2.0", "size": 3551 }
[ "org.apache.http.message.BasicNameValuePair" ]
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.message.*;
[ "org.apache.http" ]
org.apache.http;
377,594
@Test public void testIotProviderCloseApplicationDirect() throws Exception { IotProvider provider = new IotProvider(EchoIotDevice::new); assertSame(provider.getApplicationService(), provider.getServices().getService(ApplicationService.class)); provider.start();...
void function() throws Exception { IotProvider provider = new IotProvider(EchoIotDevice::new); assertSame(provider.getApplicationService(), provider.getServices().getService(ApplicationService.class)); provider.start(); IotTestApps.registerApplications(provider); JsonObject submitAppOne = IotAppServiceIT.newSubmitReque...
/** * Basic test we can stop applications * @throws Exception on failure */
Basic test we can stop applications
testIotProviderCloseApplicationDirect
{ "repo_name": "queeniema/incubator-edgent", "path": "test/fvtiot/src/test/java/org/apache/edgent/test/fvt/iot/IotProviderIT.java", "license": "apache-2.0", "size": 10007 }
[ "com.google.gson.JsonArray", "com.google.gson.JsonObject", "com.google.gson.JsonPrimitive", "org.apache.edgent.apps.iot.IotDevicePubSub", "org.apache.edgent.connectors.iot.Commands", "org.apache.edgent.connectors.iot.IotDevice", "org.apache.edgent.execution.Job", "org.apache.edgent.execution.mbeans.Jo...
import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import org.apache.edgent.apps.iot.IotDevicePubSub; import org.apache.edgent.connectors.iot.Commands; import org.apache.edgent.connectors.iot.IotDevice; import org.apache.edgent.execution.Job; import org.apache.edg...
import com.google.gson.*; import org.apache.edgent.apps.iot.*; import org.apache.edgent.connectors.iot.*; import org.apache.edgent.execution.*; import org.apache.edgent.execution.mbeans.*; import org.apache.edgent.execution.services.*; import org.apache.edgent.providers.iot.*; import org.apache.edgent.runtime.jsoncontr...
[ "com.google.gson", "org.apache.edgent", "org.junit" ]
com.google.gson; org.apache.edgent; org.junit;
376,262
@Test public void nullCallback() throws Exception { mThrown.expect(UnsupportedCallbackException.class); mThrown.expectMessage(null + " is unsupported."); Callback[] callbacks = new Callback[3]; callbacks[0] = new NameCallback("Username:"); callbacks[1] = new PasswordCallback("Password:", true);...
void function() throws Exception { mThrown.expect(UnsupportedCallbackException.class); mThrown.expectMessage(null + STR); Callback[] callbacks = new Callback[3]; callbacks[0] = new NameCallback(STR); callbacks[1] = new PasswordCallback(STR, true); callbacks[2] = null; String user = STR; String password = STR; CallbackH...
/** * Tests that an exception is thrown when a callback is {@code null}. */
Tests that an exception is thrown when a callback is null
nullCallback
{ "repo_name": "ShailShah/alluxio", "path": "core/common/src/test/java/alluxio/security/authentication/PlainSaslClientCallbackHandlerTest.java", "license": "apache-2.0", "size": 4823 }
[ "javax.security.auth.callback.Callback", "javax.security.auth.callback.CallbackHandler", "javax.security.auth.callback.NameCallback", "javax.security.auth.callback.PasswordCallback", "javax.security.auth.callback.UnsupportedCallbackException" ]
import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.callback.*;
[ "javax.security" ]
javax.security;
1,171,609
@Generated @Selector("isDeviceMotionActive") public native boolean isDeviceMotionActive();
@Selector(STR) native boolean function();
/** * deviceMotionActive * <p> * Discussion: * Determines whether the CMMotionManager is currently providing device * motion updates. */
deviceMotionActive Discussion: Determines whether the CMMotionManager is currently providing device motion updates
isDeviceMotionActive
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/coremotion/CMMotionManager.java", "license": "apache-2.0", "size": 23031 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
798,552
private void sendCommand(int command) { int buf; // Send bit7-4 firstly buf = command & 0xF0; buf |= RS0_RW0_EN1; writeDataToI2C(buf); Tools.sleepMilliseconds(2); buf &= MAKE_EN0; writeDataToI2C(buf); // Send bit3-0 secondly buf = (com...
void function(int command) { int buf; buf = command & 0xF0; buf = RS0_RW0_EN1; writeDataToI2C(buf); Tools.sleepMilliseconds(2); buf &= MAKE_EN0; writeDataToI2C(buf); buf = (command & 0x0F) << 4; buf = RS0_RW0_EN1; writeDataToI2C(buf); Tools.sleepMilliseconds(2); buf &= MAKE_EN0; writeDataToI2C(buf); }
/** * Send a command to the LCM using I2C protocol. This command is sent using * the 4-bit data-length interface. * @param command */
Send a command to the LCM using I2C protocol. This command is sent using the 4-bit data-length interface
sendCommand
{ "repo_name": "chpressler/JRemote", "path": "src/main/java/com/raspoid/additionalcomponents/LCM1602.java", "license": "apache-2.0", "size": 13481 }
[ "com.raspoid.Tools" ]
import com.raspoid.Tools;
import com.raspoid.*;
[ "com.raspoid" ]
com.raspoid;
2,834,213
public BufferedImage createRawImage() { if (planar) { // Create a single-banded image of the appropriate data type. // Get the number of bits per sample. int bps = bitsPerSample[sourceBands[0]]; // Determine the data type. int dataType; ...
BufferedImage function() { if (planar) { int bps = bitsPerSample[sourceBands[0]]; int dataType; if(sampleFormat[0] == BaselineTIFFTagSet.SAMPLE_FORMAT_FLOATING_POINT) { dataType = DataBuffer.TYPE_FLOAT; } else if(bps <= 8) { dataType = DataBuffer.TYPE_BYTE; } else if(bps <= 16) { if(sampleFormat[0] == BaselineTIFFTagSe...
/** * Creates a <code>BufferedImage</code> whose underlying data * array will be suitable for holding the raw decoded output of * the <code>decodeRaw</code> method. * * <p> The default implementation calls * <code>getRawImageType</code>, and calls the resulting * <code>ImageTypeSpecif...
Creates a <code>BufferedImage</code> whose underlying data array will be suitable for holding the raw decoded output of the <code>decodeRaw</code> method. The default implementation calls <code>getRawImageType</code>, and calls the resulting <code>ImageTypeSpecifier</code>'s <code>createBufferedImage</code> method
createRawImage
{ "repo_name": "hflynn/bioformats", "path": "components/forks/jai/src/com/sun/media/imageio/plugins/tiff/TIFFDecompressor.java", "license": "gpl-2.0", "size": 115340 }
[ "java.awt.color.ColorSpace", "java.awt.image.BufferedImage", "java.awt.image.ColorModel", "java.awt.image.DataBuffer", "java.awt.image.IndexColorModel", "java.awt.image.MultiPixelPackedSampleModel", "java.awt.image.SampleModel", "javax.imageio.ImageTypeSpecifier" ]
import java.awt.color.ColorSpace; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.DataBuffer; import java.awt.image.IndexColorModel; import java.awt.image.MultiPixelPackedSampleModel; import java.awt.image.SampleModel; import javax.imageio.ImageTypeSpecifier;
import java.awt.color.*; import java.awt.image.*; import javax.imageio.*;
[ "java.awt", "javax.imageio" ]
java.awt; javax.imageio;
1,971,865
public void seek(long newOffset) throws IOException { if (raInput == null) { throw new IOException("Provided stream of type " + in.getClass().getSimpleName() + " is not seekable."); } // clear unread buffer by skipping over all bytes of buffer int unreadLength = buf.length - pos; if (unread...
void function(long newOffset) throws IOException { if (raInput == null) { throw new IOException(STR + in.getClass().getSimpleName() + STR); } int unreadLength = buf.length - pos; if (unreadLength > 0) { skip(unreadLength); } raInput.seek(newOffset); offset = newOffset; }
/** * Allows to seek to another position within stream in case the underlying stream implements {@link RandomAccessRead}. Otherwise an * {@link IOException} is thrown. * * Pushback buffer is cleared before seek operation by skipping over all bytes of buffer. * * @param newOffset new position within ...
Allows to seek to another position within stream in case the underlying stream implements <code>RandomAccessRead</code>. Otherwise an <code>IOException</code> is thrown. Pushback buffer is cleared before seek operation by skipping over all bytes of buffer
seek
{ "repo_name": "sencko/NALB", "path": "nalb2013/src/org/apache/pdfbox/io/PushBackInputStream.java", "license": "gpl-2.0", "size": 6129 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,261,265
public ScopeAuthorizationDelegate getAuthorizationDelegate(Action action){ return this.getAuthorizationDelegate(action.getScope()); }
ScopeAuthorizationDelegate function(Action action){ return this.getAuthorizationDelegate(action.getScope()); }
/** * Returns the scope authorization delegate for the scope of the given action. * @param action * @return */
Returns the scope authorization delegate for the scope of the given action
getAuthorizationDelegate
{ "repo_name": "UCSFMemoryAndAging/lava", "path": "lava-core/src/edu/ucsf/lava/core/scope/ScopeManager.java", "license": "bsd-2-clause", "size": 3189 }
[ "edu.ucsf.lava.core.action.model.Action" ]
import edu.ucsf.lava.core.action.model.Action;
import edu.ucsf.lava.core.action.model.*;
[ "edu.ucsf.lava" ]
edu.ucsf.lava;
1,927,764
public void testHighestShow() throws Exception { // Create another connection for the same user of connection 1 ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration(getHost(), getPort(), getServiceName()); XMPPConnection conn3 = new XMPPConnection(con...
void function() throws Exception { ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration(getHost(), getPort(), getServiceName()); XMPPConnection conn3 = new XMPPConnection(connectionConfiguration); conn3.connect(); conn3.login(getUsername(0), getPassword(0), "Home"); Presence presence = new Pres...
/** * User0 is connected from 2 resources. User0 is available in both resources * but with different show values. User1 sends a message to the * bare JID of User0. Check that the resource with highest show value will get * the messages. * * @throws Exception if an error occurs. */
User0 is connected from 2 resources. User0 is available in both resources but with different show values. User1 sends a message to the bare JID of User0. Check that the resource with highest show value will get the messages
testHighestShow
{ "repo_name": "UzxMx/java-bells", "path": "lib-src/smack_src_3_3_0/test/org/jivesoftware/smack/MessageTest.java", "license": "bsd-3-clause", "size": 17029 }
[ "org.jivesoftware.smack.filter.MessageTypeFilter", "org.jivesoftware.smack.packet.Message", "org.jivesoftware.smack.packet.Presence" ]
import org.jivesoftware.smack.filter.MessageTypeFilter; import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.filter.*; import org.jivesoftware.smack.packet.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
2,079,732
AffineTransform getGlyphTransform(int glyphIndex);
AffineTransform getGlyphTransform(int glyphIndex);
/** * Gets the transform of the specified glyph within this GlyphVector. */
Gets the transform of the specified glyph within this GlyphVector
getGlyphTransform
{ "repo_name": "Uni-Sol/batik", "path": "sources/org/apache/batik/gvt/font/GVTGlyphVector.java", "license": "apache-2.0", "size": 5734 }
[ "java.awt.geom.AffineTransform" ]
import java.awt.geom.AffineTransform;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,214,482
public Observable<ServiceResponse<ServiceRunnerInner>> getWithServiceResponseAsync(String resourceGroupName, String labName, String name) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); ...
Observable<ServiceResponse<ServiceRunnerInner>> function(String resourceGroupName, String labName, String name) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (labName == null) { throw new IllegalArg...
/** * Get service runner. * * @param resourceGroupName The name of the resource group. * @param labName The name of the lab. * @param name The name of the service runner. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Servic...
Get service runner
getWithServiceResponseAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/devtestlabs/mgmt-v2018_09_15/src/main/java/com/microsoft/azure/management/devtestlabs/v2018_09_15/implementation/ServiceRunnersInner.java", "license": "mit", "size": 19325 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,458,333
public static void write(byte[] data, Writer output) throws IOException { write(data, output, Charset.defaultCharset()); }
static void function(byte[] data, Writer output) throws IOException { write(data, output, Charset.defaultCharset()); }
/** * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code> * using the default character encoding of the platform. * <p> * This method uses {@link String#String(byte[])}. * * @param data the byte array to write, do not modify during output, * null ignored *...
Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code> using the default character encoding of the platform. This method uses <code>String#String(byte[])</code>
write
{ "repo_name": "trungnt13/fasta-game", "path": "TNTEngine/src/org/tntstudio/utils/io/IOUtils.java", "license": "mit", "size": 97808 }
[ "java.io.IOException", "java.io.Writer", "java.nio.charset.Charset" ]
import java.io.IOException; import java.io.Writer; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,932,940
protected TransactionEvent fireTransactionEnded() { return fireTransactionEnded("Transaction Ended; Source: " + this); }
TransactionEvent function() { return fireTransactionEnded(STR + this); }
/** * Fires a transaction ended event. * * @return The event that was fired or null if no event was fired, for * testing purposes. */
Fires a transaction ended event
fireTransactionEnded
{ "repo_name": "SQLPower/sqlpower-library", "path": "src/main/java/ca/sqlpower/object/AbstractSPObject.java", "license": "gpl-3.0", "size": 24742 }
[ "ca.sqlpower.util.TransactionEvent" ]
import ca.sqlpower.util.TransactionEvent;
import ca.sqlpower.util.*;
[ "ca.sqlpower.util" ]
ca.sqlpower.util;
1,024,995
private double[][] doFitJumpDistanceHistogram(double[][] jdHistogram, double estimatedD, int n) { calibrated = isCalibrated(); if (n == 1) { // Fit using a single population model final LevenbergMarquardtOptimizer lvmOptimizer = new LevenbergMarquardtOptimizer(); try { final JumpDis...
double[][] function(double[][] jdHistogram, double estimatedD, int n) { calibrated = isCalibrated(); if (n == 1) { final LevenbergMarquardtOptimizer lvmOptimizer = new LevenbergMarquardtOptimizer(); try { final JumpDistanceCumulFunction function = new JumpDistanceCumulFunction(jdHistogram[0], jdHistogram[1], estimatedD...
/** * Fit the jump distance histogram using a cumulative sum with the given number of species. * * <p>Results are sorted by the diffusion coefficient ascending. * * @param jdHistogram The cumulative jump distance histogram. X-axis is um^2, Y-axis is cumulative * probability. Must be monototic a...
Fit the jump distance histogram using a cumulative sum with the given number of species. Results are sorted by the diffusion coefficient ascending
doFitJumpDistanceHistogram
{ "repo_name": "aherbert/GDSC-SMLM", "path": "src/main/java/uk/ac/sussex/gdsc/smlm/fitting/JumpDistanceAnalysis.java", "license": "gpl-3.0", "size": 81045 }
[ "java.util.logging.Level", "org.apache.commons.math3.exception.ConvergenceException", "org.apache.commons.math3.exception.TooManyEvaluationsException", "org.apache.commons.math3.exception.TooManyIterationsException", "org.apache.commons.math3.fitting.leastsquares.LeastSquaresBuilder", "org.apache.commons....
import java.util.logging.Level; import org.apache.commons.math3.exception.ConvergenceException; import org.apache.commons.math3.exception.TooManyEvaluationsException; import org.apache.commons.math3.exception.TooManyIterationsException; import org.apache.commons.math3.fitting.leastsquares.LeastSquaresBuilder; import or...
import java.util.logging.*; import org.apache.commons.math3.exception.*; import org.apache.commons.math3.fitting.leastsquares.*; import org.apache.commons.math3.linear.*; import org.apache.commons.math3.optim.*; import org.apache.commons.math3.optim.nonlinear.scalar.*; import org.apache.commons.math3.optim.nonlinear.sc...
[ "java.util", "org.apache.commons", "uk.ac.sussex" ]
java.util; org.apache.commons; uk.ac.sussex;
1,513,778
private void leaveOneOutTripletSecond(Triplet set){ double selectedClasses[]; double oldW[][]; double term; double bestMembership; int trueOutput; int expectedOutput; int misses; misses=0; selectedClasses= new double[nClasses]; oldW= new double [totalInstances][nClasses]...
void function(Triplet set){ double selectedClasses[]; double oldW[][]; double term; double bestMembership; int trueOutput; int expectedOutput; int misses; misses=0; selectedClasses= new double[nClasses]; oldW= new double [totalInstances][nClasses]; for(int i=0;i<totalInstances;i++){ System.arraycopy(set.w[i], 0, oldW[i...
/** * Performs a LOO process on a triplet, to estimate its error * This time, both training and test instances are considered * * @param set triplet to analyze */
Performs a LOO process on a triplet, to estimate its error This time, both training and test instances are considered
leaveOneOutTripletSecond
{ "repo_name": "triguero/Keel3.0", "path": "src/keel/Algorithms/Fuzzy_Instance_Based_Learning/JFKNN/JFKNN.java", "license": "gpl-3.0", "size": 17766 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,202,268
public void playFirstTrack() { Dispatch.call(this, "PlayFirstTrack"); }
void function() { Dispatch.call(this, STR); }
/** * Wrapper for calling the ActiveX-Method with input-parameter(s). */
Wrapper for calling the ActiveX-Method with input-parameter(s)
playFirstTrack
{ "repo_name": "cpesch/MetaMusic", "path": "itunes-com-library/src/main/java/slash/metamusic/itunes/com/binding/IITPlaylist.java", "license": "gpl-2.0", "size": 9268 }
[ "com.jacob.com.Dispatch" ]
import com.jacob.com.Dispatch;
import com.jacob.com.*;
[ "com.jacob.com" ]
com.jacob.com;
2,373,419
public void addOption(String option, String value) { checkArgument(option != null, "option is null"); checkArgument(value != null, "value is null"); properties.put(option, value); }
void function(String option, String value) { checkArgument(option != null, STR); checkArgument(value != null, STR); properties.put(option, value); }
/** * Add another option to the iterator. * * @param option * the name of the option * @param value * the value of the option */
Add another option to the iterator
addOption
{ "repo_name": "milleruntime/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java", "license": "apache-2.0", "size": 12498 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
985,172
public void show(final IPartialPageRequestHandler target) { if (shown == false) { getContent().setVisible(true); target.add(this); target.appendJavaScript(getWindowOpenJavaScript()); shown = true; } }
void function(final IPartialPageRequestHandler target) { if (shown == false) { getContent().setVisible(true); target.add(this); target.appendJavaScript(getWindowOpenJavaScript()); shown = true; } }
/** * Shows the modal window. * * @param target * Request target associated with current ajax request. */
Shows the modal window
show
{ "repo_name": "topicusonderwijs/wicket", "path": "wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java", "license": "apache-2.0", "size": 34961 }
[ "org.apache.wicket.core.request.handler.IPartialPageRequestHandler" ]
import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
import org.apache.wicket.core.request.handler.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,671,793
public static void assertUie(boolean v) { if (!v) throw new UIMARuntimeException(UIMARuntimeException.INTERNAL_ERROR); }
static void function(boolean v) { if (!v) throw new UIMARuntimeException(UIMARuntimeException.INTERNAL_ERROR); }
/** * Check and throw UIMA Internal Error if false * * @param v * if false, throws */
Check and throw UIMA Internal Error if false
assertUie
{ "repo_name": "apache/uima-uimaj", "path": "uimaj-core/src/main/java/org/apache/uima/internal/util/Misc.java", "license": "apache-2.0", "size": 42029 }
[ "org.apache.uima.UIMARuntimeException" ]
import org.apache.uima.UIMARuntimeException;
import org.apache.uima.*;
[ "org.apache.uima" ]
org.apache.uima;
1,052,573
@Override protected void execute() { if (!checkCULDevice()) { return; } logger.debug("Processing " + temperatureCommandQueue.size() + " waiting FHT temperature commands"); Map<String, FHTDesiredTemperatureCommand> copyMap = new HashMap<String, FHTDesiredTemperatureCom...
void function() { if (!checkCULDevice()) { return; } logger.debug(STR + temperatureCommandQueue.size() + STR); Map<String, FHTDesiredTemperatureCommand> copyMap = new HashMap<String, FHTDesiredTemperatureCommand>( temperatureCommandQueue); for (Entry<String, FHTDesiredTemperatureCommand> entry : copyMap.entrySet()) { F...
/** * Here we send waiting commands to the FHT-80b. Since we can only send * every 2 minutes a limited amount of commads, we collect commands and * discard older commands in favor of newer ones, so we send as less packets * as possible. */
Here we send waiting commands to the FHT-80b. Since we can only send every 2 minutes a limited amount of commads, we collect commands and discard older commands in favor of newer ones, so we send as less packets as possible
execute
{ "repo_name": "aschor/openhab", "path": "bundles/binding/org.openhab.binding.fht/src/main/java/org/openhab/binding/fht/internal/FHTBinding.java", "license": "epl-1.0", "size": 26167 }
[ "java.util.HashMap", "java.util.Map", "org.openhab.io.transport.cul.CULCommunicationException" ]
import java.util.HashMap; import java.util.Map; import org.openhab.io.transport.cul.CULCommunicationException;
import java.util.*; import org.openhab.io.transport.cul.*;
[ "java.util", "org.openhab.io" ]
java.util; org.openhab.io;
2,077,807
public HashMap<Integer, RCSNode> getNodeMap() { return nodeMap; }
HashMap<Integer, RCSNode> function() { return nodeMap; }
/** * Returns the node map. * * @return the node map */
Returns the node map
getNodeMap
{ "repo_name": "r-kober/ReCaLys", "path": "ReCaLys/src/de/upb/recalys/model/RCSGraph.java", "license": "mit", "size": 16858 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
964,258
private String getElementsDeleteJavascript() { // build the javascript call final AppendingStringBuffer buffer = new AppendingStringBuffer(100); buffer.append("Wicket.Tree.removeNodes(\""); // first parameter is the markup id of tree (will be used as prefix to // build ids of child items buffer.append...
String function() { final AppendingStringBuffer buffer = new AppendingStringBuffer(100); buffer.append(STRSTR_\",["); buffer.append(deleteIds); if (buffer.endsWith(",")) { buffer.setLength(buffer.length() - 1); } buffer.append("]);"); return buffer.toString(); } //
/** * Returns the javascript used to delete removed elements. * * @return The javascript */
Returns the javascript used to delete removed elements
getElementsDeleteJavascript
{ "repo_name": "Servoy/wicket", "path": "wicket/src/main/java/org/apache/wicket/markup/html/tree/AbstractTree.java", "license": "apache-2.0", "size": 41630 }
[ "org.apache.wicket.util.string.AppendingStringBuffer" ]
import org.apache.wicket.util.string.AppendingStringBuffer;
import org.apache.wicket.util.string.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,969,116
int updateByPrimaryKeySelective(TaskList record);
int updateByPrimaryKeySelective(TaskList record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_prj_task_list * * @mbggenerated Thu Jul 16 10:50:12 ICT 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table m_prj_task_list
updateByPrimaryKeySelective
{ "repo_name": "uniteddiversity/mycollab", "path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/project/dao/TaskListMapper.java", "license": "agpl-3.0", "size": 5566 }
[ "com.esofthead.mycollab.module.project.domain.TaskList" ]
import com.esofthead.mycollab.module.project.domain.TaskList;
import com.esofthead.mycollab.module.project.domain.*;
[ "com.esofthead.mycollab" ]
com.esofthead.mycollab;
2,076,318
@Override public void chartChanged(ChartChangeEvent event) { this.flag = true; } }
void function(ChartChangeEvent event) { this.flag = true; } }
/** * Event handler. * * @param event the event. */
Event handler
chartChanged
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/test/java/org/jfree/chart/LineChartTest.java", "license": "lgpl-2.1", "size": 6440 }
[ "org.jfree.chart.event.ChartChangeEvent" ]
import org.jfree.chart.event.ChartChangeEvent;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,503,064
public static MozuClient deleteChannelGroupClient(String code) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.ChannelGroupUrl.deleteChannelGroupUrl(code); String verb = "DELETE"; MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(); mozuClient.setVerb(verb); mozuClient...
static MozuClient function(String code) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.ChannelGroupUrl.deleteChannelGroupUrl(code); String verb = STR; MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance(); mozuClient.setVerb(verb); mozuClient.setResourceUrl(url); return mozuClient; }
/** * * <p><pre><code> * MozuClient mozuClient=DeleteChannelGroupClient( code); * client.setBaseAddress(url); * client.executeRequest(); * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @return Mozu.Api.MozuClient */
<code><code> MozuClient mozuClient=DeleteChannelGroupClient( code); client.setBaseAddress(url); client.executeRequest(); </code></code>
deleteChannelGroupClient
{ "repo_name": "Mozu/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/ChannelGroupClient.java", "license": "mit", "size": 12489 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
152,164
public List<SystemOverview> listUserSystems(User loggedInUser) { // Get the logged in user return SystemManager.systemListShort(loggedInUser, null); }
List<SystemOverview> function(User loggedInUser) { return SystemManager.systemListShort(loggedInUser, null); }
/** * List systems for the logged in user * @param loggedInUser The current user * @return Returns an array of maps representing a system * * @xmlrpc.doc List systems for the logged in user. * @xmlrpc.param #param("string", "sessionKey") * @xmlrpc.returntype * #array() ...
List systems for the logged in user
listUserSystems
{ "repo_name": "jdobes/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java", "license": "gpl-2.0", "size": 240801 }
[ "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.dto.SystemOverview", "com.redhat.rhn.manager.system.SystemManager", "java.util.List" ]
import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.dto.SystemOverview; import com.redhat.rhn.manager.system.SystemManager; import java.util.List;
import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.dto.*; import com.redhat.rhn.manager.system.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
2,279,997
private Tag findTag(final CTag tag, final Tag apiTag) { if (tag == apiTag.getNative().getObject()) { return apiTag; } for (final Tag child : apiTag.getChildren()) { final Tag foundTag = findTag(tag, child); if (foundTag != null) { return foundTag; } } return null...
Tag function(final CTag tag, final Tag apiTag) { if (tag == apiTag.getNative().getObject()) { return apiTag; } for (final Tag child : apiTag.getChildren()) { final Tag foundTag = findTag(tag, child); if (foundTag != null) { return foundTag; } } return null; }
/** * Searches for an API tag that wraps a given internal tag. * * @param tag The internal tag to search for. * @param apiTag Tag to search through. * * @return The found API tag or null. */
Searches for an API tag that wraps a given internal tag
findTag
{ "repo_name": "google/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/API/disassembly/TagManager.java", "license": "apache-2.0", "size": 11371 }
[ "com.google.security.zynamics.binnavi.Tagging" ]
import com.google.security.zynamics.binnavi.Tagging;
import com.google.security.zynamics.binnavi.*;
[ "com.google.security" ]
com.google.security;
2,114,076
public Command getEquivalentCommand(Class<? extends Command> clazz) { for (Command cmd : this.container.getCommandHandler().get().getCommands()) { if (clazz.isInstance(cmd)) { return cmd; } } return null; }
Command function(Class<? extends Command> clazz) { for (Command cmd : this.container.getCommandHandler().get().getCommands()) { if (clazz.isInstance(cmd)) { return cmd; } } return null; }
/** * Gets the 'equivalent' command of this class. This is useful to prevent * many instances of the same object being passed around XtraCore. * * @param clazz The class * @return The command object for the specified class */
Gets the 'equivalent' command of this class. This is useful to prevent many instances of the same object being passed around XtraCore
getEquivalentCommand
{ "repo_name": "XtraStudio/XtraCore", "path": "src/main/java/com/xtra/core/util/CommandHelper.java", "license": "mit", "size": 7208 }
[ "com.xtra.api.command.Command" ]
import com.xtra.api.command.Command;
import com.xtra.api.command.*;
[ "com.xtra.api" ]
com.xtra.api;
2,735,627
@Test void basicCheck() { for( ImageType type : imageTypes ) { basicCheck(type); } }
@Test void basicCheck() { for( ImageType type : imageTypes ) { basicCheck(type); } }
/** * Basic check were multiple images are feed into the algorithm and another image, * which has a region which is clearly different is then segmented. */
Basic check were multiple images are feed into the algorithm and another image, which has a region which is clearly different is then segmented
basicCheck
{ "repo_name": "lessthanoptimal/BoofCV", "path": "main/boofcv-feature/src/test/java/boofcv/alg/background/stationary/GenericBackgroundModelStationaryChecks.java", "license": "apache-2.0", "size": 7058 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
2,143,602
@Override protected void makeExtensionsImmutable() { extensions.makeImmutable(); } protected class ExtensionWriter { // Imagine how much simpler this code would be if Java iterators had // a way to get the next element without advancing the iterator. private final Iterator...
void function() { extensions.makeImmutable(); } protected class ExtensionWriter { private final Iterator<Map.Entry<ExtensionDescriptor, Object>> iter = extensions.iterator(); private Map.Entry<ExtensionDescriptor, Object> next; private final boolean messageSetWireFormat; private ExtensionWriter(boolean messageSetWireFo...
/** * Used by parsing constructors in generated classes. */
Used by parsing constructors in generated classes
makeExtensionsImmutable
{ "repo_name": "udoprog/ffwd-client-java", "path": "src/main/java/com/google/protobuf250/GeneratedMessageLite.java", "license": "apache-2.0", "size": 28819 }
[ "java.util.Iterator", "java.util.Map" ]
import java.util.Iterator; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
485,759
public ServiceResponse<String> loginUser(String username, String password) throws ServiceException, IOException { Call<ResponseBody> call = service.loginUser(username, password); return loginUserDelegate(call.execute()); }
ServiceResponse<String> function(String username, String password) throws ServiceException, IOException { Call<ResponseBody> call = service.loginUser(username, password); return loginUserDelegate(call.execute()); }
/** * Logs user into the system. * * @param username The user name for login * @param password The password for login in clear text * @throws ServiceException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the String...
Logs user into the system
loginUser
{ "repo_name": "John-Hart/autorest", "path": "Samples/petstore/Java/implementation/SwaggerPetstoreImpl.java", "license": "mit", "size": 88839 }
[ "com.microsoft.rest.ServiceException", "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
623,608
private void delete(ElisDataObject[] data, boolean finalRun) throws StorageException { if (data != null && data.length > 0) { // Just delegate this to the insert(AbstractUser, false) method. for (ElisDataObject dataParticle : data) { delete(dataParticle, false); } } }
void function(ElisDataObject[] data, boolean finalRun) throws StorageException { if (data != null && data.length > 0) { for (ElisDataObject dataParticle : data) { delete(dataParticle, false); } } }
/** * This method is called by the public delete(ElisDataObject[]) method. It * tries to create the table needed to store the data object if it doesn't * already exist. However, it will only try once. If it doesn't succeed on * its first try, it will stop trying by throwing an exception. * * @param data Th...
This method is called by the public delete(ElisDataObject[]) method. It tries to create the table needed to store the data object if it doesn't already exist. However, it will only try once. If it doesn't succeed on its first try, it will stop trying by throwing an exception
delete
{ "repo_name": "iotap-center/elis-platform", "path": "Elis user and persistent storage service implementations/src/main/java/se/mah/elis/impl/services/storage/StorageImpl.java", "license": "mit", "size": 63812 }
[ "se.mah.elis.data.ElisDataObject", "se.mah.elis.services.storage.exceptions.StorageException" ]
import se.mah.elis.data.ElisDataObject; import se.mah.elis.services.storage.exceptions.StorageException;
import se.mah.elis.data.*; import se.mah.elis.services.storage.exceptions.*;
[ "se.mah.elis" ]
se.mah.elis;
1,427,011
EClass getFieldType();
EClass getFieldType();
/** * Returns the meta object for class '{@link org.w3._2001.schema.FieldType <em>Field Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Field Type</em>'. * @see org.w3._2001.schema.FieldType * @generated */
Returns the meta object for class '<code>org.w3._2001.schema.FieldType Field Type</code>'.
getFieldType
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wps/src/org/w3/_2001/schema/SchemaPackage.java", "license": "lgpl-2.1", "size": 433240 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,878,500
public int getHeight(RenderedImage fallback) { if (isValid(HEIGHT_MASK)) { return height; } else { if (fallback == null) { return 0; } else { return fallback.getHeight(); } } }
int function(RenderedImage fallback) { if (isValid(HEIGHT_MASK)) { return height; } else { if (fallback == null) { return 0; } else { return fallback.getHeight(); } } }
/** * Returns the value of height if it is valid, and * otherwise returns the value from the supplied <code>RenderedImage</code>. * If height is not valid and fallback is null, 0 is returned. * * @param fallback the <code>RenderedImage</code> fallback. * @return the appropriate value of he...
Returns the value of height if it is valid, and otherwise returns the value from the supplied <code>RenderedImage</code>. If height is not valid and fallback is null, 0 is returned
getHeight
{ "repo_name": "MarinnaCole/LightZone", "path": "lightcrafts/extsrc/com/lightcrafts/mediax/jai/ImageLayout.java", "license": "bsd-3-clause", "size": 29012 }
[ "java.awt.image.RenderedImage" ]
import java.awt.image.RenderedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
38,728
public Collection<CommandExecutor> getCommandExecutors();
Collection<CommandExecutor> function();
/** * Gets a list of all executors registered. * @return All executors. */
Gets a list of all executors registered
getCommandExecutors
{ "repo_name": "good2000mo/OpenClassicAPI", "path": "src/main/java/ch/spacebase/openclassic/api/Game.java", "license": "mit", "size": 4225 }
[ "ch.spacebase.openclassic.api.command.CommandExecutor", "java.util.Collection" ]
import ch.spacebase.openclassic.api.command.CommandExecutor; import java.util.Collection;
import ch.spacebase.openclassic.api.command.*; import java.util.*;
[ "ch.spacebase.openclassic", "java.util" ]
ch.spacebase.openclassic; java.util;
1,569,067
private static String fromUtf8(Object object) { String result = Constants.EMPTY_STRING; if (object instanceof String) { result = (String)object; } else if (object instanceof byte[]) { result = StringUtils.fromUTF8((byte[])object); ...
static String function(Object object) { String result = Constants.EMPTY_STRING; if (object instanceof String) { result = (String)object; } else if (object instanceof byte[]) { result = StringUtils.fromUTF8((byte[])object); } return result; }
/** * Converts strings and bytes arrays to the string. * * @param object string or bytes array. * * @return string. */
Converts strings and bytes arrays to the string
fromUtf8
{ "repo_name": "pitosalas/blogbridge", "path": "src/com/salas/bb/discovery/MDDiscoveryLogic.java", "license": "gpl-2.0", "size": 13312 }
[ "com.salas.bb.utils.Constants", "com.salas.bb.utils.StringUtils" ]
import com.salas.bb.utils.Constants; import com.salas.bb.utils.StringUtils;
import com.salas.bb.utils.*;
[ "com.salas.bb" ]
com.salas.bb;
2,217,501
private byte[] getBytes(InputStream inputStream) throws IOException { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); int numberRead; byte[] data = new byte[BLOCK_LENGTH_AS_HEX]; while ((numberRead = inputStream.read(data, 0, data.length)) != -1) { buffer.wr...
byte[] function(InputStream inputStream) throws IOException { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); int numberRead; byte[] data = new byte[BLOCK_LENGTH_AS_HEX]; while ((numberRead = inputStream.read(data, 0, data.length)) != -1) { buffer.write(data, 0, numberRead); } buffer.flush(); return buffer....
/** * Returns the contents of the InputStream as a byte array. */
Returns the contents of the InputStream as a byte array
getBytes
{ "repo_name": "leafcoin/leafcoinj", "path": "core/src/test/java/com/google/leafcoin/core/CoinbaseBlockTest.java", "license": "apache-2.0", "size": 4296 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,454,486
public void addChildRDN(RDN rdn) throws InvalidNameException { add(rdn); }
void function(RDN rdn) throws InvalidNameException { add(rdn); }
/** * Adds a new 'deepest level' RDN to a DN * * @param RDN the RDN to append to the end of the DN */
Adds a new 'deepest level' RDN to a DN
addChildRDN
{ "repo_name": "idega/com.idega.block.ldap", "path": "src/java/com/idega/core/ldap/client/naming/DN.java", "license": "gpl-3.0", "size": 23619 }
[ "javax.naming.InvalidNameException" ]
import javax.naming.InvalidNameException;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
1,414,314
void updateRemotes() { service .remoteList(project.getLocation(), null, true) .then( remotes -> { updateLocalBranches(); view.setRepositories(remotes); view.setEnablePushButton(!remotes.isEmpty()); view.setSelectedForcePushCheckBo...
void updateRemotes() { service .remoteList(project.getLocation(), null, true) .then( remotes -> { updateLocalBranches(); view.setRepositories(remotes); view.setEnablePushButton(!remotes.isEmpty()); view.setSelectedForcePushCheckBox(false); view.showDialog(); }) .catchError( error -> { String errorMessage = error.getMes...
/** * Get the list of remote repositories for local one. If remote repositories are found, then get * the list of branches (remote and local). */
Get the list of remote repositories for local one. If remote repositories are found, then get the list of branches (remote and local)
updateRemotes
{ "repo_name": "sleshchenko/che", "path": "plugins/plugin-git/che-plugin-git-ext-git/src/main/java/org/eclipse/che/ide/ext/git/client/push/PushToRemotePresenter.java", "license": "epl-1.0", "size": 15280 }
[ "org.eclipse.che.ide.ext.git.client.outputconsole.GitOutputConsole" ]
import org.eclipse.che.ide.ext.git.client.outputconsole.GitOutputConsole;
import org.eclipse.che.ide.ext.git.client.outputconsole.*;
[ "org.eclipse.che" ]
org.eclipse.che;
1,631,227
protected ContextMenu getWeekDayViewMenu(ContextMenuParameter param) { ContextMenu contextMenu = getDayViewBaseMenu(param); WeekDayView weekDayView = (WeekDayView) param.getDateControl(); WeekView weekView = weekDayView.getWeekView(); Menu daysMenu = new Menu(Messages.getString("Con...
ContextMenu function(ContextMenuParameter param) { ContextMenu contextMenu = getDayViewBaseMenu(param); WeekDayView weekDayView = (WeekDayView) param.getDateControl(); WeekView weekView = weekDayView.getWeekView(); Menu daysMenu = new Menu(Messages.getString(STR)); int[] days = new int[]{5, 7, 14, 21, 28}; for (int d :...
/** * Returns the context menu specific for a single {@link WeekDayView}. Week * day views are used inside a {@link WeekView}. * * @param param * parameter object with the most relevant information for * creating a new context menu * @return a context menu for a ...
Returns the context menu specific for a single <code>WeekDayView</code>. Week day views are used inside a <code>WeekView</code>
getWeekDayViewMenu
{ "repo_name": "TeHenua/Atea", "path": "src/com/calendarfx/view/ContextMenuProvider.java", "license": "gpl-3.0", "size": 11042 }
[ "com.calendarfx.view.DateControl", "java.text.MessageFormat" ]
import com.calendarfx.view.DateControl; import java.text.MessageFormat;
import com.calendarfx.view.*; import java.text.*;
[ "com.calendarfx.view", "java.text" ]
com.calendarfx.view; java.text;
1,090,323
public TestElement createTestElement(Class<?> guiClass, Class<?> testClass) { try { JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass); comp.clearGui(); TestElement node = comp.createTestElement(); nodesToGui.put(node, comp); return nod...
TestElement function(Class<?> guiClass, Class<?> testClass) { try { JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass); comp.clearGui(); TestElement node = comp.createTestElement(); nodesToGui.put(node, comp); return node; } catch (Exception e) { log.error(STR, e); return null; } }
/** * Create a TestElement corresponding to the specified GUI class. * * @param guiClass * the fully qualified class name of the GUI component or a * TestBean class for TestBeanGUIs. * @param testClass * the fully qualified class name of the test eleme...
Create a TestElement corresponding to the specified GUI class
createTestElement
{ "repo_name": "benbenw/jmeter", "path": "src/core/src/main/java/org/apache/jmeter/gui/GuiPackage.java", "license": "apache-2.0", "size": 34909 }
[ "org.apache.jmeter.testelement.TestElement" ]
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.testelement.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
2,478,390
public TestSuiteBuilder matchClasses(Predicate<Class<?>> predicate) { matchClassPredicate = predicate; return this; }
TestSuiteBuilder function(Predicate<Class<?>> predicate) { matchClassPredicate = predicate; return this; }
/** * Specifies a predicate returns false for classes we want to exclude. */
Specifies a predicate returns false for classes we want to exclude
matchClasses
{ "repo_name": "orrsella/bazel-example", "path": "build_tools/src/main/java/testing/junit/TestSuiteBuilder.java", "license": "apache-2.0", "size": 4280 }
[ "com.google.common.base.Predicate" ]
import com.google.common.base.Predicate;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
944,847
public TIFFNode getMetaDataTree() { return root; }
TIFFNode function() { return root; }
/** * Gets the meta data as a Swing TreeNode structure. */
Gets the meta data as a Swing TreeNode structure
getMetaDataTree
{ "repo_name": "sebkur/montemedia", "path": "src/main/org/monte/media/exif/EXIFReader.java", "license": "lgpl-3.0", "size": 50534 }
[ "org.monte.media.tiff.TIFFNode" ]
import org.monte.media.tiff.TIFFNode;
import org.monte.media.tiff.*;
[ "org.monte.media" ]
org.monte.media;
2,511,249
EReference getInBinding_Binding();
EReference getInBinding_Binding();
/** * Returns the meta object for the container reference '{@link ucm.map.InBinding#getBinding <em>Binding</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the container reference '<em>Binding</em>'. * @see ucm.map.InBinding#getBinding() * @see #getInBinding() * @...
Returns the meta object for the container reference '<code>ucm.map.InBinding#getBinding Binding</code>'.
getInBinding_Binding
{ "repo_name": "McGill-DP-Group/seg.jUCMNav", "path": "src/ucm/map/MapPackage.java", "license": "epl-1.0", "size": 151897 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,919,286
@Test public void testSubtaskRequestNoSummary() throws Exception { PendingCheckpointStats checkpoint = mock(PendingCheckpointStats.class); when(checkpoint.getCheckpointId()).thenReturn(1992139L); when(checkpoint.getStatus()).thenReturn(CheckpointStatsStatus.IN_PROGRESS); when(checkpoint.getTriggerTimestamp(...
void function() throws Exception { PendingCheckpointStats checkpoint = mock(PendingCheckpointStats.class); when(checkpoint.getCheckpointId()).thenReturn(1992139L); when(checkpoint.getStatus()).thenReturn(CheckpointStatsStatus.IN_PROGRESS); when(checkpoint.getTriggerTimestamp()).thenReturn(0L); TaskStateStats task = cre...
/** * Tests a subtask details request. */
Tests a subtask details request
testSubtaskRequestNoSummary
{ "repo_name": "haohui/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/legacy/checkpoints/CheckpointStatsSubtaskDetailsHandlerTest.java", "license": "apache-2.0", "size": 18273 }
[ "com.fasterxml.jackson.databind.JsonNode", "org.apache.flink.runtime.checkpoint.CheckpointStatsStatus", "org.apache.flink.runtime.checkpoint.PendingCheckpointStats", "org.apache.flink.runtime.checkpoint.TaskStateStats", "org.apache.flink.runtime.jobgraph.JobVertexID", "org.junit.Assert", "org.mockito.Mo...
import com.fasterxml.jackson.databind.JsonNode; import org.apache.flink.runtime.checkpoint.CheckpointStatsStatus; import org.apache.flink.runtime.checkpoint.PendingCheckpointStats; import org.apache.flink.runtime.checkpoint.TaskStateStats; import org.apache.flink.runtime.jobgraph.JobVertexID; import org.junit.Assert; i...
import com.fasterxml.jackson.databind.*; import org.apache.flink.runtime.checkpoint.*; import org.apache.flink.runtime.jobgraph.*; import org.junit.*; import org.mockito.*;
[ "com.fasterxml.jackson", "org.apache.flink", "org.junit", "org.mockito" ]
com.fasterxml.jackson; org.apache.flink; org.junit; org.mockito;
647,471
@Test public void testMapJoin3() throws IOException { assertEqual("mapJoin3"); }
void function() throws IOException { assertEqual(STR); }
/** * Tests maps and joins. * * @throws IOException should not occur */
Tests maps and joins
testMapJoin3
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Instantiation/de.uni_hildesheim.sse.vil.buildlang.tests/src/test/de/uni_hildesheim/sse/vil/buildlang/BasicTests.java", "license": "apache-2.0", "size": 16990 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,313,801
public void setAtomicWorkPath(Path atomicWorkPath) { this.atomicWorkPath = atomicWorkPath; }
void function(Path atomicWorkPath) { this.atomicWorkPath = atomicWorkPath; }
/** * Set the work path for atomic commit * * @param atomicWorkPath - Path on the target cluster */
Set the work path for atomic commit
setAtomicWorkPath
{ "repo_name": "busbey/hadoop", "path": "hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java", "license": "apache-2.0", "size": 19158 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,845,791
public static OptionSet parse(String xmlFilePath) throws ParserConfigurationException, SAXException, IOException { // Validation XMLValidator xmlValidator = new XMLValidator(xmlF...
static OptionSet function(String xmlFilePath) throws ParserConfigurationException, SAXException, IOException { XMLValidator xmlValidator = new XMLValidator(xmlFilePath); xmlValidator.validate(); if (!xmlValidator.isValidXml()) { throw new SAXException(xmlValidator.getError()); } XMLOptionReader xmlReader = new XMLOptio...
/** * Returns the options created from the XML file. * * @param xmlFilePath Path of the xmlFile * @return The options created * * @throws ParserConfigurationException Parser creation failed * @throws SAXException Invalid XML format or option creation error * @thro...
Returns the options created from the XML file
parse
{ "repo_name": "jdussouillez/JCLAP", "path": "src/main/java/org/jd/jclap/options/xml/XMLOptionReader.java", "license": "bsd-3-clause", "size": 6887 }
[ "java.io.File", "java.io.IOException", "javax.xml.parsers.ParserConfigurationException", "javax.xml.parsers.SAXParser", "javax.xml.parsers.SAXParserFactory", "org.jd.jclap.options.OptionSet", "org.xml.sax.SAXException" ]
import java.io.File; import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.jd.jclap.options.OptionSet; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.parsers.*; import org.jd.jclap.options.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.jd.jclap", "org.xml.sax" ]
java.io; javax.xml; org.jd.jclap; org.xml.sax;
1,979,502
protected void set_lastpolltime(Date time) { m_lastPollTime = new Timestamp(time.getTime()); m_changed |= CHANGED_POLLTIME; }
void function(Date time) { m_lastPollTime = new Timestamp(time.getTime()); m_changed = CHANGED_POLLTIME; }
/** * Sets the last poll time. * * @param time The last poll time. * */
Sets the last poll time
set_lastpolltime
{ "repo_name": "vishwaAbhinav/OpenNMS", "path": "opennms-services/src/main/java/org/opennms/netmgt/linkd/DbVlanEntry.java", "license": "gpl-2.0", "size": 18681 }
[ "java.sql.Timestamp", "java.util.Date" ]
import java.sql.Timestamp; import java.util.Date;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,858,462
public YangUInt8 getMaxPdnConnPerUeValue() throws JNCException { YangUInt8 maxPdnConnPerUe = (YangUInt8)getValue("max-pdn-conn-per-ue"); if (maxPdnConnPerUe == null) { maxPdnConnPerUe = new YangUInt8("8"); // default } return maxPdnConnPerUe; }
YangUInt8 function() throws JNCException { YangUInt8 maxPdnConnPerUe = (YangUInt8)getValue(STR); if (maxPdnConnPerUe == null) { maxPdnConnPerUe = new YangUInt8("8"); } return maxPdnConnPerUe; }
/** * Gets the value for child leaf "max-pdn-conn-per-ue". * @return The value of the leaf. */
Gets the value for child leaf "max-pdn-conn-per-ue"
getMaxPdnConnPerUeValue
{ "repo_name": "jnpr-shinma/yangfile", "path": "hitel/src/hctaEpc/mmeSgsn/interface_/nas/MmeNasSm.java", "license": "apache-2.0", "size": 46144 }
[ "com.tailf.jnc.YangUInt8" ]
import com.tailf.jnc.YangUInt8;
import com.tailf.jnc.*;
[ "com.tailf.jnc" ]
com.tailf.jnc;
1,014,249
public String processSelectedRange(ValueChangeEvent vce) { String viewRange = (String) vce.getNewValue(); if (disabledSelectView.equals(viewRange)) return MAIN_EVENTS_LIST_PAGE_URL;// do-nothing for IE browser // case setViewDateRang(viewRange); setSignupMeetings(null);// reset return MAIN_...
String function(ValueChangeEvent vce) { String viewRange = (String) vce.getNewValue(); if (disabledSelectView.equals(viewRange)) return MAIN_EVENTS_LIST_PAGE_URL; setViewDateRang(viewRange); setSignupMeetings(null); return MAIN_EVENTS_LIST_PAGE_URL; }
/** * This is a ValueChange Listener to watch the view-range type selection by * user. * * @param vce * a ValuechangeEvent object. * @return a outcome string. */
This is a ValueChange Listener to watch the view-range type selection by user
processSelectedRange
{ "repo_name": "noondaysun/sakai", "path": "signup/tool/src/java/org/sakaiproject/signup/tool/jsf/SignupMeetingsBean.java", "license": "apache-2.0", "size": 34804 }
[ "javax.faces.event.ValueChangeEvent" ]
import javax.faces.event.ValueChangeEvent;
import javax.faces.event.*;
[ "javax.faces" ]
javax.faces;
827,362
@Test public void testExtendedAttributesConditionalUpdates() throws Exception { final AttributeId ea1 = AttributeId.uuid(0, 1); final AttributeId ea2 = AttributeId.uuid(0, 2); final List<AttributeId> allAttributes = Stream.of(ea1, ea2).collect(Collectors.toList()); // We set a l...
void function() throws Exception { final AttributeId ea1 = AttributeId.uuid(0, 1); final AttributeId ea2 = AttributeId.uuid(0, 2); final List<AttributeId> allAttributes = Stream.of(ea1, ea2).collect(Collectors.toList()); final TestContainerConfig containerConfig = new TestContainerConfig(); containerConfig.setSegmentMe...
/** * Test conditional updates for Extended Attributes when they are not loaded in memory (i.e., they will need to be * auto-fetched from the AttributeIndex so that the operation may succeed). */
Test conditional updates for Extended Attributes when they are not loaded in memory (i.e., they will need to be auto-fetched from the AttributeIndex so that the operation may succeed)
testExtendedAttributesConditionalUpdates
{ "repo_name": "pravega/pravega", "path": "segmentstore/server/src/test/java/io/pravega/segmentstore/server/containers/StreamSegmentContainerTests.java", "license": "apache-2.0", "size": 197112 }
[ "io.pravega.common.concurrent.Futures", "io.pravega.segmentstore.contracts.AttributeId", "io.pravega.segmentstore.contracts.AttributeUpdate", "io.pravega.segmentstore.contracts.AttributeUpdateCollection", "io.pravega.segmentstore.contracts.AttributeUpdateType", "io.pravega.segmentstore.contracts.Attribute...
import io.pravega.common.concurrent.Futures; import io.pravega.segmentstore.contracts.AttributeId; import io.pravega.segmentstore.contracts.AttributeUpdate; import io.pravega.segmentstore.contracts.AttributeUpdateCollection; import io.pravega.segmentstore.contracts.AttributeUpdateType; import io.pravega.segmentstore.co...
import io.pravega.common.concurrent.*; import io.pravega.segmentstore.contracts.*; import io.pravega.segmentstore.server.*; import io.pravega.segmentstore.server.logs.*; import io.pravega.test.common.*; import java.time.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import j...
[ "io.pravega.common", "io.pravega.segmentstore", "io.pravega.test", "java.time", "java.util", "org.junit" ]
io.pravega.common; io.pravega.segmentstore; io.pravega.test; java.time; java.util; org.junit;
807,596
private GridSqlCreateIndex parseCreateIndex(CreateIndex createIdx) { if (CREATE_INDEX_HASH.get(createIdx) || CREATE_INDEX_PRIMARY_KEY.get(createIdx) || CREATE_INDEX_UNIQUE.get(createIdx)) throw new IgniteSQLException("Only SPATIAL modifier is supported for CREATE INDEX", ...
GridSqlCreateIndex function(CreateIndex createIdx) { if (CREATE_INDEX_HASH.get(createIdx) CREATE_INDEX_PRIMARY_KEY.get(createIdx) CREATE_INDEX_UNIQUE.get(createIdx)) throw new IgniteSQLException(STR, IgniteQueryErrorCode.UNSUPPORTED_OPERATION); GridSqlCreateIndex res = new GridSqlCreateIndex(); Schema schema = SCHEMA_C...
/** * Parse {@code CREATE INDEX} statement. * * @param createIdx {@code CREATE INDEX} statement. * @see <a href="http://h2database.com/html/grammar.html#create_index">H2 {@code CREATE INDEX} spec.</a> */
Parse CREATE INDEX statement
parseCreateIndex
{ "repo_name": "a1vanov/ignite", "path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java", "license": "apache-2.0", "size": 55947 }
[ "java.util.LinkedHashMap", "org.apache.ignite.cache.QueryIndex", "org.apache.ignite.cache.QueryIndexType", "org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode", "org.apache.ignite.internal.processors.query.IgniteSQLException", "org.apache.ignite.internal.processors.query.h2.sql.GridSql...
import java.util.LinkedHashMap; import org.apache.ignite.cache.QueryIndex; import org.apache.ignite.cache.QueryIndexType; import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; import org.apache.ignite.internal.processors.query.IgniteSQLException; import org.apache.ignite.internal.processors.que...
import java.util.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.processors.query.h2.sql.*; import org.h2.command.ddl.*; import org.h2.result.*; import org.h2.schema.*; import org.h2....
[ "java.util", "org.apache.ignite", "org.h2.command", "org.h2.result", "org.h2.schema", "org.h2.table" ]
java.util; org.apache.ignite; org.h2.command; org.h2.result; org.h2.schema; org.h2.table;
1,663,726
public void setArray(Map<String, List<String>> array) { this.array = array; }
void function(Map<String, List<String>> array) { this.array = array; }
/** * Sets the arrays. * * @param array the arrays */
Sets the arrays
setArray
{ "repo_name": "balachandarsv/rivescript-java", "path": "rivescript-core/src/main/java/com/rivescript/ast/Begin.java", "license": "mit", "size": 5379 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
533,771
//------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF public static CalculationRequirements.Meta meta() { return CalculationRequirements.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(CalculationRequirements.Meta.INSTANCE); } CalculationRequirement...
static CalculationRequirements.Meta function() { return CalculationRequirements.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(CalculationRequirements.Meta.INSTANCE); } CalculationRequirements( Set<? extends ObservableId> observables, Set<? extends MarketDataId<?>> nonObservables, Set<? extends ObservableId> ...
/** * The meta-bean for {@code CalculationRequirements}. * @return the meta-bean, not null */
The meta-bean for CalculationRequirements
meta
{ "repo_name": "nssales/Strata", "path": "modules/engine/src/main/java/com/opengamma/strata/engine/marketdata/CalculationRequirements.java", "license": "apache-2.0", "size": 18065 }
[ "com.google.common.collect.ImmutableSet", "com.opengamma.strata.basics.currency.Currency", "com.opengamma.strata.basics.market.MarketDataId", "com.opengamma.strata.basics.market.ObservableId", "java.util.Set", "org.joda.beans.JodaBeanUtils" ]
import com.google.common.collect.ImmutableSet; import com.opengamma.strata.basics.currency.Currency; import com.opengamma.strata.basics.market.MarketDataId; import com.opengamma.strata.basics.market.ObservableId; import java.util.Set; import org.joda.beans.JodaBeanUtils;
import com.google.common.collect.*; import com.opengamma.strata.basics.currency.*; import com.opengamma.strata.basics.market.*; import java.util.*; import org.joda.beans.*;
[ "com.google.common", "com.opengamma.strata", "java.util", "org.joda.beans" ]
com.google.common; com.opengamma.strata; java.util; org.joda.beans;
461,836
public DateTimeZone timeZone() { return timeZone; }
DateTimeZone function() { return timeZone; }
/** * Gets the time zone to use for this aggregation */
Gets the time zone to use for this aggregation
timeZone
{ "repo_name": "qwerty4030/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/DateHistogramValuesSourceBuilder.java", "license": "apache-2.0", "size": 10437 }
[ "org.joda.time.DateTimeZone" ]
import org.joda.time.DateTimeZone;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,044,194
private void positionInvisibleNode(TNNode node, int x, int y) { Rectangle nodeBounds = new Rectangle(x, y, 0, 0); Map nodeAttributes = node.getAttributes(); GraphConstants.setBounds(nodeAttributes, nodeBounds); node.setX(x); node.setY(y); refreshGraph(); }
void function(TNNode node, int x, int y) { Rectangle nodeBounds = new Rectangle(x, y, 0, 0); Map nodeAttributes = node.getAttributes(); GraphConstants.setBounds(nodeAttributes, nodeBounds); node.setX(x); node.setY(y); refreshGraph(); }
/** * Positions the given invisible node. Subsequently, the graph will be * refreshed. An invisible node is characterized by the fact that its * width and height is 0. * @param node The invisible node. * @param x The new x coordinate. * @param y The new y coordinate. */
Positions the given invisible node. Subsequently, the graph will be refreshed. An invisible node is characterized by the fact that its width and height is 0
positionInvisibleNode
{ "repo_name": "elitak/peertrust", "path": "sandbox/TomcatPeerTrust/src/org/peertrust/demo/client/applet/TestSequenceDiagramm.java", "license": "gpl-2.0", "size": 27233 }
[ "java.awt.Rectangle", "java.util.Map", "org.jgraph.graph.GraphConstants", "org.peertrust.tnviz.app.TNNode" ]
import java.awt.Rectangle; import java.util.Map; import org.jgraph.graph.GraphConstants; import org.peertrust.tnviz.app.TNNode;
import java.awt.*; import java.util.*; import org.jgraph.graph.*; import org.peertrust.tnviz.app.*;
[ "java.awt", "java.util", "org.jgraph.graph", "org.peertrust.tnviz" ]
java.awt; java.util; org.jgraph.graph; org.peertrust.tnviz;
2,284,684
private void repairClicked(Button ignored) { MineColonies.getNetwork().sendToServer(new BuildRequestMessage(building, BuildRequestMessage.REPAIR)); }
void function(Button ignored) { MineColonies.getNetwork().sendToServer(new BuildRequestMessage(building, BuildRequestMessage.REPAIR)); }
/** * Action when repair button is clicked * * @param ignored Parameter is ignored, since some actions require a button. * This method does not */
Action when repair button is clicked
repairClicked
{ "repo_name": "MinecoloniesDevs/Minecolonies", "path": "src/main/java/com/minecolonies/client/gui/AbstractWindowSkeleton.java", "license": "gpl-3.0", "size": 4870 }
[ "com.blockout.controls.Button", "com.minecolonies.MineColonies", "com.minecolonies.network.messages.BuildRequestMessage" ]
import com.blockout.controls.Button; import com.minecolonies.MineColonies; import com.minecolonies.network.messages.BuildRequestMessage;
import com.blockout.controls.*; import com.minecolonies.*; import com.minecolonies.network.messages.*;
[ "com.blockout.controls", "com.minecolonies", "com.minecolonies.network" ]
com.blockout.controls; com.minecolonies; com.minecolonies.network;
2,662,046
public void assertHasSameSizeAs(AssertionInfo info, Map<?, ?> map, Map<?, ?> other) { assertNotNull(info, map); hasSameSizeAsCheck(info, map, other, map.size()); }
void function(AssertionInfo info, Map<?, ?> map, Map<?, ?> other) { assertNotNull(info, map); hasSameSizeAsCheck(info, map, other, map.size()); }
/** * Asserts that the size of the given {@code Map} is equal to the size of the other {@code Map}. * * @param info contains information about the assertion. * @param map the given {@code Map}. * @param other the other {@code Map} to compare * @throws NullPointerException if the other {@code Map} is {...
Asserts that the size of the given Map is equal to the size of the other Map
assertHasSameSizeAs
{ "repo_name": "joel-costigliola/assertj-core", "path": "src/main/java/org/assertj/core/internal/Maps.java", "license": "apache-2.0", "size": 40648 }
[ "java.util.Map", "org.assertj.core.api.AssertionInfo", "org.assertj.core.internal.CommonValidations" ]
import java.util.Map; import org.assertj.core.api.AssertionInfo; import org.assertj.core.internal.CommonValidations;
import java.util.*; import org.assertj.core.api.*; import org.assertj.core.internal.*;
[ "java.util", "org.assertj.core" ]
java.util; org.assertj.core;
2,511,397
public PerunBl getPerunBl() { return this.perunBl; }
PerunBl function() { return this.perunBl; }
/** * Gets the perunBl. * * @return The perunBl. */
Gets the perunBl
getPerunBl
{ "repo_name": "martin-kuba/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/blImpl/MembersManagerBlImpl.java", "license": "bsd-2-clause", "size": 152238 }
[ "cz.metacentrum.perun.core.bl.PerunBl" ]
import cz.metacentrum.perun.core.bl.PerunBl;
import cz.metacentrum.perun.core.bl.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
2,901,941
public PresenceSubscribeHandler getPresenceSubscribeHandler() { return (PresenceSubscribeHandler) modules.get(PresenceSubscribeHandler.class); }
PresenceSubscribeHandler function() { return (PresenceSubscribeHandler) modules.get(PresenceSubscribeHandler.class); }
/** * Returns the <code>PresenceSubscribeHandler</code> registered with this server. The * <code>PresenceSubscribeHandler</code> was registered with the server as a module while * starting up the server. * * @return the <code>PresenceSubscribeHandler</code> registered with this server. */
Returns the <code>PresenceSubscribeHandler</code> registered with this server. The <code>PresenceSubscribeHandler</code> was registered with the server as a module while starting up the server
getPresenceSubscribeHandler
{ "repo_name": "derek-wang/ca.rides.openfire", "path": "src/java/org/jivesoftware/openfire/XMPPServer.java", "license": "apache-2.0", "size": 56798 }
[ "org.jivesoftware.openfire.handler.PresenceSubscribeHandler" ]
import org.jivesoftware.openfire.handler.PresenceSubscribeHandler;
import org.jivesoftware.openfire.handler.*;
[ "org.jivesoftware.openfire" ]
org.jivesoftware.openfire;
2,323,789
public MatchResult match() { if (!matchSuccessful) { throw new IllegalStateException(); } return matcher.toMatchResult(); }
MatchResult function() { if (!matchSuccessful) { throw new IllegalStateException(); } return matcher.toMatchResult(); }
/** * Returns the result of the last matching operation. * <p> * The next* and find* methods return the match result in the case of a * successful match. * * @return the match result of the last successful match operation * @throws IllegalStateException * if the match...
Returns the result of the last matching operation. The next* and find* methods return the match result in the case of a successful match
match
{ "repo_name": "openweave/openweave-core", "path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/java/util/Scanner.java", "license": "apache-2.0", "size": 82276 }
[ "java.util.regex.MatchResult" ]
import java.util.regex.MatchResult;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,438,384
public CenterLeader save(CenterLeader researchLeader);
CenterLeader function(CenterLeader researchLeader);
/** * This method saves the information of the given research leader * * @param researchLeader - is the research leader object with the new information to be added/updated. * @return a number greater than 0 representing the new ID assigned by the database, 0 if the research leader was * upd...
This method saves the information of the given research leader
save
{ "repo_name": "CCAFS/MARLO", "path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/ICenterLeaderDAO.java", "license": "gpl-3.0", "size": 2644 }
[ "org.cgiar.ccafs.marlo.data.model.CenterLeader" ]
import org.cgiar.ccafs.marlo.data.model.CenterLeader;
import org.cgiar.ccafs.marlo.data.model.*;
[ "org.cgiar.ccafs" ]
org.cgiar.ccafs;
1,294,868
@RequestMapping(value = "/data/current-user", method = RequestMethod.POST, produces = "application/json", consumes = "application/json") @PreAuthorize(value = "hasRole('ROLE_USER')") public @ResponseBody Map<String, Object> currentUser(@RequestBody String data, Principal principal) throws Exception { try { ...
@RequestMapping(value = STR, method = RequestMethod.POST, produces = STR, consumes = STR) @PreAuthorize(value = STR) @ResponseBody Map<String, Object> function(@RequestBody String data, Principal principal) throws Exception { try { return JsonOutput.mapSingle(JsonOutput.readSasUser(principal).getUsername()); } catch (E...
/** * Current user. * * @param data the data * @param principal the principal * @return the map * @throws Exception the exception */
Current user
currentUser
{ "repo_name": "gleb619/webcam", "path": "src/main/java/org/test/webcam/controller/other/UtilsController.java", "license": "apache-2.0", "size": 6364 }
[ "java.security.Principal", "java.util.Map", "org.springframework.security.access.prepost.PreAuthorize", "org.springframework.web.bind.annotation.RequestBody", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.springframework.web.bind....
import java.security.Principal; import java.util.Map; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.sprin...
import java.security.*; import java.util.*; import org.springframework.security.access.prepost.*; import org.springframework.web.bind.annotation.*; import org.test.webcam.controller.data.types.*;
[ "java.security", "java.util", "org.springframework.security", "org.springframework.web", "org.test.webcam" ]
java.security; java.util; org.springframework.security; org.springframework.web; org.test.webcam;
1,745,010
public void init(int numPointclouds){ assert(numPointclouds > 0) : new IllegalArgumentException("Number of point-clouds must be bigger than 0."); this.numPc = numPointclouds; this.pointList = new ArrayList<SimpleMatrix>(numPc); }
void function(int numPointclouds){ assert(numPointclouds > 0) : new IllegalArgumentException(STR); this.numPc = numPointclouds; this.pointList = new ArrayList<SimpleMatrix>(numPc); }
/** * Initializes the object and initializes the point-cloud list. * @param numPointClouds Number of point-clouds used for this GPA run. */
Initializes the object and initializes the point-cloud list
init
{ "repo_name": "PhilippSchlieper/CONRAD", "path": "src/edu/stanford/rsl/conrad/geometry/shapes/activeshapemodels/GPA.java", "license": "gpl-3.0", "size": 19483 }
[ "edu.stanford.rsl.conrad.numerics.SimpleMatrix", "java.util.ArrayList" ]
import edu.stanford.rsl.conrad.numerics.SimpleMatrix; import java.util.ArrayList;
import edu.stanford.rsl.conrad.numerics.*; import java.util.*;
[ "edu.stanford.rsl", "java.util" ]
edu.stanford.rsl; java.util;
400,125
public static byte [][] split(final byte [] a, final byte [] b, final int num) { byte [] aPadded = null; byte [] bPadded = null; if (a.length < b.length) { aPadded = padTail(a,b.length-a.length); bPadded = b; } else if (b.length < a.length) { aPadded = a; bPadded = padTail(b,a....
static byte [][] function(final byte [] a, final byte [] b, final int num) { byte [] aPadded = null; byte [] bPadded = null; if (a.length < b.length) { aPadded = padTail(a,b.length-a.length); bPadded = b; } else if (b.length < a.length) { aPadded = a; bPadded = padTail(b,a.length-b.length); } else { aPadded = a; bPadde...
/** * Split passed range. Expensive operation relatively. Uses BigInteger math. * Useful splitting ranges for MapReduce jobs. * @param a Beginning of range * @param b End of range * @param num Number of times to split range. Pass 1 if you want to split * the range in two; i.e. one split. * @retu...
Split passed range. Expensive operation relatively. Uses BigInteger math. Useful splitting ranges for MapReduce jobs
split
{ "repo_name": "adragomir/hbaseindex", "path": "src/java/org/apache/hadoop/hbase/util/Bytes.java", "license": "apache-2.0", "size": 31033 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,554,790
return planboardMessageRepository.findOrderableFlexOffers().stream().filter(this::validateOffer).collect(Collectors.toList()); } /** * Update the flex orders in the planboard given. * * @param flexOrderSequence {@link Long} the flex order sequence number. * @param acknowledgementStatus the ...
return planboardMessageRepository.findOrderableFlexOffers().stream().filter(this::validateOffer).collect(Collectors.toList()); } /** * Update the flex orders in the planboard given. * * @param flexOrderSequence {@link Long} the flex order sequence number. * @param acknowledgementStatus the new {@link AcknowledgementSta...
/** * Find {@link PlanboardMessage} which have status ACCEPTED to know which offers needs to be processed. * * @return the {@link List} of {@link PlanboardMessage} of type {@link DocumentType#FLEX_OFFER} with status ACCEPTED. */
Find <code>PlanboardMessage</code> which have status ACCEPTED to know which offers needs to be processed
findOrderableFlexOffers
{ "repo_name": "USEF-Foundation/ri.usef.energy", "path": "usef-build/usef-workflow/usef-brp/src/main/java/energy/usef/brp/service/business/BrpPlanboardBusinessService.java", "license": "apache-2.0", "size": 5463 }
[ "energy.usef.core.model.AcknowledgementStatus", "java.util.stream.Collectors" ]
import energy.usef.core.model.AcknowledgementStatus; import java.util.stream.Collectors;
import energy.usef.core.model.*; import java.util.stream.*;
[ "energy.usef.core", "java.util" ]
energy.usef.core; java.util;
721,401
public boolean isGUIOpen(Class<? extends GuiScreen> gui) { return client.currentScreen != null && client.currentScreen.getClass().equals(gui); }
boolean function(Class<? extends GuiScreen> gui) { return client.currentScreen != null && client.currentScreen.getClass().equals(gui); }
/** * Is this GUI type open? * * @param gui The type of GUI to test for * @return if a GUI of this type is open */
Is this GUI type open
isGUIOpen
{ "repo_name": "CheeseL0ver/Ore-TTM", "path": "build/tmp/recompSrc/cpw/mods/fml/client/FMLClientHandler.java", "license": "lgpl-2.1", "size": 36709 }
[ "net.minecraft.client.gui.GuiScreen" ]
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.*;
[ "net.minecraft.client" ]
net.minecraft.client;
2,666,345
public static <T> void invokeOffEDT(final Supplier<T> runnable, final Consumer<T> consumer) { new SupplierLoggingSwingWorker<>(runnable, consumer).execute(); }
static <T> void function(final Supplier<T> runnable, final Consumer<T> consumer) { new SupplierLoggingSwingWorker<>(runnable, consumer).execute(); }
/** * Invokes something off the EDT, handling the result when its finished on the EDT, logging * any exceptions that occur. * * @param runnable Runnable to execute off the EDT * @param consumer Consumer to finalise the runnable on the EDT * * @param <T> Type the consumer takes ...
Invokes something off the EDT, handling the result when its finished on the EDT, logging any exceptions that occur
invokeOffEDT
{ "repo_name": "DMDirc/Plugins", "path": "ui_swing/src/main/java/com/dmdirc/addons/ui_swing/UIUtilities.java", "license": "mit", "size": 21673 }
[ "com.dmdirc.addons.ui_swing.components.SupplierLoggingSwingWorker", "java.util.function.Consumer", "java.util.function.Supplier" ]
import com.dmdirc.addons.ui_swing.components.SupplierLoggingSwingWorker; import java.util.function.Consumer; import java.util.function.Supplier;
import com.dmdirc.addons.ui_swing.components.*; import java.util.function.*;
[ "com.dmdirc.addons", "java.util" ]
com.dmdirc.addons; java.util;
2,779,177
private Lease getClientLease(Object o) { if (!(o instanceof Map.Entry)) return null; final Map.Entry e = (Map.Entry) o; final Object eValue = e.getValue(); if (!(e.getKey() instanceof ClientLeaseWrapper) || !(eValue instanceof Long) || (eValue == null)) { return null; } ...
Lease function(Object o) { if (!(o instanceof Map.Entry)) return null; final Map.Entry e = (Map.Entry) o; final Object eValue = e.getValue(); if (!(e.getKey() instanceof ClientLeaseWrapper) !(eValue instanceof Long) (eValue == null)) { return null; } final ClientLeaseWrapper clw = (ClientLeaseWrapper) e.getKey(); retur...
/** * If the passed object is a Map.Entry that is in the * ClientMapWrapper return the client lease associated with it, * otherwise return null */
If the passed object is a Map.Entry that is in the ClientMapWrapper return the client lease associated with it, otherwise return null
getClientLease
{ "repo_name": "cdegroot/river", "path": "src/com/sun/jini/norm/ClientLeaseMapWrapper.java", "license": "apache-2.0", "size": 14226 }
[ "java.util.Map", "net.jini.core.lease.Lease" ]
import java.util.Map; import net.jini.core.lease.Lease;
import java.util.*; import net.jini.core.lease.*;
[ "java.util", "net.jini.core" ]
java.util; net.jini.core;
676,245
private void handlePurgeProject(HttpServletRequest req, HttpServletResponse resp, Session session) throws ServletException, IOException { User user = session.getUser(); HashMap<String, Object> ret = new HashMap<String, Object>(); boolean isOperationSuccessful = true; try { Project p...
void function(HttpServletRequest req, HttpServletResponse resp, Session session) throws ServletException, IOException { User user = session.getUser(); HashMap<String, Object> ret = new HashMap<String, Object>(); boolean isOperationSuccessful = true; try { Project project = null; String projectParam = getParam(req, STR)...
/** * validate readiness of a project and user permission and use projectManager * to purge the project if things looks good **/
validate readiness of a project and user permission and use projectManager to purge the project if things looks good
handlePurgeProject
{ "repo_name": "mradamlacey/azkaban", "path": "azkaban-web-server/src/main/java/azkaban/webapp/servlet/ProjectManagerServlet.java", "license": "apache-2.0", "size": 64753 }
[ "java.io.IOException", "java.util.HashMap", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.commons.lang.StringUtils" ]
import java.io.IOException; import java.util.HashMap; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils;
import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.commons.lang.*;
[ "java.io", "java.util", "javax.servlet", "org.apache.commons" ]
java.io; java.util; javax.servlet; org.apache.commons;
1,992,703
private boolean isOutputInJson() { return config.jsonStreamMode == JsonStreamMode.OUT || config.jsonStreamMode == JsonStreamMode.BOTH; }
boolean function() { return config.jsonStreamMode == JsonStreamMode.OUT config.jsonStreamMode == JsonStreamMode.BOTH; }
/** * Returns whether output should be a JSON stream. */
Returns whether output should be a JSON stream
isOutputInJson
{ "repo_name": "lgeorgieff/closure-compiler", "path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java", "license": "apache-2.0", "size": 83284 }
[ "com.google.javascript.jscomp.CompilerOptions" ]
import com.google.javascript.jscomp.CompilerOptions;
import com.google.javascript.jscomp.*;
[ "com.google.javascript" ]
com.google.javascript;
1,857,884
int getLevel(final Bundle bundle) { final Long key = new Long(bundle.getBundleId()); Integer level = null; synchronized (bidFilters) { level = bidFilters.get(key); } // final PrintStream out = (null!=origOut) ? origOut : System.out; // out.println("LogConfigImpl.getLevel(" +key +"): " +...
int getLevel(final Bundle bundle) { final Long key = new Long(bundle.getBundleId()); Integer level = null; synchronized (bidFilters) { level = bidFilters.get(key); } return (level != null) ? level.intValue() : getFilter(); }
/** * Return the log filter level for the given bundle. */
Return the log filter level for the given bundle
getLevel
{ "repo_name": "knopflerfish/knopflerfish.org", "path": "osgi/bundles/log/src/org/knopflerfish/bundle/log/LogConfigImpl.java", "license": "bsd-3-clause", "size": 34078 }
[ "org.osgi.framework.Bundle" ]
import org.osgi.framework.Bundle;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
853,280
static void mergeNodeReferences(final JavaParserDTO toPopulate, final NodeNamesDTO nestedNodeNamesDTO, final MethodCallExpr evaluateNodeInitializer) { final NodeList<Expression> evaluateNodeReferences = evaluateNodeInitializer.getArguments(); final String expectedReference = String.format(PACKAGE_CL...
static void mergeNodeReferences(final JavaParserDTO toPopulate, final NodeNamesDTO nestedNodeNamesDTO, final MethodCallExpr evaluateNodeInitializer) { final NodeList<Expression> evaluateNodeReferences = evaluateNodeInitializer.getArguments(); final String expectedReference = String.format(PACKAGE_CLASS_TEMPLATE, toPopu...
/** * Adjust the <b>evaluateNode(?)</b> references to the ones declared in the given * <code>JavaParserDTO.nodeTemplate</code> * * @param toPopulate * @param nestedNodeNamesDTO * @param evaluateNodeInitializer */
Adjust the evaluateNode(?) references to the ones declared in the given <code>JavaParserDTO.nodeTemplate</code>
mergeNodeReferences
{ "repo_name": "mbiarnes/drools", "path": "kie-pmml-trusty/kie-pmml-models/kie-pmml-models-tree/kie-pmml-models-tree-compiler/src/main/java/org/kie/pmml/models/tree/compiler/factories/KiePMMLNodeFactory.java", "license": "apache-2.0", "size": 30182 }
[ "com.github.javaparser.ast.NodeList", "com.github.javaparser.ast.expr.Expression", "com.github.javaparser.ast.expr.MethodCallExpr", "com.github.javaparser.ast.expr.MethodReferenceExpr", "com.github.javaparser.ast.expr.NameExpr", "java.util.Optional", "org.kie.pmml.api.exceptions.KiePMMLException" ]
import com.github.javaparser.ast.NodeList; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.expr.MethodCallExpr; import com.github.javaparser.ast.expr.MethodReferenceExpr; import com.github.javaparser.ast.expr.NameExpr; import java.util.Optional; import org.kie.pmml.api.exceptions.KieP...
import com.github.javaparser.ast.*; import com.github.javaparser.ast.expr.*; import java.util.*; import org.kie.pmml.api.exceptions.*;
[ "com.github.javaparser", "java.util", "org.kie.pmml" ]
com.github.javaparser; java.util; org.kie.pmml;
1,187,442
void addOfflineSegment(String offlineTableName, String segmentName, File indexDir) throws Exception;
void addOfflineSegment(String offlineTableName, String segmentName, File indexDir) throws Exception;
/** * Adds a segment from local disk into an OFFLINE table. */
Adds a segment from local disk into an OFFLINE table
addOfflineSegment
{ "repo_name": "linkedin/pinot", "path": "pinot-core/src/main/java/org/apache/pinot/core/data/manager/InstanceDataManager.java", "license": "apache-2.0", "size": 4055 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,843,335
public static boolean writeFile(String filePath, InputStream is) { return writeFile(filePath, is, false); }
static boolean function(String filePath, InputStream is) { return writeFile(filePath, is, false); }
/** * Write file * * @param filePath * @param is * @return */
Write file
writeFile
{ "repo_name": "umeitime/common", "path": "common-library/src/main/java/com/umeitime/common/tools/FileUtils.java", "license": "epl-1.0", "size": 11414 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,631,367
private static List<Response> getResponses() { final RpcMetadataResponse rpcMetadata = new RpcMetadataResponse("localhost:8765"); LinkedList<Response> responses = new LinkedList<>(); // Nested classes (Signature, ColumnMetaData, CursorFactory, etc) are implicitly getting tested) // Stub out the meta...
static List<Response> function() { final RpcMetadataResponse rpcMetadata = new RpcMetadataResponse(STR); LinkedList<Response> responses = new LinkedList<>(); ScalarType arrayComponentType = ColumnMetaData.scalar(Types.INTEGER, STR, Rep.INTEGER); ColumnMetaData arrayColumnMetaData = getArrayColumnMetaData(arrayComponent...
/** * Generates a collection of Responses whose serialization will be tested. */
Generates a collection of Responses whose serialization will be tested
getResponses
{ "repo_name": "yeongwei/incubator-calcite", "path": "avatica/core/src/test/java/org/apache/calcite/avatica/remote/ProtobufTranslationImplTest.java", "license": "apache-2.0", "size": 16179 }
[ "java.io.PrintWriter", "java.io.StringWriter", "java.sql.Types", "java.util.ArrayList", "java.util.Arrays", "java.util.Collections", "java.util.HashMap", "java.util.LinkedList", "java.util.List", "java.util.Map", "org.apache.calcite.avatica.AvaticaParameter", "org.apache.calcite.avatica.Avatic...
import java.io.PrintWriter; import java.io.StringWriter; import java.sql.Types; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.apache.calcite.avatica.AvaticaParameter; impor...
import java.io.*; import java.sql.*; import java.util.*; import org.apache.calcite.avatica.*; import org.apache.calcite.avatica.remote.*;
[ "java.io", "java.sql", "java.util", "org.apache.calcite" ]
java.io; java.sql; java.util; org.apache.calcite;
2,776,680
public static MozuClient<com.mozu.api.contracts.core.BehaviorCollection> getBehaviorsClient() throws Exception { return getBehaviorsClient( null, null); }
static MozuClient<com.mozu.api.contracts.core.BehaviorCollection> function() throws Exception { return getBehaviorsClient( null, null); }
/** * Retrieves a list of application behaviors. * <p><pre><code> * MozuClient<com.mozu.api.contracts.core.BehaviorCollection> mozuClient=GetBehaviorsClient(); * client.setBaseAddress(url); * client.executeRequest(); * BehaviorCollection behaviorCollection = client.Result(); * </code></pre></p> * @retur...
Retrieves a list of application behaviors. <code><code> MozuClient mozuClient=GetBehaviorsClient(); client.setBaseAddress(url); client.executeRequest(); BehaviorCollection behaviorCollection = client.Result(); </code></code>
getBehaviorsClient
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/platform/ReferenceDataClient.java", "license": "mit", "size": 27055 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
1,798,285
public void setExceptionSegments(List exceptionSegments) { this.exceptionSegments = exceptionSegments; }
void function(List exceptionSegments) { this.exceptionSegments = exceptionSegments; }
/** * Sets the exception segments list. * * @param exceptionSegments the exception segments. */
Sets the exception segments list
setExceptionSegments
{ "repo_name": "sangohan/gwt-chronoscope", "path": "chronoscope-api/src/main/java/org/timepedia/chronoscope/client/axis/SegmentedTimeline.java", "license": "lgpl-2.1", "size": 61344 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,696,092
public void testReadPersistingAsString() { performWrite(); TimeZone.setDefault(TimeZone.getTimeZone("GMT+0")); PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); SqlTimeHolder h...
void function() { performWrite(); TimeZone.setDefault(TimeZone.getTimeZone("GMT+0")); PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); SqlTimeHolder holder = (SqlTimeHolder)pm.getObjectById(SqlTimeHolder.class, generateValue(STR)); assertEquals(generateVal...
/** * Test retrieval of Time field as String. */
Test retrieval of Time field as String
testReadPersistingAsString
{ "repo_name": "hopecee/texsts", "path": "jdo/general/src/test/org/datanucleus/tests/types/SqlTimeTest.java", "license": "apache-2.0", "size": 8479 }
[ "java.util.TimeZone", "javax.jdo.PersistenceManager", "javax.jdo.Transaction", "org.jpox.samples.types.sqltime.SqlTimeHolder" ]
import java.util.TimeZone; import javax.jdo.PersistenceManager; import javax.jdo.Transaction; import org.jpox.samples.types.sqltime.SqlTimeHolder;
import java.util.*; import javax.jdo.*; import org.jpox.samples.types.sqltime.*;
[ "java.util", "javax.jdo", "org.jpox.samples" ]
java.util; javax.jdo; org.jpox.samples;
530,435
@ApiModelProperty(example = "null", value = "") public String getType() { return type; }
@ApiModelProperty(example = "null", value = "") String function() { return type; }
/** * Get type * @return type **/
Get type
getType
{ "repo_name": "Metatavu/kunta-api-spec", "path": "java-client-generated/src/main/java/fi/metatavu/kuntaapi/client/model/Service.java", "license": "agpl-3.0", "size": 24169 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,937,671
public static String[] getItemIdentifiers( List<DimensionItem> items ) { List<String> itemUids = new ArrayList<>(); if ( items != null && !items.isEmpty() ) { for ( DimensionItem item : items ) { itemUids.add( item != null ? item.getItem()...
static String[] function( List<DimensionItem> items ) { List<String> itemUids = new ArrayList<>(); if ( items != null && !items.isEmpty() ) { for ( DimensionItem item : items ) { itemUids.add( item != null ? item.getItem().getUid() : null ); } } return itemUids.toArray( CollectionUtils.STRING_ARR ); }
/** * Returns an array of identifiers of the dimension items in the given list. * If no items are given or items are null, an empty array is returned. */
Returns an array of identifiers of the dimension items in the given list. If no items are given or items are null, an empty array is returned
getItemIdentifiers
{ "repo_name": "steffeli/inf5750-tracker-capture", "path": "dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DimensionItem.java", "license": "bsd-3-clause", "size": 7215 }
[ "java.util.ArrayList", "java.util.List", "org.hisp.dhis.commons.collection.CollectionUtils" ]
import java.util.ArrayList; import java.util.List; import org.hisp.dhis.commons.collection.CollectionUtils;
import java.util.*; import org.hisp.dhis.commons.collection.*;
[ "java.util", "org.hisp.dhis" ]
java.util; org.hisp.dhis;
2,447,488
public void changeLocale(Locale locale) { LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(this.request); if (localeResolver == null) { throw new IllegalStateException("Cannot change locale if no LocaleResolver configured"); } localeResolver.setLocale(this.request, this.response, loca...
void function(Locale locale) { LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(this.request); if (localeResolver == null) { throw new IllegalStateException(STR); } localeResolver.setLocale(this.request, this.response, locale); this.locale = locale; }
/** * Change the current locale to the specified one, * storing the new locale through the configured {@link LocaleResolver}. * @param locale the new locale * @see LocaleResolver#setLocale * @see #changeLocale(java.util.Locale, java.util.TimeZone) */
Change the current locale to the specified one, storing the new locale through the configured <code>LocaleResolver</code>
changeLocale
{ "repo_name": "QBNemo/spring-mvc-showcase", "path": "src/main/java/org/springframework/web/servlet/support/RequestContext.java", "license": "apache-2.0", "size": 38194 }
[ "java.util.Locale", "org.springframework.web.servlet.LocaleResolver" ]
import java.util.Locale; import org.springframework.web.servlet.LocaleResolver;
import java.util.*; import org.springframework.web.servlet.*;
[ "java.util", "org.springframework.web" ]
java.util; org.springframework.web;
2,708,234
protected DbDialect getDialect() { return _dbConnector.getDialect(); }
DbDialect function() { return _dbConnector.getDialect(); }
/** * Gets the database dialect. * * @return the dialect */
Gets the database dialect
getDialect
{ "repo_name": "McLeodMoores/starling", "path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/HibernateSecurityMasterDetailProvider.java", "license": "apache-2.0", "size": 18888 }
[ "com.opengamma.util.db.DbDialect" ]
import com.opengamma.util.db.DbDialect;
import com.opengamma.util.db.*;
[ "com.opengamma.util" ]
com.opengamma.util;
380,253
@Test public void byteBufferHandleSet() { Assume.assumeTrue(JavaVersionUtil.JAVA_SPEC >= 16); ByteBuffer byteBuffer = ByteBuffer.allocate(42).order(ByteOrder.nativeOrder()).putInt(0, 42); testCommon(new VarHandleTestNode(false, true), "byteArrayHandleSetInt", byteBuffer, 0, 42); }
void function() { Assume.assumeTrue(JavaVersionUtil.JAVA_SPEC >= 16); ByteBuffer byteBuffer = ByteBuffer.allocate(42).order(ByteOrder.nativeOrder()).putInt(0, 42); testCommon(new VarHandleTestNode(false, true), STR, byteBuffer, 0, 42); }
/** * Tests partial evaluation of a byte buffer view {@link VarHandle#set}. */
Tests partial evaluation of a byte buffer view <code>VarHandle#set</code>
byteBufferHandleSet
{ "repo_name": "smarr/Truffle", "path": "compiler/src/org.graalvm.compiler.truffle.test/src/org/graalvm/compiler/truffle/test/VarHandlePartialEvaluationTest.java", "license": "gpl-2.0", "size": 5103 }
[ "java.nio.ByteBuffer", "java.nio.ByteOrder", "org.graalvm.compiler.serviceprovider.JavaVersionUtil", "org.junit.Assume" ]
import java.nio.ByteBuffer; import java.nio.ByteOrder; import org.graalvm.compiler.serviceprovider.JavaVersionUtil; import org.junit.Assume;
import java.nio.*; import org.graalvm.compiler.serviceprovider.*; import org.junit.*;
[ "java.nio", "org.graalvm.compiler", "org.junit" ]
java.nio; org.graalvm.compiler; org.junit;
940,103
public Map<String, String> getPreviewFormatter() { Transformer transformer = new Transformer() {
Map<String, String> function() { Transformer transformer = new Transformer() {
/** * JSP EL accessor method for retrieving the preview formatters.<p> * * @return a lazy map for accessing preview formatters */
JSP EL accessor method for retrieving the preview formatters
getPreviewFormatter
{ "repo_name": "mediaworx/opencms-core", "path": "src/org/opencms/jsp/util/CmsJspStandardContextBean.java", "license": "lgpl-2.1", "size": 47397 }
[ "java.util.Map", "org.apache.commons.collections.Transformer" ]
import java.util.Map; import org.apache.commons.collections.Transformer;
import java.util.*; import org.apache.commons.collections.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,790,752
public void showSuccessDialog() { messages.reset(); cardManager.makeVisible(successPanel); } private final class SuccessPanel extends WContainer { private SuccessPanel() { add(new WMessageBox(WMessageBox.SUCCESS, "Everything is valid!"));
void function() { messages.reset(); cardManager.makeVisible(successPanel); } private final class SuccessPanel extends WContainer { private SuccessPanel() { add(new WMessageBox(WMessageBox.SUCCESS, STR));
/** * Displays the success dialog. */
Displays the success dialog
showSuccessDialog
{ "repo_name": "Joshua-Barclay/wcomponents", "path": "wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/validation/ValidationContainer.java", "license": "gpl-3.0", "size": 4642 }
[ "com.github.bordertech.wcomponents.WContainer", "com.github.bordertech.wcomponents.WMessageBox" ]
import com.github.bordertech.wcomponents.WContainer; import com.github.bordertech.wcomponents.WMessageBox;
import com.github.bordertech.wcomponents.*;
[ "com.github.bordertech" ]
com.github.bordertech;
1,769,468
// -- jmx/management methods-- @Override public void pause() throws AxisFault { if (state != BaseConstants.STARTED) return; try { for (JMSEndpoint endpoint : getEndpoints()) { endpoint.getServiceTaskManager().pause(); } state = BaseConstan...
void function() throws AxisFault { if (state != BaseConstants.STARTED) return; try { for (JMSEndpoint endpoint : getEndpoints()) { endpoint.getServiceTaskManager().pause(); } state = BaseConstants.PAUSED; log.info(STR); } catch (AxisJMSException e) { log.error(STR, e); } }
/** * Pause the listener - Stop accepting/processing new messages, but continues processing existing * messages until they complete. This helps bring an instance into a maintenence mode * @throws AxisFault on error */
Pause the listener - Stop accepting/processing new messages, but continues processing existing messages until they complete. This helps bring an instance into a maintenence mode
pause
{ "repo_name": "maheeka/wso2-axis2-transports", "path": "modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSListener.java", "license": "apache-2.0", "size": 12285 }
[ "org.apache.axis2.AxisFault", "org.apache.axis2.transport.base.BaseConstants" ]
import org.apache.axis2.AxisFault; import org.apache.axis2.transport.base.BaseConstants;
import org.apache.axis2.*; import org.apache.axis2.transport.base.*;
[ "org.apache.axis2" ]
org.apache.axis2;
639,969
public void apply(WriteStream out, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { }
void function(WriteStream out, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { }
/** * Executes the SSI statement. * * @param out the output stream * @param request the servlet request * @param response the servlet response */
Executes the SSI statement
apply
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/servlets/ssi/ElseStatement.java", "license": "gpl-2.0", "size": 1875 }
[ "com.caucho.vfs.WriteStream", "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import com.caucho.vfs.WriteStream; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import com.caucho.vfs.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "com.caucho.vfs", "java.io", "javax.servlet" ]
com.caucho.vfs; java.io; javax.servlet;
1,575,671
public void unreserve(SchedulerRequestKey schedulerKey, FSSchedulerNode node) { RMContainer rmContainer = node.getReservedContainer(); unreserveInternal(schedulerKey, node); node.unreserveResource(this); clearReservation(node); getMetrics().unreserveResource( getUser(), rmContainer.g...
void function(SchedulerRequestKey schedulerKey, FSSchedulerNode node) { RMContainer rmContainer = node.getReservedContainer(); unreserveInternal(schedulerKey, node); node.unreserveResource(this); clearReservation(node); getMetrics().unreserveResource( getUser(), rmContainer.getContainer().getResource()); }
/** * Remove the reservation on {@code node} at the given SchedulerRequestKey. * This dispatches SchedulerNode handlers as well. * @param schedulerKey Scheduler Key * @param node Node */
Remove the reservation on node at the given SchedulerRequestKey. This dispatches SchedulerNode handlers as well
unreserve
{ "repo_name": "WIgor/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java", "license": "apache-2.0", "size": 49720 }
[ "org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer", "org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey" ]
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer; import org.apache.hadoop.yarn.server.scheduler.SchedulerRequestKey;
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.*; import org.apache.hadoop.yarn.server.scheduler.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
709,120
public static void mergeFrom(Message.Builder builder, byte[] b) throws IOException { final CodedInputStream codedInput = CodedInputStream.newInstance(b); codedInput.setSizeLimit(b.length); builder.mergeFrom(codedInput); codedInput.checkLastTagWas(0); }
static void function(Message.Builder builder, byte[] b) throws IOException { final CodedInputStream codedInput = CodedInputStream.newInstance(b); codedInput.setSizeLimit(b.length); builder.mergeFrom(codedInput); codedInput.checkLastTagWas(0); }
/** * This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding * buffers when working with byte arrays * @param builder current message builder * @param b byte array * @throws IOException */
This version of protobuf's mergeFrom avoids the hard-coded 64MB limit for decoding buffers when working with byte arrays
mergeFrom
{ "repo_name": "ultratendency/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java", "license": "apache-2.0", "size": 132790 }
[ "java.io.IOException", "org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream", "org.apache.hbase.thirdparty.com.google.protobuf.Message" ]
import java.io.IOException; import org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream; import org.apache.hbase.thirdparty.com.google.protobuf.Message;
import java.io.*; import org.apache.hbase.thirdparty.com.google.protobuf.*;
[ "java.io", "org.apache.hbase" ]
java.io; org.apache.hbase;
2,562,124