method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static DataNode createDataNode(String args[], Configuration conf) throws IOException { return createDataNode(args, conf, null); }
static DataNode function(String args[], Configuration conf) throws IOException { return createDataNode(args, conf, null); }
/** Instantiate & Start a single datanode daemon and wait for it to finish. * If this thread is specifically interrupted, it will stop waiting. */
Instantiate & Start a single datanode daemon and wait for it to finish. If this thread is specifically interrupted, it will stop waiting
createDataNode
{ "repo_name": "kl0u/visco", "path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 80668 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration;
import java.io.*; import org.apache.hadoop.conf.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,668,791
@Test public void testControllerOne() throws Exception { RestTemplate rest = new TestRestTemplate(); ResponseEntity<String> entity = rest.getForEntity(getBaseUrl() + "/one?name=Paul", String.class); assertThat(entity.getBody(), is("ControllerOne says \"Hello, Paul, I'm shared service\"")...
void function() throws Exception { RestTemplate rest = new TestRestTemplate(); ResponseEntity<String> entity = rest.getForEntity(getBaseUrl() + STR, String.class); assertThat(entity.getBody(), is(STRHello, Paul, I'm shared service\STR/one?name=%D0%9F%D0%B0%D0%B2%D0%B5%D0%BB"); entity = rest.getForEntity(uri, String.cla...
/** * One of these tests will fail because Spring Test Framework initialize only one connector */
One of these tests will fail because Spring Test Framework initialize only one connector
testControllerOne
{ "repo_name": "dddpaul/spring-boot-connectors", "path": "src/test/java/com/github/dddpaul/connectors/ApplicationTest.java", "license": "apache-2.0", "size": 2277 }
[ "org.hamcrest.core.Is", "org.springframework.boot.test.TestRestTemplate", "org.springframework.http.ResponseEntity", "org.springframework.web.client.RestTemplate" ]
import org.hamcrest.core.Is; import org.springframework.boot.test.TestRestTemplate; import org.springframework.http.ResponseEntity; import org.springframework.web.client.RestTemplate;
import org.hamcrest.core.*; import org.springframework.boot.test.*; import org.springframework.http.*; import org.springframework.web.client.*;
[ "org.hamcrest.core", "org.springframework.boot", "org.springframework.http", "org.springframework.web" ]
org.hamcrest.core; org.springframework.boot; org.springframework.http; org.springframework.web;
2,528,217
public AgentPoolUpgradeProfileInner withUpgrades(List<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades) { this.upgrades = upgrades; return this; }
AgentPoolUpgradeProfileInner function(List<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades) { this.upgrades = upgrades; return this; }
/** * Set list of orchestrator types and versions available for upgrade. * * @param upgrades the upgrades value to set * @return the AgentPoolUpgradeProfileInner object itself. */
Set list of orchestrator types and versions available for upgrade
withUpgrades
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/implementation/AgentPoolUpgradeProfileInner.java", "license": "mit", "size": 5127 }
[ "com.microsoft.azure.management.containerservice.v2020_07_01.AgentPoolUpgradeProfilePropertiesUpgradesItem", "java.util.List" ]
import com.microsoft.azure.management.containerservice.v2020_07_01.AgentPoolUpgradeProfilePropertiesUpgradesItem; import java.util.List;
import com.microsoft.azure.management.containerservice.v2020_07_01.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
489,213
Folder getEnclosingFolder() throws IOException, SQLException;
Folder getEnclosingFolder() throws IOException, SQLException;
/** * Method returns an instance of the enclosing folder. * * @return enclosingFolder instance */
Method returns an instance of the enclosing folder
getEnclosingFolder
{ "repo_name": "SciGaP/DEPRECATED-Cipres-Airavata-POC", "path": "saminda/cipres-airavata/sdk/src/main/java/org/ngbw/sdk/database/FolderItem.java", "license": "apache-2.0", "size": 2415 }
[ "java.io.IOException", "java.sql.SQLException" ]
import java.io.IOException; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
1,913,596
private void pushRule(Device device, PacketRequest request) { if (!device.type().equals(Device.Type.SWITCH)) { return; }
void function(Device device, PacketRequest request) { if (!device.type().equals(Device.Type.SWITCH)) { return; }
/** * Pushes packet intercept flow rules to the device. * * @param device the device to push the rules to * @param request the packet request */
Pushes packet intercept flow rules to the device
pushRule
{ "repo_name": "wuwenbin2/onos_bgp_evpn", "path": "core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java", "license": "apache-2.0", "size": 17325 }
[ "org.onosproject.net.Device", "org.onosproject.net.packet.PacketRequest" ]
import org.onosproject.net.Device; import org.onosproject.net.packet.PacketRequest;
import org.onosproject.net.*; import org.onosproject.net.packet.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,634,228
public static int random(int min, int max) { Random r = new Random(); return r.nextInt((max - min) + 1) + min; }
static int function(int min, int max) { Random r = new Random(); return r.nextInt((max - min) + 1) + min; }
/** * Generate random int between min and max, inclusive * @param min * @param max * @return */
Generate random int between min and max, inclusive
random
{ "repo_name": "djBo/coolview-android", "path": "src/nl/coolview/android/Crypto.java", "license": "mit", "size": 23975 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,464,819
public void setRemove(ContextualRemoveOperation<T> handler) { this.removeOperation = handler; }
void function(ContextualRemoveOperation<T> handler) { this.removeOperation = handler; }
/** * Sets the {@link ContextualRemoveOperation} for the REMOVE patch operation. * * @param handler The {@link ContextualRemoveOperation} to use for this patch request * @see JsonPatchOperationType#REMOVE */
Sets the <code>ContextualRemoveOperation</code> for the REMOVE patch operation
setRemove
{ "repo_name": "tbugrara/dropwizard-patch", "path": "src/main/java/io/progix/dropwizard/patch/ContextualJsonPatch.java", "license": "apache-2.0", "size": 9585 }
[ "io.progix.dropwizard.patch.operations.contextual.ContextualRemoveOperation" ]
import io.progix.dropwizard.patch.operations.contextual.ContextualRemoveOperation;
import io.progix.dropwizard.patch.operations.contextual.*;
[ "io.progix.dropwizard" ]
io.progix.dropwizard;
295,554
public void setTransformerFactory(TransformerFactory transformerFactory) { this.transformerFactory = transformerFactory; }
void function(TransformerFactory transformerFactory) { this.transformerFactory = transformerFactory; }
/** * Optional setter to override default TransformerFactory */
Optional setter to override default TransformerFactory
setTransformerFactory
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java", "license": "apache-2.0", "size": 10933 }
[ "javax.xml.transform.TransformerFactory" ]
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.*;
[ "javax.xml" ]
javax.xml;
767,887
private static boolean equals(final ParameterizedType p, final Type t) { if (t instanceof ParameterizedType) { final ParameterizedType other = (ParameterizedType) t; if (equals(p.getRawType(), other.getRawType()) && equals(p.getOwnerType(), other.getOwnerType())) { re...
static boolean function(final ParameterizedType p, final Type t) { if (t instanceof ParameterizedType) { final ParameterizedType other = (ParameterizedType) t; if (equals(p.getRawType(), other.getRawType()) && equals(p.getOwnerType(), other.getOwnerType())) { return equals(p.getActualTypeArguments(), other.getActualTyp...
/** * Learn whether {@code t} equals {@code p}. * * @param p LHS * @param t RHS * @return boolean * @since 3.2 */
Learn whether t equals p
equals
{ "repo_name": "canoo/dolphin-platform", "path": "platform/dolphin-platform-core/src/main/java/com/canoo/dp/impl/platform/core/commons/lang/TypeUtils.java", "license": "apache-2.0", "size": 52157 }
[ "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type" ]
import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,123,066
public void setVariable(String name, Fraction value) { symbolTable.put(name.trim(), value); }
void function(String name, Fraction value) { symbolTable.put(name.trim(), value); }
/** * Set a variable value * * @param name variable name * @param value value to set */
Set a variable value
setVariable
{ "repo_name": "MightyPork/rcalc", "path": "src/net/mightypork/rcalc/RCalcSession.java", "license": "bsd-2-clause", "size": 3717 }
[ "net.mightypork.rcalc.numbers.Fraction" ]
import net.mightypork.rcalc.numbers.Fraction;
import net.mightypork.rcalc.numbers.*;
[ "net.mightypork.rcalc" ]
net.mightypork.rcalc;
2,662,844
private void parseStringConstantMapping(String expression) throws AggregationException { String[] parsedExpression = expression.split(Defaults.ASSIGN_SIGN); // remove the leading and trailing quotation marks String constant = parsedExpression[1].trim().substring(1, parsedExpression[1].trim().length() - 1); ...
void function(String expression) throws AggregationException { String[] parsedExpression = expression.split(Defaults.ASSIGN_SIGN); String constant = parsedExpression[1].trim().substring(1, parsedExpression[1].trim().length() - 1); constant = createString(constant); String outputField = parseOutputField(parsedExpression...
/** * Parses a string constant mapping. * * @param expression * @throws AggregationException */
Parses a string constant mapping
parseStringConstantMapping
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.component/src/org/jetel/component/aggregate/AggregateMappingParser.java", "license": "lgpl-2.1", "size": 29314 }
[ "org.jetel.data.Defaults" ]
import org.jetel.data.Defaults;
import org.jetel.data.*;
[ "org.jetel.data" ]
org.jetel.data;
874,628
private void generateButtons() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException{ String groupString = "Group\t%s\t\"%s\"\t(%s)\n"; String itemString = "%s\t%s\t\"%s\"\t(%s)\t{omnilink=\"%s:%d\",autoupdate=\"false\"}\n"; String groupName = "Buttons"; ...
void function() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException{ String groupString = STR%s\STR; String itemString = STR%s\STR%s:%d\STRfalse\"}\n"; String groupName = STR; groups.append(String.format(groupString,groupName,STR,"All")); int objnum = 0; Message ...
/** * Generates button items * @throws IOException * @throws OmniNotConnectedException * @throws OmniInvalidResponseException * @throws OmniUnknownMessageTypeException */
Generates button items
generateButtons
{ "repo_name": "gregfinley/openhab", "path": "bundles/binding/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/ui/OmnilinkItemGenerator.java", "license": "epl-1.0", "size": 28633 }
[ "com.digitaldan.jomnilinkII.Message", "com.digitaldan.jomnilinkII.MessageTypes", "com.digitaldan.jomnilinkII.OmniInvalidResponseException", "com.digitaldan.jomnilinkII.OmniNotConnectedException", "com.digitaldan.jomnilinkII.OmniUnknownMessageTypeException", "java.io.IOException" ]
import com.digitaldan.jomnilinkII.Message; import com.digitaldan.jomnilinkII.MessageTypes; import com.digitaldan.jomnilinkII.OmniInvalidResponseException; import com.digitaldan.jomnilinkII.OmniNotConnectedException; import com.digitaldan.jomnilinkII.OmniUnknownMessageTypeException; import java.io.IOException;
import com.digitaldan.*; import java.io.*;
[ "com.digitaldan", "java.io" ]
com.digitaldan; java.io;
1,120,709
private void traverseBranch(Node n, Node parent) { Token type = n.getToken(); if (type == Token.SCRIPT) { handleScript(n, parent); return; } else if (type == Token.FUNCTION) { handleFunction(n, parent); return; } curNode = n; if (!callback.shouldTraverse(this, n, paren...
void function(Node n, Node parent) { Token type = n.getToken(); if (type == Token.SCRIPT) { handleScript(n, parent); return; } else if (type == Token.FUNCTION) { handleFunction(n, parent); return; } curNode = n; if (!callback.shouldTraverse(this, n, parent)) { return; } if (type == Token.CLASS) { traverseClass(n); } el...
/** * Traverses a branch. */
Traverses a branch
traverseBranch
{ "repo_name": "MatrixFrog/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeTraversal.java", "license": "apache-2.0", "size": 35612 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
550,016
public void setCreated(java.lang.String value) { Base.set(this.model, this.getResource(), CREATED, value); }
void function(java.lang.String value) { Base.set(this.model, this.getResource(), CREATED, value); }
/** * Sets a value of property DateCreated from an instance of java.lang.String * First, all existing values are removed, then this value is added. * Cardinality constraints are not checked, but this method exists only for * properties with no minCardinality or minCardinality == 1. * * @p...
Sets a value of property DateCreated from an instance of java.lang.String First, all existing values are removed, then this value is added. Cardinality constraints are not checked, but this method exists only for properties with no minCardinality or minCardinality == 1
setCreated
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java", "license": "mit", "size": 317844 }
[ "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdfreactor" ]
org.ontoware.rdfreactor;
1,084,143
@Deployment public void testParentActivationOnNonJoiningEnd() throws Exception { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("parentActivationOnNonJoiningEnd"); List<Execution> executionsBefore = runtimeService.createExecutionQuery().list(); assertEquals(3, executions...
void function() throws Exception { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(STR); List<Execution> executionsBefore = runtimeService.createExecutionQuery().list(); assertEquals(3, executionsBefore.size()); List<Task> firstTasks = taskService.createTaskQuery().processInstanceId(processIn...
/** * Test for ACT-1216: When merging a concurrent execution the parent is not activated correctly */
Test for ACT-1216: When merging a concurrent execution the parent is not activated correctly
testParentActivationOnNonJoiningEnd
{ "repo_name": "springvelocity/xbpm5", "path": "activiti-engine/src/test/java/org/activiti/engine/test/bpmn/gateway/InclusiveGatewayTest.java", "license": "apache-2.0", "size": 18586 }
[ "java.util.List", "org.activiti.engine.runtime.Execution", "org.activiti.engine.runtime.ProcessInstance", "org.activiti.engine.task.Task" ]
import java.util.List; import org.activiti.engine.runtime.Execution; import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.task.Task;
import java.util.*; import org.activiti.engine.runtime.*; import org.activiti.engine.task.*;
[ "java.util", "org.activiti.engine" ]
java.util; org.activiti.engine;
2,148,161
public synchronized boolean shutdown(long timeout, TimeUnit unit) throws InterruptedException { boolean success = executor_.shutdown(timeout, unit); if (success) { LOGGER_.info("ELK reasoner has shut down"); } else { LOGGER_.error("ELK reasoner failed to shut down!"); } return success; }
synchronized boolean function(long timeout, TimeUnit unit) throws InterruptedException { boolean success = executor_.shutdown(timeout, unit); if (success) { LOGGER_.info(STR); } else { LOGGER_.error(STR); } return success; }
/** * Tries to shut down the reasoner within the specified time * * @param timeout * the maximum time to wait * @param unit * the time unit of the timeout argument * @return {@code true} if the operation was successful * @throws InterruptedException * if the current ...
Tries to shut down the reasoner within the specified time
shutdown
{ "repo_name": "aifargonos/elk-reasoner", "path": "elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/Reasoner.java", "license": "apache-2.0", "size": 29321 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,793,316
try { final String trimmed = value.trim(); if (trimmed.startsWith("P")) { return Hours.parseHours(trimmed); } else { final int hours = Integer.parseInt(trimmed); return Hours.hours(hours); } } catch (Exception ex) { ...
try { final String trimmed = value.trim(); if (trimmed.startsWith("P")) { return Hours.parseHours(trimmed); } else { final int hours = Integer.parseInt(trimmed); return Hours.hours(hours); } } catch (Exception ex) { throw new ParameterException(STRSTR\STR, ex); } }
/** * Returns a {@link org.joda.time.Hours} instance representing the specified {@link String} {@literal value}. * * @param value The configuration parameter's {@link String} value * @return A {@link org.joda.time.Hours} instance representing the configuration parameter's value */
Returns a <code>org.joda.time.Hours</code> instance representing the specified <code>String</code> value
convertFrom
{ "repo_name": "joschi/JadConfig", "path": "src/main/java/com/github/joschi/jadconfig/jodatime/converters/HoursConverter.java", "license": "apache-2.0", "size": 1686 }
[ "com.github.joschi.jadconfig.ParameterException", "org.joda.time.Hours" ]
import com.github.joschi.jadconfig.ParameterException; import org.joda.time.Hours;
import com.github.joschi.jadconfig.*; import org.joda.time.*;
[ "com.github.joschi", "org.joda.time" ]
com.github.joschi; org.joda.time;
2,585,081
private void importKeyCertificateFromIntent(Intent intent, String password) { importKeyCertificateFromIntent(intent, password, 0 ); }
void function(Intent intent, String password) { importKeyCertificateFromIntent(intent, password, 0 ); }
/** * Imports a certificate to the managed profile. If the provided password failed to decrypt the * given certificate, shows a try again prompt. Otherwise, shows a prompt for the certificate * alias. * * @param intent Intent that contains the certificate data uri. * @param password The pa...
Imports a certificate to the managed profile. If the provided password failed to decrypt the given certificate, shows a try again prompt. Otherwise, shows a prompt for the certificate alias
importKeyCertificateFromIntent
{ "repo_name": "googlesamples/android-testdpc", "path": "app/src/main/java/com/afwsamples/testdpc/policy/PolicyManagementFragment.java", "license": "apache-2.0", "size": 213498 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
2,201,538
public String getAccountName(DBTransaction transaction, String character) throws SQLException { String res = null; String query = "SELECT username FROM account, characters WHERE characters.charname='[charname]' AND characters.player_id=account.id"; logger.debug("getAccountName is executing query " + query); ...
String function(DBTransaction transaction, String character) throws SQLException { String res = null; String query = STR; logger.debug(STR + query); Map<String, Object> params = new HashMap<String, Object>(); params.put(STR, character); ResultSet result = transaction.query(query, params); if (result.next()) { res = res...
/** * gets the name of the account to which the specified character belongs. * * @param transaction the database transaction * @param character name of character * @return name of account, or <code>null<code> in case the character does not exist * @throws SQLException if there is any problem at database *...
gets the name of the account to which the specified character belongs
getAccountName
{ "repo_name": "nhnb/marauroa", "path": "src/marauroa/server/game/db/CharacterDAO.java", "license": "gpl-2.0", "size": 31887 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.util.HashMap", "java.util.Map" ]
import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashMap; import java.util.Map;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
1,376,607
public void beginReceiveCookie(WebRequest theRequest) { // Why do we need to have a begin method here ? Good question ! // The answer is that in this test, the SampleServlet's // setResponseCookie() method sets the domain name of the cookie // to return to jakarta.apache.org. It ...
void function(WebRequest theRequest) { theRequest.setURL(STR, null, null, null, null); }
/** * Test that it is possible to send back a Cookie and verify it on the * client side. * * @param theRequest the request object that serves to initialize the * HTTP connection to the server redirector. */
Test that it is possible to send back a Cookie and verify it on the client side
beginReceiveCookie
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/cactus141j2ee13/sample-servlet/src/sample/org/apache/cactus/sample/TestSampleServlet.java", "license": "lgpl-3.0", "size": 16157 }
[ "org.apache.cactus.WebRequest" ]
import org.apache.cactus.WebRequest;
import org.apache.cactus.*;
[ "org.apache.cactus" ]
org.apache.cactus;
1,695,012
private String getMove(Map<Country, AttackTarget> targets, boolean attack, AttackTarget selection, int route, Country attackFrom) { if (selection == null) { return null; } if (attack) { if (attackFrom.getArmies() < 5 && selection.remaining < 1) { Country toAttack = getCountryToAttack(target...
String function(Map<Country, AttackTarget> targets, boolean attack, AttackTarget selection, int route, Country attackFrom) { if (selection == null) { return null; } if (attack) { if (attackFrom.getArmies() < 5 && selection.remaining < 1) { Country toAttack = getCountryToAttack(targets, selection, route, attackFrom); if...
/** * Gets the move (placement or attack) or returns null if it's not a good attack */
Gets the move (placement or attack) or returns null if it's not a good attack
getMove
{ "repo_name": "hernol/ConuWar", "path": "Game/src/net/yura/domination/engine/ai/logic/AIDomination.java", "license": "gpl-3.0", "size": 90745 }
[ "java.util.Map", "net.yura.domination.engine.core.Country" ]
import java.util.Map; import net.yura.domination.engine.core.Country;
import java.util.*; import net.yura.domination.engine.core.*;
[ "java.util", "net.yura.domination" ]
java.util; net.yura.domination;
1,358,326
private static void setOffsetHeight(final Widget widget, int height) { widget.setHeight(height + "px"); final int offset = widget.getOffsetHeight(); if (offset > 0) { height -= offset - height; if (height > 0) { widget.setHeight(height + "px"); } } }
static void function(final Widget widget, int height) { widget.setHeight(height + "px"); final int offset = widget.getOffsetHeight(); if (offset > 0) { height -= offset - height; if (height > 0) { widget.setHeight(height + "px"); } } }
/** * Properly sets the total height of a widget. * This takes into account decorations such as border, margin, and padding. */
Properly sets the total height of a widget. This takes into account decorations such as border, margin, and padding
setOffsetHeight
{ "repo_name": "cyngn/opentsdb", "path": "src/tsd/client/QueryUi.java", "license": "gpl-3.0", "size": 51617 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
811,512
final String msg = createLogMessage(throwable.toString()); log.error(msg, throwable); final SoapFault soapFault = createSoapFault(msg); return soapFault; }
final String msg = createLogMessage(throwable.toString()); log.error(msg, throwable); final SoapFault soapFault = createSoapFault(msg); return soapFault; }
/** * Creates a soap fault. * * @param throwable the cause. * @return the soap fault object. */
Creates a soap fault
createSoapFault
{ "repo_name": "KentorJava/sll-invoice-data-tmp", "path": "invoice-data/invoice-data-app/src/main/java/se/sll/invoicedata/app/ws/AbstractProducer.java", "license": "lgpl-3.0", "size": 6934 }
[ "org.apache.cxf.binding.soap.SoapFault" ]
import org.apache.cxf.binding.soap.SoapFault;
import org.apache.cxf.binding.soap.*;
[ "org.apache.cxf" ]
org.apache.cxf;
1,880,715
public boolean hasConnectivity() { NetworkInfo info = mConnectivityManager.getActiveNetworkInfo(); return (info != null); }
boolean function() { NetworkInfo info = mConnectivityManager.getActiveNetworkInfo(); return (info != null); }
/** * Request current connectivity status * @return whether there is connectivity at this time */
Request current connectivity status
hasConnectivity
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/Email/provider_src/com/android/email/EmailConnectivityManager.java", "license": "gpl-3.0", "size": 8179 }
[ "android.net.NetworkInfo" ]
import android.net.NetworkInfo;
import android.net.*;
[ "android.net" ]
android.net;
134,630
private void getEdgesInParentCells(List<S2CellId> cover, Set<Integer> candidateCrossings) { // Find all parent cells of covering cells. Set<S2CellId> parentCells = Sets.newHashSet(); for (S2CellId coverCell : cover) { for (int parentLevel = coverCell.level() - 1; parentLevel >= minimumS2LevelUsed; ...
void function(List<S2CellId> cover, Set<Integer> candidateCrossings) { Set<S2CellId> parentCells = Sets.newHashSet(); for (S2CellId coverCell : cover) { for (int parentLevel = coverCell.level() - 1; parentLevel >= minimumS2LevelUsed; --parentLevel) { if (!parentCells.add(coverCell.parent(parentLevel))) { break; } } } f...
/** * Adds to candidateCrossings all the edges present in any ancestor of any * cell of cover, down to minimumS2LevelUsed. The cell->edge map is in the * variable mapping. */
Adds to candidateCrossings all the edges present in any ancestor of any cell of cover, down to minimumS2LevelUsed. The cell->edge map is in the variable mapping
getEdgesInParentCells
{ "repo_name": "wenhao/s2-geometry-library-java", "path": "src/main/java/com/google/common/geometry/S2EdgeIndex.java", "license": "apache-2.0", "size": 21509 }
[ "com.google.common.collect.Sets", "java.util.List", "java.util.Set" ]
import com.google.common.collect.Sets; import java.util.List; import java.util.Set;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,045,070
public void addDefaultFlowers() { addFlower(Blocks.YELLOW_FLOWER.getDefaultState().withProperty(Blocks.YELLOW_FLOWER.getTypeProperty(), BlockFlower.EnumFlowerType.DANDELION), 20); addFlower(Blocks.RED_FLOWER.getDefaultState().withProperty(Blocks.RED_FLOWER.getTypeProperty(), BlockFlower.EnumFlow...
void function() { addFlower(Blocks.YELLOW_FLOWER.getDefaultState().withProperty(Blocks.YELLOW_FLOWER.getTypeProperty(), BlockFlower.EnumFlowerType.DANDELION), 20); addFlower(Blocks.RED_FLOWER.getDefaultState().withProperty(Blocks.RED_FLOWER.getTypeProperty(), BlockFlower.EnumFlowerType.POPPY), 10); }
/** * Adds the default flowers, as of 1.7, it is 2 yellow, and 1 red. I chose 10 to allow some wiggle room in the numbers. */
Adds the default flowers, as of 1.7, it is 2 yellow, and 1 red. I chose 10 to allow some wiggle room in the numbers
addDefaultFlowers
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/world/biome/Biome.java", "license": "lgpl-2.1", "size": 39987 }
[ "net.minecraft.block.BlockFlower", "net.minecraft.init.Blocks" ]
import net.minecraft.block.BlockFlower; import net.minecraft.init.Blocks;
import net.minecraft.block.*; import net.minecraft.init.*;
[ "net.minecraft.block", "net.minecraft.init" ]
net.minecraft.block; net.minecraft.init;
1,679,891
private Ethernet buildReply(Ethernet packet, Ip4Address ipOffered, byte outgoingMessageType) { Ip4Address subnetMaskReply; Ip4Address dhcpServerReply; Ip4Address routerAddressReply; Ip4Address domainServerReply; IpAssignment ipAssignment; ...
Ethernet function(Ethernet packet, Ip4Address ipOffered, byte outgoingMessageType) { Ip4Address subnetMaskReply; Ip4Address dhcpServerReply; Ip4Address routerAddressReply; Ip4Address domainServerReply; IpAssignment ipAssignment; ipAssignment = dhcpStore.getIpAssignmentFromAllocationMap(HostId.hostId(packet.getSourceMAC...
/** * Builds the DHCP Reply packet. * * @param packet the incoming Ethernet frame * @param ipOffered the IP offered by the DHCP Server * @param outgoingMessageType the message type of the outgoing packet * @return the Ethernet reply frame */
Builds the DHCP Reply packet
buildReply
{ "repo_name": "Phaneendra-Huawei/demo", "path": "apps/dhcp/app/src/main/java/org/onosproject/dhcp/impl/DhcpManager.java", "license": "apache-2.0", "size": 30082 }
[ "java.nio.ByteBuffer", "java.util.ArrayList", "java.util.List", "org.onlab.packet.DHCPOption", "org.onlab.packet.DHCPPacketType", "org.onlab.packet.Ethernet", "org.onlab.packet.IPv4", "org.onlab.packet.Ip4Address", "org.onosproject.dhcp.IpAssignment", "org.onosproject.net.HostId" ]
import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import org.onlab.packet.DHCPOption; import org.onlab.packet.DHCPPacketType; import org.onlab.packet.Ethernet; import org.onlab.packet.IPv4; import org.onlab.packet.Ip4Address; import org.onosproject.dhcp.IpAssignment; import org.onosproject....
import java.nio.*; import java.util.*; import org.onlab.packet.*; import org.onosproject.dhcp.*; import org.onosproject.net.*;
[ "java.nio", "java.util", "org.onlab.packet", "org.onosproject.dhcp", "org.onosproject.net" ]
java.nio; java.util; org.onlab.packet; org.onosproject.dhcp; org.onosproject.net;
1,443,937
public void testFileCreationError1() throws IOException { Configuration conf = new HdfsConfiguration(); conf.setInt(DFS_NAMENODE_HEARTBEAT_RECHECK_INTERVAL_KEY, 1000); conf.setInt(DFS_HEARTBEAT_INTERVAL_KEY, 1); if (simulatedStorage) { SimulatedFSDataset.setFactory(conf); } // create clu...
void function() throws IOException { Configuration conf = new HdfsConfiguration(); conf.setInt(DFS_NAMENODE_HEARTBEAT_RECHECK_INTERVAL_KEY, 1000); conf.setInt(DFS_HEARTBEAT_INTERVAL_KEY, 1); if (simulatedStorage) { SimulatedFSDataset.setFactory(conf); } MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();...
/** * Test that file data does not become corrupted even in the face of errors. */
Test that file data does not become corrupted even in the face of errors
testFileCreationError1
{ "repo_name": "moreus/hadoop", "path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestFileCreation.java", "license": "apache-2.0", "size": 39621 }
[ "java.io.IOException", "java.net.InetSocketAddress", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset" ]
import java.io.IOException; import java.net.InetSocketAddress; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset;
import java.io.*; import java.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.datanode.*;
[ "java.io", "java.net", "org.apache.hadoop" ]
java.io; java.net; org.apache.hadoop;
664,444
public void enlist(XAResource xaResource) { try { TransactionManagerImpl tm = TransactionManagerImpl.getLocal(); Transaction xa = tm.getTransaction(); if (xa != null && xaResource != null) xa.enlistResource(xaResource); } catch (RuntimeException e) { throw e; } catch (E...
void function(XAResource xaResource) { try { TransactionManagerImpl tm = TransactionManagerImpl.getLocal(); Transaction xa = tm.getTransaction(); if (xa != null && xaResource != null) xa.enlistResource(xaResource); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new EJBException(e); } }
/** * Enlists a resource */
Enlists a resource
enlist
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/ejb/util/XAManager.java", "license": "gpl-2.0", "size": 11693 }
[ "com.caucho.transaction.TransactionManagerImpl", "javax.ejb.EJBException", "javax.transaction.Transaction", "javax.transaction.xa.XAResource" ]
import com.caucho.transaction.TransactionManagerImpl; import javax.ejb.EJBException; import javax.transaction.Transaction; import javax.transaction.xa.XAResource;
import com.caucho.transaction.*; import javax.ejb.*; import javax.transaction.*; import javax.transaction.xa.*;
[ "com.caucho.transaction", "javax.ejb", "javax.transaction" ]
com.caucho.transaction; javax.ejb; javax.transaction;
2,752,456
public static IndexConfig createTestIndexConfig(IndexType type, String... attributes) { IndexConfig res = createIndexConfig(type, attributes); return validateAndNormalize(UuidUtil.newUnsecureUUID().toString(), res); }
static IndexConfig function(IndexType type, String... attributes) { IndexConfig res = createIndexConfig(type, attributes); return validateAndNormalize(UuidUtil.newUnsecureUUID().toString(), res); }
/** * Create simple index definition with the given attributes and initialize it's name upfront. For testing purposes. * * @param type Index type. * @param attributes Attribute names. * @return Index definition. */
Create simple index definition with the given attributes and initialize it's name upfront. For testing purposes
createTestIndexConfig
{ "repo_name": "emre-aydin/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/query/impl/IndexUtils.java", "license": "apache-2.0", "size": 16290 }
[ "com.hazelcast.config.IndexConfig", "com.hazelcast.config.IndexType", "com.hazelcast.internal.util.UuidUtil" ]
import com.hazelcast.config.IndexConfig; import com.hazelcast.config.IndexType; import com.hazelcast.internal.util.UuidUtil;
import com.hazelcast.config.*; import com.hazelcast.internal.util.*;
[ "com.hazelcast.config", "com.hazelcast.internal" ]
com.hazelcast.config; com.hazelcast.internal;
792,060
void properties(Action<? super PropertiesFileNormalization> configuration);
void properties(Action<? super PropertiesFileNormalization> configuration);
/** * Normalize all properties files according to the rules provided by {@code configuration}. This is equivalent to calling {@link RuntimeClasspathNormalization#properties(String, Action)} with the '**&#47;*.properties' pattern. * * @since 6.8 */
Normalize all properties files according to the rules provided by configuration. This is equivalent to calling <code>RuntimeClasspathNormalization#properties(String, Action)</code> with the '**&#47;*.properties' pattern
properties
{ "repo_name": "gradle/gradle", "path": "subprojects/core-api/src/main/java/org/gradle/normalization/RuntimeClasspathNormalization.java", "license": "apache-2.0", "size": 2864 }
[ "org.gradle.api.Action" ]
import org.gradle.api.Action;
import org.gradle.api.*;
[ "org.gradle.api" ]
org.gradle.api;
453,226
public void writeValue (String name, Object value, Class knownType) { try { writer.name(name); } catch (IOException ex) { throw new JsonException(ex); } writeValue(value, knownType, null); }
void function (String name, Object value, Class knownType) { try { writer.name(name); } catch (IOException ex) { throw new JsonException(ex); } writeValue(value, knownType, null); }
/** Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified * known type. * @param value May be null. * @param knownType May be null if the type is unknown. * @see #writeValue(String, Object, Class, Class) */
Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified known type
writeValue
{ "repo_name": "GiangNguyen94/SeniorFieldProject", "path": "CommonCrawJavaFiles/src/com/esotericsoftware/jsonbeans/Json.java", "license": "mit", "size": 37904 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,183,552
public static void setSetting( Context context, String key, Object value ) { boolean is_restricted_package = true; ArrayList<String> global_settings = new ArrayList<String>(); global_settings.add(Aware_Preferences.DEBUG_FLAG); global_settings.add(Aware_Preferences.DEBUG_TAG); ...
static void function( Context context, String key, Object value ) { boolean is_restricted_package = true; ArrayList<String> global_settings = new ArrayList<String>(); global_settings.add(Aware_Preferences.DEBUG_FLAG); global_settings.add(Aware_Preferences.DEBUG_TAG); global_settings.add(STR); global_settings.add(STR); ...
/** * Insert / Update settings of the framework * @param key * @param value */
Insert / Update settings of the framework
setSetting
{ "repo_name": "cluo29/com.aware.plugin.trying", "path": "aware-core/src/main/java/com/aware/Aware.java", "license": "apache-2.0", "size": 76881 }
[ "android.content.ContentValues", "android.content.Context", "android.content.Intent", "android.database.Cursor", "android.database.SQLException", "android.database.sqlite.SQLiteException", "android.util.Log", "java.util.ArrayList" ]
import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteException; import android.util.Log; import java.util.ArrayList;
import android.content.*; import android.database.*; import android.database.sqlite.*; import android.util.*; import java.util.*;
[ "android.content", "android.database", "android.util", "java.util" ]
android.content; android.database; android.util; java.util;
349,004
private void addOracleRecordToParent(GenericRecord parentRecord, String fieldName, Schema fieldSchema, Struct dbFieldValue) throws EventCreationException { GenericRecord fieldRecord = new Gener...
void function(GenericRecord parentRecord, String fieldName, Schema fieldSchema, Struct dbFieldValue) throws EventCreationException { GenericRecord fieldRecord = new GenericData.Record(fieldSchema); putOracleRecord(fieldRecord, fieldSchema, dbFieldValue); parentRecord.put(fieldName, fieldRecord); }
/** * Copies the value of a simple-type event field from DB field value to an Avro record * * @param parentRecord the parent Avro record to which to add the generated child * @param fieldName the name of the Avro field * @param fieldSchema the schema of the Avro field...
Copies the value of a simple-type event field from DB field value to an Avro record
addOracleRecordToParent
{ "repo_name": "rahuljoshi123/databus", "path": "databus2-relay/databus2-relay-impl/src/main/java/com/linkedin/databus2/producers/db/OracleAvroGenericEventFactory.java", "license": "apache-2.0", "size": 28506 }
[ "com.linkedin.databus2.producers.EventCreationException", "java.sql.Struct", "org.apache.avro.Schema", "org.apache.avro.generic.GenericData", "org.apache.avro.generic.GenericRecord" ]
import com.linkedin.databus2.producers.EventCreationException; import java.sql.Struct; import org.apache.avro.Schema; import org.apache.avro.generic.GenericData; import org.apache.avro.generic.GenericRecord;
import com.linkedin.databus2.producers.*; import java.sql.*; import org.apache.avro.*; import org.apache.avro.generic.*;
[ "com.linkedin.databus2", "java.sql", "org.apache.avro" ]
com.linkedin.databus2; java.sql; org.apache.avro;
677,302
EReference getPropertyAlias_WsdlPart();
EReference getPropertyAlias_WsdlPart();
/** * Returns the meta object for the reference '{@link org.eclipse.bpel.model.messageproperties.PropertyAlias#getWsdlPart <em>Wsdl Part</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Wsdl Part</em>'. * @see org.eclipse.bpel.model.messageproperties.P...
Returns the meta object for the reference '<code>org.eclipse.bpel.model.messageproperties.PropertyAlias#getWsdlPart Wsdl Part</code>'.
getPropertyAlias_WsdlPart
{ "repo_name": "Drifftr/devstudio-tooling-bps", "path": "plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/messageproperties/MessagepropertiesPackage.java", "license": "apache-2.0", "size": 22281 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
134,963
public BigDecimal calculatePeriodAmount(BigDecimal fullPrice, PeriodOfTime period) { return fullPrice; }
BigDecimal function(BigDecimal fullPrice, PeriodOfTime period) { return fullPrice; }
/** * Calculates a price based on the period of time used. * * This plug-in does not do any period price calculation. The given price will be returned * untouched (see {@link com.sapienter.jbilling.server.process.task.DailyProRateCompositionTask}). * * @param fullPrice full line price ...
Calculates a price based on the period of time used. This plug-in does not do any period price calculation. The given price will be returned untouched (see <code>com.sapienter.jbilling.server.process.task.DailyProRateCompositionTask</code>)
calculatePeriodAmount
{ "repo_name": "maxdelo77/replyit-master-3.2-final", "path": "src/java/com/sapienter/jbilling/server/pluggableTask/BasicCompositionTask.java", "license": "agpl-3.0", "size": 16099 }
[ "com.sapienter.jbilling.server.process.PeriodOfTime", "java.math.BigDecimal" ]
import com.sapienter.jbilling.server.process.PeriodOfTime; import java.math.BigDecimal;
import com.sapienter.jbilling.server.process.*; import java.math.*;
[ "com.sapienter.jbilling", "java.math" ]
com.sapienter.jbilling; java.math;
2,023,885
public TrafficManagerEndpointImpl updateNestedProfileEndpoint(String name) { TrafficManagerEndpointImpl endpoint = this.prepareInlineUpdate(name); if (endpoint.endpointType() != EndpointType.NESTED_PROFILE) { throw logger.logExceptionAsError(new IllegalArgumentException( ...
TrafficManagerEndpointImpl function(String name) { TrafficManagerEndpointImpl endpoint = this.prepareInlineUpdate(name); if (endpoint.endpointType() != EndpointType.NESTED_PROFILE) { throw logger.logExceptionAsError(new IllegalArgumentException( STR + name + STR)); } return endpoint; }
/** * Starts a nested profile endpoint update chain. * * @param name the name of the endpoint to be updated * @return the endpoint */
Starts a nested profile endpoint update chain
updateNestedProfileEndpoint
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-trafficmanager/src/main/java/com/azure/resourcemanager/trafficmanager/implementation/TrafficManagerEndpointsImpl.java", "license": "mit", "size": 9142 }
[ "com.azure.resourcemanager.trafficmanager.models.EndpointType" ]
import com.azure.resourcemanager.trafficmanager.models.EndpointType;
import com.azure.resourcemanager.trafficmanager.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,706,681
public SortedSet<TimeInterval> getFlattenedIntervals() { return getFlattenedIntervals(intervals); }
SortedSet<TimeInterval> function() { return getFlattenedIntervals(intervals); }
/** * Gets a set of intervals without any overlaps * * @return */
Gets a set of intervals without any overlaps
getFlattenedIntervals
{ "repo_name": "datacleaner/DataCleaner", "path": "components/date-gap/src/main/java/org/datacleaner/beans/dategap/TimeLine.java", "license": "lgpl-3.0", "size": 5478 }
[ "java.util.SortedSet" ]
import java.util.SortedSet;
import java.util.*;
[ "java.util" ]
java.util;
2,274,402
protected static String getNodeValue(Element element, String node) { NodeList nodes = element.getElementsByTagName(node); if (nodes.getLength() > 0) { return nodes.item(0).getTextContent(); } else { return null; } }
static String function(Element element, String node) { NodeList nodes = element.getElementsByTagName(node); if (nodes.getLength() > 0) { return nodes.item(0).getTextContent(); } else { return null; } }
/** * Get the node value * * @param element The element to read * @param node The node name to retrieve * @return */
Get the node value
getNodeValue
{ "repo_name": "paulbatum/azure-mobile-services", "path": "sdk/android/src/sdk/src/main/java/com/microsoft/windowsazure/mobileservices/notifications/Registration.java", "license": "apache-2.0", "size": 4164 }
[ "org.w3c.dom.Element", "org.w3c.dom.NodeList" ]
import org.w3c.dom.Element; import org.w3c.dom.NodeList;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,537,354
@Override public void setExpPoints(int i) throws GameLogicException { try { this.exp_points = i; } catch (Exception e) { throw new UnsupportedOperationException("Error on function setExpPoints()."); } }
void function(int i) throws GameLogicException { try { this.exp_points = i; } catch (Exception e) { throw new UnsupportedOperationException(STR); } }
/** * Permite cambiar los puntos de experiencia que se obtienen de derrotar al * enemigo representado por este objeto. * * @param i * @throws GameLogicException Representa una excepción genérica dentro de la * lógica del juego. */
Permite cambiar los puntos de experiencia que se obtienen de derrotar al enemigo representado por este objeto
setExpPoints
{ "repo_name": "jnaxo/jugando-con-barro", "path": "src/tarea2/Enemy.java", "license": "unlicense", "size": 3936 }
[ "cl.utfsm.inf.lp.sem12014.mud.logic.exceptions.GameLogicException" ]
import cl.utfsm.inf.lp.sem12014.mud.logic.exceptions.GameLogicException;
import cl.utfsm.inf.lp.sem12014.mud.logic.exceptions.*;
[ "cl.utfsm.inf" ]
cl.utfsm.inf;
157,548
private void tapBasePage(float x, float y) { View root = getActivity().getWindow().getDecorView().getRootView(); x *= root.getWidth(); y *= root.getHeight(); TouchCommon.singleClickView(root, (int) x, (int) y); }
void function(float x, float y) { View root = getActivity().getWindow().getDecorView().getRootView(); x *= root.getWidth(); y *= root.getHeight(); TouchCommon.singleClickView(root, (int) x, (int) y); }
/** * Taps the base page at the given x, y position. */
Taps the base page at the given x, y position
tapBasePage
{ "repo_name": "was4444/chromium.src", "path": "chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java", "license": "bsd-3-clause", "size": 103579 }
[ "android.view.View", "org.chromium.content.browser.test.util.TouchCommon" ]
import android.view.View; import org.chromium.content.browser.test.util.TouchCommon;
import android.view.*; import org.chromium.content.browser.test.util.*;
[ "android.view", "org.chromium.content" ]
android.view; org.chromium.content;
1,448,174
protected void onUpdate(AjaxRequestTarget target) { }
void function(AjaxRequestTarget target) { }
/** * Hook method to be notified of an update of the checkbox. * * @param target * @see #newCheckBox(String, IModel) */
Hook method to be notified of an update of the checkbox
onUpdate
{ "repo_name": "dashorst/wicket", "path": "wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/tree/content/CheckedFolder.java", "license": "apache-2.0", "size": 2712 }
[ "org.apache.wicket.ajax.AjaxRequestTarget" ]
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,539,992
protected Properties getDistributedSystemProperties() { return getDistributedSystemProperties(null); }
Properties function() { return getDistributedSystemProperties(null); }
/** * Creates a Properties object with configuration settings that the launcher has that should take * precedence over anything the user has defined in their gemfire properties file. * * @return a Properties object with GemFire properties that the launcher has defined. * @see #getDistributedSystemPropert...
Creates a Properties object with configuration settings that the launcher has that should take precedence over anything the user has defined in their gemfire properties file
getDistributedSystemProperties
{ "repo_name": "prasi-in/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/AbstractLauncher.java", "license": "apache-2.0", "size": 30933 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,606,917
public static PayoutItemDetails get(APIContext apiContext, String payoutItemId) throws PayPalRESTException { if (payoutItemId == null) { throw new IllegalArgumentException("payoutItemId cannot be null"); } Object[] parameters = new Object[]{payoutItemId}; String pattern = "v1/payments/payouts-item/{0}"; ...
static PayoutItemDetails function(APIContext apiContext, String payoutItemId) throws PayPalRESTException { if (payoutItemId == null) { throw new IllegalArgumentException(STR); } Object[] parameters = new Object[]{payoutItemId}; String pattern = STR; String resourcePath = RESTUtil.formatURIPath(pattern, parameters); Str...
/** * Obtain the status of a payout item by passing the item ID to the request * URI. * * @param apiContext {@link APIContext} used for the API call. * @param payoutItemId String * @return PayoutItemDetails * @throws PayPalRESTException */
Obtain the status of a payout item by passing the item ID to the request URI
get
{ "repo_name": "funtl/framework", "path": "funtl-framework-tools/paypal-sdk/src/main/java/com/funtl/framework/paypal/api/payments/PayoutItem.java", "license": "apache-2.0", "size": 5772 }
[ "com.funtl.framework.paypal.base.rest.APIContext", "com.funtl.framework.paypal.base.rest.HttpMethod", "com.funtl.framework.paypal.base.rest.PayPalRESTException", "com.funtl.framework.paypal.base.rest.RESTUtil" ]
import com.funtl.framework.paypal.base.rest.APIContext; import com.funtl.framework.paypal.base.rest.HttpMethod; import com.funtl.framework.paypal.base.rest.PayPalRESTException; import com.funtl.framework.paypal.base.rest.RESTUtil;
import com.funtl.framework.paypal.base.rest.*;
[ "com.funtl.framework" ]
com.funtl.framework;
2,046,127
public synchronized Filter addAttributes(Map<String, String> attributes) { for(Map.Entry<String, String> pair : attributes.entrySet()) { String key = pair.getKey(); String value = pair.getValue(); this.attributes.put(key, value); } return this; }
synchronized Filter function(Map<String, String> attributes) { for(Map.Entry<String, String> pair : attributes.entrySet()) { String key = pair.getKey(); String value = pair.getValue(); this.attributes.put(key, value); } return this; }
/** * Adds a map of attributes to the filter. * * @param attributes The map of attributes to add. * @return This filter * @since 1.0.0 */
Adds a map of attributes to the filter
addAttributes
{ "repo_name": "jcc333/tempoiq-java", "path": "src/main/java/com/tempoiq/Filter.java", "license": "mit", "size": 4372 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,556,049
public static void setPenColor(Color color) { if (color == null) throw new IllegalArgumentException(); penColor = color; offscreen.setColor(penColor); }
static void function(Color color) { if (color == null) throw new IllegalArgumentException(); penColor = color; offscreen.setColor(penColor); }
/** * Sets the pen color to the specified color. * <p> * The predefined pen colors are * {@code StdDraw.BLACK}, {@code StdDraw.BLUE}, {@code StdDraw.CYAN}, * {@code StdDraw.DARK_GRAY}, {@code StdDraw.GRAY}, {@code StdDraw.GREEN}, * {@code StdDraw.LIGHT_GRAY}, {@code StdDraw.MAGENTA}, {@cod...
Sets the pen color to the specified color. The predefined pen colors are StdDraw.BLACK, StdDraw.BLUE, StdDraw.CYAN, StdDraw.DARK_GRAY, StdDraw.GRAY, StdDraw.GREEN, StdDraw.LIGHT_GRAY, StdDraw.MAGENTA, StdDraw.ORANGE, StdDraw.PINK, StdDraw.RED, StdDraw.WHITE, and StdDraw.YELLOW
setPenColor
{ "repo_name": "FTJiang/cs61B-17Spring", "path": "hw1/src/main/java/edu/princeton/cs/introcs/StdDraw.java", "license": "mit", "size": 73056 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
999,986
public static DataResult getPackageList(Long aid, PageControl pc) { SelectMode m = ModeFactory.getMode("Package_queries", "packages_associated_with_action"); Map params = new HashMap(); params.put("aid", aid); if (pc != null) { return makeDataRe...
static DataResult function(Long aid, PageControl pc) { SelectMode m = ModeFactory.getMode(STR, STR); Map params = new HashMap(); params.put("aid", aid); if (pc != null) { return makeDataResult(params, params, pc, m); } DataResult dr = m.execute(params); dr.setTotalSize(dr.size()); return dr; }
/** * Returns the list of packages associated with a specific action. * @param aid The action id for the action in question * @param pc The details of which results to return * @return Return a list containing the packages for the action. */
Returns the list of packages associated with a specific action
getPackageList
{ "repo_name": "colloquium/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/action/ActionManager.java", "license": "gpl-2.0", "size": 73734 }
[ "com.redhat.rhn.common.db.datasource.DataResult", "com.redhat.rhn.common.db.datasource.ModeFactory", "com.redhat.rhn.common.db.datasource.SelectMode", "com.redhat.rhn.frontend.listview.PageControl", "java.util.HashMap", "java.util.Map" ]
import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import com.redhat.rhn.frontend.listview.PageControl; import java.util.HashMap; import java.util.Map;
import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.frontend.listview.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
2,616,891
void alterTableColumnStatistics( ObjectPath tablePath, CatalogColumnStatistics columnStatistics, boolean ignoreIfNotExists) throws TableNotExistException, CatalogException, TablePartitionedException;
void alterTableColumnStatistics( ObjectPath tablePath, CatalogColumnStatistics columnStatistics, boolean ignoreIfNotExists) throws TableNotExistException, CatalogException, TablePartitionedException;
/** * Update the column statistics of a table. * * @param tablePath path of the table * @param columnStatistics new column statistics to update * @param ignoreIfNotExists flag to specify behavior if the table does not exist: if set to * false, throw an exception, if set to true, nothin...
Update the column statistics of a table
alterTableColumnStatistics
{ "repo_name": "aljoscha/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Catalog.java", "license": "apache-2.0", "size": 28828 }
[ "org.apache.flink.table.catalog.exceptions.CatalogException", "org.apache.flink.table.catalog.exceptions.TableNotExistException", "org.apache.flink.table.catalog.exceptions.TablePartitionedException", "org.apache.flink.table.catalog.stats.CatalogColumnStatistics" ]
import org.apache.flink.table.catalog.exceptions.CatalogException; import org.apache.flink.table.catalog.exceptions.TableNotExistException; import org.apache.flink.table.catalog.exceptions.TablePartitionedException; import org.apache.flink.table.catalog.stats.CatalogColumnStatistics;
import org.apache.flink.table.catalog.exceptions.*; import org.apache.flink.table.catalog.stats.*;
[ "org.apache.flink" ]
org.apache.flink;
1,741,962
public GridFSInputFile createFile(final byte[] data) { return createFile(new ByteArrayInputStream(data), true); } /** * Creates a file entry. After calling this method, you have to call {@link com.mongodb.gridfs.GridFSInputFile#save()}. * * @param file the file object * @return ...
GridFSInputFile function(final byte[] data) { return createFile(new ByteArrayInputStream(data), true); } /** * Creates a file entry. After calling this method, you have to call {@link com.mongodb.gridfs.GridFSInputFile#save()}. * * @param file the file object * @return a GridFS input file * @throws IOException if there...
/** * Creates a file entry. After calling this method, you have to call {@link com.mongodb.gridfs.GridFSInputFile#save()}. * * @param data the file's data * @return a gridfs input file */
Creates a file entry. After calling this method, you have to call <code>com.mongodb.gridfs.GridFSInputFile#save()</code>
createFile
{ "repo_name": "kay-kim/mongo-java-driver", "path": "driver/src/main/com/mongodb/gridfs/GridFS.java", "license": "apache-2.0", "size": 15122 }
[ "java.io.ByteArrayInputStream", "java.io.IOException" ]
import java.io.ByteArrayInputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,272,446
@Override public final IMixinContext getMixin() { return this.context; }
final IMixinContext function() { return this.context; }
/** * Get the mixin target context for this annotated method * * @return the target context */
Get the mixin target context for this annotated method
getMixin
{ "repo_name": "SpongePowered/Mixin", "path": "src/main/java/org/spongepowered/asm/mixin/struct/AnnotatedMethodInfo.java", "license": "mit", "size": 5081 }
[ "org.spongepowered.asm.mixin.refmap.IMixinContext" ]
import org.spongepowered.asm.mixin.refmap.IMixinContext;
import org.spongepowered.asm.mixin.refmap.*;
[ "org.spongepowered.asm" ]
org.spongepowered.asm;
2,716,943
public void addDataObj(FormDataObjIFace ce, String label ) { dataObjs.add(ce); labels.add(label); }
void function(FormDataObjIFace ce, String label ) { dataObjs.add(ce); labels.add(label); }
/** * Adds a collecting event to the set to be mapped. * * @param ce the event * @param label the label for the event */
Adds a collecting event to the set to be mapped
addDataObj
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/specify/tasks/services/CollectingEventLocalityKMLGenerator.java", "license": "gpl-2.0", "size": 26107 }
[ "edu.ku.brc.af.ui.forms.FormDataObjIFace" ]
import edu.ku.brc.af.ui.forms.FormDataObjIFace;
import edu.ku.brc.af.ui.forms.*;
[ "edu.ku.brc" ]
edu.ku.brc;
2,021,636
public Map<Integer, Set<String>> topicGroups() { Map<Integer, Set<String>> topicGroups = new HashMap<>(); if (nodeGroups == null) { nodeGroups = nodeGroups(); } else if (!nodeGroups.equals(nodeGroups())) { throw new TopologyException("topology has mutated"); ...
Map<Integer, Set<String>> function() { Map<Integer, Set<String>> topicGroups = new HashMap<>(); if (nodeGroups == null) { nodeGroups = nodeGroups(); } else if (!nodeGroups.equals(nodeGroups())) { throw new TopologyException(STR); } for (Map.Entry<Integer, Set<String>> entry : nodeGroups.entrySet()) { Set<String> topicG...
/** * Returns the map of topic groups keyed by the group id. * A topic group is a group of topics in the same task. * * @return groups of topic names */
Returns the map of topic groups keyed by the group id. A topic group is a group of topics in the same task
topicGroups
{ "repo_name": "jack6215/kafka", "path": "streams/src/main/java/org/apache/kafka/streams/processor/TopologyBuilder.java", "license": "apache-2.0", "size": 21610 }
[ "java.util.Arrays", "java.util.Collections", "java.util.HashMap", "java.util.HashSet", "java.util.Map", "java.util.Set" ]
import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,512,409
public void serverListUpdated(MediaContainer container);
void function(MediaContainer container);
/** * Server list was updated * * @param MediaContainer object, containing the server list */
Server list was updated
serverListUpdated
{ "repo_name": "kbialek/openhab", "path": "bundles/binding/org.openhab.binding.plex/src/main/java/org/openhab/binding/plex/internal/PlexUpdateReceivedCallback.java", "license": "epl-1.0", "size": 903 }
[ "org.openhab.binding.plex.internal.communication.MediaContainer" ]
import org.openhab.binding.plex.internal.communication.MediaContainer;
import org.openhab.binding.plex.internal.communication.*;
[ "org.openhab.binding" ]
org.openhab.binding;
1,499,859
private AttributeDescr enabled(AttributeSupportBuilder<?> as) throws RecognitionException { AttributeDescrBuilder<?> attribute = null; try { // 'enabled' match(input, DRL6Lexer.ID, DroolsSoftKeywords.ENABLED, null, ...
AttributeDescr function(AttributeSupportBuilder<?> as) throws RecognitionException { AttributeDescrBuilder<?> attribute = null; try { match(input, DRL6Lexer.ID, DroolsSoftKeywords.ENABLED, null, DroolsEditorType.KEYWORD); if (state.failed) return null; if (state.backtracking == 0) { attribute = helper.start((DescrBuild...
/** * enabled := ENABLED conditionalExpression * @throws org.antlr.runtime.RecognitionException */
enabled := ENABLED conditionalExpression
enabled
{ "repo_name": "wmedvede/drools", "path": "drools-compiler/src/main/java/org/drools/compiler/lang/DRL6StrictParser.java", "license": "apache-2.0", "size": 172960 }
[ "org.antlr.runtime.RecognitionException", "org.drools.compiler.lang.api.AttributeDescrBuilder", "org.drools.compiler.lang.api.AttributeSupportBuilder", "org.drools.compiler.lang.api.DescrBuilder", "org.drools.compiler.lang.descr.AttributeDescr" ]
import org.antlr.runtime.RecognitionException; import org.drools.compiler.lang.api.AttributeDescrBuilder; import org.drools.compiler.lang.api.AttributeSupportBuilder; import org.drools.compiler.lang.api.DescrBuilder; import org.drools.compiler.lang.descr.AttributeDescr;
import org.antlr.runtime.*; import org.drools.compiler.lang.api.*; import org.drools.compiler.lang.descr.*;
[ "org.antlr.runtime", "org.drools.compiler" ]
org.antlr.runtime; org.drools.compiler;
2,362,086
public void setClob(int parameterIndex, Clob x) throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_setClob].methodEntry(); if (JdbcDebugCfg.traceActive) debug[methodId_setClob].methodParameters(Integer .toString(parameterIndex) + ",?"); try { validateSetInvocation(parameterIn...
void function(int parameterIndex, Clob x) throws SQLException { if (JdbcDebugCfg.entryActive) debug[methodId_setClob].methodEntry(); if (JdbcDebugCfg.traceActive) debug[methodId_setClob].methodParameters(Integer .toString(parameterIndex) + ",?"); try { validateSetInvocation(parameterIndex); int dataType = inputDesc_[pa...
/** * Sets the designated parameter to the given <tt>Clob</tt> object. The * driver converts this to an SQL <tt>CLOB</tt> value when it sends it to * the database. * * @param i * the first parameter is 1, the second is 2, ... * @param x * a <tt>Clob</tt> object that maps an SQL <tt...
Sets the designated parameter to the given Clob object. The driver converts this to an SQL CLOB value when it sends it to the database
setClob
{ "repo_name": "apache/incubator-trafodion", "path": "core/conn/jdbc_type2/src/main/java/org/apache/trafodion/jdbc/t2/SQLMXPreparedStatement.java", "license": "apache-2.0", "size": 183561 }
[ "java.sql.Clob", "java.sql.SQLException", "java.sql.Types" ]
import java.sql.Clob; import java.sql.SQLException; import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
828,237
public List<MailMessage> findMessages(final String accountReservationKey, final Predicate<MailMessage> condition) { return findMessages(accountReservationKey, condition, defaultTimeoutSeconds); }
List<MailMessage> function(final String accountReservationKey, final Predicate<MailMessage> condition) { return findMessages(accountReservationKey, condition, defaultTimeoutSeconds); }
/** * Tries to find messages for the mail account reserved under the specified * {@code accountReservationKey} applying the specified {@code condition} until it times out * using the default timeout ( {@link EmailConstants#MAIL_TIMEOUT_SECONDS} and * {@link EmailConstants#MAIL_SLEEP_MILLIS}). * * @param ac...
Tries to find messages for the mail account reserved under the specified accountReservationKey applying the specified condition until it times out using the default timeout ( <code>EmailConstants#MAIL_TIMEOUT_SECONDS</code> and <code>EmailConstants#MAIL_SLEEP_MILLIS</code>)
findMessages
{ "repo_name": "mgm-tp/jfunk", "path": "jfunk-core/src/main/java/com/mgmtp/jfunk/core/mail/MailService.java", "license": "apache-2.0", "size": 22560 }
[ "com.google.common.base.Predicate", "java.util.List" ]
import com.google.common.base.Predicate; import java.util.List;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
83,980
public void die() throws InterruptedException, KeeperException, IOException { if (accessor != null) { accessor.delChildrenWatcher(this); accessor.delDataWatcher(this); accessor.deleteNode(getFullPath()); } }
void function() throws InterruptedException, KeeperException, IOException { if (accessor != null) { accessor.delChildrenWatcher(this); accessor.delDataWatcher(this); accessor.deleteNode(getFullPath()); } }
/** * Remove publish in zookeeper forever. * * @throws InterruptedException * @throws KeeperException * @throws IOException */
Remove publish in zookeeper forever
die
{ "repo_name": "ZheYuan/Zookeeper-Accessor", "path": "src/main/java/com/renren/zookeeper/accessor/Publish.java", "license": "gpl-3.0", "size": 6276 }
[ "java.io.IOException", "org.apache.zookeeper.KeeperException" ]
import java.io.IOException; import org.apache.zookeeper.KeeperException;
import java.io.*; import org.apache.zookeeper.*;
[ "java.io", "org.apache.zookeeper" ]
java.io; org.apache.zookeeper;
537,228
public Map<String,CSVRegisterProviderConf> getValidatorProviders() { return validatorProviders; }
Map<String,CSVRegisterProviderConf> function() { return validatorProviders; }
/** * Returns the map of validator providers. * * @return the map of validator providers. */
Returns the map of validator providers
getValidatorProviders
{ "repo_name": "nerd4j/nerd4j-csv", "path": "src/main/java/org/nerd4j/csv/conf/mapping/CSVRegisterTypesConf.java", "license": "lgpl-3.0", "size": 4647 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
206,582
public final Point[] getWritableTileIndices() { return theWritableImage.getWritableTileIndices(); }
final Point[] function() { return theWritableImage.getWritableTileIndices(); }
/** * Returns an array of <code>Point</code> objects indicating which tiles * are checked out for writing. * * @return an array of <code>Point</code>s or <code>null</code> if no * tiles are checked out for writing. */
Returns an array of <code>Point</code> objects indicating which tiles are checked out for writing
getWritableTileIndices
{ "repo_name": "MarinnaCole/LightZone", "path": "lightcrafts/extsrc/com/lightcrafts/mediax/jai/WritableRenderedImageAdapter.java", "license": "bsd-3-clause", "size": 6068 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,741,938
@VisibleForTesting static File getFile(String[] localDirs, int subDirsPerLocalDir, String filename) { int hash = JavaUtils.nonNegativeHash(filename); String localDir = localDirs[hash % localDirs.length]; int subDirId = (hash / localDirs.length) % subDirsPerLocalDir; return new File(new File(localDir...
static File getFile(String[] localDirs, int subDirsPerLocalDir, String filename) { int hash = JavaUtils.nonNegativeHash(filename); String localDir = localDirs[hash % localDirs.length]; int subDirId = (hash / localDirs.length) % subDirsPerLocalDir; return new File(new File(localDir, String.format("%02x", subDirId)), fil...
/** * Hashes a filename into the corresponding local directory, in a manner consistent with * Spark's DiskBlockManager.getFile(). */
Hashes a filename into the corresponding local directory, in a manner consistent with Spark's DiskBlockManager.getFile()
getFile
{ "repo_name": "hengyicai/OnlineAggregationUCAS", "path": "network/shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockManager.java", "license": "apache-2.0", "size": 10018 }
[ "java.io.File", "org.apache.spark.network.util.JavaUtils" ]
import java.io.File; import org.apache.spark.network.util.JavaUtils;
import java.io.*; import org.apache.spark.network.util.*;
[ "java.io", "org.apache.spark" ]
java.io; org.apache.spark;
2,777,141
@VisibleForTesting ExecutorService getExecutorService() { if (numberOfThreads <= 1) { return null; } if (executorService == null || executorService.isShutdown()) { executorService = Executors.newFixedThreadPool(numberOfThreads); } return executorService; }
ExecutorService getExecutorService() { if (numberOfThreads <= 1) { return null; } if (executorService == null executorService.isShutdown()) { executorService = Executors.newFixedThreadPool(numberOfThreads); } return executorService; }
/** * Gets the executor service. This is null if the number of threads is 1 or below. It reuses the * same executor service if previously created. * * @return the executor service */
Gets the executor service. This is null if the number of threads is 1 or below. It reuses the same executor service if previously created
getExecutorService
{ "repo_name": "aherbert/GDSC-Core", "path": "src/main/java/uk/ac/sussex/gdsc/core/clustering/optics/OpticsManager.java", "license": "gpl-3.0", "size": 74412 }
[ "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors" ]
import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,015,937
private double[] conformity(DataRecord record1,DataRecord record2,int[][] fieldsToCompare){ double[] result=new double[fieldsToCompare[DRIVER_ON_PORT].length+1]; double totalResult=0; int max=0; for (int i=0;i<fieldsToCompare[DRIVER_ON_PORT].length;i++){ comparator[i].setMaxLettersToChange(maxDifferenceLe...
double[] function(DataRecord record1,DataRecord record2,int[][] fieldsToCompare){ double[] result=new double[fieldsToCompare[DRIVER_ON_PORT].length+1]; double totalResult=0; int max=0; for (int i=0;i<fieldsToCompare[DRIVER_ON_PORT].length;i++){ comparator[i].setMaxLettersToChange(maxDifferenceLetters[i]); max=(maxDiffe...
/** * Calculates difference on given fields between two records * * @param record1 - driver record * @param record2 - slave record * @param fieldsToCompare * @return difference between two records from interval <0,1> */
Calculates difference on given fields between two records
conformity
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.component/src/org/jetel/component/AproxMergeJoin.java", "license": "lgpl-2.1", "size": 49884 }
[ "org.jetel.data.DataRecord" ]
import org.jetel.data.DataRecord;
import org.jetel.data.*;
[ "org.jetel.data" ]
org.jetel.data;
1,167,808
@Test(expected = UnsupportedOperationException.class) public void testGetListError() { Generic.of(3, 6).getList().add(3); }
@Test(expected = UnsupportedOperationException.class) void function() { Generic.of(3, 6).getList().add(3); }
/** * Test method for {@link Generic#getList()}. */
Test method for <code>Generic#getList()</code>
testGetListError
{ "repo_name": "Gilandel/utils-commons", "path": "src/test/java/fr/landel/utils/commons/tuple/GenericTest.java", "license": "apache-2.0", "size": 7065 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
678,136
public Tuple<Double, Double> testNewData (int index){ double[] xValue = new double[model.getSize()]; for (int i = 0; i < xValue.length; i++) { xValue[i] = model.get(i).getValue()/model.getXMax(i); } double result = 0; if (index == 0) { result = model.predict(xValue, 0); } else if (index == 1)...
Tuple<Double, Double> function (int index){ double[] xValue = new double[model.getSize()]; for (int i = 0; i < xValue.length; i++) { xValue[i] = model.get(i).getValue()/model.getXMax(i); } double result = 0; if (index == 0) { result = model.predict(xValue, 0); } else if (index == 1) { result = model.predict(xValue, 1);...
/** * Only use for testing the MAPE/SMAPE of newly collected data against the model. * @param index * @return */
Only use for testing the MAPE/SMAPE of newly collected data against the model
testNewData
{ "repo_name": "taochen/ssascaling", "path": "src/main/java/org/ssascaling/qos/QualityOfService.java", "license": "apache-2.0", "size": 17905 }
[ "org.ssascaling.util.Tuple" ]
import org.ssascaling.util.Tuple;
import org.ssascaling.util.*;
[ "org.ssascaling.util" ]
org.ssascaling.util;
2,658,539
@Test public void testCreate() throws SQLException { ExtensionsUtils.testCreate(geoPackage); }
void function() throws SQLException { ExtensionsUtils.testCreate(geoPackage); }
/** * Test creating * * @throws SQLException */
Test creating
testCreate
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/androidTest/java/mil/nga/geopackage/extension/ExtensionsExternalTest.java", "license": "mit", "size": 1142 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,659,562
public static synchronized TagsManager getInstance( Context context ) throws Exception { if (tagsManager == null) { tagsManager = new TagsManager(); getFileTags(context); Set<String> tagsSet = tagsMap.keySet(); tagsArrays = (String[]) tagsSet.toArray(new Stri...
static synchronized TagsManager function( Context context ) throws Exception { if (tagsManager == null) { tagsManager = new TagsManager(); getFileTags(context); Set<String> tagsSet = tagsMap.keySet(); tagsArrays = (String[]) tagsSet.toArray(new String[tagsSet.size()]); Arrays.sort(tagsArrays); } return tagsManager; }
/** * Gets the manager singleton. * * @param context the context to use. * * @return the {@link TagsManager} singleton. * @throws Exception if something goes wrong. */
Gets the manager singleton
getInstance
{ "repo_name": "gabrielmancilla/mtisig", "path": "geopaparazzi.app/src/eu/hydrologis/geopaparazzi/osm/TagsManager.java", "license": "gpl-3.0", "size": 7964 }
[ "android.content.Context", "java.util.Arrays", "java.util.Set" ]
import android.content.Context; import java.util.Arrays; import java.util.Set;
import android.content.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
1,418,612
@Override public Histogram createHistogram(final MetricsComponent component, final MetricsFeature feature, final String metricName) { final String name = generateName(component, feature, metricName); return metricsRegistry...
Histogram function(final MetricsComponent component, final MetricsFeature feature, final String metricName) { final String name = generateName(component, feature, metricName); return metricsRegistry.histogram(name); }
/** * Creates a Histogram metric. * * @param component component the Histogram is defined in * @param feature feature the Histogram is defined in * @param metricName local name of the metric * @return the created Histogram Metric */
Creates a Histogram metric
createHistogram
{ "repo_name": "helloworld20000/onos", "path": "utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java", "license": "apache-2.0", "size": 10366 }
[ "com.codahale.metrics.Histogram" ]
import com.codahale.metrics.Histogram;
import com.codahale.metrics.*;
[ "com.codahale.metrics" ]
com.codahale.metrics;
616,937
@SuppressWarnings("unused") @Deprecated private DefaultCategoryDataset createFormatLocationCollection(String startTime, String endTime, String sumOrAvg, String locationGroupParameters,String formatGroupParameters,String unit){ DefaultCategoryDataset collection=new DefaultCategoryDataset(); locationGroupParamet...
@SuppressWarnings(STR) DefaultCategoryDataset function(String startTime, String endTime, String sumOrAvg, String locationGroupParameters,String formatGroupParameters,String unit){ DefaultCategoryDataset collection=new DefaultCategoryDataset(); locationGroupParameters=locationGroupParameters.replace(" ", STR); String[] ...
/** * * (Deprecated) Creates Dataset that provides the basis for a chart. Queries data from database. Was used when Chart Type "Format-Location" had been selected. * * @param startTime Start of queried period. * @param endTime End of queried period. * @param sumOrAvg Shall values be added or averaged. ...
(Deprecated) Creates Dataset that provides the basis for a chart. Queries data from database. Was used when Chart Type "Format-Location" had been selected
createFormatLocationCollection
{ "repo_name": "Jather90/AMOS_proj5", "path": "src/main/java/de/fau/amos/ChartRenderer.java", "license": "agpl-3.0", "size": 38655 }
[ "java.sql.SQLException", "org.jfree.data.category.DefaultCategoryDataset" ]
import java.sql.SQLException; import org.jfree.data.category.DefaultCategoryDataset;
import java.sql.*; import org.jfree.data.category.*;
[ "java.sql", "org.jfree.data" ]
java.sql; org.jfree.data;
1,195,952
private int dependenciesHelperForRemoveSpecificReferenceMutator(RemoveSpecificReferenceMutator mut, int com, List<Mutator> previousMutators) { int value = 1; if (mut.getContainer() instanceof SpecificObjectSelection) { SpecificObjectSelection selection = (SpecificObjectSelection) mut.getContainer(); if (mu...
int function(RemoveSpecificReferenceMutator mut, int com, List<Mutator> previousMutators) { int value = 1; if (mut.getContainer() instanceof SpecificObjectSelection) { SpecificObjectSelection selection = (SpecificObjectSelection) mut.getContainer(); if (mutatorData.get(selection.getObjSel().getName()) != null) { String...
/** * Dependencies helper for remove specific reference mutator * @param mut * @param com * @param previousMutators * @return */
Dependencies helper for remove specific reference mutator
dependenciesHelperForRemoveSpecificReferenceMutator
{ "repo_name": "gomezabajo/Wodel", "path": "wodel.utils/src/manager/MutatorDependencies.java", "license": "epl-1.0", "size": 22601 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,279,993
public SystemData systemData() { return this.systemData; }
SystemData function() { return this.systemData; }
/** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */
Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information
systemData
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/models/LivePipelineUpdate.java", "license": "mit", "size": 7371 }
[ "com.azure.core.management.SystemData" ]
import com.azure.core.management.SystemData;
import com.azure.core.management.*;
[ "com.azure.core" ]
com.azure.core;
651,308
public okhttp3.Call deleteCollectionNamespacedRoleCall( String namespace, String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolic...
okhttp3.Call function( String namespace, String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Integer timeoutSeconds, V1DeleteOptions...
/** * Build call for deleteCollectionNamespacedRole * * @param namespace object name and auth scope, such as for teams and projects (required) * @param pretty If &#39;true&#39;, then the output is pretty printed. (optional) * @param _continue The continue option should be set when retrieving more results...
Build call for deleteCollectionNamespacedRole
deleteCollectionNamespacedRoleCall
{ "repo_name": "kubernetes-client/java", "path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationV1Api.java", "license": "apache-2.0", "size": 563123 }
[ "io.kubernetes.client.openapi.ApiCallback", "io.kubernetes.client.openapi.ApiException", "io.kubernetes.client.openapi.Pair", "io.kubernetes.client.openapi.models.V1DeleteOptions", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import io.kubernetes.client.openapi.ApiCallback; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.Pair; import io.kubernetes.client.openapi.models.V1DeleteOptions; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; import java.util.*;
[ "io.kubernetes.client", "java.util" ]
io.kubernetes.client; java.util;
2,509,448
public void writeLines(Iterable<? extends CharSequence> lines, String lineSeparator) throws IOException { checkNotNull(lines); checkNotNull(lineSeparator); Closer closer = Closer.create(); try { Writer out = closer.register(openBufferedStream()); for (CharSequence line : lines) { ...
void function(Iterable<? extends CharSequence> lines, String lineSeparator) throws IOException { checkNotNull(lines); checkNotNull(lineSeparator); Closer closer = Closer.create(); try { Writer out = closer.register(openBufferedStream()); for (CharSequence line : lines) { out.append(line).append(lineSeparator); } out.fl...
/** * Writes the given lines of text to this sink with each line (including the last) terminated with * the given line separator. * * @throws IOException if an I/O error occurs in the process of writing to this sink */
Writes the given lines of text to this sink with each line (including the last) terminated with the given line separator
writeLines
{ "repo_name": "eoneil1942/voltdb-4.7fix", "path": "third_party/java/src/com/google_voltpatches/common/io/CharSink.java", "license": "agpl-3.0", "size": 6575 }
[ "com.google_voltpatches.common.base.Preconditions", "java.io.IOException", "java.io.Writer" ]
import com.google_voltpatches.common.base.Preconditions; import java.io.IOException; import java.io.Writer;
import com.google_voltpatches.common.base.*; import java.io.*;
[ "com.google_voltpatches.common", "java.io" ]
com.google_voltpatches.common; java.io;
1,868,753
@Test(timeout=360000) public void testHostsFile() throws IOException, InterruptedException { // Test for a single namenode cluster testHostsFile(1); }
@Test(timeout=360000) void function() throws IOException, InterruptedException { testHostsFile(1); }
/** * Test host/include file functionality. Only datanodes * in the include file are allowed to connect to the namenode in a non * federated cluster. */
Test host/include file functionality. Only datanodes in the include file are allowed to connect to the namenode in a non federated cluster
testHostsFile
{ "repo_name": "wankunde/cloudera_hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDecommission.java", "license": "apache-2.0", "size": 37551 }
[ "java.io.IOException", "org.junit.Test" ]
import java.io.IOException; import org.junit.Test;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
1,990,398
public void addNodesInDocOrder(DTMIterator iterator, XPathContext support) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!"); int node; while (DTM.NULL != (node = iterator.nextN...
void function(DTMIterator iterator, XPathContext support) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); int node; while (DTM.NULL != (node = iterator.nextNode())) { addNodeInDocOrder(node, support); } }
/** * Copy NodeList members into this nodelist, adding in * document order. If a node is null, don't add it. * * @param iterator DTMIterator which yields the nodes to be added. * @param support The XPath runtime context. * @throws RuntimeException thrown if this NodeSetDTM is not of * a mutable ty...
Copy NodeList members into this nodelist, adding in document order. If a node is null, don't add it
addNodesInDocOrder
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xpath/internal/NodeSetDTM.java", "license": "apache-2.0", "size": 35193 }
[ "com.sun.org.apache.xalan.internal.res.XSLMessages", "com.sun.org.apache.xml.internal.dtm.DTMIterator", "com.sun.org.apache.xpath.internal.res.XPATHErrorResources" ]
import com.sun.org.apache.xalan.internal.res.XSLMessages; import com.sun.org.apache.xml.internal.dtm.DTMIterator; import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
import com.sun.org.apache.xalan.internal.res.*; import com.sun.org.apache.xml.internal.dtm.*; import com.sun.org.apache.xpath.internal.res.*;
[ "com.sun.org" ]
com.sun.org;
1,449,889
public List<Broker> sortedHealthyBrokersUnderThreshold(Resource resource, double utilizationThreshold) { List<Broker> sortedTargetBrokersUnderCapacityLimit = new ArrayList<>(); for (Broker healthyBroker : healthyBrokers()) { double brokerCapacityLimit = healthyBroker.capacityFor(resource) * utilization...
List<Broker> function(Resource resource, double utilizationThreshold) { List<Broker> sortedTargetBrokersUnderCapacityLimit = new ArrayList<>(); for (Broker healthyBroker : healthyBrokers()) { double brokerCapacityLimit = healthyBroker.capacityFor(resource) * utilizationThreshold; double brokerUtilization = healthyBroke...
/** * Get a list of sorted (in ascending order by resource) healthy brokers having utilization under: * (given utilization threshold) * (broker and/or host capacity (see {@link Resource#_isHostResource} and * {@link Resource#_isBrokerResource)). Utilization threshold might be any capacity constraint thresholds...
Get a list of sorted (in ascending order by resource) healthy brokers having utilization under: (given utilization threshold) * (broker and/or host capacity (see <code>Resource#_isHostResource</code> and {@link Resource#_isBrokerResource)). Utilization threshold might be any capacity constraint thresholds such as balan...
sortedHealthyBrokersUnderThreshold
{ "repo_name": "GergoHong/cruise-control", "path": "cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/model/ClusterModel.java", "license": "bsd-2-clause", "size": 52254 }
[ "com.linkedin.kafka.cruisecontrol.common.Resource", "java.util.ArrayList", "java.util.List" ]
import com.linkedin.kafka.cruisecontrol.common.Resource; import java.util.ArrayList; import java.util.List;
import com.linkedin.kafka.cruisecontrol.common.*; import java.util.*;
[ "com.linkedin.kafka", "java.util" ]
com.linkedin.kafka; java.util;
1,430,457
public void setSelectedRows(final Set<String> itemIds) { setData(itemIds); }
void function(final Set<String> itemIds) { setData(itemIds); }
/** * Set the row keys that are selected. * <p> * A row key uniquely identifies each row and is determined by the {@link TreeItemModel}. Refer to * {@link TreeItemModel#getItemId(List)}. * </p> * * @param itemIds the keys of selected rows. */
Set the row keys that are selected. A row key uniquely identifies each row and is determined by the <code>TreeItemModel</code>. Refer to <code>TreeItemModel#getItemId(List)</code>.
setSelectedRows
{ "repo_name": "Joshua-Barclay/wcomponents", "path": "wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTree.java", "license": "gpl-3.0", "size": 39637 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,073,671
public Object getValue(String xpath) { Expression expression = compileExpression(xpath); // TODO: (work in progress) - trying to integrate with Xalan // Object ctxNode = getNativeContextNode(expression); // if (ctxNode != null) { // System.err.println("WILL USE XALAN: " + xpath); //...
Object function(String xpath) { Expression expression = compileExpression(xpath); return getValue(xpath, expression); }
/** * Traverses the xpath and returns the resulting object. Primitive * types are wrapped into objects. * @param xpath expression * @return Object found */
Traverses the xpath and returns the resulting object. Primitive types are wrapped into objects
getValue
{ "repo_name": "mohanaraosv/commons-jxpath", "path": "src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java", "license": "apache-2.0", "size": 27778 }
[ "org.apache.commons.jxpath.ri.compiler.Expression" ]
import org.apache.commons.jxpath.ri.compiler.Expression;
import org.apache.commons.jxpath.ri.compiler.*;
[ "org.apache.commons" ]
org.apache.commons;
1,101,110
public void setDate(String date) { this.dateTextInfo = date; this.date = AMIEventUtils.parseSMSDate(date); }
void function(String date) { this.dateTextInfo = date; this.date = AMIEventUtils.parseSMSDate(date); }
/** * Internal use. * * @param date Date information sent by the Carrier. */
Internal use
setDate
{ "repo_name": "kennedyoliveira/asterisk-java-khomp", "path": "src/main/java/com/github/kennedyoliveira/asteriskjava/khomp/manager/event/NewSMSConfirmationEvent.java", "license": "mit", "size": 3855 }
[ "com.github.kennedyoliveira.asteriskjava.khomp.manager.util.AMIEventUtils" ]
import com.github.kennedyoliveira.asteriskjava.khomp.manager.util.AMIEventUtils;
import com.github.kennedyoliveira.asteriskjava.khomp.manager.util.*;
[ "com.github.kennedyoliveira" ]
com.github.kennedyoliveira;
2,588,386
public void writeRevision(IDBStoreAccessor accessor, InternalCDORevision revision, boolean mapType, boolean revise, OMMonitor monitor);
void function(IDBStoreAccessor accessor, InternalCDORevision revision, boolean mapType, boolean revise, OMMonitor monitor);
/** * Write the revision data to the database. * * @param accessor * the accessor to use. * @param revision * the revision to write. * @param mapType * <code>true</code> if the type of the object is supposed to be mapped, <code>false</code> otherwise. * @param revi...
Write the revision data to the database
writeRevision
{ "repo_name": "IHTSDO/snow-owl", "path": "dependencies/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/mapping/IClassMapping.java", "license": "apache-2.0", "size": 7838 }
[ "org.eclipse.emf.cdo.server.db.IDBStoreAccessor", "org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision", "org.eclipse.net4j.util.om.monitor.OMMonitor" ]
import org.eclipse.emf.cdo.server.db.IDBStoreAccessor; import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision; import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.emf.cdo.server.db.*; import org.eclipse.emf.cdo.spi.common.revision.*; import org.eclipse.net4j.util.om.monitor.*;
[ "org.eclipse.emf", "org.eclipse.net4j" ]
org.eclipse.emf; org.eclipse.net4j;
1,652,601
public HttpURLConnection getConnection() { return httpConn; }
HttpURLConnection function() { return httpConn; }
/** * Returns the URLConnection instance that represents the underlying * connection to the GData service that will be used by this request. * * @return connection to GData service. */
Returns the URLConnection instance that represents the underlying connection to the GData service that will be used by this request
getConnection
{ "repo_name": "elhoim/gdata-client-java", "path": "java/src/com/google/gdata/client/http/HttpGDataRequest.java", "license": "apache-2.0", "size": 20317 }
[ "java.net.HttpURLConnection" ]
import java.net.HttpURLConnection;
import java.net.*;
[ "java.net" ]
java.net;
435,299
public void setCamelStreamCachingStrategy(CamelStreamCachingStrategyDefinition camelStreamCachingStrategy) { this.camelStreamCachingStrategy = camelStreamCachingStrategy; }
void function(CamelStreamCachingStrategyDefinition camelStreamCachingStrategy) { this.camelStreamCachingStrategy = camelStreamCachingStrategy; }
/** * Configuration of stream caching. */
Configuration of stream caching
setCamelStreamCachingStrategy
{ "repo_name": "jonmcewen/camel", "path": "components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java", "license": "apache-2.0", "size": 42985 }
[ "org.apache.camel.core.xml.CamelStreamCachingStrategyDefinition" ]
import org.apache.camel.core.xml.CamelStreamCachingStrategyDefinition;
import org.apache.camel.core.xml.*;
[ "org.apache.camel" ]
org.apache.camel;
2,353,055
public void setFinancialObject(ObjectCode financialObject) { this.financialObject = financialObject; }
void function(ObjectCode financialObject) { this.financialObject = financialObject; }
/** * Sets the financialObject attribute. * * @param financialObject The financialObject to set. * @deprecated */
Sets the financialObject attribute
setFinancialObject
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/bc/businessobject/BudgetConstructionBalanceByAccount.java", "license": "apache-2.0", "size": 16165 }
[ "org.kuali.kfs.coa.businessobject.ObjectCode" ]
import org.kuali.kfs.coa.businessobject.ObjectCode;
import org.kuali.kfs.coa.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
426,311
public void setSelectorColor(int selectorColor) { this.selectorFilter = new PorterDuffColorFilter(selectorColor, PorterDuff.Mode.SRC_ATOP); this.invalidate(); }
void function(int selectorColor) { this.selectorFilter = new PorterDuffColorFilter(selectorColor, PorterDuff.Mode.SRC_ATOP); this.invalidate(); }
/** * Sets the color of the selector to be draw over the CircularImageView. Be sure to provide some opacity. * @param selectorColor */
Sets the color of the selector to be draw over the CircularImageView. Be sure to provide some opacity
setSelectorColor
{ "repo_name": "lstNull/Conquer", "path": "app/src/main/java/app/hanks/com/conquer/view/CircularImageView.java", "license": "apache-2.0", "size": 10365 }
[ "android.graphics.PorterDuff", "android.graphics.PorterDuffColorFilter" ]
import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,098,436
GeocentricCoordinates getNadir();
GeocentricCoordinates getNadir();
/** * Returns the user's Nadir in celestial coordinates. */
Returns the user's Nadir in celestial coordinates
getNadir
{ "repo_name": "barbeau/stardroid", "path": "app/src/main/java/com/google/android/stardroid/control/AstronomerModel.java", "license": "apache-2.0", "size": 5197 }
[ "com.google.android.stardroid.units.GeocentricCoordinates" ]
import com.google.android.stardroid.units.GeocentricCoordinates;
import com.google.android.stardroid.units.*;
[ "com.google.android" ]
com.google.android;
1,596,262
@VisibleForTesting protected static File[] getLibraries(File baseDir, String pattern) { final int i = Math.max(pattern.lastIndexOf('/'), pattern.lastIndexOf('\\')); final String dirPath; final String filePattern; if (i == -1) { dirPath = "."; filePattern = pattern; } else { dir...
static File[] function(File baseDir, String pattern) { final int i = Math.max(pattern.lastIndexOf('/'), pattern.lastIndexOf('\\')); final String dirPath; final String filePattern; if (i == -1) { dirPath = "."; filePattern = pattern; } else { dirPath = pattern.substring(0, i); filePattern = pattern.substring(i + 1); } L...
/** * Returns files matching specified pattern. */
Returns files matching specified pattern
getLibraries
{ "repo_name": "jango2015/sonarqube", "path": "sonar-batch/src/main/java/org/sonar/batch/scan/ProjectReactorBuilder.java", "license": "lgpl-3.0", "size": 20577 }
[ "java.io.File", "java.io.FileFilter", "java.util.ArrayList", "java.util.List", "org.apache.commons.io.filefilter.AndFileFilter", "org.apache.commons.io.filefilter.FileFileFilter", "org.apache.commons.io.filefilter.IOFileFilter", "org.apache.commons.io.filefilter.WildcardFileFilter" ]
import java.io.File; import java.io.FileFilter; import java.util.ArrayList; import java.util.List; import org.apache.commons.io.filefilter.AndFileFilter; import org.apache.commons.io.filefilter.FileFileFilter; import org.apache.commons.io.filefilter.IOFileFilter; import org.apache.commons.io.filefilter.WildcardFileFilt...
import java.io.*; import java.util.*; import org.apache.commons.io.filefilter.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
2,259,557
public void setPassword(String password) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBasicAuth) { ((HttpBasicAuth) auth).setPassword(password); return; } } throw new RuntimeException("No HTTP basic authentication configured!"); }
void function(String password) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBasicAuth) { ((HttpBasicAuth) auth).setPassword(password); return; } } throw new RuntimeException(STR); }
/** * Helper method to set password for the first HTTP basic authentication. * @param password Password */
Helper method to set password for the first HTTP basic authentication
setPassword
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/main/java/com/knetikcloud/client/ApiClient.java", "license": "apache-2.0", "size": 24898 }
[ "com.knetikcloud.client.auth.Authentication", "com.knetikcloud.client.auth.HttpBasicAuth" ]
import com.knetikcloud.client.auth.Authentication; import com.knetikcloud.client.auth.HttpBasicAuth;
import com.knetikcloud.client.auth.*;
[ "com.knetikcloud.client" ]
com.knetikcloud.client;
847,879
AnswerSetQuery withTermEquals(int termIdx, Term otherTerm);
AnswerSetQuery withTermEquals(int termIdx, Term otherTerm);
/** * Convenience method - adds a filter to check whether a term is equal to a given term. * * @param termIdx * @param otherTerm * @return */
Convenience method - adds a filter to check whether a term is equal to a given term
withTermEquals
{ "repo_name": "alpha-asp/Alpha", "path": "alpha-api/src/main/java/at/ac/tuwien/kr/alpha/api/AnswerSetQuery.java", "license": "bsd-2-clause", "size": 2212 }
[ "at.ac.tuwien.kr.alpha.api.terms.Term" ]
import at.ac.tuwien.kr.alpha.api.terms.Term;
import at.ac.tuwien.kr.alpha.api.terms.*;
[ "at.ac.tuwien" ]
at.ac.tuwien;
1,291,478
@Override public Option<Q> initOption() { return isEmpty() ? Option.none() : Option.some(init()); }
Option<Q> function() { return isEmpty() ? Option.none() : Option.some(init()); }
/** * Dual of {@linkplain #tailOption()}, returning all elements except the last as {@code Option}. * * @return {@code Some(Q)} or {@code None} if this is empty. */
Dual of #tailOption(), returning all elements except the last as Option
initOption
{ "repo_name": "dx-pbuckley/vavr", "path": "vavr/src/main/java/io/vavr/collection/AbstractQueue.java", "license": "apache-2.0", "size": 5805 }
[ "io.vavr.control.Option" ]
import io.vavr.control.Option;
import io.vavr.control.*;
[ "io.vavr.control" ]
io.vavr.control;
2,185,492
@FIXVersion(introduced = "4.4") public void setUnderlyingInstrument() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
@FIXVersion(introduced = "4.4") void function() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
/** * Message field setter. */
Message field setter
setUnderlyingInstrument
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/group/UndInstrmtCollGroup.java", "license": "gpl-3.0", "size": 7570 }
[ "net.hades.fix.message.anno.FIXVersion" ]
import net.hades.fix.message.anno.FIXVersion;
import net.hades.fix.message.anno.*;
[ "net.hades.fix" ]
net.hades.fix;
1,336,789
private void visitGetElem(NodeTraversal t, Node n) { validator.expectIndexMatch( t, n, getJSType(n.getFirstChild()), getJSType(n.getLastChild())); ensureTyped(t, n); }
void function(NodeTraversal t, Node n) { validator.expectIndexMatch( t, n, getJSType(n.getFirstChild()), getJSType(n.getLastChild())); ensureTyped(t, n); }
/** * Visits a GETELEM node. * * @param t The node traversal object that supplies context, such as the * scope chain to use in name lookups as well as error reporting. * @param n The node being visited. */
Visits a GETELEM node
visitGetElem
{ "repo_name": "pauldraper/closure-compiler", "path": "src/com/google/javascript/jscomp/TypeCheck.java", "license": "apache-2.0", "size": 78933 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,355,484
protected Set<Long> getHostIdSet(List<Long> vmIds) { Set<Long> hostIds = new HashSet<>(); for (Long groupVMId : vmIds) { VMInstanceVO groupVM = _vmInstanceDao.findById(groupVMId); hostIds.add(groupVM.getHostId()); } return hostIds; }
Set<Long> function(List<Long> vmIds) { Set<Long> hostIds = new HashSet<>(); for (Long groupVMId : vmIds) { VMInstanceVO groupVM = _vmInstanceDao.findById(groupVMId); hostIds.add(groupVM.getHostId()); } return hostIds; }
/** * Get host ids set from vm ids list */
Get host ids set from vm ids list
getHostIdSet
{ "repo_name": "GabrielBrascher/cloudstack", "path": "plugins/affinity-group-processors/host-affinity/src/main/java/org/apache/cloudstack/affinity/HostAffinityProcessor.java", "license": "apache-2.0", "size": 4947 }
[ "com.cloud.vm.VMInstanceVO", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import com.cloud.vm.VMInstanceVO; import java.util.HashSet; import java.util.List; import java.util.Set;
import com.cloud.vm.*; import java.util.*;
[ "com.cloud.vm", "java.util" ]
com.cloud.vm; java.util;
2,251,211
boolean parse(Line line, int lineNumber, int numLinesToProcess, Anchor anchorToUpdate) { return parseImplCm2(line, lineNumber, numLinesToProcess, anchorToUpdate, documentParserDispatcher); }
boolean parse(Line line, int lineNumber, int numLinesToProcess, Anchor anchorToUpdate) { return parseImplCm2(line, lineNumber, numLinesToProcess, anchorToUpdate, documentParserDispatcher); }
/** * Parses the given lines and updates the parser position {@code anchorToUpdate}. * * @return {@code true} is parsing should continue */
Parses the given lines and updates the parser position anchorToUpdate
parse
{ "repo_name": "PP888/collide", "path": "java/com/google/collide/client/documentparser/DocumentParserWorker.java", "license": "apache-2.0", "size": 10050 }
[ "com.google.collide.shared.document.Line", "com.google.collide.shared.document.anchor.Anchor" ]
import com.google.collide.shared.document.Line; import com.google.collide.shared.document.anchor.Anchor;
import com.google.collide.shared.document.*; import com.google.collide.shared.document.anchor.*;
[ "com.google.collide" ]
com.google.collide;
904,646
public void put(Context context, String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { put(context, url, paramsToEntity(params), null, responseHandler); }
void function(Context context, String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { put(context, url, paramsToEntity(params), null, responseHandler); }
/** * Perform a HTTP PUT request and track the Android Context which initiated the request. * @param context the Android Context which initiated the request. * @param url the URL to send the request to. * @param params additional PUT parameters or files to send with the request. * @param respon...
Perform a HTTP PUT request and track the Android Context which initiated the request
put
{ "repo_name": "xiaopengs/iBooks", "path": "src/com/loopj/android/http/AsyncHttpClient.java", "license": "mit", "size": 25822 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
2,853,712
private String useDataTypeIcon(String dataType) { String iconFilePath; String iconFileName; InputStream in; OutputStream output = null; logger.log(Level.INFO, "useDataTypeIcon: dataType = {0}", dataType); //NON-NLS // find the artifact with matching display name ...
String function(String dataType) { String iconFilePath; String iconFileName; InputStream in; OutputStream output = null; logger.log(Level.INFO, STR, dataType); BlackboardArtifact.ARTIFACT_TYPE artifactType = null; for (ARTIFACT_TYPE v : ARTIFACT_TYPE.values()) { if (v.getDisplayName().equals(dataType)) { artifactType =...
/** * Copies a suitable icon for the given data type in the output directory * and returns the icon file name to use for the given data type. */
Copies a suitable icon for the given data type in the output directory and returns the icon file name to use for the given data type
useDataTypeIcon
{ "repo_name": "millmanorama/autopsy", "path": "Core/src/org/sleuthkit/autopsy/report/ReportHTML.java", "license": "apache-2.0", "size": 62031 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.util.logging.Level", "org.openide.filesystems.FileUtil", "org.sleuthkit.datamodel.BlackboardArtifact" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.logging.Level; import org.openide.filesystems.FileUtil; import org.sleuthkit.datamodel.BlackboardArtifact;
import java.io.*; import java.util.logging.*; import org.openide.filesystems.*; import org.sleuthkit.datamodel.*;
[ "java.io", "java.util", "org.openide.filesystems", "org.sleuthkit.datamodel" ]
java.io; java.util; org.openide.filesystems; org.sleuthkit.datamodel;
1,063,929
@Test public void testIntentSync() { // Construct routes and intents. // This test simulates the following cases during the master change // time interval: // 1. intent1 did not change and the intent also did not change. // 2. intent2 was deleted, but the intent was not ...
void function() { MultiPointToSinglePointIntent intent1 = intentBuilder( Ip4Prefix.valueOf(STR), STR, SW1_ETH1); MultiPointToSinglePointIntent intent2 = intentBuilder( Ip4Prefix.valueOf(STR), STR, SW2_ETH1); MultiPointToSinglePointIntent intent3 = intentBuilder( Ip4Prefix.valueOf(STR), STR, SW3_ETH1); MultiPointToSingl...
/** * Tests the synchronization behavior of intent synchronizer. We set up * a discrepancy between the intent service state and the intent * synchronizer's state and ensure that this is reconciled correctly. */
Tests the synchronization behavior of intent synchronizer. We set up a discrepancy between the intent service state and the intent synchronizer's state and ensure that this is reconciled correctly
testIntentSync
{ "repo_name": "gkatsikas/onos", "path": "apps/intentsync/src/main/test/org/onosproject/intentsync/IntentSynchronizerTest.java", "license": "apache-2.0", "size": 13277 }
[ "java.util.HashSet", "java.util.Set", "org.easymock.EasyMock", "org.onlab.packet.Ip4Prefix", "org.onosproject.net.intent.Intent", "org.onosproject.net.intent.IntentState", "org.onosproject.net.intent.MultiPointToSinglePointIntent" ]
import java.util.HashSet; import java.util.Set; import org.easymock.EasyMock; import org.onlab.packet.Ip4Prefix; import org.onosproject.net.intent.Intent; import org.onosproject.net.intent.IntentState; import org.onosproject.net.intent.MultiPointToSinglePointIntent;
import java.util.*; import org.easymock.*; import org.onlab.packet.*; import org.onosproject.net.intent.*;
[ "java.util", "org.easymock", "org.onlab.packet", "org.onosproject.net" ]
java.util; org.easymock; org.onlab.packet; org.onosproject.net;
1,222,740
public int getDecoratedTop(View child) { return child.getTop() - getTopDecorationHeight(child); }
int function(View child) { return child.getTop() - getTopDecorationHeight(child); }
/** * Returns the top edge of the given child view within its parent, offset by any applied * {@link ItemDecoration ItemDecorations}. * * @param child Child to query * @return Child top edge with offsets applied * @see #getTopDecorationHeight(View) */
Returns the top edge of the given child view within its parent, offset by any applied <code>ItemDecoration ItemDecorations</code>
getDecoratedTop
{ "repo_name": "AylaGene/testRepo_Public", "path": "TMessagesProj/src/main/java/org/telegram/messenger/support/widget/RecyclerView.java", "license": "gpl-2.0", "size": 480719 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
180,559
public void setByteValue(byte newByteValue) throws RemoteException;
void function(byte newByteValue) throws RemoteException;
/** * Set accessor for persistent attribute: byteValue */
Set accessor for persistent attribute: byteValue
setByteValue
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XSFRemoteSpecEJB.jar/src/com/ibm/ejb2x/base/spec/sfr/ejb/SFRa.java", "license": "epl-1.0", "size": 10102 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
2,204,115
public void test_getType() throws Exception { MetaMessage meta = new MetaMessage(); assertEquals(0, meta.getType()); byte[] bt = new byte[] { 9, -4, 34, 18 }; MetaMessage1 meta2 = new MetaMessage1(bt); assertEquals(252, meta2.getType()); bt[1] = 5; ...
void function() throws Exception { MetaMessage meta = new MetaMessage(); assertEquals(0, meta.getType()); byte[] bt = new byte[] { 9, -4, 34, 18 }; MetaMessage1 meta2 = new MetaMessage1(bt); assertEquals(252, meta2.getType()); bt[1] = 5; assertEquals(5, meta2.getType()); meta.setMessage(10, new byte[] { 1, 2, 3, 4 }, 4...
/** * Test method getType() of class MetaMessage * */
Test method getType() of class MetaMessage
test_getType
{ "repo_name": "shannah/cn1", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/sound/src/test/java/org/apache/harmony/sound/tests/javax/sound/midi/MetaMessageTest.java", "license": "gpl-2.0", "size": 23602 }
[ "javax.sound.midi.MetaMessage" ]
import javax.sound.midi.MetaMessage;
import javax.sound.midi.*;
[ "javax.sound" ]
javax.sound;
1,826,011
EClass getInvocation();
EClass getInvocation();
/** * Returns the meta object for class '{@link org.eclectic.frontend.tao.Invocation <em>Invocation</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Invocation</em>'. * @see org.eclectic.frontend.tao.Invocation * @generated */
Returns the meta object for class '<code>org.eclectic.frontend.tao.Invocation Invocation</code>'.
getInvocation
{ "repo_name": "jesusc/eclectic", "path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/tao/TaoPackage.java", "license": "gpl-3.0", "size": 47516 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,782,977
public Builder exclude(Collection<Class<? extends Component>> types) { for (Class<? extends Component> t : types) exclusionTypes.add(t); return this; }
Builder function(Collection<Class<? extends Component>> types) { for (Class<? extends Component> t : types) exclusionTypes.add(t); return this; }
/** * Excludes all of the specified component types from the aspect. * <p> * A system will not be interested in an entity that possesses one of the * specified exclusion component types. * </p> * * @param types * component type to exclude * * @return an aspect that can be matched against...
Excludes all of the specified component types from the aspect. A system will not be interested in an entity that possesses one of the specified exclusion component types.
exclude
{ "repo_name": "snorrees/artemis-odb", "path": "artemis/src/main/java/com/artemis/Aspect.java", "license": "apache-2.0", "size": 10707 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,677,851