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
void remove() { Node parent = assignNode.getParent(); if (mayHaveSecondarySideEffects) { Node replacement = assignNode.getLastChild().detachFromParent(); // Aggregate any expressions in GETELEMs. for (Node current = assignNode.getFirstChild(); !current.isName(); ...
void remove() { Node parent = assignNode.getParent(); if (mayHaveSecondarySideEffects) { Node replacement = assignNode.getLastChild().detachFromParent(); for (Node current = assignNode.getFirstChild(); !current.isName(); current = current.getFirstChild()) { if (current.isGetElem()) { replacement = IR.comma( current.get...
/** * Replace the current assign with its right hand side. */
Replace the current assign with its right hand side
remove
{ "repo_name": "dushmis/closure-compiler", "path": "src/com/google/javascript/jscomp/RemoveUnusedVars.java", "license": "apache-2.0", "size": 34873 }
[ "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,389,853
protected boolean loadConfig() { try { if (!getDataFolder().exists()) getDataFolder().mkdirs(); getConfig().load(new File(getDataFolder(), "config.yml")); } catch (FileNotFoundException e) { logInfo("No config file found. Creating a default configuration file: " + getPluginName(...
boolean function() { try { if (!getDataFolder().exists()) getDataFolder().mkdirs(); getConfig().load(new File(getDataFolder(), STR)); } catch (FileNotFoundException e) { logInfo(STR + getPluginName() + STR); return this.saveDefaultConfiguration(); } catch (IOException e) { logSevere(STR + getPluginName() + STR); if (de...
/** * Load our default config.yml, or alternatively, create and load the default one. * @return */
Load our default config.yml, or alternatively, create and load the default one
loadConfig
{ "repo_name": "cppchriscpp/ChangeSilkTouch", "path": "net/cpprograms/minecraft/General/PluginBase.java", "license": "bsd-2-clause", "size": 6573 }
[ "java.io.File", "java.io.FileNotFoundException", "java.io.IOException", "org.bukkit.configuration.InvalidConfigurationException" ]
import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import org.bukkit.configuration.InvalidConfigurationException;
import java.io.*; import org.bukkit.configuration.*;
[ "java.io", "org.bukkit.configuration" ]
java.io; org.bukkit.configuration;
519,201
private Uri populateMayorImageFromNetwork() { User user = mCheckinResult.getMayor().getUser(); ImageView ivMayor = (ImageView)findViewById(R.id.imageViewCheckinMayor); if (user != null) { Uri photoUri = Uri.parse(user.getPhoto()); try { ...
Uri function() { User user = mCheckinResult.getMayor().getUser(); ImageView ivMayor = (ImageView)findViewById(R.id.imageViewCheckinMayor); if (user != null) { Uri photoUri = Uri.parse(user.getPhoto()); try { Bitmap bitmap = BitmapFactory.decodeStream( mApplication.getRemoteResourceManager().getInputStream(photoUri)); i...
/** * If we have to download the user's photo from the net (wasn't already in cache) * will return the uri to launch. */
If we have to download the user's photo from the net (wasn't already in cache) will return the uri to launch
populateMayorImageFromNetwork
{ "repo_name": "loganj/foursquared", "path": "main/src/com/joelapenna/foursquared/CheckinResultDialog.java", "license": "apache-2.0", "size": 14992 }
[ "android.graphics.Bitmap", "android.graphics.BitmapFactory", "android.net.Uri", "android.widget.ImageView", "com.joelapenna.foursquare.Foursquare", "com.joelapenna.foursquare.types.User", "java.io.IOException" ]
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.widget.ImageView; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.types.User; import java.io.IOException;
import android.graphics.*; import android.net.*; import android.widget.*; import com.joelapenna.foursquare.*; import com.joelapenna.foursquare.types.*; import java.io.*;
[ "android.graphics", "android.net", "android.widget", "com.joelapenna.foursquare", "java.io" ]
android.graphics; android.net; android.widget; com.joelapenna.foursquare; java.io;
1,089,409
public static interface PacketHandler{ PacketInstance Handle(MCPlayer player, PacketInstance packet); }
static interface PacketHandler{ PacketInstance function(MCPlayer player, PacketInstance packet); }
/** * The packet to be processed/sent is passed to this method, and it is expected * that this method returns a packet (which is actually going to be sent) or * null, which cancels the packet send entirely. * @param player The player sending/recieving the packet * @param packet The packet in question ...
The packet to be processed/sent is passed to this method, and it is expected that this method returns a packet (which is actually going to be sent) or null, which cancels the packet send entirely
Handle
{ "repo_name": "Murreey/CommandHelper", "path": "src/main/java/com/laytonsmith/core/packetjumper/PacketJumper.java", "license": "gpl-3.0", "size": 4382 }
[ "com.laytonsmith.abstraction.MCPlayer" ]
import com.laytonsmith.abstraction.MCPlayer;
import com.laytonsmith.abstraction.*;
[ "com.laytonsmith.abstraction" ]
com.laytonsmith.abstraction;
624,987
private boolean hasViewPermission(final Nature nature) { switch (nature) { case GENERAL: return permissionService.permission() .admin(AdminMemberPermission.REFERENCES_VIEW) .member(MemberPermission.REFERENCES_VIEW) // Brokers are al...
boolean function(final Nature nature) { switch (nature) { case GENERAL: return permissionService.permission() .admin(AdminMemberPermission.REFERENCES_VIEW) .member(MemberPermission.REFERENCES_VIEW) .operator(OperatorPermission.REFERENCES_VIEW).hasPermission(); case TRANSACTION: return permissionService.permission() .ad...
/** * Returns true if the logged user has the corresponding permissions to view the general reference or the transaction fee. * @param nature The reference nature * @return */
Returns true if the logged user has the corresponding permissions to view the general reference or the transaction fee
hasViewPermission
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/services/elements/ReferenceServiceSecurity.java", "license": "gpl-2.0", "size": 8953 }
[ "nl.strohalm.cyclos.access.AdminMemberPermission", "nl.strohalm.cyclos.access.MemberPermission", "nl.strohalm.cyclos.access.OperatorPermission", "nl.strohalm.cyclos.entities.members.Reference" ]
import nl.strohalm.cyclos.access.AdminMemberPermission; import nl.strohalm.cyclos.access.MemberPermission; import nl.strohalm.cyclos.access.OperatorPermission; import nl.strohalm.cyclos.entities.members.Reference;
import nl.strohalm.cyclos.access.*; import nl.strohalm.cyclos.entities.members.*;
[ "nl.strohalm.cyclos" ]
nl.strohalm.cyclos;
959,525
@Override public void render(Graphics g) { g.traceShape((Polygon) shape.rotateTo(getBounds().getRotation())); }
void function(Graphics g) { g.traceShape((Polygon) shape.rotateTo(getBounds().getRotation())); }
/** * Renders the shaped entity. */
Renders the shaped entity
render
{ "repo_name": "pta2002/Mercury", "path": "Project/src/com/radirius/mercury/scene/ShapedEntity.java", "license": "mit", "size": 889 }
[ "com.radirius.mercury.graphics.Graphics", "com.radirius.mercury.math.geometry.Polygon" ]
import com.radirius.mercury.graphics.Graphics; import com.radirius.mercury.math.geometry.Polygon;
import com.radirius.mercury.graphics.*; import com.radirius.mercury.math.geometry.*;
[ "com.radirius.mercury" ]
com.radirius.mercury;
2,624,429
public Stack<Expression> getParentStack() { Stack<Expression> stack = new Stack<>(); Expression prev = this.parent; while (prev != null) { stack.push(prev); prev = prev.getParent(); } return stack; }
Stack<Expression> function() { Stack<Expression> stack = new Stack<>(); Expression prev = this.parent; while (prev != null) { stack.push(prev); prev = prev.getParent(); } return stack; }
/** * Returns stack of all ancestors with root placed on the top of the stack. * Stack does not contain expression for which the method was called. * @return stack of all ancestors */
Returns stack of all ancestors with root placed on the top of the stack. Stack does not contain expression for which the method was called
getParentStack
{ "repo_name": "dprokopo/pi-visualizer", "path": "pi-visualizer/src/main/java/cz/vutbr/fit/xproko26/pivis/model/expressions/Expression.java", "license": "apache-2.0", "size": 5983 }
[ "java.util.Stack" ]
import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
996,395
public GraphQLInputObjectType transform(Consumer<Builder> builderConsumer) { Builder builder = newInputObject(this); builderConsumer.accept(builder); return builder.build(); }
GraphQLInputObjectType function(Consumer<Builder> builderConsumer) { Builder builder = newInputObject(this); builderConsumer.accept(builder); return builder.build(); }
/** * This helps you transform the current GraphQLInputObjectType into another one by starting a builder with all * the current values and allows you to transform it how you want. * * @param builderConsumer the consumer code that will be given a builder to transform * * @return a new objec...
This helps you transform the current GraphQLInputObjectType into another one by starting a builder with all the current values and allows you to transform it how you want
transform
{ "repo_name": "graphql-java/graphql-java", "path": "src/main/java/graphql/schema/GraphQLInputObjectType.java", "license": "mit", "size": 12692 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
463,305
protected Processor makeProcessor(RouteContext routeContext) throws Exception { Processor processor = null; // allow any custom logic before we create the processor preCreateProcessor(); // resolve properties before we create the processor ProcessorDefinitionHelper.resolveP...
Processor function(RouteContext routeContext) throws Exception { Processor processor = null; preCreateProcessor(); ProcessorDefinitionHelper.resolvePropertyPlaceholders(routeContext, this); ProcessorDefinitionHelper.resolveKnownConstantFields(this); ProcessorDefinition<?> me = (ProcessorDefinition<?>) this; if (me inst...
/** * Creates the processor and wraps it in any necessary interceptors and error handlers */
Creates the processor and wraps it in any necessary interceptors and error handlers
makeProcessor
{ "repo_name": "logzio/camel", "path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java", "license": "apache-2.0", "size": 139893 }
[ "org.apache.camel.Processor", "org.apache.camel.model.language.ExpressionDefinition", "org.apache.camel.spi.RouteContext" ]
import org.apache.camel.Processor; import org.apache.camel.model.language.ExpressionDefinition; import org.apache.camel.spi.RouteContext;
import org.apache.camel.*; import org.apache.camel.model.language.*; import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
841,204
public List getUsers(User user);
List function(User user);
/** * Retrieves a list of users, filtering with parameters on a user object * @param user parameters to filter on * @return List */
Retrieves a list of users, filtering with parameters on a user object
getUsers
{ "repo_name": "buptwufengjiao/J2EEApp", "path": "src/service/org/appfuse/service/UserManager.java", "license": "apache-2.0", "size": 2177 }
[ "java.util.List", "org.appfuse.model.User" ]
import java.util.List; import org.appfuse.model.User;
import java.util.*; import org.appfuse.model.*;
[ "java.util", "org.appfuse.model" ]
java.util; org.appfuse.model;
2,852,600
public void setStructuredContentFields(@Nullable Map<String, StructuredContentField> structuredContentFields);
void function(@Nullable Map<String, StructuredContentField> structuredContentFields);
/** * Sets the structured content fields for this item. Would not typically called * outside of the ContentManagementSystem. * * @param structuredContentFields */
Sets the structured content fields for this item. Would not typically called outside of the ContentManagementSystem
setStructuredContentFields
{ "repo_name": "passion1014/metaworks_framework", "path": "admin/broadleaf-contentmanagement-module/src/main/java/org/broadleafcommerce/cms/structure/domain/StructuredContent.java", "license": "apache-2.0", "size": 7331 }
[ "java.util.Map", "javax.annotation.Nullable" ]
import java.util.Map; import javax.annotation.Nullable;
import java.util.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
1,714,258
private static long getFileSize(String path) { final File file = new File(path); return file.exists() ? file.length() : 0; } /** * Look up the identifier property for the given class. * @param className a class name * @return the identifier property, never {@code null}
static long function(String path) { final File file = new File(path); return file.exists() ? file.length() : 0; } /** * Look up the identifier property for the given class. * @param className a class name * @return the identifier property, never {@code null}
/** * Get the size of the file at the given path, or {@code 0} if it does not exist. * @param path a file path * @return the file's size, or {@code 0} if the file does not exist */
Get the size of the file at the given path, or 0 if it does not exist
getFileSize
{ "repo_name": "knabar/openmicroscopy", "path": "components/blitz/src/omero/cmd/graphs/DiskUsageI.java", "license": "gpl-2.0", "size": 28462 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,352,544
private ProjectionAnnotation findAnnotation(int line, boolean exact) { ProjectionAnnotation previousAnnotation= null; IAnnotationModel model= getModel(); if (model != null) { IDocument document= getCachedTextViewer().getDocument(); int previousDistance= Integer.MAX_VALUE; Iterator<?> e= ...
ProjectionAnnotation function(int line, boolean exact) { ProjectionAnnotation previousAnnotation= null; IAnnotationModel model= getModel(); if (model != null) { IDocument document= getCachedTextViewer().getDocument(); int previousDistance= Integer.MAX_VALUE; Iterator<?> e= model.getAnnotationIterator(); while (e.hasNex...
/** * Returns the projection annotation of the column's annotation * model that contains the given line. * * @param line the line * @param exact <code>true</code> if the annotation range must match exactly * @return the projection annotation containing the given line */
Returns the projection annotation of the column's annotation model that contains the given line
findAnnotation
{ "repo_name": "ckaestne/LEADT", "path": "CIDE_Language_JDT/src/de/ovgu/cide/language/jdt/editor/inlineprojection/InlineProjectionRulerColumn.java", "license": "gpl-3.0", "size": 7507 }
[ "java.util.Iterator", "org.eclipse.jface.text.IDocument", "org.eclipse.jface.text.Position", "org.eclipse.jface.text.source.IAnnotationModel", "org.eclipse.jface.text.source.projection.ProjectionAnnotation" ]
import java.util.Iterator; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.Position; import org.eclipse.jface.text.source.IAnnotationModel; import org.eclipse.jface.text.source.projection.ProjectionAnnotation;
import java.util.*; import org.eclipse.jface.text.*; import org.eclipse.jface.text.source.*; import org.eclipse.jface.text.source.projection.*;
[ "java.util", "org.eclipse.jface" ]
java.util; org.eclipse.jface;
1,236,231
public List<AzureReachabilityReportLatencyInfo> latencies() { return this.latencies; }
List<AzureReachabilityReportLatencyInfo> function() { return this.latencies; }
/** * Get list of latency details for each of the time series. * * @return the latencies value */
Get list of latency details for each of the time series
latencies
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/AzureReachabilityReportItem.java", "license": "mit", "size": 2481 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,135,603
public TagLibraryValidator getTagLibraryValidator() { return tagLibraryValidator; }
TagLibraryValidator function() { return tagLibraryValidator; }
/** * The instance (if any) for the TagLibraryValidator class. * * @return The TagLibraryValidator instance, if any. */
The instance (if any) for the TagLibraryValidator class
getTagLibraryValidator
{ "repo_name": "GazeboHub/ghub-portal-doc", "path": "doc/modelio/GHub Portal/mda/JavaDesigner/res/java/tomcat/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java", "license": "epl-1.0", "size": 29718 }
[ "javax.servlet.jsp.tagext.TagLibraryValidator" ]
import javax.servlet.jsp.tagext.TagLibraryValidator;
import javax.servlet.jsp.tagext.*;
[ "javax.servlet" ]
javax.servlet;
428,162
public boolean killAllBinary(String binaryName) throws FailedExecuteCommand { return killAll(BinaryCommand.BINARY_PREFIX + binaryName + BinaryCommand.BINARY_SUFFIX); }
boolean function(String binaryName) throws FailedExecuteCommand { return killAll(BinaryCommand.BINARY_PREFIX + binaryName + BinaryCommand.BINARY_SUFFIX); }
/** * Kill a running binary * <p/> * See README for more information how to use your own binaries! * * @param binaryName * @return * @throws BrokenBusyboxException * @throws TimeoutException * @throws IOException */
Kill a running binary See README for more information how to use your own binaries
killAllBinary
{ "repo_name": "asyan4ik/Rashr", "path": "root-commands/src/main/java/org/sufficientlysecure/rootcommands/Toolbox.java", "license": "gpl-3.0", "size": 26007 }
[ "org.sufficientlysecure.rootcommands.command.BinaryCommand", "org.sufficientlysecure.rootcommands.util.FailedExecuteCommand" ]
import org.sufficientlysecure.rootcommands.command.BinaryCommand; import org.sufficientlysecure.rootcommands.util.FailedExecuteCommand;
import org.sufficientlysecure.rootcommands.command.*; import org.sufficientlysecure.rootcommands.util.*;
[ "org.sufficientlysecure.rootcommands" ]
org.sufficientlysecure.rootcommands;
2,307,839
private void paintTrackHorizontal(Graphics g, JComponent c, int x, int y, int w, int h) { if (c.isEnabled()) { g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(x, y, x, y + h - 1); g.drawLine(x, y, x + w - 1, y); g.drawLine(x + w - 1, y, x + w - 1, y +...
void function(Graphics g, JComponent c, int x, int y, int w, int h) { if (c.isEnabled()) { g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(x, y, x, y + h - 1); g.drawLine(x, y, x + w - 1, y); g.drawLine(x + w - 1, y, x + w - 1, y + h - 1); g.setColor(scrollBarShadowColor); g.drawLine(x + 1, y + 1, x + 1...
/** * Paints the track for a horizontal scrollbar. * * @param g the graphics device. * @param c the component. * @param x the x-coordinate for the track bounds. * @param y the y-coordinate for the track bounds. * @param w the width for the track bounds. * @param h the height for the track...
Paints the track for a horizontal scrollbar
paintTrackHorizontal
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/javax/swing/plaf/metal/MetalScrollBarUI.java", "license": "gpl-2.0", "size": 19367 }
[ "java.awt.Graphics", "javax.swing.JComponent" ]
import java.awt.Graphics; import javax.swing.JComponent;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
36,917
@Test public void testConfModificationNoFederationOrHa() { final HdfsConfiguration conf = new HdfsConfiguration(); String nsId = null; String nnId = null; conf.set(DFS_NAMENODE_RPC_ADDRESS_KEY, "localhost:1234"); assertFalse("hdfs://localhost:1234".equals(conf.get(FS_DEFAULT_NAME_KEY))); ...
void function() { final HdfsConfiguration conf = new HdfsConfiguration(); String nsId = null; String nnId = null; conf.set(DFS_NAMENODE_RPC_ADDRESS_KEY, STR); assertFalse(STRhdfs: }
/** * Ensure that fs.defaultFS is set in the configuration even if neither HA nor * Federation is enabled. * * Regression test for HDFS-3351. */
Ensure that fs.defaultFS is set in the configuration even if neither HA nor Federation is enabled. Regression test for HDFS-3351
testConfModificationNoFederationOrHa
{ "repo_name": "wankunde/cloudera_hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSUtil.java", "license": "apache-2.0", "size": 39072 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
990,285
@Test public void testReadValidationFailsMissingValueClassInConf() { Configuration configuration = new Configuration(); configuration.setClass("mapreduce.job.inputformat.class", EmployeeInputFormat.class, InputFormat.class); configuration.setClass("key.class", Text.class, Object.class); thro...
void function() { Configuration configuration = new Configuration(); configuration.setClass(STR, EmployeeInputFormat.class, InputFormat.class); configuration.setClass(STR, Text.class, Object.class); thrown.expect(NullPointerException.class); HadoopInputFormatIO.<Text, Employee>read().withConfiguration(configuration); }
/** * This test validates functionality of {@link HadoopInputFormatIO.Read#withConfiguration() * withConfiguration()} function when value class is not provided by the user in configuration. */
This test validates functionality of <code>HadoopInputFormatIO.Read#withConfiguration() withConfiguration()</code> function when value class is not provided by the user in configuration
testReadValidationFailsMissingValueClassInConf
{ "repo_name": "vikkyrk/incubator-beam", "path": "sdks/java/io/hadoop/input-format/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HadoopInputFormatIOTest.java", "license": "apache-2.0", "size": 38467 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.io.Text", "org.apache.hadoop.mapreduce.InputFormat" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.InputFormat;
import org.apache.hadoop.conf.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapreduce.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
446,633
public void testPermissionPrincipal() throws Exception { print("***** ENTERING AuthorizationTester.testPermissionPrincipal() *****"); Class type = IPERSON_CLASS; String key = "student"; int numPrincipals = 10; int numTestingThreads = 10; int idx = 0; long paus...
void function() throws Exception { print(STR); Class type = IPERSON_CLASS; String key = STR; int numPrincipals = 10; int numTestingThreads = 10; int idx = 0; long pauseBeforeUpdateMillis = 3000; long pauseAfterUpdateMillis = 10000; IAuthorizationPrincipal[] principals = new IAuthorizationPrincipal[numPrincipals]; for (...
/** * Tests concurrent access to permissions via "singleton" principal objects. Only run this test * when the property org.apereo.portal.security.IAuthorizationService.cachePermissions=true, * since performance of the db calls will distort the time needed to complete the various parts * of the test....
Tests concurrent access to permissions via "singleton" principal objects. Only run this test when the property org.apereo.portal.security.IAuthorizationService.cachePermissions=true, since performance of the db calls will distort the time needed to complete the various parts of the test
testPermissionPrincipal
{ "repo_name": "jl1955/uPortal5", "path": "uPortal-webapp/src/test/java/org/apereo/portal/security/provider/AuthorizationTester.java", "license": "apache-2.0", "size": 30945 }
[ "org.apereo.portal.security.IAuthorizationPrincipal", "org.apereo.portal.security.IPermission" ]
import org.apereo.portal.security.IAuthorizationPrincipal; import org.apereo.portal.security.IPermission;
import org.apereo.portal.security.*;
[ "org.apereo.portal" ]
org.apereo.portal;
193,133
public static void unregisterJMX(ManagedObject mbean) throws Exception { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); mbs.unregisterMBean(mbean.getObjectName()); }
static void function(ManagedObject mbean) throws Exception { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); mbs.unregisterMBean(mbean.getObjectName()); }
/** * Unregister the scheduler from the local MBeanServer. * * @param mbean * the mbean * @throws Exception * the exception */
Unregister the scheduler from the local MBeanServer
unregisterJMX
{ "repo_name": "1and1/jmxtrans", "path": "src/com/googlecode/jmxtrans/util/JmxUtils.java", "license": "mit", "size": 26877 }
[ "com.googlecode.jmxtrans.jmx.ManagedObject", "java.lang.management.ManagementFactory", "javax.management.MBeanServer" ]
import com.googlecode.jmxtrans.jmx.ManagedObject; import java.lang.management.ManagementFactory; import javax.management.MBeanServer;
import com.googlecode.jmxtrans.jmx.*; import java.lang.management.*; import javax.management.*;
[ "com.googlecode.jmxtrans", "java.lang", "javax.management" ]
com.googlecode.jmxtrans; java.lang; javax.management;
132,518
@JRubyMethod(name = "get_string") public RubyString getString() { ensureBsonRead(); int length = this.buffer.getInt(); this.readPosition += 4; byte[] stringBytes = new byte[length]; this.buffer.get(stringBytes); byte[] bytes = Arrays.copyOfRange(stringBytes, 0, stringBytes.length - 1); R...
@JRubyMethod(name = STR) RubyString function() { ensureBsonRead(); int length = this.buffer.getInt(); this.readPosition += 4; byte[] stringBytes = new byte[length]; this.buffer.get(stringBytes); byte[] bytes = Arrays.copyOfRange(stringBytes, 0, stringBytes.length - 1); RubyString string = getUTF8String(bytes); this.rea...
/** * Get a UTF-8 string from the buffer. * * @author Durran Jordan * @since 2015.09.26 * @version 4.0.0 */
Get a UTF-8 string from the buffer
getString
{ "repo_name": "estolfo/bson-ruby", "path": "src/main/org/bson/ByteBuf.java", "license": "apache-2.0", "size": 14467 }
[ "java.util.Arrays", "org.jruby.RubyString", "org.jruby.anno.JRubyMethod" ]
import java.util.Arrays; import org.jruby.RubyString; import org.jruby.anno.JRubyMethod;
import java.util.*; import org.jruby.*; import org.jruby.anno.*;
[ "java.util", "org.jruby", "org.jruby.anno" ]
java.util; org.jruby; org.jruby.anno;
35,610
protected void writeItems(Element design, DesignContext context) { for (Object itemId : getItemIds()) { writeItem(design, itemId, context); } }
void function(Element design, DesignContext context) { for (Object itemId : getItemIds()) { writeItem(design, itemId, context); } }
/** * Writes the data source items to a design. Hierarchical select components * should override this method to only write the root items. * * @since 7.5.0 * @param design * the element into which to insert the items * @param context * the DesignContext ins...
Writes the data source items to a design. Hierarchical select components should override this method to only write the root items
writeItems
{ "repo_name": "oalles/vaadin", "path": "server/src/com/vaadin/ui/AbstractSelect.java", "license": "apache-2.0", "size": 76884 }
[ "com.vaadin.ui.declarative.DesignContext", "org.jsoup.nodes.Element" ]
import com.vaadin.ui.declarative.DesignContext; import org.jsoup.nodes.Element;
import com.vaadin.ui.declarative.*; import org.jsoup.nodes.*;
[ "com.vaadin.ui", "org.jsoup.nodes" ]
com.vaadin.ui; org.jsoup.nodes;
2,059,924
private void formatValue(final Object value, final boolean recursive) throws IOException { final CharSequence text; if (value == null) { text = " "; // String for missing value. } else if (columnFormat != null) { ...
void function(final Object value, final boolean recursive) throws IOException { final CharSequence text; if (value == null) { text = " "; } else if (columnFormat != null) { if (columnFormat instanceof CompoundFormat<?>) { formatValue((CompoundFormat<?>) columnFormat, value); return; } text = columnFormat.format(value);...
/** * Appends a textual representation of the given value. * * @param value the value to format (may be {@code null}). * @param recursive {@code true} if this method is invoking itself for writing collection values. */
Appends a textual representation of the given value
formatValue
{ "repo_name": "Geomatys/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java", "license": "apache-2.0", "size": 39580 }
[ "java.io.IOException", "java.nio.charset.Charset", "java.text.Format", "java.util.Arrays", "java.util.Currency", "java.util.Locale", "java.util.TimeZone", "org.apache.sis.io.CompoundFormat", "org.apache.sis.util.CharSequences", "org.apache.sis.util.iso.Types", "org.opengis.util.ControlledVocabul...
import java.io.IOException; import java.nio.charset.Charset; import java.text.Format; import java.util.Arrays; import java.util.Currency; import java.util.Locale; import java.util.TimeZone; import org.apache.sis.io.CompoundFormat; import org.apache.sis.util.CharSequences; import org.apache.sis.util.iso.Types; import or...
import java.io.*; import java.nio.charset.*; import java.text.*; import java.util.*; import org.apache.sis.io.*; import org.apache.sis.util.*; import org.apache.sis.util.iso.*; import org.opengis.util.*;
[ "java.io", "java.nio", "java.text", "java.util", "org.apache.sis", "org.opengis.util" ]
java.io; java.nio; java.text; java.util; org.apache.sis; org.opengis.util;
779,142
public Builder definition(SwapDefinition definition) { JodaBeanUtils.notNull(definition, "definition"); this._definition = definition; return this; }
Builder function(SwapDefinition definition) { JodaBeanUtils.notNull(definition, STR); this._definition = definition; return this; }
/** * Sets the swap definition. * @param definition the new value, not null * @return this, for chaining, not null */
Sets the swap definition
definition
{ "repo_name": "McLeodMoores/starling", "path": "projects/financial/src/main/java/com/mcleodmoores/financial/function/trade/SwapDetailsProvider.java", "license": "apache-2.0", "size": 19109 }
[ "com.opengamma.analytics.financial.instrument.swap.SwapDefinition", "org.joda.beans.JodaBeanUtils" ]
import com.opengamma.analytics.financial.instrument.swap.SwapDefinition; import org.joda.beans.JodaBeanUtils;
import com.opengamma.analytics.financial.instrument.swap.*; import org.joda.beans.*;
[ "com.opengamma.analytics", "org.joda.beans" ]
com.opengamma.analytics; org.joda.beans;
450,025
public IdentityProviderCreateContract withProfileEditingPolicyName(String profileEditingPolicyName) { if (this.innerProperties() == null) { this.innerProperties = new IdentityProviderCreateContractProperties(); } this.innerProperties().withProfileEditingPolicyName(profileEditingP...
IdentityProviderCreateContract function(String profileEditingPolicyName) { if (this.innerProperties() == null) { this.innerProperties = new IdentityProviderCreateContractProperties(); } this.innerProperties().withProfileEditingPolicyName(profileEditingPolicyName); return this; }
/** * Set the profileEditingPolicyName property: Profile Editing Policy Name. Only applies to AAD B2C Identity * Provider. * * @param profileEditingPolicyName the profileEditingPolicyName value to set. * @return the IdentityProviderCreateContract object itself. */
Set the profileEditingPolicyName property: Profile Editing Policy Name. Only applies to AAD B2C Identity Provider
withProfileEditingPolicyName
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/models/IdentityProviderCreateContract.java", "license": "mit", "size": 11091 }
[ "com.azure.resourcemanager.apimanagement.fluent.models.IdentityProviderCreateContractProperties" ]
import com.azure.resourcemanager.apimanagement.fluent.models.IdentityProviderCreateContractProperties;
import com.azure.resourcemanager.apimanagement.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,319,834
public BigInteger getA() { return a; }
BigInteger function() { return a; }
/** * Returns the first coefficient <code>a</code> of the * elliptic curve. * @return the first coefficient <code>a</code>. */
Returns the first coefficient <code>a</code> of the elliptic curve
getA
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/classes/java/security/spec/EllipticCurve.java", "license": "mit", "size": 6888 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
957,621
public com.mozu.api.contracts.commerceruntime.orders.Order performOrderAction(com.mozu.api.contracts.commerceruntime.orders.OrderAction action, String orderId, AuthTicket authTicket) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> client = com.mozu.api.clients.commerce.OrderClie...
com.mozu.api.contracts.commerceruntime.orders.Order function(com.mozu.api.contracts.commerceruntime.orders.OrderAction action, String orderId, AuthTicket authTicket) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> client = com.mozu.api.clients.commerce.OrderClient.performOrderActionCl...
/** * Perform the specified action for an order. Available actions depend on the current status of the order. When in doubt, first get a list of available order actions. * <p><pre><code> * Order order = new Order(); * Order order = order.PerformOrderAction( action, orderId, authTicket); * </code></pre></p> ...
Perform the specified action for an order. Available actions depend on the current status of the order. When in doubt, first get a list of available order actions. <code><code> Order order = new Order(); Order order = order.PerformOrderAction( action, orderId, authTicket); </code></code>
performOrderAction
{ "repo_name": "carsonreinke/mozu-java-sdk", "path": "src/main/java/com/mozu/api/resources/commerce/OrderResource.java", "license": "mit", "size": 17569 }
[ "com.mozu.api.MozuClient", "com.mozu.api.security.AuthTicket" ]
import com.mozu.api.MozuClient; import com.mozu.api.security.AuthTicket;
import com.mozu.api.*; import com.mozu.api.security.*;
[ "com.mozu.api" ]
com.mozu.api;
1,850,667
private void validateHealthOfCanonicalTModelDeployment() throws SemanticRegistryException { // Assert that key values for all 5 canonical tModels have been read from the registry.properties file if ( (SAWSDL_TMODEL_KEY == null || SAWSDL_TMODEL_KEY.length() != 36) || (CATEGORY_TMODEL_KEY == null || CATEGOR...
void function() throws SemanticRegistryException { if ( (SAWSDL_TMODEL_KEY == null SAWSDL_TMODEL_KEY.length() != 36) (CATEGORY_TMODEL_KEY == null CATEGORY_TMODEL_KEY.length() != 36) (INPUT_TMODEL_KEY == null INPUT_TMODEL_KEY.length() != 36) (OUTPUT_TMODEL_KEY == null OUTPUT_TMODEL_KEY.length() != 36) (INDEXING_TMODEL_K...
/** * Checks if all five Canonical TModels that are necessary for the Semantic * Registry's operation have been properly registered with the UDDI server. * * @throws SemanticRegistryException */
Checks if all five Canonical TModels that are necessary for the Semantic Registry's operation have been properly registered with the UDDI server
validateHealthOfCanonicalTModelDeployment
{ "repo_name": "dkourtesis/fusion-semantic-registry", "path": "src/org/seerc/fusion/sr/core/PublicationHandler.java", "license": "apache-2.0", "size": 130142 }
[ "java.util.HashSet", "java.util.Set", "org.seerc.fusion.sr.exceptions.SemanticRegistryException" ]
import java.util.HashSet; import java.util.Set; import org.seerc.fusion.sr.exceptions.SemanticRegistryException;
import java.util.*; import org.seerc.fusion.sr.exceptions.*;
[ "java.util", "org.seerc.fusion" ]
java.util; org.seerc.fusion;
597,049
public final synchronized void addWorkerThreads(int numWorkerThreads) { Semaphore startSem; if (this.started) { startSem = new Semaphore(numWorkerThreads); } else { startSem = this.startSemaphore; } for (int i = 0; i < numWorkerThreads; i++) { ...
final synchronized void function(int numWorkerThreads) { Semaphore startSem; if (this.started) { startSem = new Semaphore(numWorkerThreads); } else { startSem = this.startSemaphore; } for (int i = 0; i < numWorkerThreads; i++) { int id = this.nextThreadId++; Executor executor = new Executor(this.context, this, STR + id...
/** * Add worker threads to Execution Platform. * * @param numWorkerThreads Number of new worker threads */
Add worker threads to Execution Platform
addWorkerThreads
{ "repo_name": "mF2C/COMPSs", "path": "compss/runtime/adaptors/execution/src/main/java/es/bsc/compss/executor/utils/ExecutionPlatform.java", "license": "apache-2.0", "size": 10581 }
[ "es.bsc.compss.executor.Executor", "java.util.concurrent.Semaphore" ]
import es.bsc.compss.executor.Executor; import java.util.concurrent.Semaphore;
import es.bsc.compss.executor.*; import java.util.concurrent.*;
[ "es.bsc.compss", "java.util" ]
es.bsc.compss; java.util;
1,983,626
//----------------------------------------------------------------------- public ImmutableMap<String, Boolean> getCheckedPermissions() { return _checkedPermissions; }
ImmutableMap<String, Boolean> function() { return _checkedPermissions; }
/** * Gets the permission check result. * @return the value of the property, not null */
Gets the permission check result
getCheckedPermissions
{ "repo_name": "McLeodMoores/starling", "path": "projects/provider/src/main/java/com/opengamma/provider/permission/PermissionCheckProviderResult.java", "license": "apache-2.0", "size": 16842 }
[ "com.google.common.collect.ImmutableMap" ]
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
994,644
void reload() { configManager.reload(); CanaryUtil.getCustomPacket().reloadBungeeCord(); }
void reload() { configManager.reload(); CanaryUtil.getCustomPacket().reloadBungeeCord(); }
/** * Will update everything with any changes in Config file */
Will update everything with any changes in Config file
reload
{ "repo_name": "Larry1123/CanaryUtil", "path": "src/main/java/net/larry1123/util/config/BungeeCordConfig.java", "license": "apache-2.0", "size": 3917 }
[ "net.larry1123.util.CanaryUtil" ]
import net.larry1123.util.CanaryUtil;
import net.larry1123.util.*;
[ "net.larry1123.util" ]
net.larry1123.util;
264,409
Collection<BiomeType> getBiomes();
Collection<BiomeType> getBiomes();
/** * Gets a collection of all available {@link BiomeType}s. * * @return A collection containing all biome types */
Gets a collection of all available <code>BiomeType</code>s
getBiomes
{ "repo_name": "SpongeHistory/SpongeAPI-History", "path": "src/main/java/org/spongepowered/api/GameRegistry.java", "license": "mit", "size": 37085 }
[ "java.util.Collection", "org.spongepowered.api.world.biome.BiomeType" ]
import java.util.Collection; import org.spongepowered.api.world.biome.BiomeType;
import java.util.*; import org.spongepowered.api.world.biome.*;
[ "java.util", "org.spongepowered.api" ]
java.util; org.spongepowered.api;
1,218,049
public void addCols(Collection<ColumnMeta> cols) { Transaction tx = pm.currentTransaction(); try { tx.begin(); pm.makePersistentAll(cols); tx.commit(); } finally { if (tx.isActive()) { tx.rollback(); } } }
void function(Collection<ColumnMeta> cols) { Transaction tx = pm.currentTransaction(); try { tx.begin(); pm.makePersistentAll(cols); tx.commit(); } finally { if (tx.isActive()) { tx.rollback(); } } }
/** * Add a collection of column meta. * * @param cols */
Add a collection of column meta
addCols
{ "repo_name": "eric-haibin-lin/SecureDB", "path": "src/main/java/edu/hku/sdb/catalog/MetaStore.java", "license": "apache-2.0", "size": 5498 }
[ "java.util.Collection", "javax.jdo.Transaction" ]
import java.util.Collection; import javax.jdo.Transaction;
import java.util.*; import javax.jdo.*;
[ "java.util", "javax.jdo" ]
java.util; javax.jdo;
1,187,653
public static BufferedImage toCompatibleImage(BufferedImage image) { if (isHeadless()) { return image; } if (image.getColorModel().equals( getGraphicsConfiguration().getColorModel())) { return image; } BufferedImage compatibleImage = ...
static BufferedImage function(BufferedImage image) { if (isHeadless()) { return image; } if (image.getColorModel().equals( getGraphicsConfiguration().getColorModel())) { return image; } BufferedImage compatibleImage = getGraphicsConfiguration().createCompatibleImage( image.getWidth(), image.getHeight(), image.getTransp...
/** * <p>Return a new compatible image that contains a copy of the specified * image. This method ensures an image is compatible with the hardware, * and therefore optimized for fast blitting operations.</p> * * <p>If the method is called in a headless environment, then the returned * <cod...
Return a new compatible image that contains a copy of the specified image. This method ensures an image is compatible with the hardware, and therefore optimized for fast blitting operations. If the method is called in a headless environment, then the returned <code>BufferedImage</code> will be the source image
toCompatibleImage
{ "repo_name": "syncer/swingx", "path": "swingx-common/src/main/java/org/jdesktop/swingx/util/GraphicsUtilities.java", "license": "lgpl-2.1", "size": 35070 }
[ "java.awt.Graphics", "java.awt.image.BufferedImage" ]
import java.awt.Graphics; import java.awt.image.BufferedImage;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
917,332
public void testCoerceParsing() throws IOException { String mapping = Strings.toString(XContentFactory.jsonBuilder().startObject().startObject("type1") .startObject("properties").startObject("location") .field("type", "shape") .field("coerce", "true") .endObje...
void function() throws IOException { String mapping = Strings.toString(XContentFactory.jsonBuilder().startObject().startObject("type1") .startObject(STR).startObject(STR) .field("type", "shape") .field(STR, "true") .endObject().endObject() .endObject().endObject()); DocumentMapper defaultMapper = createIndex("test").ma...
/** * Test that coerce parameter correctly parses */
Test that coerce parameter correctly parses
testCoerceParsing
{ "repo_name": "coding0011/elasticsearch", "path": "x-pack/plugin/spatial/src/test/java/org/elasticsearch/xpack/spatial/index/mapper/ShapeFieldMapperTests.java", "license": "apache-2.0", "size": 14710 }
[ "java.io.IOException", "org.elasticsearch.common.Strings", "org.elasticsearch.common.compress.CompressedXContent", "org.elasticsearch.common.xcontent.XContentFactory", "org.elasticsearch.index.mapper.DocumentMapper", "org.elasticsearch.index.mapper.Mapper", "org.hamcrest.Matchers" ]
import java.io.IOException; import org.elasticsearch.common.Strings; import org.elasticsearch.common.compress.CompressedXContent; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.mapper.DocumentMapper; import org.elasticsearch.index.mapper.Mapper; import org.hamcrest.Matchers;
import java.io.*; import org.elasticsearch.common.*; import org.elasticsearch.common.compress.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.index.mapper.*; import org.hamcrest.*;
[ "java.io", "org.elasticsearch.common", "org.elasticsearch.index", "org.hamcrest" ]
java.io; org.elasticsearch.common; org.elasticsearch.index; org.hamcrest;
120,158
protected void emit_nFlpInrMult_SL_COMMENTTerminalRuleCall_5_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
/** * Syntax: * SL_COMMENT? */
Syntax: SL_COMMENT
emit_nFlpInrMult_SL_COMMENTTerminalRuleCall_5_q
{ "repo_name": "cooked/NDT", "path": "sc.ndt.editor.bmodes.bmi/src-gen/sc/ndt/editor/bmodes/serializer/BmodesbmiSyntacticSequencer.java", "license": "gpl-3.0", "size": 75631 }
[ "java.util.List", "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.nodemodel.INode", "org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider" ]
import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider;
import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.xtext" ]
java.util; org.eclipse.emf; org.eclipse.xtext;
2,356,584
protected void addUserInfoRules(Digester digester) { // add user additional information String rulePath = "*/" + N_USERINFOS; digester.addObjectCreate(rulePath, CmsWorkplaceUserInfoManager.class); digester.addSetNext(rulePath, "setUserInfoManager"); // create a new blo...
void function(Digester digester) { String rulePath = "*/" + N_USERINFOS; digester.addObjectCreate(rulePath, CmsWorkplaceUserInfoManager.class); digester.addSetNext(rulePath, STR); rulePath += "/" + N_INFOBLOCK; digester.addObjectCreate(rulePath, CmsWorkplaceUserInfoBlock.class); digester.addCallMethod(rulePath, STR, 1)...
/** * Adds the digester rules for the user-infos node.<p> * * @param digester the digester object */
Adds the digester rules for the user-infos node
addUserInfoRules
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/configuration/CmsWorkplaceConfiguration.java", "license": "lgpl-2.1", "size": 80845 }
[ "org.apache.commons.digester.Digester", "org.opencms.workplace.CmsWorkplaceUserInfoBlock", "org.opencms.workplace.CmsWorkplaceUserInfoManager" ]
import org.apache.commons.digester.Digester; import org.opencms.workplace.CmsWorkplaceUserInfoBlock; import org.opencms.workplace.CmsWorkplaceUserInfoManager;
import org.apache.commons.digester.*; import org.opencms.workplace.*;
[ "org.apache.commons", "org.opencms.workplace" ]
org.apache.commons; org.opencms.workplace;
286,282
public Document saveDocument(Document document) throws WorkflowException;
Document function(Document document) throws WorkflowException;
/** * This is a helper method that performs the same as the {@link #saveDocument(Document, Class)} method. The convenience * of this method is that the event being used is the standard SaveDocumentEvent. * * @see org.kuali.rice.krad.service.DocumentService#saveDocument(Document, Class) */
This is a helper method that performs the same as the <code>#saveDocument(Document, Class)</code> method. The convenience of this method is that the event being used is the standard SaveDocumentEvent
saveDocument
{ "repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/service/DocumentService.java", "license": "apache-2.0", "size": 14179 }
[ "org.kuali.rice.kew.api.exception.WorkflowException", "org.kuali.rice.krad.document.Document" ]
import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.krad.document.Document;
import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.krad.document.*;
[ "org.kuali.rice" ]
org.kuali.rice;
874,969
private static void checkProxyPackageAccess(Class<?> clazz) { SecurityManager s = System.getSecurityManager(); if (s != null) { // check proxy interfaces if the given class is a proxy class if (Proxy.isProxyClass(clazz)) { for (Class<?> intf : clazz.getInterfa...
static void function(Class<?> clazz) { SecurityManager s = System.getSecurityManager(); if (s != null) { if (Proxy.isProxyClass(clazz)) { for (Class<?> intf : clazz.getInterfaces()) { checkPackageAccess(intf); } } } }
/** * Check package access on the proxy interfaces that the given proxy class * implements. * * @param clazz Proxy class object */
Check package access on the proxy interfaces that the given proxy class implements
checkProxyPackageAccess
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/util/MethodUtil.java", "license": "gpl-2.0", "size": 10671 }
[ "java.lang.reflect.Proxy" ]
import java.lang.reflect.Proxy;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,749,741
public double getEstimatedNumberOfMalfunctionsPerOrbit() { double avgMalfunctionsPerOrbit = 0D; double totalTimeMillisols = MarsClock.getTimeDiff(currentTime, masterClock.getInitialMarsTime()); double totalTimeOrbits = totalTimeMillisols / 1000D / MarsClock.AVERAGE_SOLS_PER_ORBIT_NON_LEAPYEAR; if...
double function() { double avgMalfunctionsPerOrbit = 0D; double totalTimeMillisols = MarsClock.getTimeDiff(currentTime, masterClock.getInitialMarsTime()); double totalTimeOrbits = totalTimeMillisols / 1000D / MarsClock.AVERAGE_SOLS_PER_ORBIT_NON_LEAPYEAR; if (totalTimeOrbits < 1D) { avgMalfunctionsPerOrbit = (numberMal...
/** * Gets the estimated number of malfunctions this entity will have in one * Martian orbit. * * @return number of malfunctions. */
Gets the estimated number of malfunctions this entity will have in one Martian orbit
getEstimatedNumberOfMalfunctionsPerOrbit
{ "repo_name": "mars-sim/mars-sim", "path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/malfunction/MalfunctionManager.java", "license": "gpl-3.0", "size": 33855 }
[ "org.mars_sim.msp.core.time.MarsClock" ]
import org.mars_sim.msp.core.time.MarsClock;
import org.mars_sim.msp.core.time.*;
[ "org.mars_sim.msp" ]
org.mars_sim.msp;
83,269
public void configureInstance(Component c, Object imp, String containerName) { if (imp.equals(TopologyServices.class)) { // export the service to be used by SAL c.setInterface( new String[] { IPluginInTopologyService.class.getName(), IT...
void function(Component c, Object imp, String containerName) { if (imp.equals(TopologyServices.class)) { c.setInterface( new String[] { IPluginInTopologyService.class.getName(), ITopologyServiceShimListener.class.getName() }, null); c.add(createContainerServiceDependency(containerName) .setService(IPluginOutTopologySer...
/** * Function that is called when configuration of the dependencies is * required. * * @param c * dependency manager Component object, used for configuring the * dependencies exported and imported * @param imp * Implementation class that is being...
Function that is called when configuration of the dependencies is required
configureInstance
{ "repo_name": "lbchen/ODL", "path": "opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/Activator.java", "license": "epl-1.0", "size": 22746 }
[ "java.util.Dictionary", "java.util.Hashtable", "org.apache.felix.dm.Component", "org.opendaylight.controller.protocol_plugin.openflow.IDataPacketMux", "org.opendaylight.controller.protocol_plugin.openflow.IFlowProgrammerNotifier", "org.opendaylight.controller.protocol_plugin.openflow.IInventoryProvider", ...
import java.util.Dictionary; import java.util.Hashtable; import org.apache.felix.dm.Component; import org.opendaylight.controller.protocol_plugin.openflow.IDataPacketMux; import org.opendaylight.controller.protocol_plugin.openflow.IFlowProgrammerNotifier; import org.opendaylight.controller.protocol_plugin.openflow.IInv...
import java.util.*; import org.apache.felix.dm.*; import org.opendaylight.controller.protocol_plugin.openflow.*; import org.opendaylight.controller.protocol_plugin.openflow.core.*; import org.opendaylight.controller.sal.connection.*; import org.opendaylight.controller.sal.core.*; import org.opendaylight.controller.sal....
[ "java.util", "org.apache.felix", "org.opendaylight.controller" ]
java.util; org.apache.felix; org.opendaylight.controller;
1,244,982
public void initializeAndWait() throws XMPPException, SmackException { this.initialize(); try { LOGGER.fine("Initializing transport resolver..."); while (!this.isInitialized()) { LOGGER.fine("Resolver init still pending"); Thread.sleep(1000); ...
void function() throws XMPPException, SmackException { this.initialize(); try { LOGGER.fine(STR); while (!this.isInitialized()) { LOGGER.fine(STR); Thread.sleep(1000); } LOGGER.fine(STR); } catch (Exception e) { e.printStackTrace(); } }
/** * Initialize Transport Resolver and wait until it is complete unitialized. * @throws SmackException */
Initialize Transport Resolver and wait until it is complete unitialized
initializeAndWait
{ "repo_name": "unisontech/Smack", "path": "smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TransportResolver.java", "license": "apache-2.0", "size": 11525 }
[ "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPException" ]
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
1,733,105
public Block[] getBlockReport();
Block[] function();
/** * Returns the block report - the full list of blocks stored * Returns only finalized blocks * @return - the block report - the full list of blocks stored */
Returns the block report - the full list of blocks stored Returns only finalized blocks
getBlockReport
{ "repo_name": "ryanobjc/hadoop-cloudera", "path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDatasetInterface.java", "license": "apache-2.0", "size": 9580 }
[ "org.apache.hadoop.hdfs.protocol.Block" ]
import org.apache.hadoop.hdfs.protocol.Block;
import org.apache.hadoop.hdfs.protocol.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,165,985
@FIXVersion(introduced="5.0") @TagNumRef(tagNum=TagNum.SettlCurrFxRate) public Double getSettlCurrFxRate() { return settlCurrFxRate; }
@FIXVersion(introduced="5.0") @TagNumRef(tagNum=TagNum.SettlCurrFxRate) Double function() { return settlCurrFxRate; }
/** * Message field getter. * @return field value */
Message field getter
getSettlCurrFxRate
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/group/TrdCapRptAckSideGroup.java", "license": "gpl-3.0", "size": 98727 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,254,615
public SimpleNodeType getParent() { return parent; }
SimpleNodeType function() { return parent; }
/** * Return the parent property. * * @return */
Return the parent property
getParent
{ "repo_name": "porcelli/OpenSpotLight", "path": "osl-simple-persist/src/main/java/org/openspotlight/persist/internal/LazyProperty.java", "license": "lgpl-3.0", "size": 13974 }
[ "org.openspotlight.persist.annotation.SimpleNodeType" ]
import org.openspotlight.persist.annotation.SimpleNodeType;
import org.openspotlight.persist.annotation.*;
[ "org.openspotlight.persist" ]
org.openspotlight.persist;
1,273,829
protected int[] getTags(Rule rule, int begin, int end, Sentence sentence) { int[] tokens = Arrays.copyOf(rule.getEnglish(), rule.getEnglish().length); byte[] alignments = rule.getAlignment(); // System.err.println(String.format("getTags() %s", rule.getRuleString())); if (alignments != n...
int[] function(Rule rule, int begin, int end, Sentence sentence) { int[] tokens = Arrays.copyOf(rule.getEnglish(), rule.getEnglish().length); byte[] alignments = rule.getAlignment(); if (alignments != null) { for (int i = 0; i < tokens.length; i++) { if (tokens[i] > 0) { for (int j = 0; j < alignments.length; j += 2) {...
/** * Input sentences can be tagged with information specific to the language model. This looks for * such annotations by following a word's alignments back to the source words, checking for * annotations, and replacing the surface word if such annotations are found. * @param rule the {@link org.apache.josh...
Input sentences can be tagged with information specific to the language model. This looks for such annotations by following a word's alignments back to the source words, checking for annotations, and replacing the surface word if such annotations are found
getTags
{ "repo_name": "thammegowda/incubator-joshua", "path": "src/main/java/org/apache/joshua/decoder/ff/lm/LanguageModelFF.java", "license": "apache-2.0", "size": 18766 }
[ "java.util.Arrays", "org.apache.joshua.corpus.Vocabulary", "org.apache.joshua.decoder.ff.tm.Rule", "org.apache.joshua.decoder.segment_file.Sentence" ]
import java.util.Arrays; import org.apache.joshua.corpus.Vocabulary; import org.apache.joshua.decoder.ff.tm.Rule; import org.apache.joshua.decoder.segment_file.Sentence;
import java.util.*; import org.apache.joshua.corpus.*; import org.apache.joshua.decoder.ff.tm.*; import org.apache.joshua.decoder.segment_file.*;
[ "java.util", "org.apache.joshua" ]
java.util; org.apache.joshua;
1,523,841
public void setZTranslation(NexusObjectProvider<NXpositioner> zPositioner) throws NexusException { final DataNode zTranslation = getDataNode(zPositioner); sample.addDataNode(NX_Z_TRANSLATION, zTranslation); }
void function(NexusObjectProvider<NXpositioner> zPositioner) throws NexusException { final DataNode zTranslation = getDataNode(zPositioner); sample.addDataNode(NX_Z_TRANSLATION, zTranslation); }
/** * Sets the 'z' translation * @param zPositioner z positioner * @throws NexusException */
Sets the 'z' translation
setZTranslation
{ "repo_name": "belkassaby/dawnsci", "path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/builder/appdef/impl/TomoApplicationBuilder.java", "license": "epl-1.0", "size": 10055 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode", "org.eclipse.dawnsci.nexus.NXpositioner", "org.eclipse.dawnsci.nexus.NexusException", "org.eclipse.dawnsci.nexus.builder.NexusObjectProvider" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.dawnsci.nexus.NXpositioner; import org.eclipse.dawnsci.nexus.NexusException; import org.eclipse.dawnsci.nexus.builder.NexusObjectProvider;
import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.dawnsci.nexus.*; import org.eclipse.dawnsci.nexus.builder.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
2,647,368
@GET @GZIP @Path("jobs/{jobid}/tasks/{taskname}/result") @Produces("application/json") TaskResultData taskResult(@HeaderParam("sessionid") String sessionId, @PathParam("jobid") String jobId, @PathParam("taskname") String taskname) throws NotConnectedRestException, UnknownJobRestException...
@Path(STR) @Produces(STR) TaskResultData taskResult(@HeaderParam(STR) String sessionId, @PathParam("jobid") String jobId, @PathParam(STR) String taskname) throws NotConnectedRestException, UnknownJobRestException, UnknownTaskRestException, PermissionRestException;
/** * Returns the task result of the task <code>taskName</code> of the job * <code>jobId</code> * * @param sessionId * a valid session id * @param jobId * the id of the job * @param taskname * the name of the task * @return the task res...
Returns the task result of the task <code>taskName</code> of the job <code>jobId</code>
taskResult
{ "repo_name": "tobwiens/scheduling", "path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/SchedulerRestInterface.java", "license": "agpl-3.0", "size": 80291 }
[ "javax.ws.rs.HeaderParam", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "org.ow2.proactive_grid_cloud_portal.scheduler.dto.TaskResultData", "org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException", "org.ow2.proactive_grid_cloud_portal.scheduler.exceptio...
import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import org.ow2.proactive_grid_cloud_portal.scheduler.dto.TaskResultData; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException; import org.ow2.proactive_grid_cloud_porta...
import javax.ws.rs.*; import org.ow2.proactive_grid_cloud_portal.scheduler.dto.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*;
[ "javax.ws", "org.ow2.proactive_grid_cloud_portal" ]
javax.ws; org.ow2.proactive_grid_cloud_portal;
443,758
Page<String> findInStatusSince( long timestamp, WorkspaceStatus status, int maxItems, long skipCount) throws ServerException;
Page<String> findInStatusSince( long timestamp, WorkspaceStatus status, int maxItems, long skipCount) throws ServerException;
/** * Finds workspaces that have been in the provided status since before the provided time. * * @param timestamp the stop-gap time * @param status the status of the workspaces * @param maxItems max items on the results page * @param skipCount how many items of the result to skip * @return the list...
Finds workspaces that have been in the provided status since before the provided time
findInStatusSince
{ "repo_name": "codenvy/che", "path": "wsmaster/che-core-api-workspace-activity/src/main/java/org/eclipse/che/api/workspace/activity/WorkspaceActivityDao.java", "license": "epl-1.0", "size": 4936 }
[ "org.eclipse.che.api.core.Page", "org.eclipse.che.api.core.ServerException", "org.eclipse.che.api.core.model.workspace.WorkspaceStatus" ]
import org.eclipse.che.api.core.Page; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.core.model.workspace.WorkspaceStatus;
import org.eclipse.che.api.core.*; import org.eclipse.che.api.core.model.workspace.*;
[ "org.eclipse.che" ]
org.eclipse.che;
2,770,179
Iterator<String> getXPathFilters();
Iterator<String> getXPathFilters();
/** * <p>Obtain an iterator over the XPath expressions (Strings) currently registered * with the audit manager.</p> * <p>XPath expressions aren't evaluated or used for filtering unless isAuditXPath() * returns true.</p> * * @return An iterator of all XPath expressions the audit manager is ...
Obtain an iterator over the XPath expressions (Strings) currently registered with the audit manager. XPath expressions aren't evaluated or used for filtering unless isAuditXPath() returns true
getXPathFilters
{ "repo_name": "igniterealtime/Openfire", "path": "xmppserver/src/main/java/org/jivesoftware/openfire/audit/AuditManager.java", "license": "apache-2.0", "size": 9441 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,449,782
public static Iterator primitiveClassNames() { return primitiveClassNames(primitiveWrapperPairs()); }
static Iterator function() { return primitiveClassNames(primitiveWrapperPairs()); }
/** * return the names of the Java primitive classes * (e.g. "int", "char"); does *not* include "void" */
return the names of the Java primitive classes (e.g. "int", "char"); does *not* include "void"
primitiveClassNames
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "utils/eclipselink.utils.workbench/mappingsmodel/source/org/eclipse/persistence/tools/workbench/mappingsmodel/meta/MWClass.java", "license": "epl-1.0", "size": 110145 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,842,501
private static ActionBar getToolBar(Context context) { return ((AppCompatActivity) context).getSupportActionBar(); }
static ActionBar function(Context context) { return ((AppCompatActivity) context).getSupportActionBar(); }
/** * Method to get Support Action Bar. * @param context * @return ActionBar * */
Method to get Support Action Bar
getToolBar
{ "repo_name": "Affordall/Ya-Music-Test", "path": "app/src/main/java/com/realjamapps/yamusicapp/utils/Utils.java", "license": "gpl-3.0", "size": 5272 }
[ "android.content.Context", "android.support.v7.app.ActionBar", "android.support.v7.app.AppCompatActivity" ]
import android.content.Context; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity;
import android.content.*; import android.support.v7.app.*;
[ "android.content", "android.support" ]
android.content; android.support;
2,131,975
static private void setLocationStatus(Context c, @LocationStatus int locationStatus){ SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(c); SharedPreferences.Editor spe = sp.edit(); spe.putInt(c.getString(R.string.pref_location_status_key), locationStatus); spe.com...
static void function(Context c, @LocationStatus int locationStatus){ SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(c); SharedPreferences.Editor spe = sp.edit(); spe.putInt(c.getString(R.string.pref_location_status_key), locationStatus); spe.commit(); }
/** * Sets the location status into shared preference. This function should not be called from * the UI thread because it uses commit to write to the shared preferences. * @param c Context to get the PreferenceManager from. * @param locationStatus The IntDef value to set */
Sets the location status into shared preference. This function should not be called from the UI thread because it uses commit to write to the shared preferences
setLocationStatus
{ "repo_name": "alboteanud/Sunshine_image2", "path": "app/src/main/java/com/alboteanu/android/sunshine/app/sync/SunshineSyncAdapter.java", "license": "apache-2.0", "size": 30902 }
[ "android.content.Context", "android.content.SharedPreferences", "android.preference.PreferenceManager" ]
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager;
import android.content.*; import android.preference.*;
[ "android.content", "android.preference" ]
android.content; android.preference;
1,471,089
public ServiceFuture<RouteTableInner> updateTagsAsync(String resourceGroupName, String routeTableName, Map<String, String> tags, final ServiceCallback<RouteTableInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags), serviceCal...
ServiceFuture<RouteTableInner> function(String resourceGroupName, String routeTableName, Map<String, String> tags, final ServiceCallback<RouteTableInner> serviceCallback) { return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags), serviceCallback); }
/** * Updates a route table tags. * * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. * @param tags Resource tags. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws Ille...
Updates a route table tags
updateTagsAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RouteTablesInner.java", "license": "mit", "size": 75681 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture", "java.util.Map" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
2,830,096
private static void checkCodecs(final Configuration c) throws IOException { // check to see if the codec list is available: String [] codecs = c.getStrings("hbase.regionserver.codecs", (String[])null); if (codecs == null) return; for (String codec : codecs) { if (!CompressionTest.testCompression...
static void function(final Configuration c) throws IOException { String [] codecs = c.getStrings(STR, (String[])null); if (codecs == null) return; for (String codec : codecs) { if (!CompressionTest.testCompression(codec)) { throw new IOException(STR + codec + STR); } } }
/** * Run test on configured codecs to make sure supporting libs are in place. * @param c * @throws IOException */
Run test on configured codecs to make sure supporting libs are in place
checkCodecs
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java", "license": "apache-2.0", "size": 143925 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.util.CompressionTest" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.util.CompressionTest;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,849,518
List getColumnNames(String value) throws DAOException, ClassNotFoundException;
List getColumnNames(String value) throws DAOException, ClassNotFoundException;
/** * get Column Names. * @param value value. * @return Column Names * @throws DAOException DAO Exception * @throws ClassNotFoundException Class Not Found Exception. */
get Column Names
getColumnNames
{ "repo_name": "NCIP/commons-module", "path": "software/washu-commons/src/main/java/edu/wustl/common/bizlogic/IQueryBizLogic.java", "license": "bsd-3-clause", "size": 7352 }
[ "edu.wustl.dao.exception.DAOException", "java.util.List" ]
import edu.wustl.dao.exception.DAOException; import java.util.List;
import edu.wustl.dao.exception.*; import java.util.*;
[ "edu.wustl.dao", "java.util" ]
edu.wustl.dao; java.util;
2,364,986
public void testLogicalConnectivePositive03() throws Exception { final Element ele = BasicParser.createElement( "<IMPL><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></IMPL>"); // System.out.println(ele.toString()); assertFalse(checker.checkFormula(ele, context).hasErrors()); asse...
void function() throws Exception { final Element ele = BasicParser.createElement( STRA\STRB\STR); assertFalse(checker.checkFormula(ele, context).hasErrors()); assertFalse(checker.checkFormula(ele, context, getChecker()).hasErrors()); assertFalse(checker.checkFormula(ele, context, getCheckerWithoutClass()) .hasErrors())...
/** * Function: checkFormula(Element) * Type: positive * Data: A -> B * * @throws Exception Test failed. */
Function: checkFormula(Element) Type: positive Data: A -> B
testLogicalConnectivePositive03
{ "repo_name": "m-31/qedeq", "path": "QedeqKernelBoTest/src/org/qedeq/kernel/bo/logic/wf/FormulaCheckerLogicalConnectivesTest.java", "license": "gpl-2.0", "size": 19916 }
[ "org.qedeq.kernel.se.base.list.Element", "org.qedeq.kernel.xml.parser.BasicParser" ]
import org.qedeq.kernel.se.base.list.Element; import org.qedeq.kernel.xml.parser.BasicParser;
import org.qedeq.kernel.se.base.list.*; import org.qedeq.kernel.xml.parser.*;
[ "org.qedeq.kernel" ]
org.qedeq.kernel;
955,681
@Nullable Preference getPreference(); /** * Query whether this rating has a value. Ratings with no value are unrate events; * this is equivalent to checking whether {Gustav Lindqvist #getPreference()}
Preference getPreference(); /** * Query whether this rating has a value. Ratings with no value are unrate events; * this is equivalent to checking whether {Gustav Lindqvist #getPreference()}
/** * Get the expressed preference. If this is an "unrate" event, the * preference will be {@code null}. * * @return The expressed preference. */
Get the expressed preference. If this is an "unrate" event, the preference will be null
getPreference
{ "repo_name": "vijayvani/Lenskit", "path": "lenskit-core/src/main/java/org/grouplens/lenskit/data/event/Rating.java", "license": "lgpl-2.1", "size": 2375 }
[ "org.grouplens.lenskit.data.pref.Preference" ]
import org.grouplens.lenskit.data.pref.Preference;
import org.grouplens.lenskit.data.pref.*;
[ "org.grouplens.lenskit" ]
org.grouplens.lenskit;
1,906,306
void removeSheets(XillWorkbook workbook, List<String> sheetNames);
void removeSheets(XillWorkbook workbook, List<String> sheetNames);
/** * Removes a list of sheets from the provided workbook. * * @param workbook the workbook from which the sheet should be removed * @param sheetNames a list of names of the sheets which should be removed * @throws IllegalArgumentException when the workbook is read-only * @throws I...
Removes a list of sheets from the provided workbook
removeSheets
{ "repo_name": "XillioQA/xill-platform-3.4", "path": "plugin-excel/src/main/java/nl/xillio/xill/plugins/excel/services/ExcelService.java", "license": "apache-2.0", "size": 4499 }
[ "java.util.List", "nl.xillio.xill.plugins.excel.datastructures.XillWorkbook" ]
import java.util.List; import nl.xillio.xill.plugins.excel.datastructures.XillWorkbook;
import java.util.*; import nl.xillio.xill.plugins.excel.datastructures.*;
[ "java.util", "nl.xillio.xill" ]
java.util; nl.xillio.xill;
200,030
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<OperationListResultInner> listAsync() { return listWithResponseAsync() .flatMap( (Response<OperationListResultInner> res) -> { if (res.getValue() != null) { return Mono.just(r...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<OperationListResultInner> function() { return listWithResponseAsync() .flatMap( (Response<OperationListResultInner> res) -> { if (res.getValue() != null) { return Mono.just(res.getValue()); } else { return Mono.empty(); } }); }
/** * Lists all of the available REST API operations. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of resource provider operations on successful comp...
Lists all of the available REST API operations
listAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/OperationsClientImpl.java", "license": "mit", "size": 7063 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.mysql.fluent.models.OperationListResultInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.mysql.fluent.models.OperationListResultInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.mysql.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,214,662
@Test public void testToIntegerPositive01() throws Exception { TestPerformer testPerformer; String modelFileName; String oclFileName; oclFileName = "standardlibrary/string/toIntegerPositive01.ocl"; modelFileName = "testmodel.uml"; testPerformer = TestPerformer.getInstance(AllStandardLibraryTe...
void function() throws Exception { TestPerformer testPerformer; String modelFileName; String oclFileName; oclFileName = STR; modelFileName = STR; testPerformer = TestPerformer.getInstance(AllStandardLibraryTests.META_MODEL_ID, AllStandardLibraryTests.MODEL_BUNDLE, AllStandardLibraryTests.MODEL_DIRECTORY); testPerformer...
/** * <p> * A test case testing the method <code>String.toInteger()</code> . * </p> */
A test case testing the method <code>String.toInteger()</code> .
testToIntegerPositive01
{ "repo_name": "dresden-ocl/dresdenocl", "path": "tests/org.dresdenocl.ocl2parser.test/src/org/dresdenocl/ocl2parser/test/standardlibrary/TestString.java", "license": "lgpl-3.0", "size": 16770 }
[ "org.dresdenocl.ocl2parser.test.TestPerformer" ]
import org.dresdenocl.ocl2parser.test.TestPerformer;
import org.dresdenocl.ocl2parser.test.*;
[ "org.dresdenocl.ocl2parser" ]
org.dresdenocl.ocl2parser;
1,969,423
public WebElement getSendMessageButton() { return driver.findElement(By.id("userForm:sendMessageButton")); }
WebElement function() { return driver.findElement(By.id(STR)); }
/** * Get "Nachricht senden" button * * @return WebElement for button */
Get "Nachricht senden" button
getSendMessageButton
{ "repo_name": "chr-krenn/fhj-ws2015-sd13-pse", "path": "pse/src/test/selenium/at/fhj/swd13/pse/test/gui/pageobjects/UserPage.java", "license": "mit", "size": 10727 }
[ "org.openqa.selenium.By", "org.openqa.selenium.WebElement" ]
import org.openqa.selenium.By; import org.openqa.selenium.WebElement;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,061,316
@NonNull float[] filterValues(@NonNull float[] values);
float[] filterValues(@NonNull float[] values);
/** * Filters the given <var>values</var> using filter method specific for this filter. * * @param values The values to filter. * @return Set of filtered values with the same size and order as the given one. */
Filters the given values using filter method specific for this filter
filterValues
{ "repo_name": "android-libraries/android_ui", "path": "library/src/experimental/java/com/albedinsky/android/ui/experimental/sensor/SensorFilter.java", "license": "apache-2.0", "size": 1740 }
[ "android.support.annotation.NonNull" ]
import android.support.annotation.NonNull;
import android.support.annotation.*;
[ "android.support" ]
android.support;
2,409,641
public ArrayList<String> getPublicIPs (Client client, URI location) throws CommunicationException, UnknownHostException{ //Get private and public IP addresses ArrayList<String> publicIps = new ArrayList(); List<Entity> entities = client.describe(location); for (Entity entity : entiti...
ArrayList<String> function (Client client, URI location) throws CommunicationException, UnknownHostException{ ArrayList<String> publicIps = new ArrayList(); List<Entity> entities = client.describe(location); for (Entity entity : entities) { Resource resource = (Resource) entity; Set<Link> links = resource.getLinks(Netw...
/** * Get compute resource public IPs * @param client * @param location * @return Returns public IP addresses from compute resource (VM) specified by URI location * @throws CommunicationException * @throws UnknownHostException */
Get compute resource public IPs
getPublicIPs
{ "repo_name": "karamelchef/karamel", "path": "karamel-core/src/main/java/se/kth/karamel/backend/launcher/occi/OcciLauncher.java", "license": "apache-2.0", "size": 13785 }
[ "cz.cesnet.cloud.occi.api.Client", "cz.cesnet.cloud.occi.api.exception.CommunicationException", "cz.cesnet.cloud.occi.core.Entity", "cz.cesnet.cloud.occi.core.Link", "cz.cesnet.cloud.occi.core.Resource", "cz.cesnet.cloud.occi.infrastructure.IPNetworkInterface", "cz.cesnet.cloud.occi.infrastructure.Netwo...
import cz.cesnet.cloud.occi.api.Client; import cz.cesnet.cloud.occi.api.exception.CommunicationException; import cz.cesnet.cloud.occi.core.Entity; import cz.cesnet.cloud.occi.core.Link; import cz.cesnet.cloud.occi.core.Resource; import cz.cesnet.cloud.occi.infrastructure.IPNetworkInterface; import cz.cesnet.cloud.occi....
import cz.cesnet.cloud.occi.api.*; import cz.cesnet.cloud.occi.api.exception.*; import cz.cesnet.cloud.occi.core.*; import cz.cesnet.cloud.occi.infrastructure.*; import java.net.*; import java.util.*;
[ "cz.cesnet.cloud", "java.net", "java.util" ]
cz.cesnet.cloud; java.net; java.util;
604,270
public Builder withType(@Nullable final String type) { this.bType = type; return this; }
Builder function(@Nullable final String type) { this.bType = type; return this; }
/** * Set the type of this application. * * @param type The type (e.g. Hadoop, Spark, etc) for grouping applications * @return The builder */
Set the type of this application
withType
{ "repo_name": "tgianos/genie", "path": "genie-common/src/main/java/com/netflix/genie/common/dto/Application.java", "license": "apache-2.0", "size": 3427 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,555,694
@Test void testPrefixAndUppercase() { final FqnGrantedAuthorityFactory factory = new FqnGrantedAuthorityFactory("prefix_", true); Assertions.assertEquals(new SimpleGrantedAuthority("PREFIX_GROUP"), factory.createGrantedAuthority(this.group)); }
void testPrefixAndUppercase() { final FqnGrantedAuthorityFactory factory = new FqnGrantedAuthorityFactory(STR, true); Assertions.assertEquals(new SimpleGrantedAuthority(STR), factory.createGrantedAuthority(this.group)); }
/** * Test prefix and uppercase. */
Test prefix and uppercase
testPrefixAndUppercase
{ "repo_name": "hazendaz/waffle", "path": "Source/JNA/waffle-spring-security5/src/test/java/waffle/spring/FqnGrantedAuthorityFactoryTest.java", "license": "mit", "size": 3101 }
[ "org.junit.jupiter.api.Assertions", "org.springframework.security.core.authority.SimpleGrantedAuthority" ]
import org.junit.jupiter.api.Assertions; import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.junit.jupiter.api.*; import org.springframework.security.core.authority.*;
[ "org.junit.jupiter", "org.springframework.security" ]
org.junit.jupiter; org.springframework.security;
362,989
@Override public boolean exactMatch(ExtTarget target) { return this.equals(target) && Objects.equals(this.localSpeaker, target.localSpeaker()) && Objects.equals(this.remoteSpeaker, target.remoteSpeaker()) && Objects.equals(this.type, target.type()); }
boolean function(ExtTarget target) { return this.equals(target) && Objects.equals(this.localSpeaker, target.localSpeaker()) && Objects.equals(this.remoteSpeaker, target.remoteSpeaker()) && Objects.equals(this.type, target.type()); }
/** * Returns whether this target is an exact match to the target given * in the argument. * * @param target other target to match * @return true if the target are an exact match, otherwise false */
Returns whether this target is an exact match to the target given in the argument
exactMatch
{ "repo_name": "paradisecr/ONOS-OXP", "path": "apps/bgpflowspec/flowapi/src/main/java/org/onosproject/flowapi/DefaultExtTarget.java", "license": "apache-2.0", "size": 4344 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
226,875
protected boolean validatePage() { if (super.validatePage()) { String extension = new Path(getFileName()).getFileExtension(); if (extension == null || !FILE_EXTENSIONS.contains(extension)) { String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; ...
boolean function() { if (super.validatePage()) { String extension = new Path(getFileName()).getFileExtension(); if (extension == null !FILE_EXTENSIONS.contains(extension)) { String key = FILE_EXTENSIONS.size() > 1 ? STR : STR; setErrorMessage(ChecktoolresultsEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTE...
/** * The framework calls this to see if the file is correct. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
The framework calls this to see if the file is correct.
validatePage
{ "repo_name": "TristanFAURE/oclCheckTool", "path": "plugins/org.topcased.checktool.xsdrules.editor/src/org/topcased/checktool/xsdrules/xsdRules/presentation/XsdRulesModelWizard.java", "license": "epl-1.0", "size": 18970 }
[ "org.eclipse.core.runtime.Path" ]
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
964,457
private static AuthnRequest getMockAuthnRequest() { AuthnRequest authnRequest = (AuthnRequest) XMLObjectSupport.buildXMLObject(AuthnRequest.DEFAULT_ELEMENT_NAME); authnRequest.setID("_BmPDpaRGHfHCsqRdeoTHVnsPhNvr3ulQdUoXGgnV"); authnRequest.setIssueInstant(Instant.now()); Issuer issuer = (Issuer) XMLO...
static AuthnRequest function() { AuthnRequest authnRequest = (AuthnRequest) XMLObjectSupport.buildXMLObject(AuthnRequest.DEFAULT_ELEMENT_NAME); authnRequest.setID(STR); authnRequest.setIssueInstant(Instant.now()); Issuer issuer = (Issuer) XMLObjectSupport.buildXMLObject(Issuer.DEFAULT_ELEMENT_NAME); issuer.setFormat(Is...
/** * Creates an {@link AuthnRequest} that we sign. * * @return an authentication request object */
Creates an <code>AuthnRequest</code> that we sign
getMockAuthnRequest
{ "repo_name": "litsec/eidas-opensaml", "path": "opensaml4/src/test/java/se/litsec/eidas/opensaml/xmlsec/EidasSecurityConfigurationTest.java", "license": "apache-2.0", "size": 8800 }
[ "java.time.Instant", "org.opensaml.core.xml.util.XMLObjectSupport", "org.opensaml.saml.saml2.core.AuthnRequest", "org.opensaml.saml.saml2.core.Issuer" ]
import java.time.Instant; import org.opensaml.core.xml.util.XMLObjectSupport; import org.opensaml.saml.saml2.core.AuthnRequest; import org.opensaml.saml.saml2.core.Issuer;
import java.time.*; import org.opensaml.core.xml.util.*; import org.opensaml.saml.saml2.core.*;
[ "java.time", "org.opensaml.core", "org.opensaml.saml" ]
java.time; org.opensaml.core; org.opensaml.saml;
593,065
EClass getStringObjectConverter();
EClass getStringObjectConverter();
/** * Returns the meta object for class '{@link org.eclipse.gmf.runtime.notation.StringObjectConverter <em>String Object Converter</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>String Object Converter</em>'. * @see org.eclipse.gmf.runtime.notation.StringObj...
Returns the meta object for class '<code>org.eclipse.gmf.runtime.notation.StringObjectConverter String Object Converter</code>'.
getStringObjectConverter
{ "repo_name": "ghillairet/gmf-tooling-gwt-runtime", "path": "org.eclipse.gmf.runtime.notation.gwt/src/org/eclipse/gmf/runtime/notation/NotationPackage.java", "license": "epl-1.0", "size": 270096 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
132,850
public Cursor getAllUniqueUserLibraries(Context context) { String allLibraries = context.getResources().getString(R.string.all_libraries); String googlePlayMusic = context.getResources().getString(R.string.google_play_music_no_asterisk); allLibraries = allLibraries.replace("'", "''"); googlePlay...
Cursor function(Context context) { String allLibraries = context.getResources().getString(R.string.all_libraries); String googlePlayMusic = context.getResources().getString(R.string.google_play_music_no_asterisk); allLibraries = allLibraries.replace("'STR''"); googlePlayMusic = googlePlayMusic.replace("'STR''"); String...
/** * Returns a cursor with all libraries except the default * ones ("All Libraries" and "Google Play Music"). */
Returns a cursor with all libraries except the default ones ("All Libraries" and "Google Play Music")
getAllUniqueUserLibraries
{ "repo_name": "yongjiliu/MusicPlayer", "path": "ACEMusicPlayer/src/main/java/com/aniruddhc/acemusic/player/DBHelpers/DBAccessHelper.java", "license": "gpl-2.0", "size": 72380 }
[ "android.content.Context", "android.database.Cursor" ]
import android.content.Context; import android.database.Cursor;
import android.content.*; import android.database.*;
[ "android.content", "android.database" ]
android.content; android.database;
1,180,961
private static void getStartKeyWithFilter( Map<CarbonDimension, List<ColumnFilterInfo>> dimensionFilter, SegmentProperties segmentProperties, long[] startKey, List<long[]> startKeyList) { for (Map.Entry<CarbonDimension, List<ColumnFilterInfo>> entry : dimensionFilter.entrySet()) { List<ColumnFil...
static void function( Map<CarbonDimension, List<ColumnFilterInfo>> dimensionFilter, SegmentProperties segmentProperties, long[] startKey, List<long[]> startKeyList) { for (Map.Entry<CarbonDimension, List<ColumnFilterInfo>> entry : dimensionFilter.entrySet()) { List<ColumnFilterInfo> values = entry.getValue(); if (null ...
/** * This method will fill the start key array with the surrogate key present * in filterinfo instance. * * @param dimensionFilter * @param startKey */
This method will fill the start key array with the surrogate key present in filterinfo instance
getStartKeyWithFilter
{ "repo_name": "aniketadnaik/carbondataStreamIngest", "path": "core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java", "license": "apache-2.0", "size": 69343 }
[ "java.util.List", "java.util.Map", "org.apache.carbondata.core.datastore.block.SegmentProperties", "org.apache.carbondata.core.metadata.encoder.Encoding", "org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension" ]
import java.util.List; import java.util.Map; import org.apache.carbondata.core.datastore.block.SegmentProperties; import org.apache.carbondata.core.metadata.encoder.Encoding; import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension;
import java.util.*; import org.apache.carbondata.core.datastore.block.*; import org.apache.carbondata.core.metadata.encoder.*; import org.apache.carbondata.core.metadata.schema.table.column.*;
[ "java.util", "org.apache.carbondata" ]
java.util; org.apache.carbondata;
975,787
public static void deleteObjectData(KVStore kv) { // Get ranges final KeyRange metaDataRange = KeyRange.forPrefix(Layout.getMetaDataKeyPrefix()); final KeyRange versionIndexRange = KeyRange.forPrefix(Layout.getObjectVersionIndexKeyPrefix()); assert metaDataRange.contains(versionInde...
static void function(KVStore kv) { final KeyRange metaDataRange = KeyRange.forPrefix(Layout.getMetaDataKeyPrefix()); final KeyRange versionIndexRange = KeyRange.forPrefix(Layout.getObjectVersionIndexKeyPrefix()); assert metaDataRange.contains(versionIndexRange); kv.removeRange(null, metaDataRange.getMin()); kv.removeRa...
/** * Delete all object and index data from the given {@link KVStore}. * * <p> * Upon return, the {@link KVStore} will still contain meta-data, but not any objects. * * @param kv key/value database */
Delete all object and index data from the given <code>KVStore</code>. Upon return, the <code>KVStore</code> will still contain meta-data, but not any objects
deleteObjectData
{ "repo_name": "permazen/permazen", "path": "permazen-coreapi/src/main/java/io/permazen/core/Layout.java", "license": "apache-2.0", "size": 14248 }
[ "io.permazen.kv.KVStore", "io.permazen.kv.KeyRange" ]
import io.permazen.kv.KVStore; import io.permazen.kv.KeyRange;
import io.permazen.kv.*;
[ "io.permazen.kv" ]
io.permazen.kv;
1,168,849
private JPanel buildRatingPane() { JPanel p = new JPanel(); p.add(ratingBox); p.add(ratingOptions); p.add(rating); return UIUtilities.buildComponentPanel(p, 0, 0); }
JPanel function() { JPanel p = new JPanel(); p.add(ratingBox); p.add(ratingOptions); p.add(rating); return UIUtilities.buildComponentPanel(p, 0, 0); }
/** * Builds and lays out the components used to select the rating level. * * @return See above. */
Builds and lays out the components used to select the rating level
buildRatingPane
{ "repo_name": "mtbc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/util/FilteringDialog.java", "license": "gpl-2.0", "size": 23822 }
[ "javax.swing.JPanel", "org.openmicroscopy.shoola.util.ui.UIUtilities" ]
import javax.swing.JPanel; import org.openmicroscopy.shoola.util.ui.UIUtilities;
import javax.swing.*; import org.openmicroscopy.shoola.util.ui.*;
[ "javax.swing", "org.openmicroscopy.shoola" ]
javax.swing; org.openmicroscopy.shoola;
1,865,340
private void checkValues(JsonObject load, int rate, int latest, boolean valid, String device) throws UnsupportedEncodingException { assertThat(load, notNullValue()); assertThat(load.get("rate").asInt(), is(rate)); assertThat(load.get("latest").asInt(), is(latest)...
void function(JsonObject load, int rate, int latest, boolean valid, String device) throws UnsupportedEncodingException { assertThat(load, notNullValue()); assertThat(load.get("rate").asInt(), is(rate)); assertThat(load.get(STR).asInt(), is(latest)); assertThat(load.get("valid").asBoolean(), is(valid)); assertThat(load....
/** * Checks that the values in a JSON representation of a Load are * correct. * * @param load JSON for the Loan object * @param rate expected vale fo rate * @param latest expected value for latest * @param valid expected value for valid flag * @param device expected device ID ...
Checks that the values in a JSON representation of a Load are correct
checkValues
{ "repo_name": "sdnwiselab/onos", "path": "web/api/src/test/java/org/onosproject/rest/resources/StatisticsResourceTest.java", "license": "apache-2.0", "size": 6923 }
[ "com.eclipsesource.json.JsonObject", "java.io.UnsupportedEncodingException", "java.net.URLDecoder", "org.hamcrest.Matchers", "org.junit.Assert" ]
import com.eclipsesource.json.JsonObject; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import org.hamcrest.Matchers; import org.junit.Assert;
import com.eclipsesource.json.*; import java.io.*; import java.net.*; import org.hamcrest.*; import org.junit.*;
[ "com.eclipsesource.json", "java.io", "java.net", "org.hamcrest", "org.junit" ]
com.eclipsesource.json; java.io; java.net; org.hamcrest; org.junit;
2,262,669
public List<Interceptor> interceptors() { return interceptors; }
List<Interceptor> function() { return interceptors; }
/** * Returns an immutable list of interceptors that observe the full span of each call: from before * the connection is established (if any) until after the response source is selected (either the * origin server, cache, or both). */
Returns an immutable list of interceptors that observe the full span of each call: from before the connection is established (if any) until after the response source is selected (either the origin server, cache, or both)
interceptors
{ "repo_name": "xph906/NewOKHttp", "path": "okhttp/src/main/java/okhttp3/OkHttpClient.java", "license": "apache-2.0", "size": 26295 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,292,859
byte[] getResponseBody() throws IOException;
byte[] getResponseBody() throws IOException;
/** * Return the response as raw bytes. * @return results bytes * @throws java.io.IOException if io error during result read */
Return the response as raw bytes
getResponseBody
{ "repo_name": "tjordanchat/rundeck", "path": "core/src/main/java/com/dtolabs/client/utils/ServerResponse.java", "license": "apache-2.0", "size": 1533 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,343,042
public static final Map<String, ?> getFileSystemEnv( URI uri, Map<String, ?> env ) { final Map<String, Object> newEnv = new HashMap<>(); if( uri == null ) { mergeEnv( newEnv, env ); } else { readConfig( newEnv, uri ); mergeEnv( newEnv, env ); ...
static final Map<String, ?> function( URI uri, Map<String, ?> env ) { final Map<String, Object> newEnv = new HashMap<>(); if( uri == null ) { mergeEnv( newEnv, env ); } else { readConfig( newEnv, uri ); mergeEnv( newEnv, env ); parseQueryParams( newEnv, uri ); } return newEnv; }
/** * Returns an environment map based on the supplied map (if non-null) and any query parameters in the uri. * * @param uri * @param env * * @return */
Returns an environment map based on the supplied map (if non-null) and any query parameters in the uri
getFileSystemEnv
{ "repo_name": "peter-mount/filesystem", "path": "filesystem-core/src/main/java/onl/area51/filesystem/FileSystemUtils.java", "license": "apache-2.0", "size": 14784 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,313,634
public void accumulateSimpleLogFilesForSlow(String mode){ String filter1 = "_standard_simple_analyzed"; ArrayList<File> files1 = new ArrayList<File>(); //begin with creation of new file JFileChooser fc = new JFileChooser(); //set directory and ".log" filter fc.setMultiSelectionEnabled(tru...
void function(String mode){ String filter1 = STR; ArrayList<File> files1 = new ArrayList<File>(); JFileChooser fc = new JFileChooser(); fc.setMultiSelectionEnabled(true); fc.setCurrentDirectory(new File(System.getProperty(STR))); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); int status = fc.showDialog(this, Message...
/** * Opens log files and calculates data for diagram. More than one file can be opened. If there is more than one version (same scenario with new random vehicles) of the file opening one version is enough. The script will look for version1, version2, version3... */
Opens log files and calculates data for diagram. More than one file can be opened. If there is more than one version (same scenario with new random vehicles) of the file opening one version is enough. The script will look for version1, version2, version3..
accumulateSimpleLogFilesForSlow
{ "repo_name": "VanetSim/VanetSim", "path": "src/vanetsim/gui/controlpanels/ReportingControlPanel.java", "license": "gpl-3.0", "size": 77634 }
[ "java.io.BufferedWriter", "java.io.File", "java.io.FileWriter", "java.util.ArrayList", "javax.swing.JFileChooser" ]
import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.util.ArrayList; import javax.swing.JFileChooser;
import java.io.*; import java.util.*; import javax.swing.*;
[ "java.io", "java.util", "javax.swing" ]
java.io; java.util; javax.swing;
661,216
public static MozuClient<com.mozu.api.contracts.productadmin.AttributeCollection> getAttributesClient() throws Exception { return getAttributesClient( null, null, null, null, null); }
static MozuClient<com.mozu.api.contracts.productadmin.AttributeCollection> function() throws Exception { return getAttributesClient( null, null, null, null, null); }
/** * * <p><pre><code> * MozuClient<com.mozu.api.contracts.productadmin.AttributeCollection> mozuClient=GetAttributesClient(); * client.setBaseAddress(url); * client.executeRequest(); * AttributeCollection attributeCollection = client.Result(); * </code></pre></p> * @param dataViewMode DataView...
<code><code> MozuClient mozuClient=GetAttributesClient(); client.setBaseAddress(url); client.executeRequest(); AttributeCollection attributeCollection = client.Result(); </code></code>
getAttributesClient
{ "repo_name": "Mozu/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/attributedefinition/AttributeClient.java", "license": "mit", "size": 12978 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
895,014
private void dumpTree(CMNode nodeCur, int level) { for (int index = 0; index < level; index++) System.out.print(" "); int type = nodeCur.type(); if ((type == XMLContentSpec.CONTENTSPECNODE_CHOICE) || (type == XMLContentSpec.CONTENTSPECNODE_SEQ)) { ...
void function(CMNode nodeCur, int level) { for (int index = 0; index < level; index++) System.out.print(" "); int type = nodeCur.type(); if ((type == XMLContentSpec.CONTENTSPECNODE_CHOICE) (type == XMLContentSpec.CONTENTSPECNODE_SEQ)) { if (type == XMLContentSpec.CONTENTSPECNODE_CHOICE) System.out.print(STR); else Syst...
/** * Dumps the tree of the current node to standard output. * * @param nodeCur The current node. * @param level The maximum levels to output. * * @exception CMException Thrown on error. */
Dumps the tree of the current node to standard output
dumpTree
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java", "license": "apache-2.0", "size": 39707 }
[ "com.sun.org.apache.xerces.internal.impl.dtd.XMLContentSpec" ]
import com.sun.org.apache.xerces.internal.impl.dtd.XMLContentSpec;
import com.sun.org.apache.xerces.internal.impl.dtd.*;
[ "com.sun.org" ]
com.sun.org;
695,087
protected void testGetReadMethod(final Object bean, final String properties[], final String className) { final PropertyDescriptor pd[] = propertyUtils.getPropertyDescriptors(bean); for (final String propertie : properties) { // Identify the property descriptor for this property if (propertie.equ...
void function(final Object bean, final String properties[], final String className) { final PropertyDescriptor pd[] = propertyUtils.getPropertyDescriptors(bean); for (final String propertie : properties) { if (propertie.equals(STR)) { continue; } if (propertie.equals(STR)) { continue; } if (propertie.equals(STR)) { con...
/** * Base for testGetReadMethod() series of tests. * * @param bean * Bean for which to retrieve read methods. * @param properties * Property names to search for * @param className * Class name where this method should be defined */
Base for testGetReadMethod() series of tests
testGetReadMethod
{ "repo_name": "takacsot/q-beanutils", "path": "src/test/java/eu/qualityontime/commons/QPropertyUtilsBeanTest.java", "license": "apache-2.0", "size": 141088 }
[ "java.beans.PropertyDescriptor", "java.lang.reflect.Method" ]
import java.beans.PropertyDescriptor; import java.lang.reflect.Method;
import java.beans.*; import java.lang.reflect.*;
[ "java.beans", "java.lang" ]
java.beans; java.lang;
1,590,995
protected void configurePropertySources(ConfigurableEnvironment environment, String[] args) { MutablePropertySources sources = environment.getPropertySources(); if (this.defaultProperties != null && !this.defaultProperties.isEmpty()) { sources.addLast( new MapPropertySource("defaultProperties", this.d...
void function(ConfigurableEnvironment environment, String[] args) { MutablePropertySources sources = environment.getPropertySources(); if (this.defaultProperties != null && !this.defaultProperties.isEmpty()) { sources.addLast( new MapPropertySource(STR, this.defaultProperties)); } if (this.addCommandLineProperties && a...
/** * Add, remove or re-order any {@link PropertySource}s in this application's * environment. * @param environment this application's environment * @param args arguments passed to the {@code run} method * @see #configureEnvironment(ConfigurableEnvironment, String[]) */
Add, remove or re-order any <code>PropertySource</code>s in this application's environment
configurePropertySources
{ "repo_name": "candrews/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/SpringApplication.java", "license": "apache-2.0", "size": 44385 }
[ "org.springframework.core.env.CommandLinePropertySource", "org.springframework.core.env.CompositePropertySource", "org.springframework.core.env.ConfigurableEnvironment", "org.springframework.core.env.MapPropertySource", "org.springframework.core.env.MutablePropertySources", "org.springframework.core.env.P...
import org.springframework.core.env.CommandLinePropertySource; import org.springframework.core.env.CompositePropertySource; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MapPropertySource; import org.springframework.core.env.MutablePropertySources; import org.springfra...
import org.springframework.core.env.*;
[ "org.springframework.core" ]
org.springframework.core;
422,574
public static CtType cloneTestClassAndAddGivenTest(CtType original, List<CtMethod<?>> methods) { CtType clone = original.clone(); original.getPackage().addType(clone); methods.forEach(clone::addMethod); return clone; }
static CtType function(CtType original, List<CtMethod<?>> methods) { CtType clone = original.clone(); original.getPackage().addType(clone); methods.forEach(clone::addMethod); return clone; }
/** * Clones the test class and adds the test methods. * * @param original Test class * @param methods Test methods * @return Test class with new methods */
Clones the test class and adds the test methods
cloneTestClassAndAddGivenTest
{ "repo_name": "danzone/dspot", "path": "dspot/src/main/java/eu/stamp_project/utils/AmplificationHelper.java", "license": "lgpl-3.0", "size": 19451 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,800,496
public void dumpTo(Writer out, String indent) throws IOException { out.write(indent + "Status for executor: " + executor + "\n"); out.write(indent + "=======================================\n"); out.write(indent + queuedEvents.size() + " events queued, " + running.size() + " running\n");...
void function(Writer out, String indent) throws IOException { out.write(indent + STR + executor + "\n"); out.write(indent + STR); out.write(indent + queuedEvents.size() + STR + running.size() + STR); if (!queuedEvents.isEmpty()) { out.write(indent + STR); for (EventHandler e : queuedEvents) { out.write(indent + " " + e...
/** * Dump a textual representation of the executor's status * to the given writer. * * @param out the stream to write to * @param indent a string prefix for each line, used for indentation */
Dump a textual representation of the executor's status to the given writer
dumpTo
{ "repo_name": "Guavus/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/executor/ExecutorService.java", "license": "apache-2.0", "size": 11282 }
[ "java.io.IOException", "java.io.Writer", "java.lang.management.ThreadInfo", "org.apache.hadoop.hbase.monitoring.ThreadMonitoring" ]
import java.io.IOException; import java.io.Writer; import java.lang.management.ThreadInfo; import org.apache.hadoop.hbase.monitoring.ThreadMonitoring;
import java.io.*; import java.lang.management.*; import org.apache.hadoop.hbase.monitoring.*;
[ "java.io", "java.lang", "org.apache.hadoop" ]
java.io; java.lang; org.apache.hadoop;
885,093
EventQueue.invokeLater(new Runnable() {
EventQueue.invokeLater(new Runnable() {
/** * Launch the application. */
Launch the application
main
{ "repo_name": "sfaci/vlcj", "path": "HolaVLCJ/src/org/sfsoft/holavlcj/HolaVLCJ.java", "license": "gpl-2.0", "size": 5289 }
[ "java.awt.EventQueue" ]
import java.awt.EventQueue;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,416,796
public static String takeWhile(GString self, @ClosureParams(value=SimpleType.class, options="char") Closure condition) { return (String) takeWhile(self.toString(), condition); }
static String function(GString self, @ClosureParams(value=SimpleType.class, options="char") Closure condition) { return (String) takeWhile(self.toString(), condition); }
/** * A GString variant of the equivalent GString method. * * @param self the original GString * @param condition the closure that must evaluate to true to continue taking elements * @return a prefix of elements in the GString where each * element passed to the given closure e...
A GString variant of the equivalent GString method
takeWhile
{ "repo_name": "OpenBEL/kam-nav", "path": "tools/groovy/src/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java", "license": "apache-2.0", "size": 132600 }
[ "groovy.lang.Closure", "groovy.lang.GString", "groovy.transform.stc.ClosureParams", "groovy.transform.stc.SimpleType" ]
import groovy.lang.Closure; import groovy.lang.GString; import groovy.transform.stc.ClosureParams; import groovy.transform.stc.SimpleType;
import groovy.lang.*; import groovy.transform.stc.*;
[ "groovy.lang", "groovy.transform.stc" ]
groovy.lang; groovy.transform.stc;
1,426,803
public AlipayObject getBizModel() { return this.bizModel; }
AlipayObject function() { return this.bizModel; }
/** * <p>Getter for the field <code>bizModel</code>.</p> * * @return a {@link cn.felord.wepay.ali.sdk.api.AlipayObject} object. */
Getter for the field <code>bizModel</code>
getBizModel
{ "repo_name": "NotFound403/WePay", "path": "src/main/java/cn/felord/wepay/ali/sdk/api/request/KoubeiCraftsmanDataProviderCreateRequest.java", "license": "apache-2.0", "size": 4813 }
[ "cn.felord.wepay.ali.sdk.api.AlipayObject" ]
import cn.felord.wepay.ali.sdk.api.AlipayObject;
import cn.felord.wepay.ali.sdk.api.*;
[ "cn.felord.wepay" ]
cn.felord.wepay;
817,024
public String getMessage(String code, Object[] args) throws NoSuchMessageException { return this.messageSource.getMessage(code, args, getDefaultLocale()); }
String function(String code, Object[] args) throws NoSuchMessageException { return this.messageSource.getMessage(code, args, getDefaultLocale()); }
/** * Retrieve the message for the given code and the default Locale. * @param code code of the message * @param args arguments for the message, or <code>null</code> if none * @return the message * @throws org.springframework.context.NoSuchMessageException if not found */
Retrieve the message for the given code and the default Locale
getMessage
{ "repo_name": "cbeams-archive/spring-framework-2.5.x", "path": "src/org/springframework/context/support/MessageSourceAccessor.java", "license": "apache-2.0", "size": 7059 }
[ "org.springframework.context.NoSuchMessageException" ]
import org.springframework.context.NoSuchMessageException;
import org.springframework.context.*;
[ "org.springframework.context" ]
org.springframework.context;
1,396,427
public static <T> T field(Class<?> cls, String fieldName) throws IgniteCheckedException { assert cls != null; assert fieldName != null; try { for (Class c = cls; cls != Object.class; cls = cls.getSuperclass()) { for (Field field : c.getDeclaredFields()) { ...
static <T> T function(Class<?> cls, String fieldName) throws IgniteCheckedException { assert cls != null; assert fieldName != null; try { for (Class c = cls; cls != Object.class; cls = cls.getSuperclass()) { for (Field field : c.getDeclaredFields()) { if (field.getName().equals(fieldName)) { if (!Modifier.isStatic(fiel...
/** * Gets field value. * * @param cls Class. * @param fieldName Field name. * @return Field value. * @throws IgniteCheckedException If static field with given name cannot be retreived. */
Gets field value
field
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 314980 }
[ "java.lang.reflect.Field", "java.lang.reflect.Modifier", "org.apache.ignite.IgniteCheckedException" ]
import java.lang.reflect.Field; import java.lang.reflect.Modifier; import org.apache.ignite.IgniteCheckedException;
import java.lang.reflect.*; import org.apache.ignite.*;
[ "java.lang", "org.apache.ignite" ]
java.lang; org.apache.ignite;
1,151,884
public void setLogLevel(Level level) { this.level = level; }
void function(Level level) { this.level = level; }
/** * Sets the RemoteWebDriver's client log level. * * @param level The log level to use. */
Sets the RemoteWebDriver's client log level
setLogLevel
{ "repo_name": "denis-vilyuzhanin/selenium", "path": "java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java", "license": "apache-2.0", "size": 27086 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
824,710
public final void insertItems(Collection<SpatialIndexItem> indexItems) throws SpatialIndexException { for (SpatialIndexItem indexItem : indexItems) { insertItem(indexItem.getEnvelope(), indexItem.getItem()); } }
final void function(Collection<SpatialIndexItem> indexItems) throws SpatialIndexException { for (SpatialIndexItem indexItem : indexItems) { insertItem(indexItem.getEnvelope(), indexItem.getItem()); } }
/** * Items to add to an unbuilt Spatial Index. * * @param indexItems * @throws SpatialIndexException */
Items to add to an unbuilt Spatial Index
insertItems
{ "repo_name": "apache/jena", "path": "jena-geosparql/src/main/java/org/apache/jena/geosparql/spatial/SpatialIndex.java", "license": "apache-2.0", "size": 20643 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,932,216
public byte[] getRawContent() throws UnsupportedEncodingException { return getBytes(); }
byte[] function() throws UnsupportedEncodingException { return getBytes(); }
/** * This method delivers the binary representation of the fields data in * order to be directly written to the file.<br> * * @return Binary data representing the current tag field.<br> * @throws java.io.UnsupportedEncodingException * Most tag data represents text. In some cases ...
This method delivers the binary representation of the fields data in order to be directly written to the file
getRawContent
{ "repo_name": "nhminus/jaudiotagger-androidpatch", "path": "src/org/jaudiotagger/audio/flac/metadatablock/MetadataBlockDataPicture.java", "license": "lgpl-2.1", "size": 11690 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,084,742
@ApiModelProperty(value = "") public Pagination getPagination() { return pagination; }
@ApiModelProperty(value = "") Pagination function() { return pagination; }
/** * Get pagination * * @return pagination */
Get pagination
getPagination
{ "repo_name": "XeroAPI/Xero-Java", "path": "src/main/java/com/xero/models/payrollnz/SalaryAndWages.java", "license": "mit", "size": 4343 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,193,497
int deletePortalEventsBefore(DateTime endTime);
int deletePortalEventsBefore(DateTime endTime);
/** * Delete events with timestamps from before the specified date (exclusive) */
Delete events with timestamps from before the specified date (exclusive)
deletePortalEventsBefore
{ "repo_name": "pspaude/uPortal", "path": "uportal-war/src/main/java/org/jasig/portal/events/handlers/db/IPortalEventDao.java", "license": "apache-2.0", "size": 3650 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,329,461
public Hashtable hashAllConglomerateDescriptorsByNumber(TransactionController tc) throws StandardException;
Hashtable function(TransactionController tc) throws StandardException;
/** * Get all of the ConglomerateDescriptors in the database and * hash them by conglomerate number. * This is useful as a performance optimization for the locking VTIs. * NOTE: This method will scan SYS.SYSCONGLOMERATES at READ COMMITTED. * It should really scan at READ UNCOMMITTED, but there is no such *...
Get all of the ConglomerateDescriptors in the database and hash them by conglomerate number. This is useful as a performance optimization for the locking VTIs. It should really scan at READ UNCOMMITTED, but there is no such thing yet
hashAllConglomerateDescriptorsByNumber
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/sql/dictionary/DataDictionary.java", "license": "apache-2.0", "size": 74186 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.store.access.TransactionController", "java.util.Hashtable" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.store.access.TransactionController; import java.util.Hashtable;
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.store.access.*; import java.util.*;
[ "com.pivotal.gemfirexd", "java.util" ]
com.pivotal.gemfirexd; java.util;
307,292
void onCropWindowChanged(boolean inProgress); } //endregion //region: Inner class: ScaleListener private class ScaleListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
void onCropWindowChanged(boolean inProgress); } private class ScaleListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
/** * Called after a change in crop window rectangle. * * @param inProgress is the crop window change operation is still in progress by user touch */
Called after a change in crop window rectangle
onCropWindowChanged
{ "repo_name": "tibbi/Android-Image-Cropper", "path": "cropper/src/main/java/com/theartofdev/edmodo/cropper/CropOverlayView.java", "license": "apache-2.0", "size": 39574 }
[ "android.view.ScaleGestureDetector" ]
import android.view.ScaleGestureDetector;
import android.view.*;
[ "android.view" ]
android.view;
102,584
public void test_removeAll_rawRecords() { final MyRawStore store = new MyRawStore(new SimpleMemoryRawStore()); final IndexMetadata metadata = new IndexMetadata(UUID.randomUUID()); metadata.setBranchingFactor(10); metadata.setRawRecords(true); metadata.setMaxRecLen(6...
void function() { final MyRawStore store = new MyRawStore(new SimpleMemoryRawStore()); final IndexMetadata metadata = new IndexMetadata(UUID.randomUUID()); metadata.setBranchingFactor(10); metadata.setRawRecords(true); metadata.setMaxRecLen(64); final BTree btree = BTree.create(store, metadata); assertEquals(64, btree....
/** * Unit test for {@link BTree#removeAll()} which verifies that the tuples * are actually deleted one-by-one and the backing raw records released if * the index supports raw records. */
Unit test for <code>BTree#removeAll()</code> which verifies that the tuples are actually deleted one-by-one and the backing raw records released if the index supports raw records
test_removeAll_rawRecords
{ "repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes", "path": "bigdata/src/test/com/bigdata/btree/TestRemoveAll.java", "license": "gpl-2.0", "size": 6426 }
[ "com.bigdata.btree.data.ILeafData", "com.bigdata.rawstore.IRawStore", "com.bigdata.rawstore.RawStoreDelegate", "com.bigdata.rawstore.SimpleMemoryRawStore", "java.util.UUID" ]
import com.bigdata.btree.data.ILeafData; import com.bigdata.rawstore.IRawStore; import com.bigdata.rawstore.RawStoreDelegate; import com.bigdata.rawstore.SimpleMemoryRawStore; import java.util.UUID;
import com.bigdata.btree.data.*; import com.bigdata.rawstore.*; import java.util.*;
[ "com.bigdata.btree", "com.bigdata.rawstore", "java.util" ]
com.bigdata.btree; com.bigdata.rawstore; java.util;
2,684,897
public String getFilename() { return StringUtils.getFilename(this.path); }
String function() { return StringUtils.getFilename(this.path); }
/** * This implementation returns the name of the file that this ServletContext * resource refers to. * @see org.springframework.util.StringUtils#getFilename(String) */
This implementation returns the name of the file that this ServletContext resource refers to
getFilename
{ "repo_name": "GIP-RECIA/esco-grouper-ui", "path": "ext/bundles/org.springframework.web/src/main/java/org/springframework/web/context/support/ServletContextResource.java", "license": "apache-2.0", "size": 6975 }
[ "org.springframework.util.StringUtils" ]
import org.springframework.util.StringUtils;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
2,417,534