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 MetadataClass getReferenceClass() { return getRawClass(); }
MetadataClass function() { return getRawClass(); }
/** * INTERNAL: * Return the reference class for this accessor. By default the reference * class is the raw class. Some accessors may need to override this * method to drill down further. That is, try to extract a reference class * from generics. */
Return the reference class for this accessor. By default the reference class is the raw class. Some accessors may need to override this method to drill down further. That is, try to extract a reference class from generics
getReferenceClass
{ "repo_name": "gameduell/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/MappingAccessor.java", "license": "epl-1.0", "size": 96402 }
[ "org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass" ]
import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass;
import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,180,086
public void testRemoveAll() { for (int i = 1; i < SIZE; ++i) { ConcurrentLinkedDeque q = populatedDeque(SIZE); ConcurrentLinkedDeque p = populatedDeque(i); assertTrue(q.removeAll(p)); assertEquals(SIZE - i, q.size()); for (int j = 0; j < i; ++j) { ...
void function() { for (int i = 1; i < SIZE; ++i) { ConcurrentLinkedDeque q = populatedDeque(SIZE); ConcurrentLinkedDeque p = populatedDeque(i); assertTrue(q.removeAll(p)); assertEquals(SIZE - i, q.size()); for (int j = 0; j < i; ++j) { Integer x = (Integer)(p.remove()); assertFalse(q.contains(x)); } } }
/** * removeAll(c) removes only those elements of c and reports true if changed */
removeAll(c) removes only those elements of c and reports true if changed
testRemoveAll
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/ConcurrentLinkedDequeTest.java", "license": "gpl-2.0", "size": 32225 }
[ "java.util.concurrent.ConcurrentLinkedDeque" ]
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,385,019
// Client insert ".A.B" List<WaveletOperation> client = CollectionUtils.newArrayList(); client.add(CLIENT_UTIL.insert(1, "A", 1, null)); client.add(CLIENT_UTIL.insert(3, "B", 0, null)); // Server insert ".2.1" List<WaveletOperation> server = CollectionUtils.newArrayList(); server.add(SERVER_UTI...
List<WaveletOperation> client = CollectionUtils.newArrayList(); client.add(CLIENT_UTIL.insert(1, "A", 1, null)); client.add(CLIENT_UTIL.insert(3, "B", 0, null)); List<WaveletOperation> server = CollectionUtils.newArrayList(); server.add(SERVER_UTIL.insert(2, "1", 0, null)); server.add(SERVER_UTIL.insert(1, "2", 2, null...
/** * Test multiple server and client ops * @throws TransformException */
Test multiple server and client ops
testMultipleClientServerOps
{ "repo_name": "apache/incubator-wave", "path": "wave/src/test/java/org/waveprotocol/wave/concurrencycontrol/client/DeltaPairTest.java", "license": "apache-2.0", "size": 5543 }
[ "java.util.List", "org.waveprotocol.wave.concurrencycontrol.common.DeltaPair", "org.waveprotocol.wave.model.operation.wave.WaveletOperation", "org.waveprotocol.wave.model.util.CollectionUtils" ]
import java.util.List; import org.waveprotocol.wave.concurrencycontrol.common.DeltaPair; import org.waveprotocol.wave.model.operation.wave.WaveletOperation; import org.waveprotocol.wave.model.util.CollectionUtils;
import java.util.*; import org.waveprotocol.wave.concurrencycontrol.common.*; import org.waveprotocol.wave.model.operation.wave.*; import org.waveprotocol.wave.model.util.*;
[ "java.util", "org.waveprotocol.wave" ]
java.util; org.waveprotocol.wave;
1,489,544
IssueSeverities getIssueSeverities(Map<Object, Object> context, EObject currentObject, IssueSeverities predefinedSeverities);
IssueSeverities getIssueSeverities(Map<Object, Object> context, EObject currentObject, IssueSeverities predefinedSeverities);
/** Replies the issue severities for the given object. * * @param context the context for retrieving the severities. * @param currentObject the current object. * @param predefinedSeverities the severities that were pre-computed, prior to the warning suppression. * @return the severties. */
Replies the issue severities for the given object
getIssueSeverities
{ "repo_name": "gallandarakhneorg/sarl", "path": "eclipse-sarl/plugins/io.sarl.lang/src/io/sarl/lang/validation/IProgrammaticWarningSuppressor.java", "license": "apache-2.0", "size": 1636 }
[ "java.util.Map", "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.validation.IssueSeverities" ]
import java.util.Map; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.validation.IssueSeverities;
import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.validation.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.xtext" ]
java.util; org.eclipse.emf; org.eclipse.xtext;
1,255,098
public void setThreadPool(ExecutorService threadPool) { this.threadPool = threadPool; }
void function(ExecutorService threadPool) { this.threadPool = threadPool; }
/** * Overrides the threadpool implementation used when queuing/pooling requests. By default, * Executors.newFixedThreadPool() is used. * * @param threadPool an instance of {@link ExecutorService} to use for queuing/pooling * requests. */
Overrides the threadpool implementation used when queuing/pooling requests. By default, Executors.newFixedThreadPool() is used
setThreadPool
{ "repo_name": "blackdargn/AndroidUtil", "path": "ext/asyn-http-library/src/main/java/com/loopj/android/http/AsyncHttpClient.java", "license": "apache-2.0", "size": 53797 }
[ "java.util.concurrent.ExecutorService" ]
import java.util.concurrent.ExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,621,077
public String getLabel (VisualItem item) { return getLabel(item, (item.getBoolean(PrefuseBMGraph.EDGENODE_KEY) ? edgeLabels.iterator() : nodeLabels.iterator()), null); } protected RoundRectangle2D itemShape; ...
String function (VisualItem item) { return getLabel(item, (item.getBoolean(PrefuseBMGraph.EDGENODE_KEY) ? edgeLabels.iterator() : nodeLabels.iterator()), null); } protected RoundRectangle2D itemShape; protected BasicStroke itemStroke; protected Stroke prevStroke; protected String[] itemText; protected ItemParams itemPa...
/** * Get a the label for a given VisualItem. * <p>No attributes are excluded and the attributes that make up the * label are selected by the node type: edgeLabels for edgenodes * and nodeLabels for real nodes. * * <p>It is recommended that subclasses override this method for * implem...
Get a the label for a given VisualItem. No attributes are excluded and the attributes that make up the label are selected by the node type: edgeLabels for edgenodes and nodeLabels for real nodes. It is recommended that subclasses override this method for implementing custom label rules
getLabel
{ "repo_name": "DiscoveryGroup/bmvis", "path": "src/main/java/biomine/bmvis/render/NodeLabelRenderer.java", "license": "gpl-3.0", "size": 37857 }
[ "java.awt.BasicStroke", "java.awt.Font", "java.awt.FontMetrics", "java.awt.Stroke", "java.awt.geom.AffineTransform", "java.awt.geom.RoundRectangle2D" ]
import java.awt.BasicStroke; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Stroke; import java.awt.geom.AffineTransform; import java.awt.geom.RoundRectangle2D;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,703,535
private boolean isAfter(Date actual, Date other) { return comparisonStrategy.isGreaterThan(actual, other); }
boolean function(Date actual, Date other) { return comparisonStrategy.isGreaterThan(actual, other); }
/** * Returns true if actual is after other according to underlying {@link #comparisonStrategy}, false otherwise. * @param actual the {@link Date} to compare to other * @param other the {@link Date} to compare to actual * @return true if actual is after other according to underlying {@link #comparisonStrate...
Returns true if actual is after other according to underlying <code>#comparisonStrategy</code>, false otherwise
isAfter
{ "repo_name": "dorzey/assertj-core", "path": "src/main/java/org/assertj/core/internal/Dates.java", "license": "apache-2.0", "size": 39894 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,023,361
public int setPrimaryInterface(User loggedInUser, Integer serverId, String interfaceName) throws Exception { Server server = lookupServer(loggedInUser, serverId); if (!server.existsActiveInterfaceWithName(interfaceName)) { throw new NoSuchNetworkInterfaceException("No such n...
int function(User loggedInUser, Integer serverId, String interfaceName) throws Exception { Server server = lookupServer(loggedInUser, serverId); if (!server.existsActiveInterfaceWithName(interfaceName)) { throw new NoSuchNetworkInterfaceException(STR + interfaceName); } server.setPrimaryInterfaceWithName(interfaceName)...
/** * Sets new primary network interface * @param loggedInUser The current user * @param serverId Server ID * @param interfaceName Interface name * @return 1 if success, exception thrown otherwise * @throws Exception If interface does not exist Exception is thrown * * @xmlrpc.doc...
Sets new primary network interface
setPrimaryInterface
{ "repo_name": "moio/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java", "license": "gpl-2.0", "size": 230187 }
[ "com.redhat.rhn.domain.server.Server", "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.xmlrpc.NoSuchNetworkInterfaceException" ]
import com.redhat.rhn.domain.server.Server; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.xmlrpc.NoSuchNetworkInterfaceException;
import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
227,718
public RexNode addAggCall(AggregateCall aggCall, int groupCount, boolean indicator, List<AggregateCall> aggCalls, Map<AggregateCall, RexNode> aggCallMapping, final List<RelDataType> aggArgTypes) { if (aggCall.getAggregation() instanceof SqlCountAggFunction && !aggCall.isDistinct()) { ...
RexNode function(AggregateCall aggCall, int groupCount, boolean indicator, List<AggregateCall> aggCalls, Map<AggregateCall, RexNode> aggCallMapping, final List<RelDataType> aggArgTypes) { if (aggCall.getAggregation() instanceof SqlCountAggFunction && !aggCall.isDistinct()) { final List<Integer> args = aggCall.getArgLis...
/** * Creates a reference to an aggregate call, checking for repeated calls. * * <p>Argument types help to optimize for repeated aggregates. * For instance count(42) is equivalent to count(*).</p> * * @param aggCall aggregate call to be added * @param groupCount number of groups in the aggregate re...
Creates a reference to an aggregate call, checking for repeated calls. Argument types help to optimize for repeated aggregates. For instance count(42) is equivalent to count(*)
addAggCall
{ "repo_name": "mapr/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java", "license": "apache-2.0", "size": 43559 }
[ "java.util.List", "java.util.Map", "org.apache.calcite.rel.core.AggregateCall", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.sql.fun.SqlCountAggFunction" ]
import java.util.List; import java.util.Map; import org.apache.calcite.rel.core.AggregateCall; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.sql.fun.SqlCountAggFunction;
import java.util.*; import org.apache.calcite.rel.core.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.fun.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
2,111,659
default <U> Seq<Tuple2<T, U>> crossJoin(Stream<U> other) { return Seq.crossJoin(this, other); }
default <U> Seq<Tuple2<T, U>> crossJoin(Stream<U> other) { return Seq.crossJoin(this, other); }
/** * Cross join 2 streams into one. * <p> * <code><pre> * // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b")) * Seq.of(1, 2).crossJoin(Seq.of("a", "b")) * </pre></code> */
Cross join 2 streams into one. <code><code> (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b")) Seq.of(1, 2).crossJoin(Seq.of("a", "b")) </code></code>
crossJoin
{ "repo_name": "stephenh/jOOL", "path": "src/main/java/org/jooq/lambda/Seq.java", "license": "apache-2.0", "size": 198501 }
[ "java.util.stream.Stream", "org.jooq.lambda.tuple.Tuple2" ]
import java.util.stream.Stream; import org.jooq.lambda.tuple.Tuple2;
import java.util.stream.*; import org.jooq.lambda.tuple.*;
[ "java.util", "org.jooq.lambda" ]
java.util; org.jooq.lambda;
424,070
List<RichUserExtSource> getRichUserExtSources(PerunSession perunSession, User user, List<String> attrsNames) throws UserNotExistsException, PrivilegeException;
List<RichUserExtSource> getRichUserExtSources(PerunSession perunSession, User user, List<String> attrsNames) throws UserNotExistsException, PrivilegeException;
/** * Gets list of all user's external sources with attributes. If any of the attribute names is incorrect * then the value is silently skipped. If the attrsNames is null, then this method returns all ues attributes. * * @param perunSession session * @param user user for which should be returned rich ext sour...
Gets list of all user's external sources with attributes. If any of the attribute names is incorrect then the value is silently skipped. If the attrsNames is null, then this method returns all ues attributes
getRichUserExtSources
{ "repo_name": "mvocu/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/UsersManager.java", "license": "bsd-2-clause", "size": 59026 }
[ "cz.metacentrum.perun.core.api.exceptions.PrivilegeException", "cz.metacentrum.perun.core.api.exceptions.UserNotExistsException", "java.util.List" ]
import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.UserNotExistsException; import java.util.List;
import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
415,177
public Number parse(String text, ParsePosition parsePosition) { // You get number ranges from this. You can't get an exact number. throw new UnsupportedOperationException(); }
Number function(String text, ParsePosition parsePosition) { throw new UnsupportedOperationException(); }
/** * This method is not yet supported by <code>PluralFormat</code>. * @param text the string to be parsed. * @param parsePosition defines the position where parsing is to begin, * and upon return, the position where parsing left off. If the position * has not changed upon return, then parsing...
This method is not yet supported by <code>PluralFormat</code>
parse
{ "repo_name": "google/j2objc", "path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralFormat.java", "license": "apache-2.0", "size": 36667 }
[ "java.text.ParsePosition" ]
import java.text.ParsePosition;
import java.text.*;
[ "java.text" ]
java.text;
203,216
@Internal public StreamExecutionEnvironment execEnv() { return executionEnvironment; }
StreamExecutionEnvironment function() { return executionEnvironment; }
/** * This is a temporary workaround for Python API. Python API should not use * StreamExecutionEnvironment at all. */
This is a temporary workaround for Python API. Python API should not use StreamExecutionEnvironment at all
execEnv
{ "repo_name": "aljoscha/flink", "path": "flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/internal/StreamTableEnvironmentImpl.java", "license": "apache-2.0", "size": 17325 }
[ "org.apache.flink.streaming.api.environment.StreamExecutionEnvironment" ]
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.environment.*;
[ "org.apache.flink" ]
org.apache.flink;
2,206,601
void send(byte[] bIpdu, boolean doCount) throws CBCOMSessionException;
void send(byte[] bIpdu, boolean doCount) throws CBCOMSessionException;
/** * Send some data over channel * * @param bIpdu * @param doCount * @throws CBCOMSessionException */
Send some data over channel
send
{ "repo_name": "dgrandemange/cbcom", "path": "src/main/java/fr/dgrandemange/cbcom/session/service/IChannelCallback.java", "license": "apache-2.0", "size": 629 }
[ "fr.dgrandemange.cbcom.exception.CBCOMSessionException" ]
import fr.dgrandemange.cbcom.exception.CBCOMSessionException;
import fr.dgrandemange.cbcom.exception.*;
[ "fr.dgrandemange.cbcom" ]
fr.dgrandemange.cbcom;
459,420
public static ByteChunk getUrl(String path) throws IOException { ByteChunk out = new ByteChunk(); getUrl(path, out, null); return out; }
static ByteChunk function(String path) throws IOException { ByteChunk out = new ByteChunk(); getUrl(path, out, null); return out; }
/** * Wrapper for getting the response. */
Wrapper for getting the response
getUrl
{ "repo_name": "chanjarster/tomcat-mongo-access-log", "path": "src/test/java/org/apache/catalina/startup/TomcatBaseTest.java", "license": "apache-2.0", "size": 13739 }
[ "java.io.IOException", "org.apache.tomcat.util.buf.ByteChunk" ]
import java.io.IOException; import org.apache.tomcat.util.buf.ByteChunk;
import java.io.*; import org.apache.tomcat.util.buf.*;
[ "java.io", "org.apache.tomcat" ]
java.io; org.apache.tomcat;
191,511
@Test void testAppendCollectionCreated() { map.create(1, 1, 1, 1); final MapTile map1 = new MapTileGame(); map1.create(1, 1, 2, 2); map1.setTile(0, 0, 0); assertEquals(1, map.getInTileWidth()); assertEquals(1, map.getInTileHeight()); asser...
void testAppendCollectionCreated() { map.create(1, 1, 1, 1); final MapTile map1 = new MapTileGame(); map1.create(1, 1, 2, 2); map1.setTile(0, 0, 0); assertEquals(1, map.getInTileWidth()); assertEquals(1, map.getInTileHeight()); assertEquals(0, map.getTilesNumber()); appender.append(Arrays.asList(map1, map1), 0, 0, 0, 0...
/** * Test the map collection append when map is created. */
Test the map collection append when map is created
testAppendCollectionCreated
{ "repo_name": "b3dgs/lionengine", "path": "lionengine-game/src/test/java/com/b3dgs/lionengine/game/feature/tile/map/MapTileAppenderTest.java", "license": "gpl-3.0", "size": 6401 }
[ "com.b3dgs.lionengine.UtilAssert", "java.util.Arrays" ]
import com.b3dgs.lionengine.UtilAssert; import java.util.Arrays;
import com.b3dgs.lionengine.*; import java.util.*;
[ "com.b3dgs.lionengine", "java.util" ]
com.b3dgs.lionengine; java.util;
1,638,328
private Set<User> getAvailableUsers() { final Set<User> availableUsers = new LinkedHashSet<>(); final User user = userProvider.getUser(); if (user.isBase()) { final IUser coUser = co(User.class); availableUsers.addAll(coUser.findBasedOnUsers(user, fetchKeyAndDescOnly(...
Set<User> function() { final Set<User> availableUsers = new LinkedHashSet<>(); final User user = userProvider.getUser(); if (user.isBase()) { final IUser coUser = co(User.class); availableUsers.addAll(coUser.findBasedOnUsers(user, fetchKeyAndDescOnly(User.class))); } else { availableUsers.add(user); } return availableU...
/** * Returns all active based-on users if current user is base. Otherwise, returns a list with only the current user. * * @return */
Returns all active based-on users if current user is base. Otherwise, returns a list with only the current user
getAvailableUsers
{ "repo_name": "fieldenms/tg", "path": "platform-pojo-bl/src/main/java/ua/com/fielden/platform/menu/MenuProducer.java", "license": "mit", "size": 10514 }
[ "java.util.LinkedHashSet", "java.util.Set", "ua.com.fielden.platform.entity.query.fluent.EntityQueryUtils", "ua.com.fielden.platform.security.user.IUser", "ua.com.fielden.platform.security.user.User" ]
import java.util.LinkedHashSet; import java.util.Set; import ua.com.fielden.platform.entity.query.fluent.EntityQueryUtils; import ua.com.fielden.platform.security.user.IUser; import ua.com.fielden.platform.security.user.User;
import java.util.*; import ua.com.fielden.platform.entity.query.fluent.*; import ua.com.fielden.platform.security.user.*;
[ "java.util", "ua.com.fielden" ]
java.util; ua.com.fielden;
1,934,814
public static String eachMatch(String self, String regex, @ClosureParams(value=FromString.class, options={"List<String>","String[]"}) Closure closure) { return eachMatch(self, Pattern.compile(regex), closure); }
static String function(String self, String regex, @ClosureParams(value=FromString.class, options={STR,STR}) Closure closure) { return eachMatch(self, Pattern.compile(regex), closure); }
/** * Process each regex group matched substring of the given string. If the closure * parameter takes one argument, an array with all match groups is passed to it. * If the closure takes as many arguments as there are match groups, then each * parameter will be one match group. * * @param...
Process each regex group matched substring of the given string. If the closure parameter takes one argument, an array with all match groups is passed to it. If the closure takes as many arguments as there are match groups, then each parameter will be one match group
eachMatch
{ "repo_name": "bsideup/incubator-groovy", "path": "src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java", "license": "apache-2.0", "size": 141076 }
[ "groovy.lang.Closure", "groovy.transform.stc.ClosureParams", "groovy.transform.stc.FromString", "java.util.regex.Pattern" ]
import groovy.lang.Closure; import groovy.transform.stc.ClosureParams; import groovy.transform.stc.FromString; import java.util.regex.Pattern;
import groovy.lang.*; import groovy.transform.stc.*; import java.util.regex.*;
[ "groovy.lang", "groovy.transform.stc", "java.util" ]
groovy.lang; groovy.transform.stc; java.util;
2,264,714
@Override protected void cleanup( TestParameters tParam, PrintWriter log ) { log.println( " closing xSheetDoc " ); util.DesktopTools.closeDoc(xSheetDoc); }
void function( TestParameters tParam, PrintWriter log ) { log.println( STR ); util.DesktopTools.closeDoc(xSheetDoc); }
/** * Disposes Spreadsheet document. */
Disposes Spreadsheet document
cleanup
{ "repo_name": "beppec56/core", "path": "qadevOOo/tests/java/mod/_sch/ChXDiagram.java", "license": "gpl-3.0", "size": 15575 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,589,360
public void removeVerticesByIndex(final ArrayList<Integer> vertexRemoveIndex) { final ArrayList<RGBVertex> removedVertices = new ArrayList<RGBVertex>(); for (final Integer integer : vertexRemoveIndex) { removedVertices.add(_rgbVertices.get(integer)); } _rgbVertices.removeAll(removedVertices); invali...
void function(final ArrayList<Integer> vertexRemoveIndex) { final ArrayList<RGBVertex> removedVertices = new ArrayList<RGBVertex>(); for (final Integer integer : vertexRemoveIndex) { removedVertices.add(_rgbVertices.get(integer)); } _rgbVertices.removeAll(removedVertices); invalidateVertices(); }
/** * Removes vertices by index. * * @param vertexRemoveIndex */
Removes vertices by index
removeVerticesByIndex
{ "repo_name": "rhchen/milkfish", "path": "chart/net.tourbook.common/src/net/tourbook/common/color/ProfileImage.java", "license": "epl-1.0", "size": 6564 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,179,271
@Override public MslUser getUser() { return null; }
MslUser function() { return null; }
/** * <p>Messages do not have a user assigned.</p> * * @return {@code null}. * @see com.netflix.msl.msg.MessageContext#getUser() */
Messages do not have a user assigned
getUser
{ "repo_name": "rspieldenner/msl", "path": "examples/kancolle/src/main/java/kancolle/msg/KanColleMessageContext.java", "license": "apache-2.0", "size": 7199 }
[ "com.netflix.msl.tokens.MslUser" ]
import com.netflix.msl.tokens.MslUser;
import com.netflix.msl.tokens.*;
[ "com.netflix.msl" ]
com.netflix.msl;
723,126
public static java.util.List extractOrderedInvestigationStatusList(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.OrdInvXOStatusHistoryLiteVoCollection voCollection) { return extractOrderedInvestigationStatusList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.OrdInvXOStatusHistoryLiteVoCollection voCollection) { return extractOrderedInvestigationStatusList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.ocrr.orderingresults.domain.objects.OrderedInvestigationStatus list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.ocrr.orderingresults.domain.objects.OrderedInvestigationStatus list from the value object collection
extractOrderedInvestigationStatusList
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/ocrr/vo/domain/OrdInvXOStatusHistoryLiteVoAssembler.java", "license": "agpl-3.0", "size": 18352 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
678,822
public CreateTableEntry createNewTable(String tableName, List<String> partitionColumns, StorageStrategy storageStrategy) { throw UserException.unsupportedError() .message("Creating new tables is not supported in schema [%s]", getSchemaPath()) .build(logger); }
CreateTableEntry function(String tableName, List<String> partitionColumns, StorageStrategy storageStrategy) { throw UserException.unsupportedError() .message(STR, getSchemaPath()) .build(logger); }
/** * Creates table entry using table name, list of partition columns * and storage strategy used to create table folder and files * * @param tableName : new table name. * @param partitionColumns : list of partition columns. Empty list if there is no partition columns. * @param storageStrategy : stora...
Creates table entry using table name, list of partition columns and storage strategy used to create table folder and files
createNewTable
{ "repo_name": "cchang738/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java", "license": "apache-2.0", "size": 10358 }
[ "java.util.List", "org.apache.drill.common.exceptions.UserException", "org.apache.drill.exec.planner.logical.CreateTableEntry" ]
import java.util.List; import org.apache.drill.common.exceptions.UserException; import org.apache.drill.exec.planner.logical.CreateTableEntry;
import java.util.*; import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.planner.logical.*;
[ "java.util", "org.apache.drill" ]
java.util; org.apache.drill;
417,144
public List<CMT> getCommitteeList() { return committeeList; }
List<CMT> function() { return committeeList; }
/** * Get the list of committees. * WARNING: Developers should never call this method. * This method is for OJB use only. * @return the list with the single committee */
Get the list of committees. This method is for OJB use only
getCommitteeList
{ "repo_name": "kuali/kc", "path": "coeus-impl/src/main/java/org/kuali/coeus/common/committee/impl/document/CommitteeDocumentBase.java", "license": "agpl-3.0", "size": 8434 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,763,706
@UiFactory FormBuilder createFormBuilder() { return getUIFactory().createFormBuilder(); }
@UiFactory FormBuilder createFormBuilder() { return getUIFactory().createFormBuilder(); }
/** * This method is used by UIBinder to embed FormBuilder's in the UI. * * @return a new FormBuilder. */
This method is used by UIBinder to embed FormBuilder's in the UI
createFormBuilder
{ "repo_name": "electric-cloud/EC-Azure", "path": "src/main/java/ecplugins/azure/client/CreateStorageAccountParameterPanel.java", "license": "apache-2.0", "size": 17299 }
[ "com.electriccloud.commander.gwt.client.ui.FormBuilder", "com.google.gwt.uibinder.client.UiFactory" ]
import com.electriccloud.commander.gwt.client.ui.FormBuilder; import com.google.gwt.uibinder.client.UiFactory;
import com.electriccloud.commander.gwt.client.ui.*; import com.google.gwt.uibinder.client.*;
[ "com.electriccloud.commander", "com.google.gwt" ]
com.electriccloud.commander; com.google.gwt;
1,139,461
public void testClassElement1() throws Exception { Class targetClass = Dog.class; validateClassElements(targetClass,"id"); validateFieldElement(targetClass, "id", "Integer"); validateFieldElement(targetClass, "breed", "String"); validateFieldElement(targetClass, "gender", "String"); }
void function() throws Exception { Class targetClass = Dog.class; validateClassElements(targetClass,"id"); validateFieldElement(targetClass, "id", STR); validateFieldElement(targetClass, "breed", STR); validateFieldElement(targetClass, STR, STR); }
/** * Verifies that the 'element' and 'complexType' elements * corresponding to the Class are present in the XSD * Verifies that the Class attributes are present in the XSD * * @throws Exception */
Verifies that the 'element' and 'complexType' elements corresponding to the Class are present in the XSD Verifies that the Class attributes are present in the XSD
testClassElement1
{ "repo_name": "NCIP/cacore-sdk", "path": "sdk-toolkit/example-project/junit/src/test/xml/mapping/InterfaceXMLMappingTest.java", "license": "bsd-3-clause", "size": 1525 }
[ "gov.nih.nci.cacoresdk.domain.interfaze.Dog" ]
import gov.nih.nci.cacoresdk.domain.interfaze.Dog;
import gov.nih.nci.cacoresdk.domain.interfaze.*;
[ "gov.nih.nci" ]
gov.nih.nci;
1,080,499
private void updateBlockWriter(long offset) throws IOException { if (mBlockWriter != null && offset > mBlockWriter.getPosition()) { cancelBlockWriter(); } try { if (mBlockWriter == null && offset == 0 && !mBlockMeta.isNoCache()) { BlockStoreLocation loc = BlockStoreLocation.anyDirInTie...
void function(long offset) throws IOException { if (mBlockWriter != null && offset > mBlockWriter.getPosition()) { cancelBlockWriter(); } try { if (mBlockWriter == null && offset == 0 && !mBlockMeta.isNoCache()) { BlockStoreLocation loc = BlockStoreLocation.anyDirInTier(mStorageTierAssoc.getAlias(0)); mLocalBlockStore....
/** * Updates the block writer given an offset to read. If the offset is beyond the current * position of the block writer, the block writer will be aborted. * * @param offset the read offset */
Updates the block writer given an offset to read. If the offset is beyond the current position of the block writer, the block writer will be aborted
updateBlockWriter
{ "repo_name": "PasaLab/tachyon", "path": "core/server/worker/src/main/java/alluxio/worker/block/UnderFileSystemBlockReader.java", "license": "apache-2.0", "size": 14045 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
18,268
public static ActionPaste getInstance() { return instance; } private JTextComponent textSource;
static ActionPaste function() { return instance; } private JTextComponent textSource;
/** * Singleton implementation. * @return The singleton */
Singleton implementation
getInstance
{ "repo_name": "ckaestne/LEADT", "path": "workspace/argouml_critics/argouml-app/src/org/argouml/uml/ui/ActionPaste.java", "license": "gpl-3.0", "size": 5699 }
[ "javax.swing.text.JTextComponent" ]
import javax.swing.text.JTextComponent;
import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
1,064,303
public BitstampWithdrawal withdrawBitstampFunds( Currency currency, BigDecimal amount, final String address, final String tag) throws IOException { BitstampWithdrawal response; if (currency.equals(Currency.XRP)) { Long dt = null; try { dt = Long.valueOf(tag); } catch (Nu...
BitstampWithdrawal function( Currency currency, BigDecimal amount, final String address, final String tag) throws IOException { BitstampWithdrawal response; if (currency.equals(Currency.XRP)) { Long dt = null; try { dt = Long.valueOf(tag); } catch (NumberFormatException e) { } response = withdrawRippleFunds(amount, add...
/** * This method can withdraw any currency if withdrawal endpoint is configured in * BitstampAuthenticatedV2 */
This method can withdraw any currency if withdrawal endpoint is configured in BitstampAuthenticatedV2
withdrawBitstampFunds
{ "repo_name": "stachon/XChange", "path": "xchange-bitstamp/src/main/java/org/knowm/xchange/bitstamp/service/BitstampAccountServiceRaw.java", "license": "mit", "size": 18037 }
[ "java.io.IOException", "java.math.BigDecimal", "org.knowm.xchange.bitstamp.dto.account.BitstampWithdrawal", "org.knowm.xchange.currency.Currency", "org.knowm.xchange.exceptions.ExchangeException" ]
import java.io.IOException; import java.math.BigDecimal; import org.knowm.xchange.bitstamp.dto.account.BitstampWithdrawal; import org.knowm.xchange.currency.Currency; import org.knowm.xchange.exceptions.ExchangeException;
import java.io.*; import java.math.*; import org.knowm.xchange.bitstamp.dto.account.*; import org.knowm.xchange.currency.*; import org.knowm.xchange.exceptions.*;
[ "java.io", "java.math", "org.knowm.xchange" ]
java.io; java.math; org.knowm.xchange;
1,765,555
public static final double angle(Atom a, Atom b) { Vector3d va = new Vector3d(a.getCoordsAsPoint3d()); Vector3d vb = new Vector3d(b.getCoordsAsPoint3d()); return Math.toDegrees(va.angle(vb)); }
static final double function(Atom a, Atom b) { Vector3d va = new Vector3d(a.getCoordsAsPoint3d()); Vector3d vb = new Vector3d(b.getCoordsAsPoint3d()); return Math.toDegrees(va.angle(vb)); }
/** * Gets the angle between two vectors * * @param a * an Atom object * @param b * an Atom object * @return Angle between a and b in degrees, in range [0,180]. If either * vector has length 0 then angle is not defined and NaN is returned */
Gets the angle between two vectors
angle
{ "repo_name": "pwrose/biojava", "path": "biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java", "license": "lgpl-2.1", "size": 33877 }
[ "javax.vecmath.Vector3d" ]
import javax.vecmath.Vector3d;
import javax.vecmath.*;
[ "javax.vecmath" ]
javax.vecmath;
2,715,287
@Override public Filter getFilter() { Filter filter = new Filter() {
Filter function() { Filter filter = new Filter() {
/** * Para filtros del listado * * @return filtro */
Para filtros del listado
getFilter
{ "repo_name": "alberapps/tiempobus", "path": "TiempoBus/src/alberapps/android/tiempobus/infolineas/InfoLineaAdapter.java", "license": "gpl-3.0", "size": 12362 }
[ "android.widget.Filter" ]
import android.widget.Filter;
import android.widget.*;
[ "android.widget" ]
android.widget;
21,328
public RedisTransaction clusterResetWithOptions(ResetOptions options, Handler<AsyncResult<String>> handler) { delegate.clusterResetWithOptions(options, handler); return this; }
RedisTransaction function(ResetOptions options, Handler<AsyncResult<String>> handler) { delegate.clusterResetWithOptions(options, handler); return this; }
/** * Reset a Redis Cluster node. * @param options * @param handler Handler for the result of this call. * @return */
Reset a Redis Cluster node
clusterResetWithOptions
{ "repo_name": "brianjcj/vertx-redis-client", "path": "src/main/generated/io/vertx/rxjava/redis/RedisTransaction.java", "license": "apache-2.0", "size": 184983 }
[ "io.vertx.core.AsyncResult", "io.vertx.core.Handler", "io.vertx.redis.op.ResetOptions" ]
import io.vertx.core.AsyncResult; import io.vertx.core.Handler; import io.vertx.redis.op.ResetOptions;
import io.vertx.core.*; import io.vertx.redis.op.*;
[ "io.vertx.core", "io.vertx.redis" ]
io.vertx.core; io.vertx.redis;
638,513
public static BaseFunction checkCallable(Object functionValue, Location location) throws EvalException { if (functionValue instanceof BaseFunction) { return (BaseFunction) functionValue; } else { throw new EvalException( location, "'" + EvalUtils.getDataTypeName(functionValue) + "'...
static BaseFunction function(Object functionValue, Location location) throws EvalException { if (functionValue instanceof BaseFunction) { return (BaseFunction) functionValue; } else { throw new EvalException( location, "'" + EvalUtils.getDataTypeName(functionValue) + STR); } } private static final StackManipulation che...
/** * Checks whether the given object is a {@link BaseFunction}. * * <p>Public for reflection by the compiler and access from generated byte code. * * @throws EvalException If not a BaseFunction. */
Checks whether the given object is a <code>BaseFunction</code>. Public for reflection by the compiler and access from generated byte code
checkCallable
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/FuncallExpression.java", "license": "apache-2.0", "size": 31511 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.events.Location", "com.google.devtools.build.lib.syntax.compiler.ByteCodeUtils", "net.bytebuddy.implementation.bytecode.StackManipulation" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.syntax.compiler.ByteCodeUtils; import net.bytebuddy.implementation.bytecode.StackManipulation;
import com.google.common.collect.*; import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.syntax.compiler.*; import net.bytebuddy.implementation.bytecode.*;
[ "com.google.common", "com.google.devtools", "net.bytebuddy.implementation" ]
com.google.common; com.google.devtools; net.bytebuddy.implementation;
1,497,151
public void testAddAll5() { Integer[] empty = new Integer[0]; Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE; ++i) ints[i] = new Integer(i); ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(); assertFalse(q.addAll(Arrays.asList(empty))); a...
void function() { Integer[] empty = new Integer[0]; Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE; ++i) ints[i] = new Integer(i); ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(); assertFalse(q.addAll(Arrays.asList(empty))); assertTrue(q.addAll(Arrays.asList(ints))); for (int i = 0; i < SIZE; ++i) a...
/** * Deque contains all elements, in traversal order, of successful addAll */
Deque contains all elements, in traversal order, of successful addAll
testAddAll5
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jdk/test/java/util/concurrent/tck/ConcurrentLinkedDequeTest.java", "license": "gpl-2.0", "size": 28001 }
[ "java.util.Arrays", "java.util.concurrent.ConcurrentLinkedDeque" ]
import java.util.Arrays; import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,471,840
public Map<String, Class<?>> getMissingConfigurations() { return Collections.unmodifiableMap(_missingConfigurations); }
Map<String, Class<?>> function() { return Collections.unmodifiableMap(_missingConfigurations); }
/** * Gets an unmodifiable map from missing configuration names to expected type. * @return the missing configurations */
Gets an unmodifiable map from missing configuration names to expected type
getMissingConfigurations
{ "repo_name": "McLeodMoores/starling", "path": "projects/validation/src/main/java/com/mcleodmoores/config/ConfigurationValidationInfo.java", "license": "apache-2.0", "size": 5674 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
81,648
public boolean isSpecific() { if (SpecificRecord.class.isAssignableFrom(typeClass)) { return true; } for (PType ptype : subTypes) { if (SpecificRecord.class.isAssignableFrom(ptype.getTypeClass())) { return true; } } return false; }
boolean function() { if (SpecificRecord.class.isAssignableFrom(typeClass)) { return true; } for (PType ptype : subTypes) { if (SpecificRecord.class.isAssignableFrom(ptype.getTypeClass())) { return true; } } return false; }
/** * Determine if the wrapped type is a specific data avro type. * * @return true if the wrapped type is a specific data type */
Determine if the wrapped type is a specific data avro type
isSpecific
{ "repo_name": "cloudera/crunch", "path": "crunch/src/main/java/org/apache/crunch/types/avro/AvroType.java", "license": "apache-2.0", "size": 4871 }
[ "org.apache.avro.specific.SpecificRecord", "org.apache.crunch.types.PType" ]
import org.apache.avro.specific.SpecificRecord; import org.apache.crunch.types.PType;
import org.apache.avro.specific.*; import org.apache.crunch.types.*;
[ "org.apache.avro", "org.apache.crunch" ]
org.apache.avro; org.apache.crunch;
1,351,315
@SuppressWarnings("unchecked") public List<Object[]> findDrugsAndPrescriptionsByScriptNumber(int scriptNumber) { Query query = entityManager.createQuery("SELECT d, p FROM Drug d, Prescription p WHERE d.scriptNo = p.id AND d.scriptNo = :scriptNo ORDER BY d.position DESC, d.rxDate DESC, d.id ASC"); query.setParam...
@SuppressWarnings(STR) List<Object[]> function(int scriptNumber) { Query query = entityManager.createQuery(STR); query.setParameter(STR, scriptNumber); return query.getResultList(); }
/** * Finds all drugs and prescriptions for the specified id * * @param scriptNumber * Script number of a prescription to be found * @return * Returns the list of arrays, where first element is of type Drug and the second is of type Prescription. */
Finds all drugs and prescriptions for the specified id
findDrugsAndPrescriptionsByScriptNumber
{ "repo_name": "scoophealth/oscar", "path": "src/main/java/org/oscarehr/common/dao/DrugDao.java", "license": "gpl-2.0", "size": 22063 }
[ "java.util.List", "javax.persistence.Query" ]
import java.util.List; import javax.persistence.Query;
import java.util.*; import javax.persistence.*;
[ "java.util", "javax.persistence" ]
java.util; javax.persistence;
2,491,621
ResourceApk withValidatedResources(Artifact rClassJar) { // When assets and resources are processed together, they are both merged into the same zip Artifact mergedResources = assets.getMergedAssets(); // Since parts of both merging and validation were already done in combined resource processing, //...
ResourceApk withValidatedResources(Artifact rClassJar) { Artifact mergedResources = assets.getMergedAssets(); MergedAndroidResources merged = MergedAndroidResources.of( resources, mergedResources, rClassJar, null, dataBindingInfoZip, resourceDeps, manifest); ValidatedAndroidResources validated = ValidatedAndroidResourc...
/** * Returns fully processed resources. The R class generator action will not be registered. * * @param rClassJar an artifact containing the resource class jar for these resources. An action * to generate it must be registered elsewhere. */
Returns fully processed resources. The R class generator action will not be registered
withValidatedResources
{ "repo_name": "twitter-forks/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java", "license": "apache-2.0", "size": 14997 }
[ "com.google.devtools.build.lib.actions.Artifact" ]
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
860,732
protected COABO makeChildCoaboOf(COABO parentCoa, Short accountId, String accountName, String glCode) { COAHierarchyEntity parentCoah = parentCoa.getCoaHierarchy(); if (parentCoah == null) { throw new RuntimeException("ParentCoa.coaHierarchy has not been defined"); } COAB...
COABO function(COABO parentCoa, Short accountId, String accountName, String glCode) { COAHierarchyEntity parentCoah = parentCoa.getCoaHierarchy(); if (parentCoah == null) { throw new RuntimeException(STR); } COABO childCoa = new COABO(accountId, accountName, new GLCodeEntity(accountId, glCode)); COAHierarchyEntity hier...
/** * Establish child-parent relationship between two COABO instances. * * <p> * ASSUMPTION: the parentCoa's hierarchy has been created. In other words, build the hierarchy from top down. * * @throws RuntimeException if parentCoa has no associated COAHierarchy. */
Establish child-parent relationship between two COABO instances.
makeChildCoaboOf
{ "repo_name": "vorburger/mifos-head", "path": "application/src/test/java/org/mifos/accounts/financial/business/service/activity/accountingentry/InterestPostingAccountingEntryTest.java", "license": "apache-2.0", "size": 9282 }
[ "org.mifos.accounts.financial.business.COAHierarchyEntity", "org.mifos.accounts.financial.business.GLCodeEntity" ]
import org.mifos.accounts.financial.business.COAHierarchyEntity; import org.mifos.accounts.financial.business.GLCodeEntity;
import org.mifos.accounts.financial.business.*;
[ "org.mifos.accounts" ]
org.mifos.accounts;
1,057,255
public void propertyChange(PropertyChangeEvent evt) { String name = evt.getPropertyName(); if (ControlPane.FAMILY_PROPERTY.equals(name)) { String oldValue = (String) evt.getOldValue(); String newValue = (String) evt.getNewValue(); if (newValue.equals(...
void function(PropertyChangeEvent evt) { String name = evt.getPropertyName(); if (ControlPane.FAMILY_PROPERTY.equals(name)) { String oldValue = (String) evt.getOldValue(); String newValue = (String) evt.getNewValue(); if (newValue.equals(oldValue)) return; model.setFamily(newValue); view.onCurveChange(); } else if (Con...
/** * Reacts to property change events. * @see PropertyChangeListener#propertyChange(PropertyChangeEvent) */
Reacts to property change events
propertyChange
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/rnd/RendererControl.java", "license": "gpl-2.0", "size": 13856 }
[ "java.awt.Color", "java.beans.PropertyChangeEvent", "java.util.Iterator", "java.util.Map", "java.util.Set", "org.openmicroscopy.shoola.agents.util.ui.ChannelButton", "org.openmicroscopy.shoola.util.ui.colourpicker.ColourPicker" ]
import java.awt.Color; import java.beans.PropertyChangeEvent; import java.util.Iterator; import java.util.Map; import java.util.Set; import org.openmicroscopy.shoola.agents.util.ui.ChannelButton; import org.openmicroscopy.shoola.util.ui.colourpicker.ColourPicker;
import java.awt.*; import java.beans.*; import java.util.*; import org.openmicroscopy.shoola.agents.util.ui.*; import org.openmicroscopy.shoola.util.ui.colourpicker.*;
[ "java.awt", "java.beans", "java.util", "org.openmicroscopy.shoola" ]
java.awt; java.beans; java.util; org.openmicroscopy.shoola;
1,647,479
@Deprecated List<FieldViolation> getBeanViolations(String fieldName);
List<FieldViolation> getBeanViolations(String fieldName);
/** * Get a complete list of bean violations for a specified field. This list DOES NOT contain * general violations * (use getGeneralViolations() instead). * * @return A List of FieldViolation-objects */
Get a complete list of bean violations for a specified field. This list DOES NOT contain general violations (use getGeneralViolations() instead)
getBeanViolations
{ "repo_name": "fizzed/ninja", "path": "ninja-core/src/main/java/ninja/validation/Validation.java", "license": "apache-2.0", "size": 5960 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
320,952
public Builder addExecutableArguments(Iterable<String> arguments) { Preconditions.checkState(executableArgs != null); Iterables.addAll(executableArgs, arguments); return this; }
Builder function(Iterable<String> arguments) { Preconditions.checkState(executableArgs != null); Iterables.addAll(executableArgs, arguments); return this; }
/** * Add multiple arguments in the order they are returned by the collection * to the list of executable arguments. */
Add multiple arguments in the order they are returned by the collection to the list of executable arguments
addExecutableArguments
{ "repo_name": "vt09/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/actions/SpawnAction.java", "license": "apache-2.0", "size": 33167 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.Iterables" ]
import com.google.common.base.Preconditions; import com.google.common.collect.Iterables;
import com.google.common.base.*; import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
2,071,043
public BigDecimal bigDecimalValue(RoundingMode roundingMode) { return new BigDecimal(numerator).divide(new BigDecimal(denominator), roundingMode); }
BigDecimal function(RoundingMode roundingMode) { return new BigDecimal(numerator).divide(new BigDecimal(denominator), roundingMode); }
/** * <p> * Gets the fraction as a <code>BigDecimal</code> following the passed * rounding mode. This calculates the fraction as the numerator divided by * denominator. * </p> * * @param roundingMode Rounding mode to apply. * @return the fraction as a <code>BigDecimal</code>. ...
Gets the fraction as a <code>BigDecimal</code> following the passed rounding mode. This calculates the fraction as the numerator divided by denominator.
bigDecimalValue
{ "repo_name": "virtualdataset/metagen-java", "path": "virtdata-lib-curves4/src/main/java/org/apache/commons/numbers/fraction/BigFraction.java", "license": "apache-2.0", "size": 38926 }
[ "java.math.BigDecimal", "java.math.RoundingMode" ]
import java.math.BigDecimal; import java.math.RoundingMode;
import java.math.*;
[ "java.math" ]
java.math;
1,346,799
protected SQLException translateException(Exception e) { if (isAcquireTimeoutException(e)) { eventPublisher.publish(new ConnectionAcquireTimeoutEvent(configurationProperties.getUniqueName())); return new AcquireTimeoutException(e); } else if (e instanceof SQLException) { ...
SQLException function(Exception e) { if (isAcquireTimeoutException(e)) { eventPublisher.publish(new ConnectionAcquireTimeoutEvent(configurationProperties.getUniqueName())); return new AcquireTimeoutException(e); } else if (e instanceof SQLException) { return (SQLException) e; } return new SQLException(e); }
/** * Translate the thrown exception to {@link com.vladmihalcea.flexypool.exception.AcquireTimeoutException}. * * @param e caught exception * @return translated exception */
Translate the thrown exception to <code>com.vladmihalcea.flexypool.exception.AcquireTimeoutException</code>
translateException
{ "repo_name": "vladmihalcea/flexy-pool", "path": "flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/adaptor/AbstractPoolAdapter.java", "license": "apache-2.0", "size": 4482 }
[ "com.vladmihalcea.flexypool.event.ConnectionAcquireTimeoutEvent", "com.vladmihalcea.flexypool.exception.AcquireTimeoutException", "java.sql.SQLException" ]
import com.vladmihalcea.flexypool.event.ConnectionAcquireTimeoutEvent; import com.vladmihalcea.flexypool.exception.AcquireTimeoutException; import java.sql.SQLException;
import com.vladmihalcea.flexypool.event.*; import com.vladmihalcea.flexypool.exception.*; import java.sql.*;
[ "com.vladmihalcea.flexypool", "java.sql" ]
com.vladmihalcea.flexypool; java.sql;
1,909,236
Collection<RenderNodeSpace> children();
Collection<RenderNodeSpace> children();
/** * Gets an unmodifiable collection of the child nodes of this node */
Gets an unmodifiable collection of the child nodes of this node
children
{ "repo_name": "JFL110/app-base-prender", "path": "src/main/java/org/jfl110/prender/api/RenderNodeWithChildren.java", "license": "apache-2.0", "size": 363 }
[ "java.util.Collection", "org.jfl110.prender.api.render.RenderNodeSpace" ]
import java.util.Collection; import org.jfl110.prender.api.render.RenderNodeSpace;
import java.util.*; import org.jfl110.prender.api.render.*;
[ "java.util", "org.jfl110.prender" ]
java.util; org.jfl110.prender;
1,749,042
public static def<String> trimFunc() { return trimFunc; } private static RFunc2<?, ?, ?> values = (k, v) -> v;
static def<String> function() { return trimFunc; } private static RFunc2<?, ?, ?> values = (k, v) -> v;
/** * Used as 1st argument in {@link A1Transformer#via(def)} or * {@link A1ArrTransformer#via(def)} <br> * When its supposed to fill collection/array with trimmed values. * * @return */
Used as 1st argument in <code>A1Transformer#via(def)</code> or <code>A1ArrTransformer#via(def)</code> When its supposed to fill collection/array with trimmed values
trimFunc
{ "repo_name": "NatureCode/Style", "path": "src/net/cassite/style/$.java", "license": "mit", "size": 13003 }
[ "net.cassite.style.interfaces.RFunc2" ]
import net.cassite.style.interfaces.RFunc2;
import net.cassite.style.interfaces.*;
[ "net.cassite.style" ]
net.cassite.style;
2,432,100
Builder addBuiltTombstones(final List<Tombstone> tombstones) { this.tombstones.addAll(tombstones); return this; }
Builder addBuiltTombstones(final List<Tombstone> tombstones) { this.tombstones.addAll(tombstones); return this; }
/** * Add a list of tombstones to the graveyard. */
Add a list of tombstones to the graveyard
addBuiltTombstones
{ "repo_name": "HonzaKral/elasticsearch", "path": "server/src/main/java/org/elasticsearch/cluster/metadata/IndexGraveyard.java", "license": "apache-2.0", "size": 17704 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,329,405
int getColumnIndex(Column col);
int getColumnIndex(Column col);
/** * Get the index of a column in the list of index columns * * @param col the column * @return the index (0 meaning first column) */
Get the index of a column in the list of index columns
getColumnIndex
{ "repo_name": "ferquies/2dam", "path": "AD/Tema 2/h2/src/main/org/h2/index/Index.java", "license": "gpl-3.0", "size": 6636 }
[ "org.h2.table.Column" ]
import org.h2.table.Column;
import org.h2.table.*;
[ "org.h2.table" ]
org.h2.table;
1,193,321
protected void validateDTDattribute(QName element, String attValue, XMLAttributeDecl attributeDecl) throws XNIException { switch (attributeDecl.simpleType.type) { case XMLSimpleType.TYPE_ENTITY: { // NOTE: Save this information because inval...
void function(QName element, String attValue, XMLAttributeDecl attributeDecl) throws XNIException { switch (attributeDecl.simpleType.type) { case XMLSimpleType.TYPE_ENTITY: { boolean isAlistAttribute = attributeDecl.simpleType.list; try { if (isAlistAttribute) { fValENTITIES.validate(attValue, fValidationState); } else...
/** * Validate attributes in DTD fashion. */
Validate attributes in DTD fashion
validateDTDattribute
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java", "license": "apache-2.0", "size": 84048 }
[ "com.sun.org.apache.xerces.internal.impl.XMLErrorReporter", "com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException", "com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter", "com.sun.org.apache.xerces.internal.xni.QName", "com.sun.org.apache.xerces.internal.xni.XNIException" ]
import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException; import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; import com.sun.org.apache.xerces.internal.xni.QName; import com.sun.org.apache.xerces.internal.xni.XNI...
import com.sun.org.apache.xerces.internal.impl.*; import com.sun.org.apache.xerces.internal.impl.dv.*; import com.sun.org.apache.xerces.internal.impl.msg.*; import com.sun.org.apache.xerces.internal.xni.*;
[ "com.sun.org" ]
com.sun.org;
2,893,972
public synchronized boolean activateWork(ByteString key, Work work) { Queue<Work> queue = activeWork.get(key); if (queue == null) { queue = new LinkedList<>(); activeWork.put(key, queue); queue.add(work); return true; } if (queue.peek().getWorkToken() != work....
synchronized boolean function(ByteString key, Work work) { Queue<Work> queue = activeWork.get(key); if (queue == null) { queue = new LinkedList<>(); activeWork.put(key, queue); queue.add(work); return true; } if (queue.peek().getWorkToken() != work.getWorkToken()) { queue.add(work); } return false; }
/** * Mark the given key and work as active. Returns whether the work is ready to be run * immediately. */
Mark the given key and work as active. Returns whether the work is ready to be run immediately
activateWork
{ "repo_name": "tyagihas/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/runners/worker/StreamingDataflowWorker.java", "license": "apache-2.0", "size": 39149 }
[ "com.google.protobuf.ByteString", "java.util.LinkedList", "java.util.Queue" ]
import com.google.protobuf.ByteString; import java.util.LinkedList; import java.util.Queue;
import com.google.protobuf.*; import java.util.*;
[ "com.google.protobuf", "java.util" ]
com.google.protobuf; java.util;
1,428,615
private void writeOutputData(byte[] data, int offset, int len) throws IOException { cbLock.lock(); try { ios.write(data, offset, len); } finally { cbLock.unlock(); } } private Thread theThread = null; private int theLockCount = 0;
void function(byte[] data, int offset, int len) throws IOException { cbLock.lock(); try { ios.write(data, offset, len); } finally { cbLock.unlock(); } } private Thread theThread = null; private int theLockCount = 0;
/** * This method is called from native code in order to write encoder * output to the destination. * * We block any attempt to change the writer state during this * method, in order to prevent a corruption of the native encoder * state. */
This method is called from native code in order to write encoder output to the destination. We block any attempt to change the writer state during this method, in order to prevent a corruption of the native encoder state
writeOutputData
{ "repo_name": "md-5/jdk10", "path": "src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java", "license": "gpl-2.0", "size": 68956 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,288,673
public List<CmsAliasTableRow> getLiveData() { return m_table.getLiveDataList(); }
List<CmsAliasTableRow> function() { return m_table.getLiveDataList(); }
/** * Gets the list of rows used by the data provider.<p> * * @return the list of rows used by the data provider */
Gets the list of rows used by the data provider
getLiveData
{ "repo_name": "victos/opencms-core", "path": "src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasView.java", "license": "lgpl-2.1", "size": 17325 }
[ "java.util.List", "org.opencms.gwt.shared.alias.CmsAliasTableRow" ]
import java.util.List; import org.opencms.gwt.shared.alias.CmsAliasTableRow;
import java.util.*; import org.opencms.gwt.shared.alias.*;
[ "java.util", "org.opencms.gwt" ]
java.util; org.opencms.gwt;
593,612
public ActionForward addPersonnelAttachment(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ProtocolForm protocolForm = (ProtocolForm) form; ProtocolDocument protocolDocument = (ProtocolDocument) protocolForm.getProtoco...
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ProtocolForm protocolForm = (ProtocolForm) form; ProtocolDocument protocolDocument = (ProtocolDocument) protocolForm.getProtocolDocument(); int selectedPersonIndex = getSelectedPer...
/** * Method called when adding an attachment to a person. * * @param mapping the action mapping * @param form the form. * @param request the request. * @param response the response. * @return an action forward. * @throws Exception if there is a problem executing the request. ...
Method called when adding an attachment to a person
addPersonnelAttachment
{ "repo_name": "rashikpolus/MIT_KC", "path": "coeus-impl/src/main/java/org/kuali/kra/irb/personnel/ProtocolPersonnelAction.java", "license": "agpl-3.0", "size": 21052 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.kuali.kra.infrastructure.Constants", "org.kuali.kra.irb.ProtocolDocument", "org.kuali.kra.i...
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kra.infrastructure.Constants; import org.kuali.kra.irb.ProtocolDocument;...
import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kra.infrastructure.*; import org.kuali.kra.irb.*; import org.kuali.kra.irb.noteattachment.*;
[ "javax.servlet", "org.apache.struts", "org.kuali.kra" ]
javax.servlet; org.apache.struts; org.kuali.kra;
2,161,825
public static void showToast(Context context, int resourceId) { Toast.makeText(context, context.getString(resourceId), Toast.LENGTH_LONG).show(); }
static void function(Context context, int resourceId) { Toast.makeText(context, context.getString(resourceId), Toast.LENGTH_LONG).show(); }
/** * Shows a (long) toast. * * @param context * @param resourceId */
Shows a (long) toast
showToast
{ "repo_name": "suen8228994/LyricHere", "path": "app/src/main/java/com/markzhai/lyrichere/utils/Utils.java", "license": "apache-2.0", "size": 9287 }
[ "android.content.Context", "android.widget.Toast" ]
import android.content.Context; import android.widget.Toast;
import android.content.*; import android.widget.*;
[ "android.content", "android.widget" ]
android.content; android.widget;
1,852,614
public void loadDirectory(String outputFile) { try { Dataset dataset = TDBFactory.createDataset(directoryPath); Model tdb = dataset.getDefaultModel(); FileManager.get().readModel(tdb, outputFile); tdb.close(); dataset.close(); } catch(Exception ex) { LOG.error(ex.getMessage(), ex); } ...
void function(String outputFile) { try { Dataset dataset = TDBFactory.createDataset(directoryPath); Model tdb = dataset.getDefaultModel(); FileManager.get().readModel(tdb, outputFile); tdb.close(); dataset.close(); } catch(Exception ex) { LOG.error(ex.getMessage(), ex); } LOG.info(STR); }
/** * Load rdf dataset as a graph in specified empty directory path * @param outputFile : Path to rdf dataset */
Load rdf dataset as a graph in specified empty directory path
loadDirectory
{ "repo_name": "gone-phishing/SDW", "path": "src/main/java/org/sdw/model/JenaModel.java", "license": "apache-2.0", "size": 4716 }
[ "org.apache.jena.query.Dataset", "org.apache.jena.rdf.model.Model", "org.apache.jena.tdb.TDBFactory", "org.apache.jena.util.FileManager" ]
import org.apache.jena.query.Dataset; import org.apache.jena.rdf.model.Model; import org.apache.jena.tdb.TDBFactory; import org.apache.jena.util.FileManager;
import org.apache.jena.query.*; import org.apache.jena.rdf.model.*; import org.apache.jena.tdb.*; import org.apache.jena.util.*;
[ "org.apache.jena" ]
org.apache.jena;
1,245,440
@ServiceMethod(returns = ReturnType.SINGLE) public Response<PrivateEndpointConnectionInner> getWithResponse( String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionN...
@ServiceMethod(returns = ReturnType.SINGLE) Response<PrivateEndpointConnectionInner> function( String resourceGroupName, String serverName, String privateEndpointConnectionName, Context context) { return getWithResponseAsync(resourceGroupName, serverName, privateEndpointConnectionName, context).block(); }
/** * Gets a private endpoint connection. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param privateEndpointConnectio...
Gets a private endpoint connection
getWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java", "license": "mit", "size": 58978 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.sql.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,073,270
void reclaimScrapViews( List<View> views ) { if ( mViewTypeCount == 1 ) { views.addAll( mCurrentScrap ); } else { final int viewTypeCount = mViewTypeCount; final ArrayList<View>[] scrapViews = mScrapViews; for ( int i = 0; i < viewTypeCount; ++i ) { final ArrayList<View> scrapPile = scra...
void reclaimScrapViews( List<View> views ) { if ( mViewTypeCount == 1 ) { views.addAll( mCurrentScrap ); } else { final int viewTypeCount = mViewTypeCount; final ArrayList<View>[] scrapViews = mScrapViews; for ( int i = 0; i < viewTypeCount; ++i ) { final ArrayList<View> scrapPile = scrapViews[i]; views.addAll( scrapPi...
/** * Puts all views in the scrap heap into the supplied list. */
Puts all views in the scrap heap into the supplied list
reclaimScrapViews
{ "repo_name": "vishalvijay/phoenix-edu-android", "path": "library/HorizontalVariableListView/src/it/sephiroth/android/library/widget/AbsHListView.java", "license": "gpl-2.0", "size": 178371 }
[ "android.view.View", "java.util.ArrayList", "java.util.List" ]
import android.view.View; import java.util.ArrayList; import java.util.List;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
443,527
@SuppressLint("NewApi") static private void findSupportedColorFormats(String mimeType) { SparseArray<ArrayList<String>> softwareCodecs = new SparseArray<ArrayList<String>>(); SparseArray<ArrayList<String>> hardwareCodecs = new SparseArray<ArrayList<String>>(); if (sSoftwareCodecs.containsKey(mimeType))...
@SuppressLint(STR) static void function(String mimeType) { SparseArray<ArrayList<String>> softwareCodecs = new SparseArray<ArrayList<String>>(); SparseArray<ArrayList<String>> hardwareCodecs = new SparseArray<ArrayList<String>>(); if (sSoftwareCodecs.containsKey(mimeType)) { return; } Log.v(TAG,STRSTR\"..."); for(int j...
/** * Returns an associative array of the supported color formats and the names of the encoders for a given mime type * This can take up to sec on certain phones the first time you run it... **/
Returns an associative array of the supported color formats and the names of the encoders for a given mime type This can take up to sec on certain phones the first time you run it..
findSupportedColorFormats
{ "repo_name": "MichaelChansn/RemoteEye", "path": "RemoteEye/src/freescale/ks/remoteeye/streaming/video/CodecManager.java", "license": "gpl-3.0", "size": 9069 }
[ "android.annotation.SuppressLint", "android.media.MediaCodecInfo", "android.media.MediaCodecList", "android.util.Log", "android.util.SparseArray", "java.util.ArrayList" ]
import android.annotation.SuppressLint; import android.media.MediaCodecInfo; import android.media.MediaCodecList; import android.util.Log; import android.util.SparseArray; import java.util.ArrayList;
import android.annotation.*; import android.media.*; import android.util.*; import java.util.*;
[ "android.annotation", "android.media", "android.util", "java.util" ]
android.annotation; android.media; android.util; java.util;
2,884,065
public SourceFolderNode getSourceFolder() { Node parent = getParent(); while (parent != null) { if (parent instanceof SourceFolderNode) { return (SourceFolderNode)parent; } parent = parent.getParent(); } throw new IllegalStateExc...
SourceFolderNode function() { Node parent = getParent(); while (parent != null) { if (parent instanceof SourceFolderNode) { return (SourceFolderNode)parent; } parent = parent.getParent(); } throw new IllegalStateException(STR); }
/** * Return source folder node in which package node exists. * * @return parent source folder node */
Return source folder node in which package node exists
getSourceFolder
{ "repo_name": "stour/che", "path": "plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/project/node/PackageNode.java", "license": "epl-1.0", "size": 4789 }
[ "org.eclipse.che.ide.api.data.tree.Node" ]
import org.eclipse.che.ide.api.data.tree.Node;
import org.eclipse.che.ide.api.data.tree.*;
[ "org.eclipse.che" ]
org.eclipse.che;
1,885,222
void writeDataPages(BytesInput bytes, long uncompressedTotalPageSize, long compressedTotalPageSize, List<parquet.column.Encoding> encodings) throws IOException { state = state.write(); if (DEBUG) LOG.debug(out.getPos() + ": write data pages"); long headersSize = bytes.size() - compressedTotalPageSize; ...
void writeDataPages(BytesInput bytes, long uncompressedTotalPageSize, long compressedTotalPageSize, List<parquet.column.Encoding> encodings) throws IOException { state = state.write(); if (DEBUG) LOG.debug(out.getPos() + STR); long headersSize = bytes.size() - compressedTotalPageSize; this.uncompressedLength += uncompr...
/** * writes a number of pages at once * @param bytes bytes to be written including page headers * @param uncompressedTotalPageSize total uncompressed size (without page headers) * @param compressedTotalPageSize total compressed size (without page headers) * @throws IOException */
writes a number of pages at once
writeDataPages
{ "repo_name": "cloudera/parquet-mr", "path": "parquet-hadoop/src/main/java/parquet/hadoop/ParquetFileWriter.java", "license": "apache-2.0", "size": 15691 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
155,624
public static SchematicEntry getSchematicValue( CacheContext cacheContext, String key ) { return getSchematicValue(cacheContext, key, true); }
static SchematicEntry function( CacheContext cacheContext, String key ) { return getSchematicValue(cacheContext, key, true); }
/** * Retrieves a schematic value from the given cache, stored under the given key. If a schematic value did not exist, one is * created and registered in an atomic fashion. * * @param cacheContext cache context * @param key key under which the schematic value exists * @return an AtomicMa...
Retrieves a schematic value from the given cache, stored under the given key. If a schematic value did not exist, one is created and registered in an atomic fashion
getSchematicValue
{ "repo_name": "flownclouds/modeshape", "path": "modeshape-schematic/src/main/java/org/infinispan/schematic/internal/SchematicEntryLookup.java", "license": "apache-2.0", "size": 4048 }
[ "org.infinispan.schematic.SchematicEntry" ]
import org.infinispan.schematic.SchematicEntry;
import org.infinispan.schematic.*;
[ "org.infinispan.schematic" ]
org.infinispan.schematic;
1,457,713
static Path[] getInputPaths(Configuration conf) throws IOException { String dirs = conf.get("mapred.input.dir"); if (dirs == null) { throw new IOException("Configuration mapred.input.dir is not defined."); } String [] list = StringUtils.split(dirs); Path[] result = new Path[list.length]; ...
static Path[] getInputPaths(Configuration conf) throws IOException { String dirs = conf.get(STR); if (dirs == null) { throw new IOException(STR); } String [] list = StringUtils.split(dirs); Path[] result = new Path[list.length]; for (int i = 0; i < list.length; i++) { result[i] = new Path(StringUtils.unEscapeString(lis...
/** * Get the list of input {@link Path}s for the map-reduce job. * * @param conf The configuration of the job * @return the list of input {@link Path}s for the map-reduce job. */
Get the list of input <code>Path</code>s for the map-reduce job
getInputPaths
{ "repo_name": "WANdisco/amplab-hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcInputFormat.java", "license": "apache-2.0", "size": 45340 }
[ "com.google.common.cache.Cache", "com.google.common.cache.CacheBuilder", "com.google.common.util.concurrent.ThreadFactoryBuilder", "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors", "java.util.concurrent.atomic.At...
import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java...
import com.google.common.cache.*; import com.google.common.util.concurrent.*; import java.io.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.common.*; import org.apache.hadoop.hive.c...
[ "com.google.common", "java.io", "java.util", "org.apache.hadoop" ]
com.google.common; java.io; java.util; org.apache.hadoop;
980,069
private ISharedDocumentAdapter getSharedDocumentAdapter() { if (sharedDocumentAdapter == null) { sharedDocumentAdapter = new EditableSharedDocumentAdapter(this); } return sharedDocumentAdapter; }
ISharedDocumentAdapter function() { if (sharedDocumentAdapter == null) { sharedDocumentAdapter = new EditableSharedDocumentAdapter(this); } return sharedDocumentAdapter; }
/** * The code below is copy from org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement * and is required to add full Java editor capabilities (content assist, navigation etc) to the compare editor * @return */
The code below is copy from org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement and is required to add full Java editor capabilities (content assist, navigation etc) to the compare editor
getSharedDocumentAdapter
{ "repo_name": "iloveeclipse/anyedittools", "path": "AnyEditTools/src/de/loskutov/anyedit/compare/FileStreamContent.java", "license": "epl-1.0", "size": 4128 }
[ "org.eclipse.compare.ISharedDocumentAdapter" ]
import org.eclipse.compare.ISharedDocumentAdapter;
import org.eclipse.compare.*;
[ "org.eclipse.compare" ]
org.eclipse.compare;
98,949
@Override public boolean containsColumn(@Nullable Object columnKey) { return columnKeyToIndex.containsKey(columnKey); }
boolean function(@Nullable Object columnKey) { return columnKeyToIndex.containsKey(columnKey); }
/** * Returns {@code true} if the provided column key is among the column keys * provided when the table was constructed. */
Returns true if the provided column key is among the column keys provided when the table was constructed
containsColumn
{ "repo_name": "janus-project/guava.janusproject.io", "path": "guava/src/com/google/common/collect/ArrayTable.java", "license": "apache-2.0", "size": 24216 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,770,238
public ItemStack dispenseStack(IBlockSource par1IBlockSource, ItemStack par2ItemStack) { ItemBucket itembucket = (ItemBucket)par2ItemStack.getItem(); int i = par1IBlockSource.getXInt(); int j = par1IBlockSource.getYInt(); int k = par1IBlockSource.getZInt(); EnumFacing enu...
ItemStack function(IBlockSource par1IBlockSource, ItemStack par2ItemStack) { ItemBucket itembucket = (ItemBucket)par2ItemStack.getItem(); int i = par1IBlockSource.getXInt(); int j = par1IBlockSource.getYInt(); int k = par1IBlockSource.getZInt(); EnumFacing enumfacing = BlockDispenser.getFacing(par1IBlockSource.getBlock...
/** * Dispense the specified stack, play the dispense sound and spawn particles. */
Dispense the specified stack, play the dispense sound and spawn particles
dispenseStack
{ "repo_name": "HATB0T/RuneCraftery", "path": "forge/mcp/src/minecraft/net/minecraft/dispenser/DispenserBehaviorFilledBucket.java", "license": "lgpl-3.0", "size": 1379 }
[ "net.minecraft.block.BlockDispenser", "net.minecraft.item.Item", "net.minecraft.item.ItemBucket", "net.minecraft.item.ItemStack", "net.minecraft.util.EnumFacing" ]
import net.minecraft.block.BlockDispenser; import net.minecraft.item.Item; import net.minecraft.item.ItemBucket; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing;
import net.minecraft.block.*; import net.minecraft.item.*; import net.minecraft.util.*;
[ "net.minecraft.block", "net.minecraft.item", "net.minecraft.util" ]
net.minecraft.block; net.minecraft.item; net.minecraft.util;
2,556,174
@SuppressWarnings("unchecked") public void initialize(final Query baseQuery) { transition(State.NEW, State.INITIALIZED); String queryId = baseQuery.getId(); if (Strings.isNullOrEmpty(queryId)) { queryId = UUID.randomUUID().toString(); } Map<String, Object> mergedUserAndConfigContext; ...
@SuppressWarnings(STR) void function(final Query baseQuery) { transition(State.NEW, State.INITIALIZED); String queryId = baseQuery.getId(); if (Strings.isNullOrEmpty(queryId)) { queryId = UUID.randomUUID().toString(); } Map<String, Object> mergedUserAndConfigContext; if (baseQuery.getContext() != null) { mergedUserAndC...
/** * Initializes this object to execute a specific query. Does not actually execute the query. * * @param baseQuery the query */
Initializes this object to execute a specific query. Does not actually execute the query
initialize
{ "repo_name": "mghosh4/druid", "path": "server/src/main/java/org/apache/druid/server/QueryLifecycle.java", "license": "apache-2.0", "size": 12966 }
[ "com.google.common.base.Strings", "java.util.Map", "java.util.UUID", "org.apache.druid.query.BaseQuery", "org.apache.druid.query.Query" ]
import com.google.common.base.Strings; import java.util.Map; import java.util.UUID; import org.apache.druid.query.BaseQuery; import org.apache.druid.query.Query;
import com.google.common.base.*; import java.util.*; import org.apache.druid.query.*;
[ "com.google.common", "java.util", "org.apache.druid" ]
com.google.common; java.util; org.apache.druid;
216,765
public void removeOption(final String optionId) throws ServiceException { final Transaction transaction = optionRepository.beginTransaction(); try { optionRepository.remove(optionId); transaction.commit(); } catch (final Exception e) { if (transaction.is...
void function(final String optionId) throws ServiceException { final Transaction transaction = optionRepository.beginTransaction(); try { optionRepository.remove(optionId); transaction.commit(); } catch (final Exception e) { if (transaction.isActive()) { transaction.rollback(); } throw new ServiceException(e); } }
/** * Removes the option specified by the given option id. * * @param optionId the given option id * @throws ServiceException service exception */
Removes the option specified by the given option id
removeOption
{ "repo_name": "xiongba-me/solo", "path": "src/main/java/org/b3log/solo/service/OptionMgmtService.java", "license": "agpl-3.0", "size": 3675 }
[ "org.b3log.latke.repository.Transaction", "org.b3log.latke.service.ServiceException" ]
import org.b3log.latke.repository.Transaction; import org.b3log.latke.service.ServiceException;
import org.b3log.latke.repository.*; import org.b3log.latke.service.*;
[ "org.b3log.latke" ]
org.b3log.latke;
1,110,744
@Override public InstrumentDefinition<?> visitCorporateBondSecurity(final CorporateBondSecurity security) { final LegalEntity legalEntity = LegalEntityUtils.getLegalEntityForBond(Collections.<String, String>emptyMap(), security); ret...
InstrumentDefinition<?> function(final CorporateBondSecurity security) { final LegalEntity legalEntity = LegalEntityUtils.getLegalEntityForBond(Collections.<String, String>emptyMap(), security); return getFixedCouponBond(security, legalEntity); } /** * Converts a bond or bond future trade into a {@link InstrumentDefini...
/** * Converts a corporate bond security into an {@link InstrumentDefinition}. * @param security The corporate bond security. * @return The security definition */
Converts a corporate bond security into an <code>InstrumentDefinition</code>
visitCorporateBondSecurity
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/conversion/BondAndBondFutureTradeConverter.java", "license": "apache-2.0", "size": 27834 }
[ "com.opengamma.analytics.financial.instrument.InstrumentDefinition", "com.opengamma.analytics.financial.legalentity.LegalEntity", "com.opengamma.financial.security.bond.BillSecurity", "com.opengamma.financial.security.bond.BondSecurity", "com.opengamma.financial.security.bond.CorporateBondSecurity", "com....
import com.opengamma.analytics.financial.instrument.InstrumentDefinition; import com.opengamma.analytics.financial.legalentity.LegalEntity; import com.opengamma.financial.security.bond.BillSecurity; import com.opengamma.financial.security.bond.BondSecurity; import com.opengamma.financial.security.bond.CorporateBondSecu...
import com.opengamma.analytics.financial.instrument.*; import com.opengamma.analytics.financial.legalentity.*; import com.opengamma.financial.security.bond.*; import com.opengamma.financial.security.future.*; import java.util.*;
[ "com.opengamma.analytics", "com.opengamma.financial", "java.util" ]
com.opengamma.analytics; com.opengamma.financial; java.util;
823,586
public static void sendDataToArduino(Context context, String address, char flag, String data) { Intent intent = getSendIntent(address, AmarinoIntent.STRING_EXTRA, flag); intent.putExtra(AmarinoIntent.EXTRA_DATA, data); context.sendBroadcast(intent); }
static void function(Context context, String address, char flag, String data) { Intent intent = getSendIntent(address, AmarinoIntent.STRING_EXTRA, flag); intent.putExtra(AmarinoIntent.EXTRA_DATA, data); context.sendBroadcast(intent); }
/** * Sends a String to Arduino * * <p><i>The buffer of an Arduino is small, your String should not be longer than 62 characters</i></p> * @assertion: (data.length() <= 62) * * @param context the context * @param address the Bluetooth device you want to send data to * @param flag the flag Ardu...
Sends a String to Arduino The buffer of an Arduino is small, your String should not be longer than 62 characters
sendDataToArduino
{ "repo_name": "infomat/amarino", "path": "amarino/src/at/abraxas/amarino/Amarino.java", "license": "gpl-3.0", "size": 27356 }
[ "android.content.Context", "android.content.Intent" ]
import android.content.Context; import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
366,191
public static Node buildTree(List nested) { return buildTree(nested, new MessageCollection(), new MessageCollection()); }
static Node function(List nested) { return buildTree(nested, new MessageCollection(), new MessageCollection()); }
/** * Builds the tree from the nested commandlines. * * @param nested the nested commandlines * @return the root node, null if failed to build */
Builds the tree from the nested commandlines
buildTree
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/flow/tree/TreeHelper.java", "license": "gpl-3.0", "size": 11651 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,762,548
public static void addLevelInAssignStmt(InstanceFieldRef f, Unit pos) { logger.log(Level.INFO, "Adding level of field {0} in assignStmt in method {1}", new Object[] {f.getField().getSignature(),b.getMethod().getName()}); String fieldSignature = getSignatureForField(f.getField()); ArrayList<Type> par...
static void function(InstanceFieldRef f, Unit pos) { logger.log(Level.INFO, STR, new Object[] {f.getField().getSignature(),b.getMethod().getName()}); String fieldSignature = getSignatureForField(f.getField()); ArrayList<Type> parameterTypes = new ArrayList<Type>(); parameterTypes.add(RefType.v(STR)); parameterTypes.add...
/** * Add the level of a field of an object. It can be the field of the actually * analyzed object or the field * @param f Reference to the instance field * @param pos The statement where this field occurs */
Add the level of a field of an object. It can be the field of the actually analyzed object or the field
addLevelInAssignStmt
{ "repo_name": "luminousfennell/gradual-java", "path": "DynamicAnalyzer/testing_external/src/main/java/analyzer/level1/JimpleInjector.java", "license": "bsd-3-clause", "size": 44366 }
[ "java.util.ArrayList", "java.util.logging.Level" ]
import java.util.ArrayList; import java.util.logging.Level;
import java.util.*; import java.util.logging.*;
[ "java.util" ]
java.util;
1,596,393
public static void d(String tag, String msg, Object... args) { if (sLevel > LEVEL_DEBUG) { return; } if (args.length > 0) { msg = String.format(msg, args); } Log.d(tag, msg); }
static void function(String tag, String msg, Object... args) { if (sLevel > LEVEL_DEBUG) { return; } if (args.length > 0) { msg = String.format(msg, args); } Log.d(tag, msg); }
/** * Send a DEBUG log message * * @param tag * @param msg * @param args */
Send a DEBUG log message
d
{ "repo_name": "xu6148152/binea_project_for_android", "path": "PullToRefresh/pulltorefreshlib/src/main/java/demo/binea/com/pulltorefreshlib/util/PtrCLog.java", "license": "mit", "size": 6150 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,586,089
public void register(Collection<ResourceID> currentlyRegisteredTaskManagers) { // register with JM expectMsgClass(RegisterResourceManager.class); resourceManager.tell( new RegisterResourceManagerSuccessful(jobManager.actor(), currentlyRegisteredTaskManagers), jobManager); }
void function(Collection<ResourceID> currentlyRegisteredTaskManagers) { expectMsgClass(RegisterResourceManager.class); resourceManager.tell( new RegisterResourceManagerSuccessful(jobManager.actor(), currentlyRegisteredTaskManagers), jobManager); }
/** * Send a RegisterResourceManagerSuccessful message to the RM. * @param currentlyRegisteredTaskManagers the already-registered workers. */
Send a RegisterResourceManagerSuccessful message to the RM
register
{ "repo_name": "WangTaoTheTonic/flink", "path": "flink-mesos/src/test/java/org/apache/flink/mesos/runtime/clusterframework/MesosFlinkResourceManagerTest.java", "license": "apache-2.0", "size": 29285 }
[ "java.util.Collection", "org.apache.flink.runtime.clusterframework.messages.RegisterResourceManager", "org.apache.flink.runtime.clusterframework.messages.RegisterResourceManagerSuccessful", "org.apache.flink.runtime.clusterframework.types.ResourceID" ]
import java.util.Collection; import org.apache.flink.runtime.clusterframework.messages.RegisterResourceManager; import org.apache.flink.runtime.clusterframework.messages.RegisterResourceManagerSuccessful; import org.apache.flink.runtime.clusterframework.types.ResourceID;
import java.util.*; import org.apache.flink.runtime.clusterframework.messages.*; import org.apache.flink.runtime.clusterframework.types.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
2,693,863
// TODO(multidisplay): Rotate any display? public boolean updateRotationUncheckedLocked(boolean inTransaction) { if (mDeferredRotationPauseCount > 0) { // Rotation updates have been paused temporarily. Defer the update until // updates have been resumed. if (DEBUG_O...
boolean function(boolean inTransaction) { if (mDeferredRotationPauseCount > 0) { if (DEBUG_ORIENTATION) Slog.v(TAG, STR); return false; } ScreenRotationAnimation screenRotationAnimation = mAnimator.getScreenRotationAnimationLocked(Display.DEFAULT_DISPLAY); if (screenRotationAnimation != null && screenRotationAnimation....
/** * Updates the current rotation. * * Returns true if the rotation has been changed. In this case YOU * MUST CALL sendNewConfiguration() TO UNFREEZE THE SCREEN. */
Updates the current rotation. Returns true if the rotation has been changed. In this case YOU MUST CALL sendNewConfiguration() TO UNFREEZE THE SCREEN
updateRotationUncheckedLocked
{ "repo_name": "OmniEvo/android_frameworks_base", "path": "services/core/java/com/android/server/wm/WindowManagerService.java", "license": "gpl-3.0", "size": 522653 }
[ "android.os.RemoteException", "android.util.Slog", "android.view.Display" ]
import android.os.RemoteException; import android.util.Slog; import android.view.Display;
import android.os.*; import android.util.*; import android.view.*;
[ "android.os", "android.util", "android.view" ]
android.os; android.util; android.view;
1,544,899
public void setItemIcon(Object itemId, Resource icon, String altText) { if (itemId != null) { super.setItemIcon(itemId, icon); if (icon == null) { itemIconAlts.remove(itemId); } else if (altText == null) { throw new IllegalArgumentExceptio...
void function(Object itemId, Resource icon, String altText) { if (itemId != null) { super.setItemIcon(itemId, icon); if (icon == null) { itemIconAlts.remove(itemId); } else if (altText == null) { throw new IllegalArgumentException(NULL_ALT_EXCEPTION_MESSAGE); } else { itemIconAlts.put(itemId, altText); } markAsDirty();...
/** * Sets the icon for an item. * * @param itemId * the id of the item to be assigned an icon. * @param icon * the icon to use or null. * * @param altText * the alternative text for the icon */
Sets the icon for an item
setItemIcon
{ "repo_name": "Flamenco/vaadin", "path": "server/src/com/vaadin/ui/Tree.java", "license": "apache-2.0", "size": 59241 }
[ "com.vaadin.server.Resource" ]
import com.vaadin.server.Resource;
import com.vaadin.server.*;
[ "com.vaadin.server" ]
com.vaadin.server;
2,365,962
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getDocumentNo()); }
KeyNamePair function() { return new KeyNamePair(get_ID(), getDocumentNo()); }
/** Get Record ID/ColumnName @return ID/ColumnName pair */
Get Record ID/ColumnName
getKeyNamePair
{ "repo_name": "erpcya/adempierePOS", "path": "base/src/org/compiere/model/X_M_MatchInv.java", "license": "gpl-2.0", "size": 10599 }
[ "org.compiere.util.KeyNamePair" ]
import org.compiere.util.KeyNamePair;
import org.compiere.util.*;
[ "org.compiere.util" ]
org.compiere.util;
650,777
Value getUnknownArg(); // TODO: would simplify things if this could also be used with fixed number of args
Value getUnknownArg();
/** * Returns the value of an unknown argument. * Only to be called if the number of arguments is unknown. * Always includes 'undefined' (not 'absent'). */
Returns the value of an unknown argument. Only to be called if the number of arguments is unknown. Always includes 'undefined' (not 'absent')
getUnknownArg
{ "repo_name": "cs-au-dk/TAJS", "path": "src/dk/brics/tajs/analysis/FunctionCalls.java", "license": "apache-2.0", "size": 16332 }
[ "dk.brics.tajs.lattice.Value" ]
import dk.brics.tajs.lattice.Value;
import dk.brics.tajs.lattice.*;
[ "dk.brics.tajs" ]
dk.brics.tajs;
657,356
@Nonnull public static String getFormattedPercent (final double dValue, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); return NumberFormat.getPercentInstance (aDisplayLocale).format (dValue); }
static String function (final double dValue, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aDisplayLocale, STR); return NumberFormat.getPercentInstance (aDisplayLocale).format (dValue); }
/** * Format the given value as percentage. The "%" sign is automatically * appended according to the requested locale. The number of fractional digits * depend on the locale. * * @param dValue * The value to be used. E.g. "0.125" will result in something like * "12.5%" * @param aD...
Format the given value as percentage. The "%" sign is automatically appended according to the requested locale. The number of fractional digits depend on the locale
getFormattedPercent
{ "repo_name": "phax/ph-commons", "path": "ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java", "license": "apache-2.0", "size": 8255 }
[ "com.helger.commons.ValueEnforcer", "java.text.NumberFormat", "java.util.Locale", "javax.annotation.Nonnull" ]
import com.helger.commons.ValueEnforcer; import java.text.NumberFormat; import java.util.Locale; import javax.annotation.Nonnull;
import com.helger.commons.*; import java.text.*; import java.util.*; import javax.annotation.*;
[ "com.helger.commons", "java.text", "java.util", "javax.annotation" ]
com.helger.commons; java.text; java.util; javax.annotation;
789,929
void startMasterElement(int id, long contentPosition, long contentSize) throws ParserException;
void startMasterElement(int id, long contentPosition, long contentSize) throws ParserException;
/** * Called when the start of a master element is encountered. * <p> * Following events should be considered as taking place within this element until a matching call * to {@link #endMasterElement(int)} is made. * <p> * Note that it is possible for another master element of the same element ID to be ...
Called when the start of a master element is encountered. Following events should be considered as taking place within this element until a matching call to <code>#endMasterElement(int)</code> is made. Note that it is possible for another master element of the same element ID to be nested within itself
startMasterElement
{ "repo_name": "Puja-Mishra/Android_FreeChat", "path": "Telegram-master/TMessagesProj/src/main/java/org/telegram/messenger/exoplayer/extractor/webm/EbmlReaderOutput.java", "license": "gpl-2.0", "size": 4322 }
[ "org.telegram.messenger.exoplayer.ParserException" ]
import org.telegram.messenger.exoplayer.ParserException;
import org.telegram.messenger.exoplayer.*;
[ "org.telegram.messenger" ]
org.telegram.messenger;
1,533,324
@SuppressWarnings({"unchecked", "rawtypes"}) private static void setTestEnv(Map<String, String> newEnv) { try { Class<?> processEnvironmentClass = Class.forName("java.lang.ProcessEnvironment"); Field theEnvironmentField = processEnvironmentClass.getDeclaredField("theEnvironment"); theEnviron...
@SuppressWarnings({STR, STR}) static void function(Map<String, String> newEnv) { try { Class<?> processEnvironmentClass = Class.forName(STR); Field theEnvironmentField = processEnvironmentClass.getDeclaredField(STR); theEnvironmentField.setAccessible(true); Map<String, String> env = (Map<String, String>) theEnvironment...
/** * This is a dirty way to override the environment that is accessible to a test. * It only modifies the JVM's view of the environment, not the environment itself. * From: http://stackoverflow.com/questions/318239/how-do-i-set-environment-variables-from-java/496849 */
This is a dirty way to override the environment that is accessible to a test. It only modifies the JVM's view of the environment, not the environment itself. From: HREF
setTestEnv
{ "repo_name": "kevinsi4508/cloud-bigtable-client", "path": "bigtable-client-core-parent/bigtable-client-core/src/test/java/com/google/cloud/bigtable/config/TestBigtableOptions.java", "license": "apache-2.0", "size": 5994 }
[ "java.lang.reflect.Field", "java.util.Collections", "java.util.Map" ]
import java.lang.reflect.Field; import java.util.Collections; import java.util.Map;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,561,996
@ExceptionHandler({ConfigNotFoundException.class, TemplateNotFoundException.class}) @ResponseStatus(HttpStatus.NOT_FOUND) @ResponseBody public String handleNotFoundException(Exception e) { LOGGER.error("Error processing template", e); return e.getMessage(); }
@ExceptionHandler({ConfigNotFoundException.class, TemplateNotFoundException.class}) @ResponseStatus(HttpStatus.NOT_FOUND) String function(Exception e) { LOGGER.error(STR, e); return e.getMessage(); }
/** * Handles {@link org.motechproject.ivr.exception.ConfigNotFoundException} and {@link org.motechproject.ivr.exception.TemplateNotFoundException}. * Will return error 404 and the message from the exception as the response body. * @param e the exception to handle * @return the message coming from t...
Handles <code>org.motechproject.ivr.exception.ConfigNotFoundException</code> and <code>org.motechproject.ivr.exception.TemplateNotFoundException</code>. Will return error 404 and the message from the exception as the response body
handleNotFoundException
{ "repo_name": "koshalt/modules", "path": "ivr/src/main/java/org/motechproject/ivr/web/TemplateController.java", "license": "bsd-3-clause", "size": 10915 }
[ "org.motechproject.ivr.exception.ConfigNotFoundException", "org.motechproject.ivr.exception.TemplateNotFoundException", "org.springframework.http.HttpStatus", "org.springframework.web.bind.annotation.ExceptionHandler", "org.springframework.web.bind.annotation.ResponseStatus" ]
import org.motechproject.ivr.exception.ConfigNotFoundException; import org.motechproject.ivr.exception.TemplateNotFoundException; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseStatus;
import org.motechproject.ivr.exception.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "org.motechproject.ivr", "org.springframework.http", "org.springframework.web" ]
org.motechproject.ivr; org.springframework.http; org.springframework.web;
2,272,559
private void touch( int i, int j ) { Square[][] board = gameState.getBoard(); Point selected = gameState.getSelected(); boolean ItsGoingToBeOkay = true; GameState.Direction d = null; try { if ( board[ j ][ i ] instanceof Atom ) { gameState...
void function( int i, int j ) { Square[][] board = gameState.getBoard(); Point selected = gameState.getSelected(); boolean ItsGoingToBeOkay = true; GameState.Direction d = null; try { if ( board[ j ][ i ] instanceof Atom ) { gameState.setSelected( new Point( i, j ) ); } else if ( ( d = arrowSquares.get( new Point( i, j...
/** * Touches the board at the specified location. This method will trigger * selecting of atoms and clicking of arrows. * * @param i the X coordinate * @param j the Y coordinate */
Touches the board at the specified location. This method will trigger selecting of atoms and clicking of arrows
touch
{ "repo_name": "EricMountain/droid-atomix", "path": "src/edu/rit/poe/atomix/view/AtomicView.java", "license": "gpl-2.0", "size": 44796 }
[ "android.util.Log", "edu.rit.poe.atomix.game.GameController", "edu.rit.poe.atomix.game.GameException", "edu.rit.poe.atomix.game.GameState", "edu.rit.poe.atomix.levels.Atom", "edu.rit.poe.atomix.levels.Square", "edu.rit.poe.atomix.util.Point" ]
import android.util.Log; import edu.rit.poe.atomix.game.GameController; import edu.rit.poe.atomix.game.GameException; import edu.rit.poe.atomix.game.GameState; import edu.rit.poe.atomix.levels.Atom; import edu.rit.poe.atomix.levels.Square; import edu.rit.poe.atomix.util.Point;
import android.util.*; import edu.rit.poe.atomix.game.*; import edu.rit.poe.atomix.levels.*; import edu.rit.poe.atomix.util.*;
[ "android.util", "edu.rit.poe" ]
android.util; edu.rit.poe;
418,213
public void addUserAttribute(final Reference providerReference, final TypeMappings inMappings, final TypeMappings outMappings) { portType = PortType_type.PT_USER; this.providerReference = providerReference; this.providerReference.setFullNameParent(new BridgingNamedNode(this, ".<provider_ref>")); this.provide...
void function(final Reference providerReference, final TypeMappings inMappings, final TypeMappings outMappings) { portType = PortType_type.PT_USER; this.providerReference = providerReference; this.providerReference.setFullNameParent(new BridgingNamedNode(this, STR)); this.providerReference.setMyScope(myType.getMyScope(...
/** * Marks that this port type body belongs to a user port. * Also sets all mappings using the provided data. * * @param providerReference the reference pointing to the provider port * @param inMappings the incoming mappings. * @param outMappings the outgoing mappings. * */
Marks that this port type body belongs to a user port. Also sets all mappings using the provided data
addUserAttribute
{ "repo_name": "eroslevi/titan.EclipsePlug-ins", "path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/types/PortTypeBody.java", "license": "epl-1.0", "size": 64191 }
[ "org.eclipse.titan.designer.AST" ]
import org.eclipse.titan.designer.AST;
import org.eclipse.titan.designer.*;
[ "org.eclipse.titan" ]
org.eclipse.titan;
2,822,037
public Configurable withDefaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw logger.logExceptionAsError(new IllegalAr...
Configurable function(Duration defaultPollInterval) { this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, STR); if (this.defaultPollInterval.isNegative()) { throw logger.logExceptionAsError(new IllegalArgumentException(STR)); } return this; }
/** * Sets the default poll interval, used when service does not provide "Retry-After" header. * * @param defaultPollInterval the default poll interval. * @return the configurable object itself. */
Sets the default poll interval, used when service does not provide "Retry-After" header
withDefaultPollInterval
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/HybridKubernetesManager.java", "license": "mit", "size": 10238 }
[ "java.time.Duration", "java.util.Objects" ]
import java.time.Duration; import java.util.Objects;
import java.time.*; import java.util.*;
[ "java.time", "java.util" ]
java.time; java.util;
45,965
public void abort() throws IOException { completeEdit(this, false); } private class FaultHidingOutputStream extends FilterOutputStream { private FaultHidingOutputStream(OutputStream out) { super(out); }
void function() throws IOException { completeEdit(this, false); } private class FaultHidingOutputStream extends FilterOutputStream { private FaultHidingOutputStream(OutputStream out) { super(out); }
/** * Aborts this edit. This releases the edit lock so another edit may be * started on the same key. */
Aborts this edit. This releases the edit lock so another edit may be started on the same key
abort
{ "repo_name": "Jav-Xu/PicsArt", "path": "app/src/main/java/com/xuzhihui/picsart/cache/DiskLruCache.java", "license": "apache-2.0", "size": 33485 }
[ "java.io.FilterOutputStream", "java.io.IOException", "java.io.OutputStream" ]
import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
903,982
public AdminLevelDTO getAdminLevelById(int levelId) { for (final AdminLevelDTO level : getAdminLevels()) { if (level.getId().equals(levelId)) { return level; } } return null; }
AdminLevelDTO function(int levelId) { for (final AdminLevelDTO level : getAdminLevels()) { if (level.getId().equals(levelId)) { return level; } } return null; }
/** * Finds an AdminEntity by id * * @param levelId * the id of the AdminEntity to return * @return the AdminEntity with corresponding id or null if no such AdminEntity is found in the list */
Finds an AdminEntity by id
getAdminLevelById
{ "repo_name": "Raphcal/sigmah", "path": "src/main/java/org/sigmah/shared/dto/country/CountryDTO.java", "license": "gpl-3.0", "size": 7011 }
[ "org.sigmah.shared.dto.AdminLevelDTO" ]
import org.sigmah.shared.dto.AdminLevelDTO;
import org.sigmah.shared.dto.*;
[ "org.sigmah.shared" ]
org.sigmah.shared;
1,158,563
void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception;
void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception;
/** * Process a notification of a dispatch - used by a Slave Broker * @param messageDispatchNotification * @throws Exception TODO */
Process a notification of a dispatch - used by a Slave Broker
processDispatchNotification
{ "repo_name": "chirino/activemq", "path": "activemq-broker/src/main/java/org/apache/activemq/broker/region/Region.java", "license": "apache-2.0", "size": 6064 }
[ "org.apache.activemq.command.MessageDispatchNotification" ]
import org.apache.activemq.command.MessageDispatchNotification;
import org.apache.activemq.command.*;
[ "org.apache.activemq" ]
org.apache.activemq;
1,149,328
public void testBuildSortFieldOrder() throws IOException { SearchExecutionContext searchExecutionContext = createMockSearchExecutionContext(); FieldSortBuilder fieldSortBuilder = new FieldSortBuilder("value"); SortField sortField = fieldSortBuilder.build(searchExecutionContext).field; ...
void function() throws IOException { SearchExecutionContext searchExecutionContext = createMockSearchExecutionContext(); FieldSortBuilder fieldSortBuilder = new FieldSortBuilder("value"); SortField sortField = fieldSortBuilder.build(searchExecutionContext).field; SortedNumericSortField expectedSortField = new SortedNum...
/** * Test that the sort builder order gets transferred correctly to the SortField */
Test that the sort builder order gets transferred correctly to the SortField
testBuildSortFieldOrder
{ "repo_name": "jmluy/elasticsearch", "path": "server/src/test/java/org/elasticsearch/search/sort/FieldSortBuilderTests.java", "license": "apache-2.0", "size": 35456 }
[ "java.io.IOException", "org.apache.lucene.search.SortField", "org.apache.lucene.search.SortedNumericSelector", "org.apache.lucene.search.SortedNumericSortField", "org.elasticsearch.index.query.SearchExecutionContext" ]
import java.io.IOException; import org.apache.lucene.search.SortField; import org.apache.lucene.search.SortedNumericSelector; import org.apache.lucene.search.SortedNumericSortField; import org.elasticsearch.index.query.SearchExecutionContext;
import java.io.*; import org.apache.lucene.search.*; import org.elasticsearch.index.query.*;
[ "java.io", "org.apache.lucene", "org.elasticsearch.index" ]
java.io; org.apache.lucene; org.elasticsearch.index;
892,339
private static Object read(final RedisInputStream is) throws IOException { return process(is); }
static Object function(final RedisInputStream is) throws IOException { return process(is); }
/** * Read a multi-bulk or bulk reply from the given input stream. * * @param is * @return * @throws IOException */
Read a multi-bulk or bulk reply from the given input stream
read
{ "repo_name": "sideshowcecil/myx-monitor", "path": "pubsub/src/main/java/at/ac/tuwien/dsg/pubsub/network/socket/SocketByteMessageProtocol.java", "license": "mit", "size": 4486 }
[ "java.io.IOException", "redis.clients.util.RedisInputStream" ]
import java.io.IOException; import redis.clients.util.RedisInputStream;
import java.io.*; import redis.clients.util.*;
[ "java.io", "redis.clients.util" ]
java.io; redis.clients.util;
2,167,015
@Idempotent void removeDefaultAcl(String src) throws IOException;
void removeDefaultAcl(String src) throws IOException;
/** * Removes all default ACL entries from files and directories. */
Removes all default ACL entries from files and directories
removeDefaultAcl
{ "repo_name": "IBYoung/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 57388 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,982,499
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); try (PrintWriter out = response.getWriter()) { out.println("<!DOCTYPE html>"); ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); try (PrintWriter out = response.getWriter()) { out.println(STR); out.println(STR); out.println(STR); out.println(STR); out.println(STR); out.println(STR); out.println(STR + reques...
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "benico/granjaArduino", "path": "granjaArduino/src/java/controllers/Login.java", "license": "cc0-1.0", "size": 3718 }
[ "java.io.IOException", "java.io.PrintWriter", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,731,317
private Map<DTNHost, Double> getDeliveryPreds() { ageDeliveryPreds(); // make sure the aging is done return this.preds; }
Map<DTNHost, Double> function() { ageDeliveryPreds(); return this.preds; }
/** * Returns a map of this router's delivery predictions * @return a map of this router's delivery predictions */
Returns a map of this router's delivery predictions
getDeliveryPreds
{ "repo_name": "akeranen/the-one", "path": "src/routing/ProphetV2Router.java", "license": "gpl-3.0", "size": 10207 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,907,439
public void setDateTimeFormat(String pattern) { Asserts.notNull(pattern, "The format pattern cannot be null"); this.setPrinter(LocalDateTime.class, Printer.ofLocalDateTime(pattern).withNullValue(nullValue)); this.setParser(LocalDateTime.class, Parser.ofLocalDateTime(pattern).withNullChecker(...
void function(String pattern) { Asserts.notNull(pattern, STR); this.setPrinter(LocalDateTime.class, Printer.ofLocalDateTime(pattern).withNullValue(nullValue)); this.setParser(LocalDateTime.class, Parser.ofLocalDateTime(pattern).withNullChecker(nullCheck)); }
/** * Sets a Parser/Printer pair for a LocalDateTime using the pattern specified * This register a Printer/Parser pair for the LocalDateTime class key * @param pattern the local date format pattern */
Sets a Parser/Printer pair for a LocalDateTime using the pattern specified This register a Printer/Parser pair for the LocalDateTime class key
setDateTimeFormat
{ "repo_name": "zavtech/morpheus-core", "path": "src/main/java/com/zavtech/morpheus/util/text/Formats.java", "license": "apache-2.0", "size": 23565 }
[ "com.zavtech.morpheus.util.Asserts", "com.zavtech.morpheus.util.text.parser.Parser", "com.zavtech.morpheus.util.text.printer.Printer", "java.time.LocalDateTime" ]
import com.zavtech.morpheus.util.Asserts; import com.zavtech.morpheus.util.text.parser.Parser; import com.zavtech.morpheus.util.text.printer.Printer; import java.time.LocalDateTime;
import com.zavtech.morpheus.util.*; import com.zavtech.morpheus.util.text.parser.*; import com.zavtech.morpheus.util.text.printer.*; import java.time.*;
[ "com.zavtech.morpheus", "java.time" ]
com.zavtech.morpheus; java.time;
2,596,628
public static Future<?> setFeedLastUpdateFailed(final long feedId, final boolean lastUpdateFailed) { return dbExec.submit(() -> { PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); adapter.setFeedLastUpda...
static Future<?> function(final long feedId, final boolean lastUpdateFailed) { return dbExec.submit(() -> { PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); adapter.setFeedLastUpdateFailed(feedId, lastUpdateFailed); adapter.close(); }); }
/** * Saves if a feed's last update failed * * @param lastUpdateFailed true if last update failed */
Saves if a feed's last update failed
setFeedLastUpdateFailed
{ "repo_name": "mfietz/AntennaPod", "path": "core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java", "license": "mit", "size": 43601 }
[ "java.util.concurrent.Future" ]
import java.util.concurrent.Future;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,717,101
public Photo retrieve(int photoId) throws DatabaseDownException, SQLException { logger.debug("PhotoModel.retrieve | photoId " + photoId); Photo photo = dao.retrieve(photoId); return photo; }
Photo function(int photoId) throws DatabaseDownException, SQLException { logger.debug(STR + photoId); Photo photo = dao.retrieve(photoId); return photo; }
/** * This method retrieves a photo given by the photoId * * @param photoId The id of the photo to be retrieved * * @throws DatabaseDownException If the database is down * @throws SQLException If some SQL Exception occurs */
This method retrieves a photo given by the photoId
retrieve
{ "repo_name": "BackupTheBerlios/arara-svn", "path": "core/tags/arara-1.0/src/main/java/net/indrix/arara/model/PhotoModel.java", "license": "gpl-2.0", "size": 27864 }
[ "java.sql.SQLException", "net.indrix.arara.dao.DatabaseDownException", "net.indrix.arara.vo.Photo" ]
import java.sql.SQLException; import net.indrix.arara.dao.DatabaseDownException; import net.indrix.arara.vo.Photo;
import java.sql.*; import net.indrix.arara.dao.*; import net.indrix.arara.vo.*;
[ "java.sql", "net.indrix.arara" ]
java.sql; net.indrix.arara;
3,246
public PDAction getAction() { COSDictionary action = (COSDictionary) this.getDictionary().getDictionaryObject( COSName.A ); return PDActionFactory.createAction( action ); }
PDAction function() { COSDictionary action = (COSDictionary) this.getDictionary().getDictionaryObject( COSName.A ); return PDActionFactory.createAction( action ); }
/** * Get the action to be performed when this annotation is to be activated. * * @return The action to be performed when this annotation is activated. */
Get the action to be performed when this annotation is to be activated
getAction
{ "repo_name": "kzganesan/PdfBox-Android", "path": "library/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotationWidget.java", "license": "apache-2.0", "size": 7328 }
[ "org.apache.pdfbox.cos.COSDictionary", "org.apache.pdfbox.cos.COSName", "org.apache.pdfbox.pdmodel.interactive.action.PDAction", "org.apache.pdfbox.pdmodel.interactive.action.PDActionFactory" ]
import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.pdmodel.interactive.action.PDAction; import org.apache.pdfbox.pdmodel.interactive.action.PDActionFactory;
import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.interactive.action.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,372,405
public Observable<ServiceResponse<SecurityRuleInner>> getWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, String defaultSecurityRuleName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot b...
Observable<ServiceResponse<SecurityRuleInner>> function(String resourceGroupName, String networkSecurityGroupName, String defaultSecurityRuleName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (networkSecurityGroupName == null) { throw new IllegalArgumentException(STR); } if (defaultS...
/** * Get the specified default network security rule. * * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. * @param defaultSecurityRuleName The name of the default security rule. * @throws IllegalArgumentExc...
Get the specified default network security rule
getWithServiceResponseAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/DefaultSecurityRulesInner.java", "license": "mit", "size": 22495 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
408,644
public static String newStringUtf8(final byte[] bytes) { return newString(bytes, B2CConverter.UTF_8); }
static String function(final byte[] bytes) { return newString(bytes, B2CConverter.UTF_8); }
/** * Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-8 charset. * * @param bytes * The bytes to be decoded into characters * @return A new <code>String</code> decoded from the specified array of bytes using the UTF-8 charset, * ...
Constructs a new <code>String</code> by decoding the specified array of bytes using the UTF-8 charset
newStringUtf8
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-7.0.63-sourcecode/target/classes/org/apache/tomcat/util/codec/binary/StringUtils.java", "license": "apache-2.0", "size": 3616 }
[ "org.apache.tomcat.util.buf.B2CConverter" ]
import org.apache.tomcat.util.buf.B2CConverter;
import org.apache.tomcat.util.buf.*;
[ "org.apache.tomcat" ]
org.apache.tomcat;
1,134,233
public static final int TOP_LEFT = 1; public static final int TOP_RIGHT = 2; public static final int BOTTOM_LEFT = 3; public static final int BOTTOM_RIGHT = 4; protected static final int LAST_CORNER_KEY = 5; @SuppressWarnings("unchecked") private static Map<Image, Map<Image, Image>>[] m_decoratedImag...
static final int TOP_LEFT = 1; public static final int TOP_RIGHT = 2; public static final int BOTTOM_LEFT = 3; public static final int BOTTOM_RIGHT = 4; protected static final int LAST_CORNER_KEY = 5; @SuppressWarnings(STR) private static Map<Image, Map<Image, Image>>[] m_decoratedImageMap = new Map[LAST_CORNER_KEY]; p...
/** * Returns an {@link Image} composed of a base image decorated by another image. * * @param baseImage * the base {@link Image} that should be decorated * @param decorator * the {@link Image} to decorate the base image * @return {@link Image} The resulting decorated image */
Returns an <code>Image</code> composed of a base image decorated by another image
decorateImage
{ "repo_name": "7xMatthx2/E4Training", "path": "com.sii.rental.ui/src/org/eclipse/wb/swt/SWTResourceManager.java", "license": "epl-1.0", "size": 14556 }
[ "java.util.Map", "org.eclipse.swt.graphics.Image" ]
import java.util.Map; import org.eclipse.swt.graphics.Image;
import java.util.*; import org.eclipse.swt.graphics.*;
[ "java.util", "org.eclipse.swt" ]
java.util; org.eclipse.swt;
2,692,243
public static void setUp(String level) { if (forceJuli || log4j == null) { Logger.juli.setLevel(toJuliLevel(level)); } else { Logger.log4j.setLevel(org.apache.log4j.Level.toLevel(level)); if (redirectJuli) { java.util.logging.Logger rootLogger = ja...
static void function(String level) { if (forceJuli log4j == null) { Logger.juli.setLevel(toJuliLevel(level)); } else { Logger.log4j.setLevel(org.apache.log4j.Level.toLevel(level)); if (redirectJuli) { java.util.logging.Logger rootLogger = java.util.logging.Logger.getLogger(""); for (Handler handler : rootLogger.getHand...
/** * Force logger to a new level. * @param level TRACE,DEBUG,INFO,WARN,ERROR,FATAL */
Force logger to a new level
setUp
{ "repo_name": "pwd/minidev", "path": "src/main/java/com/jedou/framework/mini/log/Logger.java", "license": "apache-2.0", "size": 24877 }
[ "java.util.logging.Handler", "java.util.logging.Level" ]
import java.util.logging.Handler; import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
716,289