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
jPanel1 = new javax.swing.JPanel(); jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel2 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); buttonProceso = new javax.swing.JButton(); rutaTextField = new javax.swing.JTextField(); jScrollPane1 = new ...
jPanel1 = new javax.swing.JPanel(); jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel2 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); buttonProceso = new javax.swing.JButton(); rutaTextField = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); tablaETL = new javax.swing.JT...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "pxbloochoa/WEKMINER", "path": "WekMiner/src/com/itz/Interfaces/prueba.java", "license": "gpl-3.0", "size": 17674 }
[ "javax.swing.JTable" ]
import javax.swing.JTable;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
133,139
@Test public void testCreateOrganizationWithInvalidNames() { final ApiClient webClientUser2 = getWebClient(USER_2_USERNAME, testingPostgres); OrganizationsApi organizationsApi = new OrganizationsApi(webClientUser2); badNames.forEach(name -> createOrgWithBadName(name, organizationsApi)); ...
void function() { final ApiClient webClientUser2 = getWebClient(USER_2_USERNAME, testingPostgres); OrganizationsApi organizationsApi = new OrganizationsApi(webClientUser2); badNames.forEach(name -> createOrgWithBadName(name, organizationsApi)); }
/** * Tests that you cannot create an Organization where the name is all numbers. * This is because we would like to use the same endpoint to grab an Organization by either name or DB id. * <p> * Also tests some other cases where the name should fail */
Tests that you cannot create an Organization where the name is all numbers. This is because we would like to use the same endpoint to grab an Organization by either name or DB id. Also tests some other cases where the name should fail
testCreateOrganizationWithInvalidNames
{ "repo_name": "ga4gh/dockstore", "path": "dockstore-integration-testing/src/test/java/io/dockstore/client/cli/OrganizationIT.java", "license": "apache-2.0", "size": 141020 }
[ "io.swagger.client.ApiClient", "io.swagger.client.api.OrganizationsApi" ]
import io.swagger.client.ApiClient; import io.swagger.client.api.OrganizationsApi;
import io.swagger.client.*; import io.swagger.client.api.*;
[ "io.swagger.client" ]
io.swagger.client;
1,527,347
private boolean isBuiltByCurrentProject(BuildTarget buildTarget) { return initialTargets.contains(buildTarget); }
boolean function(BuildTarget buildTarget) { return initialTargets.contains(buildTarget); }
/** * Whether a given build target is built by the project being generated, or being build elsewhere. */
Whether a given build target is built by the project being generated, or being build elsewhere
isBuiltByCurrentProject
{ "repo_name": "OkBuilds/buck", "path": "src/com/facebook/buck/apple/project_generator/ProjectGenerator.java", "license": "apache-2.0", "size": 125323 }
[ "com.facebook.buck.model.BuildTarget" ]
import com.facebook.buck.model.BuildTarget;
import com.facebook.buck.model.*;
[ "com.facebook.buck" ]
com.facebook.buck;
426,282
public void setData(String data) { this.data = data; } /* public void setTimestamp(Timestamp Timestamp) { this.timestamp = Timestamp; }
void function(String data) { this.data = data; } /* public void setTimestamp(Timestamp Timestamp) { this.timestamp = Timestamp; }
/** * Set text data for the task * * @param String data */
Set text data for the task
setData
{ "repo_name": "BUTeam3/CS673-Project", "path": "src/main/java/com/buteam3/entity/Record.java", "license": "apache-2.0", "size": 2454 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
597,236
public Timestamp getDate1(); public static final String COLUMNNAME_IsActive = "IsActive";
Timestamp function(); public static final String COLUMNNAME_IsActive = STR;
/** Get Date. * Date when business is not conducted */
Get Date. Date when business is not conducted
getDate1
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/I_C_NonBusinessDay.java", "license": "gpl-2.0", "size": 4857 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
723,320
final String id = new UUID().toString(); final AgentConfig vehicleConfig = AgentConfig .decorate((ObjectNode) getConfig().get("vehicleConfig")); vehicleConfig.setId(id); vehicles.add(new Vehicle(vehicleConfig)); }
final String id = new UUID().toString(); final AgentConfig vehicleConfig = AgentConfig .decorate((ObjectNode) getConfig().get(STR)); vehicleConfig.setId(id); vehicles.add(new Vehicle(vehicleConfig)); }
/** * Creates a vehicle in this VM */
Creates a vehicle in this VM
createVehicle
{ "repo_name": "ludost/tba", "path": "vehicle/src/main/java/nl/ludost/tba/Manager.java", "license": "apache-2.0", "size": 3458 }
[ "com.almende.eve.agent.AgentConfig", "com.fasterxml.jackson.databind.node.ObjectNode" ]
import com.almende.eve.agent.AgentConfig; import com.fasterxml.jackson.databind.node.ObjectNode;
import com.almende.eve.agent.*; import com.fasterxml.jackson.databind.node.*;
[ "com.almende.eve", "com.fasterxml.jackson" ]
com.almende.eve; com.fasterxml.jackson;
2,250,423
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException { return execute(xctxt, xctxt.getCurrentNode()); }
XObject function(XPathContext xctxt) throws javax.xml.transform.TransformerException { return execute(xctxt, xctxt.getCurrentNode()); }
/** * Execute this pattern step, including predicates. * * * @param xctxt XPath runtime context. * * @return {@link org.apache.xpath.patterns.NodeTest#SCORE_NODETEST}, * {@link org.apache.xpath.patterns.NodeTest#SCORE_NONE}, * {@link org.apache.xpath.patterns.NodeTest#SCO...
Execute this pattern step, including predicates
execute
{ "repo_name": "kcsl/immutability-benchmark", "path": "benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xpath/patterns/StepPattern.java", "license": "mit", "size": 27784 }
[ "org.apache.xpath.XPathContext", "org.apache.xpath.objects.XObject" ]
import org.apache.xpath.XPathContext; import org.apache.xpath.objects.XObject;
import org.apache.xpath.*; import org.apache.xpath.objects.*;
[ "org.apache.xpath" ]
org.apache.xpath;
2,198,239
private void readName(StringTokenizer line){ StringTokenizer data = new StringTokenizer(line.nextToken(), " = \" "); data.nextToken(); algorithmName = new String(data.nextToken()); while(data.hasMoreTokens()){ algorithmName += " "+data.nextToken(); //We read the algorithm...
void function(StringTokenizer line){ StringTokenizer data = new StringTokenizer(line.nextToken(), STR STR "+data.nextToken(); } }
/** * It reads the name of the algorithm from the configuration file * @param line StringTokenizer It is the line containing the algorithm name. */
It reads the name of the algorithm from the configuration file
readName
{ "repo_name": "adofsauron/KEEL", "path": "src/keel/Algorithms/Genetic_Rule_Learning/DMEL/parseParameters.java", "license": "gpl-3.0", "size": 6605 }
[ "java.util.StringTokenizer" ]
import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
19,024
private void init(String cat, String key) throws IDOLookupException, CreateException { KeyMappingHome home = (KeyMappingHome) IDOLookup.getHome(KeyMapping.class); KeyMapping map = home.create(); map.setCategory(cat); map.setKey(key); map.store(); }
void function(String cat, String key) throws IDOLookupException, CreateException { KeyMappingHome home = (KeyMappingHome) IDOLookup.getHome(KeyMapping.class); KeyMapping map = home.create(); map.setCategory(cat); map.setKey(key); map.store(); }
/** * Convenience function for the insertStartData() to reduce the clutter and make it easier * to add more required cat - key pairs, needed for initialization * @param cat Category * @param key * @throws IDOLookupException * @throws CreateException */
Convenience function for the insertStartData() to reduce the clutter and make it easier to add more required cat - key pairs, needed for initialization
init
{ "repo_name": "idega/platform2", "path": "src/se/idega/idegaweb/commune/accounting/regulations/data/KeyMappingBMPBean.java", "license": "gpl-3.0", "size": 3789 }
[ "com.idega.data.IDOLookup", "com.idega.data.IDOLookupException", "javax.ejb.CreateException" ]
import com.idega.data.IDOLookup; import com.idega.data.IDOLookupException; import javax.ejb.CreateException;
import com.idega.data.*; import javax.ejb.*;
[ "com.idega.data", "javax.ejb" ]
com.idega.data; javax.ejb;
1,100,652
private boolean isLogicalRequestSuccessful(LogicalRequest logicalRequest) { if(logicalRequest != null) { for(ShortTaskStatus ts : logicalRequest.getRequestStatus().getTasks()) { if(HostRoleStatus.valueOf(ts.getStatus()) != HostRoleStatus.COMPLETED) { return false; } } } ...
boolean function(LogicalRequest logicalRequest) { if(logicalRequest != null) { for(ShortTaskStatus ts : logicalRequest.getRequestStatus().getTasks()) { if(HostRoleStatus.valueOf(ts.getStatus()) != HostRoleStatus.COMPLETED) { return false; } } } return true; }
/** * Returns if all the tasks in the logical request have completed state. * @param logicalRequest * @return */
Returns if all the tasks in the logical request have completed state
isLogicalRequestSuccessful
{ "repo_name": "alexryndin/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java", "license": "apache-2.0", "size": 49434 }
[ "org.apache.ambari.server.actionmanager.HostRoleStatus", "org.apache.ambari.server.controller.ShortTaskStatus" ]
import org.apache.ambari.server.actionmanager.HostRoleStatus; import org.apache.ambari.server.controller.ShortTaskStatus;
import org.apache.ambari.server.actionmanager.*; import org.apache.ambari.server.controller.*;
[ "org.apache.ambari" ]
org.apache.ambari;
29,093
public static void setupDirectionalPenalty(PaintContext pc, int speed, boolean gpsRecenter) { //Only use this heuristic if we are travelling faster than 6 km/h, as otherwise //the direction estimate is too bad to be of much use. Also, only use the direction //if we are actually using the gps to center the map ...
static void function(PaintContext pc, int speed, boolean gpsRecenter) { pc.bUsedGpsCenter = gpsRecenter; pc.nodeGpsPos = new Node(pc.trace.getGpsLat(), pc.trace.getGpsLon()); if ((speed < 7) !gpsRecenter) { addDirectionalPenalty = false; scalePen = 0; return; } addDirectionalPenalty = true; scalePen = MoreMath.RADIANT_...
/** * Precalculate parameters to quickly test the the directional overlap between * a way and the current direction of travelling. This is used in processWay * to calculate the most likely way we are currently travelling on. * * @param pc * @param speed */
Precalculate parameters to quickly test the the directional overlap between a way and the current direction of travelling. This is used in processWay to calculate the most likely way we are currently travelling on
setupDirectionalPenalty
{ "repo_name": "papousek/GpsMid", "path": "src/de/ueller/gpsmid/mapdata/Way.java", "license": "gpl-2.0", "size": 87890 }
[ "de.ueller.gps.Node", "de.ueller.gpsmid.data.PaintContext", "de.ueller.gpsmid.graphics.Projection", "de.ueller.util.MoreMath" ]
import de.ueller.gps.Node; import de.ueller.gpsmid.data.PaintContext; import de.ueller.gpsmid.graphics.Projection; import de.ueller.util.MoreMath;
import de.ueller.gps.*; import de.ueller.gpsmid.data.*; import de.ueller.gpsmid.graphics.*; import de.ueller.util.*;
[ "de.ueller.gps", "de.ueller.gpsmid", "de.ueller.util" ]
de.ueller.gps; de.ueller.gpsmid; de.ueller.util;
2,881,017
try { _producer.produce("Greycat", message.getBytes()); return true; } catch (NSQException | TimeoutException e) { e.printStackTrace(); } return false; }
try { _producer.produce(STR, message.getBytes()); return true; } catch (NSQException TimeoutException e) { e.printStackTrace(); } return false; }
/** * Sending a message to the Greycat topic of our NSQ server * @param message String message * @return True if success to send, false otherwise */
Sending a message to the Greycat topic of our NSQ server
sendMessage
{ "repo_name": "Neoskai/greycat", "path": "greycat/src/main/java/greycat/backup/NSQSender.java", "license": "apache-2.0", "size": 1803 }
[ "com.github.brainlag.nsq.exceptions.NSQException", "java.util.concurrent.TimeoutException" ]
import com.github.brainlag.nsq.exceptions.NSQException; import java.util.concurrent.TimeoutException;
import com.github.brainlag.nsq.exceptions.*; import java.util.concurrent.*;
[ "com.github.brainlag", "java.util" ]
com.github.brainlag; java.util;
1,368,378
public static void clear(Context context) { if (context != null) { LogWrapper.d(TAG, "Clearing cache"); File cacheDir = context.getCacheDir(); if (cacheDir != null && cacheDir.isDirectory()) deleteDir(cacheDir); clearSharedPreferences(context); } }
static void function(Context context) { if (context != null) { LogWrapper.d(TAG, STR); File cacheDir = context.getCacheDir(); if (cacheDir != null && cacheDir.isDirectory()) deleteDir(cacheDir); clearSharedPreferences(context); } }
/** * Clears application cache. * * @param context */
Clears application cache
clear
{ "repo_name": "prasannata/StackX", "path": "stackx-app/src/com/prasanna/android/stacknetwork/utils/SharedPreferencesUtil.java", "license": "gpl-3.0", "size": 9019 }
[ "android.content.Context", "com.prasanna.android.utils.LogWrapper", "java.io.File" ]
import android.content.Context; import com.prasanna.android.utils.LogWrapper; import java.io.File;
import android.content.*; import com.prasanna.android.utils.*; import java.io.*;
[ "android.content", "com.prasanna.android", "java.io" ]
android.content; com.prasanna.android; java.io;
2,189,548
private static Exception extractAndWrapCause(Exception exception) { if (exception instanceof InterruptedException) { throw new RuntimeException("thread waiting for the response was interrupted", exception); } if (exception instanceof ExecutionException) { ExecutionExc...
static Exception function(Exception exception) { if (exception instanceof InterruptedException) { throw new RuntimeException(STR, exception); } if (exception instanceof ExecutionException) { ExecutionException executionException = (ExecutionException)exception; Throwable t = executionException.getCause() == null ? exec...
/** * Wrap the exception so the caller's signature shows up in the stack trace, taking care to copy the original type and message * where possible so async and sync code don't have to check different exceptions. */
Wrap the exception so the caller's signature shows up in the stack trace, taking care to copy the original type and message where possible so async and sync code don't have to check different exceptions
extractAndWrapCause
{ "repo_name": "nknize/elasticsearch", "path": "client/rest/src/main/java/org/elasticsearch/client/RestClient.java", "license": "apache-2.0", "size": 41354 }
[ "java.io.IOException", "java.net.ConnectException", "java.net.SocketTimeoutException", "java.util.concurrent.ExecutionException", "javax.net.ssl.SSLHandshakeException", "org.apache.http.ConnectionClosedException", "org.apache.http.HttpEntity", "org.apache.http.client.entity.GzipCompressingEntity", "...
import java.io.IOException; import java.net.ConnectException; import java.net.SocketTimeoutException; import java.util.concurrent.ExecutionException; import javax.net.ssl.SSLHandshakeException; import org.apache.http.ConnectionClosedException; import org.apache.http.HttpEntity; import org.apache.http.client.entity.Gzip...
import java.io.*; import java.net.*; import java.util.concurrent.*; import javax.net.ssl.*; import org.apache.http.*; import org.apache.http.client.entity.*; import org.apache.http.conn.*;
[ "java.io", "java.net", "java.util", "javax.net", "org.apache.http" ]
java.io; java.net; java.util; javax.net; org.apache.http;
2,825,701
private Node getDeclarationRValue(Node n) { Preconditions.checkNotNull(n); Preconditions.checkArgument(n.isVar()); n = n.getFirstChild().getFirstChild(); if (n == null) { return null; } while (n.isAssign()) { n = n.getLastChild(); } return n; } class NodeContext { ...
Node function(Node n) { Preconditions.checkNotNull(n); Preconditions.checkArgument(n.isVar()); n = n.getFirstChild().getFirstChild(); if (n == null) { return null; } while (n.isAssign()) { n = n.getLastChild(); } return n; } class NodeContext { private String name; private Node node; private Node functionNode; private ...
/** * Given a VAR node (variable declaration) returns the node of initial value. * * <pre>{@code * var x; // null * var y = "value"; // STRING "value" node * var z = x = y = function() {}; // FUNCTION node * }</pre> * @param n VAR node. * @return the assigned intial value, or the rightmost r...
Given a VAR node (variable declaration) returns the node of initial value. <code>var x; // null var y = "value"; // STRING "value" node var z = x = y = function() {; // FUNCTION node }</code>
getDeclarationRValue
{ "repo_name": "leapingbrainlabs/closure-compiler", "path": "src/com/google/javascript/jscomp/AngularPass.java", "license": "apache-2.0", "size": 8825 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
940,541
public String detect(AbstractFile file) throws TskCoreException { return detect(file, false); }
String function(AbstractFile file) throws TskCoreException { return detect(file, false); }
/** * Detects the MIME type of a file. The result is not added to the case * database. * * @param file The file to test. * * @return A MIME type name. If file type could not be detected or results * were uncertain, octet-stream is returned. * * @throws TskCoreExcepti...
Detects the MIME type of a file. The result is not added to the case database
detect
{ "repo_name": "dgrove727/autopsy", "path": "Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java", "license": "apache-2.0", "size": 19448 }
[ "org.sleuthkit.datamodel.AbstractFile", "org.sleuthkit.datamodel.TskCoreException" ]
import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.*;
[ "org.sleuthkit.datamodel" ]
org.sleuthkit.datamodel;
2,804,340
public static RenderedOp scaleImage(RenderedOp image, int scaleWidth, int scaleHeight, boolean keepAspect, double color) { float xScale = (float) scaleWidth / (float) image.getWidth(); float yScale = (float) scaleHeight / (float) image.getHeight(); boolean resize = false; if...
static RenderedOp function(RenderedOp image, int scaleWidth, int scaleHeight, boolean keepAspect, double color) { float xScale = (float) scaleWidth / (float) image.getWidth(); float yScale = (float) scaleHeight / (float) image.getHeight(); boolean resize = false; if (keepAspect) { resize = Math.abs(xScale - yScale) < ....
/** * Scale an image up/down to the desired width and height, while maintaining the image's aspect ratio (if * requested). * * @param image * the source image to scale * @param scaleWidth * the new width to scale to * @param scaleHeight * the...
Scale an image up/down to the desired width and height, while maintaining the image's aspect ratio (if requested)
scaleImage
{ "repo_name": "mischwarz/Weasis", "path": "weasis-core/weasis-core-api/src/main/java/org/weasis/core/api/image/util/ImageToolkit.java", "license": "epl-1.0", "size": 13918 }
[ "java.awt.image.renderable.ParameterBlock", "javax.media.jai.Interpolation", "javax.media.jai.JAI", "javax.media.jai.RenderedOp" ]
import java.awt.image.renderable.ParameterBlock; import javax.media.jai.Interpolation; import javax.media.jai.JAI; import javax.media.jai.RenderedOp;
import java.awt.image.renderable.*; import javax.media.jai.*;
[ "java.awt", "javax.media" ]
java.awt; javax.media;
2,652,880
public static InetAddress getRemoteIp() { Call call = CurCall.get(); return (call != null && call.connection != null) ? call.connection .getHostInetAddress() : null; }
static InetAddress function() { Call call = CurCall.get(); return (call != null && call.connection != null) ? call.connection .getHostInetAddress() : null; }
/** Returns the remote side ip address when invoked inside an RPC * Returns null incase of an error. */
Returns the remote side ip address when invoked inside an RPC Returns null incase of an error
getRemoteIp
{ "repo_name": "vlajos/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java", "license": "apache-2.0", "size": 111253 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
1,237,730
public static boolean isPortrait(Context c) { if (c == null) return false; return (c.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) ? true : false; }
static boolean function(Context c) { if (c == null) return false; return (c.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) ? true : false; }
/** * Determines if the device is in portrait mode * @param c - Context of the application * @return True if portrait mode, false if landscape mode */
Determines if the device is in portrait mode
isPortrait
{ "repo_name": "0359xiaodong/Mizuu", "path": "src/com/miz/functions/MizLib.java", "license": "apache-2.0", "size": 110000 }
[ "android.content.Context", "android.content.res.Configuration" ]
import android.content.Context; import android.content.res.Configuration;
import android.content.*; import android.content.res.*;
[ "android.content" ]
android.content;
896,199
public static String removeDuplicateWhitespaces(String string) { Pattern pattern = MagicMemberUtil.WHITESPACE_SEPERATOR; Matcher matcher = pattern.matcher(string); matcher.find(); return matcher.replaceAll(" "); //$NON-NLS-1$ }
static String function(String string) { Pattern pattern = MagicMemberUtil.WHITESPACE_SEPERATOR; Matcher matcher = pattern.matcher(string); matcher.find(); return matcher.replaceAll(" "); }
/** * Removes all duplicate whitespaces from a given string * * @param string * @return the trimmed string */
Removes all duplicate whitespaces from a given string
removeDuplicateWhitespaces
{ "repo_name": "vovagrechka/fucking-everything", "path": "phizdets/phizdets-idea/eclipse-src/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/corext/util/Strings.java", "license": "apache-2.0", "size": 20974 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern", "org.eclipse.php.internal.core.util.MagicMemberUtil" ]
import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.php.internal.core.util.MagicMemberUtil;
import java.util.regex.*; import org.eclipse.php.internal.core.util.*;
[ "java.util", "org.eclipse.php" ]
java.util; org.eclipse.php;
975,159
public static void addHalfBlock(Context context, String pubKey, int halfBlockSequenceNumber) { InboxItem[] array = SharedPreferencesStorage.readSharedPreferences(context, INBOX_ITEM_KEY, InboxItem[].class); if (array == null) { return; } else { for (int i = 0; i < arr...
static void function(Context context, String pubKey, int halfBlockSequenceNumber) { InboxItem[] array = SharedPreferencesStorage.readSharedPreferences(context, INBOX_ITEM_KEY, InboxItem[].class); if (array == null) { return; } else { for (int i = 0; i < array.length; i++) { String p = pubKey; String p2 = array[i].getPu...
/** * Add the link of a half block to the inbox item it concerns. * @param context * @param pubKey * @param halfBlockSequenceNumber the sequence number of the block that is added. */
Add the link of a half block to the inbox item it concerns
addHalfBlock
{ "repo_name": "wkmeijer/CS4160-trustchain-android", "path": "app/src/main/java/nl/tudelft/cs4160/trustchain_android/SharedPreferences/InboxItemStorage.java", "license": "lgpl-3.0", "size": 3979 }
[ "android.content.Context", "nl.tudelft.cs4160.trustchain_android.inbox.InboxItem" ]
import android.content.Context; import nl.tudelft.cs4160.trustchain_android.inbox.InboxItem;
import android.content.*; import nl.tudelft.cs4160.trustchain_android.inbox.*;
[ "android.content", "nl.tudelft.cs4160" ]
android.content; nl.tudelft.cs4160;
379,863
public Collection<Service> removeService(String id) { List<Service> keep = new ArrayList<>(); List<Service> remove = new ArrayList<>(); for (Service c : services) { if (c.getUniqueId().equals(id)) { remove.add(c); } else { keep.add(c); } } setServices(keep);...
Collection<Service> function(String id) { List<Service> keep = new ArrayList<>(); List<Service> remove = new ArrayList<>(); for (Service c : services) { if (c.getUniqueId().equals(id)) { remove.add(c); } else { keep.add(c); } } setServices(keep); unbindQuietly(remove); return remove; }
/** * Remove a service collection by it's ID. * * @param id the unique-id of the service collection to remove. * @return a collection of the removed items */
Remove a service collection by it's ID
removeService
{ "repo_name": "adaptris/interlok", "path": "interlok-core/src/main/java/com/adaptris/core/SharedComponentList.java", "license": "apache-2.0", "size": 16383 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,568,881
public void cambioPrecioCantidadIva(AjaxBehaviorEvent evt) { tab_det_documento.modificar(evt); calcularTotalDetalleDocumento(); }
void function(AjaxBehaviorEvent evt) { tab_det_documento.modificar(evt); calcularTotalDetalleDocumento(); }
/** * Se ejecuta cuando cambia el Precio o la Cantidad de un detalle del * documento * * @param evt */
Se ejecuta cuando cambia el Precio o la Cantidad de un detalle del documento
cambioPrecioCantidadIva
{ "repo_name": "diego10j/produquimic", "path": "produquimic/produquimic-war/src/java/paq_cuentas_x_pagar/pre_modifica_documento.java", "license": "apache-2.0", "size": 55863 }
[ "javax.faces.event.AjaxBehaviorEvent" ]
import javax.faces.event.AjaxBehaviorEvent;
import javax.faces.event.*;
[ "javax.faces" ]
javax.faces;
2,566,747
@ServiceMethod(returns = ReturnType.SINGLE) public PortalDelegationSettingsInner createOrUpdate( String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters) { final String ifMatch = null; return createOrUpdateAsync(resourceGroupName, serviceName, parameters, i...
@ServiceMethod(returns = ReturnType.SINGLE) PortalDelegationSettingsInner function( String resourceGroupName, String serviceName, PortalDelegationSettingsInner parameters) { final String ifMatch = null; return createOrUpdateAsync(resourceGroupName, serviceName, parameters, ifMatch).block(); }
/** * Create or Update Delegation settings. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param parameters Create or update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation...
Create or Update Delegation settings
createOrUpdate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/DelegationSettingsClientImpl.java", "license": "mit", "size": 47201 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.apimanagement.fluent.models.PortalDelegationSettingsInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.apimanagement.fluent.models.PortalDelegationSettingsInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.apimanagement.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,322,201
Set<String> getBucketOwnerAliases(UserInfo userInfo) { Set<String> ownerAliases = new HashSet<>(); // The user id is a valid alias ownerAliases.add(userInfo.getId().toString()); List<PrincipalAlias> principalAliases = principalAliasDAO.listPrincipalAliases(userInfo.getId(), AliasType.USER_NAME, A...
Set<String> getBucketOwnerAliases(UserInfo userInfo) { Set<String> ownerAliases = new HashSet<>(); ownerAliases.add(userInfo.getId().toString()); List<PrincipalAlias> principalAliases = principalAliasDAO.listPrincipalAliases(userInfo.getId(), AliasType.USER_NAME, AliasType.USER_EMAIL); ownerAliases.addAll(principalAlia...
/** * Collects the possible aliases that can be used to verify ownership of an S3 bucket. * * @param userInfo * @return */
Collects the possible aliases that can be used to verify ownership of an S3 bucket
getBucketOwnerAliases
{ "repo_name": "xschildw/Synapse-Repository-Services", "path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/storagelocation/BucketOwnerVerifierImpl.java", "license": "apache-2.0", "size": 6571 }
[ "java.util.HashSet", "java.util.List", "java.util.Set", "java.util.stream.Collectors", "org.sagebionetworks.repo.model.UserInfo", "org.sagebionetworks.repo.model.principal.AliasType", "org.sagebionetworks.repo.model.principal.PrincipalAlias" ]
import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import org.sagebionetworks.repo.model.UserInfo; import org.sagebionetworks.repo.model.principal.AliasType; import org.sagebionetworks.repo.model.principal.PrincipalAlias;
import java.util.*; import java.util.stream.*; import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.principal.*;
[ "java.util", "org.sagebionetworks.repo" ]
java.util; org.sagebionetworks.repo;
2,897,085
mPaused = false; while (mMessageQueueBuffer.size() > 0) { final Message msg = mMessageQueueBuffer.elementAt(0); mMessageQueueBuffer.removeElementAt(0); sendMessage(msg); } }
mPaused = false; while (mMessageQueueBuffer.size() > 0) { final Message msg = mMessageQueueBuffer.elementAt(0); mMessageQueueBuffer.removeElementAt(0); sendMessage(msg); } }
/** * Resume the handler */
Resume the handler
resume
{ "repo_name": "TakayukiHoshi1984/DeviceConnect-Android", "path": "dConnectManager/dConnectManager/dconnect-manager-app/src/main/java/org/deviceconnect/android/manager/util/PauseHandler.java", "license": "mit", "size": 2036 }
[ "android.os.Message" ]
import android.os.Message;
import android.os.*;
[ "android.os" ]
android.os;
2,667,115
public void predict(Bijection trainSkills, Bijection testSkills, ArrayList<FeatureHMM> trainHmms, ArrayList<ArrayList<String>> hmmsSequences) throws IOException { if (hmmsSequences.size() > trainHmms.size() || testSkills.getSize() > trainSkills.getSize()) { // logger.error("hmmsSequences and hmms len...
void function(Bijection trainSkills, Bijection testSkills, ArrayList<FeatureHMM> trainHmms, ArrayList<ArrayList<String>> hmmsSequences) throws IOException { if (hmmsSequences.size() > trainHmms.size() testSkills.getSize() > trainSkills.getSize()) { System.out .println(STR); System.exit(1); } ArrayList<Double> allProbs ...
/** * By default, here is the function to start predicting for one fold, all * skills * * hmmsSequences : hmms are ordered according to test file, can be different * from that of train file */
By default, here is the function to start predicting for one fold, all skills hmmsSequences : hmms are ordered according to test file, can be different from that of train file
predict
{ "repo_name": "summer-liu/fast", "path": "src/main/java/fast/experimenter/Run.java", "license": "gpl-2.0", "size": 40199 }
[ "java.io.IOException", "java.util.ArrayList" ]
import java.io.IOException; import java.util.ArrayList;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
976,517
public void setConfiguration (Configuration cfg) throws ConfigurationException { try { transformer = tfactory.newTransformer( new StreamSource(cfg.get("xsltfile")) ); String s = cfg.get ("reread"); reread = (s == null || s.equal...
void function (Configuration cfg) throws ConfigurationException { try { transformer = tfactory.newTransformer( new StreamSource(cfg.get(STR)) ); String s = cfg.get (STR); reread = (s == null s.equals ("no")); } catch (Exception e) { throw new ConfigurationException (e); } }
/** * configure filter. * * <ul> * <li>xsltfile - source XSL-T file * <li>reread - something != "no" will re-read source file * </ul> * * @param cfg new ConfigurationFile */
configure filter. xsltfile - source XSL-T file reread - something != "no" will re-read source file
setConfiguration
{ "repo_name": "fayezasar/jPOS", "path": "jpos/src/main/java/org/jpos/iso/filter/XSLTFilter.java", "license": "agpl-3.0", "size": 4206 }
[ "javax.xml.transform.stream.StreamSource", "org.jpos.core.Configuration", "org.jpos.core.ConfigurationException" ]
import javax.xml.transform.stream.StreamSource; import org.jpos.core.Configuration; import org.jpos.core.ConfigurationException;
import javax.xml.transform.stream.*; import org.jpos.core.*;
[ "javax.xml", "org.jpos.core" ]
javax.xml; org.jpos.core;
698,160
public String getMessageError() throws RemoteException;
String function() throws RemoteException;
/** * Method declaration * @return * @throws RemoteException * @see */
Method declaration
getMessageError
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "ejb-core/clipboard/src/main/java/com/stratelia/webactiv/clipboard/control/ejb/Clipboard.java", "license": "agpl-3.0", "size": 4101 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
879,003
public static void set(String variableName, Object value, Object obj) { try { Field field = getField(variableName, obj); field.set(obj, value); } catch (ReflectiveOperationException e) { throw Throwables.propagate(e); } }
static void function(String variableName, Object value, Object obj) { try { Field field = getField(variableName, obj); field.set(obj, value); } catch (ReflectiveOperationException e) { throw Throwables.propagate(e); } }
/** * Set the value of the field with {@code variableName} to {@code value} in * {@code obj}. * * @param variableName * @param value * @param obj */
Set the value of the field with variableName to value in obj
set
{ "repo_name": "bigtreeljc/concourse", "path": "concourse-driver-java/src/main/java/org/cinchapi/concourse/util/Reflection.java", "license": "apache-2.0", "size": 8275 }
[ "com.google.common.base.Throwables", "java.lang.reflect.Field" ]
import com.google.common.base.Throwables; import java.lang.reflect.Field;
import com.google.common.base.*; import java.lang.reflect.*;
[ "com.google.common", "java.lang" ]
com.google.common; java.lang;
961,809
CustomerData getCustomerData(String email);
CustomerData getCustomerData(String email);
/** * * Returns the information of the requested customer in the correct format * * @param email of the customer to be retrieved * @return customer data object */
Returns the information of the requested customer in the correct format
getCustomerData
{ "repo_name": "expressly/expressly-plugin-sdk-java-core", "path": "src/main/java/com/buyexpressly/api/MerchantServiceProvider.java", "license": "mit", "size": 5510 }
[ "com.buyexpressly.api.resource.server.CustomerData" ]
import com.buyexpressly.api.resource.server.CustomerData;
import com.buyexpressly.api.resource.server.*;
[ "com.buyexpressly.api" ]
com.buyexpressly.api;
1,032,165
void setTabCloseButtonIconTint(@ColorInt int color);
void setTabCloseButtonIconTint(@ColorInt int color);
/** * Sets the color, which should be used to tint the close button of a tab. * * @param color * The color, which should be set, as an {@link Integer} value */
Sets the color, which should be used to tint the close button of a tab
setTabCloseButtonIconTint
{ "repo_name": "michael-rapp/ChromeLikeTabSwitcher", "path": "library/src/main/java/de/mrapp/android/tabswitcher/model/Model.java", "license": "apache-2.0", "size": 56796 }
[ "androidx.annotation.ColorInt" ]
import androidx.annotation.ColorInt;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,966,203
public void calculateChunkedSums(ByteBuffer data, ByteBuffer checksums) { if (type.size == 0) return; if (data.hasArray() && checksums.hasArray()) { calculateChunkedSums(data.array(), data.arrayOffset() + data.position(), data.remaining(), checksums.array(), checksums.arrayOffset() + chec...
void function(ByteBuffer data, ByteBuffer checksums) { if (type.size == 0) return; if (data.hasArray() && checksums.hasArray()) { calculateChunkedSums(data.array(), data.arrayOffset() + data.position(), data.remaining(), checksums.array(), checksums.arrayOffset() + checksums.position()); return; } if (NativeCrc32.isAva...
/** * Calculate checksums for the given data. * * The 'mark' of the ByteBuffer parameters may be modified by this function, * but the position is maintained. * * @param data the DirectByteBuffer pointing to the data to checksum. * @param checksums the DirectByteBuffer into which checksums will be...
Calculate checksums for the given data. The 'mark' of the ByteBuffer parameters may be modified by this function, but the position is maintained
calculateChunkedSums
{ "repo_name": "Ethanlm/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/DataChecksum.java", "license": "apache-2.0", "size": 17231 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,098,377
//----------------------------------------------------------------------- public static boolean contentEquals(File file1, File file2) throws IOException { boolean file1Exists = file1.exists(); if (file1Exists != file2.exists()) { return false; } if (!file1Exists) { // two not existing fi...
static boolean function(File file1, File file2) throws IOException { boolean file1Exists = file1.exists(); if (file1Exists != file2.exists()) { return false; } if (!file1Exists) { return true; } if (file1.isDirectory() file2.isDirectory()) { throw new IOException(STR); } if (file1.length() != file2.length()) { return f...
/** * Compares the contents of two files to determine if they are equal or not. * <p> * This method checks to see if the two files are different lengths * or if they point to the same file, before resorting to byte-by-byte * comparison of the contents. * <p> * Code origin: Avalon * * @param f...
Compares the contents of two files to determine if they are equal or not. This method checks to see if the two files are different lengths or if they point to the same file, before resorting to byte-by-byte comparison of the contents. Code origin: Avalon
contentEquals
{ "repo_name": "copyliu/Spoutcraft_CJKPatch", "path": "src/minecraft/org/apache/commons/io/FileUtils.java", "license": "lgpl-3.0", "size": 83439 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,591,925
@Override public void onClick(View v) { if (v.getId() == R.id.sign_in_button) { onSignInClicked(); } }
void function(View v) { if (v.getId() == R.id.sign_in_button) { onSignInClicked(); } }
/** * Called when a view has been clicked. * * @param v The view that was clicked. */
Called when a view has been clicked
onClick
{ "repo_name": "CSUChico-CSCI567/CSCI567_Workspace_Summer2015", "path": "DynamoDBMapper_UserPreference_Cognito/app/src/main/java/examples/csci567/demo/userpreferencesom/LoginActivity.java", "license": "mit", "size": 7642 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
737,875
public void setContainerPartitionElementHLAPI( PartitionElementHLAPI elem){ if(elem!=null) item.setContainerPartitionElement((PartitionElement)elem.getContainedItem()); } //setters/remover for lists.
void function( PartitionElementHLAPI elem){ if(elem!=null) item.setContainerPartitionElement((PartitionElement)elem.getContainedItem()); }
/** * set ContainerPartitionElement */
set ContainerPartitionElement
setContainerPartitionElementHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/finiteIntRanges/hlapi/GreaterThanOrEqualHLAPI.java", "license": "epl-1.0", "size": 90341 }
[ "fr.lip6.move.pnml.symmetricnet.partitions.PartitionElement", "fr.lip6.move.pnml.symmetricnet.partitions.hlapi.PartitionElementHLAPI" ]
import fr.lip6.move.pnml.symmetricnet.partitions.PartitionElement; import fr.lip6.move.pnml.symmetricnet.partitions.hlapi.PartitionElementHLAPI;
import fr.lip6.move.pnml.symmetricnet.partitions.*; import fr.lip6.move.pnml.symmetricnet.partitions.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
529,942
@Test public void test07CascadeDeleteConditional() { cleanDatabaseAndSchema(); // setup try (final Tx tx = app.tx()) { final SchemaNode t1 = app.create(SchemaNode.class, "Type1"); final SchemaNode t2 = app.create(SchemaNode.class, "Type2"); // this acts as the constraint that is violated after th...
void function() { cleanDatabaseAndSchema(); try (final Tx tx = app.tx()) { final SchemaNode t1 = app.create(SchemaNode.class, "Type1"); final SchemaNode t2 = app.create(SchemaNode.class, "Type2"); app.create(SchemaProperty.class, new NodeAttribute<>(SchemaProperty.propertyType, STR), new NodeAttribute<>(SchemaProperty....
/** * Relation.CONSTRAINT_BASED (DELETE_IF_CONSTRAINT_WOULD_BE_VIOLATED) should * trigger delete cascade if the remote node would not be valid afterwards */
Relation.CONSTRAINT_BASED (DELETE_IF_CONSTRAINT_WOULD_BE_VIOLATED) should trigger delete cascade if the remote node would not be valid afterwards
test07CascadeDeleteConditional
{ "repo_name": "ckramp/structr", "path": "structr-core/src/test/java/org/structr/test/common/BasicTest.java", "license": "gpl-3.0", "size": 60225 }
[ "org.structr.common.error.FrameworkException", "org.structr.core.app.StructrApp", "org.structr.core.entity.AbstractNode", "org.structr.core.entity.Relation", "org.structr.core.entity.SchemaNode", "org.structr.core.entity.SchemaProperty", "org.structr.core.entity.SchemaRelationshipNode", "org.structr.c...
import org.structr.common.error.FrameworkException; import org.structr.core.app.StructrApp; import org.structr.core.entity.AbstractNode; import org.structr.core.entity.Relation; import org.structr.core.entity.SchemaNode; import org.structr.core.entity.SchemaProperty; import org.structr.core.entity.SchemaRelationshipNod...
import org.structr.common.error.*; import org.structr.core.app.*; import org.structr.core.entity.*; import org.structr.core.graph.*; import org.structr.core.property.*; import org.testng.*;
[ "org.structr.common", "org.structr.core", "org.testng" ]
org.structr.common; org.structr.core; org.testng;
1,042,296
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); jPanel2 = new javax.s...
@SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); jPanel2 = new javax.swing.JPanel(); labEmpty = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); labFoto = new javax.swing.JLabel(); panUpload = new javax.swi...
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The * content of this method is always regenerated by the Form Editor. */
content of this method is always regenerated by the Form Editor
initComponents
{ "repo_name": "cismet/watergis-client", "path": "src/main/java/de/cismet/watergis/gui/panels/GafProfEditor.java", "license": "lgpl-3.0", "size": 74780 }
[ "de.cismet.cismap.cidslayer.DefaultCidsLayerBindableReferenceCombo", "java.awt.CardLayout", "java.awt.Dimension" ]
import de.cismet.cismap.cidslayer.DefaultCidsLayerBindableReferenceCombo; import java.awt.CardLayout; import java.awt.Dimension;
import de.cismet.cismap.cidslayer.*; import java.awt.*;
[ "de.cismet.cismap", "java.awt" ]
de.cismet.cismap; java.awt;
1,956,209
File getBlockFile(String bpid, long blockId) throws IOException { File f = validateBlockFile(bpid, blockId); if(f == null) { throw new IOException("BlockId " + blockId + " is not valid."); } return f; }
File getBlockFile(String bpid, long blockId) throws IOException { File f = validateBlockFile(bpid, blockId); if(f == null) { throw new IOException(STR + blockId + STR); } return f; }
/** * Get File name for a given block. */
Get File name for a given block
getBlockFile
{ "repo_name": "vesense/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java", "license": "apache-2.0", "size": 104887 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
302,404
default Function1<T4, R> curry(Tuple3<T1, T2, T3> args) { return (v4) -> apply(args.v1, args.v2, args.v3, v4); }
default Function1<T4, R> curry(Tuple3<T1, T2, T3> args) { return (v4) -> apply(args.v1, args.v2, args.v3, v4); }
/** * Partially apply this function to the arguments. */
Partially apply this function to the arguments
curry
{ "repo_name": "amitjoy/jOOL", "path": "src/main/java/org/jooq/lambda/function/Function4.java", "license": "apache-2.0", "size": 2825 }
[ "org.jooq.lambda.tuple.Tuple3" ]
import org.jooq.lambda.tuple.Tuple3;
import org.jooq.lambda.tuple.*;
[ "org.jooq.lambda" ]
org.jooq.lambda;
2,163,233
public VH onCreateHeaderViewHolder(ViewGroup parent);
VH function(ViewGroup parent);
/** * Creates a new ViewHolder for a header. This works the same way onCreateViewHolder in * Recycler.Adapter, ViewHolders can be reused for different views. This is usually a good place * to inflate the layout for the header. * * @param parent * @return */
Creates a new ViewHolder for a header. This works the same way onCreateViewHolder in Recycler.Adapter, ViewHolders can be reused for different views. This is usually a good place to inflate the layout for the header
onCreateHeaderViewHolder
{ "repo_name": "jiyuren/AmazeFileManager-1", "path": "libs/StickyHeadersRecyclerView/src/main/java/com/timehop/stickyheadersrecyclerview/StickyRecyclerHeadersAdapter.java", "license": "gpl-3.0", "size": 1157 }
[ "android.view.ViewGroup" ]
import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
1,613,078
@Override public int toDoubleMarshalCost() { return Marshal.COST_NUMERIC_LOSSLESS; }
int function() { return Marshal.COST_NUMERIC_LOSSLESS; }
/** * Cost to convert to a double */
Cost to convert to a double
toDoubleMarshalCost
{ "repo_name": "dlitz/resin", "path": "modules/quercus/src/com/caucho/quercus/env/LongValue.java", "license": "gpl-2.0", "size": 11234 }
[ "com.caucho.quercus.marshal.Marshal" ]
import com.caucho.quercus.marshal.Marshal;
import com.caucho.quercus.marshal.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
2,712,537
@SuppressWarnings("unchecked") public void setTranscoder(final Transcoder transcoder);
@SuppressWarnings(STR) void function(final Transcoder transcoder);
/** * set transcoder * * @param transcoder */
set transcoder
setTranscoder
{ "repo_name": "springning/xmemcached", "path": "src/main/java/net/rubyeye/xmemcached/MemcachedClient.java", "license": "apache-2.0", "size": 60137 }
[ "net.rubyeye.xmemcached.transcoders.Transcoder" ]
import net.rubyeye.xmemcached.transcoders.Transcoder;
import net.rubyeye.xmemcached.transcoders.*;
[ "net.rubyeye.xmemcached" ]
net.rubyeye.xmemcached;
2,909,079
private static void validateClassValues(AnnotationMirror annotationMirror) { // A class literal can appear in three places: // * for an element of type Class, for example @SomeAnnotation(Foo.class); // * for an element of type Class[], for example @SomeAnnotation({Foo.class, Bar.class}); // * inside a...
static void function(AnnotationMirror annotationMirror) { annotationMirror .getElementValues() .forEach( (method, value) -> { TypeMirror type = method.getReturnType(); if (isJavaLangClass(type) && !(value.getValue() instanceof TypeMirror)) { throw new MissingTypeException(null); } else if (type.getKind().equals(TypeKin...
/** * Throws an exception if this annotation contains a value for a Class element that is not * actually a type. The assumption is that the value is the string {@code "<error>"} which javac * presents when a Class value is an undefined type. */
Throws an exception if this annotation contains a value for a Class element that is not actually a type. The assumption is that the value is the string "" which javac presents when a Class value is an undefined type
validateClassValues
{ "repo_name": "google/auto", "path": "value/src/main/java/com/google/auto/value/processor/AnnotationOutput.java", "license": "apache-2.0", "size": 12037 }
[ "com.google.auto.common.MoreTypes", "com.google.auto.value.processor.MissingTypes", "java.util.List", "javax.lang.model.element.AnnotationMirror", "javax.lang.model.element.AnnotationValue", "javax.lang.model.element.ElementKind", "javax.lang.model.type.TypeKind", "javax.lang.model.type.TypeMirror" ]
import com.google.auto.common.MoreTypes; import com.google.auto.value.processor.MissingTypes; import java.util.List; import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.AnnotationValue; import javax.lang.model.element.ElementKind; import javax.lang.model.type.TypeKind; import javax.lang.mo...
import com.google.auto.common.*; import com.google.auto.value.processor.*; import java.util.*; import javax.lang.model.element.*; import javax.lang.model.type.*;
[ "com.google.auto", "java.util", "javax.lang" ]
com.google.auto; java.util; javax.lang;
657,683
public static void restoreDeploymentContext(GridKernalContext ctx, IgniteUuid ldrId) { if (ctx.deploy().enabled() && ldrId != null) { GridDeployment dep = ctx.deploy().getDeployment(ldrId); if (dep != null) { try { ctx.cache().context().deploy().p...
static void function(GridKernalContext ctx, IgniteUuid ldrId) { if (ctx.deploy().enabled() && ldrId != null) { GridDeployment dep = ctx.deploy().getDeployment(ldrId); if (dep != null) { try { ctx.cache().context().deploy().p2pContext( dep.classLoaderId().globalId(), dep.classLoaderId(), dep.userVersion(), dep.deployMod...
/** * Restores a deployment context for cache deployment. * * @param ctx Kernal context. * @param ldrId Class loader id. */
Restores a deployment context for cache deployment
restoreDeploymentContext
{ "repo_name": "apache/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 387878 }
[ "org.apache.ignite.internal.GridKernalContext", "org.apache.ignite.internal.managers.deployment.GridDeployment", "org.apache.ignite.internal.processors.cache.IgnitePeerToPeerClassLoadingException", "org.apache.ignite.lang.IgniteUuid" ]
import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.managers.deployment.GridDeployment; import org.apache.ignite.internal.processors.cache.IgnitePeerToPeerClassLoadingException; import org.apache.ignite.lang.IgniteUuid;
import org.apache.ignite.internal.*; import org.apache.ignite.internal.managers.deployment.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.lang.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,234,827
void decodeFrame(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Http2Exception;
void decodeFrame(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Http2Exception;
/** * Called by the {@link Http2ConnectionHandler} to decode the next frame from the input buffer. */
Called by the <code>Http2ConnectionHandler</code> to decode the next frame from the input buffer
decodeFrame
{ "repo_name": "hyangtack/netty", "path": "codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionDecoder.java", "license": "apache-2.0", "size": 3733 }
[ "io.netty.buffer.ByteBuf", "io.netty.channel.ChannelHandlerContext", "java.util.List" ]
import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import java.util.List;
import io.netty.buffer.*; import io.netty.channel.*; import java.util.*;
[ "io.netty.buffer", "io.netty.channel", "java.util" ]
io.netty.buffer; io.netty.channel; java.util;
938,710
@Test public void testValueTwo() { final PyFactory.PyFloatBuilder builder = getPyFactory().getPyFloatBuilder(); builder.value((float) 2.0f); final PyFloat testSubject = builder.build(); assertThat(testSubject, not(nullValue())); assertThat(testSubject.value(), equalTo((float) 2.0f)); as...
void function() { final PyFactory.PyFloatBuilder builder = getPyFactory().getPyFloatBuilder(); builder.value((float) 2.0f); final PyFloat testSubject = builder.build(); assertThat(testSubject, not(nullValue())); assertThat(testSubject.value(), equalTo((float) 2.0f)); assertThat(testSubject.toString(), equalTo(Float.toS...
/** * Test method for {@link PyFloat#value()}. */
Test method for <code>PyFloat#value()</code>
testValueTwo
{ "repo_name": "jevetools/unmarshal", "path": "com.jevetools.unmarshal.python.api.impl.tests/src/com/jevetools/unmarshal/python/api/impl/test/PyFloatTest.java", "license": "bsd-3-clause", "size": 7273 }
[ "com.jevetools.unmarshal.python.api.PyFactory", "com.jevetools.unmarshal.python.api.PyFloat", "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import com.jevetools.unmarshal.python.api.PyFactory; import com.jevetools.unmarshal.python.api.PyFloat; import org.hamcrest.CoreMatchers; import org.junit.Assert;
import com.jevetools.unmarshal.python.api.*; import org.hamcrest.*; import org.junit.*;
[ "com.jevetools.unmarshal", "org.hamcrest", "org.junit" ]
com.jevetools.unmarshal; org.hamcrest; org.junit;
2,674,051
@Test public final void testGetInstrument() throws Exception { obsvervation = new Observation(obsDate, objectId); ResultSet expectedResult = db .executeSQL("SELECT instrument from Observations WHERE object_id=" + objectId + " AND date='" + obsDate.toString() + "'"); expectedResult.next(); assertEq...
final void function() throws Exception { obsvervation = new Observation(obsDate, objectId); ResultSet expectedResult = db .executeSQL(STR + objectId + STR + obsDate.toString() + "'"); expectedResult.next(); assertEquals(STR, expectedResult.getString(1), obsvervation.getInstrument()); }
/** * Test method for {@link model.Observation#getInstrument()}. * * @throws Exception */
Test method for <code>model.Observation#getInstrument()</code>
testGetInstrument
{ "repo_name": "kgidev/maserJ", "path": "test/model/ObservationTest.java", "license": "apache-2.0", "size": 18348 }
[ "java.sql.ResultSet", "org.junit.Assert" ]
import java.sql.ResultSet; import org.junit.Assert;
import java.sql.*; import org.junit.*;
[ "java.sql", "org.junit" ]
java.sql; org.junit;
1,823,041
@Test public void testClientConnectionClose() throws Exception { String node = "0"; SecurityProtocol securityProtocol = SecurityProtocol.SASL_SSL; TestJaasConfig jaasConfig = configureMechanisms("PLAIN", Arrays.asList("PLAIN")); jaasConfig.setClientOptions("PLAIN", TestJaasConfig...
void function() throws Exception { String node = "0"; SecurityProtocol securityProtocol = SecurityProtocol.SASL_SSL; TestJaasConfig jaasConfig = configureMechanisms("PLAIN", Arrays.asList("PLAIN")); jaasConfig.setClientOptions("PLAIN", TestJaasConfig.USERNAME, STR); server = createEchoServer(securityProtocol); createCl...
/** * Tests client connection close before response for authentication failure is sent. */
Tests client connection close before response for authentication failure is sent
testClientConnectionClose
{ "repo_name": "guozhangwang/kafka", "path": "clients/src/test/java/org/apache/kafka/common/security/authenticator/SaslAuthenticatorFailureDelayTest.java", "license": "apache-2.0", "size": 11572 }
[ "java.util.Arrays", "java.util.Map", "org.apache.kafka.common.network.NetworkTestUtils", "org.apache.kafka.common.security.auth.SecurityProtocol", "org.apache.kafka.test.TestUtils" ]
import java.util.Arrays; import java.util.Map; import org.apache.kafka.common.network.NetworkTestUtils; import org.apache.kafka.common.security.auth.SecurityProtocol; import org.apache.kafka.test.TestUtils;
import java.util.*; import org.apache.kafka.common.network.*; import org.apache.kafka.common.security.auth.*; import org.apache.kafka.test.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
570,640
public Row getRow() { return row; }
Row function() { return row; }
/** * Get the row that was deleted or inserted. * * @return the row */
Get the row that was deleted or inserted
getRow
{ "repo_name": "vdr007/ThriftyPaxos", "path": "src/applications/h2/src/main/org/h2/engine/UndoLogRecord.java", "license": "apache-2.0", "size": 7943 }
[ "org.h2.result.Row" ]
import org.h2.result.Row;
import org.h2.result.*;
[ "org.h2.result" ]
org.h2.result;
318,862
private void checkClosed() throws IOException { // Throw an exception if, and only if, this stream has been already // closed by the user using the close() method if (closeInvoked) { // clear data queue in case additional data was received after stream was clo...
void function() throws IOException { if (closeInvoked) { this.dataQueue.clear(); throw new IOException(STR); } }
/** * Checks if this stream is closed and throws an IOException if necessary * * @throws IOException if stream is closed and no data should be read anymore */
Checks if this stream is closed and throws an IOException if necessary
checkClosed
{ "repo_name": "andrey42/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java", "license": "apache-2.0", "size": 29295 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,870,470
private String getStringValue( String tagName ) { String value = null; Element element = document.getDocumentElement(); NodeList childNodeList= element.getElementsByTagName(tagName); Element valueNode = (Element)childNodeList.item(0); if ( valueNode != null) { v...
String function( String tagName ) { String value = null; Element element = document.getDocumentElement(); NodeList childNodeList= element.getElementsByTagName(tagName); Element valueNode = (Element)childNodeList.item(0); if ( valueNode != null) { value = valueNode.getFirstChild().getNodeValue(); } else { Logger.getLogg...
/** * Return a String from the configuration file. * @param tagName Tag name of the configuration value required. * @return Configuration value. */
Return a String from the configuration file
getStringValue
{ "repo_name": "BioinformaticsCenter/genomen", "path": "src/com/genomen/core/Configuration.java", "license": "gpl-2.0", "size": 6929 }
[ "org.apache.log4j.Logger", "org.w3c.dom.Element", "org.w3c.dom.NodeList" ]
import org.apache.log4j.Logger; import org.w3c.dom.Element; import org.w3c.dom.NodeList;
import org.apache.log4j.*; import org.w3c.dom.*;
[ "org.apache.log4j", "org.w3c.dom" ]
org.apache.log4j; org.w3c.dom;
2,207,584
protected void setPartnerLink(Element activityElement, final EObject eObject, final EReference reference) { if (!activityElement.hasAttribute("partnerLink")) { eObject.eSet(reference, null); return; } final String partnerLinkName = activityElement .getAttribute("partnerLink"); PartnerLink targe...
void function(Element activityElement, final EObject eObject, final EReference reference) { if (!activityElement.hasAttribute(STR)) { eObject.eSet(reference, null); return; } final String partnerLinkName = activityElement .getAttribute(STR); PartnerLink targetPartnerLink = BPELUtils.getPartnerLink(eObject, partnerLinkN...
/** * Sets a PartnerLink element for a given EObject. The given activity * element must contain an attribute named "partnerLink". * * @param activityElement * the DOM element of the activity * @param eObject * the EObject in which to set the partner link */
Sets a PartnerLink element for a given EObject. The given activity element must contain an attribute named "partnerLink"
setPartnerLink
{ "repo_name": "Drifftr/devstudio-tooling-bps", "path": "plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationBPELReader.java", "license": "apache-2.0", "size": 141166 }
[ "org.eclipse.bpel.model.PartnerLink", "org.eclipse.bpel.model.proxy.PartnerLinkProxy", "org.eclipse.emf.ecore.EObject", "org.eclipse.emf.ecore.EReference", "org.w3c.dom.Element" ]
import org.eclipse.bpel.model.PartnerLink; import org.eclipse.bpel.model.proxy.PartnerLinkProxy; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; import org.w3c.dom.Element;
import org.eclipse.bpel.model.*; import org.eclipse.bpel.model.proxy.*; import org.eclipse.emf.ecore.*; import org.w3c.dom.*;
[ "org.eclipse.bpel", "org.eclipse.emf", "org.w3c.dom" ]
org.eclipse.bpel; org.eclipse.emf; org.w3c.dom;
321,472
public void assertDateContentAfter(CmsObject cms, String resourceName, long dateContent) { try { // get the actual resource from the vfs CmsResource res = cms.readResource(resourceName, CmsResourceFilter.ALL); if (res.getDateContent() < dateContent) { fa...
void function(CmsObject cms, String resourceName, long dateContent) { try { CmsResource res = cms.readResource(resourceName, CmsResourceFilter.ALL); if (res.getDateContent() < dateContent) { fail(STR + dateContent + STR + CmsDateUtil.getHeaderDate(dateContent) + STR + res.getDateContent() + STR + CmsDateUtil.getHeaderD...
/** * Tests if the the current date content of a resource is later than the given date.<p> * * @param cms the CmsObject * @param resourceName the name of the resource to compare * @param dateContent the content date */
Tests if the the current date content of a resource is later than the given date
assertDateContentAfter
{ "repo_name": "serrapos/opencms-core", "path": "test/org/opencms/test/OpenCmsTestCase.java", "license": "lgpl-2.1", "size": 144807 }
[ "org.opencms.file.CmsObject", "org.opencms.file.CmsResource", "org.opencms.file.CmsResourceFilter", "org.opencms.main.CmsException", "org.opencms.util.CmsDateUtil" ]
import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.main.CmsException; import org.opencms.util.CmsDateUtil;
import org.opencms.file.*; import org.opencms.main.*; import org.opencms.util.*;
[ "org.opencms.file", "org.opencms.main", "org.opencms.util" ]
org.opencms.file; org.opencms.main; org.opencms.util;
1,070,199
@SuppressWarnings("ForLoopReplaceableByForEach") void finish(boolean commit) { if (tx.onNeedCheckBackup()) { assert tx.onePhaseCommit(); checkBackup(); // If checkBackup is set, it means that primary node has crashed and we will not need to send // finis...
@SuppressWarnings(STR) void finish(boolean commit) { if (tx.onNeedCheckBackup()) { assert tx.onePhaseCommit(); checkBackup(); markInitialized(); return; } try { if (tx.localFinish(commit) (!commit && tx.state() == UNKNOWN)) { if ((tx.onePhaseCommit() && needFinishOnePhase(commit)) (!tx.onePhaseCommit() && mappings != n...
/** * Initializes future. * * @param commit Commit flag. */
Initializes future
finish
{ "repo_name": "nivanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java", "license": "apache-2.0", "size": 37633 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping", "org.apache.ignite.internal.util.typedef.internal.CU" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping; import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.distributed.*; import org.apache.ignite.internal.util.typedef.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
884,013
public List<String> getAttributes();
List<String> function();
/** * null safe list of attributes * * @return the list of attributes for this cache */
null safe list of attributes
getAttributes
{ "repo_name": "eric-stanley/cgeo", "path": "main/src/cgeo/geocaching/ICache.java", "license": "apache-2.0", "size": 3201 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,530,044
@Nullable Drawable createDrawable(CloseableImage image);
Drawable createDrawable(CloseableImage image);
/** * Create a drawable for the given image. * It is guaranteed that this method is only called if * {@link #supportsImageType(CloseableImage)} returned true. * * @param image the image to create the drawable for * @return the Drawable for the image or null if an error occurred */
Create a drawable for the given image. It is guaranteed that this method is only called if <code>#supportsImageType(CloseableImage)</code> returned true
createDrawable
{ "repo_name": "s1rius/fresco", "path": "imagepipeline-base/src/main/java/com/facebook/imagepipeline/drawable/DrawableFactory.java", "license": "mit", "size": 1061 }
[ "android.graphics.drawable.Drawable", "com.facebook.imagepipeline.image.CloseableImage" ]
import android.graphics.drawable.Drawable; import com.facebook.imagepipeline.image.CloseableImage;
import android.graphics.drawable.*; import com.facebook.imagepipeline.image.*;
[ "android.graphics", "com.facebook.imagepipeline" ]
android.graphics; com.facebook.imagepipeline;
2,852,866
private Collator createFromRules(String fileName, ResourceLoader loader) { InputStream input = null; try { input = loader.openResource(fileName); String rules = IOUtils.toString(input, "UTF-8"); return new RuleBasedCollator(rules); } catch (Exception e) { // io error or invalid rules ...
Collator function(String fileName, ResourceLoader loader) { InputStream input = null; try { input = loader.openResource(fileName); String rules = IOUtils.toString(input, "UTF-8"); return new RuleBasedCollator(rules); } catch (Exception e) { throw new RuntimeException(e); } finally { IOUtils.closeQuietly(input); } }
/** * Read custom rules from a file, and create a RuleBasedCollator * The file cannot support comments, as # might be in the rules! */
Read custom rules from a file, and create a RuleBasedCollator The file cannot support comments, as # might be in the rules
createFromRules
{ "repo_name": "zhangdian/solr4.6.0", "path": "solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java", "license": "apache-2.0", "size": 9993 }
[ "com.ibm.icu.text.Collator", "com.ibm.icu.text.RuleBasedCollator", "java.io.InputStream", "org.apache.commons.io.IOUtils", "org.apache.lucene.analysis.util.ResourceLoader" ]
import com.ibm.icu.text.Collator; import com.ibm.icu.text.RuleBasedCollator; import java.io.InputStream; import org.apache.commons.io.IOUtils; import org.apache.lucene.analysis.util.ResourceLoader;
import com.ibm.icu.text.*; import java.io.*; import org.apache.commons.io.*; import org.apache.lucene.analysis.util.*;
[ "com.ibm.icu", "java.io", "org.apache.commons", "org.apache.lucene" ]
com.ibm.icu; java.io; org.apache.commons; org.apache.lucene;
2,637,335
INDArray nextGaussian(char order, int[] shape);
INDArray nextGaussian(char order, int[] shape);
/** * Generate a gaussian number ndarray * of the specified shape and order * * @param order the order of the output array * @param shape the shape to generate * @return the generated gaussian numbers */
Generate a gaussian number ndarray of the specified shape and order
nextGaussian
{ "repo_name": "huitseeker/nd4j", "path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/rng/Random.java", "license": "apache-2.0", "size": 9307 }
[ "org.nd4j.linalg.api.ndarray.INDArray" ]
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ndarray.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
1,430,319
VersionControlInformationEntity setVersionControlInformation(Revision processGroupRevision, String processGroupId, VersionControlInformationDTO versionControlInfo, Map<String, String> versionedComponentMapping);
VersionControlInformationEntity setVersionControlInformation(Revision processGroupRevision, String processGroupId, VersionControlInformationDTO versionControlInfo, Map<String, String> versionedComponentMapping);
/** * Updates the Version Control Information on the Process Group with the given ID * * @param processGroupRevision the Revision of the Process Group * @param processGroupId the ID of the process group to update * @param versionControlInfo the new Version Control Information * @param vers...
Updates the Version Control Information on the Process Group with the given ID
setVersionControlInformation
{ "repo_name": "zhengsg/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 73433 }
[ "java.util.Map", "org.apache.nifi.web.api.dto.VersionControlInformationDTO", "org.apache.nifi.web.api.entity.VersionControlInformationEntity" ]
import java.util.Map; import org.apache.nifi.web.api.dto.VersionControlInformationDTO; import org.apache.nifi.web.api.entity.VersionControlInformationEntity;
import java.util.*; import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.entity.*;
[ "java.util", "org.apache.nifi" ]
java.util; org.apache.nifi;
1,845,552
public List<Sampling> getTopSamplings() { return getTopSamplings(getAllSamplings()); }
List<Sampling> function() { return getTopSamplings(getAllSamplings()); }
/** * Return the top sampling ordered * @return */
Return the top sampling ordered
getTopSamplings
{ "repo_name": "jfreyss/spirit", "path": "src/com/actelion/research/spiritcore/business/study/NamedSampling.java", "license": "gpl-3.0", "size": 13546 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,518,803
@Override @Deprecated public void setLocationMapper(LocationMapper _mapper) { try { setLocationMapper((LocationMapperAccept) _mapper); } catch (ClassCastException ex) { LOG.error("LocationMapper does not have class LocationMapperAccept. Aborting"); } ...
void function(LocationMapper _mapper) { try { setLocationMapper((LocationMapperAccept) _mapper); } catch (ClassCastException ex) { LOG.error(STR); } }
/** * Set the location mapping */
Set the location mapping
setLocationMapper
{ "repo_name": "thesmartenergy/sparql-generate-jena", "path": "sparql-generate-jena/src/main/java/fr/mines_stetienne/ci/sparql_generate/stream/SPARQLExtStreamManager.java", "license": "apache-2.0", "size": 6056 }
[ "org.apache.jena.riot.system.stream.LocationMapper" ]
import org.apache.jena.riot.system.stream.LocationMapper;
import org.apache.jena.riot.system.stream.*;
[ "org.apache.jena" ]
org.apache.jena;
2,181,109
public String getExtendedAccuracyInfo() { return String.format("%s (%d/%d)", (shotsFired == 0 ? "N/A" : (Integer.toString(100 * shotsHit / shotsFired) + "%")), shotsHit, shotsFired); } private Location exitLocation = null;
String function() { return String.format(STR, (shotsFired == 0 ? "N/A" : (Integer.toString(100 * shotsHit / shotsFired) + "%")), shotsHit, shotsFired); } private Location exitLocation = null;
/** * Gets a string representation of this player's accuracy. Includes number of shots * fired and the number of hits. */
Gets a string representation of this player's accuracy. Includes number of shots fired and the number of hits
getExtendedAccuracyInfo
{ "repo_name": "rmct/AutoReferee", "path": "src/main/java/org/mctourney/autoreferee/AutoRefPlayer.java", "license": "gpl-3.0", "size": 31093 }
[ "org.bukkit.Location" ]
import org.bukkit.Location;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
1,240,507
public static Document makeDom(String xml, boolean namespaceAware) throws ParserConfigurationException, SAXException, IOException { if (xml != null) xml = XmlUtil.removeBOM(xml).trim(); InputSource source = new InputSource(new StringReader(xml)); return makeDom(source,namespaceAware); }
static Document function(String xml, boolean namespaceAware) throws ParserConfigurationException, SAXException, IOException { if (xml != null) xml = XmlUtil.removeBOM(xml).trim(); InputSource source = new InputSource(new StringReader(xml)); return makeDom(source,namespaceAware); }
/** * Makes a document from a string. * @param xml the xml * @param namespaceAware true if the Document should be namespace aware * @return the document * @throws ParserConfigurationException if the exception occurs * @throws SAXException if the exception occurs * @throws IOException if the excepti...
Makes a document from a string
makeDom
{ "repo_name": "usgin/geoportal-server-catalog", "path": "geoportal/src/main/java/com/esri/geoportal/base/xml/DomUtil.java", "license": "apache-2.0", "size": 3463 }
[ "java.io.IOException", "java.io.StringReader", "javax.xml.parsers.ParserConfigurationException", "org.w3c.dom.Document", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.io.StringReader; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
java.io; javax.xml; org.w3c.dom; org.xml.sax;
2,534,841
private void rollLogDir() throws IOException { String fileName = source + "-" + InetAddress.getLocalHost().getHostName() + ".log"; Path targetFile = new Path(currentDirPath, fileName); fileSystem.mkdirs(currentDirPath); if (allowAppend) { createOrAppendLogFile(targetFile); } else {...
void function() throws IOException { String fileName = source + "-" + InetAddress.getLocalHost().getHostName() + ".log"; Path targetFile = new Path(currentDirPath, fileName); fileSystem.mkdirs(currentDirPath); if (allowAppend) { createOrAppendLogFile(targetFile); } else { createLogFile(targetFile); } }
/** * Create a new directory based on the current interval and a new log file in * that directory. * * @throws IOException thrown if an error occurs while creating the * new directory or new log file */
Create a new directory based on the current interval and a new log file in that directory
rollLogDir
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/sink/RollingFileSystemSink.java", "license": "apache-2.0", "size": 35626 }
[ "java.io.IOException", "java.net.InetAddress", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import java.net.InetAddress; import org.apache.hadoop.fs.Path;
import java.io.*; import java.net.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.net", "org.apache.hadoop" ]
java.io; java.net; org.apache.hadoop;
799,678
path = removeExtraneousSlashes(path); // Optimization: Most paths don't contain dots. if (!path.contains(".")) { return path; } List<String> dstFragments = new ArrayList<>(); for (String fragment : Splitter.on('/').split(path)) { if (fragment.equals("..")) { if (!dstFragments.is...
path = removeExtraneousSlashes(path); if (!path.contains(".")) { return path; } List<String> dstFragments = new ArrayList<>(); for (String fragment : Splitter.on('/').split(path)) { if (fragment.equals("..")) { if (!dstFragments.isEmpty()) { dstFragments.remove(dstFragments.size() - 1); } } else if (!fragment.equals("....
/** * Removes all ../ and ./ entries from within the given path. If there are extra ..s that move * beyond the first directory given, they are removed. * * Examples: * "a/b/../c" results in "a/c" * "./foo/./../bar" results in "bar" * "a/.." results in "" * "a/../../foo" results in "foo" ...
Removes all ../ and ./ entries from within the given path. If there are extra ..s that move beyond the first directory given, they are removed. Examples: "a/b/../c" results in "a/c" "./foo/./../bar" results in "bar" "a/.." results in "" "a/../../foo" results in "foo"
collapseDots
{ "repo_name": "selkhateeb/closure-compiler", "path": "src/com/google/javascript/jscomp/deps/PathUtil.java", "license": "apache-2.0", "size": 7263 }
[ "com.google.common.base.Joiner", "com.google.common.base.Splitter", "java.util.ArrayList", "java.util.List" ]
import com.google.common.base.Joiner; import com.google.common.base.Splitter; import java.util.ArrayList; import java.util.List;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
222,557
@Override public void enterCommand(@NotNull GraphicsParser.CommandContext ctx) { }
@Override public void enterCommand(@NotNull GraphicsParser.CommandContext ctx) { }
/** * {@inheritDoc} * <p/> * The default implementation does nothing. */
The default implementation does nothing
exitFile
{ "repo_name": "cgfalcon/myprolang", "path": "src/main/java/org/cgfalcon/myprolang/antlr/graphics/GraphicsBaseListener.java", "license": "apache-2.0", "size": 2118 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,398,154
public void setStoreUrl(String storeRef) { this.storeRef = new StoreRef(storeRef); }
void function(String storeRef) { this.storeRef = new StoreRef(storeRef); }
/** * Set the default store reference * * @param storeRef the default store reference */
Set the default store reference
setStoreUrl
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/java/org/alfresco/repo/jscript/Classification.java", "license": "lgpl-3.0", "size": 7057 }
[ "org.alfresco.service.cmr.repository.StoreRef" ]
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.service" ]
org.alfresco.service;
1,320,464
public static int fromCalendarDay(int day) { switch(day) { case Calendar.MONDAY: return 0; case Calendar.TUESDAY: return 1; case Calendar.WEDNESDAY: return 2; case Calendar.THURSDAY: return 3; ...
static int function(int day) { switch(day) { case Calendar.MONDAY: return 0; case Calendar.TUESDAY: return 1; case Calendar.WEDNESDAY: return 2; case Calendar.THURSDAY: return 3; case Calendar.FRIDAY: return 4; case Calendar.SATURDAY: return 5; case Calendar.SUNDAY: return 6; default: return 0; } }
/** * Maps calendar day integers * @param day - the input day in calendar format * @return - the output day in 0-6 mon-sun scheme */
Maps calendar day integers
fromCalendarDay
{ "repo_name": "Quexten/UlricianumPlanner", "path": "app/src/main/java/com/quexten/ulricianumplanner/courseplan/Day.java", "license": "gpl-3.0", "size": 2085 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,006,747
EndpointConfigurationDto putConfiguration(EndpointObjectHash key, EndpointConfigurationDto value);
EndpointConfigurationDto putConfiguration(EndpointObjectHash key, EndpointConfigurationDto value);
/** * Put configuration. * * @param key the key * @param value the value * @return the endpoint configuration dto */
Put configuration
putConfiguration
{ "repo_name": "Oleh-Kravchenko/kaa", "path": "server/node/src/main/java/org/kaaproject/kaa/server/operations/service/cache/CacheService.java", "license": "apache-2.0", "size": 12774 }
[ "org.kaaproject.kaa.common.dto.EndpointConfigurationDto", "org.kaaproject.kaa.common.hash.EndpointObjectHash" ]
import org.kaaproject.kaa.common.dto.EndpointConfigurationDto; import org.kaaproject.kaa.common.hash.EndpointObjectHash;
import org.kaaproject.kaa.common.dto.*; import org.kaaproject.kaa.common.hash.*;
[ "org.kaaproject.kaa" ]
org.kaaproject.kaa;
2,183,834
private void printNode(Node n, int depth) { printSpaces(depth); System.out.println(n.getName() + " " + n.getClass()); if (n.getChildren().size() > 0) { for (Spatial t : n.getChildren()) { if (t instanceof Node) { printNode((Node) t, depth + 3); } else { printSpaces(depth ...
void function(Node n, int depth) { printSpaces(depth); System.out.println(n.getName() + " " + n.getClass()); if (n.getChildren().size() > 0) { for (Spatial t : n.getChildren()) { if (t instanceof Node) { printNode((Node) t, depth + 3); } else { printSpaces(depth + 3); System.out.println(t.getName() + " " + t.getClass()...
/** * Prints the node. * * @param n * the n * @param depth * the depth */
Prints the node
printNode
{ "repo_name": "synergynet/synergynet3.1", "path": "synergynet3.1-parent/multiplicity3-appsystem/src/main/java/multiplicity3/appsystem/MultiplicityClient.java", "license": "bsd-3-clause", "size": 8401 }
[ "com.jme3.scene.Node", "com.jme3.scene.Spatial" ]
import com.jme3.scene.Node; import com.jme3.scene.Spatial;
import com.jme3.scene.*;
[ "com.jme3.scene" ]
com.jme3.scene;
2,478,846
@Override public void queryError(long id, String to, String from, Serializable payload, BamError error) { if (payload instanceof BamLargePayload) _largeMailbox.queryError(id, to, from, payload, error); ...
void function(long id, String to, String from, Serializable payload, BamError error) { if (payload instanceof BamLargePayload) _largeMailbox.queryError(id, to, from, payload, error); else _smallMailbox.queryError(id, to, from, payload, error); }
/** * Query an entity */
Query an entity
queryError
{ "repo_name": "WelcomeHUME/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/bam/mailbox/DualSizeMailbox.java", "license": "gpl-2.0", "size": 4787 }
[ "com.caucho.bam.BamError", "com.caucho.bam.BamLargePayload", "java.io.Serializable" ]
import com.caucho.bam.BamError; import com.caucho.bam.BamLargePayload; import java.io.Serializable;
import com.caucho.bam.*; import java.io.*;
[ "com.caucho.bam", "java.io" ]
com.caucho.bam; java.io;
2,522,706
public static SVG getSVGFromAsset(AssetManager assetMngr, String svgPath, int searchColor, int replaceColor) throws SVGParseException, IOException { InputStream inputStream = assetMngr.open(svgPath); SVG svg = getSVGFromInputStream(inputStream, searchColor, replaceColor); inputStream.close(); return svg; }
static SVG function(AssetManager assetMngr, String svgPath, int searchColor, int replaceColor) throws SVGParseException, IOException { InputStream inputStream = assetMngr.open(svgPath); SVG svg = getSVGFromInputStream(inputStream, searchColor, replaceColor); inputStream.close(); return svg; }
/** * Parse SVG data from an Android application asset. * @param assetMngr the Android asset manager. * @param svgPath the path to the SVG file in the application's assets. * @param searchColor the color in the SVG to replace. * @param replaceColor the color with which to replace the search color. * @return...
Parse SVG data from an Android application asset
getSVGFromAsset
{ "repo_name": "thinkingcow/svg-android-2", "path": "src/com/larvalabs/svgandroid/SVGParser.java", "license": "apache-2.0", "size": 61764 }
[ "android.content.res.AssetManager", "java.io.IOException", "java.io.InputStream" ]
import android.content.res.AssetManager; import java.io.IOException; import java.io.InputStream;
import android.content.res.*; import java.io.*;
[ "android.content", "java.io" ]
android.content; java.io;
1,596,813
public static Collection<String> getRequestedScopes(final J2EContext context) { return getRequestedScopes(context.getRequest()); }
static Collection<String> function(final J2EContext context) { return getRequestedScopes(context.getRequest()); }
/** * Gets requested scopes. * * @param context the context * @return the requested scopes */
Gets requested scopes
getRequestedScopes
{ "repo_name": "Unicon/cas", "path": "support/cas-server-support-oauth/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java", "license": "apache-2.0", "size": 12607 }
[ "java.util.Collection", "org.pac4j.core.context.J2EContext" ]
import java.util.Collection; import org.pac4j.core.context.J2EContext;
import java.util.*; import org.pac4j.core.context.*;
[ "java.util", "org.pac4j.core" ]
java.util; org.pac4j.core;
908,925
public Verbosity verbosity() { return this.innerProperties() == null ? null : this.innerProperties().verbosity(); }
Verbosity function() { return this.innerProperties() == null ? null : this.innerProperties().verbosity(); }
/** * Get the verbosity property: The verbosity level applied to traces emitted by trace policies. * * @return the verbosity value. */
Get the verbosity property: The verbosity level applied to traces emitted by trace policies
verbosity
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/fluent/models/DiagnosticContractInner.java", "license": "mit", "size": 9339 }
[ "com.azure.resourcemanager.apimanagement.models.Verbosity" ]
import com.azure.resourcemanager.apimanagement.models.Verbosity;
import com.azure.resourcemanager.apimanagement.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,005,441
public Iterator<String> getProperties() { Set<String> keys = _properties.keySet(); return keys.iterator(); }
Iterator<String> function() { Set<String> keys = _properties.keySet(); return keys.iterator(); }
/** * Returns an Iterator with all the property names in the model * * @return Iterator */
Returns an Iterator with all the property names in the model
getProperties
{ "repo_name": "lmu-bioinformatics/xmlpipedb", "path": "xmlpipedbutils/src/edu/lmu/xmlpipedb/util/engines/HibernatePropertiesModel.java", "license": "lgpl-3.0", "size": 7429 }
[ "java.util.Iterator", "java.util.Set" ]
import java.util.Iterator; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,369,746
@Test public void testRemoveSize() { final Integer someNumber = 77; instance.add(someNumber); instance.add(someNumber); instance.remove(0); final int expResult = 1; final int result = instance.size(); assertEquals(expResult, result); }
void function() { final Integer someNumber = 77; instance.add(someNumber); instance.add(someNumber); instance.remove(0); final int expResult = 1; final int result = instance.size(); assertEquals(expResult, result); }
/** * Test of remove method. */
Test of remove method
testRemoveSize
{ "repo_name": "CkimiHoK/JavaFromZeroToJunior", "path": "javalearning/Chapter5/src/test/java/ru/aveselov/lesson3/linked/MyLinkedListTest.java", "license": "apache-2.0", "size": 5312 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,678,512
@Override public Object getParameterValue(String parameterName, boolean ignoreMissing) { JRFillParameter param = parametersMap.get(parameterName); Object value; if (param == null) { if (!ignoreMissing) { throw new JRRuntimeException( EXCEPTION_MESSAGE_KEY_PARAMETER_NOT_FOUND, ne...
Object function(String parameterName, boolean ignoreMissing) { JRFillParameter param = parametersMap.get(parameterName); Object value; if (param == null) { if (!ignoreMissing) { throw new JRRuntimeException( EXCEPTION_MESSAGE_KEY_PARAMETER_NOT_FOUND, new Object[]{parameterName}); } Map<String, Object> valuesMap = getPa...
/** * Returns the value of a parameter. * * @param parameterName the parameter name * @param ignoreMissing if set, <code>null</code> will be returned for inexisting parameters * @return the parameter value */
Returns the value of a parameter
getParameterValue
{ "repo_name": "MHTaleb/Encologim", "path": "lib/JasperReport/src/net/sf/jasperreports/engine/fill/FillFunctionContext.java", "license": "gpl-3.0", "size": 3031 }
[ "java.util.Map", "net.sf.jasperreports.engine.JRRuntimeException" ]
import java.util.Map; import net.sf.jasperreports.engine.JRRuntimeException;
import java.util.*; import net.sf.jasperreports.engine.*;
[ "java.util", "net.sf.jasperreports" ]
java.util; net.sf.jasperreports;
2,692,440
default boolean isMultiple() { return !getCount().equals(BigInteger.ONE); }
default boolean isMultiple() { return !getCount().equals(BigInteger.ONE); }
/** * Whether this represents multiple potential values (eg a prefixed address or a segment representing a range of values) */
Whether this represents multiple potential values (eg a prefixed address or a segment representing a range of values)
isMultiple
{ "repo_name": "seancfoley/IPAddress", "path": "IPAddress/src/inet.ipaddr/inet/ipaddr/format/AddressItem.java", "license": "apache-2.0", "size": 11693 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,203,338
public BaseEntity copyTo(BaseEntity entity) { // If both entities are not same then return the entity. if (entity.getEntityName() != this.entityName) { return null; } DeviceInfo deviceInfo = (DeviceInfo) entity; deviceInfo.setDeviceId(this.deviceId); devic...
BaseEntity function(BaseEntity entity) { if (entity.getEntityName() != this.entityName) { return null; } DeviceInfo deviceInfo = (DeviceInfo) entity; deviceInfo.setDeviceId(this.deviceId); deviceInfo.setTenantId(this.tenantId); deviceInfo.setUserId(this.userId); deviceInfo.setLastSyncCount(this.lastSyncCount); deviceIn...
/** * Create the copy of an existing Task object. * * @param entity * @return */
Create the copy of an existing Task object
copyTo
{ "repo_name": "rishabh05/ED", "path": "platform/src/main/java/com/eworkplaceapps/platform/helper/DeviceInfo.java", "license": "apache-2.0", "size": 2987 }
[ "com.eworkplaceapps.platform.entity.BaseEntity" ]
import com.eworkplaceapps.platform.entity.BaseEntity;
import com.eworkplaceapps.platform.entity.*;
[ "com.eworkplaceapps.platform" ]
com.eworkplaceapps.platform;
1,068,388
public static boolean hasAccessToClass(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { return Base.hasValue(model, instanceResource, ACCESS_TO_CLASS, value); }
static boolean function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { return Base.hasValue(model, instanceResource, ACCESS_TO_CLASS, value); }
/** * Check if org.ontoware.rdfreactor.generator.java.JProperty@1c04d881 has * the given value (maybe among other values). * * @param model an RDF2Go model * @param resource an RDF2Go resource * @param value the value to be checked * @return true if this property contains (maybe amon...
Check if org.ontoware.rdfreactor.generator.java.JProperty@1c04d881 has the given value (maybe among other values)
hasAccessToClass
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-w3-wacl/src/main/java/org/w3/ns/auth/acl/Authorization.java", "license": "mit", "size": 78044 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdf2go.model.node.Resource", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdf2go.model.node.Resource; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdf2go.model.node.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
675,193
@Override public Point2D getCenter() { Rectangle2D currentBounds = getBounds(); return new Point2D.Double(currentBounds.getCenterX(), currentBounds.getCenterY() ); }
Point2D function() { Rectangle2D currentBounds = getBounds(); return new Point2D.Double(currentBounds.getCenterX(), currentBounds.getCenterY() ); }
/** * Returns the center point of the node. * Modifying the return value does not influence this node. * @return */
Returns the center point of the node. Modifying the return value does not influence this node
getCenter
{ "repo_name": "classicwuhao/maxuse", "path": "src/gui/org/tzi/use/gui/views/diagrams/elements/PlaceableNode.java", "license": "gpl-2.0", "size": 31797 }
[ "java.awt.geom.Point2D", "java.awt.geom.Rectangle2D" ]
import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
150,196
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<VirtualMachineRunCommandInner>> getByVirtualMachineWithResponseAsync( String resourceGroupName, String vmName, String runCommandName, String expand);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<VirtualMachineRunCommandInner>> getByVirtualMachineWithResponseAsync( String resourceGroupName, String vmName, String runCommandName, String expand);
/** * The operation to get the run command. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine containing the run command. * @param runCommandName The name of the virtual machine run command. * @param expand The expand expression to...
The operation to get the run command
getByVirtualMachineWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineRunCommandsClient.java", "license": "mit", "size": 35801 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.compute.fluent.models.VirtualMachineRunCommandInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineRunCommandInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,775,652
//------------------------------------------------------------------------- protected Options createOptions() { Options options = new Options(); options.addOption(createHelpOption()); options.addOption(createSourceComponentServerOption()); options.addOption(createDestinationComponentServerOption())...
Options function() { Options options = new Options(); options.addOption(createHelpOption()); options.addOption(createSourceComponentServerOption()); options.addOption(createDestinationComponentServerOption()); options.addOption(createLogbackOption()); return options; }
/** * Creates the command line options. * <p> * Subclasses may override this and add their own parameters. The base class defined the options h/help, c/config, l/logback. * * @return the set of command line options, not null */
Creates the command line options. Subclasses may override this and add their own parameters. The base class defined the options h/help, c/config, l/logback
createOptions
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Component/src/main/java/com/opengamma/component/tool/AbstractDualComponentTool.java", "license": "apache-2.0", "size": 9907 }
[ "org.apache.commons.cli.Options" ]
import org.apache.commons.cli.Options;
import org.apache.commons.cli.*;
[ "org.apache.commons" ]
org.apache.commons;
2,447,757
public synchronized void deleteEntry(int position) { if ((position < 0) || (position >= this.entryList.size())) { throw new P4JavaError("Position out of range: " + position + "; list size: " + this.entryList.size()); } updateEntryListPositions(); }
synchronized void function(int position) { if ((position < 0) (position >= this.entryList.size())) { throw new P4JavaError(STR + position + STR + this.entryList.size()); } updateEntryListPositions(); }
/** * Delete the entry at the specified position. Will throw a P4JavaError * if order is out of bounds. The order field of the deleted entry * will be set to ORDER_UNKNOWN; the order fields of any entries * "below" the deletion will be updated with their new order. * * @param position order of entry to be ...
Delete the entry at the specified position. Will throw a P4JavaError if order is out of bounds. The order field of the deleted entry will be set to ORDER_UNKNOWN; the order fields of any entries "below" the deletion will be updated with their new order
deleteEntry
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/r18-1/src/main/java/com/perforce/p4java/core/ViewMap.java", "license": "apache-2.0", "size": 5933 }
[ "com.perforce.p4java.exception.P4JavaError" ]
import com.perforce.p4java.exception.P4JavaError;
import com.perforce.p4java.exception.*;
[ "com.perforce.p4java" ]
com.perforce.p4java;
839,933
public Set<FlowBlock> getReduceBlocks() { return reduceBlocks; } /** * Returns whether this stage block contains one or more reduce blocks or not. * @return {@code true} if this stage block contains one or more reduce blocks, or otherwise {@code false}
Set<FlowBlock> function() { return reduceBlocks; } /** * Returns whether this stage block contains one or more reduce blocks or not. * @return {@code true} if this stage block contains one or more reduce blocks, or otherwise {@code false}
/** * Returns the reduce blocks in this stage. * @return the reduce blocks */
Returns the reduce blocks in this stage
getReduceBlocks
{ "repo_name": "cocoatomo/asakusafw", "path": "mapreduce/compiler/core/src/main/java/com/asakusafw/compiler/flow/plan/StageBlock.java", "license": "apache-2.0", "size": 7354 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,008,355
@Test void testValuesUsing() { final String sql = "select d.deptno, min(e.empid) as empid\n" + "from (values (100, 'Bill', 1)) as e(empid, name, deptno)\n" + "join (values (1, 'LeaderShip')) as d(deptno, name)\n" + " using (deptno)\n" + "group by d.deptno"; sql(sql).ok(); }
@Test void testValuesUsing() { final String sql = STR + STR + STR + STR + STR; sql(sql).ok(); }
/** Test case for * <a href="https://issues.apache.org/jira/browse/CALCITE-801">[CALCITE-801] * NullPointerException using USING on table alias with column aliases</a>. */
Test case for [CALCITE-801]
testValuesUsing
{ "repo_name": "vlsi/calcite", "path": "core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java", "license": "apache-2.0", "size": 133510 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
2,451,834
public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException { SearchResultReference searchResultReference = getDecorated(); try { // The SearchResultReference Tag buffer.put( LdapConstants.SEARCH_RESULT_REFERENCE_TAG ); buffer.put( TLV.getByt...
ByteBuffer function( ByteBuffer buffer ) throws EncoderException { SearchResultReference searchResultReference = getDecorated(); try { buffer.put( LdapConstants.SEARCH_RESULT_REFERENCE_TAG ); buffer.put( TLV.getBytes( getSearchResultReferenceLength() ) ); Referral referral = searchResultReference.getReferral(); if ( re...
/** * Encode the SearchResultReference message to a PDU. * * SearchResultReference : * <pre> * 0x73 LL * 0x04 LL reference * [0x04 LL reference]* * </pre> * @param buffer The buffer where to put the PDU * @param searchResultReferenceDecorator The SearchResultRefere...
Encode the SearchResultReference message to a PDU. SearchResultReference : <code> 0x73 LL 0x04 LL reference [0x04 LL reference] </code>
encode
{ "repo_name": "darranl/directory-shared", "path": "ldap/codec/core/src/main/java/org/apache/directory/api/ldap/codec/decorators/SearchResultReferenceDecorator.java", "license": "apache-2.0", "size": 6256 }
[ "java.nio.BufferOverflowException", "java.nio.ByteBuffer", "org.apache.directory.api.asn1.EncoderException", "org.apache.directory.api.asn1.ber.tlv.BerValue", "org.apache.directory.api.asn1.ber.tlv.TLV", "org.apache.directory.api.i18n.I18n", "org.apache.directory.api.ldap.codec.api.LdapConstants", "or...
import java.nio.BufferOverflowException; import java.nio.ByteBuffer; import org.apache.directory.api.asn1.EncoderException; import org.apache.directory.api.asn1.ber.tlv.BerValue; import org.apache.directory.api.asn1.ber.tlv.TLV; import org.apache.directory.api.i18n.I18n; import org.apache.directory.api.ldap.codec.api.L...
import java.nio.*; import org.apache.directory.api.asn1.*; import org.apache.directory.api.asn1.ber.tlv.*; import org.apache.directory.api.i18n.*; import org.apache.directory.api.ldap.codec.api.*; import org.apache.directory.api.ldap.model.message.*;
[ "java.nio", "org.apache.directory" ]
java.nio; org.apache.directory;
2,625,576
@SimpleProperty(category = PropertyCategory.BEHAVIOR) public YailList Elements() { return items; }
@SimpleProperty(category = PropertyCategory.BEHAVIOR) YailList function() { return items; }
/** * Elements property getter method * * @return a YailList representing the list of strings to be picked from */
Elements property getter method
Elements
{ "repo_name": "themadrobot/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/ListView.java", "license": "apache-2.0", "size": 18196 }
[ "com.google.appinventor.components.annotations.PropertyCategory", "com.google.appinventor.components.annotations.SimpleProperty", "com.google.appinventor.components.runtime.util.YailList" ]
import com.google.appinventor.components.annotations.PropertyCategory; import com.google.appinventor.components.annotations.SimpleProperty; import com.google.appinventor.components.runtime.util.YailList;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*;
[ "com.google.appinventor" ]
com.google.appinventor;
1,626,434
public Connection connectTo(Socket socket) { Connection connection = new Connection(socket, this); connections.add(connection); return connection; } protected HashSet connections = new HashSet();
Connection function(Socket socket) { Connection connection = new Connection(socket, this); connections.add(connection); return connection; } protected HashSet connections = new HashSet();
/** * creates a new connection for a socket * * @param socket * socket * @return the Connection object that handles all further communication with * this socket */
creates a new connection for a socket
connectTo
{ "repo_name": "SergiyKolesnikov/fuji", "path": "examples/Chat_casestudies/chat-nick/features/Base/Server.java", "license": "lgpl-3.0", "size": 2365 }
[ "java.net.Socket", "java.util.HashSet" ]
import java.net.Socket; import java.util.HashSet;
import java.net.*; import java.util.*;
[ "java.net", "java.util" ]
java.net; java.util;
46,620
EReference getaddExp_Right();
EReference getaddExp_Right();
/** * Returns the meta object for the containment reference '{@link org.xtext.example.delphi.delphi.addExp#getRight <em>Right</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Right</em>'. * @see org.xtext.example.delphi.delphi.addExp#getRi...
Returns the meta object for the containment reference '<code>org.xtext.example.delphi.delphi.addExp#getRight Right</code>'.
getaddExp_Right
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/src-gen/org/xtext/example/delphi/delphi/DelphiPackage.java", "license": "epl-1.0", "size": 434880 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
416,404
@Test(expected = IllegalArgumentException.class) public void testDeliverAnalysisResultFail5() throws Exception { String userId = "userId"; String requestId = "requestId"; dataExchangeService.deliverAnalysisResult(userId, requestId, null); }
@Test(expected = IllegalArgumentException.class) void function() throws Exception { String userId = STR; String requestId = STR; dataExchangeService.deliverAnalysisResult(userId, requestId, null); }
/** * Failure test for DataExchangeService#deliverAnalysisResult when result is * null * * @throws Exception * throws if any error happen */
Failure test for DataExchangeService#deliverAnalysisResult when result is null
testDeliverAnalysisResultFail5
{ "repo_name": "imclab/CoECI-CMS-Healthcare-Fraud-Prevention", "path": "hub/src/java/tests/com/hfpp/network/hub/services/DataExchangeServiceTest.java", "license": "apache-2.0", "size": 73166 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,324,413
public static final TreeItem findTreeItem(TreeItem parent, String parentName, String name) { return findTreeItem(null, parent, parentName, name); }
static final TreeItem function(TreeItem parent, String parentName, String name) { return findTreeItem(null, parent, parentName, name); }
/** * Finds a TreeItem with a certain label (name) in a (part of a) tree. * @param parent The TreeItem where we start looking. * @param parentName The name of the parent to match as well (null=not used) * @param name The name or item label to look for. * @return The TreeItem if the label was found, null if...
Finds a TreeItem with a certain label (name) in a (part of a) tree
findTreeItem
{ "repo_name": "dianhu/Kettle-Research", "path": "src-ui/org/pentaho/di/ui/core/ConstUI.java", "license": "lgpl-2.1", "size": 7145 }
[ "org.eclipse.swt.widgets.TreeItem" ]
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,739,159
public void setMinId(String v) { if ( v != null && v.length() == 0 ) { v = null; } if (!ObjectUtils.equals(v, this.minId)) { modified = true; this.minId = v; } }
void function(String v) { if ( v != null && v.length() == 0 ) { v = null; } if (!ObjectUtils.equals(v, this.minId)) { modified = true; this.minId = v; } }
/** * Set the value of minId. * @param v Value to assign to minId. */
Set the value of minId
setMinId
{ "repo_name": "SpoonLabs/gumtree-spoon-ast-diff", "path": "src/test/resources/examples/t_227985/right_IssueSearch_1.66.java", "license": "apache-2.0", "size": 72744 }
[ "org.apache.commons.lang.ObjectUtils" ]
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
296,348
public void putTo(byte[] msgBytes) throws NullPointerException, ArrayIndexOutOfBoundsException { UnsignedInt.putToByteArray(msgBytes, ID_LENGTH + FLAGS_LENGTH + COUNT_LENGTH * 3, this.arCount, COUNT_LENGTH); UnsignedInt.putToByteArray(msgBytes, ID_LENGTH + FLAGS_LENGTH + COUNT_LENGTH * 2, this.nsCount, CO...
void function(byte[] msgBytes) throws NullPointerException, ArrayIndexOutOfBoundsException { UnsignedInt.putToByteArray(msgBytes, ID_LENGTH + FLAGS_LENGTH + COUNT_LENGTH * 3, this.arCount, COUNT_LENGTH); UnsignedInt.putToByteArray(msgBytes, ID_LENGTH + FLAGS_LENGTH + COUNT_LENGTH * 2, this.nsCount, COUNT_LENGTH); Unsig...
/** * NOTE: msgBytes must be != null and msgBytes length >= HEADER_LEN. * Method for putting header to message bytes. msgBytes array is * altered (unless an exception is thrown). ** * @since 2.2 */
Method for putting header to message bytes. msgBytes array is altered (unless an exception is thrown)
putTo
{ "repo_name": "FGMEMBERS-SCENERY/terramaster", "path": "src/net/sf/ivmaidns/dns/DNSMsgHeader.java", "license": "gpl-2.0", "size": 25090 }
[ "net.sf.ivmaidns.util.UnsignedInt" ]
import net.sf.ivmaidns.util.UnsignedInt;
import net.sf.ivmaidns.util.*;
[ "net.sf.ivmaidns" ]
net.sf.ivmaidns;
705,310
private void init() { setLayout(new BorderLayout(0, 5)); setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); JPanel p = new JPanel(); p.setLayout(new BorderLayout()); p.add(makeLabelPanel(), BorderLayout.NORTH); p.add(makeMainPanel(), BorderLa...
void function() { setLayout(new BorderLayout(0, 5)); setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); JPanel p = new JPanel(); p.setLayout(new BorderLayout()); p.add(makeLabelPanel(), BorderLayout.NORTH); p.add(makeMainPanel(), BorderLayout.CENTER); p.add(Box.createVerticalStrut(70), BorderLayout.WES...
/** * Initialize the components and layout of this component. */
Initialize the components and layout of this component
init
{ "repo_name": "ThiagoGarciaAlves/jmeter", "path": "src/components/org/apache/jmeter/visualizers/PropertyControlGui.java", "license": "apache-2.0", "size": 8372 }
[ "java.awt.BorderLayout", "javax.swing.Box", "javax.swing.JPanel" ]
import java.awt.BorderLayout; import javax.swing.Box; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
406,062
@Override public void remove() { try { this.rs.deleteRow(); } catch (SQLException e) { rethrow(e); } }
void function() { try { this.rs.deleteRow(); } catch (SQLException e) { rethrow(e); } }
/** * Deletes the current row from the <code>ResultSet</code>. * @see Iterator#remove() * @throws RuntimeException if an SQLException occurs. */
Deletes the current row from the <code>ResultSet</code>
remove
{ "repo_name": "penggangshu/uhm", "path": "src/main/java/org/apache/commons/dbutils/ResultSetIterator.java", "license": "unlicense", "size": 4278 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,430,614
private boolean isExprSurrounded(DetailAST ast) { return ast.getFirstChild().getType() == TokenTypes.LPAREN; }
boolean function(DetailAST ast) { return ast.getFirstChild().getType() == TokenTypes.LPAREN; }
/** * Tests if the given expression node is surrounded by parentheses. * @param ast a <code>DetailAST</code> whose type is * <code>TokenTypes.EXPR</code>. * @return <code>true</code> if the expression is surrounded by * parentheses. */
Tests if the given expression node is surrounded by parentheses
isExprSurrounded
{ "repo_name": "naver/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java", "license": "lgpl-2.1", "size": 11629 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
45,153
public static Offset<Long> byLessThan(Long value) { return Offset.offset(value); }
static Offset<Long> function(Long value) { return Offset.offset(value); }
/** * Assertions entry point for Long {@link Offset} to use with isCloseTo assertions. * <p> * Typical usage : * <pre><code class='java'> assertThat(5l).isCloseTo(7l, byLessThan(2l));</code></pre> * * @param value the value of the offset. * @return the created {@code Offset}. * @throws NullPoint...
Assertions entry point for Long <code>Offset</code> to use with isCloseTo assertions. Typical usage : <code> assertThat(5l).isCloseTo(7l, byLessThan(2l));</code></code>
byLessThan
{ "repo_name": "ChrisA89/assertj-core", "path": "src/main/java/org/assertj/core/api/Assertions.java", "license": "apache-2.0", "size": 107527 }
[ "org.assertj.core.data.Offset" ]
import org.assertj.core.data.Offset;
import org.assertj.core.data.*;
[ "org.assertj.core" ]
org.assertj.core;
792,724
@Column(name = "description", length = 1024) @Override public String getDescription() { return (String) get(5); }
@Column(name = STR, length = 1024) String function() { return (String) get(5); }
/** * Getter for <code>cattle.healthcheck_instance.description</code>. */
Getter for <code>cattle.healthcheck_instance.description</code>
getDescription
{ "repo_name": "vincent99/cattle", "path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/tables/records/HealthcheckInstanceRecord.java", "license": "apache-2.0", "size": 14928 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,224,106