method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static void lectorXML(String fichero) throws IOException { try { @SuppressWarnings("resource") BufferedReader reader = new BufferedReader(new FileReader(fichero)); String line = null; StringBuilder stringBuilder = new StringBuilder(); while ((line = reader.readLine()) != null) { ...
static void function(String fichero) throws IOException { try { @SuppressWarnings(STR) BufferedReader reader = new BufferedReader(new FileReader(fichero)); String line = null; StringBuilder stringBuilder = new StringBuilder(); while ((line = reader.readLine()) != null) { stringBuilder.append(line); } stringBuilder.dele...
/** * Metodo que lee un fichero y quita los dos primeras etiquetas * * @param fichero * @throws IOException */
Metodo que lee un fichero y quita los dos primeras etiquetas
lectorXML
{ "repo_name": "Arquisoft/ObservaTerra42", "path": "app/utils/XMLParser.java", "license": "unlicense", "size": 5498 }
[ "java.io.BufferedReader", "java.io.FileReader", "java.io.IOException" ]
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,318,520
private Tuple<BlobStoreIndexShardSnapshots, String> buildBlobStoreIndexShardSnapshots(Set<String> blobs, BlobContainer shardContainer, @...
Tuple<BlobStoreIndexShardSnapshots, String> function(Set<String> blobs, BlobContainer shardContainer, @Nullable String generation) throws IOException { assert ShardGenerations.fixShardGeneration(generation) == generation : STR + generation + "]"; if (generation != null) { if (generation.equals(ShardGenerations.NEW_SHAR...
/** * Loads all available snapshots in the repository using the given {@code generation} or falling back to trying to determine it from * the given list of blobs in the shard container. * * @param blobs list of blobs in repository * @param generation shard generation or {@code null} in cas...
Loads all available snapshots in the repository using the given generation or falling back to trying to determine it from the given list of blobs in the shard container
buildBlobStoreIndexShardSnapshots
{ "repo_name": "uschindler/elasticsearch", "path": "server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java", "license": "apache-2.0", "size": 130930 }
[ "java.io.IOException", "java.util.Set", "org.elasticsearch.common.Nullable", "org.elasticsearch.common.blobstore.BlobContainer", "org.elasticsearch.common.collect.Tuple", "org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshots", "org.elasticsearch.repositories.ShardGenerations" ]
import java.io.IOException; import java.util.Set; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.blobstore.BlobContainer; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshots; import org.elasticsearch.repositories.Shard...
import java.io.*; import java.util.*; import org.elasticsearch.common.*; import org.elasticsearch.common.blobstore.*; import org.elasticsearch.common.collect.*; import org.elasticsearch.index.snapshots.blobstore.*; import org.elasticsearch.repositories.*;
[ "java.io", "java.util", "org.elasticsearch.common", "org.elasticsearch.index", "org.elasticsearch.repositories" ]
java.io; java.util; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.repositories;
162,257
public static JmsLiveDataClient getJmsClient(final StandardLiveDataServer server, final int threads) { final ExecutorService executor = executor(threads); final FudgeRequestSender subscriptionRequestSender = getSubscriptionRequestSender(server, executor); final FudgeRequestSender entitlementRequestSender ...
static JmsLiveDataClient function(final StandardLiveDataServer server, final int threads) { final ExecutorService executor = executor(threads); final FudgeRequestSender subscriptionRequestSender = getSubscriptionRequestSender(server, executor); final FudgeRequestSender entitlementRequestSender = getEntitlementRequestSe...
/** * Creates a test client connected to the server. * * @param server the test server, not null * @param threads the number of communication threads, or 0 for direct/inline calls to the server * @return the client */
Creates a test client connected to the server
getJmsClient
{ "repo_name": "McLeodMoores/starling", "path": "projects/live-data/src/main/java/com/opengamma/livedata/test/LiveDataClientTestUtils.java", "license": "apache-2.0", "size": 5996 }
[ "com.opengamma.livedata.client.JmsLiveDataClient", "com.opengamma.livedata.server.StandardLiveDataServer", "com.opengamma.livedata.server.distribution.JmsSenderFactory", "com.opengamma.transport.FudgeRequestSender", "com.opengamma.util.jms.JmsConnector", "com.opengamma.util.test.ActiveMQTestUtils", "jav...
import com.opengamma.livedata.client.JmsLiveDataClient; import com.opengamma.livedata.server.StandardLiveDataServer; import com.opengamma.livedata.server.distribution.JmsSenderFactory; import com.opengamma.transport.FudgeRequestSender; import com.opengamma.util.jms.JmsConnector; import com.opengamma.util.test.ActiveMQT...
import com.opengamma.livedata.client.*; import com.opengamma.livedata.server.*; import com.opengamma.livedata.server.distribution.*; import com.opengamma.transport.*; import com.opengamma.util.jms.*; import com.opengamma.util.test.*; import java.util.concurrent.*;
[ "com.opengamma.livedata", "com.opengamma.transport", "com.opengamma.util", "java.util" ]
com.opengamma.livedata; com.opengamma.transport; com.opengamma.util; java.util;
1,428,219
User owner = BotUtils.GATEWAY.getUserById(OWNER_USER).block(); if (owner == null) { return; } PrivateChannel ownerPrivateChannel = owner.getPrivateChannel().block(); if (ownerPrivateChannel == null) { return; } ownerPrivateChannel.createMessage(messageSpec -> messageSpec.se...
User owner = BotUtils.GATEWAY.getUserById(OWNER_USER).block(); if (owner == null) { return; } PrivateChannel ownerPrivateChannel = owner.getPrivateChannel().block(); if (ownerPrivateChannel == null) { return; } ownerPrivateChannel.createMessage(messageSpec -> messageSpec.setEmbed(embedSpec -> embedSpec.setTitle(title)....
/** * Sends a message to the Owner of the bot. * * @param title String, title of the message to send. * @param description String, description of the message to send. */
Sends a message to the Owner of the bot
sendMessage
{ "repo_name": "CorruptComputer/PolizziaHut", "path": "src/main/java/xyz/gupton/nickolas/beepsky/owner/Owner.java", "license": "agpl-3.0", "size": 969 }
[ "xyz.gupton.nickolas.beepsky.BotUtils" ]
import xyz.gupton.nickolas.beepsky.BotUtils;
import xyz.gupton.nickolas.beepsky.*;
[ "xyz.gupton.nickolas" ]
xyz.gupton.nickolas;
1,670,782
private static boolean matches(String matchHeader, String toMatch) { String[] matchValues = matchHeader.split("\\s*,\\s*"); Arrays.sort(matchValues); return Arrays.binarySearch(matchValues, toMatch) > -1 || Arrays.binarySearch(matchValues, "*") > -1; }
static boolean function(String matchHeader, String toMatch) { String[] matchValues = matchHeader.split(STR); Arrays.sort(matchValues); return Arrays.binarySearch(matchValues, toMatch) > -1 Arrays.binarySearch(matchValues, "*") > -1; }
/** * Returns true if the given match header matches the given value. * * @param matchHeader The match header. * @param toMatch The value to be matched. * @return True if the given match header matches the given value. */
Returns true if the given match header matches the given value
matches
{ "repo_name": "namratanehete/openmrs-module-owa", "path": "omod/src/main/java/org/openmrs/module/owa/servlet/FileServlet.java", "license": "mpl-2.0", "size": 18121 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
990,777
public void setTypeHandler(TypeHandler typeHandler) { this.typeHandler = typeHandler; }
void function(TypeHandler typeHandler) { this.typeHandler = typeHandler; }
/** * Setter for the type handler for the column. * * @param typeHandler * - the type handler */
Setter for the type handler for the column
setTypeHandler
{ "repo_name": "hazendaz/mybatis-2", "path": "src/main/java/com/ibatis/sqlmap/engine/mapping/result/ResultMapping.java", "license": "apache-2.0", "size": 6077 }
[ "com.ibatis.sqlmap.engine.type.TypeHandler" ]
import com.ibatis.sqlmap.engine.type.TypeHandler;
import com.ibatis.sqlmap.engine.type.*;
[ "com.ibatis.sqlmap" ]
com.ibatis.sqlmap;
1,200,471
@Override public Enumeration<Option> listOptions() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option("\tFull name of the clusterer analyzed.\n" + "\teg: weka.clusterers.SimpleKMeans\n" + "\t(default weka.clusterers.SimpleKMeans)", "W", 1, "-W")); result.addAll(Co...
Enumeration<Option> function() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option(STR + STR + STR, "W", 1, "-W")); result.addAll(Collections.list(super.listOptions())); if ((m_Clusterer != null) && (m_Clusterer instanceof OptionHandler)) { result.addElement(new Option(STRSTR\nOptions specific ...
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */
Returns an enumeration describing the available options
listOptions
{ "repo_name": "ahmedvc/umple", "path": "Umplificator/UmplifiedProjects/weka-umplified-0/src/main/java/weka/clusterers/CheckClusterer.java", "license": "mit", "size": 43260 }
[ "java.util.Collections", "java.util.Enumeration", "java.util.Vector" ]
import java.util.Collections; import java.util.Enumeration; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,535,234
void setFunctionName(String name, Node fnNode);
void setFunctionName(String name, Node fnNode);
/** * Sets the name of an anonymous function. * @param fnNode The function node to update * @param name The name */
Sets the name of an anonymous function
setFunctionName
{ "repo_name": "LorenzoDV/closure-compiler", "path": "src/com/google/javascript/jscomp/AnonymousFunctionNamingCallback.java", "license": "apache-2.0", "size": 5576 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,665,960
@Test public void testMoveMessageToFQQN() throws Exception { SimpleString address = new SimpleString("ErrorQueue"); SimpleString queue = new SimpleString("ErrorQueue"); SimpleString otherAddress = new SimpleString("parent.addr.1"); SimpleString otherQueue1 = new SimpleString("child.queue.1...
void function() throws Exception { SimpleString address = new SimpleString(STR); SimpleString queue = new SimpleString(STR); SimpleString otherAddress = new SimpleString(STR); SimpleString otherQueue1 = new SimpleString(STR); SimpleString otherQueue2 = new SimpleString(STR); session.createQueue(new QueueConfiguration(q...
/** * Moving message from another address to a single "child" queue of a multicast address * * <address name="ErrorQueue"> * <anycast> * <queue name="ErrorQueue" /> * </anycast> * </address> * <address name="parent.addr.1"> ...
Moving message from another address to a single "child" queue of a multicast address
testMoveMessageToFQQN
{ "repo_name": "kjniemi/activemq-artemis", "path": "tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java", "license": "apache-2.0", "size": 145540 }
[ "java.util.Map", "org.apache.activemq.artemis.api.core.QueueConfiguration", "org.apache.activemq.artemis.api.core.RoutingType", "org.apache.activemq.artemis.api.core.SimpleString", "org.apache.activemq.artemis.api.core.client.ClientProducer", "org.apache.activemq.artemis.api.core.management.QueueControl",...
import java.util.Map; import org.apache.activemq.artemis.api.core.QueueConfiguration; import org.apache.activemq.artemis.api.core.RoutingType; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.api.core.client.ClientProducer; import org.apache.activemq.artemis.api.core.manageme...
import java.util.*; import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.api.core.client.*; import org.apache.activemq.artemis.api.core.management.*; import org.junit.*;
[ "java.util", "org.apache.activemq", "org.junit" ]
java.util; org.apache.activemq; org.junit;
2,314,684
public void createEmptyDocument( String version ) { Document doc = XMLTools.create(); Element root = doc.createElementNS( version.equals( "2.0.2" ) ? CSW202NS.toASCIIString() : CSWNS.toASCIIString(), ...
void function( String version ) { Document doc = XMLTools.create(); Element root = doc.createElementNS( version.equals( "2.0.2" ) ? CSW202NS.toASCIIString() : CSWNS.toASCIIString(), STR ); setRootElement( root ); }
/** * creates an empty GetRecordByIdResponse document * * @param version * the desired version of the response document * */
creates an empty GetRecordByIdResponse document
createEmptyDocument
{ "repo_name": "lat-lon/deegree2-base", "path": "deegree2-core/src/main/java/org/deegree/ogcwebservices/csw/discovery/GetRecordByIdResultDocument.java", "license": "lgpl-2.1", "size": 3445 }
[ "org.deegree.framework.xml.XMLTools", "org.deegree.ogcbase.CommonNamespaces", "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.deegree.framework.xml.XMLTools; import org.deegree.ogcbase.CommonNamespaces; import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.deegree.framework.xml.*; import org.deegree.ogcbase.*; import org.w3c.dom.*;
[ "org.deegree.framework", "org.deegree.ogcbase", "org.w3c.dom" ]
org.deegree.framework; org.deegree.ogcbase; org.w3c.dom;
2,263,853
protected void paintButtonPressed(Graphics g, AbstractButton b) { if (b.isContentAreaFilled() && b.isOpaque()) { Color saved = g.getColor(); Rectangle bounds = SwingUtilities.getLocalBounds(b); g.setColor(selectColor); g.fillRect(bounds.x, bounds.y, bounds.width, bounds.hei...
void function(Graphics g, AbstractButton b) { if (b.isContentAreaFilled() && b.isOpaque()) { Color saved = g.getColor(); Rectangle bounds = SwingUtilities.getLocalBounds(b); g.setColor(selectColor); g.fillRect(bounds.x, bounds.y, bounds.width, bounds.height); g.setColor(saved); } }
/** * Paints the button background when it is pressed/selected. * * @param g the graphics device. * @param b the button. */
Paints the button background when it is pressed/selected
paintButtonPressed
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/plaf/metal/MetalToggleButtonUI.java", "license": "gpl-2.0", "size": 7035 }
[ "java.awt.Color", "java.awt.Graphics", "java.awt.Rectangle", "javax.swing.AbstractButton", "javax.swing.SwingUtilities" ]
import java.awt.Color; import java.awt.Graphics; import java.awt.Rectangle; import javax.swing.AbstractButton; import javax.swing.SwingUtilities;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,208,807
protected DatagramSocket getAuthSocket() throws SocketException { if (authSocket == null) { if (getListenAddress() == null) authSocket = new DatagramSocket(getAuthPort()); else authSocket = new DatagramSocket(getAuthPort(), getListenAddress()); authSocket.setSoTimeout(getSocketTimeout()); } re...
DatagramSocket function() throws SocketException { if (authSocket == null) { if (getListenAddress() == null) authSocket = new DatagramSocket(getAuthPort()); else authSocket = new DatagramSocket(getAuthPort(), getListenAddress()); authSocket.setSoTimeout(getSocketTimeout()); } return authSocket; }
/** * Returns a socket bound to the auth port. * * @return socket * @throws SocketException */
Returns a socket bound to the auth port
getAuthSocket
{ "repo_name": "talkincode/ToughRADIUS", "path": "src/main/java/org/tinyradius/util/RadiusServer.java", "license": "lgpl-3.0", "size": 19211 }
[ "java.net.DatagramSocket", "java.net.SocketException" ]
import java.net.DatagramSocket; import java.net.SocketException;
import java.net.*;
[ "java.net" ]
java.net;
1,233,348
static Class<?> comparableClassFor(Object x) { if (x instanceof Comparable) { Class<?> c; Type[] ts, as; Type t; ParameterizedType p; if ((c = x.getClass()) == String.class) // bypass checks return c; if ((ts = c.getGenericInterfaces()) != null) { ...
static Class<?> comparableClassFor(Object x) { if (x instanceof Comparable) { Class<?> c; Type[] ts, as; Type t; ParameterizedType p; if ((c = x.getClass()) == String.class) return c; if ((ts = c.getGenericInterfaces()) != null) { for (int i = 0; i < ts.length; ++i) { if (((t = ts[i]) instanceof ParameterizedType) && (...
/** * Returns x's Class if it is of the form "class C implements * Comparable<C>", else null. */
Returns x's Class if it is of the form "class C implements Comparable", else null
comparableClassFor
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/java/util/concurrent/ConcurrentHashMap.java", "license": "apache-2.0", "size": 262622 }
[ "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type" ]
import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
674,639
protected static <Req, Resp> Resp execute(Req request, SyncMethod<Req, Resp> syncMethod, AsyncMethod<Req, Resp> asyncMethod, RequestOptions options) throws IOException { if (async == false) { return syncMethod.execute(request, options); } else { ...
static <Req, Resp> Resp function(Req request, SyncMethod<Req, Resp> syncMethod, AsyncMethod<Req, Resp> asyncMethod, RequestOptions options) throws IOException { if (async == false) { return syncMethod.execute(request, options); } else { PlainActionFuture<Resp> future = PlainActionFuture.newFuture(); asyncMethod.execute...
/** * Executes the provided request using either the sync method or its async variant, both provided as functions */
Executes the provided request using either the sync method or its async variant, both provided as functions
execute
{ "repo_name": "gingerwizard/elasticsearch", "path": "client/rest-high-level/src/test/java/org/elasticsearch/client/ESRestHighLevelClientTestCase.java", "license": "apache-2.0", "size": 16203 }
[ "java.io.IOException", "org.elasticsearch.action.support.PlainActionFuture" ]
import java.io.IOException; import org.elasticsearch.action.support.PlainActionFuture;
import java.io.*; import org.elasticsearch.action.support.*;
[ "java.io", "org.elasticsearch.action" ]
java.io; org.elasticsearch.action;
2,632,750
private ArrayList<Put> generatePuts(SortedMap<String, TableInfo> tablesInfo) throws IOException { ArrayList<Put> puts = new ArrayList<Put>(); boolean hasProblems = false; for (Entry<String, TableInfo> e : tablesInfo.entrySet()) { String name = e.getKey(); // skip "-ROOT-" and ".META." i...
ArrayList<Put> function(SortedMap<String, TableInfo> tablesInfo) throws IOException { ArrayList<Put> puts = new ArrayList<Put>(); boolean hasProblems = false; for (Entry<String, TableInfo> e : tablesInfo.entrySet()) { String name = e.getKey(); if (Bytes.compareTo(Bytes.toBytes(name), HConstants.ROOT_TABLE_NAME) == 0 By...
/** * Generate set of puts to add to new meta. This expects the tables to be * clean with no overlaps or holes. If there are any problems it returns null. * * @return An array list of puts to do in bulk, null if tables have problems */
Generate set of puts to add to new meta. This expects the tables to be clean with no overlaps or holes. If there are any problems it returns null
generatePuts
{ "repo_name": "infospace/hbase", "path": "src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java", "license": "apache-2.0", "size": 150360 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Collection", "java.util.Map", "java.util.SortedMap", "org.apache.hadoop.hbase.HConstants", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.client.Put" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Map; import java.util.SortedMap; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.client.Put;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,058,827
void deleteAllAssignmentsForUser(String userName) throws SynchronizationException;
void deleteAllAssignmentsForUser(String userName) throws SynchronizationException;
/** * Deletes all assignments for a specific user. * * @param userName name of the user where all assignments should be deleted. */
Deletes all assignments for a specific user
deleteAllAssignmentsForUser
{ "repo_name": "openengsb/openengsb", "path": "components/usersync/src/main/java/org/openengsb/core/usersync/DataSynchronizer.java", "license": "apache-2.0", "size": 3388 }
[ "org.openengsb.core.usersync.exception.SynchronizationException" ]
import org.openengsb.core.usersync.exception.SynchronizationException;
import org.openengsb.core.usersync.exception.*;
[ "org.openengsb.core" ]
org.openengsb.core;
2,254,988
DataInputStream unwrapInputStream(InputStream is) throws IOException { if (imageCodec != null) { return new DataInputStream(imageCodec.createInputStream(is)); } else { return new DataInputStream(new BufferedInputStream(is)); } }
DataInputStream unwrapInputStream(InputStream is) throws IOException { if (imageCodec != null) { return new DataInputStream(imageCodec.createInputStream(is)); } else { return new DataInputStream(new BufferedInputStream(is)); } }
/** * Unwrap a compressed input stream by wrapping it with a decompressor based * on this codec. If this instance represents no compression, simply adds * buffering to the input stream. * @return a buffered stream that provides uncompressed data * @throws IOException If the decompressor cannot be instant...
Unwrap a compressed input stream by wrapping it with a decompressor based on this codec. If this instance represents no compression, simply adds buffering to the input stream
unwrapInputStream
{ "repo_name": "iVCE/RDFS", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImageCompression.java", "license": "apache-2.0", "size": 5816 }
[ "java.io.BufferedInputStream", "java.io.DataInputStream", "java.io.IOException", "java.io.InputStream" ]
import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,883,582
public TrimResult trimFields( LogicalTableModify modifier, ImmutableBitSet fieldsUsed, Set<RelDataTypeField> extraFields) { // Ignore what consumer wants. We always project all columns. Util.discard(fieldsUsed); final RelDataType rowType = modifier.getRowType(); final int fieldCount...
TrimResult function( LogicalTableModify modifier, ImmutableBitSet fieldsUsed, Set<RelDataTypeField> extraFields) { Util.discard(fieldsUsed); final RelDataType rowType = modifier.getRowType(); final int fieldCount = rowType.getFieldCount(); RelNode input = modifier.getInput(); final int inputFieldCount = input.getRowTyp...
/** * Variant of {@link #trimFields(RelNode, ImmutableBitSet, Set)} for * {@link org.apache.calcite.rel.logical.LogicalTableModify}. */
Variant of <code>#trimFields(RelNode, ImmutableBitSet, Set)</code> for <code>org.apache.calcite.rel.logical.LogicalTableModify</code>
trimFields
{ "repo_name": "googleinterns/calcite", "path": "core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java", "license": "apache-2.0", "size": 46033 }
[ "java.util.Collections", "java.util.Set", "org.apache.calcite.rel.RelNode", "org.apache.calcite.rel.logical.LogicalTableModify", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rel.type.RelDataTypeField", "org.apache.calcite.util.ImmutableBitSet", "org.apache.calcite.util.Util", "org....
import java.util.Collections; import java.util.Set; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.logical.LogicalTableModify; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeField; import org.apache.calcite.util.ImmutableBitSet; import org.apache.calc...
import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.logical.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.util.*; import org.apache.calcite.util.mapping.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
2,785,657
@Test public void testWriteOnlyProperty() { UUID uuid = UUID.randomUUID(); JsonObject obj = new JsonObject(); obj.addProperty("uuid", uuid.toString()); obj.addProperty("writeOnlyProperty", "Hello World!"); Employee e; DeserializationContext d = deserializationContext(); try { e =...
void function() { UUID uuid = UUID.randomUUID(); JsonObject obj = new JsonObject(); obj.addProperty("uuid", uuid.toString()); obj.addProperty(STR, STR); Employee e; DeserializationContext d = deserializationContext(); try { e = employeeCodex.allocate(obj, d); PackReader reader = readers.get(); reader.setPayload(obj); v...
/** * Verify a property with only a setter works as a write-only property. */
Verify a property with only a setter works as a write-only property
testWriteOnlyProperty
{ "repo_name": "perka/flatpack-java", "path": "core/src/test/java/com/getperka/flatpack/visitors/PackReaderTest.java", "license": "apache-2.0", "size": 3760 }
[ "com.getperka.flatpack.domain.Employee", "com.getperka.flatpack.ext.DeserializationContext", "com.google.gson.JsonObject", "com.google.gson.JsonParser", "java.io.StringWriter", "java.util.UUID", "org.junit.Assert" ]
import com.getperka.flatpack.domain.Employee; import com.getperka.flatpack.ext.DeserializationContext; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import java.io.StringWriter; import java.util.UUID; import org.junit.Assert;
import com.getperka.flatpack.domain.*; import com.getperka.flatpack.ext.*; import com.google.gson.*; import java.io.*; import java.util.*; import org.junit.*;
[ "com.getperka.flatpack", "com.google.gson", "java.io", "java.util", "org.junit" ]
com.getperka.flatpack; com.google.gson; java.io; java.util; org.junit;
1,645,920
public void archive(WorkflowScheme scheme, User user) throws DotDataException, DotSecurityException, AlreadyExistException; /** * Fires a list of contentlets returned by the luceneQuery and using an action. * @param action {@link WorkflowAction} * @param user {@link User}
void function(WorkflowScheme scheme, User user) throws DotDataException, DotSecurityException, AlreadyExistException; /** * Fires a list of contentlets returned by the luceneQuery and using an action. * @param action {@link WorkflowAction} * @param user {@link User}
/** * Archive the specified workflow scheme * * @param scheme Workflow scheme to archive */
Archive the specified workflow scheme
archive
{ "repo_name": "dotCMS/core", "path": "dotCMS/src/main/java/com/dotmarketing/portlets/workflows/business/WorkflowAPI.java", "license": "gpl-3.0", "size": 45694 }
[ "com.dotmarketing.exception.AlreadyExistException", "com.dotmarketing.exception.DotDataException", "com.dotmarketing.exception.DotSecurityException", "com.dotmarketing.portlets.workflows.model.WorkflowAction", "com.dotmarketing.portlets.workflows.model.WorkflowScheme", "com.liferay.portal.model.User" ]
import com.dotmarketing.exception.AlreadyExistException; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.dotmarketing.portlets.workflows.model.WorkflowAction; import com.dotmarketing.portlets.workflows.model.WorkflowScheme; import com.liferay.portal...
import com.dotmarketing.exception.*; import com.dotmarketing.portlets.workflows.model.*; import com.liferay.portal.model.*;
[ "com.dotmarketing.exception", "com.dotmarketing.portlets", "com.liferay.portal" ]
com.dotmarketing.exception; com.dotmarketing.portlets; com.liferay.portal;
964,774
public static <T> Map<T, Integer> createIndexMap(List<T> list) { HashMap<T, Integer> map = new HashMap<T, Integer>(list.size()); for (int i = 0; i < list.size(); i++) { map.put(list.get(i), i); } return map; }
static <T> Map<T, Integer> function(List<T> list) { HashMap<T, Integer> map = new HashMap<T, Integer>(list.size()); for (int i = 0; i < list.size(); i++) { map.put(list.get(i), i); } return map; }
/** * Creates a map from an item to its index in the map. * * @param <T> * type of item * @param list * list holding the items, of which the index is used * @return a map from an item to its index */
Creates a map from an item to its index in the map
createIndexMap
{ "repo_name": "fernandoj92/mvca-parkinson", "path": "pltm-analysis/src/main/java/org/latlab/util/Algorithm.java", "license": "apache-2.0", "size": 8765 }
[ "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,832,394
@Override public void run() { _isRunning.set(true); while (_isRunning.get()) { try { final SocketSessionCallback callback = _callback.get(); // if callback is null, we don't want to start dispatching yet. ...
void function() { _isRunning.set(true); while (_isRunning.get()) { try { final SocketSessionCallback callback = _callback.get(); if (callback == null) { Thread.sleep(250); continue; } final Object response = _responses.poll(1, TimeUnit.SECONDS); if (response != null) { if (response instanceof String) { try { logger.deb...
/** * Runs the logic to dispatch any responses to the current _callback until {@link #_isRunning} is false. */
Runs the logic to dispatch any responses to the current _callback until <code>#_isRunning</code> is false
run
{ "repo_name": "tavalin/openhab2-addons", "path": "addons/binding/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/grxprg/SocketSession.java", "license": "epl-1.0", "size": 13520 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
807,047
public final boolean internalRemoveDeployingNode(String pnUrl) { RMDeployingNode pn = null; boolean isLost = false; writeLock.lock(); try { pn = removeDeployingNodeWithLockAndPersist(pnUrl); if (pn == null) { pn = removeLostNodeWithLockAndPers...
final boolean function(String pnUrl) { RMDeployingNode pn = null; boolean isLost = false; writeLock.lock(); try { pn = removeDeployingNodeWithLockAndPersist(pnUrl); if (pn == null) { pn = removeLostNodeWithLockAndPersist(pnUrl); isLost = true; } } catch (RuntimeException e) { logger.error(STR + e.getMessage()); throw e...
/** * To remove a deploying node given its url * * @param pnUrl * the url of the deploying node to remove. * @return true if successful, false otherwise */
To remove a deploying node given its url
internalRemoveDeployingNode
{ "repo_name": "tobwiens/scheduling", "path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/nodesource/infrastructure/InfrastructureManager.java", "license": "agpl-3.0", "size": 51135 }
[ "org.ow2.proactive.resourcemanager.common.event.RMEventType", "org.ow2.proactive.resourcemanager.common.event.RMNodeEvent", "org.ow2.proactive.resourcemanager.rmnode.RMDeployingNode" ]
import org.ow2.proactive.resourcemanager.common.event.RMEventType; import org.ow2.proactive.resourcemanager.common.event.RMNodeEvent; import org.ow2.proactive.resourcemanager.rmnode.RMDeployingNode;
import org.ow2.proactive.resourcemanager.common.event.*; import org.ow2.proactive.resourcemanager.rmnode.*;
[ "org.ow2.proactive" ]
org.ow2.proactive;
1,490,335
public static URI clone( final URI uri ) { URI retval = null; try { retval = new URI( uri.toString() ); } catch ( final URISyntaxException ignore ) {} return retval; }
static URI function( final URI uri ) { URI retval = null; try { retval = new URI( uri.toString() ); } catch ( final URISyntaxException ignore ) {} return retval; }
/** * Convenience method to clone a URI * * @param uri the URI to clone * * @return a separate URI */
Convenience method to clone a URI
clone
{ "repo_name": "sdcote/loader", "path": "src/main/java/coyote/commons/UriUtil.java", "license": "mit", "size": 34504 }
[ "java.net.URISyntaxException" ]
import java.net.URISyntaxException;
import java.net.*;
[ "java.net" ]
java.net;
907,649
public java.util.List<fr.lip6.move.pnml.symmetricnet.integers.hlapi.SubtractionHLAPI> getSubterm_integers_SubtractionHLAPI(){ java.util.List<fr.lip6.move.pnml.symmetricnet.integers.hlapi.SubtractionHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.integers.hlapi.SubtractionHLAPI>(); for (Term elem...
java.util.List<fr.lip6.move.pnml.symmetricnet.integers.hlapi.SubtractionHLAPI> function(){ java.util.List<fr.lip6.move.pnml.symmetricnet.integers.hlapi.SubtractionHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.integers.hlapi.SubtractionHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equa...
/** * This accessor return a list of encapsulated subelement, only of SubtractionHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of SubtractionHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_integers_SubtractionHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/booleans/hlapi/BooleanConstantHLAPI.java", "license": "epl-1.0", "size": 91863 }
[ "fr.lip6.move.pnml.symmetricnet.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.symmetricnet.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.symmetricnet.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
1,844,112
public void setInetAddress(final String key, final InetAddress val) { setProperty(key, val.getHostAddress()); }
void function(final String key, final InetAddress val) { setProperty(key, val.getHostAddress()); }
/** * Set <code>InetAddress</code>. */
Set <code>InetAddress</code>
setInetAddress
{ "repo_name": "CasparLi/ftpserver", "path": "core/src/main/java/org/apache/ftpserver/util/BaseProperties.java", "license": "apache-2.0", "size": 10456 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
909,349
private void initializeResource() { try { final String resourceName = "/pinyindb/unicode_to_hanyu_pinyin.txt"; setUnicodeToHanyuPinyinTable(new Properties()); getUnicodeToHanyuPinyinTable().load(ResourceHelper.getResourceInputStream(resourceName)); }...
void function() { try { final String resourceName = STR; setUnicodeToHanyuPinyinTable(new Properties()); getUnicodeToHanyuPinyinTable().load(ResourceHelper.getResourceInputStream(resourceName)); } catch (FileNotFoundException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } }
/** * Initialize a hash-table contains <Unicode, HanyuPinyin> pairs */
Initialize a hash-table contains pairs
initializeResource
{ "repo_name": "dubenju/javay", "path": "src/java/net/sourceforge/pinyin4j/ChineseToPinyinResource.java", "license": "apache-2.0", "size": 5453 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.util.Properties" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,337,433
private STBEvent stringToSTBEvent(String eventString){ try { JSONObject json = new JSONObject(eventString); currentEvent = new STBEvent(); currentEvent.setType(json.getString("type")); if(currentEvent.getType().equals("nodeLaunch")){ currentEvent.setLabel(json.getString("label")); currentEvent...
STBEvent function(String eventString){ try { JSONObject json = new JSONObject(eventString); currentEvent = new STBEvent(); currentEvent.setType(json.getString("type")); if(currentEvent.getType().equals(STR)){ currentEvent.setLabel(json.getString("label")); currentEvent.setUrl(json.getString("url")); } else if(currentEv...
/** * Converts the string of events into STB events * @param eventString */
Converts the string of events into STB events
stringToSTBEvent
{ "repo_name": "Z-app/zmote", "path": "src/se/z_app/stb/api/zenterio/EventListener.java", "license": "bsd-2-clause", "size": 4786 }
[ "org.json.JSONException", "org.json.JSONObject", "se.z_app.stb.STBEvent" ]
import org.json.JSONException; import org.json.JSONObject; import se.z_app.stb.STBEvent;
import org.json.*; import se.z_app.stb.*;
[ "org.json", "se.z_app.stb" ]
org.json; se.z_app.stb;
1,547,911
public static void e(String message, Throwable t) { if (Constants.DEBUG) { Log.e(TAG, message, t); } }
static void function(String message, Throwable t) { if (Constants.DEBUG) { Log.e(TAG, message, t); } }
/** * Log an error message. */
Log an error message
e
{ "repo_name": "mbeloded/oidarSample", "path": "app/src/main/java/com/oidar/util/MyLog.java", "license": "gpl-2.0", "size": 849 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,175,616
private void buildRequestAction() throws SOAPException { requestAction.getSOAPHeader().detachNode(); final SOAPBody soapBody = requestAction.getSOAPBody(); final SOAPElement soapBodyElem = soapBody.addChildElement(LOGIN, "", HNAP_XMLNS); soapBodyElem.addChildElement(ACTION).addTextNo...
void function() throws SOAPException { requestAction.getSOAPHeader().detachNode(); final SOAPBody soapBody = requestAction.getSOAPBody(); final SOAPElement soapBodyElem = soapBody.addChildElement(LOGIN, STRrequest"); soapBodyElem.addChildElement(USERNAME).addTextNode(ADMIN); soapBodyElem.addChildElement(LOGINPASSWORD);...
/** * This is the first SOAP message used in the login process and is used to retrieve * the cookie, challenge and public key used for authentication. * * @throws SOAPException */
This is the first SOAP message used in the login process and is used to retrieve the cookie, challenge and public key used for authentication
buildRequestAction
{ "repo_name": "Jamstah/openhab2-addons", "path": "addons/binding/org.openhab.binding.dlinksmarthome/src/main/java/org/openhab/binding/dlinksmarthome/internal/DLinkHNAPCommunication.java", "license": "epl-1.0", "size": 17473 }
[ "javax.xml.soap.MimeHeaders", "javax.xml.soap.SOAPBody", "javax.xml.soap.SOAPElement", "javax.xml.soap.SOAPException" ]
import javax.xml.soap.MimeHeaders; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPException;
import javax.xml.soap.*;
[ "javax.xml" ]
javax.xml;
523,996
void deleteTableDirIfEmpty(TableId tableID) throws IOException;
void deleteTableDirIfEmpty(TableId tableID) throws IOException;
/** * Delete a table's directory if it is empty. * * @param tableID * The id of the table whose directory we are to operate on */
Delete a table's directory if it is empty
deleteTableDirIfEmpty
{ "repo_name": "lstav/accumulo", "path": "server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionEnvironment.java", "license": "apache-2.0", "size": 4741 }
[ "java.io.IOException", "org.apache.accumulo.core.data.TableId" ]
import java.io.IOException; import org.apache.accumulo.core.data.TableId;
import java.io.*; import org.apache.accumulo.core.data.*;
[ "java.io", "org.apache.accumulo" ]
java.io; org.apache.accumulo;
593,649
private void doPuts(final String regionName, final VM serverVM) { serverVM.invoke(() -> { InternalCache cache = InternalDistributedSystem.getConnectedInstance().getCache(); Region region = cache.getRegion(regionName); Portfolio p1 = new Portfolio(); p1.ID = 1; p1.names = new String[...
void function(final String regionName, final VM serverVM) { serverVM.invoke(() -> { InternalCache cache = InternalDistributedSystem.getConnectedInstance().getCache(); Region region = cache.getRegion(regionName); Portfolio p1 = new Portfolio(); p1.ID = 1; p1.names = new String[] {"AAPL", "VMW"}; Portfolio p2 = new Portf...
/** * Does few puts on the region on the server */
Does few puts on the region on the server
doPuts
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-cq/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/DurableClientCommandsDUnitTest.java", "license": "apache-2.0", "size": 13802 }
[ "org.apache.geode.cache.Region", "org.apache.geode.cache.query.data.Portfolio", "org.apache.geode.distributed.internal.InternalDistributedSystem", "org.apache.geode.internal.cache.InternalCache" ]
import org.apache.geode.cache.Region; import org.apache.geode.cache.query.data.Portfolio; import org.apache.geode.distributed.internal.InternalDistributedSystem; import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.cache.*; import org.apache.geode.cache.query.data.*; import org.apache.geode.distributed.internal.*; import org.apache.geode.internal.cache.*;
[ "org.apache.geode" ]
org.apache.geode;
844,397
public static boolean getBoolean(String jsonData, String key, Boolean defaultValue) { if (StringUtils.isEmpty(jsonData)) { return defaultValue; } try { JSONObject jsonObject = new JSONObject(jsonData); return getBoolean(jsonObject, key, defaultValue); } catch (JSONException e) { if (isPrintEx...
static boolean function(String jsonData, String key, Boolean defaultValue) { if (StringUtils.isEmpty(jsonData)) { return defaultValue; } try { JSONObject jsonObject = new JSONObject(jsonData); return getBoolean(jsonObject, key, defaultValue); } catch (JSONException e) { if (isPrintException) { e.printStackTrace(); } re...
/** * get Boolean from jsonData * * @param jsonData * @param key * @param defaultValue * @return <ul> * <li>if jsonObject is null, return defaultValue</li> * <li>if jsonData {@link JSONObject#JSONObject(String)} exception, * return defaultValue</li> * <li>return * ...
get Boolean from jsonData
getBoolean
{ "repo_name": "zhangjining9517/zhanglibrary", "path": "zhangLibrary/src/com/zhang/zhanglibrary/util/JSONUtils.java", "license": "gpl-2.0", "size": 23381 }
[ "org.json.JSONException", "org.json.JSONObject" ]
import org.json.JSONException; import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
2,661,960
public static void assignOrRemoveExternalForGroup(Long topicId, BlogRole role, String externalGroupId, String externalSystemId, String externalId) throws BlogNotFoundException, CommunoteEntityNotFoundException, BlogAccessException, ExternalObjectNotAssignedExcepti...
static void function(Long topicId, BlogRole role, String externalGroupId, String externalSystemId, String externalId) throws BlogNotFoundException, CommunoteEntityNotFoundException, BlogAccessException, ExternalObjectNotAssignedException { Group group = ServiceLocator.instance().getService(UserService.class) .getGroup(...
/** * Assign or remove role for a group of external system * * @param topicId * identifier of the topic * @param role * role of the topic * @param externalGroupId * identifier of group in external system * @param externalSystemId * ...
Assign or remove role for a group of external system
assignOrRemoveExternalForGroup
{ "repo_name": "Communote/communote-server", "path": "communote/plugins/rest-api/3.0/implementation/src/main/java/com/communote/plugins/api/rest/v30/resource/topic/roleexternal/RoleExternalResourceHelper.java", "license": "apache-2.0", "size": 7499 }
[ "com.communote.server.api.ServiceLocator", "com.communote.server.api.core.blog.BlogAccessException", "com.communote.server.api.core.blog.BlogNotFoundException", "com.communote.server.api.core.external.ExternalObjectNotAssignedException", "com.communote.server.api.core.user.CommunoteEntityNotFoundException",...
import com.communote.server.api.ServiceLocator; import com.communote.server.api.core.blog.BlogAccessException; import com.communote.server.api.core.blog.BlogNotFoundException; import com.communote.server.api.core.external.ExternalObjectNotAssignedException; import com.communote.server.api.core.user.CommunoteEntityNotFo...
import com.communote.server.api.*; import com.communote.server.api.core.blog.*; import com.communote.server.api.core.external.*; import com.communote.server.api.core.user.*; import com.communote.server.model.blog.*; import com.communote.server.model.user.group.*; import com.communote.server.service.*;
[ "com.communote.server" ]
com.communote.server;
963,218
public Collection<String> getAllTemplateVariableNames() { return Collections.emptySet(); }
Collection<String> function() { return Collections.emptySet(); }
/** * Gets a set of all the template variable names which are used in this ParsedStatement. For normal ParsedStatements this * will be empty. TemplateParsedStatements will return the variable names as reported by the templating implementation * (i.e. Mustache). * @return A set of template variable names in ...
Gets a set of all the template variable names which are used in this ParsedStatement. For normal ParsedStatements this will be empty. TemplateParsedStatements will return the variable names as reported by the templating implementation (i.e. Mustache)
getAllTemplateVariableNames
{ "repo_name": "Fivium/FOXopen", "path": "src/main/java/net/foxopen/fox/database/parser/ParsedStatement.java", "license": "gpl-3.0", "size": 5293 }
[ "java.util.Collection", "java.util.Collections" ]
import java.util.Collection; import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
297,178
private String getImplName(Type type, boolean allowJreCollectionInterface) { Class<?> rawClass = getRawClass(type); String fqName = getFqParameterizedName(type); fqName = fqName.replaceAll(JsonArray.class.getCanonicalName(), ArrayList.class.getCanonicalName()); fqName = fqName.replac...
String function(Type type, boolean allowJreCollectionInterface) { Class<?> rawClass = getRawClass(type); String fqName = getFqParameterizedName(type); fqName = fqName.replaceAll(JsonArray.class.getCanonicalName(), ArrayList.class.getCanonicalName()); fqName = fqName.replaceAll(JsonStringMap.class.getCanonicalName() + "...
/** * Returns the fully-qualified type name using Java concrete implementation classes. * <p/> * For example, for JsonArray&lt;JsonStringMap&lt;Dto&gt;&gt;, this would return "ArrayList&lt;Map&lt;String, DtoImpl&gt;&gt;". */
Returns the fully-qualified type name using Java concrete implementation classes. For example, for JsonArray&lt;JsonStringMap&lt;Dto&gt;&gt;, this would return "ArrayList&lt;Map&lt;String, DtoImpl&gt;&gt;"
getImplName
{ "repo_name": "Mirage20/che", "path": "core/che-core-api-dto/src/main/java/org/eclipse/che/dto/generator/DtoImplClientTemplate.java", "license": "epl-1.0", "size": 51626 }
[ "java.lang.reflect.Type", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.eclipse.che.dto.shared.JsonArray", "org.eclipse.che.dto.shared.JsonStringMap" ]
import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.che.dto.shared.JsonArray; import org.eclipse.che.dto.shared.JsonStringMap;
import java.lang.reflect.*; import java.util.*; import org.eclipse.che.dto.shared.*;
[ "java.lang", "java.util", "org.eclipse.che" ]
java.lang; java.util; org.eclipse.che;
82,537
public Set<ClassModel> getAllClassDependencies() { HashSet<ClassModel> result = new HashSet<>(); for (ModuleModel module : allModuleDependencies) { for (ClassModel clazz : module.classes) { ClassModel.getAllClassDependencies(result, clazz); } } return result; }
Set<ClassModel> function() { HashSet<ClassModel> result = new HashSet<>(); for (ModuleModel module : allModuleDependencies) { for (ClassModel clazz : module.classes) { ClassModel.getAllClassDependencies(result, clazz); } } return result; }
/** * All classes this module depends upon. Includes all transitive * dependencies of the classes in this module, even if the dependencies are * not in a module themselves */
All classes this module depends upon. Includes all transitive dependencies of the classes in this module, even if the dependencies are not in a module themselves
getAllClassDependencies
{ "repo_name": "ruediste/jabsaw", "path": "impl/src/main/java/org/jabsaw/impl/model/ModuleModel.java", "license": "apache-2.0", "size": 8991 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
571,880
private ImmutableMap<String, PackageArgument<?>> createPackageArguments() { ImmutableList.Builder<PackageArgument<?>> arguments = ImmutableList.<PackageArgument<?>>builder() .add(new DefaultDeprecation()) .add(new DefaultDistribs()) .add(new DefaultLicenses()) ....
ImmutableMap<String, PackageArgument<?>> function() { ImmutableList.Builder<PackageArgument<?>> arguments = ImmutableList.<PackageArgument<?>>builder() .add(new DefaultDeprecation()) .add(new DefaultDistribs()) .add(new DefaultLicenses()) .add(new DefaultTestOnly()) .add(new DefaultVisibility()) .add(new Features()) .a...
/** * Creates the list of arguments for the 'package' function. */
Creates the list of arguments for the 'package' function
createPackageArguments
{ "repo_name": "charlieaustin/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java", "license": "apache-2.0", "size": 56209 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableMap" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
74,501
private static InternalValue createValue(Path path) { return InternalValue.create(path); }
static InternalValue function(Path path) { return InternalValue.create(path); }
/** * Creates an internal path value from the given path. * * @param path the path * @return an internal value wrapping the path */
Creates an internal path value from the given path
createValue
{ "repo_name": "Overseas-Student-Living/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java", "license": "apache-2.0", "size": 37993 }
[ "org.apache.jackrabbit.core.value.InternalValue", "org.apache.jackrabbit.spi.Path" ]
import org.apache.jackrabbit.core.value.InternalValue; import org.apache.jackrabbit.spi.Path;
import org.apache.jackrabbit.core.value.*; import org.apache.jackrabbit.spi.*;
[ "org.apache.jackrabbit" ]
org.apache.jackrabbit;
1,743,372
protected double runSyncInsertRate(final WriteConcern writeConcern, final int count) { try { final long startTime = System.nanoTime(); for (int i = 0; i < count; ++i) { final DBObject obj = new BasicDBObject("_id", Integer.valueOf(i...
double function(final WriteConcern writeConcern, final int count) { try { final long startTime = System.nanoTime(); for (int i = 0; i < count; ++i) { final DBObject obj = new BasicDBObject("_id", Integer.valueOf(i)); mySyncCollection.insert(obj, writeConcern); } final long endTime = System.nanoTime(); final double delt...
/** * Test to measure the performance of performing a series of inserts into a * collection. * * @param writeConcern * The writeConcern of the insert requests. * @param count * The number of inserts. * @return The rate (in ms/insert) of inserts */
Test to measure the performance of performing a series of inserts into a collection
runSyncInsertRate
{ "repo_name": "allanbank/mongodb-async-performance", "path": "src/main/java/com/allanbank/mongodb/performance/PerformanceITest.java", "license": "gpl-3.0", "size": 34767 }
[ "com.mongodb.BasicDBObject", "com.mongodb.DBObject", "com.mongodb.MongoException", "com.mongodb.WriteConcern", "java.util.concurrent.TimeUnit" ]
import com.mongodb.BasicDBObject; import com.mongodb.DBObject; import com.mongodb.MongoException; import com.mongodb.WriteConcern; import java.util.concurrent.TimeUnit;
import com.mongodb.*; import java.util.concurrent.*;
[ "com.mongodb", "java.util" ]
com.mongodb; java.util;
1,524,774
public Ring<E> Ring(int Ring) { if ((Ring < 0) || (Ring > this.getWidth())) { return null; } ProxyForGroup<E> tmp = null; try { tmp = new ProxyForGroup<E>(this.getTypeName()); } catch (ConstructionOfReifiedObjectFailedException e) { e.print...
Ring<E> function(int Ring) { if ((Ring < 0) (Ring > this.getWidth())) { return null; } ProxyForGroup<E> tmp = null; try { tmp = new ProxyForGroup<E>(this.getTypeName()); } catch (ConstructionOfReifiedObjectFailedException e) { e.printStackTrace(); } int begining = Ring * this.getWidth(); for (int i = begining; i < (beg...
/** * Returns the Ring (one-dimensional topology group) with the specified number * @param Ring - the number of the Ring * @return the one-dimensional topology group formed by the Ring in the two-dimensional topology group, return <code>null</code> if the the specified Ring is incorrect */
Returns the Ring (one-dimensional topology group) with the specified number
Ring
{ "repo_name": "moliva/proactive", "path": "src/Core/org/objectweb/proactive/core/group/topology/Torus.java", "license": "agpl-3.0", "size": 9091 }
[ "org.objectweb.proactive.core.group.ProxyForGroup", "org.objectweb.proactive.core.mop.ConstructionOfReifiedObjectFailedException" ]
import org.objectweb.proactive.core.group.ProxyForGroup; import org.objectweb.proactive.core.mop.ConstructionOfReifiedObjectFailedException;
import org.objectweb.proactive.core.group.*; import org.objectweb.proactive.core.mop.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
1,352,603
HashSet<Entity> getAssociatedEntities(Agent agent) throws AgentException;
HashSet<Entity> getAssociatedEntities(Agent agent) throws AgentException;
/** * Returns the entities associated to a given agent. * * @param agent is the agent. * @return a set of entities. * @throws AgentException */
Returns the entities associated to a given agent
getAssociatedEntities
{ "repo_name": "FracturedPlane/EnvironmentInterface", "path": "src/aiInterface/environment/EnvironmentInterfaceStandard.java", "license": "gpl-2.0", "size": 7800 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
628,530
public IDataset getBibtex();
IDataset function();
/** * Bibliographic reference data in BibTeX format. * <p> * <b>Type:</b> NX_CHAR * </p> * * @return the value. */
Bibliographic reference data in BibTeX format. Type: NX_CHAR
getBibtex
{ "repo_name": "xen-0/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXcite.java", "license": "epl-1.0", "size": 5339 }
[ "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.january.dataset.IDataset;
import org.eclipse.january.dataset.*;
[ "org.eclipse.january" ]
org.eclipse.january;
491,560
public ExpressRouteCircuitPeeringInner withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { this.microsoftPeeringConfig = microsoftPeeringConfig; return this; }
ExpressRouteCircuitPeeringInner function(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { this.microsoftPeeringConfig = microsoftPeeringConfig; return this; }
/** * Set the Microsoft peering configuration. * * @param microsoftPeeringConfig the microsoftPeeringConfig value to set * @return the ExpressRouteCircuitPeeringInner object itself. */
Set the Microsoft peering configuration
withMicrosoftPeeringConfig
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringInner.java", "license": "mit", "size": 15381 }
[ "com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeeringConfig" ]
import com.microsoft.azure.management.network.v2019_09_01.ExpressRouteCircuitPeeringConfig;
import com.microsoft.azure.management.network.v2019_09_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
209,504
public File call() throws Exception { Socket s = null; final FileOutputStream os = new FileOutputStream(file); try { if (log.isInfoEnabled()) log.info("uuid=" + uuid + ", localFile=" + file); final FileLock fileLoc...
File function() throws Exception { Socket s = null; final FileOutputStream os = new FileOutputStream(file); try { if (log.isInfoEnabled()) log.info("uuid=" + uuid + STR + file); final FileLock fileLock = os.getChannel().tryLock(); if (fileLock == null) { throw new IOException(STR + file); } if (os.getChannel().size() !...
/** * Return the {@link File} on which the resource was written. If the * operation fails, then the caller is responsible deciding whether or * not the {@link File} specified to the constructor needs to be * deleted. * * @throws IOException * i...
Return the <code>File</code> on which the resource was written. If the operation fails, then the caller is responsible deciding whether or not the <code>File</code> specified to the constructor needs to be deleted
call
{ "repo_name": "blazegraph/database", "path": "bigdata-core/bigdata/src/java/com/bigdata/service/ResourceService.java", "license": "gpl-2.0", "size": 54854 }
[ "java.io.BufferedInputStream", "java.io.DataOutputStream", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.net.InetSocketAddress", "java.net.Socket", "java.nio.ByteBuffer", "java.nio.channels.FileLock", "org.apache.log4j.Logger" ]
import java.io.BufferedInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.InetSocketAddress; import java.net.Socket; import java.nio.ByteBuffer; import java.nio.channels.FileLock; import org.apache.l...
import java.io.*; import java.net.*; import java.nio.*; import java.nio.channels.*; import org.apache.log4j.*;
[ "java.io", "java.net", "java.nio", "org.apache.log4j" ]
java.io; java.net; java.nio; org.apache.log4j;
1,883,954
public MessageListResult list(String server, int page, int itemsPerPage) throws IOException, MailosaurException { return list(server, page, itemsPerPage, null); }
MessageListResult function(String server, int page, int itemsPerPage) throws IOException, MailosaurException { return list(server, page, itemsPerPage, null); }
/** * List all messages. * Returns a list of your messages. The messages are returned sorted by received date, with the most recently-received messages appearing first. * * @param server The identifier of the server hosting the messages. * @param page Used in conjunction with `itemsPerPage` to ...
List all messages. Returns a list of your messages. The messages are returned sorted by received date, with the most recently-received messages appearing first
list
{ "repo_name": "mailosaur/mailosaur-java", "path": "src/main/java/com/mailosaur/Messages.java", "license": "mit", "size": 22281 }
[ "com.mailosaur.models.MessageListResult", "java.io.IOException" ]
import com.mailosaur.models.MessageListResult; import java.io.IOException;
import com.mailosaur.models.*; import java.io.*;
[ "com.mailosaur.models", "java.io" ]
com.mailosaur.models; java.io;
32,701
public synchronized Component getComponent() { return component; }
synchronized Component function() { return component; }
/** * Gets the <code>Component</code> associated * with this <code>DropTarget</code>. * * @return the current <code>Component</code> */
Gets the <code>Component</code> associated with this <code>DropTarget</code>
getComponent
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/java/awt/dnd/DropTarget.java", "license": "gpl-2.0", "size": 28043 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,827,095
@Override protected void stopInternal() throws LifecycleException { if (log.isDebugEnabled()) log.debug(sm.getString("webappLoader.stopping")); setState(LifecycleState.STOPPING); // Remove context attributes as appropriate ServletContext servletContext = c...
void function() throws LifecycleException { if (log.isDebugEnabled()) log.debug(sm.getString(STR)); setState(LifecycleState.STOPPING); ServletContext servletContext = context.getServletContext(); servletContext.removeAttribute(Globals.CLASS_PATH_ATTR); if (classLoader != null) { try { classLoader.stop(); } finally { cl...
/** * Stop associated {@link ClassLoader} and implement the requirements * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */
Stop associated <code>ClassLoader</code> and implement the requirements of <code>org.apache.catalina.util.LifecycleBase#stopInternal()</code>
stopInternal
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-8.0.9-sourcecode/java/org/apache/catalina/loader/WebappLoader.java", "license": "apache-2.0", "size": 21821 }
[ "javax.management.ObjectName", "javax.servlet.ServletContext", "org.apache.catalina.Globals", "org.apache.catalina.LifecycleException", "org.apache.catalina.LifecycleState", "org.apache.tomcat.util.modeler.Registry" ]
import javax.management.ObjectName; import javax.servlet.ServletContext; import org.apache.catalina.Globals; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; import org.apache.tomcat.util.modeler.Registry;
import javax.management.*; import javax.servlet.*; import org.apache.catalina.*; import org.apache.tomcat.util.modeler.*;
[ "javax.management", "javax.servlet", "org.apache.catalina", "org.apache.tomcat" ]
javax.management; javax.servlet; org.apache.catalina; org.apache.tomcat;
742,758
private void submitData() { final JSONObject data = getServerData(); JSONArray pluginData = new JSONArray(); // Search for all other bStats Metrics classes to get their plugin data for (Class<?> service : Bukkit.getServicesManager().getKnownServices()) { try { service.getField("B_STATS_VERSION"); // ...
void function() { final JSONObject data = getServerData(); JSONArray pluginData = new JSONArray(); for (Class<?> service : Bukkit.getServicesManager().getKnownServices()) { try { service.getField(STR); } catch (NoSuchFieldException ignored) { continue; } try { pluginData.add(service.getMethod(STR).invoke(Bukkit.getServ...
/** * Collects the data and sends it afterwards. */
Collects the data and sends it afterwards
submitData
{ "repo_name": "Sharpjaws/SharpSK", "path": "src/main/java/me/sharpjaws/sharpSK/Metrics.java", "license": "mit", "size": 147183 }
[ "java.lang.reflect.InvocationTargetException", "org.bukkit.Bukkit", "org.json.simple.JSONArray", "org.json.simple.JSONObject" ]
import java.lang.reflect.InvocationTargetException; import org.bukkit.Bukkit; import org.json.simple.JSONArray; import org.json.simple.JSONObject;
import java.lang.reflect.*; import org.bukkit.*; import org.json.simple.*;
[ "java.lang", "org.bukkit", "org.json.simple" ]
java.lang; org.bukkit; org.json.simple;
13,666
@Test() public void testMatchingRuleReferencingUndefinedSyntax() throws Exception { final File additionalSchemaFile = createTempFile( "dn: cn=schema", "objectClass: top", "objectClass: ldapSubEntry", "objectClass: subschema", "cn: schema", "matchi...
@Test() void function() throws Exception { final File additionalSchemaFile = createTempFile( STR, STR, STR, STR, STR, STR); SchemaValidator schemaValidator = new SchemaValidator(); assertTrue(schemaValidator.getAllowReferencesToUndefinedElementTypes(). isEmpty()); final Schema existingSchema = Schema.parseSchemaEntry(m...
/** * Tests the behavior for a schema entry that has a matching rule that * references an undefined syntax. * * @throws Exception If an unexpected problem occurs. */
Tests the behavior for a schema entry that has a matching rule that references an undefined syntax
testMatchingRuleReferencingUndefinedSyntax
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/schema/SchemaValidatorTestCase.java", "license": "gpl-2.0", "size": 262381 }
[ "com.unboundid.util.StaticUtils", "java.io.File", "java.util.ArrayList", "java.util.EnumSet", "java.util.List", "org.testng.annotations.Test" ]
import com.unboundid.util.StaticUtils; import java.io.File; import java.util.ArrayList; import java.util.EnumSet; import java.util.List; import org.testng.annotations.Test;
import com.unboundid.util.*; import java.io.*; import java.util.*; import org.testng.annotations.*;
[ "com.unboundid.util", "java.io", "java.util", "org.testng.annotations" ]
com.unboundid.util; java.io; java.util; org.testng.annotations;
932,278
Set<SubscribedAPI> getPaginatedSubscribedAPIs(Subscriber subscriber, int applicationId, int startSubIndex, int endSubIndex, String groupingId) throws APIManagementException;
Set<SubscribedAPI> getPaginatedSubscribedAPIs(Subscriber subscriber, int applicationId, int startSubIndex, int endSubIndex, String groupingId) throws APIManagementException;
/** * Returns a set of SubscribedAPIs filtered by the given application name and in between starting and ending indexes. * * @param subscriber Subscriber * @param applicationId Application needed to find subscriptions * @param startSubIndex Starting index of subscriptions to be listed * @p...
Returns a set of SubscribedAPIs filtered by the given application name and in between starting and ending indexes
getPaginatedSubscribedAPIs
{ "repo_name": "jaadds/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIConsumer.java", "license": "apache-2.0", "size": 41368 }
[ "java.util.Set", "org.wso2.carbon.apimgt.api.model.SubscribedAPI", "org.wso2.carbon.apimgt.api.model.Subscriber" ]
import java.util.Set; import org.wso2.carbon.apimgt.api.model.SubscribedAPI; import org.wso2.carbon.apimgt.api.model.Subscriber;
import java.util.*; import org.wso2.carbon.apimgt.api.model.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
1,988,280
@Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); // childrenFeatures.add(CodegenPackage.Literals.RESOURCE_CONTAINER__ELEMENTS); } return childrenFeatures; }
Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-u...
This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>.
getChildrenFeatures
{ "repo_name": "Nasdanika/codegen", "path": "edit/src/org/nasdanika/codegen/provider/ContainerItemProvider.java", "license": "epl-1.0", "size": 5881 }
[ "java.util.Collection", "org.eclipse.emf.ecore.EStructuralFeature" ]
import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature;
import java.util.*; import org.eclipse.emf.ecore.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
2,042,287
@Test public void testRemove() { dao.remove(existingAuditLog.getaudit_log_id()); AuditLog result = dao.get(existingAuditLog.getaudit_log_id()); assertNull(result); }
void function() { dao.remove(existingAuditLog.getaudit_log_id()); AuditLog result = dao.get(existingAuditLog.getaudit_log_id()); assertNull(result); }
/** * Ensures that removing an AuditLog works as expected. */
Ensures that removing an AuditLog works as expected
testRemove
{ "repo_name": "derekhiggins/ovirt-engine", "path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/AuditLogDAOTest.java", "license": "apache-2.0", "size": 11226 }
[ "org.junit.Assert", "org.ovirt.engine.core.common.businessentities.AuditLog" ]
import org.junit.Assert; import org.ovirt.engine.core.common.businessentities.AuditLog;
import org.junit.*; import org.ovirt.engine.core.common.businessentities.*;
[ "org.junit", "org.ovirt.engine" ]
org.junit; org.ovirt.engine;
1,300,827
protected void setupObjectList() { objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_DATA, this)); }
void function() { objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_DATA, this)); }
/** * Setup the Object List. A byte Array which will be read upto frame size * bytes. */
Setup the Object List. A byte Array which will be read upto frame size bytes
setupObjectList
{ "repo_name": "craigpetchell/Jaudiotagger", "path": "src/org/jaudiotagger/tag/id3/framebody/FrameBodyUnsupported.java", "license": "lgpl-2.1", "size": 4561 }
[ "org.jaudiotagger.tag.datatype.ByteArraySizeTerminated", "org.jaudiotagger.tag.datatype.DataTypes" ]
import org.jaudiotagger.tag.datatype.ByteArraySizeTerminated; import org.jaudiotagger.tag.datatype.DataTypes;
import org.jaudiotagger.tag.datatype.*;
[ "org.jaudiotagger.tag" ]
org.jaudiotagger.tag;
440,529
public int getNumModules() throws JHOVE2Exception;
int function() throws JHOVE2Exception;
/** * Get number of modules. * * @return Number of modules * @throws JHOVE2Exception */
Get number of modules
getNumModules
{ "repo_name": "opf-labs/jhove2", "path": "src/main/java/org/jhove2/core/source/Source.java", "license": "bsd-2-clause", "size": 15326 }
[ "org.jhove2.core.JHOVE2Exception" ]
import org.jhove2.core.JHOVE2Exception;
import org.jhove2.core.*;
[ "org.jhove2.core" ]
org.jhove2.core;
2,680,345
@Test @Ignore public void testUpdatePairWithWhiteSpace() throws Exception { String key = "myTestKey"; TestEditorConfigurationService testEditorConfigurationService = ServiceLookUpForTest .getService(TestEditorConfigurationService.class); testEditorConfigurationService.updatePair(key, "Foo Bar"); assert...
void function() throws Exception { String key = STR; TestEditorConfigurationService testEditorConfigurationService = ServiceLookUpForTest .getService(TestEditorConfigurationService.class); testEditorConfigurationService.updatePair(key, STR); assertEquals(STR, STR, System.getProperty(key)); testEditorConfigurationServic...
/** * * Check that on an update of a Testpair the system properties are updated * with new values. A special check is to see slim command varaibles added * with the quatet value of their base protperty. For Example: * * JOG4J_PATH = /foo bar/PATH/log4j.xml * * and * * SLIM_CMD_VAR_JOG4J_PATH = /...
Check that on an update of a Testpair the system properties are updated with new values. A special check is to see slim command varaibles added with the quatet value of their base protperty. For Example: JOG4J_PATH = /foo bar/PATH/log4j.xml and SLIM_CMD_VAR_JOG4J_PATH = /foo%20bar/PATH/log4j.xml
testUpdatePairWithWhiteSpace
{ "repo_name": "franzbecker/test-editor", "path": "core/org.testeditor.core.test/src/org/testeditor/core/services/impl/TestEditorConfigurationServiceImplTest.java", "license": "epl-1.0", "size": 8532 }
[ "org.junit.Assert", "org.testeditor.core.services.interfaces.ServiceLookUpForTest", "org.testeditor.core.services.interfaces.TestEditorConfigurationService", "org.testeditor.core.services.interfaces.TestEditorGlobalConstans" ]
import org.junit.Assert; import org.testeditor.core.services.interfaces.ServiceLookUpForTest; import org.testeditor.core.services.interfaces.TestEditorConfigurationService; import org.testeditor.core.services.interfaces.TestEditorGlobalConstans;
import org.junit.*; import org.testeditor.core.services.interfaces.*;
[ "org.junit", "org.testeditor.core" ]
org.junit; org.testeditor.core;
2,545,453
public Transaction getAddTxReceiver() throws SQLException { if(addTxReceiver == null) addTxReceiver = MySQLConnection.getTransaction(conn, addTxReceiverID); return addTxReceiver; }
Transaction function() throws SQLException { if(addTxReceiver == null) addTxReceiver = MySQLConnection.getTransaction(conn, addTxReceiverID); return addTxReceiver; }
/** * Gets the adds the tx receiver. * * @return the adds the tx receiver * @throws SQLException the SQL exception */
Gets the adds the tx receiver
getAddTxReceiver
{ "repo_name": "repos-bitcoin/thundernetwork", "path": "thunder-server/src/main/java/network/thunder/server/database/objects/Payment.java", "license": "agpl-3.0", "size": 35589 }
[ "java.sql.SQLException", "network.thunder.server.database.MySQLConnection", "org.bitcoinj.core.Transaction" ]
import java.sql.SQLException; import network.thunder.server.database.MySQLConnection; import org.bitcoinj.core.Transaction;
import java.sql.*; import network.thunder.server.database.*; import org.bitcoinj.core.*;
[ "java.sql", "network.thunder.server", "org.bitcoinj.core" ]
java.sql; network.thunder.server; org.bitcoinj.core;
590,868
@Test public void testEvaluate() { Vector x = Vector.of(Real.valueOf(Math.PI), Real.valueOf(Math.PI)); assertEquals(-1.0, function.f(x), 0.0); x.setReal(0, Math.PI/2.0); x.setReal(1, Math.PI/2.0); assertEquals(0.0, function.f(x), 0.0000000001); }
void function() { Vector x = Vector.of(Real.valueOf(Math.PI), Real.valueOf(Math.PI)); assertEquals(-1.0, function.f(x), 0.0); x.setReal(0, Math.PI/2.0); x.setReal(1, Math.PI/2.0); assertEquals(0.0, function.f(x), 0.0000000001); }
/** * Test of evaluate method, of class {@link Easom}. */
Test of evaluate method, of class <code>Easom</code>
testEvaluate
{ "repo_name": "filinep/cilib", "path": "library/src/test/java/net/sourceforge/cilib/functions/continuous/unconstrained/EasomTest.java", "license": "gpl-3.0", "size": 1271 }
[ "net.sourceforge.cilib.type.types.Real", "net.sourceforge.cilib.type.types.container.Vector", "org.junit.Assert" ]
import net.sourceforge.cilib.type.types.Real; import net.sourceforge.cilib.type.types.container.Vector; import org.junit.Assert;
import net.sourceforge.cilib.type.types.*; import net.sourceforge.cilib.type.types.container.*; import org.junit.*;
[ "net.sourceforge.cilib", "org.junit" ]
net.sourceforge.cilib; org.junit;
811,256
return HttpFSServerWebApp.get().get(FileSystemAccess.class); }
return HttpFSServerWebApp.get().get(FileSystemAccess.class); }
/** * Returns the {@link FileSystemAccess} service to return the FileSystemAccess filesystem * instance to. * * @return the FileSystemAccess service. */
Returns the <code>FileSystemAccess</code> service to return the FileSystemAccess filesystem instance to
getFileSystemAccess
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSReleaseFilter.java", "license": "apache-2.0", "size": 1533 }
[ "org.apache.hadoop.lib.service.FileSystemAccess" ]
import org.apache.hadoop.lib.service.FileSystemAccess;
import org.apache.hadoop.lib.service.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
813,743
private SortedSet<TaskListItem> getTaskListItemList(SessionMap<String, Object> sessionMap) { SortedSet<TaskListItem> list = (SortedSet<TaskListItem>) sessionMap .get(TaskListConstants.ATTR_TASKLIST_ITEM_LIST); if (list == null) { list = new TreeSet<>(new TaskListItemComparator()); sessionMap.put(TaskL...
SortedSet<TaskListItem> function(SessionMap<String, Object> sessionMap) { SortedSet<TaskListItem> list = (SortedSet<TaskListItem>) sessionMap .get(TaskListConstants.ATTR_TASKLIST_ITEM_LIST); if (list == null) { list = new TreeSet<>(new TaskListItemComparator()); sessionMap.put(TaskListConstants.ATTR_TASKLIST_ITEM_LIST,...
/** * List save current taskList items. */
List save current taskList items
getTaskListItemList
{ "repo_name": "lamsfoundation/lams", "path": "lams_tool_task/src/java/org/lamsfoundation/lams/tool/taskList/web/controller/AuthoringTaskListConditionController.java", "license": "gpl-2.0", "size": 17000 }
[ "java.util.SortedSet", "java.util.TreeSet", "org.lamsfoundation.lams.tool.taskList.TaskListConstants", "org.lamsfoundation.lams.tool.taskList.model.TaskListItem", "org.lamsfoundation.lams.tool.taskList.util.TaskListItemComparator", "org.lamsfoundation.lams.web.util.SessionMap" ]
import java.util.SortedSet; import java.util.TreeSet; import org.lamsfoundation.lams.tool.taskList.TaskListConstants; import org.lamsfoundation.lams.tool.taskList.model.TaskListItem; import org.lamsfoundation.lams.tool.taskList.util.TaskListItemComparator; import org.lamsfoundation.lams.web.util.SessionMap;
import java.util.*; import org.lamsfoundation.lams.tool.*; import org.lamsfoundation.lams.web.util.*;
[ "java.util", "org.lamsfoundation.lams" ]
java.util; org.lamsfoundation.lams;
1,588,031
public boolean addElementToView(DataElement dataElement) throws SQLException{ if(dataElement == null) { throw new NullPointerException("Data element added to view cannot be null"); } return resultView.add(dataElement); }
boolean function(DataElement dataElement) throws SQLException{ if(dataElement == null) { throw new NullPointerException(STR); } return resultView.add(dataElement); }
/** * Adds the dataElement to result view. * * @param dataElement - * Data Element to be added. * @return - true (as per the general contract of Collection.add). */
Adds the dataElement to result view
addElementToView
{ "repo_name": "NCIP/wustl-common-package", "path": "src/edu/wustl/common/query/Query.java", "license": "bsd-3-clause", "size": 36536 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
280,593
private ArrayList convertInfixToRPN() { // clear the lists we are going to be using ArrayList RPNList = new ArrayList(10); operatorList.clear(); for (HistoryValue o : historyArrayList) { // if number, push to output if (o instanceof Value) { RP...
ArrayList function() { ArrayList RPNList = new ArrayList(10); operatorList.clear(); for (HistoryValue o : historyArrayList) { if (o instanceof Value) { RPNList.add(o); } else if (((Operator) o).getOperator().charAt(0) == '(') { operatorList.add((Operator) o); } else if (((Operator) o).getOperator().charAt(0) == ')') { ...
/** * Implement Djikstra's shunting-yard algorithm on the historyArrayList ArrayList. */
Implement Djikstra's shunting-yard algorithm on the historyArrayList ArrayList
convertInfixToRPN
{ "repo_name": "rdeckj/mainframeCalc", "path": "app/src/main/java/com/rdecky/asmcalc/history/HistoryBar.java", "license": "mit", "size": 8638 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
784,957
Money getRetailPriceBeforeAdjustments();
Money getRetailPriceBeforeAdjustments();
/** * Returns the retailPrice without adjustments */
Returns the retailPrice without adjustments
getRetailPriceBeforeAdjustments
{ "repo_name": "akdasari/SparkCore", "path": "spark-framework/src/main/java/org/sparkcommerce/core/offer/service/discount/domain/PromotableOrderItem.java", "license": "apache-2.0", "size": 4379 }
[ "org.sparkcommerce.common.money.Money" ]
import org.sparkcommerce.common.money.Money;
import org.sparkcommerce.common.money.*;
[ "org.sparkcommerce.common" ]
org.sparkcommerce.common;
595,904
protected static DriverPropertyInfo[] exposeAsDriverPropertyInfo( Properties info, int slotsToReserve) throws SQLException { return (new ConnectionPropertiesImpl() { private static final long serialVersionUID = 4257801713007640581L; }).exposeAsDriverPropertyInfoInternal(info, slotsToReserve); } private ...
static DriverPropertyInfo[] function( Properties info, int slotsToReserve) throws SQLException { return (new ConnectionPropertiesImpl() { private static final long serialVersionUID = 4257801713007640581L; }).exposeAsDriverPropertyInfoInternal(info, slotsToReserve); } private BooleanConnectionProperty allowLoadLocalInfi...
/** * Exposes all ConnectionPropertyInfo instances as DriverPropertyInfo * * @param info * the properties to load into these ConnectionPropertyInfo * instances * @param slotsToReserve * the number of DPI slots to reserve for 'standard' DPI * properties (user,...
Exposes all ConnectionPropertyInfo instances as DriverPropertyInfo
exposeAsDriverPropertyInfo
{ "repo_name": "vaisaghvt/gameAnalyzer", "path": "mysql-connector-java-5.1.22/src/com/mysql/jdbc/ConnectionPropertiesImpl.java", "license": "mit", "size": 162143 }
[ "com.mysql.jdbc.log.Log", "java.sql.DriverPropertyInfo", "java.sql.SQLException", "java.util.Properties" ]
import com.mysql.jdbc.log.Log; import java.sql.DriverPropertyInfo; import java.sql.SQLException; import java.util.Properties;
import com.mysql.jdbc.log.*; import java.sql.*; import java.util.*;
[ "com.mysql.jdbc", "java.sql", "java.util" ]
com.mysql.jdbc; java.sql; java.util;
2,353,176
private String getEmptyMessage() { switch (m_mode) { case sources: return org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_USAGE_EMPTY_0); case targets: default: return org.opencms.gwt.client.Messages.ge...
String function() { switch (m_mode) { case sources: return org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_USAGE_EMPTY_0); case targets: default: return org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_TARGETS_EMPTY_0); } }
/** * Gets the message to use for an empty relation list.<p> * * @return the message to display for an empty relation list */
Gets the message to use for an empty relation list
getEmptyMessage
{ "repo_name": "gallardo/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/resourceinfo/CmsResourceRelationView.java", "license": "lgpl-2.1", "size": 15682 }
[ "org.opencms.gwt.client.Messages" ]
import org.opencms.gwt.client.Messages;
import org.opencms.gwt.client.*;
[ "org.opencms.gwt" ]
org.opencms.gwt;
1,997,594
for (VisElement vis : structure.elements) { if (!vis.itemsTitle.isEmpty()) return vis; } return structure.elements[0]; } private final String location; // "header" or "footer" public ChartTitleBuilder(ChartStructure structure, String location) { super(findTitleElement(structure), StyleTarget....
for (VisElement vis : structure.elements) { if (!vis.itemsTitle.isEmpty()) return vis; } return structure.elements[0]; } private final String location; public ChartTitleBuilder(ChartStructure structure, String location) { super(findTitleElement(structure), StyleTarget.makeTopLevelTarget(null, "title", location)); this....
/** * Search for the first element with a title defined * * @param structure chart definition * @return titled element, or null */
Search for the first element with a title defined
findTitleElement
{ "repo_name": "Brunel-Visualization/Brunel", "path": "core/src/main/java/org/brunel/build/guides/ChartTitleBuilder.java", "license": "apache-2.0", "size": 2688 }
[ "org.brunel.build.info.ChartStructure", "org.brunel.model.VisElement", "org.brunel.model.style.StyleTarget" ]
import org.brunel.build.info.ChartStructure; import org.brunel.model.VisElement; import org.brunel.model.style.StyleTarget;
import org.brunel.build.info.*; import org.brunel.model.*; import org.brunel.model.style.*;
[ "org.brunel.build", "org.brunel.model" ]
org.brunel.build; org.brunel.model;
2,205,805
@Deprecated public GHContentUpdateResponse createContent(String content, String commitMessage, String path) throws IOException { return createContent().content(content).message(commitMessage).path(path).commit(); }
GHContentUpdateResponse function(String content, String commitMessage, String path) throws IOException { return createContent().content(content).message(commitMessage).path(path).commit(); }
/** * Use {@link #createContent()}. * * @param content * the content * @param commitMessage * the commit message * @param path * the path * @return the gh content update response * @throws IOException * the io exception ...
Use <code>#createContent()</code>
createContent
{ "repo_name": "kohsuke/github-api", "path": "src/main/java/org/kohsuke/github/GHRepository.java", "license": "mit", "size": 103118 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,289,047
List<VmNetworkInterface> getAllForVm(Guid id, Guid userID, boolean isFiltered);
List<VmNetworkInterface> getAllForVm(Guid id, Guid userID, boolean isFiltered);
/** * Retrieves all interfaces for the given VM id, * with optional filtering * * @param id * the Vm id * @param userID * the ID of the user requesting the information * @param isFiltered * Whether the results should be filtered according to ...
Retrieves all interfaces for the given VM id, with optional filtering
getAllForVm
{ "repo_name": "Dhandapani/gluster-ovirt", "path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmNetworkInterfaceDAO.java", "license": "apache-2.0", "size": 1320 }
[ "java.util.List", "org.ovirt.engine.core.common.businessentities.VmNetworkInterface", "org.ovirt.engine.core.compat.Guid" ]
import java.util.List; import org.ovirt.engine.core.common.businessentities.VmNetworkInterface; import org.ovirt.engine.core.compat.Guid;
import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
2,428,157
@SuppressWarnings("unchecked") public void doGB() { if (isGB && testGB) { return; } //logger.warn("GB computing"); List<GenPolynomial<C>> G = getList(); logger.info("GB computing = " + G); G = bb.GB(G); if (isTopt) { List<Integer> p...
@SuppressWarnings(STR) void function() { if (isGB && testGB) { return; } List<GenPolynomial<C>> G = getList(); logger.info(STR + G); G = bb.GB(G); if (isTopt) { List<Integer> perm = ((OptimizedPolynomialList<C>) list).perm; list = new OptimizedPolynomialList<C>(perm, getRing(), G); } else { list = new PolynomialList<C>...
/** * Do Groebner Base. compute the Groebner Base for this ideal. */
Do Groebner Base. compute the Groebner Base for this ideal
doGB
{ "repo_name": "breandan/java-algebra-system", "path": "src/edu/jas/application/Ideal.java", "license": "gpl-2.0", "size": 106207 }
[ "edu.jas.poly.GenPolynomial", "edu.jas.poly.OptimizedPolynomialList", "edu.jas.poly.PolynomialList", "java.util.List" ]
import edu.jas.poly.GenPolynomial; import edu.jas.poly.OptimizedPolynomialList; import edu.jas.poly.PolynomialList; import java.util.List;
import edu.jas.poly.*; import java.util.*;
[ "edu.jas.poly", "java.util" ]
edu.jas.poly; java.util;
2,448,364
public void cleanup() { Gene gene; int size = m_genes.size(); for (int i = 0; i < size; i++) { gene = (Gene) m_genes.get(i); gene.cleanup(); } }
void function() { Gene gene; int size = m_genes.size(); for (int i = 0; i < size; i++) { gene = (Gene) m_genes.get(i); gene.cleanup(); } }
/** * Executed by the genetic engine when this Gene instance is no * longer needed and should perform any necessary resource cleanup. * * @author Klaus Meffert * @since 1.1 */
Executed by the genetic engine when this Gene instance is no longer needed and should perform any necessary resource cleanup
cleanup
{ "repo_name": "jsubercaze/parallelJGAP", "path": "src/main/java/org/jgap/impl/CompositeGene.java", "license": "lgpl-2.1", "size": 22495 }
[ "org.jgap.Gene" ]
import org.jgap.Gene;
import org.jgap.*;
[ "org.jgap" ]
org.jgap;
2,790,791
public Result<Void> addPerm(AuthzTrans trans, RoleDAO.Data role, PermDAO.Data perm) { // Note: Prepared Statements for Collection updates aren't supported String pencode = perm.encode(); try { getSession(trans).execute(UPDATE_SP + TABLE + " SET perms = perms + {'" + pencode + "'} WHERE " + "ns = '"...
Result<Void> function(AuthzTrans trans, RoleDAO.Data role, PermDAO.Data perm) { String pencode = perm.encode(); try { getSession(trans).execute(UPDATE_SP + TABLE + STR + pencode + STR + STR + role.ns + STR + role.name + "';"); } catch (DriverException APIException IOException e) { reportPerhapsReset(trans,e); return Re...
/** * Add a single Permission to the Role's Permission Collection * * @param trans * @param role * @param perm * @param type * @param action * @return */
Add a single Permission to the Role's Permission Collection
addPerm
{ "repo_name": "att/AAF", "path": "authz/authz-cass/src/main/java/com/att/dao/aaf/cass/RoleDAO.java", "license": "bsd-3-clause", "size": 11863 }
[ "com.att.authz.env.AuthzTrans", "com.att.authz.layer.Result", "com.att.dao.CassAccess", "com.att.inno.env.APIException", "com.datastax.driver.core.exceptions.DriverException", "java.io.IOException" ]
import com.att.authz.env.AuthzTrans; import com.att.authz.layer.Result; import com.att.dao.CassAccess; import com.att.inno.env.APIException; import com.datastax.driver.core.exceptions.DriverException; import java.io.IOException;
import com.att.authz.env.*; import com.att.authz.layer.*; import com.att.dao.*; import com.att.inno.env.*; import com.datastax.driver.core.exceptions.*; import java.io.*;
[ "com.att.authz", "com.att.dao", "com.att.inno", "com.datastax.driver", "java.io" ]
com.att.authz; com.att.dao; com.att.inno; com.datastax.driver; java.io;
2,651,633
public void println() throws IOException { flushText(); super.println(); }
void function() throws IOException { flushText(); super.println(); }
/** * Prints a newline */
Prints a newline
println
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/jsp/java/JspJavaWriter.java", "license": "gpl-2.0", "size": 6013 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
413,831
@Then("throw $exception") public boolean throwAnException(String value) throws Exception { logger.info("Throw [" + value.toString() + "]"); throw new Exception(value); }
@Then(STR) boolean function(String value) throws Exception { logger.info(STR + value.toString() + "]"); throw new Exception(value); }
/** * just throw an exception with text value * * @param value * @return * @throws Exception */
just throw an exception with text value
throwAnException
{ "repo_name": "yroffin/jbehaviour-tools", "path": "jbehaviour-engine/src/main/java/org/jbehaviour/plugins/system/SystemSteps.java", "license": "apache-2.0", "size": 8489 }
[ "org.jbehaviour.annotation.Then" ]
import org.jbehaviour.annotation.Then;
import org.jbehaviour.annotation.*;
[ "org.jbehaviour.annotation" ]
org.jbehaviour.annotation;
2,290,265
public void removeJobEntry( int i ) { JobEntryCopy deleted = jobcopies.remove( i ); if ( deleted != null ) { // give step a chance to cleanup deleted.setParentJobMeta( null ); if ( deleted.getEntry() instanceof MissingEntry ) { removeMissingEntry( (MissingEntry) deleted.getEntry() );...
void function( int i ) { JobEntryCopy deleted = jobcopies.remove( i ); if ( deleted != null ) { deleted.setParentJobMeta( null ); if ( deleted.getEntry() instanceof MissingEntry ) { removeMissingEntry( (MissingEntry) deleted.getEntry() ); } } setChanged(); }
/** * Removes the job entry. * * @param i the i */
Removes the job entry
removeJobEntry
{ "repo_name": "AlexanderBuloichik/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/job/JobMeta.java", "license": "apache-2.0", "size": 88100 }
[ "org.pentaho.di.job.entries.missing.MissingEntry", "org.pentaho.di.job.entry.JobEntryCopy" ]
import org.pentaho.di.job.entries.missing.MissingEntry; import org.pentaho.di.job.entry.JobEntryCopy;
import org.pentaho.di.job.entries.missing.*; import org.pentaho.di.job.entry.*;
[ "org.pentaho.di" ]
org.pentaho.di;
27,121
static ColumnPage newDecimalColumnPage(TableSpec.ColumnSpec columnSpec, byte[] lvEncodedBytes, String compressorName) throws MemoryException { DecimalConverterFactory.DecimalConverter decimalConverter = DecimalConverterFactory.INSTANCE.getDecimalConverter(columnSpec.getPrecision(), colum...
static ColumnPage newDecimalColumnPage(TableSpec.ColumnSpec columnSpec, byte[] lvEncodedBytes, String compressorName) throws MemoryException { DecimalConverterFactory.DecimalConverter decimalConverter = DecimalConverterFactory.INSTANCE.getDecimalConverter(columnSpec.getPrecision(), columnSpec.getScale()); int size = de...
/** * Create a new column page for decimal page */
Create a new column page for decimal page
newDecimalColumnPage
{ "repo_name": "sgururajshetty/carbondata", "path": "core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java", "license": "apache-2.0", "size": 18668 }
[ "org.apache.carbondata.core.constants.CarbonCommonConstants", "org.apache.carbondata.core.datastore.TableSpec", "org.apache.carbondata.core.memory.MemoryException", "org.apache.carbondata.core.metadata.datatype.DataTypes", "org.apache.carbondata.core.metadata.datatype.DecimalConverterFactory" ]
import org.apache.carbondata.core.constants.CarbonCommonConstants; import org.apache.carbondata.core.datastore.TableSpec; import org.apache.carbondata.core.memory.MemoryException; import org.apache.carbondata.core.metadata.datatype.DataTypes; import org.apache.carbondata.core.metadata.datatype.DecimalConverterFactory;
import org.apache.carbondata.core.constants.*; import org.apache.carbondata.core.datastore.*; import org.apache.carbondata.core.memory.*; import org.apache.carbondata.core.metadata.datatype.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
10,083
public final void openMessagesManagerDialog() { QueueMethodCall<Void> methodCall = new QueueMethodCall<Void>(); methodCall.methodId = openMessagesManagerDialog_METHOD_ID; queueMethodCall( methodCall ); Log.debug("Invoking method openMessagesManagerDialog from " + siteSectionPrefix ); }
final void function() { QueueMethodCall<Void> methodCall = new QueueMethodCall<Void>(); methodCall.methodId = openMessagesManagerDialog_METHOD_ID; queueMethodCall( methodCall ); Log.debug(STR + siteSectionPrefix ); }
/** * Allows to open the messages manager. The reason we do it here is * because of the instance of the rooms manager that has to be used. */
Allows to open the messages manager. The reason we do it here is because of the instance of the rooms manager that has to be used
openMessagesManagerDialog
{ "repo_name": "ivan-zapreev/x-cure-chat", "path": "src/com/xcurechat/client/chat/RoomsManagerUIProxy.java", "license": "gpl-3.0", "size": 4115 }
[ "com.allen_sauer.gwt.log.client.Log" ]
import com.allen_sauer.gwt.log.client.Log;
import com.allen_sauer.gwt.log.client.*;
[ "com.allen_sauer.gwt" ]
com.allen_sauer.gwt;
1,334,640
@SuppressWarnings({"unchecked", "rawtypes"}) // Safe since null can be cast to any type ListenableFuture<V> typedNull = (ListenableFuture) ImmediateSuccessfulFuture.NULL_FUTURE; return typedNull; }
@SuppressWarnings({STR, STR}) ListenableFuture<V> typedNull = (ListenableFuture) ImmediateSuccessfulFuture.NULL_FUTURE; return typedNull; }
/** * Returns a future that contains a null value. * * <p>This should be used any time a null value is needed as it uses a static ListenableFuture * that contains null, and thus will not allocate. */
Returns a future that contains a null value. This should be used any time a null value is needed as it uses a static ListenableFuture that contains null, and thus will not allocate
nullFuture
{ "repo_name": "AndroidX/androidx", "path": "camera/camera-viewfinder/src/main/java/androidx/camera/viewfinder/internal/utils/futures/ImmediateFuture.java", "license": "apache-2.0", "size": 5000 }
[ "com.google.common.util.concurrent.ListenableFuture" ]
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.*;
[ "com.google.common" ]
com.google.common;
1,539,642
@NonNull public Builder setMessageId(@NonNull String messageId) { bundle.putString(MessagePayloadKeys.MSGID, messageId); return this; }
Builder function(@NonNull String messageId) { bundle.putString(MessagePayloadKeys.MSGID, messageId); return this; }
/** * Sets the messages ID. * * @param messageId ID of the message. This is generated by the application. It must be unique * for each message. This allows error callbacks and debugging. */
Sets the messages ID
setMessageId
{ "repo_name": "firebase/firebase-android-sdk", "path": "firebase-messaging/src/main/java/com/google/firebase/messaging/RemoteMessage.java", "license": "apache-2.0", "size": 24674 }
[ "androidx.annotation.NonNull", "com.google.firebase.messaging.Constants" ]
import androidx.annotation.NonNull; import com.google.firebase.messaging.Constants;
import androidx.annotation.*; import com.google.firebase.messaging.*;
[ "androidx.annotation", "com.google.firebase" ]
androidx.annotation; com.google.firebase;
1,834,986
@Nonnull public static String getDisplayableBranchText(@Nonnull GitRepository repository) { GitRepository.State state = repository.getState(); if(state == GitRepository.State.DETACHED) { String currentRevision = repository.getCurrentRevision(); assert currentRevision != null : "Current revision can't b...
static String function(@Nonnull GitRepository repository) { GitRepository.State state = repository.getState(); if(state == GitRepository.State.DETACHED) { String currentRevision = repository.getCurrentRevision(); assert currentRevision != null : STR; return DvcsUtil.getShortHash(currentRevision); } String prefix = STR ...
/** * Returns the text that is displaying current branch. * In the simple case it is just the branch name, but in detached HEAD state it displays the hash or "rebasing master". */
Returns the text that is displaying current branch. In the simple case it is just the branch name, but in detached HEAD state it displays the hash or "rebasing master"
getDisplayableBranchText
{ "repo_name": "consulo/consulo-git", "path": "plugin/src/main/java/git4idea/branch/GitBranchUtil.java", "license": "apache-2.0", "size": 15849 }
[ "com.intellij.dvcs.DvcsUtil", "javax.annotation.Nonnull" ]
import com.intellij.dvcs.DvcsUtil; import javax.annotation.Nonnull;
import com.intellij.dvcs.*; import javax.annotation.*;
[ "com.intellij.dvcs", "javax.annotation" ]
com.intellij.dvcs; javax.annotation;
981,918
public interface HttpRetrys { ServiceResponse<Void> head408() throws ErrorException, IOException;
interface HttpRetrys { ServiceResponse<Void> function() throws ErrorException, IOException;
/** * Return 408 status code, then 200 after retry. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the {@link ServiceResponse} object if successful. */
Return 408 status code, then 200 after retry
head408
{ "repo_name": "John-Hart/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/HttpRetrys.java", "license": "mit", "size": 12077 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
2,824,165
@Override public Adapter createTreeObjectAdapter() { if (treeObjectItemProvider == null) { treeObjectItemProvider = new TreeObjectItemProvider(this); } return treeObjectItemProvider; } protected ED2ItemProvider ed2ItemProvider;
Adapter function() { if (treeObjectItemProvider == null) { treeObjectItemProvider = new TreeObjectItemProvider(this); } return treeObjectItemProvider; } protected ED2ItemProvider ed2ItemProvider;
/** * This creates an adapter for a {@link es.ucm.fdi.emf.model.ed2.TreeObject}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>es.ucm.fdi.emf.model.ed2.TreeObject</code>.
createTreeObjectAdapter
{ "repo_name": "RubenM13/E-EDD-2.0", "path": "es.ucm.fdi.ed2.emf.edit/src/es/ucm/fdi/emf/model/ed2/provider/Ed2ItemProviderAdapterFactory.java", "license": "gpl-3.0", "size": 9859 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
784,997
public static Set<Path> getRequiredFields(EntityMetadata md, Projection p, QueryExpression q, Sort s) { Set<Path> fields=new HashSet<>(); FieldCursor cursor=md.ge...
static Set<Path> function(EntityMetadata md, Projection p, QueryExpression q, Sort s) { Set<Path> fields=new HashSet<>(); FieldCursor cursor=md.getFieldCursor(); while(cursor.next()) { Path field=cursor.getCurrentPath(); FieldTreeNode node=cursor.getCurrentNode(); if( (node instanceof ObjectField) (node instanceof Arra...
/** * Returns all the fields required to evaluate the given projection, query, and sort * * @param md Entity metadata * @param p Projection * @param q Query * @param s Sort * * All arguments are optional. The returned set contains the * fields required to evaluate all the no...
Returns all the fields required to evaluate the given projection, query, and sort
getRequiredFields
{ "repo_name": "BVulaj/lightblue-mongo", "path": "crud/src/main/java/com/redhat/lightblue/crud/mongo/Translator.java", "license": "gpl-3.0", "size": 46540 }
[ "com.redhat.lightblue.metadata.ArrayField", "com.redhat.lightblue.metadata.EntityMetadata", "com.redhat.lightblue.metadata.FieldCursor", "com.redhat.lightblue.metadata.FieldTreeNode", "com.redhat.lightblue.metadata.ObjectArrayElement", "com.redhat.lightblue.metadata.ObjectField", "com.redhat.lightblue.q...
import com.redhat.lightblue.metadata.ArrayField; import com.redhat.lightblue.metadata.EntityMetadata; import com.redhat.lightblue.metadata.FieldCursor; import com.redhat.lightblue.metadata.FieldTreeNode; import com.redhat.lightblue.metadata.ObjectArrayElement; import com.redhat.lightblue.metadata.ObjectField; import co...
import com.redhat.lightblue.metadata.*; import com.redhat.lightblue.query.*; import com.redhat.lightblue.util.*; import java.util.*;
[ "com.redhat.lightblue", "java.util" ]
com.redhat.lightblue; java.util;
2,887,293
public static <R> R propagateFn(final ThrowsSupplier<R> callback) { try { return callback.get(); } catch (final Throwable throwable) { rethrow(throwable); } throw new IllegalStateException("EhCoreSupport.rethrow must always return or throw an exception"); ...
static <R> R function(final ThrowsSupplier<R> callback) { try { return callback.get(); } catch (final Throwable throwable) { rethrow(throwable); } throw new IllegalStateException(STR); }
/** * Executes a supplier callback that throws exceptions and if exceptions are raised they get propagated as is, but * all exceptions are propagated as unchecked exceptions. * * @param <R> The return type * @param callback The supplier callback to execute * @return The value returned...
Executes a supplier callback that throws exceptions and if exceptions are raised they get propagated as is, but all exceptions are propagated as unchecked exceptions
propagateFn
{ "repo_name": "LogicRunner/swblocks-jbl", "path": "src/main/java/org/swblocks/jbl/eh/EhCoreSupport.java", "license": "apache-2.0", "size": 17312 }
[ "org.swblocks.jbl.functional.ThrowsSupplier" ]
import org.swblocks.jbl.functional.ThrowsSupplier;
import org.swblocks.jbl.functional.*;
[ "org.swblocks.jbl" ]
org.swblocks.jbl;
616,424
@TargetApi(19) @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.itemMainmenuRefresh: loadRemoteEntries(); break; case R.id.itemMainmenuImport: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Intent openIntent = new Intent(Intent.ACT...
@TargetApi(19) boolean function(MenuItem item) { switch (item.getItemId()) { case R.id.itemMainmenuRefresh: loadRemoteEntries(); break; case R.id.itemMainmenuImport: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Intent openIntent = new Intent(Intent.ACTION_OPEN_DOCUMENT); openIntent.setType("*/*"); openInt...
/** * Called if item in option menu is selected. * * @param item * The chosen menu item * @return boolean true/false */
Called if item in option menu is selected
onOptionsItemSelected
{ "repo_name": "nelenkov/andlytics", "path": "src/com/github/andlyticsproject/Main.java", "license": "apache-2.0", "size": 25322 }
[ "android.annotation.TargetApi", "android.content.Intent", "android.net.Uri", "android.os.Build", "android.widget.Toast", "com.actionbarsherlock.view.MenuItem", "com.github.andlyticsproject.Preferences", "com.github.andlyticsproject.about.AboutActivity", "com.github.andlyticsproject.io.StatsCsvReader...
import android.annotation.TargetApi; import android.content.Intent; import android.net.Uri; import android.os.Build; import android.widget.Toast; import com.actionbarsherlock.view.MenuItem; import com.github.andlyticsproject.Preferences; import com.github.andlyticsproject.about.AboutActivity; import com.github.andlytic...
import android.annotation.*; import android.content.*; import android.net.*; import android.os.*; import android.widget.*; import com.actionbarsherlock.view.*; import com.github.andlyticsproject.*; import com.github.andlyticsproject.about.*; import com.github.andlyticsproject.io.*; import java.io.*;
[ "android.annotation", "android.content", "android.net", "android.os", "android.widget", "com.actionbarsherlock.view", "com.github.andlyticsproject", "java.io" ]
android.annotation; android.content; android.net; android.os; android.widget; com.actionbarsherlock.view; com.github.andlyticsproject; java.io;
1,890,990
public void insertBefore(String expression, NewElement newElement) { single(getElements(expression)).insertBefore(newElement); }
void function(String expression, NewElement newElement) { single(getElements(expression)).insertBefore(newElement); }
/** * Inserts element before referenced one. All comments related before referenced element going to * have same positions like they had before. * * <p>If there are more then only referenced element were found {@link XMLTreeException} will be * thrown * * @param expression xpath expression to searc...
Inserts element before referenced one. All comments related before referenced element going to have same positions like they had before. If there are more then only referenced element were found <code>XMLTreeException</code> will be thrown
insertBefore
{ "repo_name": "akervern/che", "path": "core/commons/che-core-commons-xml/src/main/java/org/eclipse/che/commons/xml/XMLTree.java", "license": "epl-1.0", "size": 35812 }
[ "org.eclipse.che.commons.xml.XMLTreeUtil" ]
import org.eclipse.che.commons.xml.XMLTreeUtil;
import org.eclipse.che.commons.xml.*;
[ "org.eclipse.che" ]
org.eclipse.che;
1,110,042
public static RunfilesSupport withExecutable( RuleContext ruleContext, Runfiles runfiles, Artifact executable, List<String> appendingArgs) { return new RunfilesSupport( ruleContext, executable, runfiles, computeArgs(ruleContext, CommandLine.of(appendingArgs))); }
static RunfilesSupport function( RuleContext ruleContext, Runfiles runfiles, Artifact executable, List<String> appendingArgs) { return new RunfilesSupport( ruleContext, executable, runfiles, computeArgs(ruleContext, CommandLine.of(appendingArgs))); }
/** * Creates and returns a {@link RunfilesSupport} object for the given rule and executable. Note * that this method calls back into the passed in rule to obtain the runfiles. */
Creates and returns a <code>RunfilesSupport</code> object for the given rule and executable. Note that this method calls back into the passed in rule to obtain the runfiles
withExecutable
{ "repo_name": "spxtr/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/RunfilesSupport.java", "license": "apache-2.0", "size": 18505 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.actions.CommandLine", "java.util.List" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.actions.CommandLine; import java.util.List;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.actions.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
2,675,855
@ApiModelProperty(value = "") public GenericModelModelMath getModelMath() { return modelMath; }
@ApiModelProperty(value = "") GenericModelModelMath function() { return modelMath; }
/** * Get modelMath * @return modelMath **/
Get modelMath
getModelMath
{ "repo_name": "SiLeBAT/FSK-Lab", "path": "de.bund.bfr.knime.fsklab.metadata.model/gen/de/bund/bfr/metadata/swagger/GenericModel.java", "license": "gpl-3.0", "size": 4742 }
[ "de.bund.bfr.metadata.swagger.GenericModelModelMath", "io.swagger.annotations.ApiModelProperty" ]
import de.bund.bfr.metadata.swagger.GenericModelModelMath; import io.swagger.annotations.ApiModelProperty;
import de.bund.bfr.metadata.swagger.*; import io.swagger.annotations.*;
[ "de.bund.bfr", "io.swagger.annotations" ]
de.bund.bfr; io.swagger.annotations;
921,540
public Date getSuppressedTime() { return m_delegate.getSuppressedTime(); }
Date function() { return m_delegate.getSuppressedTime(); }
/** * <p>Getter for the field <code>suppressedTime</code>.</p> * * @return a {@link java.util.Date} object. */
Getter for the field <code>suppressedTime</code>
getSuppressedTime
{ "repo_name": "peternixon/opennms-mirror", "path": "opennms-webapp/src/main/java/org/opennms/web/alarm/Alarm.java", "license": "gpl-2.0", "size": 9542 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,998,697
public void authenticateOnNextAlert(String username, String password) { Credentials credentials = new UserAndPassword(username, password); Alert alert = driver.switchTo().alert(); alert.authenticateUsing(credentials); }
void function(String username, String password) { Credentials credentials = new UserAndPassword(username, password); Alert alert = driver.switchTo().alert(); alert.authenticateUsing(credentials); }
/** * Authenticates the user using the given username and password. This will * work only if the credentials are requested through an alert window. * * @param username * the user name * @param password * the password */
Authenticates the user using the given username and password. This will work only if the credentials are requested through an alert window
authenticateOnNextAlert
{ "repo_name": "ludovicianul/selenium-on-steroids", "path": "src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java", "license": "apache-2.0", "size": 38225 }
[ "org.openqa.selenium.Alert", "org.openqa.selenium.security.Credentials", "org.openqa.selenium.security.UserAndPassword" ]
import org.openqa.selenium.Alert; import org.openqa.selenium.security.Credentials; import org.openqa.selenium.security.UserAndPassword;
import org.openqa.selenium.*; import org.openqa.selenium.security.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,238,759
@Override protected Long convertNotNull(BigInteger data) { return data.longValue(); }
Long function(BigInteger data) { return data.longValue(); }
/** * Converts <code>BigInteger</code> to <code>Long</code>. */
Converts <code>BigInteger</code> to <code>Long</code>
convertNotNull
{ "repo_name": "nortal/araneaframework", "path": "src/org/araneaframework/uilib/form/converter/BigIntegerToLongConverter.java", "license": "apache-2.0", "size": 1437 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
24,304
@Column(name = "RNT_CAR_DTL", length = 100, nullable = true) public String getRentalCarDetailText() { return rentalCarDetailText; }
@Column(name = STR, length = 100, nullable = true) String function() { return rentalCarDetailText; }
/** * Gets the rentalCarDetailText attribute. * @return Returns the rentalCarDetailText. */
Gets the rentalCarDetailText attribute
getRentalCarDetailText
{ "repo_name": "bhutchinson/kfs", "path": "kfs-tem/src/main/java/org/kuali/kfs/module/tem/businessobject/AgencyStagingData.java", "license": "agpl-3.0", "size": 52782 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
2,056,282
public static int getMinSdkVersionFromBinaryAndroidManifest( ByteBuffer androidManifestContents) throws MinSdkVersionException { // IMPLEMENTATION NOTE: Minimum supported Android platform version number is declared using // uses-sdk elements which are children of the top-level manifest e...
static int function( ByteBuffer androidManifestContents) throws MinSdkVersionException { try { int result = 1; AndroidBinXmlParser parser = new AndroidBinXmlParser(androidManifestContents); int eventType = parser.getEventType(); while (eventType != AndroidBinXmlParser.EVENT_END_DOCUMENT) { if ((eventType == AndroidBinX...
/** * Returns the lowest Android platform version (API Level) supported by an APK with the * provided {@code AndroidManifest.xml}. * * @param androidManifestContents contents of {@code AndroidManifest.xml} in binary Android * resource format * * @throws MinSdkVersionException i...
Returns the lowest Android platform version (API Level) supported by an APK with the provided AndroidManifest.xml
getMinSdkVersionFromBinaryAndroidManifest
{ "repo_name": "4455jkjh/apktool", "path": "apktool/src/main/java/com/android/apksig/apk/ApkUtils.java", "license": "apache-2.0", "size": 14977 }
[ "com.android.apksig.internal.apk.AndroidBinXmlParser", "com.android.apksig.internal.util.Pair", "java.nio.ByteBuffer", "java.util.Comparator" ]
import com.android.apksig.internal.apk.AndroidBinXmlParser; import com.android.apksig.internal.util.Pair; import java.nio.ByteBuffer; import java.util.Comparator;
import com.android.apksig.internal.apk.*; import com.android.apksig.internal.util.*; import java.nio.*; import java.util.*;
[ "com.android.apksig", "java.nio", "java.util" ]
com.android.apksig; java.nio; java.util;
2,684,609
@ReactMethod public void replaceExistingNonRootView(int oldTag, int newTag) { if (mShadowNodeRegistry.isRootNode(oldTag) || mShadowNodeRegistry.isRootNode(newTag)) { throw new IllegalViewOperationException("Trying to add or replace a root tag!"); } ReactShadowNode oldNode = mShadowNodeRegistry.ge...
void function(int oldTag, int newTag) { if (mShadowNodeRegistry.isRootNode(oldTag) mShadowNodeRegistry.isRootNode(newTag)) { throw new IllegalViewOperationException(STR); } ReactShadowNode oldNode = mShadowNodeRegistry.getNode(oldTag); if (oldNode == null) { throw new IllegalViewOperationException(STR + oldTag); } Reac...
/** * Replaces the View specified by oldTag with the View specified by newTag within oldTag's parent. * This resolves to a simple {@link #manageChildren} call, but React doesn't have enough info in * JS to formulate it itself. */
Replaces the View specified by oldTag with the View specified by newTag within oldTag's parent. This resolves to a simple <code>#manageChildren</code> call, but React doesn't have enough info in JS to formulate it itself
replaceExistingNonRootView
{ "repo_name": "marlonandrade/react-native", "path": "ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java", "license": "bsd-3-clause", "size": 32293 }
[ "com.facebook.react.bridge.Arguments", "com.facebook.react.bridge.WritableArray" ]
import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableArray;
import com.facebook.react.bridge.*;
[ "com.facebook.react" ]
com.facebook.react;
18,289
@Test(dependsOnMethods = {"testOfflineNode", "testOnlineNode"}) public void testRunningVM() { Mapping c = new DefaultMapping(); c.addOnlineNode(ns.get(0)); c.addOfflineNode(ns.get(1)); Assert.assertTrue(c.addRunningVM(vms.get(0), ns.get(0))); Assert.assertTrue(c.getRunni...
@Test(dependsOnMethods = {STR, STR}) void function() { Mapping c = new DefaultMapping(); c.addOnlineNode(ns.get(0)); c.addOfflineNode(ns.get(1)); Assert.assertTrue(c.addRunningVM(vms.get(0), ns.get(0))); Assert.assertTrue(c.getRunningVMs().size() == 1 && c.isRunning(vms.get(0))); Assert.assertEquals(c.getNbVMs(), 1); A...
/** * Test the addition/removal of running VM. No state switch */
Test the addition/removal of running VM. No state switch
testRunningVM
{ "repo_name": "btrplace/scheduler-UCC-15", "path": "api/src/test/java/org/btrplace/model/DefaultMappingTest.java", "license": "lgpl-3.0", "size": 23467 }
[ "java.util.HashSet", "java.util.Set", "org.testng.Assert", "org.testng.annotations.Test" ]
import java.util.HashSet; import java.util.Set; import org.testng.Assert; import org.testng.annotations.Test;
import java.util.*; import org.testng.*; import org.testng.annotations.*;
[ "java.util", "org.testng", "org.testng.annotations" ]
java.util; org.testng; org.testng.annotations;
1,731,822
@Override public void processDumpFileContents(InputStream inputStream, MwDumpFile dumpFile) { logger.info("Processing JSON dump file " + dumpFile.toString()); try { try { MappingIterator<JacksonTermedStatementDocument> documentIterator = documentReader .readValues(inputStream); documentIte...
void function(InputStream inputStream, MwDumpFile dumpFile) { logger.info(STR + dumpFile.toString()); try { try { MappingIterator<JacksonTermedStatementDocument> documentIterator = documentReader .readValues(inputStream); documentIterator.getParser().disable(Feature.AUTO_CLOSE_SOURCE); while (documentIterator.hasNextVa...
/** * Process dump file data from the given input stream. This method uses the * efficient Jackson {@link MappingIterator}. However, this class cannot * recover from processing errors. If an error occurs in one entity, the * (presumably) less efficient processing method * {@link #processDumpFileContentsRecove...
Process dump file data from the given input stream. This method uses the efficient Jackson <code>MappingIterator</code>. However, this class cannot recover from processing errors. If an error occurs in one entity, the (presumably) less efficient processing method <code>#processDumpFileContentsRecovery(InputStream)</cod...
processDumpFileContents
{ "repo_name": "dswarm/Wikidata-Toolkit", "path": "wdtk-dumpfiles/src/main/java/org/wikidata/wdtk/dumpfiles/JsonDumpFileProcessor.java", "license": "apache-2.0", "size": 6246 }
[ "com.fasterxml.jackson.core.JsonParser", "com.fasterxml.jackson.core.JsonProcessingException", "com.fasterxml.jackson.databind.MappingIterator", "java.io.IOException", "java.io.InputStream", "org.wikidata.wdtk.datamodel.json.jackson.JacksonTermedStatementDocument" ]
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.MappingIterator; import java.io.IOException; import java.io.InputStream; import org.wikidata.wdtk.datamodel.json.jackson.JacksonTermedStatementDocument;
import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import java.io.*; import org.wikidata.wdtk.datamodel.json.jackson.*;
[ "com.fasterxml.jackson", "java.io", "org.wikidata.wdtk" ]
com.fasterxml.jackson; java.io; org.wikidata.wdtk;
2,452,180
@Test public void testParse2() throws Exception { DummyRegisteredCommand command = getCommand(); CommandInfo info = new CommandInfoBuilder("dummy").floatingParams("param").build(); command.setInfo(info); ArgumentParseResults results; results = parser.parse(command, ne...
void function() throws Exception { DummyRegisteredCommand command = getCommand(); CommandInfo info = new CommandInfoBuilder("dummy").floatingParams("param").build(); command.setInfo(info); ArgumentParseResults results; results = parser.parse(command, new String[]{STR, "\"argSTRwithSTRspaces\STRMissingArgumentException ...
/** * Test parsing; 1 required floating argument expected. */
Test parsing; 1 required floating argument expected
testParse2
{ "repo_name": "JCThePants/NucleusFramework", "path": "tests/src/com/jcwhatever/nucleus/internal/managed/commands/ArgumentParserTest.java", "license": "mit", "size": 11743 }
[ "com.jcwhatever.nucleus.internal.managed.commands.DummyRegisteredCommand", "com.jcwhatever.nucleus.managed.commands.CommandInfo", "com.jcwhatever.nucleus.managed.commands.exceptions.InvalidArgumentException", "com.jcwhatever.nucleus.managed.commands.exceptions.MissingArgumentException" ]
import com.jcwhatever.nucleus.internal.managed.commands.DummyRegisteredCommand; import com.jcwhatever.nucleus.managed.commands.CommandInfo; import com.jcwhatever.nucleus.managed.commands.exceptions.InvalidArgumentException; import com.jcwhatever.nucleus.managed.commands.exceptions.MissingArgumentException;
import com.jcwhatever.nucleus.internal.managed.commands.*; import com.jcwhatever.nucleus.managed.commands.*; import com.jcwhatever.nucleus.managed.commands.exceptions.*;
[ "com.jcwhatever.nucleus" ]
com.jcwhatever.nucleus;
328,668
public static APIConsumer getLoggedInUserConsumer() throws APIManagementException { return APIManagerFactory.getInstance().getAPIConsumer(getLoggedInUsername()); }
static APIConsumer function() throws APIManagementException { return APIManagerFactory.getInstance().getAPIConsumer(getLoggedInUsername()); }
/** * Returns an APIConsumer which is corresponding to the current logged in user taken from the carbon context * * @return an APIConsumer which is corresponding to the current logged in user * @throws APIManagementException */
Returns an APIConsumer which is corresponding to the current logged in user taken from the carbon context
getLoggedInUserConsumer
{ "repo_name": "fazlan-nazeem/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/java/org/wso2/carbon/apimgt/rest/api/common/RestApiCommonUtil.java", "license": "apache-2.0", "size": 22347 }
[ "org.wso2.carbon.apimgt.api.APIConsumer", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.impl.APIManagerFactory" ]
import org.wso2.carbon.apimgt.api.APIConsumer; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.APIManagerFactory;
import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,423,882
protected void validateActionString(String action) { if(action == null) throw new NullPointerException("The action string for a permission cannot be null."); if(action.isEmpty()) throw new InvalidParameterException("The action string cannot be empty."); // TODO: perform a regex check }
void function(String action) { if(action == null) throw new NullPointerException(STR); if(action.isEmpty()) throw new InvalidParameterException(STR); }
/** * Checks that the given action string is valid. * * @param action - the action string */
Checks that the given action string is valid
validateActionString
{ "repo_name": "cadyyan/MCManager", "path": "mod-src/com/theisleoffavalon/mcmanager/permission/BasePermission.java", "license": "mit", "size": 5892 }
[ "java.security.InvalidParameterException" ]
import java.security.InvalidParameterException;
import java.security.*;
[ "java.security" ]
java.security;
2,207,233
public boolean loadUser() { // Get the entered username from the EditText. EditText usernameEditText = (EditText) findViewById(R.id.usernameEditText); String username = usernameEditText.getText().toString(); // Username is required to be entered. if (!username.isEmpty() && !...
boolean function() { EditText usernameEditText = (EditText) findViewById(R.id.usernameEditText); String username = usernameEditText.getText().toString(); if (!username.isEmpty() && !username.trim().equals(STRSTR"); return true; } else { usernameEditText.setError(getResources().getString(R.string.entry_required)); retur...
/** * Triggers the Model to load the Participant information given the entered username. * Called when user presses the activity_login button after entering their username. * * @return boolean value that informs if the user's information was loaded properly. */
Triggers the Model to load the Participant information given the entered username. Called when user presses the activity_login button after entering their username
loadUser
{ "repo_name": "CMPUT301W17T22/MoodSwing", "path": "app/src/main/java/com/ualberta/cmput301w17t22/moodswing/LoginActivity.java", "license": "gpl-3.0", "size": 7191 }
[ "android.widget.EditText" ]
import android.widget.EditText;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,593,779
BasicJPAServiceTest.LOG.debug("start id generation test for " + type); final Set<POJOCLASS> objectes = Sets.newLinkedHashSet(); for (int i = 0; i < 10; i++) { final PROXYPOJOCLASS proxyObject = createObject(); objectes.add(proxyObject.getObject()); } Assert.assertEquals(type + "s set size should be...
BasicJPAServiceTest.LOG.debug(STR + type); final Set<POJOCLASS> objectes = Sets.newLinkedHashSet(); for (int i = 0; i < 10; i++) { final PROXYPOJOCLASS proxyObject = createObject(); objectes.add(proxyObject.getObject()); } Assert.assertEquals(type + STR, 10, objectes.size()); for (final POJOCLASS object : objectes) { j...
/** * Test for identifier generation: Creates ten instances (incl. identifier generation) of the specific class, writes them to * the databases and check the size of the set afterwards.<br> * Created by: tgaengler */
Test for identifier generation: Creates ten instances (incl. identifier generation) of the specific class, writes them to the databases and check the size of the set afterwards. Created by: tgaengler
idGenerationTest
{ "repo_name": "janpolowinski/dswarm", "path": "persistence/src/test/java/org/dswarm/persistence/service/test/BasicJPAServiceTest.java", "license": "apache-2.0", "size": 5054 }
[ "com.google.common.collect.Sets", "java.util.Set", "org.junit.Assert" ]
import com.google.common.collect.Sets; import java.util.Set; import org.junit.Assert;
import com.google.common.collect.*; import java.util.*; import org.junit.*;
[ "com.google.common", "java.util", "org.junit" ]
com.google.common; java.util; org.junit;
894,531