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 boolean isWellKnownType(String namespace, String name) {
if (isSObject(namespace, name)) return true;
if ("AggregateResult".equals(name) &&
(SfdcApiType.Enterprise.getSobjectNamespace().equals(namespace) ||
SfdcApiType.Tooling.getSobjectNamespace().equals(namespace))) {
... | boolean function(String namespace, String name) { if (isSObject(namespace, name)) return true; if (STR.equals(name) && (SfdcApiType.Enterprise.getSobjectNamespace().equals(namespace) SfdcApiType.Tooling.getSobjectNamespace().equals(namespace))) { return true; } QName type = new QName(namespace, name); return xmlJavaMap... | /**
* is this a well know type. If it is a well known type, then there is no
* need to generate a class for the type.
*
* @param namespace namespace of the type
* @param name name of the type
*
* @return true if this is a well known type
*/ | is this a well know type. If it is a well known type, then there is no need to generate a class for the type | isWellKnownType | {
"repo_name": "futurewhiz/wsc",
"path": "src/main/java/com/sforce/ws/bind/TypeMapper.java",
"license": "bsd-3-clause",
"size": 31421
} | [
"com.sforce.ws.wsdl.SfdcApiType",
"javax.xml.namespace.QName"
] | import com.sforce.ws.wsdl.SfdcApiType; import javax.xml.namespace.QName; | import com.sforce.ws.wsdl.*; import javax.xml.namespace.*; | [
"com.sforce.ws",
"javax.xml"
] | com.sforce.ws; javax.xml; | 1,609,729 |
public static String convertDatetime(final Timestamp pJavaDateTime, final String pJdbcClass) {
String convertedString = null;
if (pJdbcClass == null || pJdbcClass.equals(Constants.JDBC_CLASS_MYSQL)) {
convertedString = StringToSQL.convertDatetimeMySQL(pJavaDateTime);
} else if (pJdbcClass.equals(Co... | static String function(final Timestamp pJavaDateTime, final String pJdbcClass) { String convertedString = null; if (pJdbcClass == null pJdbcClass.equals(Constants.JDBC_CLASS_MYSQL)) { convertedString = StringToSQL.convertDatetimeMySQL(pJavaDateTime); } else if (pJdbcClass.equals(Constants.JDBC_CLASS_MSSQL)) { converted... | /**
* The <code>convertDatetime</code> method converts a datetime to SQL.
*
* @param pJavaDateTime Timestamp to convert
* @param pJdbcClass name of the JDBC class to detect DataBase
* @return string as SQL
*/ | The <code>convertDatetime</code> method converts a datetime to SQL | convertDatetime | {
"repo_name": "ManfredTremmel/dbnavigationbar",
"path": "src/main/java/de/knightsoft/dbnavigationbar/server/StringToSQL.java",
"license": "agpl-3.0",
"size": 19376
} | [
"de.knightsoft.dbnavigationbar.shared.Constants",
"java.sql.Timestamp"
] | import de.knightsoft.dbnavigationbar.shared.Constants; import java.sql.Timestamp; | import de.knightsoft.dbnavigationbar.shared.*; import java.sql.*; | [
"de.knightsoft.dbnavigationbar",
"java.sql"
] | de.knightsoft.dbnavigationbar; java.sql; | 1,912,597 |
public static boolean available(int port) throws IllegalArgumentException {
if (port < currentMinPort.get() || port > MAX_PORT_NUMBER) {
throw new IllegalArgumentException("Invalid start currentMinPort: " + port);
}
ServerSocket ss = null;
DatagramSocket ds = null;
... | static boolean function(int port) throws IllegalArgumentException { if (port < currentMinPort.get() port > MAX_PORT_NUMBER) { throw new IllegalArgumentException(STR + port); } ServerSocket ss = null; DatagramSocket ds = null; try { ss = new ServerSocket(port); ss.setReuseAddress(true); ds = new DatagramSocket(port); ds... | /**
* Checks to see if a specific port is available.
*
* @param port the port number to check for availability
* @return <tt>true</tt> if the port is available, or <tt>false</tt> if not
* @throws IllegalArgumentException is thrown if the port number is out of range
*/ | Checks to see if a specific port is available | available | {
"repo_name": "cedricvidal/jforkr",
"path": "src/main/java/biz/vidal/jforkr/internal/AvailablePortFinder.java",
"license": "lgpl-3.0",
"size": 5009
} | [
"java.io.IOException",
"java.net.DatagramSocket",
"java.net.ServerSocket"
] | import java.io.IOException; import java.net.DatagramSocket; import java.net.ServerSocket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 800,643 |
public static void main(String[] args) throws AlreadyAliveException, InvalidTopologyException {
if (args.length < 1) {
throw new RuntimeException("Specify topology name");
}
int parallelism = 1;
if (args.length > 1) {
parallelism = Integer.parseInt(args[1]);
}
TopologyBuilder buil... | static void function(String[] args) throws AlreadyAliveException, InvalidTopologyException { if (args.length < 1) { throw new RuntimeException(STR); } int parallelism = 1; if (args.length > 1) { parallelism = Integer.parseInt(args[1]); } TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("word", new Word... | /**
* Main method
*/ | Main method | main | {
"repo_name": "ashvina/heron",
"path": "examples/src/java/org/apache/heron/examples/api/WordCountTopology.java",
"license": "apache-2.0",
"size": 6449
} | [
"org.apache.heron.api.Config",
"org.apache.heron.api.HeronSubmitter",
"org.apache.heron.api.exception.AlreadyAliveException",
"org.apache.heron.api.exception.InvalidTopologyException",
"org.apache.heron.api.topology.TopologyBuilder",
"org.apache.heron.api.tuple.Fields",
"org.apache.heron.common.basics.B... | import org.apache.heron.api.Config; import org.apache.heron.api.HeronSubmitter; import org.apache.heron.api.exception.AlreadyAliveException; import org.apache.heron.api.exception.InvalidTopologyException; import org.apache.heron.api.topology.TopologyBuilder; import org.apache.heron.api.tuple.Fields; import org.apache.h... | import org.apache.heron.api.*; import org.apache.heron.api.exception.*; import org.apache.heron.api.topology.*; import org.apache.heron.api.tuple.*; import org.apache.heron.common.basics.*; | [
"org.apache.heron"
] | org.apache.heron; | 372,827 |
public Abstract3dModel subtractModel(Abstract3dModel model) {
return new Difference(this, model);
} | Abstract3dModel function(Abstract3dModel model) { return new Difference(this, model); } | /**
* Convenient method to create a Difference.
* @param model the model to be subtracted to this object
* @return a new model which contains the difference of this object and the given object
*/ | Convenient method to create a Difference | subtractModel | {
"repo_name": "printingin3d/javascad",
"path": "src/main/java/eu/printingin3d/javascad/models/Abstract3dModel.java",
"license": "gpl-2.0",
"size": 21994
} | [
"eu.printingin3d.javascad.tranzitions.Difference"
] | import eu.printingin3d.javascad.tranzitions.Difference; | import eu.printingin3d.javascad.tranzitions.*; | [
"eu.printingin3d.javascad"
] | eu.printingin3d.javascad; | 1,180,861 |
private FSPermissionChecker checkPermission(String path, INode[] inodes, boolean doCheckOwner,
FsAction ancestorAccess, FsAction parentAccess, FsAction access,
FsAction subAccess)
throws AccessControlException {
boolea... | FSPermissionChecker function(String path, INode[] inodes, boolean doCheckOwner, FsAction ancestorAccess, FsAction parentAccess, FsAction access, FsAction subAccess) throws AccessControlException { boolean permissionCheckFailed = false; FSPermissionChecker pc = new FSPermissionChecker( fsOwner.getUserName(), supergroup,... | /**
* Check whether current user have permissions to access the path.
* For more details of the parameters, see
* {@link FSPermissionChecker#checkPermission(String, INodeDirectory, boolean, FsAction, FsAction, FsAction, FsAction)}.
*/ | Check whether current user have permissions to access the path. For more details of the parameters, see <code>FSPermissionChecker#checkPermission(String, INodeDirectory, boolean, FsAction, FsAction, FsAction, FsAction)</code> | checkPermission | {
"repo_name": "nvoron23/hadoop-20",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 358914
} | [
"org.apache.hadoop.fs.permission.FsAction",
"org.apache.hadoop.security.AccessControlException"
] | import org.apache.hadoop.fs.permission.FsAction; import org.apache.hadoop.security.AccessControlException; | import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.security.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,538,043 |
private int getRTLSign() {
int rtlSign = 1;
// On API level 17 and above, check if we are in a Right-To-Left layout
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if(getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
rtlSign = -1;
... | int function() { int rtlSign = 1; if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { if(getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) { rtlSign = -1; } } return rtlSign; } | /**
* Checks if the API level is high enough to support RTL layouts, and returns 1 if
* we're in a LTR language, and -1 if we're in a RTL layout.
* @return 1 for LTR languages, -1 for RTL languages.
*/ | Checks if the API level is high enough to support RTL layouts, and returns 1 if we're in a LTR language, and -1 if we're in a RTL layout | getRTLSign | {
"repo_name": "villepetersson/DAT255-Grupp12",
"path": "Android/DAT255Grupp12Project/DAT255Grupp12/src/main/java/de/timroes/android/listview/EnhancedListView.java",
"license": "mit",
"size": 39017
} | [
"android.os.Build",
"android.view.View"
] | import android.os.Build; import android.view.View; | import android.os.*; import android.view.*; | [
"android.os",
"android.view"
] | android.os; android.view; | 2,100,875 |
public static SplitRegionRequest buildSplitRegionRequest(
final byte[] regionName, final byte[] splitPoint) {
SplitRegionRequest.Builder builder = SplitRegionRequest.newBuilder();
RegionSpecifier region = buildRegionSpecifier(
RegionSpecifierType.REGION_NAME, regionName);
builder.setRegion(region);
... | static SplitRegionRequest function( final byte[] regionName, final byte[] splitPoint) { SplitRegionRequest.Builder builder = SplitRegionRequest.newBuilder(); RegionSpecifier region = buildRegionSpecifier( RegionSpecifierType.REGION_NAME, regionName); builder.setRegion(region); if (splitPoint != null) { builder.setSplit... | /**
* Create a SplitRegionRequest for a given region name
*
* @param regionName the name of the region to split
* @param splitPoint the split point
* @return a SplitRegionRequest
*/ | Create a SplitRegionRequest for a given region name | buildSplitRegionRequest | {
"repo_name": "alipayhuber/hack-hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/RequestConverter.java",
"license": "apache-2.0",
"size": 58860
} | [
"com.google.protobuf.HBaseZeroCopyByteString",
"org.apache.hadoop.hbase.protobuf.generated.AdminProtos",
"org.apache.hadoop.hbase.protobuf.generated.HBaseProtos"
] | import com.google.protobuf.HBaseZeroCopyByteString; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos; import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; | import com.google.protobuf.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"com.google.protobuf",
"org.apache.hadoop"
] | com.google.protobuf; org.apache.hadoop; | 2,736,206 |
public void openCore() throws StandardException
{
boolean lockingRequired = false;
TransactionController tc;
// REVISIT: through the direct DB API, this needs to be an
// error, not an ASSERT; users can open twice. Only through JDBC
// is access to open controlled and ensured valid.
if (SanityMa... | void function() throws StandardException { boolean lockingRequired = false; TransactionController tc; if (SanityManager.DEBUG) { SanityManager.ASSERT( ! isOpen, STR); } beginTime = getCurrentTimeMillis(); source.openCore(); if (source.requiresRelocking()) { lockingRequired = true; } tc = activation.getTransactionContro... | /**
* open this ResultSet.
*
* @exception StandardException thrown if cursor finished.
*/ | open this ResultSet | openCore | {
"repo_name": "kavin256/Derby",
"path": "java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java",
"license": "apache-2.0",
"size": 16604
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.services.sanity.SanityManager",
"org.apache.derby.iapi.store.access.TransactionController"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.services.sanity.SanityManager; import org.apache.derby.iapi.store.access.TransactionController; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.services.sanity.*; import org.apache.derby.iapi.store.access.*; | [
"org.apache.derby"
] | org.apache.derby; | 1,165,715 |
@SuppressWarnings("unchecked")
public List<String> getListIdFromJSON(Object data){
JSONArray jsonArray = JSONArray.fromObject(data);
List<String> PARTICIPANTES_ID = (List<String>) JSONArray.toCollection(jsonArray,String.class);
return PARTICIPANTES_ID;
}
| @SuppressWarnings(STR) List<String> function(Object data){ JSONArray jsonArray = JSONArray.fromObject(data); List<String> PARTICIPANTES_ID = (List<String>) JSONArray.toCollection(jsonArray,String.class); return PARTICIPANTES_ID; } | /**
* Tranform array of Strings in json data format into
* list of Strings
* @param data - json data from request
* @return
*/ | Tranform array of Strings in json data format into list of Strings | getListIdFromJSON | {
"repo_name": "IvanSantiago/retopublico",
"path": "MiMappir/src/mx/gob/sct/utic/mimappir/db/postgreSQL/services/PARTICIPANTES_Service.java",
"license": "gpl-2.0",
"size": 5820
} | [
"java.util.List",
"net.sf.json.JSONArray"
] | import java.util.List; import net.sf.json.JSONArray; | import java.util.*; import net.sf.json.*; | [
"java.util",
"net.sf.json"
] | java.util; net.sf.json; | 1,034,740 |
if (this.propagationPath == null)
this.propagationPath = new ArrayList<>();
this.propagationPath.add(pathElement);
}
| if (this.propagationPath == null) this.propagationPath = new ArrayList<>(); this.propagationPath.add(pathElement); } | /**
* Adds an element to the propagation path
* @param pathElement The path element to add
*/ | Adds an element to the propagation path | addPathElement | {
"repo_name": "wangxiayang/soot-infoflow",
"path": "src/soot/jimple/infoflow/results/xml/SerializedSourceInfo.java",
"license": "lgpl-2.1",
"size": 1673
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 363,388 |
private void stamp(int x, int y, float opacity, BufferedImage canvas, BufferedImage stamp) {
Composite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity);
Graphics2D g = canvas.createGraphics();
g.setComposite(composite);
g.drawImage(stamp, x, y, null);
g.dispose();
} | void function(int x, int y, float opacity, BufferedImage canvas, BufferedImage stamp) { Composite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity); Graphics2D g = canvas.createGraphics(); g.setComposite(composite); g.drawImage(stamp, x, y, null); g.dispose(); } | /**
* Stamp
* Draws the stamp onto the canvas at position (x, y). The opacity parameter
* controls the opacity of the stamp.
* @param int x coordinate
* @param int y coordinate
* @param float opacity of the stamp
* @param BufferedImage canvas to draw on
* @param BufferedImage stamp to draw
*/ | Stamp Draws the stamp onto the canvas at position (x, y). The opacity parameter controls the opacity of the stamp | stamp | {
"repo_name": "ajwgeek/Lantern",
"path": "src/com/ajwgeek/lantern/HeatMap.java",
"license": "mit",
"size": 5746
} | [
"java.awt.AlphaComposite",
"java.awt.Composite",
"java.awt.Graphics2D",
"java.awt.image.BufferedImage"
] | import java.awt.AlphaComposite; import java.awt.Composite; import java.awt.Graphics2D; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 506,429 |
public void removeCountListener(ICountListener listener) {
getTekdaqc().removeAnalogCountListener(this, listener);
} | void function(ICountListener listener) { getTekdaqc().removeAnalogCountListener(this, listener); } | /**
* Method to remove a {@link ICountListener}.
*
* @param listener The {@link ICountListener} to be removed from callbacks.
*/ | Method to remove a <code>ICountListener</code> | removeCountListener | {
"repo_name": "Tenkiv/Tekdaqc-Java-Library",
"path": "src/main/java/com/tenkiv/tekdaqc/hardware/AAnalogInput.java",
"license": "apache-2.0",
"size": 13847
} | [
"com.tenkiv.tekdaqc.communication.message.ICountListener"
] | import com.tenkiv.tekdaqc.communication.message.ICountListener; | import com.tenkiv.tekdaqc.communication.message.*; | [
"com.tenkiv.tekdaqc"
] | com.tenkiv.tekdaqc; | 1,263,566 |
@Override public void enterWhileLoop(@NotNull InfixParser.WhileLoopContext ctx) { } | @Override public void enterWhileLoop(@NotNull InfixParser.WhileLoopContext ctx) { } | /**
* {@inheritDoc}
* <p/>
* The default implementation does nothing.
*/ | The default implementation does nothing | exitBoilerplate | {
"repo_name": "PulfordJ/small-compiler",
"path": "src/generated/java/InfixBaseListener.java",
"license": "gpl-2.0",
"size": 11441
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,286,924 |
private AudioFileFormat.Type getAudioType(String file) {
AudioFileFormat.Type[] types = AudioSystem.getAudioFileTypes();
String extension = getExtension(file);
for (int i = 0; i < types.length; i++) {
if (types[i].getExtension().equals(extension)) {
return types[... | AudioFileFormat.Type function(String file) { AudioFileFormat.Type[] types = AudioSystem.getAudioFileTypes(); String extension = getExtension(file); for (int i = 0; i < types.length; i++) { if (types[i].getExtension().equals(extension)) { return types[i]; } } return null; } | /**
* Returns the audio type based upon the extension of the given file
*
* @param file
* the file of interest
*
* @return the audio type of the file or null if it is a non-supported type
*/ | Returns the audio type based upon the extension of the given file | getAudioType | {
"repo_name": "edwardtoday/PolyU_MScST",
"path": "COMP5517/JavaSpeech/freetts-1.2.2-src/freetts-1.2.2/com/sun/speech/freetts/FreeTTS.java",
"license": "mit",
"size": 19185
} | [
"javax.sound.sampled.AudioFileFormat",
"javax.sound.sampled.AudioSystem"
] | import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioSystem; | import javax.sound.sampled.*; | [
"javax.sound"
] | javax.sound; | 2,291,337 |
void stopDecommission(DatanodeDescriptor node) throws IOException {
if (node.isDecommissionInProgress() || node.isDecommissioned()) {
LOG.info("Stop Decommissioning " + node);
heartbeatManager.stopDecommission(node);
// Over-replicated blocks will be detected and processed when
// the dea... | void stopDecommission(DatanodeDescriptor node) throws IOException { if (node.isDecommissionInProgress() node.isDecommissioned()) { LOG.info(STR + node); heartbeatManager.stopDecommission(node); if (node.isAlive) { blockManager.processOverReplicatedBlocksOnReCommission(node); } } } | /**
* Stop decommissioning the specified datanodes.
*/ | Stop decommissioning the specified datanodes | stopDecommission | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java",
"license": "apache-2.0",
"size": 46281
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,245,872 |
//@PDA jdbc40
public void setBoolean(String parameterName, boolean x) throws SQLException
{
validateStatement();
statement_.setBoolean(statement_.findParameterIndex(parameterName), x);
} | void function(String parameterName, boolean x) throws SQLException { validateStatement(); statement_.setBoolean(statement_.findParameterIndex(parameterName), x); } | /**
* Sets the designated parameter to the given Java <code>boolean</code> value.
* The driver converts this
* to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database.
*
* @param parameterName the name of the parameter
* @param x the parameter value
*... | Sets the designated parameter to the given Java <code>boolean</code> value. The driver converts this to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database | setBoolean | {
"repo_name": "piguangming/jt400",
"path": "src/com/ibm/as400/access/AS400JDBCRowSet.java",
"license": "epl-1.0",
"size": 312066
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,436,218 |
public Set<String> keySet(); | Set<String> function(); | /**
* Get all available keys configured in the filter
* @return
*/ | Get all available keys configured in the filter | keySet | {
"repo_name": "fxcebx/rike",
"path": "arago-portlet-util/src/main/java/de/arago/portlet/OptionFilter.java",
"license": "mit",
"size": 2118
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 298,207 |
public static ImmutableList<Path> extractZipFile(
Path zipFile,
ProjectFilesystem filesystem,
ExistingFileMode existingFileMode) throws IOException {
ImmutableList.Builder<Path> filesWritten = ImmutableList.builder();
try (ZipFile zip = new ZipFile(zipFile.toFile())) {
Enumeration<Zip... | static ImmutableList<Path> function( Path zipFile, ProjectFilesystem filesystem, ExistingFileMode existingFileMode) throws IOException { ImmutableList.Builder<Path> filesWritten = ImmutableList.builder(); try (ZipFile zip = new ZipFile(zipFile.toFile())) { Enumeration<ZipArchiveEntry> entries = zip.getEntries(); while ... | /**
* Unzips a file to a destination and returns the paths of the written files.
*/ | Unzips a file to a destination and returns the paths of the written files | extractZipFile | {
"repo_name": "lukw00/buck",
"path": "src/com/facebook/buck/zip/Unzip.java",
"license": "apache-2.0",
"size": 8359
} | [
"com.facebook.buck.io.MoreFiles",
"com.facebook.buck.io.MorePosixFilePermissions",
"com.facebook.buck.io.ProjectFilesystem",
"com.google.common.collect.ImmutableList",
"com.google.common.io.ByteStreams",
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream",
"java.nio.file.Path",
"j... | import com.facebook.buck.io.MoreFiles; import com.facebook.buck.io.MorePosixFilePermissions; import com.facebook.buck.io.ProjectFilesystem; import com.google.common.collect.ImmutableList; import com.google.common.io.ByteStreams; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import... | import com.facebook.buck.io.*; import com.google.common.collect.*; import com.google.common.io.*; import java.io.*; import java.nio.file.*; import java.nio.file.attribute.*; import java.util.*; import org.apache.commons.compress.archivers.zip.*; | [
"com.facebook.buck",
"com.google.common",
"java.io",
"java.nio",
"java.util",
"org.apache.commons"
] | com.facebook.buck; com.google.common; java.io; java.nio; java.util; org.apache.commons; | 2,547,403 |
ParameterContextEntity updateParameterContext(Revision revision, ParameterContextDTO parameterContext); | ParameterContextEntity updateParameterContext(Revision revision, ParameterContextDTO parameterContext); | /**
* Updates the Parameter Context
* @param revision the current revision of the Parameter Context
* @param parameterContext the updated version of the ParameterContext
* @return the updated Parameter Context Entity
*/ | Updates the Parameter Context | updateParameterContext | {
"repo_name": "mattyb149/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 87066
} | [
"org.apache.nifi.web.api.dto.ParameterContextDTO",
"org.apache.nifi.web.api.entity.ParameterContextEntity"
] | import org.apache.nifi.web.api.dto.ParameterContextDTO; import org.apache.nifi.web.api.entity.ParameterContextEntity; | import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.entity.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 2,231,490 |
public static String dateToDecimal(String date) throws NormalizerException {
try {
double day = Double.parseDouble(date.substring(0, 2));
String month = date.substring(2, 5);
switch (month) {
case "Dec":
day += 30.0;
case "Nov":
day += 31.0;
case "Oct":
day += 30.0;
case "Se... | static String function(String date) throws NormalizerException { try { double day = Double.parseDouble(date.substring(0, 2)); String month = date.substring(2, 5); switch (month) { case "Dec": day += 30.0; case "Nov": day += 31.0; case "Oct": day += 30.0; case "Sep": day += 31.0; case "Aug": day += 31.0; case "Jul": day... | /**
* Converts a Text Date (DDmmmYYYY) into a Decimal Date ex.
* @param date - date to be converted to decimal format
* @return date in decimal format
* @throws NormalizerException
*/ | Converts a Text Date (DDmmmYYYY) into a Decimal Date ex | dateToDecimal | {
"repo_name": "developerDemetri/zoophy-services",
"path": "src/main/java/edu/asu/zoophy/rest/pipeline/utils/Normalizer.java",
"license": "apache-2.0",
"size": 7598
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,536,856 |
//------------------//
// getSelectedGlyph //
//------------------//
public Glyph getSelectedGlyph ()
{
final List<Glyph> list = getSelectedGlyphList();
if ((list == null) || list.isEmpty()) {
return null;
}
return list.get(list.size() - 1); ... | Glyph function () { final List<Glyph> list = getSelectedGlyphList(); if ((list == null) list.isEmpty()) { return null; } return list.get(list.size() - 1); } | /**
* Report the glyph currently selected, if any
*
* @return the current glyph, or null
*/ | Report the glyph currently selected, if any | getSelectedGlyph | {
"repo_name": "Audiveris/audiveris",
"path": "src/main/org/audiveris/omr/glyph/GlyphIndex.java",
"license": "agpl-3.0",
"size": 15784
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 218,257 |
private static void checkTypeSafe(Collection<?> c) {
try {
Role r;
for (Object o : c)
r = (Role) o;
} catch (ClassCastException e) {
throw new IllegalArgumentException(e);
}
} | static void function(Collection<?> c) { try { Role r; for (Object o : c) r = (Role) o; } catch (ClassCastException e) { throw new IllegalArgumentException(e); } } | /**
* IllegalArgumentException if c contains any non-Role objects.
*/ | IllegalArgumentException if c contains any non-Role objects | checkTypeSafe | {
"repo_name": "andreagenso/java2scala",
"path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/javax/management/relation/RoleList.java",
"license": "apache-2.0",
"size": 11603
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 172,226 |
public void insertarHacerTest(HacerTest hacerTest)throws DAOException{
PreparedStatement st = null;
Usuario usu=null;
TestCorregido test=null;
try {
usu=hacerTest.getUsuario();
test=hacerTest.getTestCorregido();
//insert into hacer_test(email,nombre_test,superado) values('rafael@hotmail.c... | void function(HacerTest hacerTest)throws DAOException{ PreparedStatement st = null; Usuario usu=null; TestCorregido test=null; try { usu=hacerTest.getUsuario(); test=hacerTest.getTestCorregido(); st = con.prepareStatement(DbQuery.getInsertarHacerTest()); st.setString(1, usu.getEmail()); st.setString(2, test.getNombreTe... | /**
* Inserta un usuario validado a la base de datos
*/ | Inserta un usuario validado a la base de datos | insertarHacerTest | {
"repo_name": "RafaV56/MiEscuelaDeInformatica",
"path": "MiEscuelaDeInformatica/src/daos/HacerTestDAO.java",
"license": "gpl-3.0",
"size": 4379
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.sql.Types"
] | import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Types; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,474,902 |
public void getBytes(long index, OutputStream out, int length) throws IOException {
Preconditions.checkArgument(out != null, "expecting valid output stream");
checkIndex(index, length);
if (length > 0) {
// copy length bytes of data from this ArrowBuf starting at
// address addr(index) into th... | void function(long index, OutputStream out, int length) throws IOException { Preconditions.checkArgument(out != null, STR); checkIndex(index, length); if (length > 0) { byte[] tmp = new byte[length]; MemoryUtil.UNSAFE.copyMemory(null, addr(index), tmp, MemoryUtil.BYTE_ARRAY_BASE_OFFSET, length); out.write(tmp); } } | /**
* Copy a certain length of bytes from this ArrowBuf at a given
* index into the given OutputStream.
* @param index index index (0 based relative to the portion of memory
* this ArrowBuf has access to)
* @param out dst stream to copy data into
* @param length length of data to copy
... | Copy a certain length of bytes from this ArrowBuf at a given index into the given OutputStream | getBytes | {
"repo_name": "cpcloud/arrow",
"path": "java/memory/memory-core/src/main/java/org/apache/arrow/memory/ArrowBuf.java",
"license": "apache-2.0",
"size": 43744
} | [
"java.io.IOException",
"java.io.OutputStream",
"org.apache.arrow.memory.util.MemoryUtil",
"org.apache.arrow.util.Preconditions"
] | import java.io.IOException; import java.io.OutputStream; import org.apache.arrow.memory.util.MemoryUtil; import org.apache.arrow.util.Preconditions; | import java.io.*; import org.apache.arrow.memory.util.*; import org.apache.arrow.util.*; | [
"java.io",
"org.apache.arrow"
] | java.io; org.apache.arrow; | 1,378,274 |
public TextLineNumber withLineNumbers(JScrollPane scrollPane) {
TextLineNumber tln = new TextLineNumber(this);
tln.setUpdateFont(true);
scrollPane.setRowHeaderView(tln);
return tln;
} | TextLineNumber function(JScrollPane scrollPane) { TextLineNumber tln = new TextLineNumber(this); tln.setUpdateFont(true); scrollPane.setRowHeaderView(tln); return tln; } | /**
* shows line numbers
*/ | shows line numbers | withLineNumbers | {
"repo_name": "jurgendl/jhaws",
"path": "jhaws/swing/src/main/java/org/swingeasy/ETextPane.java",
"license": "mit",
"size": 22521
} | [
"javax.swing.JScrollPane"
] | import javax.swing.JScrollPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,378,091 |
public JSONArray names() {
return this.nameValuePairs.isEmpty() ? null
: new JSONArray(new ArrayList<>(this.nameValuePairs.keySet()));
} | JSONArray function() { return this.nameValuePairs.isEmpty() ? null : new JSONArray(new ArrayList<>(this.nameValuePairs.keySet())); } | /**
* Returns an array containing the string names in this object. This method returns
* null if this object contains no mappings.
* @return the array
*/ | Returns an array containing the string names in this object. This method returns null if this object contains no mappings | names | {
"repo_name": "tiarebalbi/spring-boot",
"path": "spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONObject.java",
"license": "apache-2.0",
"size": 27616
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 222,348 |
public static String getHadoopHome() throws IOException {
return getHadoopHomeDir().getCanonicalPath();
} | static String function() throws IOException { return getHadoopHomeDir().getCanonicalPath(); } | /**
* Get the Hadoop home directory. Raises an exception if not found
* @return the home dir
* @throws IOException if the home directory cannot be located.
*/ | Get the Hadoop home directory. Raises an exception if not found | getHadoopHome | {
"repo_name": "nandakumar131/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java",
"license": "apache-2.0",
"size": 46607
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 526,184 |
@Test
public void TestJ277() {
Transliterator gl = Transliterator.getInstance("Greek-Latin; NFD; [:M:]Remove; NFC");
char sigma = (char)0x3C3;
char upsilon = (char)0x3C5;
char nu = (char)0x3BD;
// not used char PHI = (char)0x3A6;
char alpha = (char)0x3B1;
... | void function() { Transliterator gl = Transliterator.getInstance(STR); char sigma = (char)0x3C3; char upsilon = (char)0x3C5; char nu = (char)0x3BD; char alpha = (char)0x3B1; StringBuffer buf = new StringBuffer(); buf.append(sigma).append(upsilon).append(nu); String syn = buf.toString(); expect(gl, syn, "syn"); buf.setL... | /**
* Regression test for bugs found in Greek transliteration.
*/ | Regression test for bugs found in Greek transliteration | TestJ277 | {
"repo_name": "life-beam/j2objc",
"path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/translit/TransliteratorTest.java",
"license": "apache-2.0",
"size": 165585
} | [
"android.icu.text.Transliterator"
] | import android.icu.text.Transliterator; | import android.icu.text.*; | [
"android.icu"
] | android.icu; | 291,670 |
BusinessRule getBusinessRulesInstance(Document document, Class<? extends BusinessRule> ruleInterface); | BusinessRule getBusinessRulesInstance(Document document, Class<? extends BusinessRule> ruleInterface); | /**
* Allows code in actions or business objects to directly access rule methods in the class.
*
* @param document
* @param ruleInterface
* @return BusinessRule
*/ | Allows code in actions or business objects to directly access rule methods in the class | getBusinessRulesInstance | {
"repo_name": "bhutchinson/rice",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/service/KualiRuleService.java",
"license": "apache-2.0",
"size": 2599
} | [
"org.kuali.rice.krad.document.Document",
"org.kuali.rice.krad.rules.rule.BusinessRule"
] | import org.kuali.rice.krad.document.Document; import org.kuali.rice.krad.rules.rule.BusinessRule; | import org.kuali.rice.krad.document.*; import org.kuali.rice.krad.rules.rule.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,284,337 |
public static ResultadoMetodo deshabilitar(Fabricante fabricante) {
LOG.debug("Deshabilitando fabricante");
// Setear propiedad de habilitado en 0
fabricante.setHabilitado((short) 0);
ProcedimientoTransaccionalDAO procedimiento = new DAOManager();
ResultadoMetodo resultado ... | static ResultadoMetodo function(Fabricante fabricante) { LOG.debug(STR); fabricante.setHabilitado((short) 0); ProcedimientoTransaccionalDAO procedimiento = new DAOManager(); ResultadoMetodo resultado = (ResultadoMetodo) procedimiento.transaccion((DAOManager daoManager) -> { return daoManager.getFabricanteDAO().deshabil... | /**
* Deshabilitar un fabricante.
*
* @param fabricante fabricante a deshabilitar.
* @return error o sin error dependiendo el resultado de la operación.
*/ | Deshabilitar un fabricante | deshabilitar | {
"repo_name": "NullPointer-Chile/farmacia-popular",
"path": "farmacia-popular/src/main/java/cl/nullpointer/farmaciapopular/dominio/Fabricante.java",
"license": "gpl-3.0",
"size": 5797
} | [
"cl.nullpointer.farmaciapopular.DAO"
] | import cl.nullpointer.farmaciapopular.DAO; | import cl.nullpointer.farmaciapopular.*; | [
"cl.nullpointer.farmaciapopular"
] | cl.nullpointer.farmaciapopular; | 1,081,988 |
@Override
public void setTitleNmMap(
java.util.Map<java.util.Locale, java.lang.String> titleNmMap,
java.util.Locale defaultLocale) {
_boardDiv.setTitleNmMap(titleNmMap, defaultLocale);
} | void function( java.util.Map<java.util.Locale, java.lang.String> titleNmMap, java.util.Locale defaultLocale) { _boardDiv.setTitleNmMap(titleNmMap, defaultLocale); } | /**
* Sets the localized title nms of this board div from the map of locales and localized title nms, and sets the default locale.
*
* @param titleNmMap the locales and localized title nms of this board div
* @param defaultLocale the default locale
*/ | Sets the localized title nms of this board div from the map of locales and localized title nms, and sets the default locale | setTitleNmMap | {
"repo_name": "queza85/edison",
"path": "edison-portal-framework/edison-board-2016-portlet/docroot/WEB-INF/service/org/kisti/edison/multiboard/model/BoardDivWrapper.java",
"license": "gpl-3.0",
"size": 18427
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 493,897 |
public void AjouterSwitch(MouseEvent e) {
// CREATION FENETRE
// informations fenetre
final JFrame fenetre = new JFrame();
fenetre.setTitle("Initialiser un Switch");
fenetre.setSize(400, 200);
fenetre.setLocationRelativeTo(null);
fenetre.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
fene... | void function(MouseEvent e) { final JFrame fenetre = new JFrame(); fenetre.setTitle(STR); fenetre.setSize(400, 200); fenetre.setLocationRelativeTo(null); fenetre.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); fenetre.setVisible(true); JPanel panneau = new JPanel(); final JFormattedTextField jtf1 = new JFormattedTex... | /**
* Ajoute un Switch au PanelSousReseau
*
* @param e
* Ev�nement d�clancheur de la fonction.
*/ | Ajoute un Switch au PanelSousReseau | AjouterSwitch | {
"repo_name": "mortrev/TCP-IP",
"path": "PanneauSousReseau.java",
"license": "gpl-3.0",
"size": 10174
} | [
"java.awt.Dimension",
"java.awt.event.ActionListener",
"java.awt.event.MouseEvent",
"javax.swing.JButton",
"javax.swing.JFormattedTextField",
"javax.swing.JFrame",
"javax.swing.JLabel",
"javax.swing.JPanel"
] | import java.awt.Dimension; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import javax.swing.JButton; import javax.swing.JFormattedTextField; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; | import java.awt.*; import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,280,272 |
private Region findRegion (Collection positionals)
{
Region region = new Region();
for (Iterator i = positionals.iterator(); i.hasNext(); ) {
GPositional positional = (GPositional) i.next();
if (positional.isVisible())
region.union (positional.getRectangle());
}
return region;
... | Region function (Collection positionals) { Region region = new Region(); for (Iterator i = positionals.iterator(); i.hasNext(); ) { GPositional positional = (GPositional) i.next(); if (positional.isVisible()) region.union (positional.getRectangle()); } return region; } | /**
* Find region of a set of positionals.
*
* @param positionals Positionals to find region of.
* @return Region of specified positionals.
*/ | Find region of a set of positionals | findRegion | {
"repo_name": "ys880526/Test",
"path": "Simulators/GateBar/src/main/java/no/geosoft/cc/graphics/GSegment.java",
"license": "lgpl-3.0",
"size": 25713
} | [
"java.util.Collection",
"java.util.Iterator",
"no.geosoft.cc.geometry.Region"
] | import java.util.Collection; import java.util.Iterator; import no.geosoft.cc.geometry.Region; | import java.util.*; import no.geosoft.cc.geometry.*; | [
"java.util",
"no.geosoft.cc"
] | java.util; no.geosoft.cc; | 2,913,140 |
@Override
public void doSaveAs() {
SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
saveAsDialog.open();
IPath path = saveAsDialog.getResult();
if (path != null) {
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
if (file != null) {
doSaveAs(URI.createPlatfor... | void function() { SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); saveAsDialog.open(); IPath path = saveAsDialog.getResult(); if (path != null) { IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); if (file != null) { doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toStrin... | /**
* This also changes the editor's input.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This also changes the editor's input. | doSaveAs | {
"repo_name": "ifml/ifml-editor",
"path": "plugins/IFMLEditor.editor/src/IFML/Core/presentation/CoreEditor.java",
"license": "mit",
"size": 54335
} | [
"org.eclipse.core.resources.IFile",
"org.eclipse.core.resources.ResourcesPlugin",
"org.eclipse.core.runtime.IPath",
"org.eclipse.emf.common.util.URI",
"org.eclipse.ui.dialogs.SaveAsDialog",
"org.eclipse.ui.part.FileEditorInput"
] | import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.emf.common.util.URI; import org.eclipse.ui.dialogs.SaveAsDialog; import org.eclipse.ui.part.FileEditorInput; | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.emf.common.util.*; import org.eclipse.ui.dialogs.*; import org.eclipse.ui.part.*; | [
"org.eclipse.core",
"org.eclipse.emf",
"org.eclipse.ui"
] | org.eclipse.core; org.eclipse.emf; org.eclipse.ui; | 1,287,952 |
public void setTitle(final RefactoringDescriptorProxy descriptor, final int current, final int total) {
final String message;
if (descriptor != null)
message= descriptor.getDescription();
else
message= RefactoringUIMessages.RefactoringHistoryOverviewPage_title;
if (total > 1)
setTitle(Messages.forma... | void function(final RefactoringDescriptorProxy descriptor, final int current, final int total) { final String message; if (descriptor != null) message= descriptor.getDescription(); else message= RefactoringUIMessages.RefactoringHistoryOverviewPage_title; if (total > 1) setTitle(Messages.format(RefactoringUIMessages.Ref... | /**
* Sets the title of the page according to the refactoring.
*
* @param descriptor
* the refactoring descriptor, or <code>null</code>
* @param current
* the non-zero based index of the current refactoring
* @param total
* the total number of refactorings
*/ | Sets the title of the page according to the refactoring | setTitle | {
"repo_name": "maxeler/eclipse",
"path": "eclipse.jdt.ui/org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/history/RefactoringHistoryErrorPage.java",
"license": "epl-1.0",
"size": 6123
} | [
"org.eclipse.ltk.core.refactoring.RefactoringDescriptorProxy",
"org.eclipse.ltk.internal.ui.refactoring.Messages",
"org.eclipse.ltk.internal.ui.refactoring.RefactoringUIMessages"
] | import org.eclipse.ltk.core.refactoring.RefactoringDescriptorProxy; import org.eclipse.ltk.internal.ui.refactoring.Messages; import org.eclipse.ltk.internal.ui.refactoring.RefactoringUIMessages; | import org.eclipse.ltk.core.refactoring.*; import org.eclipse.ltk.internal.ui.refactoring.*; | [
"org.eclipse.ltk"
] | org.eclipse.ltk; | 2,622,348 |
public static void initMultiTableSnapshotMapperJob(Map<String, Collection<Scan>> snapshotScans,
Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass,
Job job, boolean addDependencyJars, Path tmpRestoreDir) throws IOException {
MultiTableSnapshotInputFormat.setInput(j... | static void function(Map<String, Collection<Scan>> snapshotScans, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job, boolean addDependencyJars, Path tmpRestoreDir) throws IOException { MultiTableSnapshotInputFormat.setInput(job.getConfiguration(), snapshotScans, tmpRestore... | /**
* Sets up the job for reading from one or more table snapshots, with one or more scans
* per snapshot.
* It bypasses hbase servers and read directly from snapshot files.
*
* @param snapshotScans map of snapshot name to scans on that snapshot.
* @param mapper The mapper class to use.... | Sets up the job for reading from one or more table snapshots, with one or more scans per snapshot. It bypasses hbase servers and read directly from snapshot files | initMultiTableSnapshotMapperJob | {
"repo_name": "HubSpot/hbase",
"path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java",
"license": "apache-2.0",
"size": 46774
} | [
"com.codahale.metrics.MetricRegistry",
"java.io.IOException",
"java.util.Collection",
"java.util.Map",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.HBaseConfiguration",
"org.apache.hadoop.hbase.client.Scan",
"org.apache.hadoop.mapreduce.Job"
] | import com.codahale.metrics.MetricRegistry; import java.io.IOException; import java.util.Collection; import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoo... | import com.codahale.metrics.*; import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.mapreduce.*; | [
"com.codahale.metrics",
"java.io",
"java.util",
"org.apache.hadoop"
] | com.codahale.metrics; java.io; java.util; org.apache.hadoop; | 2,374,420 |
default SqlEndpointConsumerBuilder scheduledExecutorService(
ScheduledExecutorService scheduledExecutorService) {
doSetProperty("scheduledExecutorService", scheduledExecutorService);
return this;
} | default SqlEndpointConsumerBuilder scheduledExecutorService( ScheduledExecutorService scheduledExecutorService) { doSetProperty(STR, scheduledExecutorService); return this; } | /**
* Allows for configuring a custom/shared thread pool to use for the
* consumer. By default each consumer has its own single threaded thread
* pool.
*
* The option is a:
* <code>java.util.concurrent.ScheduledExecutorService</code> type.
*
* Gr... | Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. The option is a: <code>java.util.concurrent.ScheduledExecutorService</code> type. Group: scheduler | scheduledExecutorService | {
"repo_name": "objectiser/camel",
"path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/SqlEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 83055
} | [
"java.util.concurrent.ScheduledExecutorService"
] | import java.util.concurrent.ScheduledExecutorService; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,160,898 |
private void showPopupMenu(View view,String name,String uuidString) {
// inflate menu
PopupMenu popup = new PopupMenu(getContext(), view);
MenuInflater inflater = popup.getMenuInflater();
inflater.inflate(R.menu.contact_menu, popup.getMenu());
popup.setOnMenuItemClickListener... | void function(View view,String name,String uuidString) { PopupMenu popup = new PopupMenu(getContext(), view); MenuInflater inflater = popup.getMenuInflater(); inflater.inflate(R.menu.contact_menu, popup.getMenu()); popup.setOnMenuItemClickListener(new MyMenuItemClickListener(name,uuidString)); popup.show(); } class MyM... | /**
* Showing popup menu when tapping on 3 dots
*/ | Showing popup menu when tapping on 3 dots | showPopupMenu | {
"repo_name": "omerel/RELAY",
"path": "Client/Relay/app/src/main/java/com/relay/relay/InboxFragment.java",
"license": "mit",
"size": 29843
} | [
"android.support.v7.widget.PopupMenu",
"android.view.MenuInflater",
"android.view.View"
] | import android.support.v7.widget.PopupMenu; import android.view.MenuInflater; import android.view.View; | import android.support.v7.widget.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 1,746,073 |
@Test
public void CookieAttributes2ServerTests_disableLTPACookie_false_authnSessionDisabled_true_expiredToken() throws Exception {
setCookieExpectations(false, true, false);
if (inboundPropType.equals(Constants.REQUIRED)) {
negativeTokenTestExpiredToken("helloworld_expired_disableLT... | void function() throws Exception { setCookieExpectations(false, true, false); if (inboundPropType.equals(Constants.REQUIRED)) { negativeTokenTestExpiredToken(STR, ltpaFound, clientFound); } else { positiveTokenTestExpiredToken(STR, ltpaFound, clientFound); } } | /**
* Settings/values passed/notpassed
* disableLtpaCookie = default (false)
* authnSessionDisabled = true
* pass an expired access_token
* Expected behaviour:
* We should have access to the protected app
*
* @throws Exception
*/ | Settings/values passed/notpassed disableLtpaCookie = default (false) authnSessionDisabled = true pass an expired access_token Expected behaviour: We should have access to the protected app | CookieAttributes2ServerTests_disableLTPACookie_false_authnSessionDisabled_true_expiredToken | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.security.oidc.server_fat.jaxrs.config/fat/src/com/ibm/ws/security/openidconnect/server/fat/jaxrs/config/CommonTests/CookieAttributes2ServerTests.java",
"license": "epl-1.0",
"size": 63213
} | [
"com.ibm.ws.security.oauth_oidc.fat.commonTest.Constants"
] | import com.ibm.ws.security.oauth_oidc.fat.commonTest.Constants; | import com.ibm.ws.security.oauth_oidc.fat.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 969,359 |
@Test
public void ifTheStrokeIsALinearGradientAndAnOpacityIsProvidedItsStopColorsWillBeInfluencedByAnStrokeOpacity() throws SAXException, SVGException {
final Attributes attributes = mock(Attributes.class);
when(attributes.getLength()).thenReturn(1);
when(attributes.getQName(0)).thenRe... | void function() throws SAXException, SVGException { final Attributes attributes = mock(Attributes.class); when(attributes.getLength()).thenReturn(1); when(attributes.getQName(0)).thenReturn(CoreAttributeMapper.STYLE.getName()); when(attributes.getValue(0)).thenReturn(STR); | /**
* If a fill color that is a gradient and an opacity exist in the style, then the color will be adjusted by the opacity.
*/ | If a fill color that is a gradient and an opacity exist in the style, then the color will be adjusted by the opacity | ifTheStrokeIsALinearGradientAndAnOpacityIsProvidedItsStopColorsWillBeInfluencedByAnStrokeOpacity | {
"repo_name": "Xyanid/svgFX",
"path": "src/test/java/de/saxsys/svgfx/core/elements/SVGShapeBaseIntegrationTest.java",
"license": "apache-2.0",
"size": 16345
} | [
"de.saxsys.svgfx.core.SVGException",
"de.saxsys.svgfx.core.attributes.CoreAttributeMapper",
"org.mockito.Mockito",
"org.xml.sax.Attributes",
"org.xml.sax.SAXException"
] | import de.saxsys.svgfx.core.SVGException; import de.saxsys.svgfx.core.attributes.CoreAttributeMapper; import org.mockito.Mockito; import org.xml.sax.Attributes; import org.xml.sax.SAXException; | import de.saxsys.svgfx.core.*; import de.saxsys.svgfx.core.attributes.*; import org.mockito.*; import org.xml.sax.*; | [
"de.saxsys.svgfx",
"org.mockito",
"org.xml.sax"
] | de.saxsys.svgfx; org.mockito; org.xml.sax; | 2,290,281 |
public static boolean isAutogenerated(String name) {
return IndexWriter.WRITE_LOCK_NAME.equals(name);
} | static boolean function(String name) { return IndexWriter.WRITE_LOCK_NAME.equals(name); } | /**
* Returns true if the file is auto-generated by the store and shouldn't be deleted during cleanup.
* This includes write lock and checksum files
*/ | Returns true if the file is auto-generated by the store and shouldn't be deleted during cleanup. This includes write lock and checksum files | isAutogenerated | {
"repo_name": "rajanm/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/store/Store.java",
"license": "apache-2.0",
"size": 78878
} | [
"org.apache.lucene.index.IndexWriter"
] | import org.apache.lucene.index.IndexWriter; | import org.apache.lucene.index.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,045,685 |
public final NavigableSet<String> getFunctionNames() {
final ImmutableSortedSet.Builder<String> builder =
new ImmutableSortedSet.Builder<>(NameSet.COMPARATOR);
// Add explicit functions, case-sensitive.
builder.addAll(functionMap.map().keySet());
// Add implicit functions, case-sensitive.
... | final NavigableSet<String> function() { final ImmutableSortedSet.Builder<String> builder = new ImmutableSortedSet.Builder<>(NameSet.COMPARATOR); builder.addAll(functionMap.map().keySet()); addImplicitFuncNamesToBuilder(builder); return builder.build(); } | /** Returns the list of function names in this schema, both implicit and
* explicit, never null. */ | Returns the list of function names in this schema, both implicit and | getFunctionNames | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/jdbc/CalciteSchema.java",
"license": "apache-2.0",
"size": 28594
} | [
"com.google.common.collect.ImmutableSortedSet",
"java.util.NavigableSet",
"org.apache.calcite.util.NameSet"
] | import com.google.common.collect.ImmutableSortedSet; import java.util.NavigableSet; import org.apache.calcite.util.NameSet; | import com.google.common.collect.*; import java.util.*; import org.apache.calcite.util.*; | [
"com.google.common",
"java.util",
"org.apache.calcite"
] | com.google.common; java.util; org.apache.calcite; | 202,668 |
public void prepareUpdateStep1b() {
if (!isInitialized()) {
return;
}
if ((m_dbUpdateThread != null) && (m_dbUpdateThread.isFinished())) {
// update is already finished, just wait for client to collect final data
return;
}
if (m_dbUpdate... | void function() { if (!isInitialized()) { return; } if ((m_dbUpdateThread != null) && (m_dbUpdateThread.isFinished())) { return; } if (m_dbUpdateThread == null) { m_dbUpdateThread = new CmsUpdateDBThread(this); } if (!m_dbUpdateThread.isAlive()) { m_dbUpdateThread.start(); } } | /**
* Prepares step 1 of the update wizard.<p>
*/ | Prepares step 1 of the update wizard | prepareUpdateStep1b | {
"repo_name": "victos/opencms-core",
"path": "src-setup/org/opencms/setup/CmsUpdateBean.java",
"license": "lgpl-2.1",
"size": 40225
} | [
"org.opencms.setup.db.CmsUpdateDBThread"
] | import org.opencms.setup.db.CmsUpdateDBThread; | import org.opencms.setup.db.*; | [
"org.opencms.setup"
] | org.opencms.setup; | 202,865 |
private RDSConfig createNewRdsConfig(Stack stack, Cluster cluster, String dbName, String dbUserName, String dbPort) {
RDSConfig rdsConfig = new RDSConfig();
rdsConfig.setName(getRdsType().name() + '_' + stack.getName() + stack.getId());
rdsConfig.setConnectionUserName(dbUserName);
rd... | RDSConfig function(Stack stack, Cluster cluster, String dbName, String dbUserName, String dbPort) { RDSConfig rdsConfig = new RDSConfig(); rdsConfig.setName(getRdsType().name() + '_' + stack.getName() + stack.getId()); rdsConfig.setConnectionUserName(dbUserName); rdsConfig.setConnectionPassword(PasswordUtil.generatePas... | /**
* Creates an RDSConfig object for a specific database.
*
* @param stack stack for naming purposes
* @param cluster cluster to associate database with
* @param dbName database name
* @param dbUserName database user
* @param dbPort port for database connections (through ga... | Creates an RDSConfig object for a specific database | createNewRdsConfig | {
"repo_name": "hortonworks/cloudbreak",
"path": "core/src/main/java/com/sequenceiq/cloudbreak/service/rdsconfig/AbstractRdsConfigProvider.java",
"license": "apache-2.0",
"size": 8299
} | [
"com.sequenceiq.cloudbreak.api.endpoint.v4.common.DatabaseVendor",
"com.sequenceiq.cloudbreak.api.endpoint.v4.common.ResourceStatus",
"com.sequenceiq.cloudbreak.domain.RDSConfig",
"com.sequenceiq.cloudbreak.domain.stack.Stack",
"com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster",
"com.sequenceiq.clou... | import com.sequenceiq.cloudbreak.api.endpoint.v4.common.DatabaseVendor; import com.sequenceiq.cloudbreak.api.endpoint.v4.common.ResourceStatus; import com.sequenceiq.cloudbreak.domain.RDSConfig; import com.sequenceiq.cloudbreak.domain.stack.Stack; import com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster; import co... | import com.sequenceiq.cloudbreak.api.endpoint.v4.common.*; import com.sequenceiq.cloudbreak.domain.*; import com.sequenceiq.cloudbreak.domain.stack.*; import com.sequenceiq.cloudbreak.domain.stack.cluster.*; import com.sequenceiq.cloudbreak.util.*; import java.util.*; | [
"com.sequenceiq.cloudbreak",
"java.util"
] | com.sequenceiq.cloudbreak; java.util; | 2,602,937 |
@Override
public void close() throws IOException {
ascii = null;
eof = true;
b = null;
super.close();
} | void function() throws IOException { ascii = null; eof = true; b = null; super.close(); } | /**
* This will close the underlying stream and release any resources.
*
* @throws IOException If there is an error closing the underlying stream.
*/ | This will close the underlying stream and release any resources | close | {
"repo_name": "sencko/NALB",
"path": "nalb2013/src/org/apache/pdfbox/io/ASCII85InputStream.java",
"license": "gpl-2.0",
"size": 5705
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,021,657 |
@MediumTest
@Feature({"Navigation"})
public void testOpenLink() throws InterruptedException, TimeoutException {
String url1 = TestHttpServerClient.getUrl("chrome/test/data/android/google.html");
String url2 = TestHttpServerClient.getUrl("chrome/test/data/android/about.html");
naviga... | @Feature({STR}) void function() throws InterruptedException, TimeoutException { String url1 = TestHttpServerClient.getUrl(STR); String url2 = TestHttpServerClient.getUrl(STR); navigateAndObserve(url1, url1); assertWaitForPageScaleFactorMatch(0.5f); Tab tab = getActivity().getActivityTab(); DOMUtils.clickNode(this, tab.... | /**
* Test Opening a link and verify that the desired page is loaded.
*/ | Test Opening a link and verify that the desired page is loaded | testOpenLink | {
"repo_name": "SaschaMester/delicium",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/NavigateTest.java",
"license": "bsd-3-clause",
"size": 19334
} | [
"java.util.concurrent.TimeoutException",
"org.chromium.base.test.util.Feature",
"org.chromium.chrome.test.util.ChromeTabUtils",
"org.chromium.chrome.test.util.TestHttpServerClient",
"org.chromium.content.browser.test.util.DOMUtils"
] | import java.util.concurrent.TimeoutException; import org.chromium.base.test.util.Feature; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.chrome.test.util.TestHttpServerClient; import org.chromium.content.browser.test.util.DOMUtils; | import java.util.concurrent.*; import org.chromium.base.test.util.*; import org.chromium.chrome.test.util.*; import org.chromium.content.browser.test.util.*; | [
"java.util",
"org.chromium.base",
"org.chromium.chrome",
"org.chromium.content"
] | java.util; org.chromium.base; org.chromium.chrome; org.chromium.content; | 1,270,775 |
public void setGlobalNamingResources
(NamingResources globalNamingResources) {
NamingResources oldGlobalNamingResources =
this.globalNamingResources;
this.globalNamingResources = globalNamingResources;
this.globalNamingResources.setContainer(this);
support.firePropertyChange("globalNamingRe... | void function (NamingResources globalNamingResources) { NamingResources oldGlobalNamingResources = this.globalNamingResources; this.globalNamingResources = globalNamingResources; this.globalNamingResources.setContainer(this); support.firePropertyChange(STR, oldGlobalNamingResources, this.globalNamingResources); } | /**
* Set the global naming resources.
*
* @param namingResources The new global naming resources
*/ | Set the global naming resources | setGlobalNamingResources | {
"repo_name": "NorthFacing/step-by-Java",
"path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/core/StandardServer.java",
"license": "gpl-2.0",
"size": 64233
} | [
"org.apache.catalina.deploy.NamingResources"
] | import org.apache.catalina.deploy.NamingResources; | import org.apache.catalina.deploy.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 2,182,616 |
private static void initializeScores() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
byte[] b;
try {
try {
dos.writeShort(0);
dos.writeUTF("");
b = b... | static void function() { ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(baos); byte[] b; try { try { dos.writeShort(0); dos.writeUTF(""); b = baos.toByteArray(); dos.close(); } catch (IOException ioe) { throw new RecordStoreException(); } for (int i = 0; i < WormPi... | /**
* Initialize all high scores to 0.
*/ | Initialize all high scores to 0 | initializeScores | {
"repo_name": "ghostgzt/STX",
"path": "src/kavax/wormgame/WormScore.java",
"license": "gpl-3.0",
"size": 7978
} | [
"java.io.ByteArrayOutputStream",
"java.io.DataOutputStream",
"java.io.IOException",
"javax.microedition.rms.RecordStoreException"
] | import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; import javax.microedition.rms.RecordStoreException; | import java.io.*; import javax.microedition.rms.*; | [
"java.io",
"javax.microedition"
] | java.io; javax.microedition; | 535,034 |
// Previously: Called after {@link WebDriver#executeScript(String)}. Not called if an exception is thrown
// So someone should check if this is right. There is no executeScript method
// in WebDriver, but there is in several other places, like this one
void afterScript(String script, WebDriver driver); | void afterScript(String script, WebDriver driver); | /**
* Called after {@link org.openqa.selenium.remote.RemoteWebDriver#executeScript(java.lang.String, java.lang.Object[]) }.
* Not called if an exception is thrown
*
* @param driver WebDriver
* @param script the script that was executed
*/ | Called after <code>org.openqa.selenium.remote.RemoteWebDriver#executeScript(java.lang.String, java.lang.Object[]) </code>. Not called if an exception is thrown | afterScript | {
"repo_name": "p0deje/selenium",
"path": "java/client/src/org/openqa/selenium/support/events/WebDriverEventListener.java",
"license": "apache-2.0",
"size": 6240
} | [
"org.openqa.selenium.WebDriver"
] | import org.openqa.selenium.WebDriver; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 1,005,094 |
@CheckReturnValue
@GenerateBridge
public static <T extends PanacheEntityBase> Multi<T> streamAll() {
throw INSTANCE.implementationInjectionMissing();
} | static <T extends PanacheEntityBase> Multi<T> function() { throw INSTANCE.implementationInjectionMissing(); } | /**
* Find all entities of this type.
* This method is a shortcut for <code>findAll().stream()</code>.
* It requires a transaction to work.
* Without a transaction, the underlying cursor can be closed before the end of the stream.
*
* @return a {@link Stream} containing all results, withou... | Find all entities of this type. This method is a shortcut for <code>findAll().stream()</code>. It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream | streamAll | {
"repo_name": "quarkusio/quarkus",
"path": "extensions/panache/hibernate-reactive-panache/runtime/src/main/java/io/quarkus/hibernate/reactive/panache/PanacheEntityBase.java",
"license": "apache-2.0",
"size": 30529
} | [
"io.quarkus.hibernate.reactive.panache.runtime.JpaOperations",
"io.smallrye.mutiny.Multi"
] | import io.quarkus.hibernate.reactive.panache.runtime.JpaOperations; import io.smallrye.mutiny.Multi; | import io.quarkus.hibernate.reactive.panache.runtime.*; import io.smallrye.mutiny.*; | [
"io.quarkus.hibernate",
"io.smallrye.mutiny"
] | io.quarkus.hibernate; io.smallrye.mutiny; | 946,889 |
default List<Annotation> targets(@NonNull RelationType type, @NonNull String value) {
return targets(type, value, true);
} | default List<Annotation> targets(@NonNull RelationType type, @NonNull String value) { return targets(type, value, true); } | /**
* Gets targets.
*
* @param type the type
* @param value the value
* @return the targets
*/ | Gets targets | targets | {
"repo_name": "dbracewell/hermes",
"path": "hermes-core/src/main/java/com/davidbracewell/hermes/RelationalObject.java",
"license": "apache-2.0",
"size": 6228
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,040,872 |
@Test
@TestOrder(4)
public void test4TestComponentHierarchy() {
log("test4TestComponentHierarchy");
assertEquals(3, panel1.getBindingModel().getBindingVariablesCount());
panel1.addToSubComponents(panel2, new TwoColsLayoutConstraints(TwoColsLayoutLocation.center, true, true));
System.out.println("BM for... | @TestOrder(4) void function() { log(STR); assertEquals(3, panel1.getBindingModel().getBindingVariablesCount()); panel1.addToSubComponents(panel2, new TwoColsLayoutConstraints(TwoColsLayoutLocation.center, true, true)); System.out.println(STR + panel1.getBindingModel()); assertEquals(7, panel1.getBindingModel().getBindi... | /**
* Extended tests on component hierarchy
*/ | Extended tests on component hierarchy | test4TestComponentHierarchy | {
"repo_name": "openflexo-team/gina",
"path": "gina-swing/src/test/java/org/openflexo/gina/swing/utils/swing/TestBindingModel.java",
"license": "gpl-3.0",
"size": 29698
} | [
"org.junit.Assert",
"org.openflexo.connie.DataBinding",
"org.openflexo.gina.model.FIBVariable",
"org.openflexo.gina.model.container.layout.TwoColsLayoutConstraints",
"org.openflexo.gina.sampleData.Family",
"org.openflexo.gina.sampleData.Person",
"org.openflexo.test.TestOrder"
] | import org.junit.Assert; import org.openflexo.connie.DataBinding; import org.openflexo.gina.model.FIBVariable; import org.openflexo.gina.model.container.layout.TwoColsLayoutConstraints; import org.openflexo.gina.sampleData.Family; import org.openflexo.gina.sampleData.Person; import org.openflexo.test.TestOrder; | import org.junit.*; import org.openflexo.connie.*; import org.openflexo.gina.*; import org.openflexo.gina.model.*; import org.openflexo.gina.model.container.layout.*; import org.openflexo.test.*; | [
"org.junit",
"org.openflexo.connie",
"org.openflexo.gina",
"org.openflexo.test"
] | org.junit; org.openflexo.connie; org.openflexo.gina; org.openflexo.test; | 693,818 |
public static String format(Date date, String pattern) {
DateFormat df = createDateFormat(pattern);
return df.format(date);
} | static String function(Date date, String pattern) { DateFormat df = createDateFormat(pattern); return df.format(date); } | /**
* Format a date/time into a specific pattern.
* @param date the date to format expressed in milliseconds.
* @param pattern the pattern to use to format the date.
* @return the formatted date.
*/ | Format a date/time into a specific pattern | format | {
"repo_name": "sosilent/euca",
"path": "clc/modules/msgs/src/main/java/org/apache/tools/ant/util/DateUtils.java",
"license": "gpl-3.0",
"size": 12918
} | [
"java.text.DateFormat",
"java.util.Date"
] | import java.text.DateFormat; import java.util.Date; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 2,388,315 |
public boolean readRemoteHeaders() throws IOException {
return readHeaders(true);
}
| boolean function() throws IOException { return readHeaders(true); } | /**
* Reads headers from remote server until end of header block is reached
*
* @return success
*/ | Reads headers from remote server until end of header block is reached | readRemoteHeaders | {
"repo_name": "oxguy3/AwesomeProxy",
"path": "src/RequestWorker.java",
"license": "mit",
"size": 24573
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 821,557 |
@Override public void enterSearch_condition(@NotNull LuceneSqlParser.Search_conditionContext ctx) { } | @Override public void enterSearch_condition(@NotNull LuceneSqlParser.Search_conditionContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitLimit_stmt | {
"repo_name": "bbejeck/nosql-jdbc-driver",
"path": "src/main/java/bbejeck/nosql/antlr/generated/LuceneSqlBaseListener.java",
"license": "apache-2.0",
"size": 18266
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,893,676 |
public void setMeasureActual (BigDecimal MeasureActual); | void function (BigDecimal MeasureActual); | /** Set Measure Actual.
* Actual value that has been measured.
*/ | Set Measure Actual. Actual value that has been measured | setMeasureActual | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/I_PA_Goal.java",
"license": "gpl-2.0",
"size": 10591
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,144,300 |
private File writeTargetToProjectFile()
throws IOException, PlexusConfigurationException
{
// Have to use an XML writer because in Maven 2.x the PlexusConfig toString() method loses XML attributes
StringWriter writer = new StringWriter();
AntrunXmlPlexusConfigurationWriter xmlWri... | File function() throws IOException, PlexusConfigurationException { StringWriter writer = new StringWriter(); AntrunXmlPlexusConfigurationWriter xmlWriter = new AntrunXmlPlexusConfigurationWriter(); xmlWriter.write( target, writer ); StringBuilder antProjectConfig = new StringBuilder( writer.getBuffer() ); stringReplace... | /**
* Write the Ant target and surrounding tags to a temporary file
*
* @throws PlexusConfigurationException
*/ | Write the Ant target and surrounding tags to a temporary file | writeTargetToProjectFile | {
"repo_name": "restlet/maven-plugins",
"path": "maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java",
"license": "apache-2.0",
"size": 24538
} | [
"java.io.File",
"java.io.IOException",
"java.io.StringWriter",
"org.codehaus.plexus.configuration.PlexusConfigurationException",
"org.codehaus.plexus.util.FileUtils"
] | import java.io.File; import java.io.IOException; import java.io.StringWriter; import org.codehaus.plexus.configuration.PlexusConfigurationException; import org.codehaus.plexus.util.FileUtils; | import java.io.*; import org.codehaus.plexus.configuration.*; import org.codehaus.plexus.util.*; | [
"java.io",
"org.codehaus.plexus"
] | java.io; org.codehaus.plexus; | 772,836 |
public ServiceCall<Boolean> checkExistenceAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, final ServiceCallback<Boolean> serviceCallback) {
return ServiceCall.create(checkExistenceWithServiceResponseAsy... | ServiceCall<Boolean> function(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, final ServiceCallback<Boolean> serviceCallback) { return ServiceCall.create(checkExistenceWithServiceResponseAsync(resourceGroupName, resource... | /**
* Checks whether resource exists.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param resourceProviderNamespace Resource identity.
* @param parentResourcePath Resource identity.
* @param resourceType Resource identity.
* @param resou... | Checks whether resource exists | checkExistenceAsync | {
"repo_name": "herveyw/azure-sdk-for-java",
"path": "azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java",
"license": "mit",
"size": 56236
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,643,760 |
private void playMessageSound(String message, int delay, int tone, int volume) throws InterruptedException{
ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_RING,volume);
char[] charMessage = message.toCharArray();
StringMap map = new StringMap();
int timeToPlay = 0;
AudioManager audio = (Aud... | void function(String message, int delay, int tone, int volume) throws InterruptedException{ ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_RING,volume); char[] charMessage = message.toCharArray(); StringMap map = new StringMap(); int timeToPlay = 0; AudioManager audio = (AudioManager) getBaseContext().getSyst... | /** Method of playMessageSound(String message, int delay, int tone, int volume) throws InterruptedException
*
* Plays a message on the speaker using ToneGenerator.
*
* @author Ethan Hall
* @param message STring that will be vibrated out
* @param delay Base delay in MS
* @param tone a {@link}AudioManag... | Method of playMessageSound(String message, int delay, int tone, int volume) throws InterruptedException Plays a message on the speaker using ToneGenerator | playMessageSound | {
"repo_name": "ethankhall/Morse-Messenger",
"path": "src/com/kopysoft/MorseMessenger/recieve/PlayMessage.java",
"license": "mit",
"size": 6353
} | [
"android.content.Context",
"android.media.AudioManager",
"android.media.ToneGenerator",
"android.util.Log",
"com.kopysoft.MorseMessenger"
] | import android.content.Context; import android.media.AudioManager; import android.media.ToneGenerator; import android.util.Log; import com.kopysoft.MorseMessenger; | import android.content.*; import android.media.*; import android.util.*; import com.kopysoft.*; | [
"android.content",
"android.media",
"android.util",
"com.kopysoft"
] | android.content; android.media; android.util; com.kopysoft; | 546,774 |
void createDataConnector(DataConnector dataConnector)
throws InvalidObjectException, MetaException; | void createDataConnector(DataConnector dataConnector) throws InvalidObjectException, MetaException; | /**
* Create a dataconnector.
* @param dataConnector dataconnector to create.
* @throws InvalidObjectException not sure it actually ever throws this.
* @throws MetaException if something goes wrong, usually in writing it to the dataconnector.
*/ | Create a dataconnector | createDataConnector | {
"repo_name": "sankarh/hive",
"path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java",
"license": "apache-2.0",
"size": 95486
} | [
"org.apache.hadoop.hive.metastore.api.DataConnector",
"org.apache.hadoop.hive.metastore.api.InvalidObjectException",
"org.apache.hadoop.hive.metastore.api.MetaException"
] | import org.apache.hadoop.hive.metastore.api.DataConnector; import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.MetaException; | import org.apache.hadoop.hive.metastore.api.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,884,233 |
public boolean doPrint(Patient pat, String templateName, String printer, String tray,
IProgressMonitor monitor){
monitor.subTask(pat.getLabel());
// TODO ?
// GlobalEvents.getInstance().fireSelectionEvent(rn,getViewSite());
existing = ctab.getItems().length;
CTabItem ct;
TextContainer text;
if... | boolean function(Patient pat, String templateName, String printer, String tray, IProgressMonitor monitor){ monitor.subTask(pat.getLabel()); existing = ctab.getItems().length; CTabItem ct; TextContainer text; if (--existing < 0) { ct = addItem(templateName, templateName, pat); } else { ct = ctab.getItem(0); useItem(0, t... | /**
* Drukt Dokument anhand einer Vorlage
*
* @param pat
* der Patient
* @param templateName
* Name der Vorlage
* @param printer
* Printer
* @param tray
* Tray
* @param monitor
* @return
*/ | Drukt Dokument anhand einer Vorlage | doPrint | {
"repo_name": "sazgin/elexis-3-core",
"path": "ch.elexis.core.ui/src/ch/elexis/core/ui/views/TemplatePrintView.java",
"license": "epl-1.0",
"size": 4341
} | [
"ch.elexis.core.ui.text.TextContainer",
"ch.elexis.data.Patient",
"org.eclipse.core.runtime.IProgressMonitor",
"org.eclipse.swt.custom.CTabItem"
] | import ch.elexis.core.ui.text.TextContainer; import ch.elexis.data.Patient; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.swt.custom.CTabItem; | import ch.elexis.core.ui.text.*; import ch.elexis.data.*; import org.eclipse.core.runtime.*; import org.eclipse.swt.custom.*; | [
"ch.elexis.core",
"ch.elexis.data",
"org.eclipse.core",
"org.eclipse.swt"
] | ch.elexis.core; ch.elexis.data; org.eclipse.core; org.eclipse.swt; | 2,652,843 |
@Override
public void injectEvents(HandlerManager eventBus) {
// TODO Auto-generated method stub
} | void function(HandlerManager eventBus) { } | /**
* To handle events.
*
* @param eventBus HandlerManager
*/ | To handle events | injectEvents | {
"repo_name": "kuzavas/ephesoft",
"path": "dcma-gwt/dcma-gwt-admin/src/main/java/com/ephesoft/dcma/gwt/admin/bm/client/presenter/plugin/KV_PP_ConfigListPresenter.java",
"license": "agpl-3.0",
"size": 3209
} | [
"com.google.gwt.event.shared.HandlerManager"
] | import com.google.gwt.event.shared.HandlerManager; | import com.google.gwt.event.shared.*; | [
"com.google.gwt"
] | com.google.gwt; | 964,809 |
public static boolean hasMobReferenceTag(List<Tag> tags) {
if (!tags.isEmpty()) {
for (Tag tag : tags) {
if (tag.getType() == TagType.MOB_REFERENCE_TAG_TYPE) {
return true;
}
}
}
return false;
} | static boolean function(List<Tag> tags) { if (!tags.isEmpty()) { for (Tag tag : tags) { if (tag.getType() == TagType.MOB_REFERENCE_TAG_TYPE) { return true; } } } return false; } | /**
* Whether the tag list has a mob reference tag.
* @param tags The tag list.
* @return True if the list has a mob reference tag, false if it doesn't.
*/ | Whether the tag list has a mob reference tag | hasMobReferenceTag | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobUtils.java",
"license": "apache-2.0",
"size": 39255
} | [
"java.util.List",
"org.apache.hadoop.hbase.Tag",
"org.apache.hadoop.hbase.TagType"
] | import java.util.List; import org.apache.hadoop.hbase.Tag; import org.apache.hadoop.hbase.TagType; | import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,947,804 |
public void test_fastRangeCountOptimizer_triplesMode_wildcard_rejection() {
class WildCardHelper extends Helper {
public WildCardHelper(HelperFlag... flags) {
given =
select(
projection(bind(
functionNode(
FunctionRegistry.COUNT,
varNode(p)... | void function() { class WildCardHelper extends Helper { public WildCardHelper(HelperFlag... flags) { given = select( projection(bind( functionNode( FunctionRegistry.COUNT, varNode(p) ), varNode(w) )), where( statementPatternNode(constantNode(a), varNode(p), varNode(o)) ), flags); expected = new QueryRoot(given); } } (n... | /**
* Verify correct rejection:
* <pre>SELECT COUNT(?p) {:s ?p ?o}</pre>
* <pre>SELECT COUNT(DISTINCT ?p) {:s ?p ?o}</pre>
* <pre>SELECT COUNT(REDUCED ?p) {:s ?p ?o}</pre>
*/ | Verify correct rejection: <code>SELECT COUNT(?p) {:s ?p ?o}</code> <code>SELECT COUNT(DISTINCT ?p) {:s ?p ?o}</code> <code>SELECT COUNT(REDUCED ?p) {:s ?p ?o}</code> | test_fastRangeCountOptimizer_triplesMode_wildcard_rejection | {
"repo_name": "blazegraph/database",
"path": "bigdata-rdf-test/src/test/java/com/bigdata/rdf/sparql/ast/optimizers/TestASTFastRangeCountOptimizer.java",
"license": "gpl-2.0",
"size": 20519
} | [
"com.bigdata.rdf.sparql.ast.FunctionRegistry",
"com.bigdata.rdf.sparql.ast.QueryRoot"
] | import com.bigdata.rdf.sparql.ast.FunctionRegistry; import com.bigdata.rdf.sparql.ast.QueryRoot; | import com.bigdata.rdf.sparql.ast.*; | [
"com.bigdata.rdf"
] | com.bigdata.rdf; | 2,793,919 |
Date getLastUpdated();
| Date getLastUpdated(); | /**
* Returns the date of the last updated object.
*
* @return a Date / time stamp.
*/ | Returns the date of the last updated object | getLastUpdated | {
"repo_name": "kakada/dhis2",
"path": "dhis-api/src/main/java/org/hisp/dhis/common/GenericIdentifiableObjectStore.java",
"license": "bsd-3-clause",
"size": 8420
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 634,179 |
public static boolean mkdirs(FileSystem fs, Path dir, FsPermission permission)
throws IOException {
// create the directory using the default permission
boolean result = fs.mkdirs(dir);
// set its permission to be the supplied one
fs.setPermission(dir, permission);
return result;
}
////////... | static boolean function(FileSystem fs, Path dir, FsPermission permission) throws IOException { boolean result = fs.mkdirs(dir); fs.setPermission(dir, permission); return result; } protected FileSystem() { super(null); } | /** create a directory with the provided permission
* The permission of the directory is set to be the provided permission as in
* setPermission, not permission&~umask
*
* @see #create(FileSystem, Path, FsPermission)
*
* @param fs file system handle
* @param dir the name of the directory to be cr... | create a directory with the provided permission The permission of the directory is set to be the provided permission as in setPermission, not permission&~umask | mkdirs | {
"repo_name": "Microsoft-CISL/hadoop-prototype",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java",
"license": "apache-2.0",
"size": 116772
} | [
"java.io.IOException",
"org.apache.hadoop.fs.permission.FsPermission"
] | import java.io.IOException; import org.apache.hadoop.fs.permission.FsPermission; | import java.io.*; import org.apache.hadoop.fs.permission.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 215,803 |
public static List<Note> getNotesList() throws IOException {
SQLiteDatabase sqliteDatabase = GeopaparazziApplication.getInstance().getDatabase();
List<Note> notesList = new ArrayList<Note>();
String asColumnsToReturn[] = {COLUMN_ID, COLUMN_LON, COLUMN_LAT, COLUMN_ALTIM, COLUMN_TS, COLUMN_TEX... | static List<Note> function() throws IOException { SQLiteDatabase sqliteDatabase = GeopaparazziApplication.getInstance().getDatabase(); List<Note> notesList = new ArrayList<Note>(); String asColumnsToReturn[] = {COLUMN_ID, COLUMN_LON, COLUMN_LAT, COLUMN_ALTIM, COLUMN_TS, COLUMN_TEXT, COLUMN_CATEGORY, COLUMN_FORM, COLUMN... | /**
* Get the list of notes from the db.
*
* @return list of notes.
* @throws IOException if something goes wrong.
*/ | Get the list of notes from the db | getNotesList | {
"repo_name": "gabrielmancilla/mtisig",
"path": "geopaparazzi.app/src/eu/hydrologis/geopaparazzi/database/DaoNotes.java",
"license": "gpl-3.0",
"size": 19521
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase",
"eu.hydrologis.geopaparazzi.GeopaparazziApplication",
"eu.hydrologis.geopaparazzi.util.Note",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import eu.hydrologis.geopaparazzi.GeopaparazziApplication; import eu.hydrologis.geopaparazzi.util.Note; import java.io.IOException; import java.util.ArrayList; import java.util.List; | import android.database.*; import android.database.sqlite.*; import eu.hydrologis.geopaparazzi.*; import eu.hydrologis.geopaparazzi.util.*; import java.io.*; import java.util.*; | [
"android.database",
"eu.hydrologis.geopaparazzi",
"java.io",
"java.util"
] | android.database; eu.hydrologis.geopaparazzi; java.io; java.util; | 1,751,322 |
public OutNetMessage getNext(long blockUntil);
public void add(OutNetMessage message); | OutNetMessage getNext(long blockUntil); public void function(OutNetMessage message); | /**
* Add on a new message to the queue
*/ | Add on a new message to the queue | add | {
"repo_name": "oakes/Nightweb",
"path": "common/java/router/net/i2p/router/transport/udp/MessageQueue.java",
"license": "unlicense",
"size": 481
} | [
"net.i2p.router.OutNetMessage"
] | import net.i2p.router.OutNetMessage; | import net.i2p.router.*; | [
"net.i2p.router"
] | net.i2p.router; | 2,420,336 |
@SmallTest
public void testAsyncWaiterCorrectResult() {
Core core = CoreImpl.getInstance();
// Checking a correct result.
Pair<MessagePipeHandle, MessagePipeHandle> handles = core.createMessagePipe();
try {
final AsyncWaiterResult asyncWaiterResult = new AsyncWaiterR... | void function() { Core core = CoreImpl.getInstance(); Pair<MessagePipeHandle, MessagePipeHandle> handles = core.createMessagePipe(); try { final AsyncWaiterResult asyncWaiterResult = new AsyncWaiterResult(); assertEquals(Integer.MIN_VALUE, asyncWaiterResult.getResult()); assertEquals(null, asyncWaiterResult.getExceptio... | /**
* Testing core {@link AsyncWaiter} implementation.
*/ | Testing core <code>AsyncWaiter</code> implementation | testAsyncWaiterCorrectResult | {
"repo_name": "TeamEOS/external_chromium_org",
"path": "mojo/android/javatests/src/org/chromium/mojo/system/impl/CoreImplTest.java",
"license": "bsd-3-clause",
"size": 31655
} | [
"java.nio.ByteBuffer",
"org.chromium.mojo.system.Core",
"org.chromium.mojo.system.MessagePipeHandle",
"org.chromium.mojo.system.MojoResult",
"org.chromium.mojo.system.Pair"
] | import java.nio.ByteBuffer; import org.chromium.mojo.system.Core; import org.chromium.mojo.system.MessagePipeHandle; import org.chromium.mojo.system.MojoResult; import org.chromium.mojo.system.Pair; | import java.nio.*; import org.chromium.mojo.system.*; | [
"java.nio",
"org.chromium.mojo"
] | java.nio; org.chromium.mojo; | 1,090,603 |
private void setMenuForAllWidgets(Composite mainComposite, Menu popupMenu)
{
mainComposite.setMenu(popupMenu);
for (Control control : mainComposite.getChildren())
{
control.setMenu(popupMenu);
if (control instanceof Composite && ((Composite) control).get... | void function(Composite mainComposite, Menu popupMenu) { mainComposite.setMenu(popupMenu); for (Control control : mainComposite.getChildren()) { control.setMenu(popupMenu); if (control instanceof Composite && ((Composite) control).getChildren().length > 0) { setMenuForAllWidgets((Composite) control, popupMenu); } } } | /**
* Recursively add the menu for all widgets
*
* @param mainComposite the main composite
* @param popupMenu the menu to be added to the main composite all all children widgets
*/ | Recursively add the menu for all widgets | setMenuForAllWidgets | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "tools/motodev/src/plugins/videos/src/com/motorola/studio/android/videos/ui/views/VideoComposite.java",
"license": "gpl-2.0",
"size": 18250
} | [
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Control",
"org.eclipse.swt.widgets.Menu"
] | import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Menu; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,398,953 |
public int create(Context appContext)
{
return createNotification(appContext);
} | int function(Context appContext) { return createNotification(appContext); } | /**
* Create a notification object.
* @param appContext Application's context.
* @return The unique notification id.
*/ | Create a notification object | create | {
"repo_name": "tybor/MoSync",
"path": "runtimes/java/platforms/androidJNI/AndroidProject/src/com/mosync/internal/android/notifications/LocalNotificationsManager.java",
"license": "gpl-2.0",
"size": 13368
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,737,280 |
private BeanFactory getBeanFactory(final BundleContext bundleContext) throws Exception {
final String filter = "(" + OsgiServicePropertiesResolver.BEAN_NAME_PROPERTY_KEY + "=" + bundleContext.getBundle().getSymbolicName() + ")";
final ServiceReference[] applicationContextRefs = bundleContext.getServ... | BeanFactory function(final BundleContext bundleContext) throws Exception { final String filter = "(" + OsgiServicePropertiesResolver.BEAN_NAME_PROPERTY_KEY + "=" + bundleContext.getBundle().getSymbolicName() + ")"; final ServiceReference[] applicationContextRefs = bundleContext.getServiceReferences(ApplicationContext.c... | /**
* Return the {@link BeanFactory} for the given {@link BundleContext}. If none can be found we just create a new {@link AbstractDelegatedExecutionApplicationContext} and return the {@link BeanFactory} of it
*
*
* @param bundleContext
* @return factory
* @throws Exception
*/ | Return the <code>BeanFactory</code> for the given <code>BundleContext</code>. If none can be found we just create a new <code>AbstractDelegatedExecutionApplicationContext</code> and return the <code>BeanFactory</code> of it | getBeanFactory | {
"repo_name": "imatin/James",
"path": "container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractBundleTracker.java",
"license": "apache-2.0",
"size": 8722
} | [
"org.osgi.framework.BundleContext",
"org.osgi.framework.ServiceReference",
"org.springframework.beans.factory.BeanFactory",
"org.springframework.context.ApplicationContext",
"org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext",
"org.springframework.osgi.service.exporter.... | import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.springframework.beans.factory.BeanFactory; import org.springframework.context.ApplicationContext; import org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext; import org.springframework.osgi.... | import org.osgi.framework.*; import org.springframework.beans.factory.*; import org.springframework.context.*; import org.springframework.osgi.context.support.*; import org.springframework.osgi.service.exporter.*; | [
"org.osgi.framework",
"org.springframework.beans",
"org.springframework.context",
"org.springframework.osgi"
] | org.osgi.framework; org.springframework.beans; org.springframework.context; org.springframework.osgi; | 1,916,241 |
public JobMeta loadJobMeta(String jobname, RepositoryDirectoryInterface repdir) throws KettleException {
return loadJobMeta(jobname, repdir, null);
}
| JobMeta function(String jobname, RepositoryDirectoryInterface repdir) throws KettleException { return loadJobMeta(jobname, repdir, null); } | /**
* Load a job from the repository
*
* @param jobname The name of the job
* @param repdir The directory in which the job resides.
* @throws KettleException
*/ | Load a job from the repository | loadJobMeta | {
"repo_name": "lihongqiang/kettle-4.4.0-stable",
"path": "src/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryJobDelegate.java",
"license": "apache-2.0",
"size": 40026
} | [
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.job.JobMeta",
"org.pentaho.di.repository.RepositoryDirectoryInterface"
] | import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.job.JobMeta; import org.pentaho.di.repository.RepositoryDirectoryInterface; | import org.pentaho.di.core.exception.*; import org.pentaho.di.job.*; import org.pentaho.di.repository.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,155,834 |
public void openConnection() throws IhcExecption {
logger.debug("Opening connection");
setConnectionState(ConnectionState.CONNECTING);
ihcConnectionPool = new IhcConnectionPool();
authenticationService = new IhcAuthenticationService(host, timeout, ihcConnectionPool);
WSLogin... | void function() throws IhcExecption { logger.debug(STR); setConnectionState(ConnectionState.CONNECTING); ihcConnectionPool = new IhcConnectionPool(); authenticationService = new IhcAuthenticationService(host, timeout, ihcConnectionPool); WSLoginResult loginResult = authenticationService.authenticate(username, password,... | /**
* Open connection and authenticate session to IHC / ELKO LS controller.
*
* @throws IhcExecption
*/ | Open connection and authenticate session to IHC / ELKO LS controller | openConnection | {
"repo_name": "openhab/openhab2",
"path": "bundles/org.openhab.binding.ihc/src/main/java/org/openhab/binding/ihc/internal/ws/IhcClient.java",
"license": "epl-1.0",
"size": 20450
} | [
"org.openhab.binding.ihc.internal.ws.datatypes.WSLoginResult",
"org.openhab.binding.ihc.internal.ws.exeptions.IhcExecption",
"org.openhab.binding.ihc.internal.ws.http.IhcConnectionPool",
"org.openhab.binding.ihc.internal.ws.services.IhcAirlinkManagementService",
"org.openhab.binding.ihc.internal.ws.services... | import org.openhab.binding.ihc.internal.ws.datatypes.WSLoginResult; import org.openhab.binding.ihc.internal.ws.exeptions.IhcExecption; import org.openhab.binding.ihc.internal.ws.http.IhcConnectionPool; import org.openhab.binding.ihc.internal.ws.services.IhcAirlinkManagementService; import org.openhab.binding.ihc.intern... | import org.openhab.binding.ihc.internal.ws.datatypes.*; import org.openhab.binding.ihc.internal.ws.exeptions.*; import org.openhab.binding.ihc.internal.ws.http.*; import org.openhab.binding.ihc.internal.ws.services.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 2,846,137 |
@Test
public void setTargetLocTest() {
NdPoint ndp = new NdPoint(0.0, 0.0);
gh.setTargetLocation(ndp);
verify(bot).setTargetLocation(ndp);
} | void function() { NdPoint ndp = new NdPoint(0.0, 0.0); gh.setTargetLocation(ndp); verify(bot).setTargetLocation(ndp); } | /**
* Test for setTargetLoc().
*/ | Test for setTargetLoc() | setTargetLocTest | {
"repo_name": "eishub/BW4T",
"path": "bw4t-server/src/test/java/nl/tudelft/bw4t/server/model/robots/handicap/RobotDecoratorTest.java",
"license": "gpl-3.0",
"size": 6909
} | [
"org.mockito.Mockito"
] | import org.mockito.Mockito; | import org.mockito.*; | [
"org.mockito"
] | org.mockito; | 704,059 |
public BigInteger getTraceId() {
return traceId;
} | BigInteger function() { return traceId; } | /**
* Returns the big integer that represents the trace identifier.
*
* @return the trace identifier.
*/ | Returns the big integer that represents the trace identifier | getTraceId | {
"repo_name": "erikmcc/cloud-trace-java",
"path": "sdk/core/src/main/java/com/google/cloud/trace/core/TraceId.java",
"license": "apache-2.0",
"size": 2695
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 2,630,307 |
private void autoCompleteSilences(TGSongManager manager){
manager.getMeasureManager().autoCompleteSilences(this);
}
| void function(TGSongManager manager){ manager.getMeasureManager().autoCompleteSilences(this); } | /**
* Calcula si hay espacios libres. y crea nuevos silencios
*/ | Calcula si hay espacios libres. y crea nuevos silencios | autoCompleteSilences | {
"repo_name": "m-wichmann/tg2ly",
"path": "src/org/herac/tuxguitar/graphics/control/TGMeasureImpl.java",
"license": "lgpl-2.1",
"size": 46187
} | [
"org.herac.tuxguitar.song.managers.TGSongManager"
] | import org.herac.tuxguitar.song.managers.TGSongManager; | import org.herac.tuxguitar.song.managers.*; | [
"org.herac.tuxguitar"
] | org.herac.tuxguitar; | 2,156,830 |
public List<Integer> getTemplates() {
return templates;
}
| List<Integer> function() { return templates; } | /**
* Get templates
* @return templates
*/ | Get templates | getTemplates | {
"repo_name": "support-project/knowledge",
"path": "src/main/java/org/support/project/knowledge/searcher/SearchingValue.java",
"license": "apache-2.0",
"size": 5216
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 590,325 |
public List<Player> getPlayers(); | List<Player> function(); | /**
* Get a list of all players in this World
*
* @return A list of all Players currently residing in this world
*/ | Get a list of all players in this World | getPlayers | {
"repo_name": "raws/spout-commons",
"path": "src/main/java/org/getspout/commons/World.java",
"license": "lgpl-3.0",
"size": 24860
} | [
"java.util.List",
"org.getspout.commons.entity.Player"
] | import java.util.List; import org.getspout.commons.entity.Player; | import java.util.*; import org.getspout.commons.entity.*; | [
"java.util",
"org.getspout.commons"
] | java.util; org.getspout.commons; | 1,580,881 |
protected void filterPackageRootDist(final PackageRequest packageRequest, final PackageRoot packageRoot) {
for (PackageVersion packageVersion : packageRoot.getVersions().values()) {
filterPackageVersionDist(packageRequest, packageVersion);
}
} | void function(final PackageRequest packageRequest, final PackageRoot packageRoot) { for (PackageVersion packageVersion : packageRoot.getVersions().values()) { filterPackageVersionDist(packageRequest, packageVersion); } } | /**
* Invokes {@link #filterPackageVersionDist(PackageRequest, PackageVersion)} on each version of the passed in package
* root.
*/ | Invokes <code>#filterPackageVersionDist(PackageRequest, PackageVersion)</code> on each version of the passed in package root | filterPackageRootDist | {
"repo_name": "scmod/nexus-public",
"path": "plugins/npm/nexus-npm-repository-plugin/src/main/java/com/bolyuba/nexus/plugin/npm/service/internal/GeneratorSupport.java",
"license": "epl-1.0",
"size": 8019
} | [
"com.bolyuba.nexus.plugin.npm.service.PackageRequest",
"com.bolyuba.nexus.plugin.npm.service.PackageRoot",
"com.bolyuba.nexus.plugin.npm.service.PackageVersion"
] | import com.bolyuba.nexus.plugin.npm.service.PackageRequest; import com.bolyuba.nexus.plugin.npm.service.PackageRoot; import com.bolyuba.nexus.plugin.npm.service.PackageVersion; | import com.bolyuba.nexus.plugin.npm.service.*; | [
"com.bolyuba.nexus"
] | com.bolyuba.nexus; | 1,327,780 |
public List<DeploymentPolicy> retrieveDeploymentPolicies() {
try {
startTenantFlow();
List<DeploymentPolicy> depPolicyList = new ArrayList<DeploymentPolicy>();
RegistryManager registryManager = RegistryManager.getInstance();
String[] depPolicyResourceList = (S... | List<DeploymentPolicy> function() { try { startTenantFlow(); List<DeploymentPolicy> depPolicyList = new ArrayList<DeploymentPolicy>(); RegistryManager registryManager = RegistryManager.getInstance(); String[] depPolicyResourceList = (String[]) registryManager.retrieve(AutoscalerConstants.AUTOSCALER_RESOURCE + Autoscale... | /**
* Retrieve deployment policies from registry
*
* @return all the deployment policies
*/ | Retrieve deployment policies from registry | retrieveDeploymentPolicies | {
"repo_name": "pkdevbox/stratos",
"path": "components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java",
"license": "apache-2.0",
"size": 30545
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy",
"org.apache.stratos.autoscaler.util.AutoscalerConstants",
"org.apache.stratos.autoscaler.util.Deserializer"
] | import java.util.ArrayList; import java.util.List; import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy; import org.apache.stratos.autoscaler.util.AutoscalerConstants; import org.apache.stratos.autoscaler.util.Deserializer; | import java.util.*; import org.apache.stratos.autoscaler.pojo.policy.deployment.*; import org.apache.stratos.autoscaler.util.*; | [
"java.util",
"org.apache.stratos"
] | java.util; org.apache.stratos; | 2,696,114 |
@Override
public void onSensorChanged(SensorEvent event) {
// Only look at step counter events
if (event.sensor.getType() != Sensor.TYPE_STEP_COUNTER) {
return;
}
// If not running, then just return
if (this.status == PedoListener.STOPPED) {
retur... | void function(SensorEvent event) { if (event.sensor.getType() != Sensor.TYPE_STEP_COUNTER) { return; } if (this.status == PedoListener.STOPPED) { return; } this.setStatus(PedoListener.RUNNING); float steps = event.values[0]; if(this.startsteps == 0) this.startsteps = steps; steps = steps - this.startsteps; this.win(thi... | /**
* Sensor listener event.
* @param event
*/ | Sensor listener event | onSensorChanged | {
"repo_name": "jacobpaine/PaineWalks",
"path": "plugins/cordova-plugin-pedometer/src/android/PedoListener.java",
"license": "mit",
"size": 8983
} | [
"android.hardware.Sensor",
"android.hardware.SensorEvent"
] | import android.hardware.Sensor; import android.hardware.SensorEvent; | import android.hardware.*; | [
"android.hardware"
] | android.hardware; | 2,691,175 |
public static Object[][] getDataByKeys(Map<?, ?> map, String[] keys) {
logger.entering(new Object[] { map, keys });
if (ArrayUtils.isEmpty(keys)) {
throw new IllegalArgumentException("Keys cannot be null or empty.");
}
Map<String, Object> requestedMap = new LinkedHashMa... | static Object[][] function(Map<?, ?> map, String[] keys) { logger.entering(new Object[] { map, keys }); if (ArrayUtils.isEmpty(keys)) { throw new IllegalArgumentException(STR); } Map<String, Object> requestedMap = new LinkedHashMap<>(); for (String key : keys) { Object obj = map.get(key); if (obj == null) { throw new I... | /**
* Filters a map by keys specified as a list.
*
* @param map
* The Map containing keys.
* @param keys
* Non-empty array of string keys.
* @return Object[][] two dimensional object to be used with TestNG DataProvider.
* @throws IllegalArgumentException
... | Filters a map by keys specified as a list | getDataByKeys | {
"repo_name": "ILikeToNguyen/SeLion",
"path": "dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/DataProviderHelper.java",
"license": "apache-2.0",
"size": 29323
} | [
"java.io.IOException",
"java.util.LinkedHashMap",
"java.util.Map",
"org.apache.commons.lang.ArrayUtils"
] | import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; import org.apache.commons.lang.ArrayUtils; | import java.io.*; import java.util.*; import org.apache.commons.lang.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 289,049 |
private int getCount(final HTree htree, final byte[] k1) {
final ITupleIterator<?> iter = htree.lookupAll(k1);
int count = 0;
while (iter.hasNext()) {
iter.next();
count++;
}
return count;
}
| int function(final HTree htree, final byte[] k1) { final ITupleIterator<?> iter = htree.lookupAll(k1); int count = 0; while (iter.hasNext()) { iter.next(); count++; } return count; } | /**
* Return the #of entries having the specified key.
*
* @param htree
* The index.
* @param k1
* The key.
* @return
*/ | Return the #of entries having the specified key | getCount | {
"repo_name": "smalyshev/blazegraph",
"path": "bigdata/src/test/com/bigdata/htree/TestDuplicates.java",
"license": "gpl-2.0",
"size": 8216
} | [
"com.bigdata.btree.ITupleIterator"
] | import com.bigdata.btree.ITupleIterator; | import com.bigdata.btree.*; | [
"com.bigdata.btree"
] | com.bigdata.btree; | 1,530,544 |
public Date getUnsharedAt() {
return mBodyMap.containsKey(BoxItem.FIELD_SHARED_LINK) ?
((BoxSharedLink) mBodyMap.get(BoxItem.FIELD_SHARED_LINK)).getUnsharedDate() :
null;
} | Date function() { return mBodyMap.containsKey(BoxItem.FIELD_SHARED_LINK) ? ((BoxSharedLink) mBodyMap.get(BoxItem.FIELD_SHARED_LINK)).getUnsharedDate() : null; } | /**
* Returns the date the link will be disabled at currently set in the request.
*
* @return date the shared link will be disabled at, or null if not set.
*/ | Returns the date the link will be disabled at currently set in the request | getUnsharedAt | {
"repo_name": "HouKun1230/box-android-sdk",
"path": "box-content-sdk/src/main/java/com/box/androidsdk/content/requests/BoxRequestUpdateSharedItem.java",
"license": "apache-2.0",
"size": 7142
} | [
"com.box.androidsdk.content.models.BoxItem",
"com.box.androidsdk.content.models.BoxSharedLink",
"java.util.Date"
] | import com.box.androidsdk.content.models.BoxItem; import com.box.androidsdk.content.models.BoxSharedLink; import java.util.Date; | import com.box.androidsdk.content.models.*; import java.util.*; | [
"com.box.androidsdk",
"java.util"
] | com.box.androidsdk; java.util; | 589,218 |
private void removeRegInfoLocators(RegistrationInfo regInfo,
LookupLocator[] locators)
{
HashSet removeSet = new HashSet();
for(int i=0;i<locators.length;i++) {
removeSet.add(locators[i]);
}//end... | void function(RegistrationInfo regInfo, LookupLocator[] locators) { HashSet removeSet = new HashSet(); for(int i=0;i<locators.length;i++) { removeSet.add(locators[i]); } (regInfo.locators).removeAll(removeSet); } | /** Removes the elements of the given set from the given registration's
* current set of locators to discover.
*/ | Removes the elements of the given set from the given registration's current set of locators to discover | removeRegInfoLocators | {
"repo_name": "trasukg/river-qa-2.2",
"path": "src/com/sun/jini/fiddler/FiddlerImpl.java",
"license": "apache-2.0",
"size": 419323
} | [
"java.util.HashSet",
"net.jini.core.discovery.LookupLocator"
] | import java.util.HashSet; import net.jini.core.discovery.LookupLocator; | import java.util.*; import net.jini.core.discovery.*; | [
"java.util",
"net.jini.core"
] | java.util; net.jini.core; | 2,605,612 |
private static final void updateReport(ValidatorReport report, FunctionMethod method, String message) {
report.addItem(new InvalidFunctionItem(method, message));
} | static final void function(ValidatorReport report, FunctionMethod method, String message) { report.addItem(new InvalidFunctionItem(method, message)); } | /**
* Update a report with a validation error.
* @param report The report to update
* @param method The function method
* @param message The message about the validation failure
*/ | Update a report with a validation error | updateReport | {
"repo_name": "jagazee/teiid-8.7",
"path": "engine/src/main/java/org/teiid/query/function/metadata/FunctionMetadataValidator.java",
"license": "lgpl-2.1",
"size": 11930
} | [
"org.teiid.metadata.FunctionMethod",
"org.teiid.query.validator.ValidatorReport"
] | import org.teiid.metadata.FunctionMethod; import org.teiid.query.validator.ValidatorReport; | import org.teiid.metadata.*; import org.teiid.query.validator.*; | [
"org.teiid.metadata",
"org.teiid.query"
] | org.teiid.metadata; org.teiid.query; | 2,584,568 |
@Override
public void flushPartialFrame() throws HyracksDataException {
appender.write(writer, true);
} | void function() throws HyracksDataException { appender.write(writer, true); } | /**
* Flushes tuples (which have already been written to tuple appender's buffer in writeOutput() method)
* to the next operator/consumer.
*/ | Flushes tuples (which have already been written to tuple appender's buffer in writeOutput() method) to the next operator/consumer | flushPartialFrame | {
"repo_name": "ecarm002/incubator-asterixdb",
"path": "asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/operators/LSMPrimaryUpsertOperatorNodePushable.java",
"license": "apache-2.0",
"size": 21464
} | [
"org.apache.hyracks.api.exceptions.HyracksDataException"
] | import org.apache.hyracks.api.exceptions.HyracksDataException; | import org.apache.hyracks.api.exceptions.*; | [
"org.apache.hyracks"
] | org.apache.hyracks; | 160,383 |
public void add(@NonNull Job job, @NonNull Collection<String> dependsOn) {
jobTracker.onStateChange(job, JobTracker.JobState.PENDING);
runOnExecutor(() -> {
jobController.submitJobWithExistingDependencies(job, dependsOn, null);
jobController.wakeUp();
});
} | void function(@NonNull Job job, @NonNull Collection<String> dependsOn) { jobTracker.onStateChange(job, JobTracker.JobState.PENDING); runOnExecutor(() -> { jobController.submitJobWithExistingDependencies(job, dependsOn, null); jobController.wakeUp(); }); } | /**
* Enqueues a single job that depends on a collection of job ID's.
*/ | Enqueues a single job that depends on a collection of job ID's | add | {
"repo_name": "WhisperSystems/TextSecure",
"path": "app/src/main/java/org/thoughtcrime/securesms/jobmanager/JobManager.java",
"license": "gpl-3.0",
"size": 19887
} | [
"androidx.annotation.NonNull",
"java.util.Collection"
] | import androidx.annotation.NonNull; import java.util.Collection; | import androidx.annotation.*; import java.util.*; | [
"androidx.annotation",
"java.util"
] | androidx.annotation; java.util; | 1,409,378 |
private void startWrite() {
lock.lock();
if (newMap == null) // Write not already started
newMap = ArrayListMultimap.create(map);
} | void function() { lock.lock(); if (newMap == null) newMap = ArrayListMultimap.create(map); } | /**
* Starts a write operation by taking the lock and, if needed, creating a
* mutable copy of the map.
* <p>
* This method is reentrant.
*/ | Starts a write operation by taking the lock and, if needed, creating a mutable copy of the map. This method is reentrant | startWrite | {
"repo_name": "drbild/c2dm4j",
"path": "src/main/java/org/whispercomm/c2dm4j/util/CopyOnWriteArrayListMultimap.java",
"license": "apache-2.0",
"size": 5817
} | [
"com.google.common.collect.ArrayListMultimap"
] | import com.google.common.collect.ArrayListMultimap; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 1,072,563 |
public static byte[] hmacSha256(final String key, final String valueToDigest) {
return hmacSha256(StringUtils.getBytesUtf8(key), StringUtils.getBytesUtf8(valueToDigest));
}
| static byte[] function(final String key, final String valueToDigest) { return hmacSha256(StringUtils.getBytesUtf8(key), StringUtils.getBytesUtf8(valueToDigest)); } | /**
* Returns a HmacSHA256 Message Authentication Code (MAC) for the given key and value.
*
* @param key
* They key for the keyed digest (must not be null)
* @param valueToDigest
* The value (data) which should to digest (maybe empty or null)
* @return Hma... | Returns a HmacSHA256 Message Authentication Code (MAC) for the given key and value | hmacSha256 | {
"repo_name": "456838/usefulCode",
"path": "YHamburgGit/app/src/main/java/org/apache/commons/codec/digest/HmacUtils.java",
"license": "apache-2.0",
"size": 34340
} | [
"org.apache.commons.codec.binary.StringUtils"
] | import org.apache.commons.codec.binary.StringUtils; | import org.apache.commons.codec.binary.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,030,886 |
public static CharsetDecoder getDecoder(Charset charset) {
if (charset == null) {
throw new NullPointerException("charset");
}
Map<Charset, CharsetDecoder> map = decoders.get();
CharsetDecoder d = map.get(charset);
if (d != null) {
d.reset();
... | static CharsetDecoder function(Charset charset) { if (charset == null) { throw new NullPointerException(STR); } Map<Charset, CharsetDecoder> map = decoders.get(); CharsetDecoder d = map.get(charset); if (d != null) { d.reset(); d.onMalformedInput(CodingErrorAction.REPLACE); d.onUnmappableCharacter(CodingErrorAction.REP... | /**
* Returns a cached thread-local {@link CharsetDecoder} for the specified
* <tt>charset</tt>.
*/ | Returns a cached thread-local <code>CharsetDecoder</code> for the specified charset | getDecoder | {
"repo_name": "ferdiknight/leon",
"path": "demo/src/main/java/com/blueferdi/leon/demo/typeahead/buffer/CharsetUtil.java",
"license": "lgpl-3.0",
"size": 4567
} | [
"java.nio.charset.Charset",
"java.nio.charset.CharsetDecoder",
"java.nio.charset.CodingErrorAction",
"java.util.Map"
] | import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CodingErrorAction; import java.util.Map; | import java.nio.charset.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 2,383,384 |
public static boolean isJreVersionAtLeast( String neededVersion ) throws ParseException {
String javaVersion= System.getProperty("java.version"); // applet okay
Pattern p= Pattern.compile("(\\d+)\\.(\\d+)\\.\\d+\\_(\\d+)");
Matcher mneeded= p.matcher(neededVersion);
if ( !mneeded.ma... | static boolean function( String neededVersion ) throws ParseException { String javaVersion= System.getProperty(STR); Pattern p= Pattern.compile(STR); Matcher mneeded= p.matcher(neededVersion); if ( !mneeded.matches() ) { throw new IllegalArgumentException(STR+p.pattern()); } Matcher mhave= p.matcher(javaVersion); if ( ... | /**
* evaluate if the current JRE version is at least a given level. This
* was introduced that
* @param neededVersion the Java version, such as "1.8.0_102"
* @return true if the JRE is at least the version, or if the JRE cannot be parsed.
* @throws java.text.ParseException if the JRE version... | evaluate if the current JRE version is at least a given level. This was introduced that | isJreVersionAtLeast | {
"repo_name": "autoplot/app",
"path": "dasCoreUtil/src/org/das2/util/AboutUtil.java",
"license": "gpl-2.0",
"size": 8243
} | [
"java.text.ParseException",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.text.ParseException; import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.text.*; import java.util.regex.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 215,249 |
public void writeXML(Writer output) throws IOException {
output.write("<field name=\"" + getPartialFieldName() + "\">\n");
Object value = getValue();
if (value != null) {
if (value instanceof COSString) {
output.write("<value>" + escapeXML(((COSString) value).getString()) + "</value>\n");
... | void function(Writer output) throws IOException { output.write(STRSTR\">\n"); Object value = getValue(); if (value != null) { if (value instanceof COSString) { output.write(STR + escapeXML(((COSString) value).getString()) + STR); } else if (value instanceof COSStream) { output.write(STR + escapeXML(((COSStream) value).... | /**
* This will write this element as an XML document.
*
* @param output The stream to write the xml to.
* @throws IOException If there is an error writing the XML.
*/ | This will write this element as an XML document | writeXML | {
"repo_name": "gavanx/pdflearn",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFField.java",
"license": "apache-2.0",
"size": 20329
} | [
"java.io.IOException",
"java.io.Writer",
"java.util.List",
"org.apache.pdfbox.cos.COSStream",
"org.apache.pdfbox.cos.COSString"
] | import java.io.IOException; import java.io.Writer; import java.util.List; import org.apache.pdfbox.cos.COSStream; import org.apache.pdfbox.cos.COSString; | import java.io.*; import java.util.*; import org.apache.pdfbox.cos.*; | [
"java.io",
"java.util",
"org.apache.pdfbox"
] | java.io; java.util; org.apache.pdfbox; | 652,492 |
public void workerComplete(@Nonnull final SubQueryId subQueryId, final int workerId) {
getMasterSubQuery(subQueryId).workerComplete(workerId);
} | void function(@Nonnull final SubQueryId subQueryId, final int workerId) { getMasterSubQuery(subQueryId).workerComplete(workerId); } | /**
* Inform the query manager that the specified worker has successfully completed the specified subquery. Once all
* workers have completed the subquery, the subquery is considered successful.
*
* @param subQueryId the subquery.
* @param workerId the worker.
*/ | Inform the query manager that the specified worker has successfully completed the specified subquery. Once all workers have completed the subquery, the subquery is considered successful | workerComplete | {
"repo_name": "bsalimi/myria",
"path": "src/edu/washington/escience/myria/parallel/QueryManager.java",
"license": "bsd-3-clause",
"size": 23744
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,027,225 |
protected URI createUploadRedirectionURL(UriInfo uriInfo, Enum<?> uploadOperation) {
UriBuilder uriBuilder = uriInfo.getRequestUriBuilder();
uriBuilder = uriBuilder.replaceQueryParam(OperationParam.NAME, uploadOperation).
queryParam(DataParam.NAME, Boolean.TRUE);
return uriBuilder.build(null);
} | URI function(UriInfo uriInfo, Enum<?> uploadOperation) { UriBuilder uriBuilder = uriInfo.getRequestUriBuilder(); uriBuilder = uriBuilder.replaceQueryParam(OperationParam.NAME, uploadOperation). queryParam(DataParam.NAME, Boolean.TRUE); return uriBuilder.build(null); } | /**
* Creates the URL for an upload operation (create or append).
*
* @param uriInfo uri info of the request.
* @param uploadOperation operation for the upload URL.
*
* @return the URI for uploading data.
*/ | Creates the URL for an upload operation (create or append) | createUploadRedirectionURL | {
"repo_name": "bitmybytes/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServer.java",
"license": "apache-2.0",
"size": 30666
} | [
"javax.ws.rs.core.UriBuilder",
"javax.ws.rs.core.UriInfo",
"org.apache.hadoop.fs.http.server.HttpFSParametersProvider"
] | import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; import org.apache.hadoop.fs.http.server.HttpFSParametersProvider; | import javax.ws.rs.core.*; import org.apache.hadoop.fs.http.server.*; | [
"javax.ws",
"org.apache.hadoop"
] | javax.ws; org.apache.hadoop; | 712,508 |
private boolean isDestroyed(int warnIfDestroyed) {
if (mIsDestroyed && warnIfDestroyed == WARN) {
Log.w(TAG, "Application attempted to call on a destroyed WebView", new Throwable());
}
boolean destroyRunnableHasRun =
mCleanupReference != null && mCleanupReference.... | boolean function(int warnIfDestroyed) { if (mIsDestroyed && warnIfDestroyed == WARN) { Log.w(TAG, STR, new Throwable()); } boolean destroyRunnableHasRun = mCleanupReference != null && mCleanupReference.hasCleanedUp(); boolean weakRefsCleared = mWebContentsInternalsHolder != null && mWebContentsInternalsHolder.weakRefCl... | /**
* Returns whether this instance of WebView is flagged as destroyed.
* If {@link WARN} is passed as a parameter, the method also issues a warning
* log message and dumps stack, as embedders are advised not to call any
* methods on destroyed WebViews.
*
* @param warnIfDestroyed use {@lin... | Returns whether this instance of WebView is flagged as destroyed. If <code>WARN</code> is passed as a parameter, the method also issues a warning log message and dumps stack, as embedders are advised not to call any methods on destroyed WebViews | isDestroyed | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/android_webview/java/src/org/chromium/android_webview/AwContents.java",
"license": "bsd-3-clause",
"size": 185177
} | [
"org.chromium.base.Log"
] | import org.chromium.base.Log; | import org.chromium.base.*; | [
"org.chromium.base"
] | org.chromium.base; | 2,405,529 |
@SuppressWarnings("unchecked")
private void fixIndices(Map<String, Object> map, String key,
String root) {
String indices = root + "_indices";
String original = root + "s";
Lst<Object>lst = (Lst<Object>) map.get(key);
if (lst != null) {
Lst<Object> hpins = (Lst<Objec... | @SuppressWarnings(STR) void function(Map<String, Object> map, String key, String root) { String indices = root + STR; String original = root + "s"; Lst<Object>lst = (Lst<Object>) map.get(key); if (lst != null) { Lst<Object> hpins = (Lst<Object>) map.get(original); for (int i = lst.size(); --i >= 0;) { Map<String, Objec... | /**
* create a key/value pair root+"s" for all indices of root+"_indices"
* @param map
* @param key
* @param root
*/ | create a key/value pair root+"s" for all indices of root+"_indices" | fixIndices | {
"repo_name": "drdrsh/JmolOVR",
"path": "src/org/jmol/dssx/DSSR1.java",
"license": "lgpl-2.1",
"size": 12796
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 956,004 |
private void createCacheTable(DataSource ds) throws SQLException {
Connection con = ds.getConnection(DB_USER, DB_PWD);
try {
Statement st = con.createStatement();
try {
st.executeUpdate("drop table " + schemaName + ".OAUTH20CACHE");
} catch (SQLExc... | void function(DataSource ds) throws SQLException { Connection con = ds.getConnection(DB_USER, DB_PWD); try { Statement st = con.createStatement(); try { st.executeUpdate(STR + schemaName + STR); } catch (SQLException x) { System.out.println(STR + x.getMessage()); } st.executeUpdate(STR + schemaName + STR); } catch (Thr... | /**
* Create the default table used by the tests.
*
* @param ds
* the data source
* @throws SQLException
* if it fails
*/ | Create the default table used by the tests | createCacheTable | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.oauth_test.servlets/test-applications/oAuth20DerbySetup/src/web/oAuth20DerbySetup.java",
"license": "epl-1.0",
"size": 35024
} | [
"java.sql.Connection",
"java.sql.SQLException",
"java.sql.Statement",
"javax.sql.DataSource"
] | import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import javax.sql.DataSource; | import java.sql.*; import javax.sql.*; | [
"java.sql",
"javax.sql"
] | java.sql; javax.sql; | 1,923,006 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.