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 void setVolumeCallback(VolumeCallback callback) { mVolumeCallback = callback; } public static final class PlaybackInfo { public int volume; public int volumeMax; public int volumeHandling = MediaRouter.RouteInfo.PLAYBACK_VOLUME_FIXED; public int playbackS...
void function(VolumeCallback callback) { mVolumeCallback = callback; } public static final class PlaybackInfo { public int volume; public int volumeMax; public int volumeHandling = MediaRouter.RouteInfo.PLAYBACK_VOLUME_FIXED; public int playbackStream = AudioManager.STREAM_MUSIC; public int playbackType = MediaRouter.R...
/** * Sets a callback to receive volume change requests from the remote control client. * * @param callback The volume callback to use or null if none. */
Sets a callback to receive volume change requests from the remote control client
setVolumeCallback
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "mediarouter/src/main/java/androidx/mediarouter/media/RemoteControlClientCompat.java", "license": "apache-2.0", "size": 7262 }
[ "android.media.AudioManager" ]
import android.media.AudioManager;
import android.media.*;
[ "android.media" ]
android.media;
1,463,567
protected synchronized void dispose() { this.users--; if (this.users == 0) { try { Client currentClient = this.client.get(); if (currentClient != null) { currentClient.close(); } } catch (Exception x) { ...
synchronized void function() { this.users--; if (this.users == 0) { try { Client currentClient = this.client.get(); if (currentClient != null) { currentClient.close(); } } catch (Exception x) { } } }
/** * Used by the pool to indicate a thread/user has stopped using the connection (and optionally * close the underlying client if there are no more users against it). */
Used by the pool to indicate a thread/user has stopped using the connection (and optionally close the underlying client if there are no more users against it)
dispose
{ "repo_name": "wolffcm/voltdb", "path": "src/frontend/org/voltdb/jdbc/JDBC4ClientConnection.java", "license": "agpl-3.0", "size": 18816 }
[ "org.voltdb.client.Client" ]
import org.voltdb.client.Client;
import org.voltdb.client.*;
[ "org.voltdb.client" ]
org.voltdb.client;
1,558,299
public Comparator<ObjectToCompare> platformComparator(weightType methodName) throws Exception { return comparator(ObjectToCompare.class, methodName); }
Comparator<ObjectToCompare> function(weightType methodName) throws Exception { return comparator(ObjectToCompare.class, methodName); }
/** * <p>This comparator can be used to order list of Object.</p> * <p>The sorted list is in descending order with null element in the end of the list.</p> * * @param methodName TabletOrderWeight, DesktopOrderWeight, UsableNetOrderWeight, MobileAppOrderWeight * @return ordered list by request p...
This comparator can be used to order list of Object. The sorted list is in descending order with null element in the end of the list
platformComparator
{ "repo_name": "irotech/KitchenSink", "path": "Java/Generics/maven-generics/src/main/java/com/gmail/at/irotech/generics/comparator/GenericWeightComparator.java", "license": "gpl-2.0", "size": 3342 }
[ "com.gmail.at.irotech.generics.model.ObjectToCompare", "java.util.Comparator" ]
import com.gmail.at.irotech.generics.model.ObjectToCompare; import java.util.Comparator;
import com.gmail.at.irotech.generics.model.*; import java.util.*;
[ "com.gmail.at", "java.util" ]
com.gmail.at; java.util;
55,555
@Deprecated public void setVertices(IVertex v1, IVertex v2) { this.v1 = Preconditions.checkNotNull(v1); this.v2 = Preconditions.checkNotNull(v2); }
void function(IVertex v1, IVertex v2) { this.v1 = Preconditions.checkNotNull(v1); this.v2 = Preconditions.checkNotNull(v2); }
/** * Sets the track vertices. The method exists primarily for debugging/testing purposes and should * not be used in the production. * * @param v1 * @param v2 */
Sets the track vertices. The method exists primarily for debugging/testing purposes and should not be used in the production
setVertices
{ "repo_name": "zyxist/opentrans", "path": "opentrans-visitons/src/main/java/org/invenzzia/opentrans/visitons/network/Track.java", "license": "gpl-3.0", "size": 11148 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
264,002
@Override void doWork(String... strings) throws TaskException { try{ String activeClass = strings[0]; String activeTeacher = strings[1]; ArrayList<String> subjectList = tryDatabaseQuery(activeClass, activeTeacher); if(subjectList == null) { new CheckTask(false).checkNetworkConnection(th...
void doWork(String... strings) throws TaskException { try{ String activeClass = strings[0]; String activeTeacher = strings[1]; ArrayList<String> subjectList = tryDatabaseQuery(activeClass, activeTeacher); if(subjectList == null) { new CheckTask(false).checkNetworkConnection(this.uiContext); subjectList = new GetDataFro...
/** * 1. Tries database query for the data.<br> * 2. When the query is not successful, the data is requested from the server * and saves it into the database<br> * 3. Displays the data in the list fragment. */
1. Tries database query for the data. 2. When the query is not successful, the data is requested from the server and saves it into the database 3. Displays the data in the list fragment
doWork
{ "repo_name": "satanko-com/AllGrade", "path": "MobileAllGrade/src/com/satanko/allgrade/task/LoadSubjectsForClassTask.java", "license": "mit", "size": 5460 }
[ "android.app.Activity", "android.support.v4.app.DialogFragment", "android.util.Log", "com.satanko.allgrade.view.dialog.SubjectChooserDialogFragment", "java.util.ArrayList" ]
import android.app.Activity; import android.support.v4.app.DialogFragment; import android.util.Log; import com.satanko.allgrade.view.dialog.SubjectChooserDialogFragment; import java.util.ArrayList;
import android.app.*; import android.support.v4.app.*; import android.util.*; import com.satanko.allgrade.view.dialog.*; import java.util.*;
[ "android.app", "android.support", "android.util", "com.satanko.allgrade", "java.util" ]
android.app; android.support; android.util; com.satanko.allgrade; java.util;
2,413,848
private void mergeInputIntoYaml(HashMap<String, TreeComposite> inputMap, HashMap<String, TreeComposite> yamlMap, TreeComposite yamlTree) { // Local declarations TreeComposite inputCur = null, yamlCur = null; TreeType treeType; String key; // Iterate through the the top-level trees of the input map f...
void function(HashMap<String, TreeComposite> inputMap, HashMap<String, TreeComposite> yamlMap, TreeComposite yamlTree) { TreeComposite inputCur = null, yamlCur = null; TreeType treeType; String key; for (TreeComposite tree : topLevelInputTrees) { key = tree.getName(); inputCur = inputMap.get(key); if (yamlMap.containsK...
/** * This utility method is responsible for merging the contents of a HashMap * of an imported MOOSE input data TreeComposite, into a HashMap of a YAML * TreeComposite, where both keys match. If a key match is not found, the * block in particular is discarded. * * Used exclusively by {@link #reviewEntries(...
This utility method is responsible for merging the contents of a HashMap of an imported MOOSE input data TreeComposite, into a HashMap of a YAML TreeComposite, where both keys match. If a key match is not found, the block in particular is discarded. Used exclusively by <code>#reviewEntries(Form) MOOSEModel.reviewEntrie...
mergeInputIntoYaml
{ "repo_name": "eclipse/ice", "path": "org.eclipse.ice.item/src/org/eclipse/ice/item/nuclear/MOOSEModel.java", "license": "epl-1.0", "size": 65609 }
[ "java.util.ArrayList", "java.util.HashMap", "org.eclipse.ice.datastructures.entry.IEntry", "org.eclipse.ice.datastructures.form.AdaptiveTreeComposite", "org.eclipse.ice.datastructures.form.DataComponent", "org.eclipse.ice.datastructures.form.TreeComposite" ]
import java.util.ArrayList; import java.util.HashMap; import org.eclipse.ice.datastructures.entry.IEntry; import org.eclipse.ice.datastructures.form.AdaptiveTreeComposite; import org.eclipse.ice.datastructures.form.DataComponent; import org.eclipse.ice.datastructures.form.TreeComposite;
import java.util.*; import org.eclipse.ice.datastructures.entry.*; import org.eclipse.ice.datastructures.form.*;
[ "java.util", "org.eclipse.ice" ]
java.util; org.eclipse.ice;
2,270,381
@Test public void test5d () { final MetaKey key1 = new MetaKey ( "mock", "5d1" ); final MetaKey key2 = new MetaKey ( "mock", "5d2" ); final MetaKey key3 = new MetaKey ( "mock", "5d3" ); this.mgr.registerModel ( 1, key1, new MockStorageProvider ( key1.getKey (), "foo" ) ); ...
void function () { final MetaKey key1 = new MetaKey ( "mock", "5d1" ); final MetaKey key2 = new MetaKey ( "mock", "5d2" ); final MetaKey key3 = new MetaKey ( "mock", "5d3" ); this.mgr.registerModel ( 1, key1, new MockStorageProvider ( key1.getKey (), "foo" ) ); this.mgr.registerModel ( 2, key2, new MockStorageProvider ...
/** * Lock three models in the correct lock order. Do it twice. */
Lock three models in the correct lock order. Do it twice
test5d
{ "repo_name": "ibh-systems/packagedrone", "path": "bundles/org.eclipse.packagedrone.storage.apm.tests/src/org/eclipse/packagedrone/storage/apm/BaseTest.java", "license": "epl-1.0", "size": 22077 }
[ "org.eclipse.packagedrone.repo.MetaKey" ]
import org.eclipse.packagedrone.repo.MetaKey;
import org.eclipse.packagedrone.repo.*;
[ "org.eclipse.packagedrone" ]
org.eclipse.packagedrone;
1,512,950
public static Transacts createTransactsForApiLevel(int apiLevel) { switch (apiLevel) { // TODO: Replace the appropriate statement below with an instantiation of the java // class created by the app under the TransactIds/ directory. This will allow the tester // to use the...
static Transacts function(int apiLevel) { switch (apiLevel) { case Build.VERSION_CODES.P: return new PTransacts(); case Build.VERSION_CODES.Q: return new QTransacts(); case Build.VERSION_CODES.R: return new RTransacts(); default: throw new IllegalArgumentException( STR + apiLevel + STR); } }
/** * Returns a new instance containing the appropriate transact ID mappings for the specified * {@code apiLevel} that can be used to invoke direct binder transacts. */
Returns a new instance containing the appropriate transact ID mappings for the specified apiLevel that can be used to invoke direct binder transacts
createTransactsForApiLevel
{ "repo_name": "android/security-certification-resources", "path": "niap-cc/Permissions/Tester/app/src/main/java/com/android/certifications/niap/permissions/utils/Transacts.java", "license": "apache-2.0", "size": 69832 }
[ "android.os.Build" ]
import android.os.Build;
import android.os.*;
[ "android.os" ]
android.os;
2,557,851
protected void migrateNotes(DocumentHeader documentHeader, PersistableBusinessObject businessObject) { final List<Note> notes = getNoteService().getByRemoteObjectId(documentHeader.getObjectId()); if (!CollectionUtils.isEmpty(notes)) { for (Note note : notes) { note.setRem...
void function(DocumentHeader documentHeader, PersistableBusinessObject businessObject) { final List<Note> notes = getNoteService().getByRemoteObjectId(documentHeader.getObjectId()); if (!CollectionUtils.isEmpty(notes)) { for (Note note : notes) { note.setRemoteObjectIdentifier(businessObject.getObjectId()); getNoteServ...
/** * Migrates any notes associated with the given document header to the given business object * * @param documentHeader the document header to migrate notes for * @param businessObject the business object to migrate notes to */
Migrates any notes associated with the given document header to the given business object
migrateNotes
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-cg/src/main/java/org/kuali/kfs/module/cg/batch/service/impl/MaintenanceDocumentNotesMigrationServiceImpl.java", "license": "agpl-3.0", "size": 7957 }
[ "java.util.List", "org.apache.commons.collections.CollectionUtils", "org.kuali.kfs.krad.bo.DocumentHeader", "org.kuali.kfs.krad.bo.Note", "org.kuali.kfs.krad.bo.PersistableBusinessObject" ]
import java.util.List; import org.apache.commons.collections.CollectionUtils; import org.kuali.kfs.krad.bo.DocumentHeader; import org.kuali.kfs.krad.bo.Note; import org.kuali.kfs.krad.bo.PersistableBusinessObject;
import java.util.*; import org.apache.commons.collections.*; import org.kuali.kfs.krad.bo.*;
[ "java.util", "org.apache.commons", "org.kuali.kfs" ]
java.util; org.apache.commons; org.kuali.kfs;
2,893,475
public List<Axis> getUserAxes() { List<Axis> r = new ArrayList<Axis>(); for (Axis a : axes) if(!a.isSystem()) r.add(a); return r; }
List<Axis> function() { List<Axis> r = new ArrayList<Axis>(); for (Axis a : axes) if(!a.isSystem()) r.add(a); return r; }
/** * Gets the subset of {@link AxisList} that are not system axes. * * @deprecated as of 1.373 * System vs user difference are generalized into extension point. */
Gets the subset of <code>AxisList</code> that are not system axes
getUserAxes
{ "repo_name": "ktan2020/jenkins-1.507", "path": "core/src/main/java/hudson/matrix/MatrixProject.java", "license": "mit", "size": 33306 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,683,523
private ES2Source source(ILCDSource iSource) { ES2Source eSource = new ES2Source(); ILCDSourceDescription iDescription = iSource.description; if (iDescription != null) { // source ID eSource.id = iDescription.uuid; // short name if (!iDescription.getShortName().isEmpty()) { LangString langS...
ES2Source function(ILCDSource iSource) { ES2Source eSource = new ES2Source(); ILCDSourceDescription iDescription = iSource.description; if (iDescription != null) { eSource.id = iDescription.uuid; if (!iDescription.getShortName().isEmpty()) { LangString langString = iDescription.getShortName().get(0); eSource.shortName ...
/** * Makes an EcoSpold 02 source from the given ILCD source data set. */
Makes an EcoSpold 02 source from the given ILCD source data set
source
{ "repo_name": "GreenDelta/olca-converter", "path": "src/main/java/org/openlca/olcatdb/conversion/ILCDToES2Conversion.java", "license": "mpl-2.0", "size": 38857 }
[ "org.openlca.olcatdb.datatypes.LangString", "org.openlca.olcatdb.ecospold2.masterdata.ES2Source", "org.openlca.olcatdb.ilcd.ILCDSource", "org.openlca.olcatdb.ilcd.ILCDSourceDescription" ]
import org.openlca.olcatdb.datatypes.LangString; import org.openlca.olcatdb.ecospold2.masterdata.ES2Source; import org.openlca.olcatdb.ilcd.ILCDSource; import org.openlca.olcatdb.ilcd.ILCDSourceDescription;
import org.openlca.olcatdb.datatypes.*; import org.openlca.olcatdb.ecospold2.masterdata.*; import org.openlca.olcatdb.ilcd.*;
[ "org.openlca.olcatdb" ]
org.openlca.olcatdb;
1,504,950
@Internal @Nullable public File getDestinationDir() { return destinationDir; }
File function() { return destinationDir; }
/** * <p>Returns the directory to generate the documentation into.</p> * * @return The directory. */
Returns the directory to generate the documentation into
getDestinationDir
{ "repo_name": "lsmaira/gradle", "path": "subprojects/language-java/src/main/java/org/gradle/api/tasks/javadoc/Javadoc.java", "license": "apache-2.0", "size": 10566 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
157,605
public void setUser(User user) { this.user = user; }
void function(User user) { this.user = user; }
/** * Set the user to scan as. If null then the current session will be used. * * @param user */
Set the user to scan as. If null then the current session will be used
setUser
{ "repo_name": "gmaran23/zaproxy", "path": "zap/src/main/java/org/parosproxy/paros/core/scanner/Scanner.java", "license": "apache-2.0", "size": 20812 }
[ "org.zaproxy.zap.users.User" ]
import org.zaproxy.zap.users.User;
import org.zaproxy.zap.users.*;
[ "org.zaproxy.zap" ]
org.zaproxy.zap;
2,281,069
public void setNamedDestination( String dest ) throws IOException { if( dest == null ) { namedDestination = null; } else { namedDestination = new COSString( dest ); } }
void function( String dest ) throws IOException { if( dest == null ) { namedDestination = null; } else { namedDestination = new COSString( dest ); } }
/** * Set the named destination. * * @param dest The new named destination. * * @throws IOException If there is an error setting the named destination. */
Set the named destination
setNamedDestination
{ "repo_name": "TomRoush/PdfBox-Android", "path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/interactive/documentnavigation/destination/PDNamedDestination.java", "license": "apache-2.0", "size": 3086 }
[ "com.tom_roush.pdfbox.cos.COSString", "java.io.IOException" ]
import com.tom_roush.pdfbox.cos.COSString; import java.io.IOException;
import com.tom_roush.pdfbox.cos.*; import java.io.*;
[ "com.tom_roush.pdfbox", "java.io" ]
com.tom_roush.pdfbox; java.io;
2,537,037
public Collection<Method> getAllMethods(String name, int paramCount) { final Map<ParamList, Map<Class<?>, Method>> nameMap = methods.get(name); if (nameMap == null) { return Collections.emptySet(); } final Collection<Method> methods = new ArrayList<Method>(); for ...
Collection<Method> function(String name, int paramCount) { final Map<ParamList, Map<Class<?>, Method>> nameMap = methods.get(name); if (nameMap == null) { return Collections.emptySet(); } final Collection<Method> methods = new ArrayList<Method>(); for (Map<Class<?>, Method> map : nameMap.values()) { for (Method method ...
/** * Get a collection of methods declared on this object by method name and parameter count. * * @param name the name of the method * @param paramCount the number of parameters * @return the (possibly empty) collection of methods with the given name and parameter count */
Get a collection of methods declared on this object by method name and parameter count
getAllMethods
{ "repo_name": "JiriOndrusek/wildfly-core", "path": "server/src/main/java/org/jboss/as/server/deployment/reflect/ClassReflectionIndex.java", "license": "lgpl-2.1", "size": 19621 }
[ "java.lang.reflect.Method", "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.Map" ]
import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Map;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
197,456
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String method = request.getParameter("method"); if("findName".equals(method)) { String name = request.getParameter("username"); UserService userService=new UserService(); boolean b = ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String method = request.getParameter(STR); if(STR.equals(method)) { String name = request.getParameter(STR); UserService userService=new UserService(); boolean b = userService.findUser(name); if(b) { response....
/** * The doPost method of the servlet. <br> * * This method is called when a form has its tag value method equals to post. * * @param request the request send by the client to the server * @param response the response send by the server to the client * @throws ServletException if an error occurred * @...
The doPost method of the servlet. This method is called when a form has its tag value method equals to post
doPost
{ "repo_name": "onlysoft/smarthouseServer", "path": "SmartHouseServer/src/cn/onlysoft/smarthouseweb/web/servlet/RegisterServlet.java", "license": "apache-2.0", "size": 2687 }
[ "cn.onlysoft.smarthouseweb.db.service.UserService", "cn.onlysoft.smarthouseweb.domain.User", "cn.onlysoft.smarthouseweb.utils.Md5Utils", "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import cn.onlysoft.smarthouseweb.db.service.UserService; import cn.onlysoft.smarthouseweb.domain.User; import cn.onlysoft.smarthouseweb.utils.Md5Utils; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import cn.onlysoft.smarthouseweb.db.service.*; import cn.onlysoft.smarthouseweb.domain.*; import cn.onlysoft.smarthouseweb.utils.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "cn.onlysoft.smarthouseweb", "java.io", "javax.servlet" ]
cn.onlysoft.smarthouseweb; java.io; javax.servlet;
1,133,334
public NextHopResultInner beginGetNextHop(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { return beginGetNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); }
NextHopResultInner function(String resourceGroupName, String networkWatcherName, NextHopParameters parameters) { return beginGetNextHopWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); }
/** * Gets the next hop from the specified VM. * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. * @param parameters Parameters that define the source and destination endpoint. * @throws IllegalArgumentException thrown...
Gets the next hop from the specified VM
beginGetNextHop
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/implementation/NetworkWatchersInner.java", "license": "mit", "size": 190989 }
[ "com.microsoft.azure.management.network.v2020_04_01.NextHopParameters" ]
import com.microsoft.azure.management.network.v2020_04_01.NextHopParameters;
import com.microsoft.azure.management.network.v2020_04_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,805,332
@Test public void consultationColleague() { assertEquals("An engineer Max consults a colleague Jack", EngineerTest.engineer.consultationColleague(EngineerTest.colleague)); }
void function() { assertEquals(STR, EngineerTest.engineer.consultationColleague(EngineerTest.colleague)); }
/** * Testing a consultation method. */
Testing a consultation method
consultationColleague
{ "repo_name": "OleksandrProshak/Alexandr_Proshak", "path": "Level_Trainee/Part_002_OOP/1_Classes/src/test/java/ru/job4j/task1/EngineerTest.java", "license": "apache-2.0", "size": 2879 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,769,246
public static Vector toVector(ICoords3D coords, Vector output) { PreCon.notNull(coords); PreCon.notNull(output); output.setX(coords.getX()); output.setY(coords.getY()); output.setZ(coords.getZ()); return output; }
static Vector function(ICoords3D coords, Vector output) { PreCon.notNull(coords); PreCon.notNull(output); output.setX(coords.getX()); output.setY(coords.getY()); output.setZ(coords.getZ()); return output; }
/** * Copy coordinate values into an output {@link org.bukkit.util.Vector}. * * @param coords The coordinates to convert. * @param output The output {@link org.bukkit.util.Vector}. * * @return The output location. */
Copy coordinate values into an output <code>org.bukkit.util.Vector</code>
toVector
{ "repo_name": "JCThePants/NucleusFramework", "path": "src/com/jcwhatever/nucleus/utils/coords/Coords3D.java", "license": "mit", "size": 15269 }
[ "com.jcwhatever.nucleus.utils.PreCon", "org.bukkit.util.Vector" ]
import com.jcwhatever.nucleus.utils.PreCon; import org.bukkit.util.Vector;
import com.jcwhatever.nucleus.utils.*; import org.bukkit.util.*;
[ "com.jcwhatever.nucleus", "org.bukkit.util" ]
com.jcwhatever.nucleus; org.bukkit.util;
513,772
public Collection<ControllerNode> getNodes() { return this.nodes; }
Collection<ControllerNode> function() { return this.nodes; }
/** * Returns the collection of {@link org.onosproject.cluster.ControllerNode nodes} that make up the cluster. * @return cluster nodes */
Returns the collection of <code>org.onosproject.cluster.ControllerNode nodes</code> that make up the cluster
getNodes
{ "repo_name": "planoAccess/clonedONOS", "path": "core/api/src/main/java/org/onosproject/cluster/ClusterMetadata.java", "license": "apache-2.0", "size": 6393 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
166,651
public void shear(double shearX, double shearY) { Transform swtTransform = new Transform(this.gc.getDevice()); this.gc.getTransform(swtTransform); Transform shear = new Transform(this.gc.getDevice(), 1f, (float) shearX, (float) shearY, 1f, 0, 0); swtTransform.multiply...
void function(double shearX, double shearY) { Transform swtTransform = new Transform(this.gc.getDevice()); this.gc.getTransform(swtTransform); Transform shear = new Transform(this.gc.getDevice(), 1f, (float) shearX, (float) shearY, 1f, 0, 0); swtTransform.multiply(shear); this.gc.setTransform(swtTransform); swtTransfor...
/** * Applies a shear transform. * * @param shearX the x-factor. * @param shearY the y-factor. */
Applies a shear transform
shear
{ "repo_name": "int32at/sweaty", "path": "src/src/at/int32/sweaty/ui/utils/SWTGraphics2D.java", "license": "mit", "size": 43576 }
[ "org.eclipse.swt.graphics.Transform" ]
import org.eclipse.swt.graphics.Transform;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,219,573
@Test public void testGetLinkStateId() throws Exception { lsrPacket.setLinkStateId("1.1.1.1"); assertThat(lsrPacket.linkStateId(), is("1.1.1.1")); }
void function() throws Exception { lsrPacket.setLinkStateId(STR); assertThat(lsrPacket.linkStateId(), is(STR)); }
/** * Tests linkStateId() getter method. */
Tests linkStateId() getter method
testGetLinkStateId
{ "repo_name": "sonu283304/onos", "path": "protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/ospfpacket/subtype/LsRequestPacketTest.java", "license": "apache-2.0", "size": 3142 }
[ "org.hamcrest.CoreMatchers", "org.hamcrest.MatcherAssert" ]
import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
237,151
EAttribute getYear_StartingDate();
EAttribute getYear_StartingDate();
/** * Returns the meta object for the attribute '{@link school.Year#getStartingDate <em>Starting Date</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Starting Date</em>'. * @see school.Year#getStartingDate() * @see #getYear() * @generated */
Returns the meta object for the attribute '<code>school.Year#getStartingDate Starting Date</code>'.
getYear_StartingDate
{ "repo_name": "tht-krisztian/EMF-IncQuery-Examples", "path": "school/school/src/school/SchoolPackage.java", "license": "epl-1.0", "size": 34721 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
139,484
// 进行映射的转换 // RecordAccumulator记录了Topicparition-》ProducerBatch的映射 转换成 NodeId -ProducerBatch集合的映射 // 面向层级不一样,生产者只需要将消息发送到topic,不需要关心node // 网络io方面,生产者是面向Node节点发送消息得数据 // 在sender线程中,每次向Node节点至多发送一个ClientRequest请求,其中封装了到此Node节点上多个分区的消息 public Map<Integer, List<ProducerBatch>> drain(Cluster cluster...
Map<Integer, List<ProducerBatch>> function(Cluster cluster, Set<Node> nodes, int maxSize, long now) { if (nodes.isEmpty()) return Collections.emptyMap(); Map<Integer, List<ProducerBatch>> batches = new HashMap<>(); for (Node node : nodes) { int size = 0; List<PartitionInfo> parts = cluster.partitionsForNode(node.id());...
/** * Drain all the data for the given nodes and collate them into a list of batches that will fit within the specified * size on a per-node basis. This method attempts to avoid choosing the same topic-node over and over. * * @param cluster The current cluster metadata * @param nodes The list o...
Drain all the data for the given nodes and collate them into a list of batches that will fit within the specified size on a per-node basis. This method attempts to avoid choosing the same topic-node over and over
drain
{ "repo_name": "YMCoding/kafka-0.11.0.0-src-with-comment", "path": "clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java", "license": "apache-2.0", "size": 36304 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.Deque", "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Set", "org.apache.kafka.common.Cluster", "org.apache.kafka.common.Node", "org.apache.kafka.common.PartitionInfo", "org.apache.kafka.common.TopicPartition" ]
import java.util.ArrayList; import java.util.Collections; import java.util.Deque; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.kafka.common.Cluster; import org.apache.kafka.common.Node; import org.apache.kafka.common.PartitionInfo; import org.apache.kafk...
import java.util.*; import org.apache.kafka.common.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
1,869,810
private void finishServerSocket(SSLServerSocket serverSocket) { configureServerSocket(coreSocketCreator.getSslConfig(), serverSocket); }
void function(SSLServerSocket serverSocket) { configureServerSocket(coreSocketCreator.getSslConfig(), serverSocket); }
/** * Configure the SSLServerSocket based on this SocketCreator's settings. */
Configure the SSLServerSocket based on this SocketCreator's settings
finishServerSocket
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/net/SCClusterSocketCreator.java", "license": "apache-2.0", "size": 4271 }
[ "javax.net.ssl.SSLServerSocket" ]
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
2,452,002
private void initView() { iv_back = (ImageView) findViewById(R.id.ivBack); tv_VersionCode = (TextView) findViewById(R.id.versionCode); }
void function() { iv_back = (ImageView) findViewById(R.id.ivBack); tv_VersionCode = (TextView) findViewById(R.id.versionCode); }
/** * Inits the view. */
Inits the view
initView
{ "repo_name": "gizwits/Gizwits-WaterHeater_Android", "path": "src/com/gizwits/framework/widget/AboutVersionActivity.java", "license": "mit", "size": 1264 }
[ "android.widget.ImageView", "android.widget.TextView" ]
import android.widget.ImageView; import android.widget.TextView;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,866,747
public static void sendEvent(String category, String action, String label, long value, HitBuilders.EventBuilder eventBuilder) { if(isInitialized()) { mTracker.send(eventBuilder .setCategory(category) .setAction(action) ...
static void function(String category, String action, String label, long value, HitBuilders.EventBuilder eventBuilder) { if(isInitialized()) { mTracker.send(eventBuilder .setCategory(category) .setAction(action) .setLabel(label) .setValue(value) .build()); LOGD(TAG, STR + STR + category + STR + action + STR + label + ST...
/** * Log a specific event under the {@code category}, {@code action}, and {@code label}. */
Log a specific event under the category, action, and label
sendEvent
{ "repo_name": "epiphany27/iosched", "path": "android/src/main/java/com/google/samples/apps/iosched/util/AnalyticsHelper.java", "license": "apache-2.0", "size": 14357 }
[ "com.google.android.gms.analytics.HitBuilders" ]
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.*;
[ "com.google.android" ]
com.google.android;
233,177
public static DefaultMutableTreeNode getAutoPlaylistPropertyTreeModel() { DefaultMutableTreeNode root = getPlaylistPropertyTreeModel(); // add the auto playlist nodes DefaultMutableTreeNode filter = new DefaultMutableTreeNode(GuiUtils.getStringLocalized( "filter")); DefaultMutableTreeNode artist = new Def...
static DefaultMutableTreeNode function() { DefaultMutableTreeNode root = getPlaylistPropertyTreeModel(); DefaultMutableTreeNode filter = new DefaultMutableTreeNode(GuiUtils.getStringLocalized( STR)); DefaultMutableTreeNode artist = new DefaultMutableTreeNode(GuiUtils.getStringLocalized( STR)); DefaultMutableTreeNode ge...
/** Gets the tree model for autoplaylist filter properties. * * @return tree model to be used in the property dialog */
Gets the tree model for autoplaylist filter properties
getAutoPlaylistPropertyTreeModel
{ "repo_name": "knocte/getittogether", "path": "src/de/axelwernicke/mypod/gui/GuiUtils.java", "license": "gpl-2.0", "size": 21505 }
[ "javax.swing.tree.DefaultMutableTreeNode" ]
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.*;
[ "javax.swing" ]
javax.swing;
1,042,112
private static Bitmap overlayChildBadgeOnUserPicture( Bitmap userPicture, Bitmap badge, Resources resources) { assert userPicture.getWidth() == resources.getDimensionPixelSize(R.dimen.user_picture_size); int borderSize = resources.getDimensionPixelOffset(R.dimen.badge_border_size); ...
static Bitmap function( Bitmap userPicture, Bitmap badge, Resources resources) { assert userPicture.getWidth() == resources.getDimensionPixelSize(R.dimen.user_picture_size); int borderSize = resources.getDimensionPixelOffset(R.dimen.badge_border_size); int badgeRadius = resources.getDimensionPixelOffset(R.dimen.badge_r...
/** * Creates a new image with the picture overlaid by the badge. * @param userPicture A bitmap to overlay on. * @param badge A bitmap to overlay with. * @return A bitmap with the badge overlaying the {@code userPicture}. */
Creates a new image with the picture overlaid by the badge
overlayChildBadgeOnUserPicture
{ "repo_name": "axinging/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java", "license": "bsd-3-clause", "size": 30455 }
[ "android.content.res.Resources", "android.graphics.Bitmap", "android.graphics.Canvas", "android.graphics.Paint", "android.graphics.PorterDuff", "android.graphics.PorterDuffXfermode" ]
import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode;
import android.content.res.*; import android.graphics.*;
[ "android.content", "android.graphics" ]
android.content; android.graphics;
1,982,300
@Override protected void paintClientArea(Graphics graphics) { if (View.isDrawingOK()) { double myScale = getScale(); // Scale factor is actual size, so no need to scale if (myScale == 1.0) { super.paintClientArea(graphics); paintTe...
void function(Graphics graphics) { if (View.isDrawingOK()) { double myScale = getScale(); if (myScale == 1.0) { super.paintClientArea(graphics); paintTempFigure(graphics); } else if (OSUtils.MACOSX) { ScaledGraphics g = new ScaledGraphics(graphics); if ((getBorder() != null) && ! getBorder().isOpaque()) { g.clipRect(ge...
/** * Draw the figure to the screen. If the scale is not 1.0, then resize it * using a scaled graphics object. * * Checks with the AView to determine if it should actually draw. */
Draw the figure to the screen. If the scale is not 1.0, then resize it using a scaled graphics object. Checks with the AView to determine if it should actually draw
paintClientArea
{ "repo_name": "cogtool/cogtool", "path": "java/edu/cmu/cs/hcii/cogtool/view/ScalableFrameFigure.java", "license": "lgpl-2.1", "size": 12350 }
[ "edu.cmu.cs.hcii.cogtool.util.OSUtils", "org.eclipse.draw2d.Graphics", "org.eclipse.draw2d.ScaledGraphics" ]
import edu.cmu.cs.hcii.cogtool.util.OSUtils; import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.ScaledGraphics;
import edu.cmu.cs.hcii.cogtool.util.*; import org.eclipse.draw2d.*;
[ "edu.cmu.cs", "org.eclipse.draw2d" ]
edu.cmu.cs; org.eclipse.draw2d;
2,380,989
void preConnect(ConnectionFactory<S> connectionFactory, MultiValueMap<String, String> parameters, WebRequest request);
void preConnect(ConnectionFactory<S> connectionFactory, MultiValueMap<String, String> parameters, WebRequest request);
/** * Called during connection initiation, immediately before user authorization. * May be used to store custom connection attributes in the session before redirecting the user to the provider's site or to contribute parameters to the authorization URL. * @param connectionFactory the connection factory in play fo...
Called during connection initiation, immediately before user authorization. May be used to store custom connection attributes in the session before redirecting the user to the provider's site or to contribute parameters to the authorization URL
preConnect
{ "repo_name": "spring-projects/spring-social", "path": "spring-social-web/src/main/java/org/springframework/social/connect/web/ConnectInterceptor.java", "license": "apache-2.0", "size": 2116 }
[ "org.springframework.social.connect.ConnectionFactory", "org.springframework.util.MultiValueMap", "org.springframework.web.context.request.WebRequest" ]
import org.springframework.social.connect.ConnectionFactory; import org.springframework.util.MultiValueMap; import org.springframework.web.context.request.WebRequest;
import org.springframework.social.connect.*; import org.springframework.util.*; import org.springframework.web.context.request.*;
[ "org.springframework.social", "org.springframework.util", "org.springframework.web" ]
org.springframework.social; org.springframework.util; org.springframework.web;
1,375,282
public int getSymmetricAlgorithm( PBEDataDecryptorFactory dataDecryptorFactory) throws PGPException { byte[] key = dataDecryptorFactory.makeKeyFromPassPhrase(keyData.getEncAlgorithm(), keyData.getS2K()); byte[] sessionData = dataDecryptorFactory.recoverSessionData(key...
int function( PBEDataDecryptorFactory dataDecryptorFactory) throws PGPException { byte[] key = dataDecryptorFactory.makeKeyFromPassPhrase(keyData.getEncAlgorithm(), keyData.getS2K()); byte[] sessionData = dataDecryptorFactory.recoverSessionData(keyData.getEncAlgorithm(), key, keyData.getSecKeyData()); return sessionDat...
/** * Return the symmetric key algorithm required to decrypt the data protected by this object. * * @param dataDecryptorFactory decryptor factory to use to recover the session data. * @return the identifier of the {@link SymmetricKeyAlgorithmTags encryption algorithm} used to * encrypt ...
Return the symmetric key algorithm required to decrypt the data protected by this object
getSymmetricAlgorithm
{ "repo_name": "Skywalker-11/spongycastle", "path": "pg/src/main/java/org/spongycastle/openpgp/PGPPBEEncryptedData.java", "license": "mit", "size": 5288 }
[ "org.spongycastle.openpgp.operator.PBEDataDecryptorFactory" ]
import org.spongycastle.openpgp.operator.PBEDataDecryptorFactory;
import org.spongycastle.openpgp.operator.*;
[ "org.spongycastle.openpgp" ]
org.spongycastle.openpgp;
1,213,342
public List<Table> getTables() { return tables; }
List<Table> function() { return tables; }
/** * Gets the tables. * * @return the tables */
Gets the tables
getTables
{ "repo_name": "alexript/balas", "path": "src/net/autosauler/ballance/shared/Description.java", "license": "apache-2.0", "size": 3269 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,339,625
protected void setIconActions(CmsListColumnDefinition iconCol) { // add resource icon action CmsListDirectAction resourceIconAction = new CmsDependencyIconAction( LIST_ACTION_ICON, CmsDependencyIconActionType.RESOURCE, getCms()); resourceIconAction.setNam...
void function(CmsListColumnDefinition iconCol) { CmsListDirectAction resourceIconAction = new CmsDependencyIconAction( LIST_ACTION_ICON, CmsDependencyIconActionType.RESOURCE, getCms()); resourceIconAction.setName(Messages.get().container(Messages.GUI_GROUP_DEPENDENCIES_LIST_ACTION_RES_NAME_0)); resourceIconAction.setHe...
/** * Sets the right icon actions for the dialog.<p> * * @param iconCol the column to set the actions */
Sets the right icon actions for the dialog
setIconActions
{ "repo_name": "serrapos/opencms-core", "path": "src-modules/org/opencms/workplace/tools/accounts/CmsGroupPrincipalDependenciesList.java", "license": "lgpl-2.1", "size": 14857 }
[ "org.opencms.workplace.list.CmsListColumnDefinition", "org.opencms.workplace.list.CmsListDirectAction" ]
import org.opencms.workplace.list.CmsListColumnDefinition; import org.opencms.workplace.list.CmsListDirectAction;
import org.opencms.workplace.list.*;
[ "org.opencms.workplace" ]
org.opencms.workplace;
161,851
private AccountManagerFuture<Bundle> getAccountManagerResult(Activity activity, GoogleCredential credential, String authTokenType, String accountName) { AccountManagerFuture<Bundle> future = null; GoogleAccountManager accountManager = new GoogleAccountManager(activity); // Force th...
AccountManagerFuture<Bundle> function(Activity activity, GoogleCredential credential, String authTokenType, String accountName) { AccountManagerFuture<Bundle> future = null; GoogleAccountManager accountManager = new GoogleAccountManager(activity); accountManager.invalidateAuthToken(credential.getAccessToken()); Account...
/** * An AccountManagerFuture represents the result of an asynchronous AccountManager call. * The result can only be retrieved using method get when the call has completed, * blocking if necessary until it is ready. * * @param activity * @param credential * @param authTokenType * @return a Bu...
An AccountManagerFuture represents the result of an asynchronous AccountManager call. The result can only be retrieved using method get when the call has completed, blocking if necessary until it is ready
getAccountManagerResult
{ "repo_name": "mit-cml/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/util/OAuth2Helper.java", "license": "apache-2.0", "size": 8782 }
[ "android.accounts.Account", "android.accounts.AccountManager", "android.accounts.AccountManagerFuture", "android.app.Activity", "android.os.Bundle", "android.util.Log", "com.google.api.client.googleapis.auth.oauth2.GoogleCredential", "com.google.api.client.googleapis.extensions.android2.auth.GoogleAcc...
import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.AccountManagerFuture; import android.app.Activity; import android.os.Bundle; import android.util.Log; import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.client.googleapis.extensions....
import android.accounts.*; import android.app.*; import android.os.*; import android.util.*; import com.google.api.client.googleapis.auth.oauth2.*; import com.google.api.client.googleapis.extensions.android2.auth.*;
[ "android.accounts", "android.app", "android.os", "android.util", "com.google.api" ]
android.accounts; android.app; android.os; android.util; com.google.api;
1,991,729
super.onCreate(savedInstanceState); setContentView(R.layout.activity_counter); setupActionBar(); Intent intent = getIntent(); counterModel = (CounterModel) intent.getSerializableExtra(CounterListActivity.EXTRA_MESSAGE); counterNameTextView = (TextView) findViewById(R.id.counterName); currentCountTextVie...
super.onCreate(savedInstanceState); setContentView(R.layout.activity_counter); setupActionBar(); Intent intent = getIntent(); counterModel = (CounterModel) intent.getSerializableExtra(CounterListActivity.EXTRA_MESSAGE); counterNameTextView = (TextView) findViewById(R.id.counterName); currentCountTextView = (TextView) f...
/** * Creates an instance of this activity. Receives an intent * from the previous activity, which contains the counterModel * object which will be modified in this activity. */
Creates an instance of this activity. Receives an intent from the previous activity, which contains the counterModel object which will be modified in this activity
onCreate
{ "repo_name": "bradleyjsimons/CounterApp", "path": "src/ca/ualberta/ca/simons_counter/CounterActivity.java", "license": "apache-2.0", "size": 5996 }
[ "android.content.Intent", "android.widget.TextView" ]
import android.content.Intent; import android.widget.TextView;
import android.content.*; import android.widget.*;
[ "android.content", "android.widget" ]
android.content; android.widget;
1,890,224
public static TypeEntry decompile(InputStream input, Language lang, SourceSet.Loader loader) throws IOException { SourceSet source = new SourceSet(); source.setLoader(loader); return decompile(input, source, lang); }
static TypeEntry function(InputStream input, Language lang, SourceSet.Loader loader) throws IOException { SourceSet source = new SourceSet(); source.setLoader(loader); return decompile(input, source, lang); }
/** * Decompiles the given {@link InputStream} with the given language and * loader for additional types. */
Decompiles the given <code>InputStream</code> with the given language and loader for additional types
decompile
{ "repo_name": "Despector/Despector", "path": "src/main/java/org/spongepowered/despector/Despector.java", "license": "mit", "size": 12320 }
[ "java.io.IOException", "java.io.InputStream", "org.spongepowered.despector.ast.SourceSet", "org.spongepowered.despector.ast.type.TypeEntry" ]
import java.io.IOException; import java.io.InputStream; import org.spongepowered.despector.ast.SourceSet; import org.spongepowered.despector.ast.type.TypeEntry;
import java.io.*; import org.spongepowered.despector.ast.*; import org.spongepowered.despector.ast.type.*;
[ "java.io", "org.spongepowered.despector" ]
java.io; org.spongepowered.despector;
1,656,006
@Override public void renderOpt(@NonNull NodeContainer node, @Nullable X object) throws Exception { contentRenderer.renderOpt(node, object); //, instance); } }; }
void function(@NonNull NodeContainer node, @Nullable X object) throws Exception { contentRenderer.renderOpt(node, object); } }; }
/** * Wrap the renderer, so we can pass the "instance" to it. */
Wrap the renderer, so we can pass the "instance" to it
renderOpt
{ "repo_name": "fjalvingh/domui", "path": "to.etc.domui/src/main/java/to/etc/domui/component/tbl/RowRenderer.java", "license": "lgpl-2.1", "size": 30814 }
[ "org.eclipse.jdt.annotation.NonNull", "org.eclipse.jdt.annotation.Nullable", "to.etc.domui.dom.html.NodeContainer" ]
import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import to.etc.domui.dom.html.NodeContainer;
import org.eclipse.jdt.annotation.*; import to.etc.domui.dom.html.*;
[ "org.eclipse.jdt", "to.etc.domui" ]
org.eclipse.jdt; to.etc.domui;
905,770
public boolean removeTrigger(TriggerKey triggerKey) { return removeTrigger(triggerKey, true); }
boolean function(TriggerKey triggerKey) { return removeTrigger(triggerKey, true); }
/** * <p> * Remove (delete) the <code>{@link org.quartz.Trigger}</code> with the * given name. * </p> * * @return <code>true</code> if a <code>Trigger</code> with the given * name & group was found and removed from the store. */
Remove (delete) the <code><code>org.quartz.Trigger</code></code> with the given name.
removeTrigger
{ "repo_name": "dumptruckman/MC-Server-GUI--multi-", "path": "lib/quartz-2.0.1/quartz/src/main/java/org/quartz/simpl/RAMJobStore.java", "license": "gpl-2.0", "size": 58913 }
[ "org.quartz.TriggerKey" ]
import org.quartz.TriggerKey;
import org.quartz.*;
[ "org.quartz" ]
org.quartz;
2,599,270
public DateTime endedOn() { return this.endedOn; }
DateTime function() { return this.endedOn; }
/** * Get migration end time. * * @return the endedOn value */
Get migration end time
endedOn
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/datamigration/mgmt-v2018_03_31_preview/src/main/java/com/microsoft/azure/management/datamigration/v2018_03_31_preview/MigrateSqlServerSqlDbTaskOutputDatabaseLevel.java", "license": "mit", "size": 6418 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
820,714
public Map<String, DeviceInformation> deviceInformationMapForPointToPoint() { return deviceInformationMapForPointToPoint; }
Map<String, DeviceInformation> function() { return deviceInformationMapForPointToPoint; }
/** * Gets deviceInformation as map for Point-To-Point. * * @return deviceInformationMap */
Gets deviceInformation as map for Point-To-Point
deviceInformationMapForPointToPoint
{ "repo_name": "sdnwiselab/onos", "path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java", "license": "apache-2.0", "size": 29530 }
[ "java.util.Map", "org.onosproject.ospf.controller.DeviceInformation" ]
import java.util.Map; import org.onosproject.ospf.controller.DeviceInformation;
import java.util.*; import org.onosproject.ospf.controller.*;
[ "java.util", "org.onosproject.ospf" ]
java.util; org.onosproject.ospf;
2,168,024
public void endProperties(NodeRef nodeRef);
void function(NodeRef nodeRef);
/** * End export of properties * * @param nodeRef the node reference */
End export of properties
endProperties
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/service/cmr/view/Exporter.java", "license": "lgpl-3.0", "size": 6886 }
[ "org.alfresco.service.cmr.repository.NodeRef" ]
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.service" ]
org.alfresco.service;
788,447
public ExtensionResultStatusType postProcessDeepLinks(List<DeepLink> links);
ExtensionResultStatusType function(List<DeepLink> links);
/** * Provides a hook point to allow extension handlers to modify the generated deep links. * * @param links * @return ExtensionResultStatusType */
Provides a hook point to allow extension handlers to modify the generated deep links
postProcessDeepLinks
{ "repo_name": "akdasari/SparkAdmin", "path": "spark-contentmanagement-module/src/main/java/org/sparkcommerce/cms/web/processor/ContentProcessorExtensionHandler.java", "license": "apache-2.0", "size": 2219 }
[ "java.util.List", "org.sparkcommerce.common.extension.ExtensionResultStatusType", "org.sparkcommerce.common.web.deeplink.DeepLink" ]
import java.util.List; import org.sparkcommerce.common.extension.ExtensionResultStatusType; import org.sparkcommerce.common.web.deeplink.DeepLink;
import java.util.*; import org.sparkcommerce.common.extension.*; import org.sparkcommerce.common.web.deeplink.*;
[ "java.util", "org.sparkcommerce.common" ]
java.util; org.sparkcommerce.common;
1,459,429
public static void close(FileChannel channel, String name, Logger log, boolean force) { if (force) { force(channel, name, log); } close(channel, name, log); }
static void function(FileChannel channel, String name, Logger log, boolean force) { if (force) { force(channel, name, log); } close(channel, name, log); }
/** * Closes the given channel if it is available, logging any closing exceptions to the given log. * The file's channel can optionally be forced to disk. * * @param channel the file channel * @param name the name of the resource * @param log the log to use when reporting warnings, will us...
Closes the given channel if it is available, logging any closing exceptions to the given log. The file's channel can optionally be forced to disk
close
{ "repo_name": "curso007/camel", "path": "camel-core/src/main/java/org/apache/camel/util/IOHelper.java", "license": "apache-2.0", "size": 19689 }
[ "java.nio.channels.FileChannel", "org.slf4j.Logger" ]
import java.nio.channels.FileChannel; import org.slf4j.Logger;
import java.nio.channels.*; import org.slf4j.*;
[ "java.nio", "org.slf4j" ]
java.nio; org.slf4j;
299,124
public EffectiveNetworkSecurityGroup withNetworkSecurityGroup(SubResource networkSecurityGroup) { this.networkSecurityGroup = networkSecurityGroup; return this; }
EffectiveNetworkSecurityGroup function(SubResource networkSecurityGroup) { this.networkSecurityGroup = networkSecurityGroup; return this; }
/** * Set the ID of network security group that is applied. * * @param networkSecurityGroup the networkSecurityGroup value to set * @return the EffectiveNetworkSecurityGroup object itself. */
Set the ID of network security group that is applied
withNetworkSecurityGroup
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/EffectiveNetworkSecurityGroup.java", "license": "mit", "size": 3653 }
[ "com.microsoft.azure.SubResource" ]
import com.microsoft.azure.SubResource;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,052,076
public void assertContainsSubsequence(AssertionInfo info, float[] actual, float[] subsequence) { arrays.assertContainsSubsequence(info, failures, actual, subsequence); }
void function(AssertionInfo info, float[] actual, float[] subsequence) { arrays.assertContainsSubsequence(info, failures, actual, subsequence); }
/** * Verifies that the given array contains the given subsequence of values (possibly with other values between them). * * @param info contains information about the assertion. * @param actual the given array. * @param subsequence the subsequence of values to look for. * @throws AssertionError if th...
Verifies that the given array contains the given subsequence of values (possibly with other values between them)
assertContainsSubsequence
{ "repo_name": "dorzey/assertj-core", "path": "src/main/java/org/assertj/core/internal/FloatArrays.java", "license": "apache-2.0", "size": 14381 }
[ "org.assertj.core.api.AssertionInfo" ]
import org.assertj.core.api.AssertionInfo;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
829,485
@Override public void onAttach(Activity activity) { super.onAttach(activity); try { mDailyForecastListListener = (DailyForecastListListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + ...
void function(Activity activity) { super.onAttach(activity); try { mDailyForecastListListener = (DailyForecastListListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + STR); } Bundle arguments = getArguments(); mNum = arguments != null ? arguments.getInt(PAGE_NUMBER) : ...
/** * Called when a fragment is first attached to its activity. * {@link #onCreate(Bundle)} will be called after this. * * @param activity */
Called when a fragment is first attached to its activity. <code>#onCreate(Bundle)</code> will be called after this
onAttach
{ "repo_name": "thsaraiva/Sunshine", "path": "app/src/main/java/com/example/android/sunshine/app/View/CityForecastListFragment.java", "license": "apache-2.0", "size": 8279 }
[ "android.app.Activity", "android.os.Bundle" ]
import android.app.Activity; import android.os.Bundle;
import android.app.*; import android.os.*;
[ "android.app", "android.os" ]
android.app; android.os;
585,859
public RequestList getPendingRequests() { RequestList allReq = new RequestList(); clientsLock.lock(); List<Entry<Integer, ClientData>> clientsEntryList = new ArrayList<>(clientsData.entrySet().size()); clientsEntryList.addAll(clientsData.entrySet()); ...
RequestList function() { RequestList allReq = new RequestList(); clientsLock.lock(); List<Entry<Integer, ClientData>> clientsEntryList = new ArrayList<>(clientsData.entrySet().size()); clientsEntryList.addAll(clientsData.entrySet()); if (controller.getStaticConf().getFairBatch()) Collections.shuffle(clientsEntryList); ...
/** * Get pending requests in a fair way (one request from each client * queue until the max number of requests is obtained). * * @return the set of all pending requests of this system */
Get pending requests in a fair way (one request from each client queue until the max number of requests is obtained)
getPendingRequests
{ "repo_name": "bergerch/library", "path": "src/main/java/bftsmart/clientsmanagement/ClientsManager.java", "license": "apache-2.0", "size": 18335 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.Iterator", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,067,523
protected boolean teleportToEntity(Entity p_70816_1_) { Vec3d vec3d = new Vec3d(this.posX - p_70816_1_.posX, this.getEntityBoundingBox().minY + (double)(this.height / 2.0F) - p_70816_1_.posY + (double)p_70816_1_.getEyeHeight(), this.posZ - p_70816_1_.posZ); vec3d = vec3d.normalize(); dou...
boolean function(Entity p_70816_1_) { Vec3d vec3d = new Vec3d(this.posX - p_70816_1_.posX, this.getEntityBoundingBox().minY + (double)(this.height / 2.0F) - p_70816_1_.posY + (double)p_70816_1_.getEyeHeight(), this.posZ - p_70816_1_.posZ); vec3d = vec3d.normalize(); double d0 = 16.0D; double d1 = this.posX + (this.rand...
/** * Teleport the enderman to another entity */
Teleport the enderman to another entity
teleportToEntity
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/monster/EntityEnderman.java", "license": "lgpl-2.1", "size": 23888 }
[ "net.minecraft.entity.Entity", "net.minecraft.util.math.Vec3d" ]
import net.minecraft.entity.Entity; import net.minecraft.util.math.Vec3d;
import net.minecraft.entity.*; import net.minecraft.util.math.*;
[ "net.minecraft.entity", "net.minecraft.util" ]
net.minecraft.entity; net.minecraft.util;
1,364,123
public PortfolioStructure reloadPortfolioStructure(PortfolioStructure structure) { if (structure == null) throw new NullPointerException(); try { return (PortfolioStructure)dbInstance.loadObject(EPStructureElement.class, structure.getKey()); } catch (ObjectNotFoundException e) { return null; } }
PortfolioStructure function(PortfolioStructure structure) { if (structure == null) throw new NullPointerException(); try { return (PortfolioStructure)dbInstance.loadObject(EPStructureElement.class, structure.getKey()); } catch (ObjectNotFoundException e) { return null; } }
/** * Reload an object * @param structure * @return The reloaded object or null if not found */
Reload an object
reloadPortfolioStructure
{ "repo_name": "stevenhva/InfoLearn_OpenOLAT", "path": "src/main/java/org/olat/portfolio/manager/EPStructureManager.java", "license": "apache-2.0", "size": 75865 }
[ "org.hibernate.ObjectNotFoundException", "org.olat.portfolio.model.structel.EPStructureElement", "org.olat.portfolio.model.structel.PortfolioStructure" ]
import org.hibernate.ObjectNotFoundException; import org.olat.portfolio.model.structel.EPStructureElement; import org.olat.portfolio.model.structel.PortfolioStructure;
import org.hibernate.*; import org.olat.portfolio.model.structel.*;
[ "org.hibernate", "org.olat.portfolio" ]
org.hibernate; org.olat.portfolio;
1,045,239
public static int sizeOf(Collection<?> list) { return list == null ? 0 : list.size(); }
static int function(Collection<?> list) { return list == null ? 0 : list.size(); }
/** * NULL safe sizeOf() */
NULL safe sizeOf()
sizeOf
{ "repo_name": "TrueNight/Utils", "path": "utils/src/main/java/xyz/truenight/utils/Utils.java", "license": "apache-2.0", "size": 55666 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
246,331
void onError(List<VantiqError> errors, Response response);
void onError(List<VantiqError> errors, Response response);
/** * Called if a server error is returned (e.g. HTTP 4xx or 5xx status codes), then * the status code is returned along with the errors that were found. * * @param errors The errors returned by the Vantiq server. * @param response The raw response from the server. This provides access * ...
Called if a server error is returned (e.g. HTTP 4xx or 5xx status codes), then the status code is returned along with the errors that were found
onError
{ "repo_name": "Vantiq/vantiq-sdk-java", "path": "src/main/java/io/vantiq/client/ResponseHandler.java", "license": "mit", "size": 1507 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
744,298
protected void clear() { ensureOpen(); this.warnings = Py.None; this.lastrowid = Py.None; this.updatecount = Py.newInteger(-1); try { this.fetch.close(); } catch (Throwable e) { // ok } finally { this.fetch = Fetch.newFetc...
void function() { ensureOpen(); this.warnings = Py.None; this.lastrowid = Py.None; this.updatecount = Py.newInteger(-1); try { this.fetch.close(); } catch (Throwable e) { } finally { this.fetch = Fetch.newFetch(this.datahandler, this.dynamicFetch); this.fetch.addWarningListener(this); } if (this.statement != null) { tr...
/** * Resets the cursor state. This includes flushing the warnings * and any previous results. * */
Resets the cursor state. This includes flushing the warnings and any previous results
clear
{ "repo_name": "alvin319/CarnotKE", "path": "jyhton/src/com/ziclix/python/sql/PyCursor.java", "license": "apache-2.0", "size": 36242 }
[ "org.python.core.Py" ]
import org.python.core.Py;
import org.python.core.*;
[ "org.python.core" ]
org.python.core;
111,563
public void create(final String version, List<String> participants) { LOG.info(String.format("Creating barrier with version: %s, participants: %s.", version, participants)); String barrierRoot = keyBuilder.getBarrierRoot(); String barrierParticipantsPath = keyBuilder.getBarrierParticipantsPath(version); ...
void function(final String version, List<String> participants) { LOG.info(String.format(STR, version, participants)); String barrierRoot = keyBuilder.getBarrierRoot(); String barrierParticipantsPath = keyBuilder.getBarrierParticipantsPath(version); String barrierStatePath = keyBuilder.getBarrierStatePath(version); zkUt...
/** * Creates a shared barrier sub-tree in ZK * * @param version Version associated with the Barrier * @param participants List of expected participated for this barrier to complete */
Creates a shared barrier sub-tree in ZK
create
{ "repo_name": "bharathkk/samza", "path": "samza-core/src/main/java/org/apache/samza/zk/ZkBarrierForVersionUpgrade.java", "license": "apache-2.0", "size": 12345 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,570,931
public void registerConflictCheck(String param, XContentBuilder init, XContentBuilder update) { conflictChecks.put(param, new ConflictCheck(init, update)); } }
void function(String param, XContentBuilder init, XContentBuilder update) { conflictChecks.put(param, new ConflictCheck(init, update)); } }
/** * Register a check that a parameter update will cause a conflict * * @param param the parameter name, expected to appear in the error message * @param init the initial mapping * @param update the updated mapping */
Register a check that a parameter update will cause a conflict
registerConflictCheck
{ "repo_name": "nknize/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/index/mapper/MapperTestCase.java", "license": "apache-2.0", "size": 21133 }
[ "org.elasticsearch.common.xcontent.XContentBuilder" ]
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
349,478
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @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": "BaSys-PC1/models", "path": "de.dfki.iui.basys.model.domain.edit/src/de/dfki/iui/basys/model/domain/resourcetype/provider/LiftingTableItemProvider.java", "license": "epl-1.0", "size": 2672 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,693,596
@RequestMapping(value = "{projectId}/edit", method = RequestMethod.GET) @PreAuthorize("hasPermission('PROJECT','EDIT')") public String showProjectForm(@PathVariable Integer projectId, ModelMap model) { Project project = projectDao.findProject(projectId); if (project == null) { t...
@RequestMapping(value = STR, method = RequestMethod.GET) @PreAuthorize(STR) String function(@PathVariable Integer projectId, ModelMap model) { Project project = projectDao.findProject(projectId); if (project == null) { throw new ResourceNotFoundException(STR + projectId); } project.setKingdomHall(kingdomHallDao.findKin...
/** * Shows the project edit form. * * @param projectId project id * @param model mvc model * @return view name */
Shows the project edit form
showProjectForm
{ "repo_name": "RBC1B/ROMS", "path": "src/main/java/uk/org/rbc1b/roms/controller/project/ProjectsController.java", "license": "mit", "size": 22397 }
[ "org.springframework.security.access.prepost.PreAuthorize", "org.springframework.ui.ModelMap", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "uk.org.rbc1b.roms.controller.ResourceNo...
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import uk.org.rbc1b.roms.cont...
import org.springframework.security.access.prepost.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*; import uk.org.rbc1b.roms.controller.*; import uk.org.rbc1b.roms.db.project.*;
[ "org.springframework.security", "org.springframework.ui", "org.springframework.web", "uk.org.rbc1b" ]
org.springframework.security; org.springframework.ui; org.springframework.web; uk.org.rbc1b;
2,719,691
public void addService(String service, String className) { PluginEntry entry = new PluginEntry(service, className, false); this.addService(entry); }
void function(String service, String className) { PluginEntry entry = new PluginEntry(service, className, false); this.addService(entry); }
/** * Add a plugin class that implements a service to the service entry table. * This does not create the plugin object instance. * * @param service The service name * @param className The plugin class name */
Add a plugin class that implements a service to the service entry table. This does not create the plugin object instance
addService
{ "repo_name": "ijmccallum/myWebsite", "path": "www/experiments/bubbleGame/0.3/soundApp/platforms/android/CordovaLib/src/org/apache/cordova/PluginManager.java", "license": "mit", "size": 17806 }
[ "org.apache.cordova.PluginEntry" ]
import org.apache.cordova.PluginEntry;
import org.apache.cordova.*;
[ "org.apache.cordova" ]
org.apache.cordova;
1,364,966
private static void exceptionOccurred(final FactoryException exception) { final LogRecord record = new LogRecord(Level.FINER, exception.getMessage()); record.setLoggerName(Loggers.CRS_FACTORY); Logging.log(IdentifiedObjectFinder.class, "find", record); }
static void function(final FactoryException exception) { final LogRecord record = new LogRecord(Level.FINER, exception.getMessage()); record.setLoggerName(Loggers.CRS_FACTORY); Logging.log(IdentifiedObjectFinder.class, "find", record); }
/** * Invoked when an exception occurred during the creation of a candidate from a code. */
Invoked when an exception occurred during the creation of a candidate from a code
exceptionOccurred
{ "repo_name": "apache/sis", "path": "core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java", "license": "apache-2.0", "size": 29108 }
[ "java.util.logging.Level", "java.util.logging.LogRecord", "org.apache.sis.internal.system.Loggers", "org.apache.sis.util.logging.Logging", "org.opengis.util.FactoryException" ]
import java.util.logging.Level; import java.util.logging.LogRecord; import org.apache.sis.internal.system.Loggers; import org.apache.sis.util.logging.Logging; import org.opengis.util.FactoryException;
import java.util.logging.*; import org.apache.sis.internal.system.*; import org.apache.sis.util.logging.*; import org.opengis.util.*;
[ "java.util", "org.apache.sis", "org.opengis.util" ]
java.util; org.apache.sis; org.opengis.util;
1,203,607
public void propertyChange(java.beans.PropertyChangeEvent pce) { // project events if (pce.getPropertyName() .equals(ProjectManager.CURRENT_PROJECT_PROPERTY_NAME)) { TreeModel model = getModel(); if (model != null && model.getRoot() ...
void function(java.beans.PropertyChangeEvent pce) { if (pce.getPropertyName() .equals(ProjectManager.CURRENT_PROJECT_PROPERTY_NAME)) { TreeModel model = getModel(); if (model != null && model.getRoot() != null) { expandPath(getPathForRow(0)); } } } } private static final long serialVersionUID = 992867483644759920L;
/** * Listens to events coming from the project manager, * i.e. when the current project changes, * in order to expand the root node by default. */
Listens to events coming from the project manager, i.e. when the current project changes, in order to expand the root node by default
propertyChange
{ "repo_name": "carvalhomb/tsmells", "path": "sample/argouml/argouml/org/argouml/ui/explorer/ExplorerTree.java", "license": "gpl-2.0", "size": 21880 }
[ "javax.swing.tree.TreeModel", "org.argouml.kernel.ProjectManager" ]
import javax.swing.tree.TreeModel; import org.argouml.kernel.ProjectManager;
import javax.swing.tree.*; import org.argouml.kernel.*;
[ "javax.swing", "org.argouml.kernel" ]
javax.swing; org.argouml.kernel;
461,049
Optional<InputStream> extension(ExtensionType type); enum ExtensionType { P4_INFO_TEXT, BMV2_JSON, SPECTRUM_BIN, TOFINO_BIN, TOFINO_CONTEXT_JSON, // TODO: consider a better way to get the CPU port i...
Optional<InputStream> extension(ExtensionType type); enum ExtensionType { P4_INFO_TEXT, BMV2_JSON, SPECTRUM_BIN, TOFINO_BIN, TOFINO_CONTEXT_JSON, CPU_PORT_TXT }
/** * Returns, if present, an input stream pointing at the beginning of a file representing a device-specific or * control protocol-specific extension of this configuration. For example, if requesting a target-specific P4 * binary, this will return the same bytes produced by the P4 compiler. * ...
Returns, if present, an input stream pointing at the beginning of a file representing a device-specific or control protocol-specific extension of this configuration. For example, if requesting a target-specific P4 binary, this will return the same bytes produced by the P4 compiler
extension
{ "repo_name": "kuujo/onos", "path": "core/api/src/main/java/org/onosproject/net/pi/model/PiPipeconf.java", "license": "apache-2.0", "size": 3533 }
[ "java.io.InputStream", "java.util.Optional" ]
import java.io.InputStream; import java.util.Optional;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,969,202
private void pdlLog(String action, final String what, PatientBaseView patient, String healtPlanName, HttpServletRequest request) { if (!isCareActor()) { return; } if (patient == null) { getLog().info("pdlLogging requested but no patient present Action: {}->{}", new Object[] { action, what }); retu...
void function(String action, final String what, PatientBaseView patient, String healtPlanName, HttpServletRequest request) { if (!isCareActor()) { return; } if (patient == null) { getLog().info(STR, new Object[] { action, what }); return; } if (healtPlanName == null) { healtPlanName = " "; } CareActorBaseView careActor...
/** * PDL logging is only done if the user is a CareActor and if information about * one ore many patients are concerned. In case of info concerning many persons returned by one api call, * one log entry is written for each person */
PDL logging is only done if the user is a CareActor and if information about one ore many patients are concerned. In case of info concerning many persons returned by one api call, one log entry is written for each person
pdlLog
{ "repo_name": "MinHalsoplan/netcare-healthplan", "path": "netcare-rest-api/src/main/java/org/callistasoftware/netcare/api/rest/ApiSupport.java", "license": "agpl-3.0", "size": 4870 }
[ "javax.servlet.http.HttpServletRequest", "org.callistasoftware.netcare.core.api.CareActorBaseView", "org.callistasoftware.netcare.core.api.PatientBaseView", "org.callistasoftware.netcare.core.api.impl.PdlLogImpl" ]
import javax.servlet.http.HttpServletRequest; import org.callistasoftware.netcare.core.api.CareActorBaseView; import org.callistasoftware.netcare.core.api.PatientBaseView; import org.callistasoftware.netcare.core.api.impl.PdlLogImpl;
import javax.servlet.http.*; import org.callistasoftware.netcare.core.api.*; import org.callistasoftware.netcare.core.api.impl.*;
[ "javax.servlet", "org.callistasoftware.netcare" ]
javax.servlet; org.callistasoftware.netcare;
2,635,791
public IscsiTargetCreate withLuns(List<IscsiLun> luns) { if (this.innerProperties() == null) { this.innerProperties = new IscsiTargetCreateProperties(); } this.innerProperties().withLuns(luns); return this; }
IscsiTargetCreate function(List<IscsiLun> luns) { if (this.innerProperties() == null) { this.innerProperties = new IscsiTargetCreateProperties(); } this.innerProperties().withLuns(luns); return this; }
/** * Set the luns property: List of LUNs to be exposed through iSCSI Target. * * @param luns the luns value to set. * @return the IscsiTargetCreate object itself. */
Set the luns property: List of LUNs to be exposed through iSCSI Target
withLuns
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/storagepool/azure-resourcemanager-storagepool/src/main/java/com/azure/resourcemanager/storagepool/models/IscsiTargetCreate.java", "license": "mit", "size": 6477 }
[ "com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetCreateProperties", "java.util.List" ]
import com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetCreateProperties; import java.util.List;
import com.azure.resourcemanager.storagepool.fluent.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
644,189
public boolean getBoolean() throws StandardException { if (isNull()) return false; // match JCC, match only "0" or "false" for false. No case // insensitivity. everything else is true. String cleanedValue = getString().trim(); return !(cleane...
boolean function() throws StandardException { if (isNull()) return false; String cleanedValue = getString().trim(); return !(cleanedValue.equals("0") cleanedValue.equals("false")); }
/** * Get Boolean from a SQLChar. * * <p> * Return false for only "0" or "false" for false. No case insensitivity. * Everything else is true. * <p> * The above matches JCC. * * * @see DataValueDescriptor#getBoolean * * @exception StandardException Thrown ...
Get Boolean from a SQLChar. Return false for only "0" or "false" for false. No case insensitivity. Everything else is true. The above matches JCC
getBoolean
{ "repo_name": "gemxd/gemfirexd-oss", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/types/SQLChar.java", "license": "apache-2.0", "size": 173809 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException;
import com.pivotal.gemfirexd.internal.iapi.error.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
1,801,221
public Status unsubscribe(int ds_id, String packageName, Messenger reply) { int statusCode = publishers.unsubscribe(ds_id, packageName, reply); return new Status(statusCode); }
Status function(int ds_id, String packageName, Messenger reply) { int statusCode = publishers.unsubscribe(ds_id, packageName, reply); return new Status(statusCode); }
/** * Unsubscribes the given data source. * * @param ds_id Data source identifier. * @param packageName * @param reply Reference to a message handler. * @return The status after unsubscribing. */
Unsubscribes the given data source
unsubscribe
{ "repo_name": "MD2Korg/mCerebrum-DataKit", "path": "datakit/src/main/java/org/md2k/datakit/router/RoutingManager.java", "license": "bsd-2-clause", "size": 18641 }
[ "android.os.Messenger", "org.md2k.datakitapi.status.Status" ]
import android.os.Messenger; import org.md2k.datakitapi.status.Status;
import android.os.*; import org.md2k.datakitapi.status.*;
[ "android.os", "org.md2k.datakitapi" ]
android.os; org.md2k.datakitapi;
1,291,510
@Override public Enumeration children() { return children.elements(); }
Enumeration function() { return children.elements(); }
/** * Returns the children of this node in an Enumeration. * If this node is a file, return a empty Enumeration. * Else, return an Enumeration full with TMFileNode. * * @return an Enumeration containing childs of this node */
Returns the children of this node in an Enumeration. If this node is a file, return a empty Enumeration. Else, return an Enumeration full with TMFileNode
children
{ "repo_name": "nelsonsilva/MuVis", "path": "src/main/java/muvis/view/main/MuVisTreemapNode.java", "license": "gpl-3.0", "size": 9104 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
232,228
void verifyCanInstantiate(String groupId, FlowSnippetDTO snippetDTO);
void verifyCanInstantiate(String groupId, FlowSnippetDTO snippetDTO);
/** * Verifies the given template can be instantiated in the group with the given ID * * @param groupId the ID of the Process Group * @param snippetDTO the contents of the template */
Verifies the given template can be instantiated in the group with the given ID
verifyCanInstantiate
{ "repo_name": "mattyb149/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 87066 }
[ "org.apache.nifi.web.api.dto.FlowSnippetDTO" ]
import org.apache.nifi.web.api.dto.FlowSnippetDTO;
import org.apache.nifi.web.api.dto.*;
[ "org.apache.nifi" ]
org.apache.nifi;
2,231,423
Assert.notNull(scope, "Scope to search for cannot be null"); if (scope.equals(SCOPE_REQUEST)) { return PageContext.REQUEST_SCOPE; } else if (scope.equals(SCOPE_SESSION)) { return PageContext.SESSION_SCOPE; } else if (scope.equals(SCOPE_APPLICATION)) { return PageContext.APPLICATION_SCOPE; } els...
Assert.notNull(scope, STR); if (scope.equals(SCOPE_REQUEST)) { return PageContext.REQUEST_SCOPE; } else if (scope.equals(SCOPE_SESSION)) { return PageContext.SESSION_SCOPE; } else if (scope.equals(SCOPE_APPLICATION)) { return PageContext.APPLICATION_SCOPE; } else { return PageContext.PAGE_SCOPE; } }
/** * Determines the scope for a given input {@code String}. * <p>If the {@code String} does not match 'request', 'session', * 'page' or 'application', the method will return {@link PageContext#PAGE_SCOPE}. * @param scope the {@code String} to inspect * @return the scope found, or {@link PageContext#PAGE_SCOP...
Determines the scope for a given input String. If the String does not match 'request', 'session', 'page' or 'application', the method will return <code>PageContext#PAGE_SCOPE</code>
getScope
{ "repo_name": "kingtang/spring-learn", "path": "spring-web/src/main/java/org/springframework/web/util/TagUtils.java", "license": "gpl-3.0", "size": 5341 }
[ "javax.servlet.jsp.PageContext", "org.springframework.util.Assert" ]
import javax.servlet.jsp.PageContext; import org.springframework.util.Assert;
import javax.servlet.jsp.*; import org.springframework.util.*;
[ "javax.servlet", "org.springframework.util" ]
javax.servlet; org.springframework.util;
2,231,899
@Transactional(readOnly = true) public Collection<URI> getImportingNamespaces(URI targetNamespace) throws NoSuchNamespaceExistsFault { XMLSchema schema = this.schemaDao.getXMLSchemaByTargetNamespace(targetNamespace); if (schema == null) { String description = "No schema is publis...
@Transactional(readOnly = true) Collection<URI> function(URI targetNamespace) throws NoSuchNamespaceExistsFault { XMLSchema schema = this.schemaDao.getXMLSchemaByTargetNamespace(targetNamespace); if (schema == null) { String description = STR + targetNamespace + ")"; NoSuchNamespaceExistsFault fault = new NoSuchNamespa...
/** * Return a Collection of URIs representing the targetNamespaces of the * XMLSchemas which import the XMLSchema identified by the given * targetNamespace * * @param targetNamespace * the targetNamespace of the desired XMLSchema * @return a Collection of URIs repr...
Return a Collection of URIs representing the targetNamespaces of the XMLSchemas which import the XMLSchema identified by the given targetNamespace
getImportingNamespaces
{ "repo_name": "NCIP/cagrid", "path": "cagrid/Software/core/caGrid/projects/globalModelExchange/src/org/cagrid/gme/service/GME.java", "license": "bsd-3-clause", "size": 33828 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "org.cagrid.gme.domain.XMLSchema", "org.cagrid.gme.stubs.types.NoSuchNamespaceExistsFault", "org.globus.wsrf.utils.FaultHelper", "org.springframework.transaction.annotation.Transactional" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.cagrid.gme.domain.XMLSchema; import org.cagrid.gme.stubs.types.NoSuchNamespaceExistsFault; import org.globus.wsrf.utils.FaultHelper; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import org.cagrid.gme.domain.*; import org.cagrid.gme.stubs.types.*; import org.globus.wsrf.utils.*; import org.springframework.transaction.annotation.*;
[ "java.util", "org.cagrid.gme", "org.globus.wsrf", "org.springframework.transaction" ]
java.util; org.cagrid.gme; org.globus.wsrf; org.springframework.transaction;
1,412,928
protected Operand newListVariableInstance(ParserAssembler parserAssembler) { QualifiedName qualifiedListName = null; ItemList<?> itemList = parserAssembler.findItemList(listName); if (itemList != null) qualifiedListName = itemList.getQualifiedName(); else { ...
Operand function(ParserAssembler parserAssembler) { QualifiedName qualifiedListName = null; ItemList<?> itemList = parserAssembler.findItemList(listName); if (itemList != null) qualifiedListName = itemList.getQualifiedName(); else { Operand operand = parserAssembler.findOperandByName(listName); if (operand != null) qua...
/** * Returns Operand which accesses a list identified by name * @param listName Name of list * @param param1 Operand of first index * @param param2 Operand of second index or null if not specified * @return Operand from package au.com.cybersearch2.classy_logic.list */
Returns Operand which accesses a list identified by name
newListVariableInstance
{ "repo_name": "andrew-bowley/xpl", "path": "parser/src/main/java/au/com/cybersearch2/classy_logic/list/ListVariableOperand.java", "license": "gpl-3.0", "size": 8622 }
[ "au.com.cybersearch2.classy_logic.compile.ParserAssembler", "au.com.cybersearch2.classy_logic.expression.ExpressionException", "au.com.cybersearch2.classy_logic.helper.QualifiedName", "au.com.cybersearch2.classy_logic.interfaces.ItemList", "au.com.cybersearch2.classy_logic.interfaces.Operand" ]
import au.com.cybersearch2.classy_logic.compile.ParserAssembler; import au.com.cybersearch2.classy_logic.expression.ExpressionException; import au.com.cybersearch2.classy_logic.helper.QualifiedName; import au.com.cybersearch2.classy_logic.interfaces.ItemList; import au.com.cybersearch2.classy_logic.interfaces.Operand;
import au.com.cybersearch2.classy_logic.compile.*; import au.com.cybersearch2.classy_logic.expression.*; import au.com.cybersearch2.classy_logic.helper.*; import au.com.cybersearch2.classy_logic.interfaces.*;
[ "au.com.cybersearch2" ]
au.com.cybersearch2;
190,535
Optional<Account> getHolidaysAccount(int year, Person person); /** * Saves the given {@link Account}. * * @param account to be saved * @return saved {@link Account}
Optional<Account> getHolidaysAccount(int year, Person person); /** * Saves the given {@link Account}. * * @param account to be saved * @return saved {@link Account}
/** * Gets the {@link Account} for the given year and person. * * @param year to get the holidays account for * @param person to get the holidays account for * @return optional of {@link Account} that matches the given * parameters */
Gets the <code>Account</code> for the given year and person
getHolidaysAccount
{ "repo_name": "synyx/urlaubsverwaltung", "path": "src/main/java/org/synyx/urlaubsverwaltung/account/AccountService.java", "license": "apache-2.0", "size": 732 }
[ "java.util.Optional", "org.synyx.urlaubsverwaltung.person.Person" ]
import java.util.Optional; import org.synyx.urlaubsverwaltung.person.Person;
import java.util.*; import org.synyx.urlaubsverwaltung.person.*;
[ "java.util", "org.synyx.urlaubsverwaltung" ]
java.util; org.synyx.urlaubsverwaltung;
1,300,004
public static void main(String[] args) { try { System.exit(ToolRunner.run(null, new Cli(), args)); } catch (Throwable e) { LOG.error("Exiting balancer due an exception", e); System.exit(-1); } }
static void function(String[] args) { try { System.exit(ToolRunner.run(null, new Cli(), args)); } catch (Throwable e) { LOG.error(STR, e); System.exit(-1); } }
/** * Run a balancer * @param args Command line arguments */
Run a balancer
main
{ "repo_name": "moreus/hadoop", "path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java", "license": "apache-2.0", "size": 55960 }
[ "org.apache.hadoop.util.ToolRunner" ]
import org.apache.hadoop.util.ToolRunner;
import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
221,126
void commentIssue(@NotNull String user, @NotNull String repository, @NotNull String issue, @NotNull GitHubIssueCommentInput input, @NotNull AsyncRequestCallback<GitHubIssueComment> callback);
void commentIssue(@NotNull String user, @NotNull String repository, @NotNull String issue, @NotNull GitHubIssueCommentInput input, @NotNull AsyncRequestCallback<GitHubIssueComment> callback);
/** * Add a comment to the issue on the given repository. * * @param user * the owner of the repository. * @param repository * the repository name. * @param issue * the issue number. * @param input * the comment. * @param callback ...
Add a comment to the issue on the given repository
commentIssue
{ "repo_name": "snjeza/che", "path": "plugins/plugin-github/che-plugin-github-ide/src/main/java/org/eclipse/che/plugin/github/ide/GitHubClientService.java", "license": "epl-1.0", "size": 7503 }
[ "javax.validation.constraints.NotNull", "org.eclipse.che.ide.rest.AsyncRequestCallback", "org.eclipse.che.plugin.github.shared.GitHubIssueComment", "org.eclipse.che.plugin.github.shared.GitHubIssueCommentInput" ]
import javax.validation.constraints.NotNull; import org.eclipse.che.ide.rest.AsyncRequestCallback; import org.eclipse.che.plugin.github.shared.GitHubIssueComment; import org.eclipse.che.plugin.github.shared.GitHubIssueCommentInput;
import javax.validation.constraints.*; import org.eclipse.che.ide.rest.*; import org.eclipse.che.plugin.github.shared.*;
[ "javax.validation", "org.eclipse.che" ]
javax.validation; org.eclipse.che;
2,680,437
public static void setQueryInfo(Job job, Date start, Date end, Set<String> types) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, IOException { setQueryInfo(job, start, end, types, null, DEFAULT_SHARD_BUILDER, LEXI_TYPES); }
static void function(Job job, Date start, Date end, Set<String> types) throws AccumuloSecurityException, AccumuloException, TableNotFoundException, IOException { setQueryInfo(job, start, end, types, null, DEFAULT_SHARD_BUILDER, LEXI_TYPES); }
/** * Sets up the job to stream all events between the start and end times for the types given * @param job * @param start * @param end * @throws AccumuloSecurityException * @throws AccumuloException * @throws TableNotFoundException * @throws IOException */
Sets up the job to stream all events between the start and end times for the types given
setQueryInfo
{ "repo_name": "calrissian/accumulo-recipes", "path": "store/event-store/src/main/java/org/calrissian/accumulorecipes/eventstore/hadoop/EventInputFormat.java", "license": "apache-2.0", "size": 10914 }
[ "java.io.IOException", "java.util.Date", "java.util.Set", "org.apache.accumulo.core.client.AccumuloException", "org.apache.accumulo.core.client.AccumuloSecurityException", "org.apache.accumulo.core.client.TableNotFoundException", "org.apache.hadoop.mapreduce.Job" ]
import java.io.IOException; import java.util.Date; import java.util.Set; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.hadoop.mapreduce.Job;
import java.io.*; import java.util.*; import org.apache.accumulo.core.client.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "java.util", "org.apache.accumulo", "org.apache.hadoop" ]
java.io; java.util; org.apache.accumulo; org.apache.hadoop;
1,997,024
public void setIdAttribute(String name, boolean makeId) { if (needsSyncData()) { synchronizeData(); } Attr at = getAttributeNode(name); if( at == null){ String msg = DOMMessageFormatter.formatMessage( ...
void function(String name, boolean makeId) { if (needsSyncData()) { synchronizeData(); } Attr at = getAttributeNode(name); if( at == null){ String msg = DOMMessageFormatter.formatMessage( DOMMessageFormatter.DOM_DOMAIN, STR, null); throw new DOMException(DOMException.NOT_FOUND_ERR, msg); } if (ownerDocument.errorChecki...
/** * DOM Level 3: register the given attribute node as an ID attribute */
DOM Level 3: register the given attribute node as an ID attribute
setIdAttribute
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xerces/internal/dom/ElementImpl.java", "license": "apache-2.0", "size": 42962 }
[ "org.w3c.dom.Attr", "org.w3c.dom.DOMException" ]
import org.w3c.dom.Attr; import org.w3c.dom.DOMException;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,476,207
public static boolean needsVisibilityAdjustments(final IMember member, final ModifierKeyword threshold, final Map<IMember, IncomingMemberVisibilityAdjustment> adjustments) { Assert.isNotNull(member); Assert.isNotNull(adjustments); final IncomingMemberVisibilityAdjustment adjustment= adjustments.get(member); ...
static boolean function(final IMember member, final ModifierKeyword threshold, final Map<IMember, IncomingMemberVisibilityAdjustment> adjustments) { Assert.isNotNull(member); Assert.isNotNull(adjustments); final IncomingMemberVisibilityAdjustment adjustment= adjustments.get(member); if (adjustment != null) return hasLo...
/** * Does the specified member need further visibility adjustment? * * @param member the member to test * @param threshold the visibility threshold to test for, or <code>null</code> for default visibility * @param adjustments the map of members to visibility adjustments * @return <code>true</code> if the m...
Does the specified member need further visibility adjustment
needsVisibilityAdjustments
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java", "license": "epl-1.0", "size": 56703 }
[ "java.util.HashMap", "java.util.LinkedHashMap", "java.util.Map", "org.eclipse.core.runtime.Assert", "org.eclipse.jdt.core.ICompilationUnit", "org.eclipse.jdt.core.IInitializer", "org.eclipse.jdt.core.IJavaElement", "org.eclipse.jdt.core.IMember", "org.eclipse.jdt.core.IPackageFragment", "org.eclip...
import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import org.eclipse.core.runtime.Assert; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IInitializer; import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IPack...
import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.core.dom.rewrite.*; import org.eclipse.jdt.core.search.*; import org.eclipse.jdt.internal.corext.refactoring.*; import org.eclipse.jdt.internal.corext.util.*; import org.eclips...
[ "java.util", "org.eclipse.core", "org.eclipse.jdt", "org.eclipse.ltk" ]
java.util; org.eclipse.core; org.eclipse.jdt; org.eclipse.ltk;
1,683,908
private boolean tryConvertBinaryKuduPredicate(Analyzer analyzer, org.apache.kudu.client.KuduTable table, Expr expr) { if (!(expr instanceof BinaryPredicate)) return false; BinaryPredicate predicate = (BinaryPredicate) expr; // TODO KUDU-931 look into handling implicit/explicit casts on the SlotRef....
boolean function(Analyzer analyzer, org.apache.kudu.client.KuduTable table, Expr expr) { if (!(expr instanceof BinaryPredicate)) return false; BinaryPredicate predicate = (BinaryPredicate) expr; ComparisonOp op = getKuduOperator(predicate.getOp()); if (op == null) return false; if (!(predicate.getChild(0) instanceof Sl...
/** * If 'expr' can be converted to a KuduPredicate, returns true and updates * kuduPredicates_ and kuduConjuncts_. */
If 'expr' can be converted to a KuduPredicate, returns true and updates kuduPredicates_ and kuduConjuncts_
tryConvertBinaryKuduPredicate
{ "repo_name": "cloudera/Impala", "path": "fe/src/main/java/org/apache/impala/planner/KuduScanNode.java", "license": "apache-2.0", "size": 22959 }
[ "org.apache.impala.analysis.Analyzer", "org.apache.impala.analysis.BinaryPredicate", "org.apache.impala.analysis.BoolLiteral", "org.apache.impala.analysis.Expr", "org.apache.impala.analysis.LiteralExpr", "org.apache.impala.analysis.NumericLiteral", "org.apache.impala.analysis.SlotRef", "org.apache.imp...
import org.apache.impala.analysis.Analyzer; import org.apache.impala.analysis.BinaryPredicate; import org.apache.impala.analysis.BoolLiteral; import org.apache.impala.analysis.Expr; import org.apache.impala.analysis.LiteralExpr; import org.apache.impala.analysis.NumericLiteral; import org.apache.impala.analysis.SlotRef...
import org.apache.impala.analysis.*; import org.apache.impala.catalog.*; import org.apache.impala.util.*; import org.apache.kudu.*; import org.apache.kudu.client.*;
[ "org.apache.impala", "org.apache.kudu" ]
org.apache.impala; org.apache.kudu;
2,004,116
@Source("com/google/appinventor/images/soundEffect.png") ImageResource soundeffect();
@Source(STR) ImageResource soundeffect();
/** * Designer palette item: SoundEffect component */
Designer palette item: SoundEffect component
soundeffect
{ "repo_name": "kidebit/AudioBlurp", "path": "appinventor/appengine/src/com/google/appinventor/client/Images.java", "license": "apache-2.0", "size": 12205 }
[ "com.google.gwt.resources.client.ImageResource" ]
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.resources.client.*;
[ "com.google.gwt" ]
com.google.gwt;
745,767
public static void checkAuthorization(RoutingContext context, IAuthenticatable member, List<CaptureMap> resolvedCaptureCollections, Handler<AsyncResult<Boolean>> handler) { AuthHandler auth = context.get(AuthenticationController.AUTH_HANDLER_PROP); if (auth != null && auth instanceof RedirectAuthHandler...
static void function(RoutingContext context, IAuthenticatable member, List<CaptureMap> resolvedCaptureCollections, Handler<AsyncResult<Boolean>> handler) { AuthHandler auth = context.get(AuthenticationController.AUTH_HANDLER_PROP); if (auth != null && auth instanceof RedirectAuthHandlerBt) { if (member == null) { handl...
/** * Check if an AuthHandler exists in Context and wether current user has the rights for all actions to be processed * * @param context * @param resolvedCaptureCollections * @param handler * is getting true, if rights to all actions are granted or if no Authentication handler is active; ...
Check if an AuthHandler exists in Context and wether current user has the rights for all actions to be processed
checkAuthorization
{ "repo_name": "BraintagsGmbH/NetRelay-Controller", "path": "src/main/java/de/braintags/netrelay/controller/persistence/DataAuthorizator.java", "license": "epl-1.0", "size": 4102 }
[ "de.braintags.netrelay.controller.AbstractCaptureController", "de.braintags.netrelay.controller.authentication.AuthenticationController", "de.braintags.netrelay.controller.authentication.RedirectAuthHandlerBt", "de.braintags.vertx.auth.datastore.IAuthenticatable", "io.vertx.core.AsyncResult", "io.vertx.co...
import de.braintags.netrelay.controller.AbstractCaptureController; import de.braintags.netrelay.controller.authentication.AuthenticationController; import de.braintags.netrelay.controller.authentication.RedirectAuthHandlerBt; import de.braintags.vertx.auth.datastore.IAuthenticatable; import io.vertx.core.AsyncResult; i...
import de.braintags.netrelay.controller.*; import de.braintags.netrelay.controller.authentication.*; import de.braintags.vertx.auth.datastore.*; import io.vertx.core.*; import io.vertx.ext.web.*; import io.vertx.ext.web.handler.*; import java.util.*;
[ "de.braintags.netrelay", "de.braintags.vertx", "io.vertx.core", "io.vertx.ext", "java.util" ]
de.braintags.netrelay; de.braintags.vertx; io.vertx.core; io.vertx.ext; java.util;
1,617,973
final Inset inset = new VersionInset("1.09", "8af9e43", "10-Jan-2013"); final BasePage<?, ?> page = new BasePageMocker() .init(new ResourceMocker().mock()); inset.render(page, Response.ok()); MatcherAssert.assertThat( JaxbConverter.the(page), XhtmlMatchers.has...
final Inset inset = new VersionInset("1.09", STR, STR); final BasePage<?, ?> page = new BasePageMocker() .init(new ResourceMocker().mock()); inset.render(page, Response.ok()); MatcherAssert.assertThat( JaxbConverter.the(page), XhtmlMatchers.hasXPaths( STR, STR ) ); }
/** * VersionInset can render itself to the page. * @throws Exception If there is some problem inside */
VersionInset can render itself to the page
rendersPageToXml
{ "repo_name": "krzyk/rexsl", "path": "src/test/java/com/rexsl/page/inset/VersionInsetTest.java", "license": "bsd-3-clause", "size": 2762 }
[ "com.jcabi.matchers.JaxbConverter", "com.jcabi.matchers.XhtmlMatchers", "com.rexsl.page.BasePage", "com.rexsl.page.Inset", "com.rexsl.page.mock.BasePageMocker", "com.rexsl.page.mock.ResourceMocker", "javax.ws.rs.core.Response", "org.hamcrest.MatcherAssert" ]
import com.jcabi.matchers.JaxbConverter; import com.jcabi.matchers.XhtmlMatchers; import com.rexsl.page.BasePage; import com.rexsl.page.Inset; import com.rexsl.page.mock.BasePageMocker; import com.rexsl.page.mock.ResourceMocker; import javax.ws.rs.core.Response; import org.hamcrest.MatcherAssert;
import com.jcabi.matchers.*; import com.rexsl.page.*; import com.rexsl.page.mock.*; import javax.ws.rs.core.*; import org.hamcrest.*;
[ "com.jcabi.matchers", "com.rexsl.page", "javax.ws", "org.hamcrest" ]
com.jcabi.matchers; com.rexsl.page; javax.ws; org.hamcrest;
235,320
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>GET</code> method
doGet
{ "repo_name": "steilerDev/TheNetwork", "path": "src/java/servlets/Controller.java", "license": "gpl-3.0", "size": 4198 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,547,907
public void draw(DrawingPanel panel, Graphics g) { if(!measured) { checkRange(panel); } Graphics2D g2 = (Graphics2D) g; g2.setColor(color); // transform from world to pixel coordinates Shape s = generalPath.createTransformedShape(panel.getPixelTransform()); if(filled) { g2.fill...
void function(DrawingPanel panel, Graphics g) { if(!measured) { checkRange(panel); } Graphics2D g2 = (Graphics2D) g; g2.setColor(color); Shape s = generalPath.createTransformedShape(panel.getPixelTransform()); if(filled) { g2.fill(s); g2.draw(s); } else { g2.draw(s); } }
/** * Draw the function on a drawing panel. * @param panel the drawing panel * @param g the graphics context */
Draw the function on a drawing panel
draw
{ "repo_name": "OpenSourcePhysics/osp", "path": "src/org/opensourcephysics/display/FunctionDrawer.java", "license": "gpl-3.0", "size": 7518 }
[ "java.awt.Graphics", "java.awt.Graphics2D", "java.awt.Shape" ]
import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Shape;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,372,250
private CallModel doFileOpen(CallSession session, AbstractJLISession sess, FileOpenResults out, boolean change_dir, String dirname, String savedir, String filename, String generic, boolean display, boolean newwin, boolean activate, boolean regen_force) throws JLIException,jxthrowable { ...
CallModel function(CallSession session, AbstractJLISession sess, FileOpenResults out, boolean change_dir, String dirname, String savedir, String filename, String generic, boolean display, boolean newwin, boolean activate, boolean regen_force) throws JLIException,jxthrowable { CallModel m = JlinkUtils.getFile(session, d...
/** * Perform a file open. Utility method that may be called from multiple places in the code. * @param session The Creo session * @param out The results of the file-open, to be returned to the user * @param change_dir Whether to change Creo's working directory * @param dirname Directory name...
Perform a file open. Utility method that may be called from multiple places in the code
doFileOpen
{ "repo_name": "SimplifiedLogic/creoson", "path": "creoson-core/src/com/simplifiedlogic/nitro/jlink/impl/JLFile.java", "license": "mit", "size": 151097 }
[ "com.simplifiedlogic.nitro.jlink.calls.model.CallModel", "com.simplifiedlogic.nitro.jlink.calls.session.CallSession", "com.simplifiedlogic.nitro.jlink.calls.solid.CallRegenInstructions", "com.simplifiedlogic.nitro.jlink.calls.solid.CallSolid", "com.simplifiedlogic.nitro.jlink.calls.window.CallWindow", "co...
import com.simplifiedlogic.nitro.jlink.calls.model.CallModel; import com.simplifiedlogic.nitro.jlink.calls.session.CallSession; import com.simplifiedlogic.nitro.jlink.calls.solid.CallRegenInstructions; import com.simplifiedlogic.nitro.jlink.calls.solid.CallSolid; import com.simplifiedlogic.nitro.jlink.calls.window.Call...
import com.simplifiedlogic.nitro.jlink.calls.model.*; import com.simplifiedlogic.nitro.jlink.calls.session.*; import com.simplifiedlogic.nitro.jlink.calls.solid.*; import com.simplifiedlogic.nitro.jlink.calls.window.*; import com.simplifiedlogic.nitro.jlink.data.*; import com.simplifiedlogic.nitro.rpc.*;
[ "com.simplifiedlogic.nitro" ]
com.simplifiedlogic.nitro;
303,647
private void setLengths(String[] strings) throws IOException { if (strings.length != valueCount) { throw invalidLengths(strings); } try { for (int i = 0; i < strings.length; i++) { lengths[i] = Long.parseLong(strings[i]); } } catch (NumberFormatException e) { throw invalidLengths(...
void function(String[] strings) throws IOException { if (strings.length != valueCount) { throw invalidLengths(strings); } try { for (int i = 0; i < strings.length; i++) { lengths[i] = Long.parseLong(strings[i]); } } catch (NumberFormatException e) { throw invalidLengths(strings); } }
/** * Set lengths using decimal numbers like "10123". */
Set lengths using decimal numbers like "10123"
setLengths
{ "repo_name": "armstrongli/XCamera", "path": "src/com/xxboy/common/DiskLruCache.java", "license": "gpl-2.0", "size": 28357 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,860,472
protected void processNamedQueries() { // Process the XML named queries first. for (NamedQueryMetadata namedQuery : m_namedQueries) { getProject().addQuery(namedQuery); } // Process the named query annotations. // Look for a @NamedQueries. if (isAnnotatio...
void function() { for (NamedQueryMetadata namedQuery : m_namedQueries) { getProject().addQuery(namedQuery); } if (isAnnotationPresent(JPA_NAMED_QUERIES)) { for (Object namedQuery : (Object[]) getAnnotation(JPA_NAMED_QUERIES).getAttributeArray("value")) { getProject().addQuery(new NamedQueryMetadata((MetadataAnnotation)...
/** * INTERNAL: * Process/collect the named queries on this accessor and add them to the * project for later processing. */
Process/collect the named queries on this accessor and add them to the project for later processing
processNamedQueries
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/classes/MappedSuperclassAccessor.java", "license": "epl-1.0", "size": 77321 }
[ "org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotation", "org.eclipse.persistence.internal.jpa.metadata.queries.NamedQueryMetadata" ]
import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotation; import org.eclipse.persistence.internal.jpa.metadata.queries.NamedQueryMetadata;
import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.*; import org.eclipse.persistence.internal.jpa.metadata.queries.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,207,486
public static Bson nearSphere(final String fieldName, final Bson geometry, final Double maxDistance, final Double minDistance) { return new GeometryOperatorFilter<Bson>("$nearSphere", fieldName, geometry, maxDistance, minDistance); }
static Bson function(final String fieldName, final Bson geometry, final Double maxDistance, final Double minDistance) { return new GeometryOperatorFilter<Bson>(STR, fieldName, geometry, maxDistance, minDistance); }
/** * Creates a filter that matches all documents containing a field with geospatial data that is near the specified GeoJSON point using * spherical geometry. * * @param fieldName the field name * @param geometry the bounding GeoJSON geometry object * @param maxDistance the maximum distanc...
Creates a filter that matches all documents containing a field with geospatial data that is near the specified GeoJSON point using spherical geometry
nearSphere
{ "repo_name": "kay-kim/mongo-java-driver", "path": "driver-core/src/main/com/mongodb/client/model/Filters.java", "license": "apache-2.0", "size": 42464 }
[ "org.bson.conversions.Bson" ]
import org.bson.conversions.Bson;
import org.bson.conversions.*;
[ "org.bson.conversions" ]
org.bson.conversions;
1,849,964
@Override protected void configureShell(Shell newShell) { super.configureShell(newShell); newShell.setText("New Application"); }
void function(Shell newShell) { super.configureShell(newShell); newShell.setText(STR); }
/** * Configure the shell. * * @param newShell */
Configure the shell
configureShell
{ "repo_name": "ESSICS/cs-studio", "path": "applications/logbook/logbook-plugins/org.csstudio.logbook.ui/test/org/csstudio/logbook/ui/LogEntryTableDemo.java", "license": "epl-1.0", "size": 4124 }
[ "org.eclipse.swt.widgets.Shell" ]
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,908,819
public void addConnector(Connector connector) { synchronized (connectors) { connector.setContainer(this.container); connector.setService(this); Connector results[] = new Connector[connectors.length + 1]; System.arraycopy(connectors, 0, results, 0, connectors....
void function(Connector connector) { synchronized (connectors) { connector.setContainer(this.container); connector.setService(this); Connector results[] = new Connector[connectors.length + 1]; System.arraycopy(connectors, 0, results, 0, connectors.length); results[connectors.length] = connector; connectors = results; i...
/** * Add a new Connector to the set of defined Connectors, and associate it * with this Service's Container. * * @param connector The Connector to be added */
Add a new Connector to the set of defined Connectors, and associate it with this Service's Container
addConnector
{ "repo_name": "Netprophets/JBOSSWEB_7_0_13_FINAL", "path": "java/org/apache/catalina/core/StandardService.java", "license": "lgpl-3.0", "size": 23941 }
[ "org.apache.catalina.Lifecycle", "org.apache.catalina.LifecycleException", "org.apache.catalina.connector.Connector" ]
import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; import org.apache.catalina.connector.Connector;
import org.apache.catalina.*; import org.apache.catalina.connector.*;
[ "org.apache.catalina" ]
org.apache.catalina;
1,154,393
public String getSQLColumnValueFrom( T o ) { if( o == null ) { throw new IllegalArgumentException( "Cannot obtain column value from a null object." ) ; } if( m_lens == null ) { throw SchematicException.noLensForColumn( this, null ) ; } try { //noinspection unchecked...
String function( T o ) { if( o == null ) { throw new IllegalArgumentException( STR ) ; } if( m_lens == null ) { throw SchematicException.noLensForColumn( this, null ) ; } try { return m_lens.toSQLiteString( m_lens.getValueFrom( o, m_fldColumn ) ) ; } catch( IllegalAccessException xAccess ) { throw SchematicException.fi...
/** * Tries to discover the value of this column within the * corresponding field of an instance of the schematic class that * defines it. * @param o an instance of the schematic class that defined this * column * @return the SQLite string representation of the value * @throws Schem...
Tries to discover the value of this column within the corresponding field of an instance of the schematic class that defines it
getSQLColumnValueFrom
{ "repo_name": "zerobandwidth-net/android", "path": "libZeroAndroid/src/main/java/net/zer0bandwidth/android/lib/database/sqlitehouse/SQLightable.java", "license": "mit", "size": 37470 }
[ "java.lang.reflect.Field", "java.util.ArrayList", "java.util.HashMap", "net.zer0bandwidth.android.lib.database.sqlitehouse.annotations.SQLiteTable", "net.zer0bandwidth.android.lib.database.sqlitehouse.exceptions.IntrospectionException", "net.zer0bandwidth.android.lib.database.sqlitehouse.exceptions.Schema...
import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; import net.zer0bandwidth.android.lib.database.sqlitehouse.annotations.SQLiteTable; import net.zer0bandwidth.android.lib.database.sqlitehouse.exceptions.IntrospectionException; import net.zer0bandwidth.android.lib.database.sqlitehouse....
import java.lang.reflect.*; import java.util.*; import net.zer0bandwidth.android.lib.database.sqlitehouse.annotations.*; import net.zer0bandwidth.android.lib.database.sqlitehouse.exceptions.*;
[ "java.lang", "java.util", "net.zer0bandwidth.android" ]
java.lang; java.util; net.zer0bandwidth.android;
2,011,933
public ParticleManager withRangeAngle(ParticleView p, int angle) { if (p == null) throw new NullPointerException(); p.setRangeAngle(angle, angle); return this; }
ParticleManager function(ParticleView p, int angle) { if (p == null) throw new NullPointerException(); p.setRangeAngle(angle, angle); return this; }
/** * Add Range Angle * @param p * @param angle * @return */
Add Range Angle
withRangeAngle
{ "repo_name": "ffournier/animations", "path": "app/src/main/java/com/animations/animations/lib/ParticleManager.java", "license": "apache-2.0", "size": 17090 }
[ "com.animations.animations.lib.view.ParticleView" ]
import com.animations.animations.lib.view.ParticleView;
import com.animations.animations.lib.view.*;
[ "com.animations.animations" ]
com.animations.animations;
1,077,540
CompletionStage<Void> delete(Path fileOrDir);
CompletionStage<Void> delete(Path fileOrDir);
/** * Deletes a file or an empty directory. */
Deletes a file or an empty directory
delete
{ "repo_name": "TomasMikula/LiveDirsFX", "path": "livedirsfx/src/main/java/org/fxmisc/livedirs/IOFacility.java", "license": "bsd-2-clause", "size": 1996 }
[ "java.nio.file.Path", "java.util.concurrent.CompletionStage" ]
import java.nio.file.Path; import java.util.concurrent.CompletionStage;
import java.nio.file.*; import java.util.concurrent.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
588,627
private void populateTopic( HunchNextQuestion question ) { // otherwise we can just get the topic info out of the HunchNextQuestion IHunchTopic topic = question.getTopic(); if( question.isResult() ) { showResults( question.getRankedResultResponses(), topic ); return; } // set the topic ...
void function( HunchNextQuestion question ) { IHunchTopic topic = question.getTopic(); if( question.isResult() ) { showResults( question.getRankedResultResponses(), topic ); return; } final ImageView topicImg = (ImageView) findViewById( R.id.topic_icon ); ImageManager.getInstance().getTopicImage( this, topicImg, topic....
/** * This method sets up the textviews and images and such for the topic. * * It also populates the question textview and responses. * * @param question The question to display. */
This method sets up the textviews and images and such for the topic. It also populates the question textview and responses
populateTopic
{ "repo_name": "normlguy/Hunch-for-Android", "path": "src/com/hunch/ui/TopicInterviewActivity.java", "license": "gpl-3.0", "size": 11834 }
[ "android.widget.ImageView", "android.widget.TextView", "com.hunch.ImageManager", "com.hunch.api.HunchNextQuestion", "com.hunch.api.IHunchTopic" ]
import android.widget.ImageView; import android.widget.TextView; import com.hunch.ImageManager; import com.hunch.api.HunchNextQuestion; import com.hunch.api.IHunchTopic;
import android.widget.*; import com.hunch.*; import com.hunch.api.*;
[ "android.widget", "com.hunch", "com.hunch.api" ]
android.widget; com.hunch; com.hunch.api;
2,349,565
public boolean hasPermOrConsoleOnServerInWorld(CommandSource sender, String permission) { if (sender instanceof Player) { User user = config.isUseUUIDs() ? pm().getUser(((Player) sender).getUniqueId()) : pm().getUser(((Player) sender).getUsername()); if (((Player) sender)...
boolean function(CommandSource sender, String permission) { if (sender instanceof Player) { User user = config.isUseUUIDs() ? pm().getUser(((Player) sender).getUniqueId()) : pm().getUser(((Player) sender).getUsername()); if (((Player) sender).getCurrentServer() == null) { return user.hasPerm(permission, null, null); } ...
/** * Checks if a user (or console) has a specific permission on the current server and in the current world. * * @param sender the command sender to check a permission for * @param permission the permission to check * @return the result of the permission check */
Checks if a user (or console) has a specific permission on the current server and in the current world
hasPermOrConsoleOnServerInWorld
{ "repo_name": "weaondara/BungeePerms", "path": "src/main/java/net/alpenblock/bungeeperms/platform/velocity/VelocityPermissionsChecker.java", "license": "mit", "size": 12173 }
[ "com.velocitypowered.api.command.CommandSource", "com.velocitypowered.api.proxy.Player", "net.alpenblock.bungeeperms.User" ]
import com.velocitypowered.api.command.CommandSource; import com.velocitypowered.api.proxy.Player; import net.alpenblock.bungeeperms.User;
import com.velocitypowered.api.command.*; import com.velocitypowered.api.proxy.*; import net.alpenblock.bungeeperms.*;
[ "com.velocitypowered.api", "net.alpenblock.bungeeperms" ]
com.velocitypowered.api; net.alpenblock.bungeeperms;
1,090,951
public Map<String, String> getPendingStateMap(String resourceName, Partition partition) { if (_pendingMessageMap.containsKey(resourceName)) { Map<Partition, Map<String, Message>> map = _pendingMessageMap.get(resourceName); if (map.containsKey(partition)) { Map<String, Message> pendingMsgMap = ...
Map<String, String> function(String resourceName, Partition partition) { if (_pendingMessageMap.containsKey(resourceName)) { Map<Partition, Map<String, Message>> map = _pendingMessageMap.get(resourceName); if (map.containsKey(partition)) { Map<String, Message> pendingMsgMap = map.get(partition); Map<String, String> pen...
/** * Given (resource, partition), returns (instance->toState) map * @param resourceName * @param partition * @return pending target state map */
Given (resource, partition), returns (instance->toState) map
getPendingStateMap
{ "repo_name": "dasahcc/helix", "path": "helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateOutput.java", "license": "apache-2.0", "size": 18335 }
[ "java.util.Collections", "java.util.HashMap", "java.util.Map", "org.apache.helix.model.Message", "org.apache.helix.model.Partition" ]
import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.apache.helix.model.Message; import org.apache.helix.model.Partition;
import java.util.*; import org.apache.helix.model.*;
[ "java.util", "org.apache.helix" ]
java.util; org.apache.helix;
728,343
Button getRadioButtonCCY1();
Button getRadioButtonCCY1();
/** * Gets the CCY1 radio button widget. * * @return a <code>Button</code> value */
Gets the CCY1 radio button widget
getRadioButtonCCY1
{ "repo_name": "nagyist/marketcetera", "path": "trunk/photon/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/views/ICurrencyOrderTicket.java", "license": "apache-2.0", "size": 1077 }
[ "org.eclipse.swt.widgets.Button" ]
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
990,155
@Test public void testNewCostBuilder() throws Exception { long[] dpids = { Long.MIN_VALUE, -1234567L, -1L, 1L, 0xabcdef1234567L, Long.MAX_VALUE, }; String[] ports = { null, "1", "10", }; String[] names = { null, "port-1", "...
void function() throws Exception { long[] dpids = { Long.MIN_VALUE, -1234567L, -1L, 1L, 0xabcdef1234567L, Long.MAX_VALUE, }; String[] ports = { null, "1", "10", }; String[] names = { null, STR, STR, }; long cost = 0; for (long dpid: dpids) { SalNode snode = new SalNode(dpid); for (String port: ports) { String p = (port...
/** * Test case for * {@link PathPolicyUtils#newBuilder(VtnPathCostConfig)}. * * @throws Exception An error occurred. */
Test case for <code>PathPolicyUtils#newBuilder(VtnPathCostConfig)</code>
testNewCostBuilder
{ "repo_name": "opendaylight/vtn", "path": "manager/implementation/src/test/java/org/opendaylight/vtn/manager/internal/util/pathpolicy/PathPolicyUtilsTest.java", "license": "epl-1.0", "size": 43119 }
[ "org.opendaylight.vtn.manager.internal.util.inventory.SalNode" ]
import org.opendaylight.vtn.manager.internal.util.inventory.SalNode;
import org.opendaylight.vtn.manager.internal.util.inventory.*;
[ "org.opendaylight.vtn" ]
org.opendaylight.vtn;
18,824
private void recomputeTravel() { switch (pullState) { case PULL_TOP_THRESHOLD: case PULL_TOP: case PULL_TOP_WAITING: case PULL_TOP_THRESHOLD_RELEASED: final float sign = Math.signum(totalTravel); ...
void function() { switch (pullState) { case PULL_TOP_THRESHOLD: case PULL_TOP: case PULL_TOP_WAITING: case PULL_TOP_THRESHOLD_RELEASED: final float sign = Math.signum(totalTravel); totalTravel = -sign * (float)Math.log(1.0f - totalOffset / (sign * topMaxLength)) / damping; break; case PULL_BOTTOM_THRESHOLD: case PULL_B...
/** * Recomputes the scroll distance travelled for internal calculations */
Recomputes the scroll distance travelled for internal calculations
recomputeTravel
{ "repo_name": "yggie/pulltorefresh", "path": "PullToRefreshLib/src/main/java/com/github/yggie/pulltorefresh/PullListFragment.java", "license": "mit", "size": 73344 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,556,966
private void addRestResourceClasses(Set<Class<?>> resources) { resources.add(com.deitel.equationgeneratorjson.EquationGeneratorJSONResource.class); }
void function(Set<Class<?>> resources) { resources.add(com.deitel.equationgeneratorjson.EquationGeneratorJSONResource.class); }
/** * Do not modify addRestResourceClasses() method. * It is automatically populated with * all resources defined in the project. * If required, comment out calling this method in getClasses(). */
Do not modify addRestResourceClasses() method. It is automatically populated with all resources defined in the project. If required, comment out calling this method in getClasses()
addRestResourceClasses
{ "repo_name": "cleitonferreira/LivroJavaComoProgramar10Edicao", "path": "exemplos do livro (26-N)/ch32/EquationGeneratorJSON/src/java/com/deitel/equationgeneratorjson/ApplicationConfig.java", "license": "mpl-2.0", "size": 1010 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,088,157
public static Format parseEAc3AnnexFFormat(ParsableByteArray data, String trackId, String language, DrmInitData drmInitData) { data.skipBytes(2); // data_rate, num_ind_sub // Read the first independent substream. int fscod = (data.readUnsignedByte() & 0xC0) >> 6; int sampleRate = SAMPLE_RATE_BY...
static Format function(ParsableByteArray data, String trackId, String language, DrmInitData drmInitData) { data.skipBytes(2); int fscod = (data.readUnsignedByte() & 0xC0) >> 6; int sampleRate = SAMPLE_RATE_BY_FSCOD[fscod]; int nextByte = data.readUnsignedByte(); int channelCount = CHANNEL_COUNT_BY_ACMOD[(nextByte & 0x0...
/** * Returns the E-AC-3 format given {@code data} containing the EC3SpecificBox according to * ETSI TS 102 366 Annex F. The reading position of {@code data} will be modified. * * @param data The EC3SpecificBox to parse. * @param trackId The track identifier to set on the format, or null. * @param lan...
Returns the E-AC-3 format given data containing the EC3SpecificBox according to ETSI TS 102 366 Annex F. The reading position of data will be modified
parseEAc3AnnexFFormat
{ "repo_name": "ebr11/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java", "license": "apache-2.0", "size": 20580 }
[ "com.google.android.exoplayer2.Format", "com.google.android.exoplayer2.drm.DrmInitData", "com.google.android.exoplayer2.util.MimeTypes", "com.google.android.exoplayer2.util.ParsableByteArray" ]
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.drm.DrmInitData; import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.ParsableByteArray;
import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.drm.*; import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
1,546,230
try { Files.createDirectories(rOutput.getParent()); final Path source = generatedSourceRoot.resolve("R.txt"); if (Files.exists(source)) { Files.copy(source, rOutput); } else { // The R.txt wasn't generated, create one for future inheritance, as Bazel always requires // ou...
try { Files.createDirectories(rOutput.getParent()); final Path source = generatedSourceRoot.resolve("R.txt"); if (Files.exists(source)) { Files.copy(source, rOutput); } else { Files.createFile(rOutput); } } catch (IOException e) { Throwables.propagate(e); } }
/** * Copies the R.txt to the expected place. */
Copies the R.txt to the expected place
copyRToOutput
{ "repo_name": "Digas29/bazel", "path": "src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java", "license": "apache-2.0", "size": 10559 }
[ "com.google.common.base.Throwables", "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path" ]
import com.google.common.base.Throwables; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path;
import com.google.common.base.*; import java.io.*; import java.nio.file.*;
[ "com.google.common", "java.io", "java.nio" ]
com.google.common; java.io; java.nio;
2,072,629