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 Double getChannelKnownMinimum(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return chanMin == null ? null : new Double(chanMin[getCoreIndex()][theC]); }
Double function(int theC) throws FormatException, IOException { FormatTools.assertId(getCurrentFile(), true, 2); return chanMin == null ? null : new Double(chanMin[getCoreIndex()][theC]); }
/** * Retrieves the specified channel's minimum based on the images that have * been read. Returns null if no image planes have been read yet. * * @throws FormatException Not actually thrown. * @throws IOException Not actually thrown. */
Retrieves the specified channel's minimum based on the images that have been read. Returns null if no image planes have been read yet
getChannelKnownMinimum
{ "repo_name": "melissalinkert/bioformats", "path": "components/formats-bsd/src/loci/formats/MinMaxCalculator.java", "license": "gpl-2.0", "size": 14144 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,766,276
public TreeWalker createTreeWalker(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion) throws DOMException;
TreeWalker function(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion) throws DOMException;
/** * Create a new <code>TreeWalker</code> over the subtree rooted at the * specified node. * @param rootThe node which will serve as the <code>root</code> for the * <code>TreeWalker</code>. The <code>whatToShow</code> flags and the * <code>NodeFilter</code> are not considered when ...
Create a new <code>TreeWalker</code> over the subtree rooted at the specified node
createTreeWalker
{ "repo_name": "aosm/gcc3", "path": "libjava/org/w3c/dom/traversal/DocumentTraversal.java", "license": "gpl-2.0", "size": 4910 }
[ "org.w3c.dom.DOMException", "org.w3c.dom.Node" ]
import org.w3c.dom.DOMException; import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,754,236
@Test public void testSetSkewness_1() throws Exception { SummaryData fixture = new SummaryData(); fixture.setPercentile10(1.0); fixture.setJobId(1); fixture.setVarience(1.0); fixture.setPercentile60(1.0); fixture.setPercentile95(1.0); fixture.setSk...
void function() throws Exception { SummaryData fixture = new SummaryData(); fixture.setPercentile10(1.0); fixture.setJobId(1); fixture.setVarience(1.0); fixture.setPercentile60(1.0); fixture.setPercentile95(1.0); fixture.setSkewness(1.0); fixture.setPercentile40(1.0); fixture.setPercentile90(1.0); fixture.setMax(1.0); ...
/** * Run the void setSkewness(double) method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 1:34 PM */
Run the void setSkewness(double) method test
testSetSkewness_1
{ "repo_name": "intuit/Tank", "path": "data_model/src/test/java/com/intuit/tank/project/SummaryDataTest.java", "license": "epl-1.0", "size": 52876 }
[ "com.intuit.tank.project.SummaryData" ]
import com.intuit.tank.project.SummaryData;
import com.intuit.tank.project.*;
[ "com.intuit.tank" ]
com.intuit.tank;
520,411
public static ComplexShape createCylinder(double radius, int height, Direction direction) { return createEllipticalCylinder(radius, radius, height, direction); }
static ComplexShape function(double radius, int height, Direction direction) { return createEllipticalCylinder(radius, radius, height, direction); }
/** * Creates a cylinder with the given radius and height, the flat plane of the cylinder is * aligned to be orthogonal to the given direction. * * @param radius the radius * @param height the height * @param direction the direction * @return the new shape */
Creates a cylinder with the given radius and height, the flat plane of the cylinder is aligned to be orthogonal to the given direction
createCylinder
{ "repo_name": "Featherblade/VoxelGunsmith", "path": "src/main/java/com/voxelplugineering/voxelsniper/shape/PrimativeComplexShapeFactory.java", "license": "mit", "size": 11155 }
[ "com.voxelplugineering.voxelsniper.util.Direction" ]
import com.voxelplugineering.voxelsniper.util.Direction;
import com.voxelplugineering.voxelsniper.util.*;
[ "com.voxelplugineering.voxelsniper" ]
com.voxelplugineering.voxelsniper;
2,207,247
public static void initializePreLeanplumInstall(Map<String, Object> params) { Context context = Leanplum.getContext(); SharedPreferences preferences = context.getSharedPreferences("__leanplum__", Context.MODE_PRIVATE); if (preferences.getBoolean(Constants.Keys.INSTALL_TIME_INITIALIZED, false)) { ...
static void function(Map<String, Object> params) { Context context = Leanplum.getContext(); SharedPreferences preferences = context.getSharedPreferences(STR, Context.MODE_PRIVATE); if (preferences.getBoolean(Constants.Keys.INSTALL_TIME_INITIALIZED, false)) { return; } PackageManager packageManager = context.getPackageM...
/** * Include install time and last app update time in start API params the first time that the app * runs with Leanplum. */
Include install time and last app update time in start API params the first time that the app runs with Leanplum
initializePreLeanplumInstall
{ "repo_name": "Leanplum/Leanplum-Android-SDK", "path": "AndroidSDKCore/src/main/java/com/leanplum/internal/Util.java", "license": "apache-2.0", "size": 23436 }
[ "android.content.Context", "android.content.SharedPreferences", "android.content.pm.PackageManager", "com.leanplum.Leanplum", "com.leanplum.utils.SharedPreferencesUtil", "java.util.Map" ]
import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageManager; import com.leanplum.Leanplum; import com.leanplum.utils.SharedPreferencesUtil; import java.util.Map;
import android.content.*; import android.content.pm.*; import com.leanplum.*; import com.leanplum.utils.*; import java.util.*;
[ "android.content", "com.leanplum", "com.leanplum.utils", "java.util" ]
android.content; com.leanplum; com.leanplum.utils; java.util;
814,645
public static net.sourceforge.gpstools.gpx.LinkType unmarshal( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (net.sourceforge.gpstools.gpx.LinkType) Unmarshaller.unmarshal(net.sourceforge.gpstools.gpx.TrkLink.cl...
static net.sourceforge.gpstools.gpx.LinkType function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (net.sourceforge.gpstools.gpx.LinkType) Unmarshaller.unmarshal(net.sourceforge.gpstools.gpx.TrkLink.class, reader); }
/** * Method unmarshal. * * @param reader * @throws org.exolab.castor.xml.MarshalException if object is * null or if any SAXException is thrown during marshaling * @throws org.exolab.castor.xml.ValidationException if this * object is an invalid instance according to the schema *...
Method unmarshal
unmarshal
{ "repo_name": "Emergya/gofleet", "path": "core/src/main/java/net/sourceforge/gpstools/gpx/TrkLink.java", "license": "gpl-2.0", "size": 3445 }
[ "org.exolab.castor.xml.Unmarshaller" ]
import org.exolab.castor.xml.Unmarshaller;
import org.exolab.castor.xml.*;
[ "org.exolab.castor" ]
org.exolab.castor;
1,958,055
EReference getMeasurementValueSource_MeasurementValues();
EReference getMeasurementValueSource_MeasurementValues();
/** * Returns the meta object for the reference list '{@link CIM.IEC61970.Meas.MeasurementValueSource#getMeasurementValues <em>Measurement Values</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Measurement Values</em>'. * @see CIM.IEC61970.Meas.M...
Returns the meta object for the reference list '<code>CIM.IEC61970.Meas.MeasurementValueSource#getMeasurementValues Measurement Values</code>'.
getMeasurementValueSource_MeasurementValues
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Meas/MeasPackage.java", "license": "mit", "size": 215537 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,164,626
@VisibleForTesting public int countNumOfAvailableNodes(String scope, Collection<Node> excludedNodes) { boolean isExcluded=false; if (scope.startsWith("~")) { isExcluded=true; scope=scope.substring(1); } scope = NodeBase.normalize(scope); int excl...
int function(String scope, Collection<Node> excludedNodes) { boolean isExcluded=false; if (scope.startsWith("~")) { isExcluded=true; scope=scope.substring(1); } scope = NodeBase.normalize(scope); int excludedCountInScope = 0; int excludedCountOffScope = 0; netlock.readLock().lock(); try { if (excludedNodes != null) { f...
/** return the number of leaves in <i>scope</i> but not in <i>excludedNodes</i> * if scope starts with ~, return the number of nodes that are not * in <i>scope</i> and <i>excludedNodes</i>; * @param scope a path string that may start with ~ * @param excludedNodes a list of nodes * @return number of avai...
return the number of leaves in scope but not in excludedNodes if scope starts with ~, return the number of nodes that are not in scope and excludedNodes
countNumOfAvailableNodes
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetworkTopology.java", "license": "gpl-3.0", "size": 33817 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,528,347
public void writeByteArray(byte[] arr) throws IOException;
void function(byte[] arr) throws IOException;
/** * Writes array of {@code byte}s. * * @param arr Array. * @throws IOException In case of error. */
Writes array of bytes
writeByteArray
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/io/GridDataOutput.java", "license": "apache-2.0", "size": 3094 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,006,331
public String[] getOptions() { Vector result; String[] options; int i; result = new Vector(); options = super.getOptions(); for (i = 0; i < options.length; i++) result.add(options[i]); if (getKernel() != null) { result.add("-W"); resul...
String[] function() { Vector result; String[] options; int i; result = new Vector(); options = super.getOptions(); for (i = 0; i < options.length; i++) result.add(options[i]); if (getKernel() != null) { result.add("-W"); result.add(getKernel().getClass().getName()); } if ((m_Kernel != null) && (m_Kernel instanceof Opti...
/** * Gets the current settings of the CheckKernel. * * @return an array of strings suitable for passing to setOptions */
Gets the current settings of the CheckKernel
getOptions
{ "repo_name": "williamClanton/jbossBA", "path": "weka/src/main/java/weka/classifiers/functions/supportVector/CheckKernel.java", "license": "gpl-2.0", "size": 51400 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,608,569
public static void rm(File file) { if(file != null) rm(Collections.singletonList(file)); }
static void function(File file) { if(file != null) rm(Collections.singletonList(file)); }
/** * Delete the given file * * @param file The file to delete */
Delete the given file
rm
{ "repo_name": "cshaxu/voldemort", "path": "src/java/voldemort/utils/Utils.java", "license": "apache-2.0", "size": 27990 }
[ "java.io.File", "java.util.Collections" ]
import java.io.File; import java.util.Collections;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
283,412
public static void writeDefFile(File path, SynthDef[] defs) throws IOException { final OutputStream os = new FileOutputStream(path); final DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(os)); try { dos.writeInt(SCGF_MAGIC); dos.writeInt(SCGF_VERSION); dos.writeShort(defs.length)...
static void function(File path, SynthDef[] defs) throws IOException { final OutputStream os = new FileOutputStream(path); final DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(os)); try { dos.writeInt(SCGF_MAGIC); dos.writeInt(SCGF_VERSION); dos.writeShort(defs.length); for (int i = 0; i < defs.len...
/** * Writes an array of definitions to a file. * * @param path * path to a file. if a file by this name already exists, the caller * should delete it before calling this method * @param defs * array of definitions which will be written one after another * * @throws IO...
Writes an array of definitions to a file
writeDefFile
{ "repo_name": "sudosci/JavaCollider", "path": "src/main/java/de/sciss/jcollider/SynthDef.java", "license": "lgpl-2.1", "size": 34910 }
[ "java.io.BufferedOutputStream", "java.io.DataOutputStream", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStream" ]
import java.io.BufferedOutputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,025,120
public static int poll(Ptr fds, int nfds, int timeout) { throw new UnsupportedOperationException(); }
public static int poll(Ptr fds, int nfds, int timeout) { throw new UnsupportedOperationException(); }
/** * Returns a string describing the signal * number passed in the argument sig. The string can be used only until * the next call to strsignal(). */
Returns a string describing the signal number passed in the argument sig. The string can be used only until the next call to strsignal()
strsignal
{ "repo_name": "bedatadriven/renjin", "path": "tools/gnur-runtime/src/main/java/org/renjin/gnur/api/Linux.java", "license": "gpl-2.0", "size": 4628 }
[ "org.renjin.gcc.runtime.Ptr" ]
import org.renjin.gcc.runtime.Ptr;
import org.renjin.gcc.runtime.*;
[ "org.renjin.gcc" ]
org.renjin.gcc;
1,451,501
@Override public Constructor<?> getFileObjectDecoratorConst() { return fileObjectDecoratorConst; }
Constructor<?> function() { return fileObjectDecoratorConst; }
/** * The constructor associated to the fileObjectDecorator. We cache it here for performance reasons. * * @return The decorator's Constructor. */
The constructor associated to the fileObjectDecorator. We cache it here for performance reasons
getFileObjectDecoratorConst
{ "repo_name": "wso2/wso2-commons-vfs", "path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java", "license": "apache-2.0", "size": 44445 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,050,724
public static AllocateUnassignedDecision delayed(long remainingDelay, long totalDelay, @Nullable List<NodeAllocationResult> decisions) { return no(AllocationStatus.DELAYED_ALLOCATION, decisions, false, remainingDelay, totalDelay); }
static AllocateUnassignedDecision function(long remainingDelay, long totalDelay, @Nullable List<NodeAllocationResult> decisions) { return no(AllocationStatus.DELAYED_ALLOCATION, decisions, false, remainingDelay, totalDelay); }
/** * Returns a NO decision for a delayed shard allocation on a replica shard, with the individual node-level * decisions that comprised the final NO decision, if in explain mode. Instances created with this * method will return {@link AllocationStatus#DELAYED_ALLOCATION} for {@link #getAllocationStatus...
Returns a NO decision for a delayed shard allocation on a replica shard, with the individual node-level decisions that comprised the final NO decision, if in explain mode. Instances created with this method will return <code>AllocationStatus#DELAYED_ALLOCATION</code> for <code>#getAllocationStatus()</code>
delayed
{ "repo_name": "robin13/elasticsearch", "path": "server/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocateUnassignedDecision.java", "license": "apache-2.0", "size": 16118 }
[ "java.util.List", "org.elasticsearch.cluster.routing.UnassignedInfo", "org.elasticsearch.common.Nullable" ]
import java.util.List; import org.elasticsearch.cluster.routing.UnassignedInfo; import org.elasticsearch.common.Nullable;
import java.util.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.*;
[ "java.util", "org.elasticsearch.cluster", "org.elasticsearch.common" ]
java.util; org.elasticsearch.cluster; org.elasticsearch.common;
1,608,092
public Stream<NetworkInterface> subInterfaces() { return streamFromArray(childs); }
Stream<NetworkInterface> function() { return streamFromArray(childs); }
/** * Get a Stream of all subinterfaces (also known as virtual * interfaces) attached to this network interface. * * @return a Stream object with all of the subinterfaces * of this network interface * @since 9 */
Get a Stream of all subinterfaces (also known as virtual interfaces) attached to this network interface
subInterfaces
{ "repo_name": "md-5/jdk10", "path": "src/java.base/share/classes/java/net/NetworkInterface.java", "license": "gpl-2.0", "size": 22702 }
[ "java.util.stream.Stream" ]
import java.util.stream.Stream;
import java.util.stream.*;
[ "java.util" ]
java.util;
2,293,040
private void addParameter(Map<String, List<String>> params, String key, String value) { List<String> values = params.get(key); if (values == null) { values = new ArrayList<String>(); params.put(key, values); } values.add(value); }
void function(Map<String, List<String>> params, String key, String value) { List<String> values = params.get(key); if (values == null) { values = new ArrayList<String>(); params.put(key, values); } values.add(value); }
/** * Helper method that adds a new parameter to the map * @param params * @param key * @param value */
Helper method that adds a new parameter to the map
addParameter
{ "repo_name": "minatoJ/signavio-core-components", "path": "platform/src/com/signavio/platform/filters/ParseParametersFilter.java", "license": "gpl-3.0", "size": 7445 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,617,748
public static String[] getNames(JSONObject jo) { int length = jo.length(); if (length == 0) { return null; } Iterator iterator = jo.keys(); String[] names = new String[length]; int i = 0; while (iterator.hasNext()) { names[i] = (String)...
static String[] function(JSONObject jo) { int length = jo.length(); if (length == 0) { return null; } Iterator iterator = jo.keys(); String[] names = new String[length]; int i = 0; while (iterator.hasNext()) { names[i] = (String)iterator.next(); i += 1; } return names; }
/** * Get an array of field names from a JSONObject. * * @return An array of field names, or null if there are no names. */
Get an array of field names from a JSONObject
getNames
{ "repo_name": "grtlinux/KIEA_JAVA7", "path": "KIEA_JAVA7/src/tain/kr/com/github/json/orgJson/v01/JSONObject.java", "license": "gpl-3.0", "size": 55937 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
864,094
List<User> findAll();
List<User> findAll();
/** * Returns all instances of User entity. * @return */
Returns all instances of User entity
findAll
{ "repo_name": "nsirbu/CareerLevels", "path": "src/main/java/com/inthergroup/internship/services/UserService.java", "license": "mit", "size": 2099 }
[ "com.inthergroup.internship.models.User", "java.util.List" ]
import com.inthergroup.internship.models.User; import java.util.List;
import com.inthergroup.internship.models.*; import java.util.*;
[ "com.inthergroup.internship", "java.util" ]
com.inthergroup.internship; java.util;
2,525,103
Collection<RelationType> subTypes();
Collection<RelationType> subTypes();
/** * Returns a collection of subtypes of this RelationType. * * @return All the sub types of this RelationType */
Returns a collection of subtypes of this RelationType
subTypes
{ "repo_name": "sklarman/grakn", "path": "grakn-core/src/main/java/ai/grakn/concept/RelationType.java", "license": "gpl-3.0", "size": 5423 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,416,870
public static OMRaster getIconRaster(double lat, double lon, int x, int y, URL iconURL) { ImageIcon icon = new ImageIcon(iconURL); if (icon == null) return null; int offX = icon.getIconWidth() / 2; int offY = icon.getIconHeight() / 2; return new OMRaster(lat, lon...
static OMRaster function(double lat, double lon, int x, int y, URL iconURL) { ImageIcon icon = new ImageIcon(iconURL); if (icon == null) return null; int offX = icon.getIconWidth() / 2; int offY = icon.getIconHeight() / 2; return new OMRaster(lat, lon, x - offX, y - offY, icon); }
/** * Create an OMRaster at a latitude/longitude, from a image URL. * * @param lat latitide in decimal degrees * @param lon longitude in decimal degrees. * @param x horizontal pixel screen location from the longitude map point. * @param y vertical pixel screen location, from the latitide ...
Create an OMRaster at a latitude/longitude, from a image URL
getIconRaster
{ "repo_name": "d2fn/passage", "path": "src/main/java/com/bbn/openmap/layer/location/URLRasterLocation.java", "license": "mit", "size": 11326 }
[ "com.bbn.openmap.omGraphics.OMRaster", "javax.swing.ImageIcon" ]
import com.bbn.openmap.omGraphics.OMRaster; import javax.swing.ImageIcon;
import com.bbn.openmap.*; import javax.swing.*;
[ "com.bbn.openmap", "javax.swing" ]
com.bbn.openmap; javax.swing;
2,085,749
public Map<Feature, Long> getLastUsed() { return lastUsed.entrySet().stream() .filter(e -> e.getValue().get() != 0) // feature was never used .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().get())); }
Map<Feature, Long> function() { return lastUsed.entrySet().stream() .filter(e -> e.getValue().get() != 0) .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().get())); }
/** * Returns a mapping of gold+ features to the last time that feature was used. * * Note that if a feature has not been used, it will not appear in the map. */
Returns a mapping of gold+ features to the last time that feature was used. Note that if a feature has not been used, it will not appear in the map
getLastUsed
{ "repo_name": "gingerwizard/elasticsearch", "path": "x-pack/plugin/core/src/main/java/org/elasticsearch/license/XPackLicenseState.java", "license": "apache-2.0", "size": 26940 }
[ "java.util.Map", "java.util.stream.Collectors" ]
import java.util.Map; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
358,662
this.stayInSingleQuotesStateResult = new HandleNextCharacterResult(this, true); this.backToNormalResult = new HandleNextCharacterResult(normalParsingState, true); }
this.stayInSingleQuotesStateResult = new HandleNextCharacterResult(this, true); this.backToNormalResult = new HandleNextCharacterResult(normalParsingState, true); }
/** * Initializes the state with the normal parsing state, that should be returned when the end of the literal is reached.. * * @param normalParsingState The normal state, not null */
Initializes the state with the normal parsing state, that should be returned when the end of the literal is reached.
linkParsingStates
{ "repo_name": "DbMaintain/dbmaintain", "path": "dbmaintain/src/main/java/org/dbmaintain/script/parser/parsingstate/impl/InSingleQuotesParsingState.java", "license": "apache-2.0", "size": 3797 }
[ "org.dbmaintain.script.parser.impl.HandleNextCharacterResult" ]
import org.dbmaintain.script.parser.impl.HandleNextCharacterResult;
import org.dbmaintain.script.parser.impl.*;
[ "org.dbmaintain.script" ]
org.dbmaintain.script;
1,487,063
public boolean exists(final String path) { try { // Find the last separator (.[{). It starts the search from the right for (int i = path.length() - 1; i >= 0; i--) { char pathChar = path.charAt(i); if (pathChar == PlainMap.SEPARATOR_DOT) { ...
boolean function(final String path) { try { for (int i = path.length() - 1; i >= 0; i--) { char pathChar = path.charAt(i); if (pathChar == PlainMap.SEPARATOR_DOT) { String parentPath = path.substring(0, i); String elementName = path.substring(i + 1); Map<String, Object> parentMap = (Map<String, Object>) this.get(parent...
/** * Check if the path specified actually exists in the plain map. * * @param path * @return */
Check if the path specified actually exists in the plain map
exists
{ "repo_name": "Telefonica/java-plainmap", "path": "src/main/java/es/tid/neosdp/plainmap/PlainMap.java", "license": "apache-2.0", "size": 26289 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,876,627
public final V getPredecessor(final V vertex) { final Collection<E> inEdges = tree.getInEdges(vertex); if (inEdges.size() != 1) { throw new IllegalArgumentException("Vertex in tree has incorrect number of in edges."); } return inEdges.iterator().next().source; }
final V function(final V vertex) { final Collection<E> inEdges = tree.getInEdges(vertex); if (inEdges.size() != 1) { throw new IllegalArgumentException(STR); } return inEdges.iterator().next().source; }
/** * Get the * <code>vertex</code> in this graph that is the source of the (single) edge that is incident on this vertex. A * vertex on a tree has only one incident edge but several. * @param vertex the vertex whose predecessor is to be returned * @return a <code>Collection</code> view of the ...
Get the <code>vertex</code> in this graph that is the source of the (single) edge that is incident on this vertex. A vertex on a tree has only one incident edge but several
getPredecessor
{ "repo_name": "EPICScotland/Broadwick", "path": "Broadwick1.1/src/main/java/broadwick/graph/Tree.java", "license": "apache-2.0", "size": 7558 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,398,113
public static double readAsNumeric(final String jsonObject, final String path) { double returnedString = 0; try { returnedString = (Double) JsonPath.read(jsonObject, path); } catch (Exception e) { logger.error("Unable to read string value with path: " + path + " from:...
static double function(final String jsonObject, final String path) { double returnedString = 0; try { returnedString = (Double) JsonPath.read(jsonObject, path); } catch (Exception e) { logger.error(STR + path + STR + String.valueOf(jsonObject)); } return returnedString; }
/** * Read numeric value from the json object. * * @param jsonObject the json object. * @param path the path inside the json object. * @return the numeric value in the json object. When the path is invalid, by default will return 0. */
Read numeric value from the json object
readAsNumeric
{ "repo_name": "ShwethaThammaiah/muzima-api-1", "path": "src/main/java/com/muzima/util/JsonUtils.java", "license": "mpl-2.0", "size": 10728 }
[ "com.jayway.jsonpath.JsonPath" ]
import com.jayway.jsonpath.JsonPath;
import com.jayway.jsonpath.*;
[ "com.jayway.jsonpath" ]
com.jayway.jsonpath;
408,691
public static ResourceApk processFromTransitiveLibraryData( AndroidDataContext dataContext, DataBindingContext dataBindingContext, ResourceDependencies resourceDeps, AssetDependencies assetDeps, StampedAndroidManifest manifest) throws InterruptedException { return new AndroidR...
static ResourceApk function( AndroidDataContext dataContext, DataBindingContext dataBindingContext, ResourceDependencies resourceDeps, AssetDependencies assetDeps, StampedAndroidManifest manifest) throws InterruptedException { return new AndroidResourcesProcessorBuilder() .setLibrary(true) .setRTxtOut(dataContext.creat...
/** * Registers an action to process just the transitive resources and assets of a library. * * <p>Any local resources and assets will be ignored. */
Registers an action to process just the transitive resources and assets of a library. Any local resources and assets will be ignored
processFromTransitiveLibraryData
{ "repo_name": "ButterflyNetwork/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/android/ResourceApk.java", "license": "apache-2.0", "size": 10275 }
[ "com.google.devtools.build.lib.rules.android.DataBinding" ]
import com.google.devtools.build.lib.rules.android.DataBinding;
import com.google.devtools.build.lib.rules.android.*;
[ "com.google.devtools" ]
com.google.devtools;
949,184
public String[] list() { Set<String> strings = files.keySet(); return strings.toArray(new String[strings.size()]); }
String[] function() { Set<String> strings = files.keySet(); return strings.toArray(new String[strings.size()]); }
/** * List the filenames in the style. * For completeness, we probably won't use this. */
List the filenames in the style. For completeness, we probably won't use this
list
{ "repo_name": "openstreetmap/mkgmap", "path": "test/func/lib/StringStyleFileLoader.java", "license": "gpl-2.0", "size": 2633 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,660,678
@Pure public SarlEnumLiteral getSarlEnumLiteral() { return this.builder.getSarlEnumLiteral(); }
SarlEnumLiteral function() { return this.builder.getSarlEnumLiteral(); }
/** Replies the generated element. */
Replies the generated element
getSarlEnumLiteral
{ "repo_name": "jgfoster/sarl", "path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/SarlEnumLiteralSourceAppender.java", "license": "apache-2.0", "size": 3561 }
[ "io.sarl.lang.sarl.SarlEnumLiteral" ]
import io.sarl.lang.sarl.SarlEnumLiteral;
import io.sarl.lang.sarl.*;
[ "io.sarl.lang" ]
io.sarl.lang;
2,221,915
@Override synchronized public EventPacket extractPacket(AEPacketRaw in) { if (out == null) { out = new EventPacket(MultiCameraEvent.class); } if (in == null) { return out; } int n = in.getNumEvents(); //addresses...
synchronized EventPacket function(AEPacketRaw in) { if (out == null) { out = new EventPacket(MultiCameraEvent.class); } if (in == null) { return out; } int n = in.getNumEvents(); int skipBy = 1; if (isSubSamplingEnabled()) { while (n / skipBy > getSubsampleThresholdEventCount()) { skipBy++; } } int[] a = in.getAddresse...
/** extracts the meaning of the raw events and returns EventPacket containing BinocularEvent. *@param in the raw events, can be null *@return out the processed events. these are partially processed in-place. empty packet is returned if null is supplied as in. */
extracts the meaning of the raw events and returns EventPacket containing BinocularEvent
extractPacket
{ "repo_name": "SensorsINI/jaer", "path": "src/ch/unizh/ini/jaer/chip/multicamera/MultiDVS128CameraChip.java", "license": "lgpl-2.1", "size": 11696 }
[ "net.sf.jaer.aemonitor.AEPacketRaw", "net.sf.jaer.event.EventPacket", "net.sf.jaer.event.MultiCameraEvent", "net.sf.jaer.event.OutputEventIterator", "net.sf.jaer.event.PolarityEvent" ]
import net.sf.jaer.aemonitor.AEPacketRaw; import net.sf.jaer.event.EventPacket; import net.sf.jaer.event.MultiCameraEvent; import net.sf.jaer.event.OutputEventIterator; import net.sf.jaer.event.PolarityEvent;
import net.sf.jaer.aemonitor.*; import net.sf.jaer.event.*;
[ "net.sf.jaer" ]
net.sf.jaer;
1,204,790
protected void doLock(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (!isAuthenticated(req, resp) || !isAuthorized(req, resp)) { resp.sendError(WebdavStatus.SC_FORBIDDEN); return; } if (isLocked(req)) { ...
void function(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { if (!isAuthenticated(req, resp) !isAuthorized(req, resp)) { resp.sendError(WebdavStatus.SC_FORBIDDEN); return; } if (isLocked(req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } LockInfo lock = new LockInfo(); S...
/** * LOCK Method. */
LOCK Method
doLock
{ "repo_name": "headsupdev/agile", "path": "agile-framework/src/main/java/org/apache/catalina/servlets/WebdavServlet.java", "license": "agpl-3.0", "size": 112157 }
[ "java.io.IOException", "java.io.StringWriter", "java.io.Writer", "java.util.Enumeration", "java.util.Vector", "javax.naming.NamingException", "javax.naming.directory.DirContext", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", ...
import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.util.Enumeration; import java.util.Vector; import javax.naming.NamingException; import javax.naming.directory.DirContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet....
import java.io.*; import java.util.*; import javax.naming.*; import javax.naming.directory.*; import javax.servlet.*; import javax.servlet.http.*; import javax.xml.parsers.*; import org.apache.catalina.util.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "java.util", "javax.naming", "javax.servlet", "javax.xml", "org.apache.catalina", "org.w3c.dom", "org.xml.sax" ]
java.io; java.util; javax.naming; javax.servlet; javax.xml; org.apache.catalina; org.w3c.dom; org.xml.sax;
1,862,361
List<Transmitter> getTransmitters(); class Info { private final String name; private final String vendor; private final String description; private final String version; protected Info(String name, String vendor, Str...
List<Transmitter> getTransmitters(); class Info { private final String name; private final String vendor; private final String description; private final String version; protected Info(String name, String vendor, String description, String version) { this.name = name; this.vendor = vendor; this.description = descriptio...
/** * Returns all currently active, non-closed transmitters connected with this * MidiDevice. A transmitter can be removed from the device by closing it. * <p> * Usually the returned transmitters implement the * {@code MidiDeviceTransmitter} interface. * * @return an unmodifiable list...
Returns all currently active, non-closed transmitters connected with this MidiDevice. A transmitter can be removed from the device by closing it. Usually the returned transmitters implement the MidiDeviceTransmitter interface
getTransmitters
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.desktop/share/classes/javax/sound/midi/MidiDevice.java", "license": "gpl-2.0", "size": 13046 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,431,240
private void createShader() { if (wave == null) { wave = getResources().getDrawable(R.mipmap.wave); } int waveW = wave.getIntrinsicWidth(); int waveH = wave.getIntrinsicHeight(); Bitmap b = Bitmap.createBitmap(waveW, waveH, Bitmap.Config.ARGB_8888); Can...
void function() { if (wave == null) { wave = getResources().getDrawable(R.mipmap.wave); } int waveW = wave.getIntrinsicWidth(); int waveH = wave.getIntrinsicHeight(); Bitmap b = Bitmap.createBitmap(waveW, waveH, Bitmap.Config.ARGB_8888); Canvas c = new Canvas(b); c.drawColor(getCurrentTextColor()); wave.setBounds(0, 0,...
/** * Create the shader * draw the wave with current color for a background * repeat the bitmap horizontally, and clamp colors vertically */
Create the shader draw the wave with current color for a background repeat the bitmap horizontally, and clamp colors vertically
createShader
{ "repo_name": "dxjia/GifAssistant", "path": "app/src/main/java/com/wind/gifassistant/views/waveview/TitanicTextView.java", "license": "apache-2.0", "size": 4601 }
[ "android.graphics.Bitmap", "android.graphics.BitmapShader", "android.graphics.Canvas", "android.graphics.Shader" ]
import android.graphics.Bitmap; import android.graphics.BitmapShader; import android.graphics.Canvas; import android.graphics.Shader;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
561,906
public ReportBuilder rateLimit(long rateLimit, TimeUnit rateUnit) { return rateLimit(TimeUnit.NANOSECONDS.convert(rateLimit, rateUnit)); }
ReportBuilder function(long rateLimit, TimeUnit rateUnit) { return rateLimit(TimeUnit.NANOSECONDS.convert(rateLimit, rateUnit)); }
/** * Set the minimum time to wait until a report of equal type and parameters is allowed to be printed again. * @param rateLimit - the time, or 0 to disable. Cannot be negative. * @param rateUnit - the unit of the rate limit. * @return This builder, for chaining. */
Set the minimum time to wait until a report of equal type and parameters is allowed to be printed again
rateLimit
{ "repo_name": "dmulloy2/ProtocolLib", "path": "src/main/java/com/comphenix/protocol/error/Report.java", "license": "gpl-2.0", "size": 7342 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,506,321
public void test() throws FormatException { byte[] testdata = new byte[50000]; Random r = new Random(); LOGGER.info("Testing {}", this.getClass().getName()); LOGGER.info("Generating random data"); r.nextBytes(testdata); LOGGER.info("Compressing data"); byte[] compressed = compress(testdata...
void function() throws FormatException { byte[] testdata = new byte[50000]; Random r = new Random(); LOGGER.info(STR, this.getClass().getName()); LOGGER.info(STR); r.nextBytes(testdata); LOGGER.info(STR); byte[] compressed = compress(testdata, null); LOGGER.info(STR, compressed.length); LOGGER.info(STR); byte[] decompr...
/** * Main testing method default implementation. * * This method tests whether the data is the same after compressing and * decompressing, as well as doing a basic test of the 2D methods. * * @throws FormatException Can only occur if there is a bug in the * compress method. */
Main testing method default implementation. This method tests whether the data is the same after compressing and decompressing, as well as doing a basic test of the 2D methods
test
{ "repo_name": "stelfrich/bioformats", "path": "components/formats-bsd/src/loci/formats/codec/BaseCodec.java", "license": "gpl-2.0", "size": 7553 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,133,323
public static Set<Class<? extends AbstractSimplification>> getStartSet() { HashSet<Class<? extends AbstractSimplification>> set = new HashSet(); set.add( RightSimplification.class ); return set; }
static Set<Class<? extends AbstractSimplification>> function() { HashSet<Class<? extends AbstractSimplification>> set = new HashSet(); set.add( RightSimplification.class ); return set; }
/** * Builds a singleton start set containing this class. */
Builds a singleton start set containing this class
getStartSet
{ "repo_name": "Sable/mclab-core", "path": "languages/Natlab/src/natlab/toolkits/rewrite/simplification/RightSimplification.java", "license": "apache-2.0", "size": 13367 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
331,986
public static List<Key> keyAttrListForIterator(String iteratorName, String keyAttrName) { return keyAttrListForIterator(findIterator(iteratorName), keyAttrName); }
static List<Key> function(String iteratorName, String keyAttrName) { return keyAttrListForIterator(findIterator(iteratorName), keyAttrName); }
/** * Get List of Key objects for rows in an iterator using key attribute. * @param iteratorName iterator binding name * @param keyAttrName name of key attribute to use * @return List of Key objects for rows */
Get List of Key objects for rows in an iterator using key attribute
keyAttrListForIterator
{ "repo_name": "pritam176/UAQ", "path": "UAQCashierPayment/DoCashierPaymentUI/src/com/adf/pos/utils/ADFUtils.java", "license": "gpl-3.0", "size": 25875 }
[ "java.util.List", "oracle.jbo.Key" ]
import java.util.List; import oracle.jbo.Key;
import java.util.*; import oracle.jbo.*;
[ "java.util", "oracle.jbo" ]
java.util; oracle.jbo;
1,008,195
interface Aws2EventbridgeComponentBuilder extends ComponentBuilder<EventbridgeComponent> { default Aws2EventbridgeComponentBuilder configuration( org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration configuration) { doSetProper...
interface Aws2EventbridgeComponentBuilder extends ComponentBuilder<EventbridgeComponent> { default Aws2EventbridgeComponentBuilder configuration( org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration configuration) { doSetProperty(STR, configuration); return this; }
/** * Component configuration. * * The option is a: * <code>org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration</code> type. * * Group: producer */
Component configuration. The option is a: <code>org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration</code> type. Group: producer
configuration
{ "repo_name": "nicolaferraro/camel", "path": "core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java", "license": "apache-2.0", "size": 12403 }
[ "org.apache.camel.builder.component.ComponentBuilder", "org.apache.camel.component.aws2.eventbridge.EventbridgeComponent" ]
import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.aws2.eventbridge.EventbridgeComponent;
import org.apache.camel.builder.component.*; import org.apache.camel.component.aws2.eventbridge.*;
[ "org.apache.camel" ]
org.apache.camel;
2,357,342
public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CyclicNumberAxis)) { return false; } if (!super.equals(obj)) { return false; } CyclicNumberAxis that = (CyclicNumberAxis) obj; ...
boolean function(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CyclicNumberAxis)) { return false; } if (!super.equals(obj)) { return false; } CyclicNumberAxis that = (CyclicNumberAxis) obj; if (this.period != that.period) { return false; } if (this.offset != that.offset) { return false; } if (!Pa...
/** * Tests the axis for equality with another object. * * @param obj the object to test against. * * @return A boolean. */
Tests the axis for equality with another object
equals
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/axis/CyclicNumberAxis.java", "license": "lgpl-2.1", "size": 42414 }
[ "org.jfree.util.ObjectUtilities", "org.jfree.util.PaintUtilities" ]
import org.jfree.util.ObjectUtilities; import org.jfree.util.PaintUtilities;
import org.jfree.util.*;
[ "org.jfree.util" ]
org.jfree.util;
1,224,864
public static Vector determineLeftMembers(Vector old_mbrs, Vector new_mbrs) { Vector retval=new Vector(); Object mbr; if(old_mbrs == null || new_mbrs == null) return retval; for(int i=0; i < old_mbrs.size(); i++) { mbr=old_mbrs.elementAt(i); if(!...
static Vector function(Vector old_mbrs, Vector new_mbrs) { Vector retval=new Vector(); Object mbr; if(old_mbrs == null new_mbrs == null) return retval; for(int i=0; i < old_mbrs.size(); i++) { mbr=old_mbrs.elementAt(i); if(!new_mbrs.contains(mbr)) retval.addElement(mbr); } return retval; }
/** * Returns all members that left between 2 views. All members that are element of old_mbrs but not element of * new_mbrs are returned. */
Returns all members that left between 2 views. All members that are element of old_mbrs but not element of new_mbrs are returned
determineLeftMembers
{ "repo_name": "papicella/snappy-store", "path": "lgpl/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/util/Util.java", "license": "apache-2.0", "size": 60666 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,880,125
public Map<String, IndicesAccessControl.IndexAccessControl> authorize(String action, Set<String> requestedIndicesOrAliases, Map<String, AliasOrIndex> allAliasesAndIndices, ...
Map<String, IndicesAccessControl.IndexAccessControl> function(String action, Set<String> requestedIndicesOrAliases, Map<String, AliasOrIndex> allAliasesAndIndices, FieldPermissionsCache fieldPermissionsCache) { Map<String, Set<FieldPermissions>> fieldPermissionsByIndex = new HashMap<>(); Map<String, DocumentLevelPermis...
/** * Authorizes the provided action against the provided indices, given the current cluster metadata */
Authorizes the provided action against the provided indices, given the current cluster metadata
authorize
{ "repo_name": "coding0011/elasticsearch", "path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java", "license": "apache-2.0", "size": 18572 }
[ "java.util.Arrays", "java.util.Collections", "java.util.HashMap", "java.util.HashSet", "java.util.Map", "java.util.Objects", "java.util.Set", "java.util.function.Predicate", "org.elasticsearch.cluster.metadata.AliasOrIndex", "org.elasticsearch.cluster.metadata.IndexMetaData", "org.elasticsearch....
import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.function.Predicate; import org.elasticsearch.cluster.metadata.AliasOrIndex; import org.elasticsearch.cluster.metadata.IndexMet...
import java.util.*; import java.util.function.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.xpack.core.security.authz.accesscontrol.*; import org.elasticsearch.xpack.core.security.authz.privilege.*;
[ "java.util", "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.xpack" ]
java.util; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.xpack;
1,905,363
@Override public Response throttlingPoliciesCustomRuleIdGet(String ruleId, String ifNoneMatch, String ifModifiedSince) { try { APIProvider apiProvider = RestApiUtil.getLoggedInUserProvider(); String username = RestApiUtil.getLoggedInUsername(); //only sup...
Response function(String ruleId, String ifNoneMatch, String ifModifiedSince) { try { APIProvider apiProvider = RestApiUtil.getLoggedInUserProvider(); String username = RestApiUtil.getLoggedInUsername(); checkTenantDomainForCustomRules(); GlobalPolicy globalPolicy = apiProvider.getGlobalPolicyByUUID(ruleId); if (!RestAp...
/** * Get a specific custom rule by its name * * @param ruleId uuid of the policy * @param ifNoneMatch If-None-Match header value * @param ifModifiedSince If-Modified-Since header value * @return Matched Global Throttle Policy by the given name */
Get a specific custom rule by its name
throttlingPoliciesCustomRuleIdGet
{ "repo_name": "hevayo/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.admin/src/main/java/org/wso2/carbon/apimgt/rest/api/admin/impl/ThrottlingApiServiceImpl.java", "license": "apache-2.0", "size": 48651 }
[ "javax.ws.rs.core.Response", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.APIProvider", "org.wso2.carbon.apimgt.api.model.policy.GlobalPolicy", "org.wso2.carbon.apimgt.rest.api.admin.dto.CustomRuleDTO", "org.wso2.carbon.apimgt.rest.api.admin.utils.RestApiAdminUtils", ...
import javax.ws.rs.core.Response; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.model.policy.GlobalPolicy; import org.wso2.carbon.apimgt.rest.api.admin.dto.CustomRuleDTO; import org.wso2.carbon.apimgt.rest.api.admin.utils.RestA...
import javax.ws.rs.core.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.policy.*; import org.wso2.carbon.apimgt.rest.api.admin.dto.*; import org.wso2.carbon.apimgt.rest.api.admin.utils.*; import org.wso2.carbon.apimgt.rest.api.admin.utils.mappings.throttling.*; import org.wso2.carbon.api...
[ "javax.ws", "org.wso2.carbon" ]
javax.ws; org.wso2.carbon;
2,291,200
private ArrayList<Integer> getTotals() { // 0..4 = A..M; 5 = total ArrayList<Integer> totals = new ArrayList<>(); int scoreA = 0; int scoreB = 0; int scoreC = 0; int scoreD = 0; int scoreM = 0; int scoreTotal = 0; Cursor cursor = mContext.get...
ArrayList<Integer> function() { ArrayList<Integer> totals = new ArrayList<>(); int scoreA = 0; int scoreB = 0; int scoreC = 0; int scoreD = 0; int scoreM = 0; int scoreTotal = 0; Cursor cursor = mContext.getContentResolver().query(mTargetUri, TARGET_COLUMNS, null, null, null); if (cursor != null) { if (cursor.moveToFir...
/** * Retrieves the total target scores fresh from the database. * * @return Returns a list of integers representing the total target scores. The items are * always sorted by this target sequence: A, B, C, D, M and the grand total. */
Retrieves the total target scores fresh from the database
getTotals
{ "repo_name": "kherb64/IPSCScorer", "path": "app/src/main/java/kherb64/android/ipscscorer/ScoreFragment.java", "license": "mit", "size": 18267 }
[ "android.database.Cursor", "java.util.ArrayList" ]
import android.database.Cursor; import java.util.ArrayList;
import android.database.*; import java.util.*;
[ "android.database", "java.util" ]
android.database; java.util;
2,068,313
protected void refreshIfUserSwitched() { if (passcodeManager.onResume(this)) { // Gets login options. final String accountType = SalesforceSDKManager.getInstance().getAccountType(); final LoginOptions loginOptions = SalesforceSDKManager.getInstance().getLoginOptions(); // Gets a rest client. new ...
void function() { if (passcodeManager.onResume(this)) { final String accountType = SalesforceSDKManager.getInstance().getAccountType(); final LoginOptions loginOptions = SalesforceSDKManager.getInstance().getLoginOptions(); new ClientManager(this, accountType, loginOptions, SalesforceSDKManager.getInstance().shouldLogo...
/** * Refreshes the client if the user has been switched. */
Refreshes the client if the user has been switched
refreshIfUserSwitched
{ "repo_name": "huminzhi/SalesforceMobileSDK-Android", "path": "libs/SalesforceSDK/src/com/salesforce/androidsdk/ui/SalesforceActivity.java", "license": "apache-2.0", "size": 5705 }
[ "com.salesforce.androidsdk.app.SalesforceSDKManager", "com.salesforce.androidsdk.rest.ClientManager" ]
import com.salesforce.androidsdk.app.SalesforceSDKManager; import com.salesforce.androidsdk.rest.ClientManager;
import com.salesforce.androidsdk.app.*; import com.salesforce.androidsdk.rest.*;
[ "com.salesforce.androidsdk" ]
com.salesforce.androidsdk;
367,747
@DoesServiceRequest public final String acquireLease(final Integer leaseTimeInSeconds, final String proposedLeaseId) throws StorageException { return this.acquireLease(leaseTimeInSeconds, proposedLeaseId, null , null , null ); }
final String function(final Integer leaseTimeInSeconds, final String proposedLeaseId) throws StorageException { return this.acquireLease(leaseTimeInSeconds, proposedLeaseId, null , null , null ); }
/** * Acquires a new lease on the container with the specified lease time and proposed lease ID. * * @param leaseTimeInSeconds * An <code>Integer</code> which specifies the span of time for which to acquire the lease, in seconds. * If null, an infinite lease will be acqui...
Acquires a new lease on the container with the specified lease time and proposed lease ID
acquireLease
{ "repo_name": "risezhang/azure-storage-cli", "path": "src/main/java/com/microsoft/azure/storage/blob/CloudBlobContainer.java", "license": "mit", "size": 103627 }
[ "com.microsoft.azure.storage.StorageException" ]
import com.microsoft.azure.storage.StorageException;
import com.microsoft.azure.storage.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,870,336
void transferIn(VectorContainer containerIn) { Preconditions.checkArgument(this.wrappers.size() == containerIn.wrappers.size()); for (int i = 0; i < this.wrappers.size(); ++i) { containerIn.wrappers.get(i).transfer(this.wrappers.get(i)); } }
void transferIn(VectorContainer containerIn) { Preconditions.checkArgument(this.wrappers.size() == containerIn.wrappers.size()); for (int i = 0; i < this.wrappers.size(); ++i) { containerIn.wrappers.get(i).transfer(this.wrappers.get(i)); } }
/** * Transfer vectors from containerIn to this. */
Transfer vectors from containerIn to this
transferIn
{ "repo_name": "dremio/dremio-oss", "path": "sabot/vector-tools/src/main/java/com/dremio/exec/record/VectorContainer.java", "license": "apache-2.0", "size": 14754 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
492,657
public static void showOkDialog(Context context, int icon, String title, String message) { AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setCancelable(false); builder.setIcon(icon); builder.setTitle(title); builder.setMessage(message);
static void function(Context context, int icon, String title, String message) { AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setCancelable(false); builder.setIcon(icon); builder.setTitle(title); builder.setMessage(message);
/** * Display a standard Ok dialog. * @param context The current context. * @param icon The dialog icon. * @param title The dialog title. * @param message The dialog message. */
Display a standard Ok dialog
showOkDialog
{ "repo_name": "patdzzjc/zirco-browser", "path": "src/org/zirco/utils/ApplicationUtils.java", "license": "gpl-3.0", "size": 19500 }
[ "android.app.AlertDialog", "android.content.Context" ]
import android.app.AlertDialog; import android.content.Context;
import android.app.*; import android.content.*;
[ "android.app", "android.content" ]
android.app; android.content;
1,132,770
@SuppressWarnings("unchecked") public ListIterator<AbstractInsnNode> iterator(int index) { return new InsnListIterator(index); }
@SuppressWarnings(STR) ListIterator<AbstractInsnNode> function(int index) { return new InsnListIterator(index); }
/** * Returns an iterator over the instructions in this list. * * @return an iterator over the instructions in this list. */
Returns an iterator over the instructions in this list
iterator
{ "repo_name": "trivium-io/trivium", "path": "src/io/trivium/dep/org/objectweb/asm/tree/InsnList.java", "license": "apache-2.0", "size": 18686 }
[ "java.util.ListIterator" ]
import java.util.ListIterator;
import java.util.*;
[ "java.util" ]
java.util;
593,460
@Test public void setupPathTest12() { build4RouterTopo(false, true, true, true, 15); List<Constraint> constraints = new LinkedList<Constraint>(); BandwidthConstraint bwConstraint = new BandwidthConstraint(Bandwidth.bps(10.0)); CostConstraint costConstraint = new CostConstraint(TE...
void function() { build4RouterTopo(false, true, true, true, 15); List<Constraint> constraints = new LinkedList<Constraint>(); BandwidthConstraint bwConstraint = new BandwidthConstraint(Bandwidth.bps(10.0)); CostConstraint costConstraint = new CostConstraint(TE_COST); constraints.add(costConstraint); constraints.add(bwC...
/** * Tests path setup without signalling and with bandwidth reservation. */
Tests path setup without signalling and with bandwidth reservation
setupPathTest12
{ "repo_name": "maheshraju-Huawei/actn", "path": "apps/pce/app/src/test/java/org/onosproject/pce/pceservice/PceManagerTest.java", "license": "apache-2.0", "size": 66481 }
[ "java.util.LinkedList", "java.util.List", "org.hamcrest.MatcherAssert", "org.hamcrest.core.Is", "org.onlab.util.Bandwidth", "org.onosproject.incubator.net.resource.label.LabelResourceId", "org.onosproject.net.intent.Constraint", "org.onosproject.net.intent.constraint.BandwidthConstraint", "org.onosp...
import java.util.LinkedList; import java.util.List; import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.onlab.util.Bandwidth; import org.onosproject.incubator.net.resource.label.LabelResourceId; import org.onosproject.net.intent.Constraint; import org.onosproject.net.intent.constraint.BandwidthCo...
import java.util.*; import org.hamcrest.*; import org.hamcrest.core.*; import org.onlab.util.*; import org.onosproject.incubator.net.resource.label.*; import org.onosproject.net.intent.*; import org.onosproject.net.intent.constraint.*; import org.onosproject.pce.pceservice.api.*; import org.onosproject.pce.pceservice.c...
[ "java.util", "org.hamcrest", "org.hamcrest.core", "org.onlab.util", "org.onosproject.incubator", "org.onosproject.net", "org.onosproject.pce" ]
java.util; org.hamcrest; org.hamcrest.core; org.onlab.util; org.onosproject.incubator; org.onosproject.net; org.onosproject.pce;
1,374,952
public int getNumberOfContacts() { if(((driver.findElements(By.xpath(".//*[@id='userForm:j_idt97:j_idt110_data']/tr"))).size() == 1) && (driver.findElement(By.xpath(".//*[@id='userForm:j_idt97:j_idt110_data']/tr"))).getText().equals("No records found.")) return 0; else return driver.findElements(B...
int function() { if(((driver.findElements(By.xpath(STR. return 0; else return driver.findElements(By.xpath(". }
/** * Get number of contacts * * @return number of contacts */
Get number of contacts
getNumberOfContacts
{ "repo_name": "chr-krenn/fhj-ws2015-sd13-pse", "path": "pse/src/test/selenium/at/fhj/swd13/pse/test/gui/pageobjects/UserPage.java", "license": "mit", "size": 10727 }
[ "org.openqa.selenium.By" ]
import org.openqa.selenium.By;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,061,312
public PlusClient getPlusClient() { if (mPlusClient == null) { throw new IllegalStateException("No PlusClient. Did you request it at setup?"); } return mPlusClient; }
PlusClient function() { if (mPlusClient == null) { throw new IllegalStateException(STR); } return mPlusClient; }
/** * Returns the PlusClient object. In order to call this method, you must have * called @link{#setup} with a set of clients that includes CLIENT_PLUS. */
Returns the PlusClient object. In order to call this method, you must have called @link{#setup} with a set of clients that includes CLIENT_PLUS
getPlusClient
{ "repo_name": "nobcatz/polygons", "path": "Polygons/libraries/BaseGameUtils/src/main/java/com/google/example/games/basegameutils/GameHelper.java", "license": "gpl-2.0", "size": 46439 }
[ "com.google.android.gms.plus.PlusClient" ]
import com.google.android.gms.plus.PlusClient;
import com.google.android.gms.plus.*;
[ "com.google.android" ]
com.google.android;
763,747
public List<String> allowedAudiences() { return this.innerProperties() == null ? null : this.innerProperties().allowedAudiences(); }
List<String> function() { return this.innerProperties() == null ? null : this.innerProperties().allowedAudiences(); }
/** * Get the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure * Active Directory. Note that the &lt;code&gt;ClientID&lt;/code&gt; value is always considered an allowed audience, * regardless of this setting. * * @return the allowedAudiences va...
Get the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. Note that the &lt;code&gt;ClientID&lt;/code&gt; value is always considered an allowed audience, regardless of this setting
allowedAudiences
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/SiteAuthSettingsInner.java", "license": "mit", "size": 46370 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,844,568
@Test void addSubpixelBias() { var alg = new SelectSparseErrorSubpixel.S32(-1, -1, -1); int[] scores = new int[30]; Arrays.fill(scores, 0, 10, 500); // should be biased towards 4 scores[4] = 100; scores[5] = 50; scores[6] = 200; assertTrue(alg.select(new DummyScore_S32(scores, null, 10, -1), -1, ...
void addSubpixelBias() { var alg = new SelectSparseErrorSubpixel.S32(-1, -1, -1); int[] scores = new int[30]; Arrays.fill(scores, 0, 10, 500); scores[4] = 100; scores[5] = 50; scores[6] = 200; assertTrue(alg.select(new DummyScore_S32(scores, null, 10, -1), -1, -1)); double found = alg.getDisparity(); assertTrue(found <...
/** * Given different local error values see if it is closer to the value with a smaller error */
Given different local error values see if it is closer to the value with a smaller error
addSubpixelBias
{ "repo_name": "lessthanoptimal/BoofCV", "path": "main/boofcv-ip-multiview/src/test/java/boofcv/alg/disparity/block/select/TestSelectSparseErrorSubpixel_S32.java", "license": "apache-2.0", "size": 2038 }
[ "java.util.Arrays", "org.junit.jupiter.api.Assertions" ]
import java.util.Arrays; import org.junit.jupiter.api.Assertions;
import java.util.*; import org.junit.jupiter.api.*;
[ "java.util", "org.junit.jupiter" ]
java.util; org.junit.jupiter;
557,076
public boolean hasRole(String roleName) { boolean hasRole = false; for (Group group : this.userGroups) { hasRole = this.hasGrantTo(roleName, group); } return hasRole; }
boolean function(String roleName) { boolean hasRole = false; for (Group group : this.userGroups) { hasRole = this.hasGrantTo(roleName, group); } return hasRole; }
/** * Checa pela role de um respectivo usuario * * @param roleName a role que espera-se que este usuario tenha * @return se existe ou nao uma instancia desta role atribuida a ele */
Checa pela role de um respectivo usuario
hasRole
{ "repo_name": "LuizFernand0/web-budget", "path": "webBudget/src/main/java/br/com/webbudget/application/controller/AuthorizationBean.java", "license": "gpl-3.0", "size": 4580 }
[ "br.com.webbudget.domain.security.Group" ]
import br.com.webbudget.domain.security.Group;
import br.com.webbudget.domain.security.*;
[ "br.com.webbudget" ]
br.com.webbudget;
1,456,551
void delete(List<Delete> deletes) throws IOException;
void delete(List<Delete> deletes) throws IOException;
/** * Deletes the specified cells/rows in bulk. * @param deletes List of things to delete. List gets modified by this * method (in particular it gets re-ordered, so the order in which the elements * are inserted in the list gives no guarantee as to the order in which the * {@link Delete}s are executed)....
Deletes the specified cells/rows in bulk
delete
{ "repo_name": "Guavus/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java", "license": "apache-2.0", "size": 25576 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,598,646
@Test public void autosInsideNotQueueRegion() { TestPage p = new TestPage(); p.setPageMarkup("<div wicket:id='outerContainer'><wicket:enclosure><div wicket:id='a'></div></wicket:enclosure></div>"); Label a = new Label("a", "a"); WebMarkupContainer outer; p.add(outer = new WebMarkupContainer("outerContain...
void function() { TestPage p = new TestPage(); p.setPageMarkup(STR); Label a = new Label("a", "a"); WebMarkupContainer outer; p.add(outer = new WebMarkupContainer(STR)); outer.queue(a); tester.startPage(p); assertTrue(a.getParent() instanceof Enclosure); }
/** * Test autocomponent inside not-queue region */
Test autocomponent inside not-queue region
autosInsideNotQueueRegion
{ "repo_name": "klopfdreh/wicket", "path": "wicket-core/src/test/java/org/apache/wicket/queueing/ComponentQueueingTest.java", "license": "apache-2.0", "size": 26159 }
[ "org.apache.wicket.markup.html.WebMarkupContainer", "org.apache.wicket.markup.html.basic.Label", "org.apache.wicket.markup.html.internal.Enclosure" ]
import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.internal.Enclosure;
import org.apache.wicket.markup.html.*; import org.apache.wicket.markup.html.basic.*; import org.apache.wicket.markup.html.internal.*;
[ "org.apache.wicket" ]
org.apache.wicket;
108,303
@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": "SpaceWireOS-Modeler/MetaModel", "path": "jp.pizzafactory.model.spacewireos.editor/src/jp/pizzafactory/model/spacewireos/networkTopology/presentation/NetworkTopologyEditor.java", "license": "epl-1.0", "size": 55092 }
[ "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,896,421
public static String toJson(Object obj) throws JsonProcessingException { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT); String json = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj); return json; }
static String function(Object obj) throws JsonProcessingException { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT); String json = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj); return json; }
/** * Convert Java object to json string. * @param obj * @return String * @throws JsonProcessingException */
Convert Java object to json string
toJson
{ "repo_name": "kojish/hdinsight-spark-livy-client", "path": "src/main/java/delsh/livy/JsonConverter.java", "license": "apache-2.0", "size": 1844 }
[ "com.fasterxml.jackson.annotation.JsonInclude", "com.fasterxml.jackson.core.JsonProcessingException", "com.fasterxml.jackson.databind.ObjectMapper" ]
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
2,433,056
public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) { return EnumActionResult.PASS; }
EnumActionResult function(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) { return EnumActionResult.PASS; }
/** * This is called when the item is used, before the block is activated. * @param stack The Item Stack * @param player The Player that used the item * @param world The Current World * @param pos Target position * @param side The side of the target hit * @param hand Which hand the it...
This is called when the item is used, before the block is activated
onItemUseFirst
{ "repo_name": "F1r3w477/CustomWorldGen", "path": "build/tmp/recompileMc/sources/net/minecraft/item/Item.java", "license": "lgpl-3.0", "size": 83883 }
[ "net.minecraft.entity.player.EntityPlayer", "net.minecraft.util.EnumActionResult", "net.minecraft.util.EnumFacing", "net.minecraft.util.EnumHand", "net.minecraft.util.math.BlockPos", "net.minecraft.world.World" ]
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World;
import net.minecraft.entity.player.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.util; net.minecraft.world;
2,086,259
private void generateUI() { //Display display = new Display(); shell = new Shell(display); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 3; shell.setLayout(gridLayout); shell.setSize(1600, 850); GridData gd; // Rules Composite rules = new Composite(shell, SWT...
void function() { display = new Display(); shell = new Shell(display); GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 3; shell.setLayout(gridLayout); shell.setSize(1600, 850); GridData gd; Composite rules = new Composite(shell, SWT.BORDER); gd = new GridData(SWT.FILL, SWT.FILL, true, true); gd.widthH...
/** * Generates the UI and embeds the graph from graphstream */
Generates the UI and embeds the graph from graphstream
generateUI
{ "repo_name": "eMoflon/emoflon-ibex", "path": "org.emoflon.ibex.gt/src/org/emoflon/ibex/gt/ui/VaDoGT.java", "license": "gpl-3.0", "size": 65012 }
[ "java.awt.Frame", "java.util.List", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.layout.GridLayout", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Display", "org.eclipse.swt.widgets.Group", "org.eclipse.swt.widgets.Label", "org.eclipse.swt.w...
import java.awt.Frame; import java.util.List; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.La...
import java.awt.*; import java.util.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.emoflon.ibex.patternmodel.*;
[ "java.awt", "java.util", "org.eclipse.swt", "org.emoflon.ibex" ]
java.awt; java.util; org.eclipse.swt; org.emoflon.ibex;
809,777
@WebMethod PlatformConfigurationWsResult getPlatformConfiguration() throws LockssWebServicesFault;
PlatformConfigurationWsResult getPlatformConfiguration() throws LockssWebServicesFault;
/** * Provides the platform configuration. * * @return a PlatformConfigurationWsResult with the platform configuration. * @throws LockssWebServicesFault */
Provides the platform configuration
getPlatformConfiguration
{ "repo_name": "edina/lockss-daemon", "path": "src/org/lockss/ws/status/DaemonStatusService.java", "license": "bsd-3-clause", "size": 10290 }
[ "org.lockss.ws.entities.LockssWebServicesFault", "org.lockss.ws.entities.PlatformConfigurationWsResult" ]
import org.lockss.ws.entities.LockssWebServicesFault; import org.lockss.ws.entities.PlatformConfigurationWsResult;
import org.lockss.ws.entities.*;
[ "org.lockss.ws" ]
org.lockss.ws;
146,889
public DocumentMutation increment(@NonNullable FieldPath path, short inc);
DocumentMutation function(@NonNullable FieldPath path, short inc);
/** * Atomically increment the existing value at given the FieldPath by the given value. * * @param path the FieldPath to apply this increment operation * @param inc increment to apply to a field - can be positive or negative */
Atomically increment the existing value at given the FieldPath by the given value
increment
{ "repo_name": "ojai/ojai", "path": "java/core/src/main/java/org/ojai/store/DocumentMutation.java", "license": "apache-2.0", "size": 47815 }
[ "org.ojai.FieldPath", "org.ojai.annotation.API" ]
import org.ojai.FieldPath; import org.ojai.annotation.API;
import org.ojai.*; import org.ojai.annotation.*;
[ "org.ojai", "org.ojai.annotation" ]
org.ojai; org.ojai.annotation;
2,771,542
CacheKey build(SlingHttpServletRequest request, HttpCacheConfig cacheConfig) throws HttpCacheKeyCreationException;
CacheKey build(SlingHttpServletRequest request, HttpCacheConfig cacheConfig) throws HttpCacheKeyCreationException;
/** * Build a cache key. * * @param request * @param cacheConfig * @return * @throws HttpCacheKeyCreationException */
Build a cache key
build
{ "repo_name": "steffenrosi/acs-aem-commons", "path": "bundle/src/main/java/com/adobe/acs/commons/httpcache/keys/CacheKeyFactory.java", "license": "apache-2.0", "size": 1727 }
[ "com.adobe.acs.commons.httpcache.config.HttpCacheConfig", "com.adobe.acs.commons.httpcache.exception.HttpCacheKeyCreationException", "org.apache.sling.api.SlingHttpServletRequest" ]
import com.adobe.acs.commons.httpcache.config.HttpCacheConfig; import com.adobe.acs.commons.httpcache.exception.HttpCacheKeyCreationException; import org.apache.sling.api.SlingHttpServletRequest;
import com.adobe.acs.commons.httpcache.config.*; import com.adobe.acs.commons.httpcache.exception.*; import org.apache.sling.api.*;
[ "com.adobe.acs", "org.apache.sling" ]
com.adobe.acs; org.apache.sling;
2,314,986
private void writePoint(RandomAccessFile adf) throws IOException{ if(stepNb == 0) return; AbsCounterArchivePoint point = (AbsCounterArchivePoint)currentStepPoint(); if(point==null){ return; } long len = adf.length(); if(len<HEADER1_LEN + AbsCounterArchive.CURRENT_STEP_DATA_...
void function(RandomAccessFile adf) throws IOException{ if(stepNb == 0) return; AbsCounterArchivePoint point = (AbsCounterArchivePoint)currentStepPoint(); if(point==null){ return; } long len = adf.length(); if(len<HEADER1_LEN + AbsCounterArchive.CURRENT_STEP_DATA_LENGTH){ adf.seek(8); adf.writeLong(stepTimestamp); for(...
/** * Enregistre les valeurs du step en cours dans le fichier * @throws IOException */
Enregistre les valeurs du step en cours dans le fichier
writePoint
{ "repo_name": "vmire/TimeSeriesDB", "path": "src/main/java/com/mireau/timeseries/AbsCounterArchive.java", "license": "apache-2.0", "size": 11223 }
[ "java.io.IOException", "java.io.RandomAccessFile", "java.util.Date" ]
import java.io.IOException; import java.io.RandomAccessFile; import java.util.Date;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,297,711
public static void setMinInputSplitSize(Job job, long size) { job.getConfiguration().setLong(SPLIT_MINSIZE, size); }
static void function(Job job, long size) { job.getConfiguration().setLong(SPLIT_MINSIZE, size); }
/** * Set the minimum input split size * @param job the job to modify * @param size the minimum size */
Set the minimum input split size
setMinInputSplitSize
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/FileInputFormat.java", "license": "gpl-3.0", "size": 21428 }
[ "org.apache.hadoop.mapreduce.Job" ]
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,721,415
return Optional.of(raw) .filter(s -> !s.isEmpty()) .map(PATTERN::matcher) .filter(Matcher::matches) .map( matcher -> { @Nullable String cell = matcher.group("cell"); @Nullable String path = matcher.group("path"); @Nullable String suff...
return Optional.of(raw) .filter(s -> !s.isEmpty()) .map(PATTERN::matcher) .filter(Matcher::matches) .map( matcher -> { @Nullable String cell = matcher.group("cell"); @Nullable String path = matcher.group("path"); @Nullable String suffix = matcher.group(STR); if (path != null && suffix == null) { if ("...".equals(path))...
/** * Parses the given string as a buck target, returning {@link Optional#empty()} if it is not a * syntactically valid buck target. * * <p>Note that no guarantee is given whether or not the target is *semantically* valid. */
Parses the given string as a buck target, returning <code>Optional#empty()</code> if it is not a syntactically valid buck target. Note that no guarantee is given whether or not the target is *semantically* valid
parse
{ "repo_name": "rmaz/buck", "path": "tools/ideabuck/src/com/facebook/buck/intellij/ideabuck/api/BuckTargetPattern.java", "license": "apache-2.0", "size": 13234 }
[ "java.util.Optional", "java.util.regex.Matcher", "org.jetbrains.annotations.Nullable" ]
import java.util.Optional; import java.util.regex.Matcher; import org.jetbrains.annotations.Nullable;
import java.util.*; import java.util.regex.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
66,055
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (mclevdomPackage.Literals.MINTEGER_PARAM_IODSP_SWITCH_CASE__RANGE, commonFactory....
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (mclevdomPackage.Literals.MINTEGER_PARAM_IODSP_SWITCH_CASE__RANGE, commonFactory.eINSTANCE.createMParameterOOR())); newChildDescriptors.add ...
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object
collectNewChildDescriptors
{ "repo_name": "parraman/micobs", "path": "mclev/es.uah.aut.srg.micobs.mclev/src/es/uah/aut/srg/micobs/mclev/mclevdom/provider/MIntegerParamIODSPSwitchCaseItemProvider.java", "license": "epl-1.0", "size": 5343 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,503,881
private Node performArithmeticOp(Token opType, Node left, Node right) { // Unlike other operations, ADD operands are not always converted // to Number. if (opType == Token.ADD && (NodeUtil.mayBeString(left, shouldUseTypes) || NodeUtil.mayBeString(right, shouldUseTypes))) { return...
Node function(Token opType, Node left, Node right) { if (opType == Token.ADD && (NodeUtil.mayBeString(left, shouldUseTypes) NodeUtil.mayBeString(right, shouldUseTypes))) { return null; } double result; Double lValObj = NodeUtil.getNumberValue(left, shouldUseTypes); if (lValObj == null) { return null; } Double rValObj =...
/** * Try to fold arithmetic binary operators */
Try to fold arithmetic binary operators
performArithmeticOp
{ "repo_name": "anomaly/closure-compiler", "path": "src/com/google/javascript/jscomp/PeepholeFoldConstants.java", "license": "apache-2.0", "size": 42521 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,041,263
public static void rebuildCache() { DOWNSTREAM_JOBS = new HashSet<AbstractProject>(); } } public static class PseudoDownstreamBuilds extends InvisibleAction { final List<BuildPtr> builds = new ArrayList<BuildPtr>();
static void function() { DOWNSTREAM_JOBS = new HashSet<AbstractProject>(); } } public static class PseudoDownstreamBuilds extends InvisibleAction { final List<BuildPtr> builds = new ArrayList<BuildPtr>();
/** * Called whenever some {@link JobPropertyImpl} changes to update {@link #DOWNSTREAM_JOBS}. */
Called whenever some <code>JobPropertyImpl</code> changes to update <code>#DOWNSTREAM_JOBS</code>
rebuildCache
{ "repo_name": "tomrom95/promoted-builds-plugin", "path": "src/main/java/hudson/plugins/promoted_builds/conditions/DownstreamPassCondition.java", "license": "mit", "size": 13162 }
[ "hudson.model.AbstractProject", "hudson.model.Fingerprint", "hudson.model.InvisibleAction", "java.util.ArrayList", "java.util.HashSet", "java.util.List" ]
import hudson.model.AbstractProject; import hudson.model.Fingerprint; import hudson.model.InvisibleAction; import java.util.ArrayList; import java.util.HashSet; import java.util.List;
import hudson.model.*; import java.util.*;
[ "hudson.model", "java.util" ]
hudson.model; java.util;
2,906,393
public Detector createDetector() throws Exception { //already tested see PixelsService enumeration. List<IObject> types = pixelsService.getAllEnumerations( DetectorType.class.getName()); Detector detector = new DetectorI(); detector.setAmplificationGain(omero.rtypes.rdouble(0)); ...
Detector function() throws Exception { List<IObject> types = pixelsService.getAllEnumerations( DetectorType.class.getName()); Detector detector = new DetectorI(); detector.setAmplificationGain(omero.rtypes.rdouble(0)); detector.setGain(omero.rtypes.rdouble(1)); detector.setManufacturer(omero.rtypes.rstring(STR)); detec...
/** * Creates and returns a detector. * This will have to be linked to an instrument. * * @return See above. * @throws Exception Thrown if an error occurred. */
Creates and returns a detector. This will have to be linked to an instrument
createDetector
{ "repo_name": "rleigh-dundee/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/ModelMockFactory.java", "license": "gpl-2.0", "size": 36397 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,272,701
void privateHeaders(Action<? super ConfigurableFileCollection> action);
void privateHeaders(Action<? super ConfigurableFileCollection> action);
/** * Configures the private header directories for this component. */
Configures the private header directories for this component
privateHeaders
{ "repo_name": "robinverduijn/gradle", "path": "subprojects/language-native/src/main/java/org/gradle/language/cpp/CppComponent.java", "license": "apache-2.0", "size": 3647 }
[ "org.gradle.api.Action", "org.gradle.api.file.ConfigurableFileCollection" ]
import org.gradle.api.Action; import org.gradle.api.file.ConfigurableFileCollection;
import org.gradle.api.*; import org.gradle.api.file.*;
[ "org.gradle.api" ]
org.gradle.api;
221,044
SwitchStatement<T, R> singleCase(Function<? super T, ? extends R> action, T firstCondition, T... rest);
SwitchStatement<T, R> singleCase(Function<? super T, ? extends R> action, T firstCondition, T... rest);
/** * Represents a single case statement. * * @param action an action to be executed during evaluating of this case * @param firstCondition a mandatory condition value * @param rest optional conditional values evaluated with OR function * @return this statement */
Represents a single case statement
singleCase
{ "repo_name": "patryk-imielinski/fusta", "path": "src/main/java/pl/pimielinski/fusta/fuswitch/SwitchStatement.java", "license": "mit", "size": 1284 }
[ "java.util.function.Function" ]
import java.util.function.Function;
import java.util.function.*;
[ "java.util" ]
java.util;
2,071,118
public void testConstrStringWithExponentWithPoint2() { String a = "238096483923847545735673567457356356789029578490276878.7678287e-214"; int aScale = 221; BigInteger bA = new BigInteger("2380964839238475457356735674573563567890295784902768787678287"); BigDecimal aNumber = new BigDeci...
void function() { String a = STR; int aScale = 221; BigInteger bA = new BigInteger(STR); BigDecimal aNumber = new BigDecimal(a); assertEquals(STR, bA, aNumber.unscaledValue()); assertEquals(STR, aScale, aNumber.scale()); }
/** * new BigDecimal(String value); * value contains both exponent and decimal point */
new BigDecimal(String value); value contains both exponent and decimal point
testConstrStringWithExponentWithPoint2
{ "repo_name": "groschovskiy/j2objc", "path": "jre_emul/apache_harmony/classlib/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalConstructorsTest.java", "license": "apache-2.0", "size": 26167 }
[ "java.math.BigDecimal", "java.math.BigInteger" ]
import java.math.BigDecimal; import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,936,989
public static int getYear(CharSequence date) { if (isBlank(date)) { return -1; } Pattern pattern = Pattern.compile("\\b\\d{4}\\b"); Matcher matcher = pattern.matcher(date); while (matcher.find()) { int result = Integer.parseInt(matcher.group()); if (result > 1600 && result < 2100) { return res...
static int function(CharSequence date) { if (isBlank(date)) { return -1; } Pattern pattern = Pattern.compile(STR); Matcher matcher = pattern.matcher(date); while (matcher.find()) { int result = Integer.parseInt(matcher.group()); if (result > 1600 && result < 2100) { return result; } } return -1; }
/** * Returns the first four digit number that can look like a year from the * specified {@link CharSequence}. * * @param date the {@link CharSequence} from which to extract the year. * @return The extracted year or {@code -1} if no valid year is found. */
Returns the first four digit number that can look like a year from the specified <code>CharSequence</code>
getYear
{ "repo_name": "UniversalMediaServer/UniversalMediaServer", "path": "src/main/java/net/pms/util/StringUtil.java", "license": "gpl-2.0", "size": 48686 }
[ "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,380,725
RateGenerator getRateGenerator(Map<String, Object> configuration) throws ConfigurationParseException;
RateGenerator getRateGenerator(Map<String, Object> configuration) throws ConfigurationParseException;
/** * Returns rate generator based on configuration parameters. * * @param configuration Configuration specific to rate generator it should construct. * @return Instance of {@link RateGenerator}, never null. * * @throws ConfigurationParseException If there is an error during configuration ...
Returns rate generator based on configuration parameters
getRateGenerator
{ "repo_name": "smartcat-labs/berserker", "path": "berserker-commons/src/main/java/io/smartcat/berserker/configuration/RateGeneratorConfiguration.java", "license": "apache-2.0", "size": 888 }
[ "io.smartcat.berserker.api.RateGenerator", "java.util.Map" ]
import io.smartcat.berserker.api.RateGenerator; import java.util.Map;
import io.smartcat.berserker.api.*; import java.util.*;
[ "io.smartcat.berserker", "java.util" ]
io.smartcat.berserker; java.util;
485,443
final String uuid = qconf.getQueryId().toString(); final List<String> segmentId = new ArrayList<>(0); segmentId.add(message.getSegmentId()); final List<MediaSegmentDescriptor> segment = this.loadSegments(segmentId); if (segment.isEmpty()) return; final...
final String uuid = qconf.getQueryId().toString(); final List<String> segmentId = new ArrayList<>(0); segmentId.add(message.getSegmentId()); final List<MediaSegmentDescriptor> segment = this.loadSegments(segmentId); if (segment.isEmpty()) return; final List<String> objectId = segment.stream().map(MediaSegmentDescriptor...
/** * Executes a {@link SegmentQuery} message. Performs a lookup for the segment ID specified in the {@link SegmentQuery} object. * @param session WebSocket session the invocation is associated with. * @param qconf The {@link QueryConfig} that contains additional specifications. * @param message In...
Executes a <code>SegmentQuery</code> message. Performs a lookup for the segment ID specified in the <code>SegmentQuery</code> object
execute
{ "repo_name": "dbisUnibas/cineast", "path": "cineast-api/src/main/java/org/vitrivr/cineast/api/websocket/handlers/queries/SegmentQueryMessageHandler.java", "license": "mit", "size": 2571 }
[ "java.util.ArrayList", "java.util.List", "java.util.stream.Collectors", "org.vitrivr.cineast.api.messages.result.MediaObjectQueryResult", "org.vitrivr.cineast.api.messages.result.MediaSegmentQueryResult", "org.vitrivr.cineast.core.data.entities.MediaObjectDescriptor", "org.vitrivr.cineast.core.data.enti...
import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import org.vitrivr.cineast.api.messages.result.MediaObjectQueryResult; import org.vitrivr.cineast.api.messages.result.MediaSegmentQueryResult; import org.vitrivr.cineast.core.data.entities.MediaObjectDescriptor; import org.vitrivr.ci...
import java.util.*; import java.util.stream.*; import org.vitrivr.cineast.api.messages.result.*; import org.vitrivr.cineast.core.data.entities.*;
[ "java.util", "org.vitrivr.cineast" ]
java.util; org.vitrivr.cineast;
2,144,912
static ClusterState stateWithActivePrimary(String index, boolean activePrimaryLocal, int assignedReplicas, int unassignedReplicas) { ShardRoutingState[] replicaStates = new ShardRoutingState[assignedReplicas + unassignedReplicas]; // no point in randomi...
static ClusterState stateWithActivePrimary(String index, boolean activePrimaryLocal, int assignedReplicas, int unassignedReplicas) { ShardRoutingState[] replicaStates = new ShardRoutingState[assignedReplicas + unassignedReplicas]; for (int i = 0; i < assignedReplicas; i++) { replicaStates[i] = randomFrom(ShardRoutingSt...
/** * Creates cluster state with and index that has one shard and as many replicas as numberOfReplicas. * Primary will be STARTED in cluster state. Some (unassignedReplicas) will be UNASSIGNED and * some (assignedReplicas) will be one of INITIALIZING, STARTED or RELOCATING. * * @param index ...
Creates cluster state with and index that has one shard and as many replicas as numberOfReplicas. Primary will be STARTED in cluster state. Some (unassignedReplicas) will be UNASSIGNED and some (assignedReplicas) will be one of INITIALIZING, STARTED or RELOCATING
stateWithActivePrimary
{ "repo_name": "crate/crate", "path": "server/src/test/java/org/elasticsearch/action/support/replication/ClusterStateCreationUtils.java", "license": "apache-2.0", "size": 17440 }
[ "org.elasticsearch.cluster.ClusterState", "org.elasticsearch.cluster.routing.ShardRoutingState", "org.elasticsearch.test.ESTestCase" ]
import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.routing.ShardRoutingState; import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.test.*;
[ "org.elasticsearch.cluster", "org.elasticsearch.test" ]
org.elasticsearch.cluster; org.elasticsearch.test;
1,938,291
Properties properties = this.mavenProject.getProperties(); this.getLog().info("Executing '" + this.mavenProject.getName() + "' Version: " + this.mavenProject.getVersion() + " with 'git describe' support."); File pomFileExecuted = this.mavenProject.getFile(); File directoryOfPomFile = p...
Properties properties = this.mavenProject.getProperties(); this.getLog().info(STR + this.mavenProject.getName() + STR + this.mavenProject.getVersion() + STR); File pomFileExecuted = this.mavenProject.getFile(); File directoryOfPomFile = pomFileExecuted.getParentFile(); if (this.makeUseOfJavaFile) { if (this.classPathTo...
/** * Performs the actual plugin execution. * * The typical command will be {@code git describe}. * * @throws MojoExecutionException An exception occurring during the * execution of a plugin. * @throws MojoFailureException An exception occurring during the execution *...
Performs the actual plugin execution. The typical command will be git describe
execute
{ "repo_name": "koekiebox/git-maven-plugin", "path": "git-maven-plugin/src/main/java/com/koekiebox/GitDescribeMojo.java", "license": "apache-2.0", "size": 10838 }
[ "java.io.File", "java.io.IOException", "java.util.Properties" ]
import java.io.File; import java.io.IOException; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,990,827
public void createBpmaiCorrectorModelCollectionWithStatistics(boolean strictness, ErrorDetectorUnit before, ErrorDetectorUnit after) throws IllegalTypeException { register(new BpmaiJsonToDiagramUnit()); register(before); register(new ErrorCorrectorUnit()); register(after); register(new UnparsableModelFilte...
void function(boolean strictness, ErrorDetectorUnit before, ErrorDetectorUnit after) throws IllegalTypeException { register(new BpmaiJsonToDiagramUnit()); register(before); register(new ErrorCorrectorUnit()); register(after); register(new UnparsableModelFilterUnit(strictness)); }
/** * utility method for detecting flawed models by using the detection algorithms * before and after correction and finally collecting information about * successful transformation by employing the customized jbpt converter * @param strictness of the jbpt convert * @param before a detection unit which shou...
utility method for detecting flawed models by using the detection algorithms before and after correction and finally collecting information about successful transformation by employing the customized jbpt converter
createBpmaiCorrectorModelCollectionWithStatistics
{ "repo_name": "tobiashoppe/promnicat", "path": "src/de/uni_potsdam/hpi/bpt/promnicat/correctionModule/CorrectionUnitChainBuilder.java", "license": "gpl-3.0", "size": 3864 }
[ "de.uni_potsdam.hpi.bpt.promnicat.correctionModule.utilityUnits.ErrorCorrectorUnit", "de.uni_potsdam.hpi.bpt.promnicat.correctionModule.utilityUnits.ErrorDetectorUnit", "de.uni_potsdam.hpi.bpt.promnicat.correctionModule.utilityUnits.UnparsableModelFilterUnit", "de.uni_potsdam.hpi.bpt.promnicat.util.IllegalTyp...
import de.uni_potsdam.hpi.bpt.promnicat.correctionModule.utilityUnits.ErrorCorrectorUnit; import de.uni_potsdam.hpi.bpt.promnicat.correctionModule.utilityUnits.ErrorDetectorUnit; import de.uni_potsdam.hpi.bpt.promnicat.correctionModule.utilityUnits.UnparsableModelFilterUnit; import de.uni_potsdam.hpi.bpt.promnicat.util...
import de.uni_potsdam.hpi.bpt.promnicat.*; import de.uni_potsdam.hpi.bpt.promnicat.util.*;
[ "de.uni_potsdam.hpi" ]
de.uni_potsdam.hpi;
1,669,402
public Type getGenericParameterType() { if (this.genericParameterType == null) { if (this.parameterIndex < 0) { this.genericParameterType = (this.method != null ? this.method.getGenericReturnType() : null); } else { this.genericParameterType = (this.method != null ? this.method.getGene...
Type function() { if (this.genericParameterType == null) { if (this.parameterIndex < 0) { this.genericParameterType = (this.method != null ? this.method.getGenericReturnType() : null); } else { this.genericParameterType = (this.method != null ? this.method.getGenericParameterTypes()[this.parameterIndex] : this.construc...
/** * Return the generic type of the method/constructor parameter. * @return the parameter type (never <code>null</code>) */
Return the generic type of the method/constructor parameter
getGenericParameterType
{ "repo_name": "zhangclong/pathlet", "path": "sqlasm/src/com/wanda/ccs/sqlasm/convert/MethodParameter.java", "license": "apache-2.0", "size": 12954 }
[ "java.lang.reflect.Type" ]
import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
195,959
public void pagehit(String pagename, AsyncCallback<Void> callback);
void function(String pagename, AsyncCallback<Void> callback);
/** * Log a page hit * * @param pagename * @throws LoginException * @throws LoggerException */
Log a page hit
pagehit
{ "repo_name": "rui-castro/roda", "path": "roda-ui/roda-wui/src/main/java/org/roda/wui/common/client/ClientLoggerServiceAsync.java", "license": "lgpl-3.0", "size": 2793 }
[ "com.google.gwt.user.client.rpc.AsyncCallback" ]
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.*;
[ "com.google.gwt" ]
com.google.gwt;
24,978
public T caseBuiltInOperator(BuiltInOperator object) { return null; }
T function(BuiltInOperator object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Built In Operator</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result ...
Returns the result of interpreting the object as an instance of 'Built In Operator'. This implementation returns null; returning a non-null result will terminate the switch.
caseBuiltInOperator
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/finiteIntRanges/util/FiniteIntRangesSwitch.java", "license": "epl-1.0", "size": 15284 }
[ "fr.lip6.move.pnml.symmetricnet.terms.BuiltInOperator" ]
import fr.lip6.move.pnml.symmetricnet.terms.BuiltInOperator;
import fr.lip6.move.pnml.symmetricnet.terms.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,695,913
public CmsModuleManager getModuleManager() { return m_moduleManager; }
CmsModuleManager function() { return m_moduleManager; }
/** * Returns the configured module manager.<p> * * @return the configured module manager */
Returns the configured module manager
getModuleManager
{ "repo_name": "stephan-hartmann/opencms-rfs-driver", "path": "src/java/org/opencms/configuration/CmsModuleConfiguration.java", "license": "gpl-3.0", "size": 6344 }
[ "org.opencms.module.CmsModuleManager" ]
import org.opencms.module.CmsModuleManager;
import org.opencms.module.*;
[ "org.opencms.module" ]
org.opencms.module;
2,138,649
EReference getMain_Imports();
EReference getMain_Imports();
/** * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.linking.langATestLanguage.Main#getImports <em>Imports</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Imports</em>'. * @see org.eclipse.xt...
Returns the meta object for the containment reference list '<code>org.eclipse.xtext.linking.langATestLanguage.Main#getImports Imports</code>'.
getMain_Imports
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/linking/langATestLanguage/LangATestLanguagePackage.java", "license": "epl-1.0", "size": 11333 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
217,781
public ArrayList<Actor> getActors(INotifiableManager manager);
ArrayList<Actor> function(INotifiableManager manager);
/** * Gets all actors from database. Use {@link getMovieActors()} and * {@link getTvActors()} for filtered actors. * @return All actors */
Gets all actors from database. Use <code>getMovieActors()</code> and <code>getTvActors()</code> for filtered actors
getActors
{ "repo_name": "star-app/xbmc-remote-control", "path": "src/org/xbmc/api/data/IVideoClient.java", "license": "gpl-2.0", "size": 5006 }
[ "java.util.ArrayList", "org.xbmc.api.business.INotifiableManager", "org.xbmc.api.object.Actor" ]
import java.util.ArrayList; import org.xbmc.api.business.INotifiableManager; import org.xbmc.api.object.Actor;
import java.util.*; import org.xbmc.api.business.*; import org.xbmc.api.object.*;
[ "java.util", "org.xbmc.api" ]
java.util; org.xbmc.api;
1,055,787
public void send(DatagramPacket pack) throws IOException { checkClosedAndBind(true); InetAddress packAddr = pack.getAddress(); if (address != null) { // The socket is connected if (packAddr != null) { if (!address.equals(packAddr) || port != pack.getPort()) { ...
void function(DatagramPacket pack) throws IOException { checkClosedAndBind(true); InetAddress packAddr = pack.getAddress(); if (address != null) { if (packAddr != null) { if (!address.equals(packAddr) port != pack.getPort()) { throw new IllegalArgumentException(Messages.getString(STR)); } } else { pack.setAddress(addre...
/** * Sends a packet over this socket. The packet must satisfy the security * policy before it may be sent. If a security manager is installed, this * method checks whether it is allowed to send this packet to the specified * address. * * @param pack * the {@code DatagramP...
Sends a packet over this socket. The packet must satisfy the security policy before it may be sent. If a security manager is installed, this method checks whether it is allowed to send this packet to the specified address
send
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/luni/src/main/java/java/net/DatagramSocket.java", "license": "apache-2.0", "size": 31371 }
[ "java.io.IOException", "org.apache.harmony.luni.internal.nls.Messages" ]
import java.io.IOException; import org.apache.harmony.luni.internal.nls.Messages;
import java.io.*; import org.apache.harmony.luni.internal.nls.*;
[ "java.io", "org.apache.harmony" ]
java.io; org.apache.harmony;
2,507,513
public void testLongAccumulateAndGet() { AtomicLong a = new AtomicLong(1L); assertEquals(7L, a.accumulateAndGet(6L, Long::sum)); assertEquals(10L, a.accumulateAndGet(3L, Long::sum)); assertEquals(10L, a.get()); }
void function() { AtomicLong a = new AtomicLong(1L); assertEquals(7L, a.accumulateAndGet(6L, Long::sum)); assertEquals(10L, a.accumulateAndGet(3L, Long::sum)); assertEquals(10L, a.get()); }
/** * AtomicLong accumulateAndGet updates with supplied function and * returns result. */
AtomicLong accumulateAndGet updates with supplied function and returns result
testLongAccumulateAndGet
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jdk/test/java/util/concurrent/tck/Atomic8Test.java", "license": "gpl-2.0", "size": 24432 }
[ "java.util.concurrent.atomic.AtomicLong" ]
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
2,721,469
public static String toByteCode(byte[] bytes, boolean simpleTypes) { Printer p = simpleTypes ? new SimpleTypeTextifier() : new Textifier(); return toByteCode(new TraceClassVisitor(null, p, null), p, bytes); }
static String function(byte[] bytes, boolean simpleTypes) { Printer p = simpleTypes ? new SimpleTypeTextifier() : new Textifier(); return toByteCode(new TraceClassVisitor(null, p, null), p, bytes); }
/** * Returns the decompiled byte code. * * @param bytes * the class byte code * @param simpleTypes * {@code true} to use simple type representation * @return the decompiled byte code */
Returns the decompiled byte code
toByteCode
{ "repo_name": "anba/es6draft", "path": "src/main/java/com/github/anba/es6draft/compiler/assembler/Code.java", "license": "mit", "size": 11574 }
[ "org.objectweb.asm.util.Printer", "org.objectweb.asm.util.Textifier", "org.objectweb.asm.util.TraceClassVisitor" ]
import org.objectweb.asm.util.Printer; import org.objectweb.asm.util.Textifier; import org.objectweb.asm.util.TraceClassVisitor;
import org.objectweb.asm.util.*;
[ "org.objectweb.asm" ]
org.objectweb.asm;
1,254,295
private final void decodeFields(LogBuffer buffer, final int len) { final int limit = buffer.limit(); buffer.limit(len + buffer.position()); for (int i = 0; i < columnCnt; i++) { ColumnInfo info = columnInfo[i]; switch (info.type) { ...
final void function(LogBuffer buffer, final int len) { final int limit = buffer.limit(); buffer.limit(len + buffer.position()); for (int i = 0; i < columnCnt; i++) { ColumnInfo info = columnInfo[i]; switch (info.type) { case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_LONG_B...
/** * Decode field metadata by column types. * * @see mysql-5.1.60/sql/rpl_utility.h */
Decode field metadata by column types
decodeFields
{ "repo_name": "laokan/canal", "path": "dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/TableMapLogEvent.java", "license": "apache-2.0", "size": 15133 }
[ "com.taobao.tddl.dbsync.binlog.LogBuffer" ]
import com.taobao.tddl.dbsync.binlog.LogBuffer;
import com.taobao.tddl.dbsync.binlog.*;
[ "com.taobao.tddl" ]
com.taobao.tddl;
2,161,853
boolean closeOnExit = true; if (DatabaseHandler.getHandler().getWritableDatabase().isOpen()) closeOnExit = false; SQLiteDatabase db = DatabaseHandler.getHandler().getWritableDatabase(); List<ScorePojo> scoresList = new ArrayList<ScorePojo>(); Cursor cursor = db.rawQuery(DatabaseHandler.QUERY_SELECT_ALL, nu...
boolean closeOnExit = true; if (DatabaseHandler.getHandler().getWritableDatabase().isOpen()) closeOnExit = false; SQLiteDatabase db = DatabaseHandler.getHandler().getWritableDatabase(); List<ScorePojo> scoresList = new ArrayList<ScorePojo>(); Cursor cursor = db.rawQuery(DatabaseHandler.QUERY_SELECT_ALL, null); if (curs...
/** * Returns List of all rows present in the database. */
Returns List of all rows present in the database
getScoresList
{ "repo_name": "rahul-rkt/ColourMemory", "path": "src/thakur/rahul/colourmemory/model/ScoreModel.java", "license": "mit", "size": 5203 }
[ "android.database.Cursor", "android.database.sqlite.SQLiteDatabase", "java.util.ArrayList", "java.util.List" ]
import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList; import java.util.List;
import android.database.*; import android.database.sqlite.*; import java.util.*;
[ "android.database", "java.util" ]
android.database; java.util;
1,449,068
public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) { Log.w(LOG_TAG, "onFailure(int, Header[], Throwable, JSONArray) was not overriden, but callback was received", throwable); }
void function(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) { Log.w(LOG_TAG, STR, throwable); }
/** * Returns when request failed * * @param statusCode http response status line * @param headers response headers if any * @param throwable throwable describing the way request failed * @param errorResponse parsed response if any */
Returns when request failed
onFailure
{ "repo_name": "it114/OneFramework", "path": "src/com/loopj/android/http/JsonHttpResponseHandler.java", "license": "apache-2.0", "size": 10098 }
[ "android.util.Log", "org.apache.http.Header", "org.json.JSONArray" ]
import android.util.Log; import org.apache.http.Header; import org.json.JSONArray;
import android.util.*; import org.apache.http.*; import org.json.*;
[ "android.util", "org.apache.http", "org.json" ]
android.util; org.apache.http; org.json;
1,463,573
Espresso.registerIdlingResources(EspressoIdlingResource.getIdlingResource()); }
Espresso.registerIdlingResources(EspressoIdlingResource.getIdlingResource()); }
/** * Prepare your test fixture for this test. In this case we register an IdlingResources with * Espresso. IdlingResource resource is a great way to tell Espresso when your app is in an * idle state. This helps Espresso to synchronize your test actions, which makes tests * significantly more reliab...
Prepare your test fixture for this test. In this case we register an IdlingResources with Espresso. IdlingResource resource is a great way to tell Espresso when your app is in an idle state. This helps Espresso to synchronize your test actions, which makes tests significantly more reliable
registerIdlingResource
{ "repo_name": "dabaosod011/Practise", "path": "Android/android-architecture-todo-mvp/todoapp/app/src/androidTestMock/java/com/example/android/architecture/blueprints/todoapp/addedittask/AddEditTaskScreenTest.java", "license": "apache-2.0", "size": 7180 }
[ "android.support.test.espresso.Espresso", "com.example.android.architecture.blueprints.todoapp.util.EspressoIdlingResource" ]
import android.support.test.espresso.Espresso; import com.example.android.architecture.blueprints.todoapp.util.EspressoIdlingResource;
import android.support.test.espresso.*; import com.example.android.architecture.blueprints.todoapp.util.*;
[ "android.support", "com.example.android" ]
android.support; com.example.android;
2,546,053
public String getRestPrefix() { // just to avoid confusion, because normally prefix is relative return PathUtils.leadingSlash(restPrefix); }
String function() { return PathUtils.leadingSlash(restPrefix); }
/** * Context rest mapping path. Important for direct template resource to properly identify target path * because direct template resource may appear on any level (due to sub mappings or mapping in other applications). * * @return rest prefix used under current template call */
Context rest mapping path. Important for direct template resource to properly identify target path because direct template resource may appear on any level (due to sub mappings or mapping in other applications)
getRestPrefix
{ "repo_name": "xvik/dropwizard-guicey-ext", "path": "guicey-server-pages/src/main/java/ru/vyarus/guicey/gsp/views/template/TemplateContext.java", "license": "mit", "size": 12681 }
[ "ru.vyarus.dropwizard.guice.module.installer.util.PathUtils" ]
import ru.vyarus.dropwizard.guice.module.installer.util.PathUtils;
import ru.vyarus.dropwizard.guice.module.installer.util.*;
[ "ru.vyarus.dropwizard" ]
ru.vyarus.dropwizard;
2,909,353
public void setDetailWidget(final DetailWidget detailWidget) { this.detailWidget = detailWidget; }
void function(final DetailWidget detailWidget) { this.detailWidget = detailWidget; }
/** * DOCUMENT ME! * * @param detailWidget DOCUMENT ME! */
DOCUMENT ME
setDetailWidget
{ "repo_name": "cismet/belis-client", "path": "src/main/java/de/cismet/belis/broker/BelisBroker.java", "license": "gpl-3.0", "size": 138018 }
[ "de.cismet.belis.gui.widget.DetailWidget" ]
import de.cismet.belis.gui.widget.DetailWidget;
import de.cismet.belis.gui.widget.*;
[ "de.cismet.belis" ]
de.cismet.belis;
69,620
// TODO: OrdinalMap isn't expose in the field data framework, because it is an implementation detail. // However the JoinUtil works directly with OrdinalMap, so this is a hack to get access to OrdinalMap // I don't think we should expose OrdinalMap in IndexFieldData, because only parent/child relies on it a...
static MultiDocValues.OrdinalMap function(IndexParentChildFieldData indexParentChildFieldData, String type) { if (indexParentChildFieldData instanceof ParentChildIndexFieldData.GlobalFieldData) { return ((GlobalFieldData) indexParentChildFieldData).ordinalMapPerType.get(type).ordMap; } else { return null; } }
/** * Returns the global ordinal map for the specified type */
Returns the global ordinal map for the specified type
getOrdinalMap
{ "repo_name": "episerver/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/fielddata/plain/ParentChildIndexFieldData.java", "license": "apache-2.0", "size": 15725 }
[ "org.apache.lucene.index.MultiDocValues", "org.elasticsearch.index.fielddata.IndexParentChildFieldData" ]
import org.apache.lucene.index.MultiDocValues; import org.elasticsearch.index.fielddata.IndexParentChildFieldData;
import org.apache.lucene.index.*; import org.elasticsearch.index.fielddata.*;
[ "org.apache.lucene", "org.elasticsearch.index" ]
org.apache.lucene; org.elasticsearch.index;
434,158
@Override public void run() { Iterator<Map.Entry<HomematicBindingConfig, Long>> iterator = itemsToDisable.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<HomematicBindingConfig, Long> entry = iterator.next(); long diff = System.currentTimeMillis() - entry.getValue(); if (diff > MIN_AGE) {...
void function() { Iterator<Map.Entry<HomematicBindingConfig, Long>> iterator = itemsToDisable.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<HomematicBindingConfig, Long> entry = iterator.next(); long diff = System.currentTimeMillis() - entry.getValue(); if (diff > MIN_AGE) { new ProviderItemIterator().i...
/** * Sends the OFF commands to the openHAB bus. */
Sends the OFF commands to the openHAB bus
run
{ "repo_name": "gregfinley/openhab", "path": "bundles/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/communicator/ItemDisabler.java", "license": "epl-1.0", "size": 3806 }
[ "java.util.Iterator", "java.util.Map", "org.openhab.binding.homematic.internal.communicator.ProviderItemIterator", "org.openhab.binding.homematic.internal.config.binding.HomematicBindingConfig" ]
import java.util.Iterator; import java.util.Map; import org.openhab.binding.homematic.internal.communicator.ProviderItemIterator; import org.openhab.binding.homematic.internal.config.binding.HomematicBindingConfig;
import java.util.*; import org.openhab.binding.homematic.internal.communicator.*; import org.openhab.binding.homematic.internal.config.binding.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
2,047,176
public void match(BitSet b) throws MismatchedTokenException, TokenStreamException { if (!b.member(LA(1))) throw new MismatchedTokenException(tokenNames, LT(1), b, false, getFilename()); else // mark token as consumed -- fetch next token deferred until LA/LT consu...
void function(BitSet b) throws MismatchedTokenException, TokenStreamException { if (!b.member(LA(1))) throw new MismatchedTokenException(tokenNames, LT(1), b, false, getFilename()); else consume(); }
/**Make sure current lookahead symbol matches the given set * Throw an exception upon mismatch, which is catch by either the * error handler or by the syntactic predicate. */
Make sure current lookahead symbol matches the given set Throw an exception upon mismatch, which is catch by either the error handler or by the syntactic predicate
match
{ "repo_name": "HebaKhaled/bposs", "path": "src/pt_antlr/antlr/Parser.java", "license": "apache-2.0", "size": 13149 }
[ "antlr.collections.impl.BitSet" ]
import antlr.collections.impl.BitSet;
import antlr.collections.impl.*;
[ "antlr.collections.impl" ]
antlr.collections.impl;
415,504
public static String toCamelCase(CharSequence string) { if (string == null) { return null; } StringBuilder builder = new StringBuilder(); Matcher matcher = WORD_SEPARATOR.matcher(string); int pos = 0; while (matcher.find()) { builder.append(Str...
static String function(CharSequence string) { if (string == null) { return null; } StringBuilder builder = new StringBuilder(); Matcher matcher = WORD_SEPARATOR.matcher(string); int pos = 0; while (matcher.find()) { builder.append(StringUtils.capitalize(string.subSequence(pos, matcher.start()).toString())); pos = match...
/** * Converts an arbitrary string to a camel-case string which can be used in a Java identifier. Eg, with_underscores -> withUnderscores */
Converts an arbitrary string to a camel-case string which can be used in a Java identifier. Eg, with_underscores -> withUnderscores
toCamelCase
{ "repo_name": "gstevey/gradle", "path": "subprojects/base-services/src/main/java/org/gradle/util/GUtil.java", "license": "apache-2.0", "size": 17580 }
[ "java.util.regex.Matcher", "org.apache.commons.lang.StringUtils" ]
import java.util.regex.Matcher; import org.apache.commons.lang.StringUtils;
import java.util.regex.*; import org.apache.commons.lang.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
1,466,092
public static RuntimeException newUncheckedIOException(IOException pExc) { return new UncheckedIOException(pExc); }
static RuntimeException function(IOException pExc) { return new UncheckedIOException(pExc); }
/** Converts the given {@link IOException} into a {@link RuntimeException}. * @param pExc The {@link IOException} being rethrown. * @return Nothing, this method will <em>always</em> throw an exception. */
Converts the given <code>IOException</code> into a <code>RuntimeException</code>
newUncheckedIOException
{ "repo_name": "jochenw/afw", "path": "afw-core/src/main/java/com/github/jochenw/afw/core/util/Exceptions.java", "license": "apache-2.0", "size": 7716 }
[ "java.io.IOException", "java.io.UncheckedIOException" ]
import java.io.IOException; import java.io.UncheckedIOException;
import java.io.*;
[ "java.io" ]
java.io;
1,783,761
public HttpServletRequest getRequest() { return request; }
HttpServletRequest function() { return request; }
/** * Gets {@link HttpServletRequest}. * @return The request. */
Gets <code>HttpServletRequest</code>
getRequest
{ "repo_name": "appliedtech/web-app-bootstrap", "path": "ru.appliedtech.application.web/src/ru/appliedtech/application/web/HttpContext.java", "license": "mit", "size": 3407 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,962,961